Example - Ladder Diagram
DBCD
The DBCD instruction converts a WORD value, S, into an 8-digit binary coded decimal (BCD) value. The conversion result is saved in an assigned 8-digit binary coded decimal (BCD) data register, D.
Ladder Diagram Example
When the contact, M0.2, is powered ON (1), the value of the WORD data register, D10, 24,682,468, is converted into 8-digit binary-coded decimal (BCD) notation.
The value of the conversion, 610,804,840, is saved in the 8-digit binary-coded decimal data register, D13.
Memory Monitor
![]()
DBCDP
The DBCDP one-shot instruction converts a WORD value, S, into an 8-digit binary coded decimal (BCD) value. The conversion result is saved in an assigned 8-digit binary coded decimal (BCD) data register, D.
Every time this instruction executes, it energizes the output only once.
Ladder Diagram Example
When the contact, M0.3, is powered ON (1), the value of the WORD data register, D15, 12,349,876, is converted into 8-digit binary-coded decimal (BCD) notation.
The value of the conversion, 305,436,790, is saved in the 8-digit binary-coded decimal data register, D18.
Memory Monitor
![]()