6 - 45 6 - 45
6 IEC FUNCTIONS
6.7.3 Exclusive logical sum XOR_E
The exclusive logical sum of the specified multiple data is operated.
Function definition
BOOL XOR_E( BOOL EN, ANY_BIT S1, ANY_BIT S2,…., ANY_BIT Sn, ANY_BIT D1 );
Argument
Argument Name
IN/OUT
Description
EN
IN
Execution condition (Function is executed only when the result is TRUE)
S1 to Sn
IN
Data to be EXCLUSIVE ORed
D1
OUT
EXCLUSIVE OR operation result
Return value
Return Value
Description
BOOL Execution
condition
Remarks:
Example of use
Argument Type
ST Program
Conversion Result
Used Instruction
BOOL
b_result := XOR_E( b_select,
b_data1, b_data2, b_data3 );
LD
b_data1
ANI b_data2
LDI b_data1
AND b_data2
ORB
OUT M8191
LD
b_select
AND
M8191
SET
b_data3
LD
b_select
ANI
M8191
RST
b_data3
LD
b_select
OUT
b_result
LD,ANI,LDI,AND,ORB,
OUT,SET,RST
Word device
b_result := XOR_E( TRUE,
d0z2, d1z3, d2z4 );
LD SM400
WXOR D0Z2 D1Z3
D2Z4
LD SM400
OUT b_result
LD,WXOR, OUT
For the usable data type, refer to "3.2.2 About ANY type".
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......