格物至诚GEWU IoT
Wiki/Product Manuals / Converter

GEWU DOCUMENTATION

GW-CO-GARY Gray Code to RS485 Converter Guide

Converts Gray-code position data to RS485 for legacy device connectivity. Learn the product capabilities, first-use steps and support options.

QUICK ANSWER

What should I know about GW-CO-GARY Gray Code to RS485 Converter Guide?

Converts Gray-code position data to RS485 for legacy device connectivity. Learn the product capabilities, first-use steps and support options.

1. Function Description

This module converts gray‑code signals to RS‑485 Modbus protocol. It supports up to 15‑bit gray‑code input. Gray‑code signals from encoders, displacement sensors and other devices can be converted into standard Modbus data for communication with host computers or RTUs over the RS485 bus.

2. Technical Specifications

Basic Parameters

ItemParameterRemarks
Product ModelGW‑CO‑GRAY
Supply Voltage5~28 VDC
Operating Current<10 mA
Ingress ProtectionIP30 (Non‑waterproof; install inside control cabinet)
Operating Temperature-40~85 ℃
Operating Humidity0~95 % RH (non‑condensing)
Overall Dimension82 × 66 × 18 mm
Mounting MethodDIN‑rail mounting

Measurement Parameters

ItemParameterRemarks
Measuring RangeMax. 15 bits

Communication Parameters

ItemParameterRemarks
Physical InterfaceRS485Baud rate 9600, 8N1
Communication ProtocolMODBUSCustom non‑standard protocols supported
Physical InterfaceUSB‑TYPECUSB‑TTL
Physical Interface15‑bit gray‑code input

LED Indicators

IndicatorDescription
RUNRun indicator (flashes during normal communication)
POWERPower indicator (steady‑on for normal power supply)

3. Terminal Definition

Top Terminals

No.LabelDescription
1VCCModule power supply, 5‑28 VDC
2GNDPower ground
3485ARS485+
4485BRS485‑

Bottom Terminals

No.LabelDescription
1DIN01Gray‑code input Bit 1
2DIN02Gray‑code input Bit 2
3DIN03Gray‑code input Bit 3
4DIN04Gray‑code input Bit 4
5DIN05Gray‑code input Bit 5
6DIN06Gray‑code input Bit 6
7DIN07Gray‑code input Bit 7
8DIN08Gray‑code input Bit 8
9DIN09Gray‑code input Bit 9
10DIN10Gray‑code input Bit 10
11DIN11Gray‑code input Bit 11
12DIN12Gray‑code input Bit 12
13DIN13Gray‑code input Bit 13
14DIN14Gray‑code input Bit 14
15DIN15Gray‑code input Bit 15
16COMCommon terminal

4. Power Supply

The module accepts 5‑28 VDC power input. It supports common battery sources such as 2‑6 series lithium‑ion battery packs and 1‑2 series storage batteries. The module does not enter sleep mode after power‑on. It is of low‑power design with current consumption below 10 mA under full‑speed operation. For power‑critical systems, connect VCC to a controllable power output of the main controller to reduce overall power consumption.

5. Protocol Description

Factory defaults: baud rate 9600, 8 data bits, 1 stop bit, no parity, Modbus‑RTU protocol. Custom non‑standard protocols are available for drop‑in replacement without modifying main‑controller logic.

5.1 Device Address

Default device address is 1, configurable via commands. If the address is forgotten, read data using address 0 to detect the actual device address.

When address 0 is used, ensure only one device is connected on the bus.

ParameterRegister AddressData TypeFunction CodeDescriptionDefault Value
Converted Gray‑Code Data0x0000uint16 (Read‑Only)0x03Converted value0
Raw Gray‑Code Data0x0001uint16 (Read‑Only)0x03Raw input value0
Correction Factor K0x0002float (Read‑Write)0x03/0x161
Correction Offset B0x0004float (Read‑Write)0x03/0x160
Valid Bit Count0x0006uint16 (Read‑Write)0x03/0x06Max. 15 bits12
Device Address0x03E8uint16 (Read‑Write)0x03/0x061
Restore Factory Defaults0x03E9uint16 (Read‑Write)0x03/0x060
Firmware Version0x03A0uint16 (Read‑Only)0x03

5.2 Communication Examples

Example note: Read converted data (example return value 600 mm)

Read Converted Gray‑Code Data

Transmit01 03 00 00 00 01 84 0A
Response01 03 02 02 58 B8 DE

Modify Device Address (from 01 to 02)

Transmit01 06 01 01 00 02 58 37
Response01 06 01 01 00 02 58 37

6. Installation and Configuration

6.1 Hardware Connection

  1. Gray‑code input: Connect encoder pins DIN01‑DIN0N sequentially to module terminals DIN01‑DIN0N (observe signal‑level matching). Connect the COM common terminal.
  2. RS485 bus: Connect module 485A / 485B to bus A / B terminals. For multi‑device networks, ensure unique slave addresses.
  3. Power supply: Apply DC 5‑28 V, observe correct polarity.

6.2 Software Configuration

You may view data and configure parameters with any serial‑port debugging tool using commands given in preceding chapters. Operation via visual tool Gewu Online Tool is recommended; no deep knowledge of underlying Modbus frame format is required.

  1. Select official template: GW‑CO‑GRAY Gray‑Code‑to‑RS485 Module. GW‑CO‑GRAY User Guide
  2. Serial‑port parameters: 9600‑8‑N‑1.
  3. Click Connect Serial Port and select the serial‑port adapter connected to your computer. GW‑CO‑GRAY User Guide
  4. Click Start Polling. GW‑CO‑GRAY User Guide
  5. To write parameters, navigate to the corresponding register, enter the value and click Confirm Write. GW‑CO‑GRAY User Guide

7. Dimensions

GW‑CO‑GRAY Gray‑Code‑to‑RS485 Converter Dimension Drawing

Overall dimension: 82 × 66 × 18 mm

8. Precautions

Wiring Requirements

‑ Keep gray‑code signal wires and RS485 bus cables at least 30 cm away from high‑voltage power lines. ‑ Use shielded twisted‑pair cable for RS485 bus; ground the shield at one end only.

Communication Conflicts

‑ Do not assign duplicate slave addresses on one bus segment. ‑ For half‑duplex communication, the master shall wait for slave response before sending the next command.

Gray‑Code Compatibility

‑ Confirm the encoder outputs binary gray code. ‑ Leave higher‑order inputs DIN13~DIN15 unconnected if unused (e.g. for 12‑bit gray‑code devices).

Official website: www.gewuiot.com

Was this helpful?