How to Configure Modbus

Use of Modbus

Modbus can be enabled in the following dialog box. This dialog box appears when the optional Fieldbus slave board is not installed.

[System Configuration]-[Controller]-[Inputs/Outputs]-[Fieldbus Slave]-[General]

Select any of "Disable", "Modbus RTU", or "Modbus TCP" from the pull-down menu.

KEY POINTS


Modbus does not function if the Fieldbus slave board is installed while either Modbus RTU or Modbus TCP is selected. However, setting will be held.

Modbus RTU detailed settings

If "Modbus RTU" is selected in [Fieldbus Type:], the detailed setting window for using Modbus RTU is displayed. Set each item.

[Port]

Select the serial port number to be used. Other settings such as the baud rate are done in the RS-232C configuration dialog box (other menu).

KEY POINTS


  • If unused port number is selected, a controller error occurs after rebooting the Controller.
  • To change the settings of the selected port such as a baud rate, disable Modbus in advance. Settings cannot be changed if the port is set to Modbus.

[Slave Address]

For the Modbus RTU slaves, the slave address set to the transmission frame is checked and the request for that address is only processed.

KEY POINTS


Set the desired address. Be careful not to conflict with other equipment.

[Idle time]

Set the idle time to be added to the sending frame specified by the Modbus RTU protocol. By the protocol specification, the time for 3.5 characters is defined before and after the sending frame.

The idle time can be set in units of 1ms. If "0" is specified for the setting value, the time for 3.5 characters will be set.

Set this item if the connected equipment cannot receive a response with the time for 3.5 characters.

Modbus TCP detailed settings

If "Modbus TCP" is selected for the [Fieldbus Type], the dialog box to enable Modbus TCP will be displayed. Set each item.

[Port]

Select the port number to be used. Default is "502".

KEY POINTS


Set the port number not to conflict with other system.

[Timeout]

In [Timeout], set the time to automatically disconnect if there is no transmission or reception after the port is connected. If the connection is lost, connect again.

Set the time from 0 seconds to 60 seconds in increments of 1-second.

CAUTION


If you set "0" in the [Timeout] box, time out duration is infinite. In this case, the task continues to execute even without the communication from client. This means the robot may keep moving and cause unexpected damage. Ensure the ways other than the communication to stop the task.

KEY POINTS


While connecting with ModBus TCP, the error 7103 "Fieldbus slave. Timeout error occurred during I/O data transform." could occur on the controller. The error may not be cleared when you reset it immediately after it occurs. After occurring the error, reset it after 10ms has passed.