Professional Documents
Culture Documents
Converting Substrings To Numerical Values: Error Conditions That Set ENO 0
Converting Substrings To Numerical Values: Error Conditions That Set ENO 0
The overflow error (SM1.1) is set whenever the conversion produces an integer value that is too
large for the output value. For example, the Substring to Integer instruction sets the overflow error
if the input string produces a value greater than 32767 or less than --32768.
The overflow error (SM1.1) is also set if no conversion is possible when the input string does not
contain a valid value. For example, if the input string contains ‘A123’, the conversion instruction
sets SM1.1 (overflow) and the output value remains unchanged.
Table 6-20 Valid Operands for the Instructions That Convert Substrings to Numerical Values
Inputs/Outputs Data Type Operands
IN STRING IB, QB, VB, MB, SMB, SB, LB, *VD, *LD, *AC, Constant
INDX BYTE VB, IB, QB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
OUT INT VW, IW, QW, MW, SMW, SW, T, C, LW, AC, AQW, *VD, *LD, *AC
DINT, REAL VD, ID, QD, MD, SMD, SD, LD, AC, *VD, *LD, *AC
110