130-28176 Parallax Inc, 130-28176 Datasheet - Page 273
130-28176
Manufacturer Part Number
130-28176
Description
KIT PARTS PROCESS CONTROL
Manufacturer
Parallax Inc
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
- Current page: 273 of 330
- Download datasheet (11Mb)
The code reveals how the error is calculated and the proportional output calculated:
The total output is the sum of the P, I, and D outputs, but in this case, Integral and
Derivative will be zero since those calculations are not being performed. Since the limit
of the BASIC Stamp calculations is +/− 32,000, code has been added to ensure the
maximum does not exceed 25,000. The BASIC Stamp can't perform all math operations
on negative numbers and provide results we would recognize. When working with
division, MIN, MAX, and some other operations, they need to be performed on positive
values only. To do this, the sign of the value is saved (Bit 15 = 1 if negative), the
absolute value is used, and the sign re-applied.
Currently, the proportional control is simply equal to the error: P = E. In actuality, the
error is multiplied by some constant, gain (K
set amount of error: P = K
CalcError:
RETURN
CalcProp:
RETURN
CalcTotal:
RETURN
Error in Error? In the classical PID formula, as illustrated in Figure 8-1, error is calculated
as:
However, for this program we are using the expression
In effect, errors that would be negative in the classical formula, are positive in our PIDEval
program. This was done only for this activity, in order to show the output drive increasing as
the photoresistor readings increase.
setpoint, we would like to see a positive output drive, for which we need a positive error.
In the next activity, using the incubator model, we will again use the classical formula, which
will produce a negative error when the temperature is greater than the setpoint.
Prop = Error
Total = Prop + Integ + Deriv
SignBit = Total.BIT15
Total = ABS(Total) MAX 25000
IF signBit = 1 THEN Total = Total * -1
Error = PhotoVal - SetPoint
Error = Photoval – Setpoint
Error = Setpoint – MeasuredValue
P
E
That is, for photoresistor values greater than the
P
), to adjust how much drive is applied for a
' Error per Figure 8-1
' Error used in PIDEval.bs2
Related parts for 130-28176
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
KIT PROPELLER EDU PROJECT PARTS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
KIT PARTS SMART SENSORS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: