DVP-ES3 Series Programming Manual Symbol S : Source device D : Conversion result Explanation _6 1. This instruction converts the Gray code in the device specified by S into the binary value, and stores the conversion result in the device specified by D . 2. Use this instruction to convert the Gray code in the absolute position encoder which is connected to the input terminal of the PLC to the binary value. The conversion result is stored in the specified register. 3. Only the DGBIN instruction can use the 32-counter, but not the device E. 4. The value in the device D must be within the available range. The value in the device D in the 16-bit instruction must be between 0–32,767.
The value in the device D in the 32-bit instruction must be between 0–2,147,483,647. Example When M0 is ON, the instruction converts the Gray code in D0 into the binary value, and stores the conversion result in D10. 6-94 API Instruction code Operand Function 0209 D GBIN P S, D Converting a Gray code into a binary number Device X Y M S T C HC D FR SM SR E K 16# “$” F S D BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S D Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 ES3