750-00004 Parallax Inc, 750-00004 Datasheet - Page 7

no-image

750-00004

Manufacturer Part Number
750-00004
Description
POWER SUPPLY 24VDC 600MA
Manufacturer
Parallax Inc
Datasheet

Specifications of 750-00004

Form
Wall Mount (2 Prong)
Voltage - Output Per Connector
24VDC
Current - Output
600mA
Polarization
Positive Center
Cord Plug
2.1mm I.D. x 5.5mm O.D. x 12mm Female
Voltage - Input
120VAC
Power - Output
14W
Transformer Type
Linear, Unregulated
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Efficiency
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
'{$STAMP BS2}
Main:
Please carefully observe the behavior of the LED on the front of the Stamp PLC. You should see it pulse
off for a fraction of a second (18mS), then remain on steadily for ~2.3 seconds. This behavior is normal,
considering the fact that our program is incomplete.
Every BASIC Stamp has a built-in watchdog timer. A watchdog timer monitors the program's behavior
and always counts down. If the watchdog timer ever expires, it automatically resets the Stamp and the
user program (your basic program) starts over from the beginning. Each time a valid Stamp instruction is
completed, the watchdog timer is reset, thereby staving off a watchdog reset. Why is the reset occurring
in the example above? The reason is that we have not specified what the Stamp is to do after completing
the "LOW 14" command. Essentially, the imaginary pointer that points to "the next instruction to do" has
been allowed to "fall off into the weeds". To make this program complete and to keep our program
pointer on the path, it is necessary to contain Stamp programs within a loop.
'{$STAMP BS2}
'{$PBASIC 2.5}
Main:
Amending your program to reflect the changes made above should rectify the watchdog reset problem.
In other words, the LED representing P14 will remain on steadily. It is important to understand the
nature of a watchdog reset. Depending on your program, a logical error in your program could cause a
watchdog reset and you may not notice it if you don't know what to look for. Please be certain that your
program is functioning exactly as designed, (i.e. no resets), before placing it in service.
The PBASIC syntax offers many features that, if used, can greatly enhance the readability of your Stamp
code. It is desirable to make your program as readable as possible. Doing so will make bugs easier to
find, and perhaps three years from now, when a customer requests a function added to your program
and you've forgotten how it works, a brief read through your program and it's comments reveal just how
everything works. One way to enhance the readability of your program is to use descriptive aliases and
comments where possible.
'{$STAMP BS2}
'{$PBASIC 2.5}
Pump
Main:
As you can see, the program has been modified to switch on the pump every ten seconds for duration of
one second.
The output drivers used by the Stamp PLC are fully protected high-side drivers. This means that if too
much current is drawn, or if they get too hot, they shutdown automatically. Additionally, once they cool
Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003
LOW 14
LOW 14
DO : LOOP
DO
LOOP
LOW
PAUSE 1000
HIGH Pump
PAUSE 10000
PIN
Pump
14
' Stamp type directive
' Make P14 and output and drive it low (turn on)
' Stamp type directive
' Stamp expanded syntax directive
' Make P14 and output and drive it low (turn on)
' Wait here until hard reset
' Stamp type directive
' Stamp expanded syntax directive
' P14 is connected to the pump output
' Turn on the Pump
' let it run for 1 second
' Turn off the Pump
' Wait for 10 seconds
' then repeat
Page
7

Related parts for 750-00004