When the execution result is 0, #L_CalcZero turns on.
When the execution results in an error, the error code is stored in #L_CalcErrCode.
When checking the result using system variables, make sure the check takes place after the instruction has been executed. When checking the state after multiple instructions have been executed, system variables will store the result only of the last processed instruction.
Program Example
SQRT
When the positive transition instruction turns ON, the SQRT instruction will be executed. When the SQRT instruction is executed, the square root of Data_A is stored in the calculation result (real/float variable) in D1.
When using a normally-open instruction, as long as the instruction variable is ON, the SQRT instruction is always executed.
SQRTP
he SQRTP and SQRT instructions differ in how they detect the instruction start. The SQRTP only detects the upward transition and executes the SQRTP instruction even when using a normally open instruction. Therefore, even when the normally open instruction is always ON, the SQRTP instruction is executed only for one scan.