Relay Ladder; Structured Text; Function Block - Allen-Bradley Logix5000 Reference Manual

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

Example 1:
value_1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1
mask_1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0
masked
v alue_1 0 1 0 1 0 1 0 1 1 1 1 1
Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ)
If the masked value_1 is equal to the masked value_2, set light_1. If the masked
value_1 is not equal to the masked value_2, clear light_1. This example shows
that the masked values are equal. A 0 in the mask restrains the instruction from
comparing that bit (shown by x in the example).
x
x
x
x

Relay Ladder

Structured Text

light_1 := ((value_1 AND mask_1)=(value_2 AND mask_2));

Function Block

Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
value_2 0 1 0 1 0 1 0 1 1 1 1 1 0 0 0 0
mask_1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0
masked
alue_2 0 1 0 1 0 1 0 1 1 1 1 1 x
v
Chapter 5
x
x
x
255

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents