Integer to BCD TO BCD

Turns a number into BCD for a digit display.

TagAfter two scans
Display42
DisplayBCD66

How it works

While the rung is true, writes Source as BCD: each decimal digit in its own 4 bits, so 42 becomes 0100 0010, which is 66. Source must be 0 to 99,999,999.

How it's used

Use TO BCD to drive a digit display.

TagValue
Count42
Display66

Each digit of 42 gets 4 bits: 0100 0010, which is 66.

Operands

OperandData typeRead or write
SourceDINT or a numberReads
DestDINTWrites

Common mistakes

  • Using a negative numberSource must be 0 to 99,999,999.