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

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
A control on StampPlot can be created by defining what type it will be, naming it, and
providing configuration parameters such as coordinates, size, text, etc.
In the code a label (
parameters are set:
X coordinate (82.5), Y Coordinate (64), width (13, height (3), text in it (+/−), color (0-
Black), font size (10) and bordered or not (0, 1 = border).
The font is set using the given name where the 1 parameter in it sets the font to bold.
Next a text box (
For more information on the different controls, please see the StampPlot help files. Note
that the code begins by deleting the named control. This is done to ensure a duplicate is
not created if you reset the BASIC Stamp and the code is run again.
Once created, the BASIC Stamp may read or update these controls by name.
Challenge 7-2
Part A: Adding a Heater-Run Control
Currently, we have no way short of turning off the BASIC Stamp to de-energize the
heater. The following StampPlot code will create a checkbox control for allowing the
user to turn off the heater manually:
' Create label control "lblBand"
DEBUG "!O oLabel.lblBand=82.5,64,13,3,(+/-):,,0,10,0",CR
DEBUG "!O lblBand.Font=Arial,10,1,0",Cr
DEBUG "!O txtBand.Delete",CR
' Create text box control called txtBand
DEBUG "!O oText.txtBand=92,64,7,5,1,15,0,11",CR
!O oCheck.chkHeatRun=82.,53.,8.,8.,Heater Run,0,(BLUE),(WHITE),11
Modify the BASIC Stamp program to:
o
o
o
oText
Create this control on initialization.
Read this control as part of the
into a bit sized variable.
Use the new variable to determine if the heater should be energized
when temperature is below the lower trip point. (HINT: Review the use
of Boolean operators in Chapter 3).
oLabel
– Object Text) called txtBand is created using similar parameters.
– Object Label) is first created called
ReadSP_Controls
' Set Font of lblBand
' Delete control if exists
subroutine and store
lblBand
and its

Related parts for 122-28176