08/11/00 Reading 2100-GK61

TECH NOTE – Reading 2100-GK61 inputs.
Explicit messaging is used to read GK61 inputs. An example program and
explaination are used to illustrate the technique.
Hardware configuration for program example:
P
L
C
Power
Supply
P
R
O
C
S
C
A
N
N
E
R
1
7
7
1
1
7
7
1
Starter
S
I
M
S
I
M
SMP-3
G
K
6
1
ScanPort
Cable
To Scanner CH 1 (Port A)
1784-CP10
Prog Cable
Serial Port
HP 4150 Laptop
DeviceNet Cable
with terminating
resistor on each
end. (120 ohms)
Switch Box
(4 switches wired from
control voltage to inputs)
PCD Card
Set GK61 DIP switch
SW1 for 24Vdc, 120Vac
or 240Vac.
Page 1 of 7
Equipment used for example program:
PLC 4-slot chassis with:
Processor Slot – PLC-5/20
Slot 0 – 1771-SDN scanner
Slot 1 – 1771-SIM card
Slot 2 – 1771-SIM card
External power supply
2100-GK61 DeviceNet to SCANport Communication Module with Digital Inputs
24V dc power supply
SMP-3 electronic overload relay
HP 4150 Laptop PC with:
1784-PCD DeviceNet card
PLC programming cable
RS Lynx software (communications drivers)
RS Networx for DeviceNet software (for configuring 2100-GK61 and scanner)
RS Logix 5 software (for programming PLC)
DeviceNet cable and 5 position connectors (for linking scanner, GK61 and PCD card)
ScanPort cable (for connecting GK61 and SMP-3) Part # 40121-487-02(A)
120 ohm terminating resistors (one at each end of cable across blue and white wires)
References:
Pub 2100-UM001A-US-P DeviceNet to SCANport Communication Module with Digital Inputs
• Ch 4 – Configuring a scanner to communicate with the GK61 using RS Networx for DeviceNet.
• Ch 5 – Ladder Logic Programming. Focus is on Logic Control Data and Status Data.
• Ch 6 – Using DeviceNet Explicit Messaging. Ladder programming for reading GK61 inputs.
• Appendix B – DeviceNet to SCANport Communication Moduloe with Digital Inputs Parameters.
Information on setting node address and data rate.
• Appendix C – DeviceNet Objects – Includes details on Class Code 0x93 – SCANport PassThrough Parameter Object used for reading GK61 inputs.
• Apprendix E – Supported Emulated Block Transfer Commands. Last page pertains to reading
digital inputs on GK61.
Pub 193-5.0 Bulletin 193/592 SMP-3 Solid-state Overload Relay User Manual
• Chapter 6 – Serial Communication – information on Logic Control Data and Status Data
Page 2 of 7
Example Ladder Program Explanation:
• Rung 0 – N10:0/0 enables 1771-SDN Scanner Port A.
• Rung 1 - BTR (Block Transfer Read) gathers SMP-3 Status Data via DeviceNet. The Block
Transfer then moves the status data from the scanner to the PLC’s N9 data file.
• Rung 2 – BTW (Block Transfer Write) sends SMP-3 command data to the scanner and out out to
the SMP-3 via DeviceNet.
• Rung 3 – Turns off SMP-3 Output A (by momentarily turning on I:001 / 0)
• Rung 4 – Turns off SMP-3 Output B (by momentarily turning on I:001 / 1)
• Rung 5 – Clears SMP-3 Fault (by momentarily turning on I:001 / 2)
Page 3 of 7
• Rung 6 – Turns on SMP-3 Output A (by momentarily turning on I:001 / 3)
• Rung 7 – Turns on SMP-3 Output B ( by momentarily turning on I:001 / 4)
• Rung 8 – When I:002 / 1 is set to the true state, the next instruction, a one-shot block transfer Write,
sends data to the scanner. The Move instruction then initializes the first word of the data file that is
used by the block transfer Read instruction in the next rung. Alternatively, I:002 / 2 can be set true to
enable a continuous read mode based on cycle rate of T4:1 / DN.
• Rung 9 – This instruction will be true when the block transfer Write has completed. The compare
instruction that follows compares the first word of data sent from the scanner to the first word of data
you send to the scanner. When the messaging function has completed, these two words will be
equal.
Page 4 of 7
• Rung 10 – GK61 input status is read at N30:73 and sent to Output 001, a 1771-SIM card in slot 1.
The hexadecimal mask 0FH transfers only the 4 least significant bits.
• Rungs 11 and 12 – Generator provides a 20 ms read pulse every 500 ms. T4:1 / DN must be
enabled on Rung 8, previous page.
Page 5 of 7
Data must be entered in N Register as shown below. Set Radix to Hex/BCD. A chart is
provided on next page to convert decimal node numbers to hexadecimal format.
•
•
•
•
•
•
•
•
•
•
N30:0 = 0201 (02 = transaction ID; 01 = Execute command)
N30:1 = 0004 (00 = Port 0; 04 = word size of 4 bytes)
N30:2 = 0E0E (Service 0E = Get Attribute Single; 2nd 0E (bold) is Node number.
N30:3 = 0093 (0093 = class code – SCANport Pass-Through Parameter Object)
N30:4 = 4015 (4015 = parameter number for GK61 inputs)
N30:5 = 0001 (Attribute = 1)
N30:70 = 0201 (02 = transaction ID; Status 01 = Success)
N30:71 = 0002 (00 = Port 0; 04 orginially typed in – PLC changed value to 02)
N30:72 = 8E0E (Service 8E = Get Attribute Singe; 2nd 0E (bold) is Node number.
N30:73 = Results of GK61 input read. Data is in Hexadecimal format 0-F. 0 = 0000 (all bits off) F
= 1111 (all bits on)
Page 6 of 7
DeviceNet Node addresses in Decimal, Hexadecimal and Binary:
Decimal node number is in bold type. To right of decimal value is equivalent hexadecimal value used in
N register locations N30:2 and N30:72. (See previous page.)
Node (Dec)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Node (Hex)
00
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F
Node (Bin)
0000 0000
0000 0001
0000 0010
0000 0011
0000 0100
0000 0101
0000 0110
0000 0111
0000 1000
0000 1001
0000 1010
0000 1011
0000 1100
0000 1101
0000 1110
0000 1111
0001 0000
0001 0001
0001 0010
0001 0011
0001 0100
0001 0101
0001 0110
0001 0111
0001 1000
0001 1001
0001 1010
0001 1011
0001 1100
0001 1101
0001 1110
0001 1111
Node (Dec)
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Node (Hex)
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F
30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F
Page 7 of 7
Node (Bin)
0010 0000
0010 0001
0010 0010
0010 0011
0010 0100
0010 0101
0010 0110
0010 0111
0010 1000
0010 1001
0010 1010
0010 1011
0010 1100
0010 1101
0010 1110
0010 1111
0011 0000
0011 0001
0011 0010
0011 0011
0011 0100
0011 0101
0011 0110
0011 0111
0011 1000
0011 1001
0011 1010
0011 1011
0011 1100
0011 1101
0011 1110
0011 1111