2 - 59
2 Standard Functions
NX-series Safety Control Unit Instructions Reference Manual (Z931)
Math Instructions
2
SUB
• The data types of In1, In2, and Out can be different. If they are different, calculations are performed
with the data type that includes the range of all of the data types. For example, if In0 is INT data and
In1 is DINT data, calculations are performed with DINT data. Therefore, subtraction result Out will be
DINT data.
• The input condition depends on whether the output is safety data or standard data. If the condition is
not met, a building error will occur.
• If you set a safety data type variable for the output terminal, set a safety data type variable for the two
input terminals as well.
• If you set a standard data type variable for the output terminal, you can set either a safety data type
variable or a standard data type variable for the input terminal.
*3. For example, if the value of In1 is TIME#10ms and the value of In2 is TIME#14ms, the value of the subtraction
result is TIME#−4ms. However, the maximum value of TIME is the same as for DWORD (4294967295), so the
subtraction result will be the value that can be expressed with 32 bits, i.e., T#49d17h2m47s292ms.
Although negative time does not actually exist, the value is expressed as a negative value.
Precautions for Correct Use