Skip to content

Modbus TCP

Indy Framework supports Modbus TCP, one of the general-purpose industrial fieldbus communication protocols. ModbusTCP can be primaryly used to receive robot data and to send commands using external devices such as PC, PLC, and the other devices.

Robot setting, task teaching, and robot programming are commonly performed by Conty, which is Neuromeka's official teach pendant application. The commands such as executing and stopping the registered robot program can be performed by external devices that use IndyDCP or ModbusTCP as well as Conty.

Both IndyDCP and ModbusTCP use dedicated TCP communication and communicate through TCP/IP network protocol. To use TCP/IP protocol, control box (STEP) must be connected with external devices that will use the TCP/IP communication protocol through Ethernet. Here, IndyCB (control box) or STEP that executes Indy Framework will be a server, and up to 32 masters (client) can be connected. Below table is the connection information for the Modbus TCP slave (server)

Content Description
IP Address Ethernet IP address of STEP
Port Number 502 (ModbusTCP default port)
Max. Number of Connections 32 (internally using 2 as default)
Max. Communication Cycle 100Hz (10ms)

Memory Address Mapping

ModbusTCP supports both of Coil (bit) and Register (WORD; 16bit), but IndyFramework2.0 mainly uses Register.

Register 0 to 999 is a user area, which is able to read and write. Users freely assign variables to the required memory addresses. In Conty program, M variables can be created through direct variables as shown in below, allowing access to user area in memory.


Register 1000 to 3999 is a reserved area, which is used for controlling robots or reading data. Below table shows the memory address mapping of reserved areas of Register and Coil. Register is used by default, but in some cases with a Data Range of 0 to 1, it is also available with Coil. The availability of Coil is indicated with mark * in the Data Range.

Receiving Robot Status

The status of the robot uses 1000 to 1099 addresses. Most avariables for each address are represented by 1(true) and 0(false), and can be accessed by both Coil and Register to read status values. Some state variables have Word values accessible only by Register. For example, the 1040 address is default program Number registered in Conty.

Robot Status
Address Read/Write Description Data Range Comment
1010 R isRobotControllerRunning 0~1 * -
1011 R isRobotReady 0~1 * Robot is ready (all Servo On, etc.)
1012 R isEmergecyStopped 0~1 * -
1013 R isCollided 0~1 * Robot detects collision
1014 R isErrorState 0~1 * -
1015 R isBusy 0~1 * The robot is in motion
1016 R isMoveFinished 0~1 * The robot reached its target normally
1017 R isHome 0~1 * Robot is home position
1018 R isZero 0~1 * Robot is zero position
1019 R isInResetting 0~1 * -
1040 R Registered Default Program #Num 0, 1~10 The Number of registered default Conty program
1080 R isDirectTeachingMode 0~1 * -
1081 R isTeachingMode 0~1 * Teaching Mode through JOG buttons, etc.
1082 R isContyConnected 0~1 * -
1083 R isProgramRunning 0~1 * Program is running (including pause)
1084 R isProgramPaused 0~1 * -

Robot Control Command and Executing Program

To send commands to control the robot, you can write a value of 1 at 1100 to 1299 addresses. Both Coil and Register are accessible, as mentioned before. In the slave (server), Rising bit is used to recognize the command. It executes the command only after recognizing the change from 0 to 1.

If you want to send a command assigned to the same address again, you must change 1 to 0 and write it back to 1 for bit rising. Commands must be sent after 10 ms because the maximum communication cycle of the ModbusTCP is 100 Hz.

If the moving commands is sent when the robot is already moving or the program is running, it will be ignored. In addition, when multiple commands is sent at the same time, it runs only high-priority commands and other commands are ignored.

Program Execution Commands

1100-1104 are related to the execution of a program in Conty.

1110-1119 commands are related to the default program stored in Conty. Default programs can be stored in Conty from number 1 to 10, and one of these can be registered to the robot through ModbusTCP or Conty. It is possible to register a default program via 1110-1119 command and run it via 1100 command.

Program Execution Commands
Address Read/Write Description Data Range Comment
1100 W Start Registered Default Program 0~1 * -
1101 W Start Program 0~1 * -
1102 W Stop Program 0~1 * -
1103 W Pause Program 0~1 * -
1104 W Resume Program 0~1 * -
1110~1119 W Register Default Program 1~10 0~1 * Register default program to the robot

Basic Robot Control Commands

1160-1165 are the basic commands of robot control. Commands include reset, force reset, motion stop, emergency stop, move to home position, etc.

1160 reset command can be used to reset common errored situations. When robot is stopped due to overspeed or collision detection, reset is used to resolve the problem and make the robot ready again. When the reset is in progress, the state value of 1019 becomes 1 and user is able to know about robot status.

1161 reset command is a force reset command when the robot cannot be reset even with 1160 command. The robot will be rebooted and re-initialized.

1162 motion stop command stops the robot which is in motion (both motion and program).

1164 and 1165 commands move the robot to its home position or zero point. It only works when the robot is not moving or the program is not running.

Basic Robot Control Commands
Address Read/Write Description Data Range Comment
1160 W Reset 0~1 * Robot reset (Error reset, etc.)
1161 W Force Reset 0~1 * Hardware reset (Robot rebooting and initializing, etc.)
1162 W Stop Motion 0~1 * -
1163 W Emergency Stop 0~1 * -
1164 W Move to Home 0~1 * Move to home position
1165 W Move to Zero 0~1 * Move to zero position
1170 W Switch To Direct Teaching Mode 0~1 * -
1171 W Finish Direct Teaching Mode 0~1 * -

Specific Move Command Execution Commands

1200-1299 are commands to execute certain Move commands in a program set as the default program. These names are mapped from move-00 to move-99 for each address. This command only works when the program is not running. Also, if the Move command is already in progress or if the robot is moving, command will be ignored

Command & Program
Address Read/Write Description Data Range Comment
1200-1299 W Move to Specific Named Move Command(move-00~move-99) 0~1 * -

Methods for programming robots with ModbusTCP

User is able to create complicated conty program using SmartIO and ModbusTCP.

For example, if an external device is connected to a DIO port in CB, user can use if statement in Conty program to verify SmartDI inputs. In this case, the main agent of control is Conty program, and the program operates when the external device sends a SmartDI input.

Another option is to execute Move command directly from an external device. In this option, user directly sends command to 1200~1299, which is mapped with specified name as move-00~move-99. For example, if user create JointMove named move-00, move-01 and FrameMove named move-02, the robot can be controlled directly from an external device with commands to ModbusTCP 1200, 1201, and 1202 as shown in below.


Receiving Robot Data

There are two coordinates system for robot. One is joint coordinates and the other is task coordinates. Joint coordinates is the angles of each axis of the robot, and task coordinates is the TCP position on a three-dimensional space.

1300-1305 represent the joint coordinates and each corresponds to the angle of the joint 1 to 6. For the seven-axis robot, 1306 corresponds to the angle of joint 7. The unit is mrad (1/1000 times the radian) and it is represented by a signed 16-bit integer. Similarly, 1310-1315 are the current velocities of the axis 1 to 6, and 1380-1385 are the current forces (torque) of the axis 1 to 6 respectively.

1600-1605 represents Task coordinates (xyzuvw order) . xyz is the distance from the robot Base to TCP, and uvw indicates the rotation of the tool endpoints. These are represented by the Euler Angle and the rotation order is w->v->u (rZ->rY->rX). The unit is 1/10mm (1/10000 times the meter) for xyz and mrad for uvw. 1610-1615 likewise represent the current velocities on task coordinates.

The data described above cannot represent a more detailed unit because they represent a value in 16 bit integers. It also supports 32bit float data for users who want more detailed values. 1400-1411 and 1700-1711 use 2 addresses per data (e.g. 1400-1401) to represent 32bit float data.

Joint(as WORD)
Address Read/Write Description Data Range Comment
1300 R Base joint angle (in mrad) 16bit Angle of axis 1 (axis closest to the robot base)
1301 R Shoulder joint angle (in mrad) 16bit Angle of axis 2
1302 R Elbow joint angle (in mrad) 16bit Angle of axis 3
1303 R Wrist1 joint angle (in mrad) 16bit Angle of axis 4
1304 R Wrist2 joint angle (in mrad) 16bit Angle of axis 5
1305 R Wrist3 joint angle (in mrad) 16bit Angle of axis 6
1306 R Wrist4 joint angle (in mrad) 16bit Angle of axis 7 (when 7 or more axises exist)
1310 R Base joint angle velocity (in mrad/s) 16bit Velocity of axis 1
1311 R Shoulder joint angle velocity (in mrad/s) 16bit Velocity of axis 2
1312 R Elbow joint angle velocity (in mrad/s) 16bit Velocity of axis 3
1313 R Wrist1 joint angle velocity (in mrad/s) 16bit Velocity of axis 4
1314 R Wrist2 joint angle velocity (in mrad/s) 16bit Velocity of axis 5
1315 R Wrist3 joint angle velocity (in mrad/s) 16bit Velocity of axis 6
1316 R Wrist4 joint angle velocity (in mrad/s) 16bit Velocity of axis 7
1380 R Base joint torque (in Nm) 16bit Torque of axis 1
1381 R Shoulder joint torque (in Nm) 16bit Torque of axis 2
1382 R Elbow joint torque (in Nm) 16bit Torque of axis 3
1383 R Wrist1 joint torque (in Nm) 16bit Torque of axis 4
1384 R Wrist2 joint torque (in Nm) 16bit Torque of axis 5
1385 R Wrist3 joint torque (in Nm) 16bit Torque of axis 6
1386 R Wrist4 joint torque (in Nm) 16bit Torque of axis 7
Joint(as Float)
Address Read/Write Description Data Range Comment
1400-1401 R Base joint angle (in rad) 32bit Angle of axis 1
1402-1403 R Shoulder joint angle (in rad) 32bit Angle of axis 2
1404-1405 R Elbow joint angle (in rad) 32bit Angle of axis 3
1406-1407 R Wrist1 joint angle (in rad) 32bit Angle of axis 4
1408-1409 R Wrist2 joint angle (in rad) 32bit Angle of axis 5
1410-1411 R Wrist3 joint angle (in rad) 32bit Angle of axis 6
1412-1413 R Wrist4 joint angle (in rad) 32bit Angle of axis 7
1420-1421 R Base joint angle velocity (in rad/s) 32bit Velocity of axis 1
1422-1423 R Shoulder joint angle velocity (in rad/s) 32bit Velocity of axis 2
1424-1425 R Elbow joint angle velocity (in rad/s) 32bit Velocity of axis 3
1426-1427 R Wrist1 joint angle velocity (in rad/s) 32bit Velocity of axis 4
1428-1429 R Wrist2 joint angle velocity (in rad/s) 32bit Velocity of axis 5
1430-1421 R Wrist3 joint angle velocity (in rad/s) 32bit Velocity of axis 6
1432-1433 R Wrist4 joint angle velocity (in rad/s) 32bit Velocity of axis 7
1560-1561 R Base joint torque (in Nm) 32bit Torque of axis 1
1562-1563 R Shoulder joint torque (in Nm) 32bit Torque of axis 2
1564-1565 R Elbow joint torque (in Nm) 32bit Torque of axis 3
1566-1567 R Wrist1 joint torque (in Nm) 32bit Torque of axis 4
1568-1569 R Wrist2 joint torque (in Nm) 32bit Torque of axis 5
1570-1571 R Wrist3 joint torque (in Nm) 32bit Torque of axis 6
1572-1573 R Wrist4 joint torque (in Nm) 32bit Torque of axis 7
Task(as WORD)
Address Read/Write Description Data Range Comment
1600 R TCP-x in 1/10 of mm (in base frame) 16bit X coordinate of tool point (robot end point)
1601 R TCP-y in 1/10 of mm (in base frame) 16bit Y coordinate of tool point
1602 R TCP-z in 1/10 of mm (in base frame) 16bit Z coordinate of tool point
1603 R TCP-rx in mrad (in base frame) 16bit X-axis rotation angle of tool point (Euler UVW, rotation order rZ->rY->rX)
1604 R TCP-ry in mrad (in base frame) 16bit Y-axis rotation angle of tool point
1605 R TCP-rz in mrad (in base frame) 16bit Z-axis rotation angle of tool point
1610 R TCP-x velocity in 1/10 of mm/s(in base frame) 16bit X-axis velocity of tool point
1611 R TCP-y velocity in 1/10 of mm/s(in base frame) 16bit Y-axis velocity of tool point
1612 R TCP-z velocity in 1/10 of mm/s(in base frame) 16bit Z-axis velocity of tool point
1613 R TCP-rx velocity in mrad/s (in base frame) 16bit X-axis rotation velocity of tool point
1614 R TCP-ry velocity in mrad/s (in base frame) 16bit Y-axis rotation velocity of tool point
1615 R TCP-rz velocity in mrad/s (in base frame) 16bit Z-axis rotation velocity of tool point
Task(as Float)
Address Read/Write Description Data Range Comment
1700-1701 R TCP-x in m (in base frame) 32bit X coordinate of tool point
1702-1703 R TCP-y in m (in base frame) 32bit Y coordinate of tool point
1704-1705 R TCP-z in m (in base frame) 32bit Z coordinate of tool point
1706-1707 R TCP-rx in rad (in base frame) 32bit X-axis rotation velocity of tool point
1708-1709 R TCP-ry in rad (in base frame) 32bit Y-axis rotation velocity of tool point
1710-1711 R TCP-rz in rad (in base frame) 32bit Z-axis rotation velocity of tool point
1720-1721 R TCP-x velocity in m/s (in base frame) 32bit X-axis velocity of tool point
1722-1723 R TCP-y velocity in m/s (in base frame) 32bit Y-axis velocity of tool point
1724-1725 R TCP-z velocity in m/s (in base frame) 32bit Z-axis velocity of tool point
1726-1727 R TCP-rx velocity in rad/s (in base frame) 32bit X-axis rotation velocity of tool point
1728-1729 R TCP-ry velocity in rad/s (in base frame) 32bit Y-axis rotation velocity of tool point
1730-1731 R TCP-rz velocity in rad/s (in base frame) 32bit Z-axis rotation velocity of tool point

Other Robot Data

Robot Error Data

When the robot is in an emergency or an error condition, the value of register 2900-2906 can be used to determine which emergency situation or error is present. These register contains the most recent information about an emergency or an error. 2900 register is the emergency event code and 2901-2906 register are the event data argument for each event code. For detail about error state, see IndyFramework.

etc_error
Address Read/Write Description Data Range Comment
2900 R Last Emergency Event Code(Integer) 16bit Event code of last emergency
2901 R Last Emergency Event Data Arg1(16bit Signed Integer) 16bit Emergency event data 1
2902 R Last Emergency Event Data Arg2(16bit Signed Integer) 16bit Emergency event data 2
2903 R Last Emergency Event Data Arg3(16bit Signed Integer) 16bit Emergency event data 3
2904 R Last Emergency Event Data Arg4(Floating Point (x1000)) 16bit Emergency event data 4
2905 R Last Emergency Event Data Arg5(Floating Point (x1000)) 16bit Emergency event data 5
2906 R Last Emergency Event Data Arg6(Floating Point (x1000)) 16bit Emergency event data 6

Basic I/O Control

SmartIO(SmartDI, SmartAI, SmartDO, SmartDI) can be controlled through ModbusTCP. SmartDI 00-31 is allocated to the 3000-3031 register and SmartAI 00-03 is allocated to the 3200-3203, which can be read to determine the SmartDI and SmartAI value.

Note

SmartDIO has 32 I/O each, and SmartAIO has 4 I/O each, but, there are unused numbers made for future scalability.

SmartDO and SmartAO can be controlled by not only ModbusTCP, but also by Conty or indyDCP, etc. When controlled at the same time, the output may not be the desired value. To avoid this situation, the control using Modbus is diactivated at default.

In the case of SmartDO, the default value is 2 (meaning "None"), which means that it doesn't write value to the SmartDO. If SmartDO should be controlled with ModbusTCP, user can change the the default value to HIGH(1) or LOW(0). Then, the ModbusTCP will write and control the SmartDO. In this case, SmartDO take priority over other controls.

Similarly, control through Modbus has a priority for SmartAO. The control value of SmartAO is 0(0[V]) to 10000(10[V]). All values exceed 10000 denotes None (default is 50000) which means SmartAO is not controlled with ModbusTCP.

I/O
Address Read/Write Description Data Range Comment
3000-3031 R SmartDI_00~31 0~1 HIGH(1), LOW(0)
3100-3131 W SmartDO_00~31 0~1 HIGH(1), LOW(0), NONE(other)
3200-3203 R SmartAI_00~03 16bit 0~10V to 0~10000
3220-3223 W SmartAO_00-03 16bit 0~10V to 0~10000, NONE(other)

Other I/O Controls

Although there are some additional I/O ports, currently only CAN ports for FTTSensor are provided. Data is in XYZUVW order, and the unit are [N] for XYZ and [Nm] for UVW.

Extra I/O
Address Read/Write Description Data Range Comment
3400-3405 R FTSensor Data from Robot CAN (Raw)(16bit Signed Integer) 16bit -
3406-3417 R FTSensor Data from Robot CAN (Transformed)(32bit Signed Integer) 32bit -
3420-3425 R FTSensor Data from CB CAN (Raw)(16bit Signed Integer) 16bit -
3426-3437 R FTSensor Data from CB CAN (Transformed)(32bit Floating Integer) 32bit -