If an overflow occurs as a result of the instruction, the system variable (bit) #L_CalcCarry turns on.
The instruction will not execute if the value in operand S1 or S2 (infinite or non-numeric value) cannot be recognized.
The error code (6706) is written to #L_CalcErrCode.
The result in D1 maintains the value from the previous successfully run instruction.
#L_Error turns on, and the error code (6706) is written to #L_CalcErrCode.
When the execution result is 0, the system variable #L_CalcZero turns ON.
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
MUL
Multiplies one constant by another and stores the result in the integer variable.
When the positive transition instruction turns ON, the MUL instruction will be executed. When the MUL instruction is executed, the result value of 375, obtained from 25 x 15 = 375, is stored in D1.
When using a normally open instruction, as long as the instruction variable is ON, the MUL instruction is always executed.
MULP
When the normally open instruction turns ON, the MULP instruction will be executed. When the MULP instruction is executed, the result value of 375, obtained from 25 x 15 = 10, is stored in D1.
Even when using a normally open instruction, the MULP instruction executes only when it detects the upward transition.
Therefore, even when the variable of the NO instruction is always ON, the MULP instruction is executed only for one scan.