Chapter 8 Logic Instructions
Programming Example
The data types of NE_In1 and NE_In2 are INT and DINT respectively and the data type of Out1
is BOOL.
Out1 changes to TRUE when the values of NE_In1 and NE_In2 are 100 and 50 respectively and NE
_EN changes to TRUE as shown in Variable 1.
Out1 changes to FALSE when the values of NE_In1 and NE _In2 are 100 and 100 respectively and
NE_EN changes to TRUE as shown in Variable 2.
Variable 1
Variable 2
The Program
The data types of NE_In1 and NE_In2 are both TIME and the data type of Out1 is BOOL.
Out1 changes to TRUE when the values of NE_In1 and NE_In2 are T#10ms and T#50ms
respectively and NE_EN changes to TRUE.
The variable table and program
1
NE
EN ENO
In1 Out
In2
NE_ EN
NE_ In1
NE_ In2
Out1
1
NE
EN ENO
In1 Out
In2
NE_ EN
NE_ In1
NE_ In2
Out1
8-39