Skip to content

Execute command request

When sending a command request to the IndyDCP server, the data format depends on the purpose of each command. In this section, details about each command group ( similar commands are grouped ) are described and examples of request/response frame are showed.

Robot Motion Control Command

Robot Motion Control Commands are commands related to the basic motion of Robot.

Emergency Stop and Stop Commands

0001: Emergency Stop, 0005: Stop

The Emergency stop command stops the robot immediately after receiving command, regardless of the motion the robot was conducting. It has same effect as pressing the emergency button connected to the control box(CB) The request frame format for the emergency stop command is described below.

Header Command Data
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID No Data
(0 byte)
"NRMK-Indy7" "" 0x00 0x34 1 0 - 1 -

The example below demonstrates how to request an emergency stop command to the Indy7 with InvokeID 1. Detailed explanations for each item in the frame header are provided below.

  • Robot Name: is "NRMK-Indy7", which is ASCII string (20-byte)
  • Robot Version: NULL String (not used in the request frame) (12-byte)
  • STEP Info: 0x00 (not used in the request frame) (1-byte)
  • SoF: 0x34 in the request frame (1-byte)
  • InvokeID: 1 is used for this frame (4-byte)
  • Data Length: 0 because data transfer is not required (4-byte)
  • Reserved: Since the reserved area is not in use, leave 10 bytes empty (10-byte)

As result, the request frame header for an emergency stop command is 56 bytes.

The command ID for the emergency stop command is 1, so the value 1 is assigned as a 4-byte integer in the command area of the request frame. Since the emergency stop command does not require any data to be transmitted, the data area is left empty.

The ACK response frame of IndyDCP server for this emergency stop command is described below.

Header Command Data
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID No Data
(0 byte)
"NRMK-Indy7" "v3.2.0" 0x02 0x12 1 0 - 1 -

  • Robot Name: is the same as the request frame
  • Robot Version: version of IndyFramework
  • STEP Info: is the version of STEP (0x02 indicates STEP2)
  • SoF: is fixed at 0x12 for response frames
  • InvokeID: same as the request frame
  • Data Length: 0 because data transfer is not required.
  • Reserved: Robot version 2.2.3 4 bytes among the 10 bytes reserved domain contains robot status (Reserved Field and Robot Status).
  • Command ID: same as the request frame

Similar to the request frame, the ACK response frame for the emergency stop command does not contain any data. Therefore, the data size is 0, and the data area is left empty.

The NAK response frame of IndyDCP server for emergency stop command is described below.

Header Command Data
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID Error Code
(4 byte)
"NRMK-Indy7" "v3.2.0" 0x02 0x12 1 4 - 9999 20

NAK response frame can be distinguished by the command ID value of 9999. It has a 4-byte integer error code in the data area that can help determine the reason of failure (see NAK Response Frame Error Code)). Accordingly, the value of the data length in the NAK response frame header area is 4.

The stop command (Command ID 5) stops the robot if it is in motion. The emergency stop command immediately stops the robot by turning off all the servo and applying the brake. However, the stop command stops gradually, following proper procedures while the robot is in motion. Additionally, the emergency stop state becomes true after the robot stops, and the robot requires a reset command before it can accept additional command or robot control. The stop command shares the same frame structure as the emergency stop command, differing only in the command ID.

Reset Command

0002: Reset Robot

The reset command (Command ID 2) resets the robot when it detects a collision, an emergency stop button has been pressed, or the robot is in an error state. This command allows the robot to automatically reset and become ready for further operations.

Header Command Data
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID No Data
(0 byte)
"NRMK-Indy7" "" 0x00 0x34 2 0 - 2 -

Since the reset command also has no data in the request frame, its ACK/NAK response frames are the same as those for the emergency stop command.

Servo/Brake Control Command

0003-0004: Servo & Brake On/Off

The command IDs 3 (Servo On/Off) and 4 (Brake On/Off) are used to turn the servomotors or brakes of each joint of the robot On or Off. The table below shows an example of a request frame for turning the servomotors On/Off.

Header Command
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID
"NRMK-Indy7" "" 0x00 0x34 3 6 - 3
Data
Joint-0 Servo (1 byte) Joint-1 Servo (1 byte) Joint-2 Servo (1 byte) Joint-3 Servo (1 byte) Joint-4 Servo (1 byte) Joint-5 Servo (1 byte)
1 1 1 1 0 0

The length of the data for the servo on/off command is determined by the number of joints multiplied by the size of a Boolean (1 byte). Therefore, the length of the data is six bytes (since Indy7 has 6 axes), and the data area has a servo on/off Boolean value for each joint. In this example, servos 0-3 will be turned on, and servos 4-5 will be turned off. The ACK response frame for the above request has no value to return and contains no data.

reference

Joint indexing starts from number 0

Command for moving robot to specific position

0007-0012: Move To & Move By

Commands 0007 and 0008 move the robot to specific positions. Move To Home (0007) moves the robot to the home position saved through the controller. Move To Zero (0008) moves the robot to the zero position (all joint positions are 0). Since these commands are for moving to predefined positions, there is no value in the data area.

Commands 0009 and 0010 move the joints using JointMove. JointMove To (0009) moves the joint to the absolute joint position specified in the request data, while Joint Move By (0010) moves the joints by the distance requested relative to their current positions.

Commands 0011 and 0012 move the robot using TaskMove. TaskMove To (0011) moves the robot to the absolute position in the task space, while TaskMove By (0012) moves the robot by a specified distance in the task space.

The tables below are examples of JointMove and TaskMove.

Header Command
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID
"NRMK-Indy7" "" 0x00 0x34 5 48 - 9
Data
Joint-0 Angle (degree,8byte) Joint-1 Angle (degree,8byte) Joint-2 Angle (degree,8byte) Joint-3 Angle (degree,8byte) Joint-4 Angle (degree,8byte) Joint-5 Angle (degree,8byte)
35.123 -90.00 2.955 150.0 -120.0 45.0

This example shows a command that moves joints to positions in the data area. Since the robot has 6 axes and each joint position is described with an 8-byte double, the data size is 48 bytes (DOF*8).

Header Command
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID
"NRMK-Indy7" "" 0x00 0x34 6 48 - 12
Data
Task X Position (meter, 8byte) Task Y Position (meter, 8byte) Task Z Position (meter, 8byte) Task U Position (degree, 8byte) Task V Position (degree, 8byte) Task W Position (degree, 8byte)
0.0 0.1 -0.25 30.00 0 0

This example shows a command that relatively moves the robot from its current position to the task space position in the data area. Since the task space is described with XYZUVW, the data size is always 48 bytes.

WARNING

  • If incorrect coordinates are input, the robot may collide with its environment. It is recommended to move the robot after running commands in simulation mode.
  • In command data, the unit of length/distance is meters, and angles are in degrees.
  • The order of data for the task space is XYZUVW.

Robot Program Control Command

The Robot Program Control Command controls the robot program created by Cony.

Commands 0010-0017 are for starting, stopping, pausing, and resuming the program respectively. These commands may fail depending on the state of the robot or the program. For example, the IndyDCP server will return a failure response if a start command is requested while the robot is already in motion or if a pause or resume command is issued when no program is loaded.

Reading Robot state information

Commands 0030-0039 and 0060-0064 are for requesting current state of robot. The robot states are listed in command list. Additionally, you can refer to the, robot status register in ModbusTCP.

The table below shows the ACK response frame of command number 0031 (Is Robot Ready). Since the robot state values are boolean (1 or 0), the data length of the ACK response frame is 1 byte (true/false).

Header Command Data
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID Robot State (T/F, 1byte)
"NRMK-Indy7" "v3.2.0" 0x02 0x12 7 1 - 2 1

Change Direct Teaching Mode command

0080-0081: Change Direct Teaching Mode

The 0080 command starts direct teaching mode when the robot is ready, and the 0081 command ends direct teaching mode when the robot is in direct teaching mode. If the robot is moving, the 0080 command will fail.

Warning

Tool properties are not according with actual tool, the robot may fall or rise in direct teaching mode.

Custom Robot Motion

Commands 0090-0099 are for adding waypoints to the set via IndyDCP and running the motion in the set.

Commands 0090-0094 are for adding, removing, and resetting a waypoint, and running motion with JointMove. Similarly, commands 0095-0099 are for adding, removing, and resetting a waypoint, and running motion with TaskMove.

Robot Configuration

Robot configuration can be done with the following commands via IndyDCP. However, all configuration commands are supported by Conty. Therefore, it is recommended to configure the robot while directly observing through Conty with the GUI interface.

TCP Setting

0100-0103: Set Default TCP & TCP Compensation

The TCP (Tool Center Point) setting is required for moving the robot based on the tool with TaskMove. The initial value for TCP is {0, 0, 0, 0, 0, 0}, which is the center of the flange of the robot. TCP can be modified by command number 0100, and command 0101 resets TCP to its initial value.

In addition to the TCP, there is the TCP compensation value. Command 0102 can set the TCP compensation value, which will be added to the default TCP. For example, if the default TCP is set to {0, 0, 0.1, 0, 0, 0} and the compensation value is set to {0, -0.2, 0, 0, 0, 30}, the resulting TCP is {0, -0.2, 0.1, 0, 0, 30}. Command 0103 resets the compensation value. After resetting, the resulting TCP will be the same as the default TCP. If the default TCP is changed with command 0100 or 0101, the compensation value will also reset to zero.

TCP uses XYZUVW values, like the task space coordinates. Therefore, the length of the data is 48 bytes. An example of the requested frame is as follows.

Header Command
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID
"NRMK-Indy7" "" 0x00 0x34 10 48 - 100
Data
Default TCP X (meter, 8byte) Default TCP Y (meter, 8byte) Default TCP Z (meter, 8byte) Default TCP U (meter, 8byte) Default TCP V (meter, 8byte) Default TCP W (meter, 8byte)
0.0 0.0 0.1 90.00 0 0

Reference Frame Setting

0104-0105: Set Reference Frame

The Reference Frame Setting is required for setting the reference coordinate system for TaskMove. The default value for the reference frame is determined by the body axis 0 (see Cony UI). Command 0104 can change the reference frame according to the XYZ distance and UVW angle and can be used for TaskMove. Similar to TCP setting, the data in the request frame uses XYZUVW values, and command 0105 resets the reference frame to the initial value.

Collision Level Setting

0106: Set Collision Detection Sensitivity Level

The collision detection level determines the sensitivity of collision detection (1-5, with 1 being the most sensitive). The data type for the request frame is a 4-byte integer. Below is an example of a request frame.

Header Command Data
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID Level (4byte)
"NRMK-Indy7" "" 0x00 0x34 11 4 - 106 3

Velocity Level Setting

0107-0108: Set Joint/Task Velocity Boundary

The velocity level sets the default velocity. In the Conty program or move command, the robot moves with the velocity level set in the move command. Some other commands (e.g., Move Home, Move Zero, Joint Move To/By, Task Move To/By), move the robot using the velocity level set by this command. The data type for the request frame is a 4-byte integer.

Waypoint Interval time Setting

0111-0112: Set Joint/TaskMove Waypoint Time

When using time-based moves, you can set the travel time between waypoints. The unit is seconds, with a minimum value of 0.5 seconds. Since the time value needs to be specified directly, the data is an 8-byte double value.

TaskMove Base Mode Setting

0113: Set TaskMove Base Mode

Set TaskMove Base Mode The TaskMove command has two reference frames: the reference frame and the TCP (Tool Center Point) frame. Command 0113 allows you to change this reference. When the data in the request frame is 0, it sets the reference frame. When it is 1, it sets the TCP frame.

Set Blending Radius

0116-0117: Set Joint/Task Blending Radius

Command 0116 and 0117 respectively set the blending radius at each waypoint when executing Joint Move and Task Move commands.

Reading Robot Configuration

Commands from 0200 to 0210 are used to request and read all robot environment configuration values that have been previously set and mentioned. The data format for reading these configuration values is the same as that used for setting them in their respective configuration commands. Therefore, while configuration commands require input data in the request frame, read commands do not include any data in the request frame. Instead, the retrieved configuration values are included in the data of the ACK response frame.

Header Command
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID
"NRMK-Indy7" "v3.2.0" 0x02 0x12 13 48 - 202
Data
RefFrame X (meter, 8byte) RefFrame Y (meter, 8byte) RefFrame Z (meter, 8byte) RefFrame U (meter, 8byte) RefFrame V (meter, 8byte) RefFrame W (meter, 8byte)
0 -0.25 1.2 0 0 90

Reading Robot Data

Robot Data includes datas about robot control, such as current position, velocity, state of motors. Since it is a reading command, the request frame normally doesn't include data.

Reading Robot Control Status

0300-0302: Get Robot Control Status

The 0300 command requests the time that the robot has run. It returns the run time in seconds (8-byte double data) in the ACK response frame. The 0301 command requests the robot's control mode as 4-byte integer data. The 0302 command requests the on/off state of the servo motor and brake at each joint. Below is an example of the ACK response frame for the 0302 command.

Header Command
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID
"NRMK-Indy7" "v3.2.0" 0x02 0x12 14 12 - 302
Data
Joint-0 Servo (1byte) Joint-1 Servo (1byte) Joint-2 Servo (1byte) Joint-3 Servo (1byte) Joint-4 Servo (1byte) Joint-5 Servo (1byte) Joint-0 Brake (1byte) Joint-1 Brake (1byte) Joint-2 Brake (1byte) Joint-3 Brake (1byte) Joint-4 Brake (1byte) Joint-5 Brake (1byte)
1 1 1 1 1 1 0 0 0 0 0 0

Reading Robot Control Data

0320-0324: Get Robot Control Data

Each command number 0320-0324 requests specific data: Joint position (0320), joint velocity (0321), task position (0322), task velocity (0323), and torque (0324). For commands 0320, 0321, and 0324, the data type of the response frame is an 8-byte double, and the data length is DOF*8. For commands 0322 and 0323, the data length of the response frame is 48 bytes (6*8).

Reading Last Emergency Event Data

0380: Get Last Emergency Data

The 0380 command requests information about the last occurred emergency stop event. It can be used to find the reason for an emergency stop. Below is the ACK response frame of the 0380 command.

Header Command
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID
"NRMK-Indy7" "v3.2.0" 0x02 0x12 15 40 - 380
Data
Emg Code (4 byte integer) ArgsInt 0 (4 byte integer) ArgsInt 1 (4 byte integer) ArgsInt 2 (4 byte integer) ArgsDouble 0 (4 byte integer) ArgsDouble 1 (4 byte integer) ArgsDouble 2 (4 byte integer)
3 4 -160 0 0 0 0

The data length is 40 bytes: a 4-byte integer shows the emergency stop event code, and additional information about the event is saved in 3 integer arguments and 3 double arguments. See IndyFramework for additional information on emergency stop data.

SmartIO Control

IndyDCP provides commands to control each pin of each I/O or control all.

The 0400 command requests one DI with SmartDI number. The 0401 command requests every value of the SmartDI array. In the case of the 0400 command, the data type is a 4-byte integer, which is the number of SmartDI, and the data of the ACK response frame is 1 byte, describing HIGH (1) or LOW (0). In the case of the 0401 command, since SmartDI has 32 items and each DI number is described with 1 byte, the data length is 32 bytes. Below is an example of the ACK response frame for the 0401 command, in which SmartDI 02, 03 is HIGH and others are LOW.

Header Command
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID
"NRMK-Indy7" "v3.2.0" 0x02 0x12 16 32 - 401
Data
SmartDI_00 (1 or 0, 1ybte) SmartDI_01 (1 or 0, 1ybte) SmartDI_02 (1 or 0, 1ybte) SmartDI_03 (1 or 0, 1ybte) SmartDI_04 (1 or 0, 1ybte) ... SmartDI_31 (1 or 0, 1ybte)
0 0 1 1 0 ... 0

The 0402 and 0403 commands request to write SmartDO. The 0402 command writes only one of the corresponding DO values with the SmartDO number, and 0403 is the command to write the entire SmartDO array. Thus, for 0402, the data length of the request frame is 5 bytes with the SmartDO number (4-byte integer) and the SmartDO value (1 or 0, 1 byte). In the case of 0403, the total number of SmartDO is 32, so the data length in the request frame is 32 bytes. Below is an example of the request frame of command 0402 (HIGH for SmartDO 04).

Header Command Data
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID SmartDO Num(4byte) SmartDO Value(1byte)
"NRMK-Indy7" "" 0x00 0x34 17 5 - 402 4 1

SmartAI and SmartAO do not support commands that read or write all AI and AO at once. Similar to the 0400 and 0402 commands, one AI or AO can be controlled through commands 0404 and 0405. For the data in the request frame, the SmartAI/AO number is a 4-byte integer, and the value is a 4-byte integer (0-10000 range).

Other I/O Control

The Indy robot series and CB also support a CAN port to use an FT sensor.

Reading FTSensor Values with CAN Port

0420-0423: Get CAN FTSensor

The CAN port is on the CB and the robot's last body. If the FTSensor is connected to one of these CAN ports, the sensor value can be read through the command.

When reading F/T (Force/Torque) sensor data, support is provided to process raw data received from the sensor into actual force values. Data can be read in processed form for sensors attached to the robot end CAN port via command 0421. Similarly, for F/T sensors attached to the CAN port of IndyCB, data can be read using command 0423.

The F/T sensor data is represented by six components: XYZUVW, similar to task coordinates. Processed data is encoded as 8-byte doubles, totaling 48 bytes. For the XYZ values, the units are in Newtons (N), while UVW are in Newton-meters (Nm). An example of the data in the response frame for command 0423 is provided below

Header Command
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID
"NRMK-Indy7" "v3.2.0" 0x02 0x12 18 32 - 423
Data
FTValue X(N, 8byte) FTValue Y(N, 8byte) FTValue Z(N, 8byte) FTValue U(Nm, 8byte) FTValue V(Nm, 8byte) FTValue W(Nm, 8byte)
32 12 -6.4 -1.2 1.5 -1.5

NAK Response Frame

When sending commands and requests from IndyDCP, if a command execution fails, a NAK response is received. This response includes the command ID 9999 and an error code represented as a 4-byte integer. The error codes for these NAK responses are summarized in the table below

Error Code Error Name Description
0 ERR_NONE Not Error
1 ERR_NO_MATCHED_ROBOT The robot is not matched
2 ERR_NO_MATCHED_STEP the STEP is not matched
4 ERR_HEADER_FORMAT Error of header format
5 ERR_OVER_DATA_SIZE Data size exceeded
6 ERR_NOT_SUPPORT_COMMAND The command is not supported
7 ERR_UNKNOWN_COMMAND The command is unknown
8 ERR_UNKNOWN_DATA The data is unknown
9 ERR_PROCESS_FAILED Process has failed
10 ERR_PARSE_FAILED Parsing command has failed (data error)
11 ERR_NO_MATCHED_PARAMETER Data type is not matched
12 ERR_NO_MATCHED_DATA_SIZE Data length is not matched
14 ERR_ROBOT_MOVING_STATE Command failure due to robot-in-motion.
15 ERR_ROBOT_PROGRAM_RUNNING Command failure due to program running
16 ERR_ROBOT_MOVE_FAILED Execution of robot motion command failed
17 ERR_NO_DEFAULT_PROGRAM No default program is found
18 ERR_NO_CURRENT_PROGRAM There's no program currently loaded
19 ERR_CURRENT_PROGRAM_STATE Command failure due to current program state
20 ERR_EMG_STATE The robot is in Emergency Stop
21 ERR_ROBOT_STATE Command failure due to current robot state
22 ERR_ROBOT_PROGRAM_LOAD_FAILED Loading robot program failed
23 ERR_DIRECT_VARIABLE_INVALID_ADDRESS Invalid direct variable adress
24 ERR_DIRECT_VARIABLE_INVALID_FORMAT Invalid direct variable reference data format
25 ERR_DIRECT_VARIABLE_REFNUM_LIMIT he number of access for direct variable exceeded 20