industrial smart relay - veltronics smart relay.doc  · web viewrisc. components. 1 negative 24...

5
www.veltronics.ca 1 905-840-3039 Industrial Basic PLCu RISC Components 1 Negative 24 VDC 2 Positive 24 VDC 3 AC/DC Input 5 (24V) Optically Isolated 4 AC/DC Input 4 (24V) Optically Isolated 5 AC/DC Input 3 (24V) Optically Isolated 6 AC/DC Input 2 (24V) Optically Isolated 7 AC/DC Input 1 (24V) Optically Isolated 8 AC/DC Input Common 9 Output 5 – NO Relay Up to 8A 250VAC / 5A 30VDC 10Output 4 – NO Relay Up to 8A 250VAC / 5A 30VDC 11 Output 3 – NO Relay Up to 8A 250VAC / 5A 30VDC 12 Output 2 – NO Relay Up to 8A 250VAC / 5A 30VDC 13 Output 1 – NO Relay Up to 8A 250VAC / 5A 30VDC 14 16 Position Selector Switch (Programmable) 15 Trimmer #1 (ADC) 16 Trimmer #2 (ADC) 17 Serial Port (In-board Programming ISP) 18 Green LED (Programmable) 19 Red LED (Programmable) Din Rail Mounting Dimensions (L X W) 101 X 76 mm Programming languages which could be used with this controller: Basic, Assembler, C, Pascal, or Boot Loader Support Links for Demo Software:

Upload: others

Post on 27-Mar-2020

16 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Industrial Smart Relay - VELTRONICS Smart Relay.doc  · Web viewRISC. Components. 1 Negative 24 VDC. 2 Positive 24 VDC. 3 AC/DC Input 5 (24V) Optically Isolated . 4 AC/DC Input 4

www.veltronics.ca 1 905-840-3039

Industrial Basic PLCuRISC

Components

1 Negative 24 VDC2 Positive 24 VDC3 AC/DC Input 5 (24V)

Optically Isolated 4 AC/DC Input 4 (24V)

Optically Isolated5 AC/DC Input 3 (24V)

Optically Isolated6 AC/DC Input 2 (24V)

Optically Isolated7 AC/DC Input 1 (24V)

Optically Isolated8 AC/DC Input Common9 Output 5 – NO Relay

Up to 8A 250VAC / 5A 30VDC10Output 4 – NO Relay

Up to 8A 250VAC / 5A 30VDC11 Output 3 – NO Relay

Up to 8A 250VAC / 5A 30VDC12 Output 2 – NO Relay

Up to 8A 250VAC / 5A 30VDC13 Output 1 – NO Relay

Up to 8A 250VAC / 5A 30VDC14 16 Position Selector Switch

(Programmable)15 Trimmer #1 (ADC)16 Trimmer #2 (ADC)17 Serial Port

(In-board Programming ISP)18 Green LED (Programmable)19 Red LED (Programmable) Din Rail Mounting Dimensions (L X W) 101 X 76 mm

Programming languages which could be used with this controller:Basic, Assembler, C, Pascal, or Boot Loader Support

Links for Demo Software:Basic Compiler BASCOM http://www.mcselec.com/Assembler AVR ATMEL http://www.atmel.com/ Atmega 8 AVR 8-Bit RISCC Compiler IMAGE CRAFT http://www.imagecraft.com/Pascal Compiler E-LAB http://www.e-lab.de/AVRco/index_en.html

INDUSTRIAL ELECTRONIC CONTROLS & SERVICE LTD.INDUSTRIAL ELECTRONIC CONTROLS & SERVICE LTD.

www.veltronics.ca 905-840-3039

Page 2: Industrial Smart Relay - VELTRONICS Smart Relay.doc  · Web viewRISC. Components. 1 Negative 24 VDC. 2 Positive 24 VDC. 3 AC/DC Input 5 (24V) Optically Isolated . 4 AC/DC Input 4

www.veltronics.ca 2 905-840-3039

Technical Schematic

http://www.atmel.com/dyn/resources/prod_documents/doc2486.pdf

Page 3: Industrial Smart Relay - VELTRONICS Smart Relay.doc  · Web viewRISC. Components. 1 Negative 24 VDC. 2 Positive 24 VDC. 3 AC/DC Input 5 (24V) Optically Isolated . 4 AC/DC Input 4

www.veltronics.ca 3 905-840-3039

Sample Basic Program$regfile = "M8DEF.DAT"$crystal = 8000000$baud = 9600 '9600

Config Watchdog = 2048Config Timer0 = Timer , Prescale = 1024 : Stop Timer0 '10 mS timerConfig Timer1 = Timer , Prescale = 8 : Stop Timer1Config Timer2 = Timer , Prescale = 64 : Stop Timer2Config Debounce = 50Config Adc = Single , Prescaler = Auto , Reference = Internal 'Analog Input SetupStart Adc 'Start Analog Input

In1 alias pind.0 : config pind.0 = input : set portd.0In2 alias pind.1 : config pind.1 = input : set portd.1In3 alias pind.2 : config pind.2 = input : set portd.2In4 alias pind.3 : config pind.3 = input : set portd.3In5 alias pind.4 : config pind.4 = input : set portd.4

Rel1 alias portd.7 : config pind.7 = output : reset Rel1Rel2 alias portb.0 : config pinb.0 = output : reset Rel2Rel3 alias portd.5 : config pind.5 = output : reset Rel3Rel4 alias portb.7 : config pinb.7 = output : reset Rel4Rel5 alias portb.6 : config pinb.6 = output : reset Rel5

RedLED alias portb.1 : config pinb.1 = output : reset RedLEDGreenLED alias portb.2 : config pinb.2 = output : reset GreenLED

Coder0 alias pinc.4 : config pinc.4 = input : set portc.4Coder1 alias pinc.3 : config pinc.3 = input : set portc.3Coder2 alias pinc.2 : config pinc.2 = input : set portc.2Coder4 alias pinc.5 : config pinc.5 = input : set portc.5

Dim An0 As Word , An1 as Word , Flag1 as Bit , Flag2 as Bit , TMRCntrA as word , TMRCntrB as wordDim BitCoder as byte , H as Bit , L as bit , NH as Bit , NL as bitFlag1 = 0 : Flag2 = 0 : TMRCntrA = 0 : TMRCntrB = 0 : H = 0 : L = 1 : NH = 1 : NL = 0Declare Sub GetCoderDeclare Sub GetAnalogDeclare Sub IODeclare Sub OutputBit'---------------------------------------------------------------------------------- Main: gosub GETCODER gosub GETANALOG gosub IO gosub OUTPUTBIT goto MAIN

GetCoder: 'Selector Switch BitCoder = 0 BitCoder.0 = not Coder0 : BitCoder.1 = not Coder1 BitCoder.2 = not Coder2 : BitCoder.4 = not Coder4 return

GetAnalog: 'Get Analog Value An0 = Getadc(0) : An1 = Getadc(1) return

IO: Rel1 = BitCoder.0 : Rel2 = Bitcoder.1 Rel3 = Bitcoder.2 : Rel4 = Bitcoder.4 if In5 = H then set Rel5 else reset Rel5 endif Return

OutputBit: incr TMRCntrA if TMRCntrA <= An0 and Flag1 = 0 then return Flag1 = 1 : reset RedLED : set GreenLED 'Enable Green LED incr TMRCntrB if TMrCntrB <= AN1 and Flag1 = 1 then return Flag1 = 0 : TMRCntrA = 0 : TMRCntrB = 0 set RedLED : reset GreenLED 'Enable Red LED return '=================================================================================end 'end program