30064 Parallax Inc, 30064 Datasheet

STAMP PLC

30064

Manufacturer Part Number
30064
Description
STAMP PLC
Manufacturer
Parallax Inc
Datasheet

Specifications of 30064

Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
BASIC Stamp®
Module/board Type
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
Other names
Q2172565
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. Parallax and
Lawicel have combined their expertise to deliver a PLC that represents the next stage of evolution in the
small-scale PLC market.
PLCs are microcontrollers that are "pre-packaged" to withstand the hazards of an industrial environment.
Specifically, their inputs and outputs are optically isolated, the outputs are fully protected, and their
internal components are electrically tough and rather immune to noise typically present in industrial
environments. Furthermore, the Stamp PLC is housed by a strong and sleek enclosure that offers an
integral DIN rail mount.
Packing List
Verify that your Stamp PLC kit is complete in accordance with the list below:
Optionally, you can purchase the MAX1270 A/D Converter 12-bit, 8 channel 4-20 mA A/D converter. This
is available from Parallax web site http://www.parallax.com/detail.asp?product_id=604-00026. You will
also need to provide a power supply (see below in the Power Supply and Connection section).
Demonstration and example software files used in this documentation may be downloaded from
http://www.parallax.com/detail.asp?product_id=30064.
Features
Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003
Stamp PLC hardware
Serial Cable
Documentation
Small bag with four shunts inside
10 Digital Inputs.
register. BASIC Stamps have built-in commands to read these with ease. The remaining two
inputs are read directly by the BASIC Stamp. All inputs are optically isolated.
8 Digital Outputs are optically isolated, electrically and thermally protected.
4 Analog Inputs (optional). Installing an optional A/D converter into its socket adds four analog
input channels. Each channel can be independently configured as 4-20mA, 0-5 VDC, -5 to +5
VDC, -10 to +10 VDC, and has 12-bits of resolution.
Front Panel LEDs indicate the status of all ten inputs and all eight outputs via a light-pipe array.
Heavy-duty power supply has built-in noise protection.
Eight of these inputs are grouped together courtesy of an on-board shift
599 Menlo Drive, Suite 100
Rocklin, California 95765, USA
Office: (916) 624-8333
Fax: (916) 624-8003
General: info@parallax.com
Technical: support@parallax.com
Web Site: www.parallax.com
Page
1

Related parts for 30064

30064 Summary of contents

Page 1

... Front Panel LEDs indicate the status of all ten inputs and all eight outputs via a light-pipe array. Heavy-duty power supply has built-in noise protection. Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 599 Menlo Drive, Suite 100 General: info@parallax.com Rocklin, California 95765, USA Technical: support@parallax ...

Page 2

... Figure 1: Opening the Stamp PLC Enclosure Figure 2: BASIC Stamp Plugged into the Stamp PLC 1 The Javelin Stamp's programming port currently has limited run-time functionality. For a work-around solution, please contact Parallax Tech Support (916) 624-8333. Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 . 2 Page ...

Page 3

... Once the BASIC Stamp IC and the optional A/D converter are properly installed re-assemble the enclosure. Be sure that the spring, red latch, and the front cover are properly aligned prior to snapping the two halves of the enclosure together. Installing the 4-20mA Shunts Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 3 Page ...

Page 4

... DB9 is not necessary providing that you use BASIC Stamp Editor software version 1.2 (or later). Figure 5: Stamp PLC with Serial Port and Power Connected DB9 Male 24VDC + Vss Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 S OUT S IN ATN GND ...

Page 5

... If you are using a different supply, follow these instructions: ensure the power supply is off, connect the positive lead of your power supply to the +24 VDC pin, connect the negative lead to the adjacent terminal labeled GND. Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 Female DB9 Brown ...

Page 6

... Note: The Stamp PLC uses the IPs512G for its high current driver. To find out more about the IPs512G r please see 1 we attached to this manual. Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 ' Marks the start of the main program ...

Page 7

... The output drivers used by the Stamp PLC are fully protected high-side drivers. This means that if too much current is drawn they get too hot, they shutdown automatically. Additionally, once they cool Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 7 ...

Page 8

... Input 9's I/O address is 6, and input 10's I/O address is 7. The following program listing shows how to access Inputs 9 and 10, and does so using conditional branching statements. '{$STAMP BS2} '{$PBASIC 2.5} Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 ' Stamp type directive ' Stamp expanded syntax directive ' inBits contains inputs 1-8 ...

Page 9

... Note that the "Out 5VDC" terminal is supplying 5 Vdc to the circuit. This output comes from the Stamp's regulator. Do not draw more than 40mA from this terminal. This 5VDC output is referenced to the Stamp's ground. Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 9 Pressed!",CR ' Wait for 1/4 second ...

Page 10

... Analog input channels 1:4 are mapped to A/D converter channels 7:4. It was decided to limit the number of analog input channels to accommodate the number of connections available in this small enclosure. Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 Bit5 ...

Page 11

... The inputs are protected and reduce the voltage felt on the MAX1270 input ' pins. This accounts for code to get a full-scale count of 4095 The raw value (counts) from the ADC will be returned in "adcRaw", converted Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 Conditional compilation is used 11 Page ...

Page 12

... T19200 CON 110 #ENDSELECT Baud CON T9600 Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 Be aware that in bipolar mode the A "1" in BIT15 of "mVolts" indicates a negative ' shared clock ' 74HC165 load ' 74HC165 data in (from) ' ADC chip select ' ADC data out (to) ...

Page 13

... DATA %11111000, %11101000, %11011000, %11001000 ' 0-10 DATA %11111100, %11101100, %11011100, %11001100 ' +/-10 DATA %11110000, %11100000, %11010000, %11000000 ' 4-20 ' -----[ Initialization ]-------------------------------------------------- Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 ' analog channels ' unipolar bipolar, +/- unipolar bipolar, +/- 4-20 mA input ' shadow digital inputs ...

Page 14

... SHIFTIN Di165, Clock, MSBPRE, [dinLo] dinHi = 0 dinHi.BIT0 = ~Di9 dinHi.BIT1 = ~Di10 RETURN ' Refreshes digital outputs, DOut1 - DOut8 Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 ' preset control lines ' all outputs off ' enable output drivers ' use all ADC bits ' load inputs ...

Page 15

... SELECT mode CASE AdcUP5 mVolts = adcRaw + (adcRaw ** $3880) Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 ' map bits from Stamp port ' get config ' select MAX1270 ' send config byte ' deselect MAX1270 ' read channel value ' x ~1 ...

Page 16

... Purpose.... Typical PLC application whereby this unit listens for ' serial commands from a host controller. ' Author..... Parallax, Inc. ' E-mail..... support@parallax.com ' Started.... 26 JUN 2003 ' Updated.... 26 JUN 2003 ' ' {$STAMP BS2} ' {$PBASIC 2. ========================================================================= Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 ' x 2.4414 ' -- 4000 to 20000 ' x 5.0875 ' reduce resolution 16 Page ...

Page 17

... SEROUT 16, Baud, [CR, LF, "Wax Temperature = ", DEC WaxTemp, DegSym, "F", CR] CASE ELSE IF (keyIn <> "X") THEN SEROUT 16, Baud, [BELL] Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 When a serial command command is received ' degrees symbol ' terminal input ' Run_Task if no input ' wait for " ...

Page 18

... The password is stored in eeprom non-volatile. ' -----[ Revision History ]------------------------------------------------ Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 ' User task code goes here ' -- progress indicator ' setup for user task goes ' Given this, security is an issue. ...

Page 19

... LOOP Resume_Program: DEBUG CR Run_Program: DEBUG "*" GOTO Main ' -----[ Subroutines ]----------------------------------------------------- Read_Password: Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 ' terminal input ' Read password ' If not set, set it ' else, start main code ' Once password received ' get a command ' process command ' otherwise, run the ...

Page 20

... File....... Stamp PLC_PumpController.BS2 ' Purpose.... Dual Pump Controller. '' Author..... Parallax, Inc. ' E-mail..... support@parallax.com ' Started.... 27 JUN 2003 Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 ' User interface to enter ' password ' Write password to eeprom ' Clear password in RAM ' to $FF's and in eeprom ' to "0"'s Example program. 20 ...

Page 21

... Byte setPoint2 VAR Byte startCode VAR Nib Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 During pump startup, the pump's aux contact This will effectively ' A/D clock input ' HC165 clock input ' Latch input for HC165 ' HC165 data input ...

Page 22

... SEROUT 16, Baud, [CR, "Tank Level Report", CR, CR] FOR tmp = 0 TO (ptr-4 MIN 1) STEP 4 READ tmp+3,keyIn SEROUT 16, Baud, ["Hour: ", DEC3 tmp/4, NEXT READ tmp-3,keyIn Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 ' Inputs via HC165 Inputs.BIT0 '1 = Flow OK Flow Inputs.BIT1 Inputs ...

Page 23

... WRITE ptr+1,runTimeA WRITE ptr+2,runTimeB WRITE ptr+3,tankLevel.LOWBYTE ptr = ptr + 4 RETURN Stop_Pumps: HIGH PumpA: pumpAStatus = 0 HIGH PumpB: pumpBStatus = 0 RETURN Error_Handler: Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 " Pump B Runtime: ", DEC3 tmp, CR, CR] Pointer = ",HEX2 ptr Page ...

Page 24

... IF (pumpBStatus = 0) THEN LOW PumpB GOSUB GetDigitalInputs IF auxContactB = 0 THEN PAUSE 2000 GOSUB GetDigitalInputs IF (FlowB = 0) THEN pumpBStatus = 1 ELSE pumpBStatus = 8 HIGH PumpB ENDIF ELSE pumpBStatus = 9 HIGH PumpB ENDIF ENDIF GOSUB Error_Handler RETURN Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 24 Page ...

Page 25

... If you wanted more precision for you’re application simply forego this step, but beware that you need to ensure the memory you use must accommodate the extra bits. Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 'Reads tank level ...

Page 26

... Parallax products. Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 Figure 11: Connection Diagram DUAL ROW OUTPUTS ...

Page 27

... Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003 27 Page ...

Related keywords