Installation manual

Publication 1747-RM001G-EN-P - November 2008
G-24 Application Example Programs
The internal storage bit, B3/1, holds the MSG instruction true until DN and DA are both set, indicating completion
of the command sent and reply received sequence. When DN is set and DA is reset, unlatching the MSG EN bit
effectively toggles the MSG instruction the same as if the MSG rung were toggled, i.e. rung conditions made false,
then true. The MSG instruction is toggled one time after DN and NOT DA plus some time delay, to send a final poll
to the decoder to get the MSG reply. When the reply is received, the SLC processor sets DN and DA.
When the SLC processor sets both DN and DA for a MSG instruction, the MSG sequence to an Enhanced Bar Code
Decoder is complete. In this case, the decoder has received the “trigger” command and has performed this
command. Therefore, unlatch B3/1 at this time to be ready for the next request for “trigger”.
If an error occurs with the MSG instruction, the ER bit is set. If this occurs, the user can either try to resend the
same message again by unlatching EN, or at this point, could sound an alarm or route the product down a rework
loop or some other similar action. If the latter choice is used, you must also unlatch B3/1 at this time to be ready for
the next request for “trigger”.
This rung detects false-to-true transitions of either a good read or a no-read input from the bar code decoder and
latches internal storage bit B3/2. B3/2 then, in the next rung, initializes the MSG read command to the decoder.
This is done if either a good read or a no-read occurs, because the no-read message configured in the decoder is
data as much as actual bar code label data. Therefore, the ladder program must distinguish between data that
means no-read as well as actual bar code label data.