BCD instruction on Omron PLC : Binary-To-BCD.
BCD(101) converts the binary (hexadecimal) contents of S into the numerically equivalent BCD bits and outputs the BCD bits to R. Only the contents of R is changed; the contents of S is left unchanged.
BCD(101) can be used to convert binary to BCD so that displays on SYSWIN, the Programming Console or any other programming device will appear in decimal rather than hexadecimal. It can also be used to convert to BCD to perform BCD arithmetic operations rather than binary arithmetic operations, for example, when BCD and binary values must be added.
S: Source word CIO, G, A, T, C, DM, DR, IR
R: Result word CIO, G, A, DM, DR, IR
illustration of BCD instructions on Omron PLC:
Binary Convert to BCD