Products
  • Modbus RTU to TCP/IP Protocol Conversion guide - Using Red Lion

Modbus RTU to TCP/IP Protocol Conversion guide - Using Red Lion



In this Tech Tip we will take you through some simple steps to implement protocol conversion from Modbus RTU to Modbus TCP.  An advantage of converting from MODBUS RTU to TCP/IP is that the Modbus data is converted from serial to run on an Ethernet layer, resulting in CRC error-checking.

The below run-through is suitable for several Red Lion devices such as the DA10, DA30, DA50 & DA70 Group 2 and above. In this example, we have used a DA50 Group 3 Red Lion device.

Let’s start…

  • Generate your crimson file and select the appropriate device.

Select your ethernet and serial port drives. An example of the selected drivers can be seen in Figure 1

Figure 1: Network Modbus TCP/IP Driver

Ensure that the ethernet configuration is setup correctly according to specifications. These options can be found under the ethernet port in the navigation window. An example of how this has been setup in this tech tip is shown in Figure 2.

Figure 2: Port Configuration Settings

You will then have to select your drivers that will communicate to the Modbus RTU slave device.

Figure 3: Serial Port Driver Options

Like the Ethernet settings ensure that your serial port settings are matching the requirements of the slave device for Modbus RTU driver.

Figure 4:Serial Port Settings

It may be necessary to disable ping holding registers by setting the value to zero. The Ping holding register value is used to quickly detect if a device is online. The default setting is 1, which means that the Red Lion will read 400001 (function code 03 register 0x00 length of 1) to determine if the device is online.  If the slave device does not have this register set the value to 0.


Figure 5: Protocol Option - Holding Register set to 0

Once the drivers have been selected and configured it is required that the registers are mapped via blocks in crimson. This is done by adding a block, right click on the slave device (able to be renamed) and add block. The starting addresses for this block will then need be assigned, the available Modbus registers are normally provided by manufacturer of the slave devices. The length of the block will dictate how many registers will be mapped to the Red Lion device. This setup procedure is demonstrated in Figure 6. For the example we have only used the digital input registers.  



Figure 6: Modbus Register Mapping

Once you have configured all the registers that will be mapped in the Serial Port, the same will need to be done for the network protocol driver (Modbus TCP/IP Driver). This follows the same steps as above however the direction of data is the main change. This is required to be altered as data is going from the Red Lion device to the system that will handle the data. It will have to be set as displayed in Figure 7.

Figure 7: Modbus TCP/IP Settings and Modbus Registers

Once you click on your TCP/IP register that requires mapping go to the resource pane and expand the device you want (slave RTU device previously made), click and drag the register type or tag over. The mapping will ask for starting address and length unless a tag is being mapped. Enter these values and it should appear as below:

Figure 8: Modbus TCP/IP Register Mapping from Modbus RTU Slave Device

Once you have done this the setup from Modbus RTU to Modbus TCP/IP is complete. The mapping for tags is demonstrated in Figure 9.

Figure 9: Modbus TCP/IP Mapping Example

This section will cover some additional information that can help troubleshoot and testing of the system if you ever experience any issues. To cross-reference and confirm device data mapped into the device tags, a system internal tag can be generated and mapped through the resource pane to the register (method shown above). This block can then be watched through the watch block command in Crimson.

Ensure that the drop number matches your device number on the slave device, the device will not be able to communicate otherwise.

Red Lion serial ports offer two sets of TxA and TxB. This allows pin 1, 2 to be used as well as 7,8 or a combination of the two, this is handy when troubleshooting and testing. Confirm your device serial port connections when wiring the device.

Figure 10: Red Lion RS485 Pin allocation

This section will cover the verification of the steps carried out above. We can simulate the slave device if you do not have one a program called ModSim32. Now that the correct registers have been made the values can be simulated.

Figure 11: Modbus RTU Slave Device Registers

Once we have setup the connections, we can also verify that the unit is producing the correct Modbus TCP/IP registers. ModScan32 can be used for this. All that is required is the device IP address for the ModScan to bind to.

Figure 12: Modbus TCP/IP Verification

When testing and changing the input status the bits can be observed to change. We have now not the only set up Modbus RTU to Modbus TCP/IP conversion but also verified its operation.

And that's it! If you still have questions, or would like more information on Red Lion products or software,  get in touch with us on 1300 556 601.

 
Select location
Panasonic PLC Training
PANASONIC PLC FP0R TRAINING 1 DAYS IN BRISBANE INCLUDES AFP0RC14RS + FP0R-CABLE-USB TR-PANA-FP0R-QLD
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FP0R TRAINING 1 DAYS IN MELBOURNE INCLUDES AFP0RC14RS + FP0R-CABLE-USB TR-PANA-FP0R-VIC
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FP0R TRAINING 1 DAYS IN SYDNEY INCLUDES AFP0RC14RS + FP0R-CABLE-USB TR-PANA-FP0R-NSW
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FP0R TRAINING 1 DAYS IN PERTH INCLUDE AFP0RC14RS + FP0R-CABLE-USB TR-PANA-FP0R-WA
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FP0R TRAINING 1 DAYS IN ADELAIDE INCLUDES AFP0RC14RS + FP0R-CABLE-USB TR-PANA-FP0R-SA
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FPX TRAINING 1 DAYS IN BRISBANE INCLUDES AFPX-C30RD + CBLUSB00 TR-PANA-FPX-QLD
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FPX TRAINING 1 DAYS IN MELBOURNE INCLUDES AFPX-C30RD + CBLUSB00 TR-PANA-FPX-VIC
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FPX TRAINING 1 DAYS IN SYDNEY INCLUDES AFPX-C30RD + CBLUSB00 TR-PANA-FPX-NSW
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FPX TRAINING 1 DAYS IN PERTH INCLUDES AFPX-C30RD + CBLUSB00 TR-PANA-FPX-WA
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FPX TRAINING 1 DAYS IN ADELAIDE INCLUDES AFPX-C30RD + CBLUSB00 TR-PANA-FPX-SA
Increase value Decrease value
Mission Critical Industrial Ethernet Course
HIRSCHMANN 1DAY TRAINING MISSION CRITICAL IND ETHERNET INCLUDES (942 291-001) TR-ETH-QLD
Increase value Decrease value
Mission Critical Industrial Ethernet Course
HIRSCHMANN 1DAY TRAINING MISSION CRITICAL IND ETHERNET INCLUDES (942 291-001) TR-ETH-VIC
Increase value Decrease value
Mission Critical Industrial Ethernet Course
HIRSCHMANN 1DAY TRAINING MISSION CRITICAL IND ETHERNET INCLUDES (942 291-001) TR-ETH-NSW
Increase value Decrease value
Mission Critical Industrial Ethernet Course
HIRSCHMANN 1DAY TRAINING MISSION CRITICAL IND ETHERNET INCLUDES (942 291-001) TR-ETH-WA
Increase value Decrease value
Mission Critical Industrial Ethernet Course
HIRSCHMANN 1DAY TRAINING MISSION CRITICAL IND ETHERNET INCLUDES (942 291-001) TR-ETH-SA
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 2 Software
HIRSCHMANN HiOS L2 TRAINING 3 DAYS IN BRISBANE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS2-QLD
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 2 Software
HIRSCHMANN HiOS L2 TRAINING 3 DAYS IN MELBOURNE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS2-VIC
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 2 Software
HIRSCHMANN HiOS L2 TRAINING 3 DAYS IN SYDNEY INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS2-NSW
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 2 Software
HIRSCHMANN HiOS L2 TRAINING 3 DAYS IN PERTH INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS2-WA
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 2 Software
HIRSCHMANN HiOS L2 TRAINING 3 DAYS IN ADELAIDE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS2-SA
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 3 Software
HIRSCHMANN HiOS L3 TRAINING 3 DAYS IN BRISBANE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS3-QLD
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 3 Software
HIRSCHMANN HiOS L3 TRAINING 3 DAYS IN MELBOURNE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS3-VIC
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 3 Software
HIRSCHMANN HiOS L3 TRAINING 3 DAYS IN SYDNEY INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS3-NSW
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 3 Software
HIRSCHMANN HiOS L3 TRAINING 3 DAYS IN PERTH INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS3-WA
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 3 Software
HIRSCHMANN HiOS L3 TRAINING 3 DAYS IN ADELAIDE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS3-SA
Increase value Decrease value
Network Management (CP2)
HIRSCHMANN NETWORK TRAINING 2 DAYS IN BRISBANE INCLUDES 943 993-471 (Voucher) TR-HIRS-CP2-QLD
Increase value Decrease value
Network Management (CP2)
HIRSCHMANN NETWORK TRAINING 2 DAYS IN MELBOURNE INCLUDES 943 993-471 (Voucher) TR-HIRS-CP2-VIC
Increase value Decrease value
Network Management (CP2)
HIRSCHMANN NETWORK TRAINING 2 DAYS IN SYDNEY INCLUDES 943 993-471 (Voucher) TR-HIRS-CP2-NSW
Increase value Decrease value
Network Management (CP2)
HIRSCHMANN NETWORK TRAINING 2 DAYS IN PERTH INCLUDES 943 993-471 (Voucher) TR-HIRS-CP2-WA
Increase value Decrease value
Network Management (CP2)
HIRSCHMANN NETWORK TRAINING 2 DAYS IN ADELAIDE INCLUDES 943 993-471 (Voucher) TR-HIRS-CP2-SA
Increase value Decrease value
Industrial Ethernet CT1
HIRSCHMANN CT1 TRAINING 2 DAYS IN BRISBANE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT1-QLD
Increase value Decrease value
Industrial Ethernet CT1
HIRSCHMANN CT1 TRAINING 2 DAYS IN MELBOURNE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT1-VIC
Increase value Decrease value
Industrial Ethernet CT1
HIRSCHMANN CT1 TRAINING 2 DAYS IN SYDNEY INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT1-NSW
Increase value Decrease value
Industrial Ethernet CT1
HIRSCHMANN CT1 TRAINING 2 DAYS IN PERTH INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT1-WA
Increase value Decrease value
Industrial Ethernet CT1
HIRSCHMANN CT1 TRAINING 2 DAYS IN ADELAIDE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT1-SA
Increase value Decrease value
Industrial Ethernet CT2
HIRSCHMANN CT2 TRAINING 3 DAYS IN BRISBANE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT2-QLD
Increase value Decrease value
Industrial Ethernet CT2
HIRSCHMANN CT2 TRAINING 3 DAYS IN MELBOURNE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT2-VIC
Increase value Decrease value
Industrial Ethernet CT2
HIRSCHMANN CT2 TRAINING 3 DAYS IN SYDNEY INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT2-NSW
Increase value Decrease value
Industrial Ethernet CT2
HIRSCHMANN CT2 TRAINING 3 DAYS IN PERTH INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT2-WA
Increase value Decrease value
Industrial Ethernet CT2
HIRSCHMANN CT2 TRAINING 3 DAYS IN ADELAIDE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT2-SA
Increase value Decrease value
Industrial Routing CT3
HIRSCHMANN CT3 TRAINING 2 DAYS IN BRISBANE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT3-QLD
Increase value Decrease value
Industrial Routing CT3
HIRSCHMANN CT3 TRAINING 2 DAYS IN MELBOURNE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT3-VIC
Increase value Decrease value
Industrial Routing CT3
HIRSCHMANN CT3 TRAINING 2 DAYS IN SYDNEY INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT3-NSW
Increase value Decrease value
Industrial Routing CT3
HIRSCHMANN CT3 TRAINING 2 DAYS IN PERTH INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT3-WA
Increase value Decrease value
Industrial Routing CT3
HIRSCHMANN CT3 TRAINING 2 DAYS IN ADELAIDE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT3-SA
Increase value Decrease value
Products to compare:
Comparing Products