122-28176 Parallax Inc, 122-28176 Datasheet - Page 309

GUIDE STUDENT PROCESS CONTROL

122-28176

Manufacturer Part Number
122-28176
Description
GUIDE STUDENT PROCESS CONTROL
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-28176

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
I_Edt
I_Sign
DriveTotal
LastErr
Bias
Band
Span
Offset
SetP
PWMVal
x
SignBit
' The actual gain is a function of K/Scalar
' Ex: Gain Prop = Kp/Kp_Scalar = 0 to 15 divided by 5 = 0.0 to 3.0
'
Kp
Kp_scalar
Ki
Ki_scalar
Kd
Kd_scalar
' -----[ Initialization ]--------------------------------------------------
' -----[ Main Routine ]----------------------------------------------------
DO
' Set initial values
LOW Fan
SetP = 1015
Band = 20
Kp = 0
Ki = 0
Kd = 0
Offset = 80
Span = 40
Bias = 50
DriveTime = 1
PAUSE 1000
GOSUB ConfigSP
GOSUB ReadSP
GOSUB ReadADC
GOSUB CalcError
in increments of 0.2 (1/5)
VAR Word
VAR Bit
VAR Word
VAR Word
VAR Word
VAR Byte
VAR Byte
VAR Byte
VAR Word
VAR Byte
VAR Byte
VAR Bit
VAR Nib
CON 5
VAR Nib
CON 1000
VAR Nib
CON 1
' Cooling off
' Temp in tenths
' Temperature band in tenths
' 0-15, actual kp = kp/scalar)
' 0-15, actual ki = ki/scalar)
' 0-15, actual kd = kd/scalar)
' Lowest temp
' Highest - lowest
' Bias Drive
' Drive time
' Allow connection to stabilize
' Configure StampPlot Controls
' Read SP updates, comment out to disable
' StampPlot interactivity
' Integral variables
' Calculated total drive (tenths)
' Last error amount
' Amount of Bias drive
' Size of temperature control band
' ADC Span (tenths)
' ADC Offset (tenths)
' Setpoint Value (tenths)
' Calculated PWM value (0-255)
' Working variable
' Holds calculation sign (+/-)
' Proportional Gain Constant (scaled 0-15)
' Scalar for Proportional Gain
' Integral Gain Constant
' Scalar for Integral Gain
' Derivative Gain Constant
' Scalar for Derivative Gain
(scaled 0-15)
(scaled 0-15)

Related parts for 122-28176