28176 Parallax Inc, 28176 Datasheet - Page 157

KIT PARTS PROCESS CONTROL W/TEXT

28176

Manufacturer Part Number
28176
Description
KIT PARTS PROCESS CONTROL W/TEXT
Manufacturer
Parallax Inc
Datasheet

Specifications of 28176

Accessory Type
Process Control
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
BASIC Stamp® 2 and Board of Education
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
off quickly in code is not very efficient in that time is wasted looping and performing
other code. The 20% drive is not truly 20%.
Program Discussion
In the
speed and used to calibrate for the maximum speed.
!REQD
window and takes the form of:
!REQD initial value, time to display in seconds, message
An example string received from the BASIC Stamp would be:
\n
In this example, the initial value is 0 (false), display for 30 seconds, and the message
shows the current RPM. The
data and then test the user's response.
A transfer function is used to scale the RPM, or counts, to a percentage in the
DO...LOOP
output and dividing by the maximum input. Transfer functions are covered in greater
detail in Chapter 6.
In this case, the change in output is 0 to 100% and the change in input is 0 to the
maximum counts for the fan at maximum speed. In the calibration routine, once the user
indicates the fan is at speed, the maximum count value is stored and used later to
calculate %RPM.
If RPM were used, the math would have exceeded our math limits: 8000 x 100 = 80,000.
, the new-line character, is used to place text on the next line.
Calibrate
is a StampPlot instruction to request data from the user through a message box
!REQD 30,0,Maximum RPM=7850.\nEnter1 if RPM OK.\nEnter 0 if not OK.
Per_RPM = Opto_Count * 100 / Max_Count
. A simple transfer function is calculated by multiplying by the maximum
DEBUG "!REQD 0,30,Maximum RPM=", DEC RPM,
subroutine, input from the user verifies that the fan is at the correct
"\nEnter 1 if Reading OK.",
"\nEnter 0 if not OK.",CR
DEBUGIN
instruction is then used to accept the returning

Related parts for 28176