How to control Active Drive trough TCP/IP communication ?
Send commands and receive real-time state feedback from the ActiveDrive feature over Ethernet
Context
The ActiveDrive function in Robotiq’s URCap lets users manually guide the robot (force-guided programming) or activate contact-based motion. In some setups, it can be useful to remotely control ActiveDrive modes and stream its internal state via TCP/IP, using a separate device like a PC or PLC.
This article explains:
-
What commands are available over TCP/IP
-
What kind of data can be streamed
-
How to use the communication port
-
Best practices and troubleshooting tips
Knowledge
Overview of Commands to use ActiveDrive via the TCP/IP Socket
Here are the available commands to use the ActiveDrive mode via the TCP/IP socket.
Port 63355
ActiveDrive States
ActiveDrive has different states. To return the current ActiveDrive state, use the GET STATE command. Two states are considered active while the others are transient.
Here are the possible states:
Active:
- READY → ActiveDrive is ready to run
- ACTIVE → ActiveDrive is running
Transient:
- ON_INI
- ON_READY
- ON_START_RTDE
- WAITING_FOR_RTDE
- WAITING_FOR_ACCEPTABLE_WRENCH
- WAITING_FOR_ROBOT_PROGRAM
ActiveDrive Settings
Here are the commands to configure the ActiveDrive settings:
- SET KINETIQ ON/OFF → Kinetiq ON allows the user to move the robot according to the selected options.
- SET ZERO → Resets the force values applied on the sensor.
- SET MODE TRANSLATION / FREE / PLANE / SCARA / DOMINANTAXIS
- TRANSLATION (X,Y,Z)
- FREE (X,Y,Z,RX,RY,RZ)
- PLANE (X,Y)
- SCARA (X,Y,Z,RZ)
- DOMINANTAXIS (X, Y, or Z, depending which force is greater)
- SET REORIENTATION ON/OFF → Reorientation ON will snap TCP onto the closest orthogonal base frame.
- SET CONTACT ON/OFF →
- Contact ON: For low speeds, when tool is in contact with a surface, for precise movement, for insertions
- Contact OFF: For high speeds, movement in space
Testing the Commands
Here are the responses you will receive for each command sent:
Command | Response |
GET STATE | GATE STATE XXX |
SET KINETIQ XXX | SET KINETIQ XXX DONE or ZERO ERROR KINETIQ START if too much force was applied on the sensor to start ActiveDrive |
SET ZERO | SET ZERO DONE |
SET MODE XXX | SET MODE XXX DONE |
SET CONTACT XXX | SET CONTACT XXX DONE |
PORT 63356
To display the state of ActiveDrive in real time, open port 63356. It will stream the state at a rate of 62.5Hz (16ms).
...
{"INIT_STAGE": X, "STATE": X, "CONTACT": X, "MODE": X, "REORIENTATION": X, "VISIBLE": X, "PROTECTED": X}
{"INIT_STAGE": X, "STATE": X, "CONTACT": X, "MODE": X, "REORIENTATION": X, "VISIBLE": X, "PROTECTED": X}
{"INIT_STAGE": X, "STATE": X, "CONTACT": X, "MODE": X, "REORIENTATION": X, "VISIBLE": X, "PROTECTED": X}
...
INIT_STAGE
0 | primaryClientError |
1 | rtdeClientError |
2 | notLicensedError |
3 | sensorError |
4 | robotNotRunningError |
5 | programRunningError |
6 | targetSpeedFractionError |
7 | teachButtonPressedError |
8 | noError |
9 | finalErrorEnum |
STATE
0 | ON_INIT |
1 | ON_READY |
2 | READY |
3 | ON_START_RTDE |
4 | WAITING_FOR_RTDE |
5 | WAITING_FOR_ACCEPTABLE_WRENCH |
6 | WAITING_FOR_ROBOT_PROGRAM |
7 | ACTIVE |
CONTACT
0 | No contact / high speed |
1 | On contact / low speed |
MODE
0 | FREE (X,Y,Z,RX,RY,RZ) |
1 | TRANSLATION (X,Y,Z) |
2 | ROTATION (RX,RY,RZ) |
3 | SCARA (X,Y,Z,RZ) |
4 | PLAN (X,Y) |
5 | DOMINANTAXIS (X,Y,Z) |
REORIENT
0 | Re-orientation ON |
1 | Re-orientation Off |
VISIBLE
0 | Toolbar visible |
1 | Toolbar hiden |
PROTECTED
Indicates if the ActiveDrive binary is encrypted. Default value is “Protected.” An FT 300-S Force Torque Sensor or a Copilot licence is therefore necessary to run ActiveDrive.
0 | Unprotected |
1 | Protected |
Here is the procedure in PDF to help you : Link
Conclusion
Robotiq’s ActiveDrive feature can be controlled and monitored remotely via TCP/IP using a simple command and streaming interface. This is ideal for advanced automation, hands-free setup, or integration with external systems.