Configuring a Modbus Device
In a Modbus configuration, a device represents a hardware device that communicates with the Modbus point manager over TCP/IP or a serial port (RS-232). The device is represented by its symbolic name and its channel and device type in combination with the unit identifier and other settings.
Setting up a device requires configuring its channel, device type, unit identifier, and scan rate.
To set up a device:
- In Workbench, open your project and expand Data Connectivity > Modbus.
-
Right-click Address Space and then select Add Device.
You can also select Address Space and then click Add Device in the Edit section of the Home ribbon.
- Name your new device. Make sure that the Enable checkbox is selected.
- Select the communication Channel from the drop-down list. There is a predefined default channel. The channel specifies all the communication related parameters, such as TCP/IP or serial line settings, communication timeouts, and suspended mode settings.
- From the Device Type drop-down list, specify the type of Modbus device. Various device types are predefined in the configuration. The device type specifies Modbus framing options and possible swapping options.
-
In Base Scan Rate, you set the rate (in milliseconds) at which the data will be polled from the device. Set a value of zero (0) to scan with the rate based on client-side requests.
Fast scan rates may have an impact on a device's responsiveness.
- In the Other Settings section, you can set the addressing of the registers and Modbus communication functions.
- There are two ways of specifying the address space of your device:
- By pre-configuring folders and data items under your device. Data items represent the values from the register map of your Modbus device.
- By using a template. The folders and data items that are defined in the template are added to the device. For details, seeUsing Templates.
- When you're done, click Apply & Close to close the window and create the device.