MathErr

Obtains and enables clearing the mathematical error status lasted reported by the TIC interpreter.
prt_me
Arguments
RST
BOOL
TRUE = clears the math status after it is read
FALSE = preserves math status after it is read
ERR
WORD
Current math error status
0 = no error
1 = divide by zero occured
In the following example, if the value of `DintOp2' is zero, MathErr() returns 1 and clears the math error status.
Structured Text Example
DintResult := DintOp1 / DintOp2;
MathError := MathErr(TRUE);
Function Block Diagram Example
prt_mex
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal