Sign in to follow this  
Followers 0
wlederer

MODBUS TCP with FX3U-ENET

17 posts in this topic

Hello to everybody. Our management want to offer our customers MODBUS TCP protocol for communication. A FX3U PLC is used and the block FX3U-ENET added for this purpose. I found an example for the GX IEC Developer. What is confusing: they don't speak about master and slaves, but about server and client. What is the difference? After some efforts it seems to work, when FX3U-ENET is a slave. As a master a laptop with Simply Modbus 7.0 is used. But how can I make FX3U-ENET a master? For configuration I used FX Configurator EN. Is this correct? When Open system was chosen "Unpassive" it worked OK as a slave. Then I changed configutation to "Active", added port number and IP address of the test laptop, downloaded configuration to the PLC, verified the configurations (it matched). After that I read the configuration from PLC and when clicking the "Open settings" got an error message telling me that setting are back to default. Found there again "Unpassive" without IP address and port number of the test laptop. What is wrong? Regards, Waldemar

Share this post


Link to post
Share on other sites
Modbus RTU Master=Modbus TCP Client .Modbus RTU Slave=Modbus TCP Server .FX3U-ENET should be an open port 502 .Download the example for modbus TCP.

Share this post


Link to post
Share on other sites
The FX3U-ENET does not allow port selection below 1024, while Modbus/TCP defaults to port 502. As long as you can use a non-standard port, it will work.

Share this post


Link to post
Share on other sites
in Europe is available FX3U-ENET with open port 502.Crossbow may not know it

Share this post


Link to post
Share on other sites
The modules are NOT the same. You need the specific FX3U-ENET-P502 to open up port 502. So if you already have an FX3U-ENET you will need to either: 1. Use a non-standard port in your control system 2. Buy a FX3U-ENET-P502

Share this post


Link to post
Share on other sites
Thank You very much for the answers. I use TCP port 1280 and it seems OK when FX3U-ENET is a server As I guess, the reason for FX3U-ENET non working as a client, is missing library FX3UModbusTCPClient_V???.sul? Tried to find it on the mitsubishi site, but without success. Is this library available for free download? regards, Waldemar

Share this post


Link to post
Share on other sites
I found them. The path: Downloads>Program examples. Another question, how can the extended registers be addressed in Modbus? For example, R0? regards, Waldemar

Share this post


Link to post
Share on other sites
I am aware of the P502 version, but it's a special not sold here in the US. And as kaare_t said, you can't change one into the other. Since he said FX3U-ENET I assumed that was his complete part number.

Share this post


Link to post
Share on other sites
Migrated to GX Works2. Found 2 programming examples for Modbus TCP. Tried at first the server. After "Rebuild All" there was no errors, 4 warnings only, but when I tried to download the program, an error message appeared on the screen, informing that the program was not compiled. Found the function block ENETInitialisation_MBServer shown red. After double click learned, that the function block is read protected. Did some body get success with Modbus TCP using GX Works 2?

Share this post


Link to post
Share on other sites
The reason the library is "ReadOnly" is because you haven't right-clicked then "Open". User libraries are usually ReadOnly after they are added but you can open them.

Share this post


Link to post
Share on other sites
Sorry, could not find the option "Open" after right click. One option was "Write to CSV file, but after click this, there was a message: "Currently displayed label information will be written. Do You want to continue? Caution -Structure device setting information will not be written" Actually, the information about labels only was in the CSV file. P.S. Got answer from Mitsubishi support about addressing extended registers. In the function block FX3UModbusTCPServer there is an input RegiterTypeDorR. If it is set to true it will address D registers, if false - R. regards, Waldemar Edited by wlederer

Share this post


Link to post
Share on other sites
You have to right-click the library itself. See attached picture

Share this post


Link to post
Share on other sites
Thank You for the help. Sorry, after I clicked "Open" nothing appeared on the screen. Where is it hidden? Regards, Waldemar

Share this post


Link to post
Share on other sites
It is OK now. After the library is open then go to functions blocks and double click. Thank You very much for the help.

Share this post


Link to post
Share on other sites
No problem, let us know if you bump into problems.

Share this post


Link to post
Share on other sites
Tried function 3 (Read Registers) with ModbusTCP Client connected to external slave through Ethernet. It worked, I found data from the slave in the register D7701 and further. A couple day later after some changes I repeated the trial and this time found data in another place. How to fix the start of reading to the sertain register? In the function block FX3UModbusTCPClient the local label "ReadData" did show the starting address while monitoring. But the data type is ARRAY. How to connect it to a register? regards, Waldemar

Share this post


Link to post
Share on other sites
You are using the SystemLabel area which assigns the addresses automatically. Use Global variables with specific addresses on the output. You have to use an array because the received data contains more than one register (an array of registers...).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0