Skip to main content

Example - Ladder Diagram

BCD​


The BCD instruction converts a WORD value, S, into a 4-digit binary coded decimal (BCD) value. The conversion result is saved in an assigned 4-digit binary coded decimal (BCD) data register, D.

Ladder DIagram Example​


When the contact, M0.0, is powered ON (1), the value of the WORD data register, D0, 9,999, is converted into 4-digit binary-coded decimal (BCD) notation.
The value of the conversion, -26,215, is saved in the 4-digit binary-coded decimal data register, D2.


Memory Monitor​

BCDP​


The BCDP one-shot instruction converts a WORD value, S, into a 4-digit binary coded decimal (BCD) value. The conversion result is saved in an assigned 4-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.1, is powered ON (1), the value of the WORD data register, D5, 8,888, is converted into 4-digit binary-coded decimal (BCD) notation.
The value of the conversion, -30,584, is saved in the 4-digit binary-coded decimal data register, D7.


Memory Monitor​