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

Chapter 7
Move/Logical Instructions (MOV, MVM, BTD, MVMT, BTDT, CLR, SWPB, AND, OR, XOR, NOT, BAND, BOR, BXOR, BNOT)
342
Example 1:
This example complements bool_in1 and places the result in value_result_not.
If BOOL_IN1 is
0
1

Structured Text

value_result_not := NOT bool_in1;

Function Block

Example 2:
If bool_in1 is cleared, light1 is cleared (off ). Otherwise, light1 is set (on).
Structured Text
IF NOT bool_in1 THEN
light1 := 0;
ELSE
light1 := 1;
END_IF;
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Then VALUE_RESULT_NOT is
1
0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents