Aller au contenu principal

Robotiq 2F-85 via Waveshare RS232/485 TO ETH

1. Scope and architecture​

This appendix covers wiring, configuring and commissioning a Robotiq 2F-85 gripper for use with HARP. The PC controls the gripper over Ethernet through a Waveshare RS232/485 TO ETH serial server. This setup controls the gripper directly from the PC, not through the UR tool flange.

  • The PC opens a TCP connection to the Waveshare and sends complete Modbus RTU frames, including the CRC.
  • The Waveshare runs in transparent mode: the bytes it receives over TCP go out on RS485 unchanged, and the gripper's reply comes back the same way.
  • In this example, the converter and the gripper are both powered by the UR control box I/O terminals.

Fig. 1 — System topology


2. Waveshare configuration walkthrough​

Part 1 — Wiring​

  1. Before doing any wiring, turn off the power to the UR robot and any components you'll be working near or connecting to the unit.
  2. Follow the wiring diagram and the tables below to get the unit powered up.

Fig. 2 — Wiring

UR terminal references use the grid in Fig. 2: column letter + row number. For example, H7 is the bottom 24V terminal in the Digital Inputs group.

1.1 Waveshare ⇄ UR control box ⇄ network​

From (Waveshare)ToWire colorPurpose
DC 5–36 V + (bottom screw, top-right)H7: Digital Inputs, bottom 24VRed24 V supply for the converter and gripper
DC 5–36 V − (top screw, top-right)J7: Digital Outputs, bottom 0VBlack0 V return for the converter and gripper
RS485 ⏚ (bottom screw, bottom-left)B2: Remote, GNDGreenRS485 ground reference
Ethernet RJ45Robot LAN switch → PCEthernetControl (TCP :9001)

The DC barrel jack and the DB9 (RS232) port are not used. Do not plug in the 5 V adapter while the screw terminal is fed from the UR.

1.2 Robotiq 2F-85 cable ⇄ Waveshare​

WireTerminal # (Robotiq manual)Terminal # (standard part diagram)Wire colorConnection point
24 V +15GrayWaveshare DC 5–36 V +, shared with the red H7 lead
0 V −28RedWaveshare DC 5–36 V −, shared with the black J7 lead
RS485 +31WhiteWaveshare RS485 A+
RS485 −42BrownWaveshare RS485 B−
  • The Waveshare has 2.2 kΩ bias resistors on board. A 120 Ω terminator across A+/B− is only needed on long runs or if comms show reflection errors.

1.3 Pre-power checklist​

  • Control box main switch OFF
  • Land conductors on H7, J7 and B2
  • Validate conductor colors in the cable with a continuity tester end to end for every conductor in 1.1 and 1.2
  • Gripper red (0 V) and gray (+24 V) labeled; polarity confirmed at the Waveshare DC terminal
  • No short between +24 V and 0 V (measure with power off)
  • B2 ↔ J7 continuity checked (power off). The converter ties its RS485 ⏚ to its DC − internally, so B2 will become bonded to J7. Confirm they are already common in the controller. If they aren't, stop and review before connecting B2.
  • A+/B− not swapped (white → A+, brown → B−)
  • Gripper cable strain-relieved, with service loops at each joint, and not pinched through the full wrist range

Part 2 — Initial connection​

  1. The Waveshare's default IP address is 192.168.0.7.
  2. Make sure your Ethernet adapter can reach 192.168.0.x by setting your PC's static Ethernet IP to an address in that range (avoid 192.168.0.1 and 192.168.0.7).
  3. When connected, open 192.168.0.7 in a Chrome-based browser.
  4. Log in with username/password admin / admin.

Part 3 — Set the IP address​

  1. Go to Local IP Config and set Static IP to your desired address (for example, 192.168.8.51).

    Local IP Config

  2. Save and restart the unit.

  3. Set your PC's static Ethernet IP back to the subnet you're working on (192.168.8.x).

  4. Connect to the Waveshare again at the new IP address you set.

  5. Log in to the unit with the default username/password.

Part 4 — RS485 settings​

  1. Go to RS485 and make sure the settings match this image:

    RS485 settings

    SettingValue
    Baud Rate115200
    Data Size8 bit
    ParityNone
    Stop Bits1 bit
    Flow ModeNONE
    UART Packet Time0 ms
    UART Packet Length0 chars
    Sync Baudrate (RF2217 Similar)Checked
    Enable Uart Heartbeat PacketUnchecked
    Socket A — Work ModeTCP Server, None
    TCP Server MAX Sockets1, Up to MAX: KICK
    Local/Remote Port Number9001 (remote port grayed out)
    PRINTUnchecked
    ModbusTCP PollUnchecked (Poll Timeout 200 ms, grayed out)
    Enable Net Heartbeat PacketUnchecked
    Registry TypeNone
    Socket B — Work ModeNONE
  2. Save and restart the unit.

Part 5 — Misc Config​

  1. Go to Misc Config and set Websocket Port to 9100. You don't need to change any other settings.

    Misc Config

    SettingValue
    Module NameRS232485 TO ETH
    Websocket Port9100
    Webserver Port80
    MAC Address##-##-##-##-##-##
    User Nameadmin
    Pass Wordadmin
    Buffer Data Before ConnectedUnchecked
    Reset Timeout3600 s

3. Commissioning test​

Run these steps from the PC.

  1. Check the network path:

    ping -c 5 192.168.8.51
  2. Test the gripper's status, then activate the gripper.

    Activation closes and opens the gripper once. The script below requires Python 3.

    import socket, time
    s = socket.create_connection(("192.168.8.51", 9001), timeout=2)
    def tx(h): s.sendall(bytes.fromhex(h)); time.sleep(0.05); return s.recv(64)
    def status():
    r = tx("09 03 07 D0 00 03 04 0E")
    print(f"gSTA={r[3]>>4&3} gOBJ={r[3]>>6} fault={r[5]:#04x} pos={r[7]}")
    status()
    tx("09 10 03 E8 00 03 06 00 00 00 00 00 00 73 30") # reset
    tx("09 10 03 E8 00 03 06 01 00 00 00 00 00 72 E1") # activate
    time.sleep(4); status()
    tx("09 10 03 E8 00 03 06 09 00 00 FF FF FF 42 29") # close
    time.sleep(2); status()
    tx("09 10 03 E8 00 03 06 09 00 00 00 FF FF 72 19") # open
    time.sleep(2); status()

4. Robotiq 2F-85 Modbus reference​

Serial settings: slave ID 9, 115200 bps, 8N1. Function codes: 0x03 (read), 0x10 (write multiple).

4.1 Output registers (PC → gripper), starting at 0x03E8​

ByteNameMeaning
0Action requestbit0 rACT activate · bit3 rGTO go-to · bit4 rATR auto-release · bit5 rARD auto-release direction
1–2—Reserved (0)
3rPRPosition request: 0x00 = open, 0xFF = closed
4rSPSpeed (0x00–0xFF)
5rFRForce (0x00–0xFF)

4.2 Input registers (gripper → PC), starting at 0x07D0​

ByteNameMeaning
0Gripper statusbit0 gACT · bit3 gGTO · bits4–5 gSTA (3 = activated) · bits6–7 gOBJ (0 moving, 1 contact opening, 2 contact closing, 3 at position)
1—Reserved
2gFLTFault code (0x00 = none)
3gPREcho of the position request
4gPOActual position
5gCUMotor current (×10 mA approx.)

4.3 Verified frames (hex, CRC included)​

ActionFrame
Reset (rACT=0)09 10 03 E8 00 03 06 00 00 00 00 00 00 73 30
Activate (rACT=1)09 10 03 E8 00 03 06 01 00 00 00 00 00 72 E1
Read status (3 regs)09 03 07 D0 00 03 04 0E
Close, full speed/force09 10 03 E8 00 03 06 09 00 00 FF FF FF 42 29
Open, full speed/force09 10 03 E8 00 03 06 09 00 00 00 FF FF 72 19
Half-closed, half speed/force09 10 03 E8 00 03 06 09 00 00 80 80 80 12 21

A write is acknowledged with an echo, e.g. 09 10 03 E8 00 03 01 30.


5. Troubleshooting​

SymptomLikely causeAction
Ping failsWrong subnet, or converter still at 192.168.0.7Check the PC IP; hold Reload for factory defaults and redo §2
TCP connect refusedWrong port, or socket not in TCP Server modeCheck RS485 socket settings; the converter accepts up to 8 clients, so close stale sessions
TX LED blinks, RX never blinksA/B swapped, gripper unpowered, or wrong baud rateSwap A+/B−; measure 24 V across the Waveshare DC terminal; confirm 115200 8N1
Reply garbled or bad CRCBaud rate or parity mismatch, noise, or missing referenceRecheck the serial format; check the ⏚ → B2 lead; add a 120 Ω terminator on long runs
No reply, LEDs quiet on the RS485 sideProtocol set to Modbus gatewaySet Socket A Work Mode to TCP Server + None (Part 4)
gSTA stuck at 1Fingers obstructed during activationClear the jaws, reset, then activate again
gFLT ≠ 0Gripper fault (e.g. 0x05 activation needed, 0x07 action without activation)Run reset → activate; see the Robotiq manual fault table