Chapter 8 Logic Instructions
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if
the input variable is omitted. But the output variable is allowed to omit.
The value of Out varies between 0 and π when the value of In changes between -1.0 and 1.0. The
instruction will not go to the error state if the value of In is out of -1.0 ~1.0 and the value of Out is
nonnumeric.
The variable table and program
Variable name Data type Current value
ACOS_EN
BOOL
TRUE
1
ACOS
EN ENO
In Out
ACOS_EN
ACOS_In Out1
Programming Example
The data types of variables ACOS_In and Out1 are REAL and LREAL respectively. The value of
Out1 is 0 if the value of ACOS_In is 1.0 when ACOS_EN changes to TRUE. The value of Out1 is
3.14159265358979 as ACOS_In is -1.0.
Variable
Variable
Out1
LREAL 3.14159265358979
The program
1
ACOS
EN ENO
In Out
ACOS_EN
ACOS_In Out1
8-89