Example - Ladder Diagram
GBIN
The GBIN instruction converts a gray code WORD value, S, into a binary WORD value and saves the conversion in an assigned WORD data register, D.
Ladder Diagram Example
When the contact, M1.8, is powered ON (1), the value of the gray code WORD data register, D40, 1,234, is converted into binary notation.
The value of the conversion, 1,891, is saved in the WORD data register, D42.
Memory Monitor
![]()
GBINP
The GBINP one-shot instruction converts a gray code WORD value, S, into a binary WORD value and saves the conversion in an assigned WORD data register, D.
Every time this instruction executes, it energizes the output only once.
Ladder Diagram Example
When the contact, M1.6, is powered ON (1), the value of the gray code WORD data register, D45, 30,000, is converted into binary notation.
The value of the conversion, 23,007, is saved in the WORD data register, D47.
Memory Monitor
![]()