Error handling, Hold last valid value – Rockwell Automation T3833 ICS Regent Math Package for Winterpret User Manual
Page 10
![background image](/manuals/581068/10/background.png)
Math Package for W
INTERPRET
(T3833)
1 0
Industrial Control Services
Table 5. Conversion Rules.
Logical to analog
False to 0, true to 1.
Logical to integer
False to 0, true to 1.
Logical to floating point
False to 0.0, true to 1.0
Analog to logical
0 to false, otherwise true.
Analog to integer
Valid for all analog values.
Analog to floating point
Valid for all analog values.
Integer to logical
0 to false, otherwise true.
Integer to analog
Valid for all integers between 0 and
4095 (-16384 to +16384 for T/C and
RTD inputs). Otherwise a conversion
error is reported.
Integer to floating point
Valid for all integers.
Floating point to logical
0.0 to false, otherwise true.
Floating point to analog
Valid for all floating point numbers
between 0.0 and 4095.0 (-16384.0 to
+16384.0 for T/C and RTD inputs).
Otherwise a conversion error is
reported.
Floating point to integer
Valid for all floating point numbers
between -32768.0 and +32767.0.
Otherwise a conversion error is
reported.
Error Handling
In a floating point math function block, errors may occur
during floating point calculations as the values used in the
equations change. An example of a math error is the square
root of a negative number. For each function block the user
must define two tag names which are used to report the line
number and error code of the math error. These tag names
may be used in the function block to annunciate errors and
optionally execute user defined actions if math errors occur.
Hold Last Valid Value
When a math error occurs during a calculation, the result of
the equation retains the last valid value.
For example, consider the equation: