Redundant instruction
This is a redundant instruction. It is replaced by: FP_BCD_TO_ASCII
Converts the BCD code starting from the 16-bit area specified by s1 to the ASCII code that expresses the equivalent decimals according to the contents specified by s2 if the trigger EN is in the ON-state. s2 specifies the number of source data bytes and the direction of converted data (normal/reverse).
Input
starting 16-bit area for BCD data (source)
specifies number of source data bytes to be converted, and how it is arranged
Output
starting 16-bit area for storing converted result (destination)
Instead of using this F instruction, we recommend using the corresponding FP7 instruction: FP_BCD_TO_ASCII
Specifying s2_Number (direction and number)
The two characters that make up one byte are interchanged when stored. Two bytes are converted as one segment of data:
The converted result is stored in the area specified by d. ASCII code requires 8 bits (one byte) to express one BCD character. Upon conversion to ASCII, the data length will thus be twice the length of the BCD source data.
ASCII HEX code to express BCD character:
BCD character |
ASCII HEX code |
---|---|
0 1 2 3 4 5 6 7 8 9 |
H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 |
if the data specified by s1 is not BCD data.
if the number of bytes specified by s2 exceeds the area specified by s1.
if the converted result exceeds the area specified by d.
if the data specified by s2 is recognized as "0".
if the number of bytes specified by s2 is more than 16#4.
if the data specified by s1 is not BCD data.
if the number of bytes specified by s2 exceeds the area specified by s1.
if the converted result exceeds the area specified by d.
if the data specified by s2 is recognized as "0".
if the number of bytes specified by s2 is more than 16#4.