750-00004 Parallax Inc, 750-00004 Datasheet
750-00004
Specifications of 750-00004
Related parts for 750-00004
750-00004 Summary of contents
Page 1
Stamp PLC (#30064) BASIC Stamp Programmable Logic Controller Package Introduction The Stamp PLC is a Program Logic Controller that is perfectly sized for automating small machines. Specified by Parallax, Inc., the Stamp PLC was designed by Lawicel Soft-&Hard of Sweden. ...
Page 2
RS-232 Serial Port Once programming is completed, the on-board serial port can be used to send 1 and receive serial data BASIC Stamp socket accommodates any 24-pin BASIC Stamp. This means that this PLC can do virtually anything that a ...
Page 3
Installing the BASIC Stamp Once the cover is removed, install the BASIC Stamp Module (sold separately) into the 24-pin IC socket provided observing the proper orientation. Be sure to get each pin into its respective socket and to not bend ...
Page 4
For each analog signal you wish to read that is a 4-20mA current loop you will need to install a shunt at this time. The shunt locations correspond to the analog channels they are adjacent to. Figure 4 shows the ...
Page 5
... PLC on the bench-top, you can use any 24VDC @ >=300mA supply. Parallax offers a small 24VDC @ 600mA supply, (Order #750-00004), suitable for bench-top experimentation with the Stamp PLC. If you are installing the Stamp PLC for use in the field, be sure to properly size your 24VDC supply to match the entire load, including digital outputs ...
Page 6
Test Program Once the Editor has been installed, and you have the power and serial connections made, apply power and launch the Editor. Hit Ctrl-I to identify the BASIC Stamp. If all is well, the software will be able to ...
Page 7
BS2} ' Stamp type directive Main: LOW 14 ' Make P14 and output and drive it low (turn on) Please carefully observe the behavior of the LED on the front of the Stamp PLC. You should see it pulse ...
Page 8
The BASIC Stamp does not know if this happens, so again, devote a significant amount of time to think about how to make your program and how the Stamp PLC is connected absolutely fail-safe. ...
Page 9
Main IN6 = 0 THEN DEBUG "Input IF IN7 = 0 THEN DEBUG "Input 10 Pressed!",CR PAUSE 250 LOOP Please note the conditional expression within the IF statement true when the value of the inputs is ...
Page 10
The A/D Converter is configured by sending it a control byte. The control byte is made configuration bits . The meaning of each configuration bit is defined by the chart in Figure 10. Figure 10: A/D Converter ...
Page 11
This is a 12-bit ADC result, the two least significant bit seem to jump around quite a bit. Here are a couple of suggestions on how to deal with this you do not need 12-bits of ...
Page 12
The BASIC Stamp does not support division or multiplication of ' negative values. ' -----[ Revision History ]------------------------------------------------ ' ' 21 DEC 2003 : Updated ...
Page 13
Ain1 CON 0 Ain2 CON 1 Ain3 CON 2 Ain4 CON 3 AdcUP5 CON 0 AdcBP5 CON 1 AdcUP10 CON 2 AdcBP10 CON 3 Adc420 CON 4 ' -----[ Variables ]------------------------------------------------------- digIns VAR Word dInLo VAR digIns.LOWBYTE dInHi VAR digIns.HIGHBYTE ...
Page 14
Setup: LOW Clock HIGH Ld165 HIGH AdcCS DOuts = %11111111 DIRH = %11111111 adcRes = 12 ' -----[ Program Code ]---------------------------------------------------- Main: ' demo - replace with your code ' GOSUB Read_DigIns DEBUG HOME, "Inputs = ", BIN10 digIns, CR, ...
Page 15
Update ' ---------------- ' map bits in digOuts to physical connector Update_DigOuts: DOuts.BIT0 = ~digOuts.BIT6 DOuts.BIT1 = ~digOuts.BIT7 DOuts.BIT2 = ~digOuts.BIT4 DOuts.BIT3 = ~digOuts.BIT5 DOuts.BIT4 = ~digOuts.BIT2 ...
Page 16
CASE AdcBP5 IF (adcRaw < 2048) THEN mVolts = 2 * adcRaw + (adcRaw ** $7100 2.4414 ELSE adcRaw = 4095 - adcRaw mVolts = -(2 * adcRaw + (adcRaw ** $7100)) ENDIF CASE AdcUP10 mVolts = 2 ...
Page 17
Program Description ]--------------------------------------------- ' This program demonstrates how to periodically "listen" for a serial ' command while performing another task. ' received parsed and acted upon. ' within 5 seconds, the serial routine times out and ...
Page 18
ENDIF ENDSELECT LOOP UNTIL (keyIn = "X") Back_To_Work: SEROUT 16, Baud, [CR, LF, "Returning to work"] GOSUB Initialize Run_Task: SEROUT 16, Baud, ["."] GOTO Main ' -----[ Subroutines ]----------------------------------------------------- Initialize: SEROUT 16, Baud, [CR, LF, "Working"] RETURN Sometimes it is ...
Page 19
I/O Definitions ]------------------------------------------------- ' -----[ Constants ]------------------------------------------------------- T1200 CON 813 T2400 CON 396 T9600 CON 84 T19200 CON 32 Baud CON T9600 ' -----[ Variables ]------------------------------------------------------- keyIn VAR Byte serString VAR Byte(4) ' -----[ EEPROM Data ]----------------------------------------------------- ' ...
Page 20
FOR keyIn = READ keyIn, serString(keyIn) NEXT keyIn = serString(0) RETURN Set_Password: DEBUG CR, "Enter a 4-character password", CR SERIN 16, Baud, [STR serString\4] DEBUG CR, "Confirm password: " SERIN 16, Baud, [WAITSTR serString\4] FOR keyIn = ...
Page 21
Updated.... 27 JUN 2003 ' ' {$STAMP BS2} ' {$PBASIC 2. ========================================================================= ' ' -----[ Program Description ]--------------------------------------------- ' This program controls two pumps to maintain tank level. ' falls below setpoint #1, the pump with the ...
Page 22
VAR flowB VAR auxContactA VAR auxContactB VAR pumpAStatus VAR pumpBStatus VAR ' -----[ EEPROM Data ]----------------------------------------------------- Records DATA 0(256) ' -----[ Notes ]----------------------------------------------------------- ' ' 2 The first section of ...
Page 23
READ tmp-2,tmp SEROUT 16, Baud, ["Pump A Runtime: ", DEC3 keyIn, ELSE SEROUT 16, Baud, [CR, "No data yet!", CR, CR] ENDIF CASE ELSE SEROUT 16, Baud, [" : Invalid command", BELL, CR, CR] ENDSELECT Control_Level: GOSUB Read_Tank_Level GOSUB Control_Pumps ...
Page 24
SELECT startCode CASE 1 IF (PumpAStatus > 7) THEN GOSUB StartB CASE 2 IF (PumpBStatus > 7) THEN GOSUB StartA ENDSELECT RETURN Since the output drivers for the Stamp PLC are "high-side" drivers, you must issue a LOW command to ...
Page 25
The subroutine "Control_Pumps" decides which pump to start based on how much run-time is on each pump. The idea here is to even the wear. Control_Pumps: SELECT tankLevel CASE < setPoint2 startCode = 3 GOSUB StartA GOSUB StartB CASE < ...
Page 26
DUAL ROW INPUTS 10 ea GREEN LEDS UART SOUT A-K17 UART SIN A-K16 UART UART ATN A-K15 UART GND A-K14 DIG IN 1 A-K13 DIG IN 2 A-K12 DIG IN 3 A-K11 DIG IN 4 A-K10 DIG IN 5 A-K9 ...
Page 27
Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 27 Page ...