Modbus® TCP Connectivity in FabGuard

William Rodrigues – Semiconductor Application Engineer, Beaverton OR

Modbus is an open serial communication protocol that is widely used for communicating with industrial electronic devices. Integrating Modbus TCP into FabGuard allows factories to integrate, analyze, and control factory data from external devices such as bath concentration monitors.

Modbus TCP is Modbus protocol wrapped in a TCP/IP layer. The most commonly used TCP port for Modbus is 502. Devices that are connected to FabGuard® IPM using Modbus TCP are treated as if they are a gauge, not a sensor. Devices that are treated as gauges have several limitations:

  • FabGuard can only read data values from the device. FabGuard cannot control the device.
  • FabGuard is limited to reading input registers that are 16bits wide using the Modbus function codes 3 and 4.

Connection Parameters

To connect the Modbus device to FabGuard you will need:

  • FabGuard version 8.5.6-a or higher
  • Device IP Address
  • TCP Port, if different from the default port 502

To read the input register value, FabGuard needs the absolute address of the input register. Some devices allow user modification of the base address which then needs to be added to the input register address.

FabGuard provides Signal Bins in the recipe with built-in methods to convert Modbus register values into human readable data as explained in the setup. Modbus TCP is supported in FabGuard versions 8.5.6-a and higher.

Modbus Connection in FabGuard IPM

From the Tool screen select Configuration >> Connections(Sensors and tool) and Add TCP protocol under gauges list. Then edit the TCP protocol to add/remove the device IP address and TCP port (502), Figure 1.

Figure 1

Figure 1: Connections configuration screen in FabGuard.

Figure 2

Figure 2: Advanced Input screen showing TCP Update Delay in FabGuard.

FabGuard allows controlling the polling rate to TCP devices in the global communications setting. This polling delay will affect all devices that are connected over TCP/IP. Defaults is 1000ms but 100ms can be practical for some devices if needed. It is available under Advanced Input configuration screen, Figure 2.

Using Modbus in Recipes

Figure 3

Figure 3: Manual Tool Bin configuration inside of a FabGuard recipe.

FabGuard recipes can be set to collect data from the devices as tool bins. In addition to the IP address, the absolute register address is needed. In the recipe, create a tool bin manually and set the Connection to TCP and the Type to Modbus/TCP, Figure 3.

Using Function Codes

By default, FabGuard uses function code 3 to poll data. If function code 4 is required then append (4) to the Register value including the (). In the example above the Register entries for each function code would be:

Function code 3 = 1017

Function code 4 = 1017(4)

Modbus Signal Bin Functions

Modbus tool bin data is 16 bits wide but certain data types like floating point numbers and integers are 32 bits wide and text can be even larger. Such data types need to be combined in the right order to get human readable data. The device Modbus documentation will supply information on how data larger than 16 bits is broken down and arranged in the input registers. Typically, 32 bit data types are broken into two consecutive 16 bit input registers. The order of the most significant bit (MSB) and least significant bit (LSB) is important.

The following examples show how to combine two tool bins into 32 bit wide floating and integer values, Figures 4 and 5. Figure 6 shows an example of data from a bath concentration monitor connected to FabGuard using Modbus TCP.

Figure 4

Figure 4: Combining two tool bins into a 32 bit wide float data type using the Signal Bin Binary Operators.

Figure 5

Figure 5: Combining two tool bins into a 32 bit wide integer data type

Figure 6

Figure 6: Example of data from a bath concentration monitor.

Summary

Using Modbus TCP communication protocol, FabGuard is able to integrate, analyze, and control data from external devices present in the factory. These additional data streams provide increased FDC protection for factory processes.