Jump to content
  • 0

Modbus TCP Registers for Flexi Soft FX3-GMOD


Bryon Sol

Question

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:

image.png.b851249fd7aa3bf0628e42c39dadb6be.png

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:

FlexiSoftModbusRegisters.jpg.9f450c02f7c85820608da15571b2add4.jpg

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:

image.thumb.png.229d54f22f17d5f093b52d53cab3b9b3.png

 

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:

image.png.3a3d00f4065188f4de2ecd1cde656958.png

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

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...