A common question is how do I map the Modbus TCP registers into my PLC program from the Sick Flexi Soft Modbus Gateway?
Using the FX3-GMOD gateway can be a little confusing because it can be handled multiple ways. The default will look something like this:
Upon first glance it would look like the Input Data Set 1 would be in Holding Registers starting at 400001.
However, this is not the case. When you look at the manual for the card you will find this:
So if the PLC is requesting the data and the FX3-GMOD gateway is acting as a server, the device addressing is very different.
As you can see here you can look at registers 1000, 1100 etc as different blocks to read the data from the module and write data to the module.
The most common data set to read starts at 1100. This is "Input Data Set 1". And as an example you can see something like this in the GMOD configuration:
Each module will have it's own set of bits listed out as well as the Logic Results at the top and the DirectOuts at the bottom.
However you will see here that 50 bytes are shown (0 through 49). If you look back at the chart where it describes "Input Data Set 1" starting at 1100 it shows reading 25 registers. That's correct. Each register is 16 bits, so Logic result 0 and Logic result 1 will be in the first Modbus Register - 1100.
The Sick documentation states that the registers are 1 based.
As an example I am reading with a debug program here:
I am using function code #3 for Modbus, I am reading 25 registers starting at 1100 with a minus offset of 1. And you can see the results match the previous screenshot from sick where in 1102 I have a value of 3 which matches bytes 4&5 (4 being low, 5 being high byte) and bits 0 and 1 are on in byte #4.
Make sure you read ALL 25 registers with your read as well.
I hope this helps someone else get their Sick FX3-GMOD reading properly.
Question
Bryon Sol
A common question is how do I map the Modbus TCP registers into my PLC program from the Sick Flexi Soft Modbus Gateway?
Using the FX3-GMOD gateway can be a little confusing because it can be handled multiple ways. The default will look something like this:
Upon first glance it would look like the Input Data Set 1 would be in Holding Registers starting at 400001.
However, this is not the case. When you look at the manual for the card you will find this:
So if the PLC is requesting the data and the FX3-GMOD gateway is acting as a server, the device addressing is very different.
As you can see here you can look at registers 1000, 1100 etc as different blocks to read the data from the module and write data to the module.
The most common data set to read starts at 1100. This is "Input Data Set 1". And as an example you can see something like this in the GMOD configuration:
Each module will have it's own set of bits listed out as well as the Logic Results at the top and the DirectOuts at the bottom.
However you will see here that 50 bytes are shown (0 through 49). If you look back at the chart where it describes "Input Data Set 1" starting at 1100 it shows reading 25 registers. That's correct. Each register is 16 bits, so Logic result 0 and Logic result 1 will be in the first Modbus Register - 1100.
The Sick documentation states that the registers are 1 based.
As an example I am reading with a debug program here:
I am using function code #3 for Modbus, I am reading 25 registers starting at 1100 with a minus offset of 1. And you can see the results match the previous screenshot from sick where in 1102 I have a value of 3 which matches bytes 4&5 (4 being low, 5 being high byte) and bits 0 and 1 are on in byte #4.
Make sure you read ALL 25 registers with your read as well.
I hope this helps someone else get their Sick FX3-GMOD reading properly.
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.