Installation manual

Publication 1747-RM001G-EN-P - November 2008
Application Example Programs G-17
On/Off Circuit Ladder
Program
Interfacing with Enhanced
Bar Code Decoders Over
DH-485 Network Using the
MSG Instruction
The purpose of this section is to illustrate how to interface Allen-Bradley
Enhanced Bar Code Decoders to SLC 5/03 and higher processors via the
DH-485 network. Enhanced Bar Code Decoders act only as slave devices on
this network. This means that these decoders cannot initiate the transfer of
data to a host device, such as the SLC 5/03 (or higher) processor on DH-485.
The SLC processor must initiate commands to a decoder and poll that decoder
for the reply to those commands.
Processor and Decoder Operation
The Enhanced Bar Code Decoder (catalog number 2755-DS/DD, Series B),
when used as a node on a DH-485 network can act as a slave only. This means
that the decoder may not initiate communications to any other node on the
network. Therefore, in order for a device to get bar code data from an
Enhanced Bar Code Decoder on a DH-485 network, that device must send a
read command and then poll the decoder for the reply with data.
0000
I:1
OSR
B3
B3
0001
O:3
L
JMP
0002
U
0003
LBL
0004
END
Does a one-shot from the input push button to an internal bit - the internal bit is true for only one scan. This prevents
toggling of the physical outpout in case the push button is held "ON" for more than one scan (always the case).
Contains the label corresponding to the jump instruction in rung 1. The remainder of your actual program would be
placed below this rung.
Push Button
False-to-True Toggling Output Toggling Output
Push Button
False-to-True
Push Button
False-to-True
Toggling Output Toggling Output
If the push button input has gone from false-to-true and the output is presently OFF, turn the output ON and jump
over the following rung. If the JMP instruction was missing, the following rung would be true and would turn the
output back OFF.
Push Botton
Input
OSR #1
0
1
1
1
0
B3
0
0
O:3
0
O:3
B3
0
B3
2
0
O:3
0
Go to rest of program
Go to rest of
program
Dummy Bit