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

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
ACTIVITY #2: STAMPPLOT INTERACTIVE CONTROL
StampPlot also supports interactive control with the BASIC Stamp. The BASIC Stamp
can request data from StampPlot and use the data for updating parameters.
Parts Required
Same as Chapter 1, Activity #2 (page 6).
Now let’s add the following elements to your code:
What occurs to the alarm level setpoints on the plot? They should change to match the
new settings. The BASIC Stamp is reading the values from the interface.
Code Discussion
When the BASIC Stamp executes:
Open StampPlot to the macro sic_pc_light_level.spm.
In the BASIC Stamp Editor, open LightAlarmWithSubroutines.bs2 from page 18
and save it with a new name.
In the Main Routine
GOSUB ReadStampPlot
In the Subroutines section add the following routine:
ReadStampPlot:
RETURN
Run the modified program.
Close the Debug Terminal and connect on StampPlot. Both the lower-left R and
T indicators should be blinking as data is received and transmitted.
Change the Min. Alarm and Max. Alarm text box values (be sure to Tab-off
to set).
DEBUG "!READ (txtMinA)",CR
DEBUG "!READ (txtMinA)", CR
DEBUGIN DEC PhotoMin
PAUSE 50
DEBUG "!READ (txtMaxA)", CR
DEBUGIN DEC PhotoMax
PAUSE 50
DO...LOOP
, add the code after
' Update values from StampPlot
' Read value of Min Alarm text
' Accept data and store
' Allow echo to clear from BS2
' Read value of Max Alarm text
' Accept data and store
' Allow echo to clear from BS2
DO
:

Related parts for 122-28176