130-28176 Parallax Inc, 130-28176 Datasheet - Page 311

KIT PARTS PROCESS CONTROL

130-28176

Manufacturer Part Number
130-28176
Description
KIT PARTS PROCESS CONTROL
Manufacturer
Parallax Inc
Datasheets

Specifications of 130-28176

Accessory Type
Education Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Board of Education Full Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
CalcI_Drive:
'
'
'
RETURN
' **** Calculate %Derivative based on change in error over change in time
'
CalcD_Drive:
RETURN
' **** Drive incubator with PWM based on Drive total
Control_Incubator:
'
'
'
IF (Ki <> 0) THEN
ELSE
ENDIF
TempDrive = Err - LastErr
signBit = TempDrive.BIT15
TempDrive = ABS(TempDrive)/ DriveTime
IF SignBit = 1 THEN TempDrive=TempDrive * -1
IF Kd = 0 THEN TempDrive = 0
DEBUG SDEC TempDrive,","
TempDrive = ABS(TempDrive) * Kd / Kd_Scalar MAX 2000
IF signBit = 1 THEN TempDrive=TempDrive * -1
DEBUG SDEC TempDrive,","
DriveTotal = DriveTotal + TempDrive
LastErr=Err
IF DriveTotal.BIT15 = 1 THEN DriveTotal = 0
IF DriveTotal > 1000 THEN DriveTotal = 1000
DEBUG SDEC DriveTotal,CR
DEBUG IBIN Fan,CR
PWMVal = DriveTotal/10 * 255/100
SignBit =Err.BIT15
' Scale to hold very high readings for SumEdt
TempDrive = ABS(Err)/20
IF SignBit = 1 THEN TempDrive = TempDrive * -1
I_Edt = I_Edt + (TempDrive * DriveTime)
SignBit = I_Edt.BIT15
I_Edt = ABS(I_Edt) MAX 31000
IF SignBit = 1 THEN I_Edt = I_Edt * -1
TempDrive = ABS(I_Edt)/10
TempDrive = TempDrive * Ki / (Ki_Scalar/200) MAX 2000 '(scalar /100) * 2
IF SignBit = 1 THEN TempDrive = TempDrive * -1
I_Edt = 0
TempDrive = 0
DEBUG SDEC I_Edt,","
DEBUG SDEC TempDrive,","
DriveTotal = DriveTotal + TempDrive
%Integral Drive based on total integrated error and gain
Ki = 0 then reset total integrated error
Update StampPlot and add to total drive
Added to total drive
Ensure => 0 and < 1000 (100%)
Convert to 0-255 PWM value
If cooling, do not heat
' Send Drive-T
'
' Send SumEdt
' Send Drive_I
' Send dE/dt
' Send Drive-I

Related parts for 130-28176