BCD to Integer, Integer to BCD Conversion Convert

Inputs/Outputs Operands Data Types
IN (LAD, FBD) VW, IW, QW, MW, SMW, LW, T, C, AC, AIW, Constant, *VD, *AC, SW, *LD WORD
OUT VW, IW, QW, MW, SMW, LW, T, C, AC, *VD, *AC, SW, *LD WORD

Memory Ranges ENO Errors Instruction Support for S7-200 CPUs SIMATIC/International Mnemonics
The BCD to Integer instruction converts the input Binary-Coded Decimal (IN) to an integer value and loads the result into the variable specified by OUT. The valid range for IN is 0 to 9999 BCD.

The Integer to BCD instruction converts the input integer value (IN) to a Binary-Coded Decimal and loads the result into the variable specified by OUT. The valid range for IN is 0 to 9999 integer.

Error Conditions that Set ENO = 0:

0006 (indirect address), SM1.6 (BCD error), SM4.3 (run-time)

These instructions affect the following Special Memory bits:

SM1.6 (invalid BCD)

Valid Ranges for BCD Format


Example