Conversion instructions
682
Part III FP Instructions
F252_ACHK
ASCII data check
If the results are correct, the special internal relay (R900B) turns on.
If the results are incorrect, the special internal relay (R900B) turns off.
For an detailed description of s1_Control and n_ConversionMethod, please refer to F251_ATOB.
PLC types
Availability of F252_ACHK (see page 1323)
Variable Data type Function
s1_Control STRING Control string
D16
+
-
D:
H:
converts to decimal ASCII data
converts to hexadecimal ASCII data
Reverse direction
Normal direction
16: converts in 16-bit (1-word) units
32: converts in 32-bit (2-word) units
s2_AsciiData ANY Starting area for storing ASCII data
n_Conversion Method ANY16 16-bit equivalent constant or 16-bit area for storing conversion method
For Relay T/C Register Constant
s1_Control WX WY WR WL SV EV DT LD - -
s2_AsciiData WX WY WR WL SV EV DT LD FL -
n_Conversion Method WX WY WR WL SV EV DT LD - dec or hex
No. IEC
address
Set If
R9007 %MX0.900.7 permanently
R9008
%MX0.900.8 for an instant
there is an error in the control string specified by s1_Control.
normal direction (+) is specified in s1_Control when the format is
decimal.
the number of ASCII characters per converted
unit specified by n_ConversionMethod exceeds 4 for 16-bit data or 8
for 32-bit data when hexadecimal format is specifed by s1_Control.
0 is specified for the no. of 16- or 32-bit (1- or 2-word) units to be
converted in n_ConversionMethod.
the number of 16- or 32-bit decimal numbers to be converted specified
by n_ConversionMethod exceeds the area for storing ASCII data.
the converted result exceeds the area.
Description
Checks whether the ASCII codes stored in the area specified by s2_AsciiData can be converted
correctly using the conversion method specified in by n_ConversionMethod and the 4 control
characters specified by s1_Control.
Data types
Operands
Error flags