Emulation using Modbus TCP - write problem

Emulation using Modbus TCP - write problem

bendjelloul_a
Not applicable
203 Views
12 Replies
Message 1 of 13

Emulation using Modbus TCP - write problem

bendjelloul_a
Not applicable

[ FlexSim 19.2.3 ]

Hello,

I can connect and read holding registers in Flexsim (emulation : Modbus TCP Server) using modbus TCP Client, but nothing happens in the model when I write to holding registers.

Please find enclosed the simplified flexsim model used in the test (problem occured with both versions 18.2 and 19.2.3).

what could be the problem?

Thank you for your support

modbus-test.fsm

0 Likes
Accepted solutions (1)
204 Views
12 Replies
Replies (12)
Message 2 of 13

bendjelloul_a
Not applicable

Please find enclosed a print screen of the test, it does not work even for writing in global table. (I checked the order of registers in reading input registers and it's correct).

The holding registers values are changing correctly in the server (verified with a second modbus TCP Master) but nothing happens in flexsim.

modbus-emulation-controls-does-not-work.png

globaltable-config-in-emulation.png

0 Likes
Message 3 of 13

joshua_s
Not applicable

Are you able to write any values from FlexSim to the server?

0 Likes
Message 4 of 13

joshua_s
Not applicable

Also in the Connections Tab, change it from a Server to a Client.

Message 5 of 13

bendjelloul_a
Not applicable

I tested the modbus server of flexsim using a Photo eye and it's working correctly. the value in the register is changing according to the photo eye and The Modbus TCP client reads it successfully.

How ever the controls does not work.

0 Likes
Message 6 of 13

bendjelloul_a
Not applicable

thank you, I can interact successfully with flexsim as opc da client.

I would like to work with flexsim model as a server. (modbus or any other protocol)

0 Likes
Message 7 of 13

joshua_s
Not applicable

If you set FlexSim to be the server, then you need to be talking to a client and not another server.

Message 8 of 13

bendjelloul_a
Not applicable

sure, I totally agree. I used to work with my flexsim model as opc da client with an opc server.

Now, I need to work with flexsim model as a server.

And I am connecting to flesxim modbus server with modbus tcp client and it connects successfully.

How ever the controls does not work.

NB: I avoided to send you the model of my work. And used a simpler model instead, to focus better on the emulation problem rather than the model.

Thank you for your support

Message 9 of 13

joshua_s
Not applicable

My apologies, I've been misreading your posts. I'll look into this more. What modbus client tool are you using?

Message 10 of 13

bendjelloul_a
Not applicable

Ok, modbus TCP client is : ModbusTool.exe

0 Likes
Message 11 of 13

matt_long
Not applicable

@Bendjelloul A I'm having trouble finding that software. Is that a free app you can download? And if so from where?

0 Likes
Message 12 of 13

dominik_u
Not applicable

@Matt Long

Here: https://www.modbustools.com/

In my company, we have the same issue. Any tools, wich we have, can't send data to "inside" of simulation. Modbus Tools, Simple Modbus, even my own tools have no chanse to do it.

Some time ago, I was testing server emulation and finde something wierd in it.

If you write from simulation to server registers and try to read this by some client, then everythig is ok, data are availble. But when data is writen to server by modbus client then nothing happens in simulation. In this plase - please hold onto your chair - when client try to read data from server (that was send few moments ago), this data is in server. Main malfunction of server emulation is that, data isn't visible as some variable or event, even though it exist in server registers.

0 Likes
Message 13 of 13

matt_long
Not applicable
Accepted solution

@Dominik U Sorry for the late response. We debugged the issue and found it to be a bug in our Modbus connection. We have fixed the issue in 20.1.2 and 20.0.6. You should now be able to communicate properly with FlexSim from client applications.

0 Likes