question

Steven Chen avatar image
0 Likes"
Steven Chen asked Joshua S converted comment to answer

Emulation Modbus Disconnect and Status Viewer

Hello,

Is there a way to sync all registers between Flexsim and PLC on model starts?

Currently reset model doesn't disconnect Modbus. I have to close program to disconnect, but once the program closed it ruins the PLC and connection never established until PLC rebooted.

I would like to have logs and table view of current value of registers, to make sure the commands does executed, helping me to find out it's human error or bug.

As picture below, Everything is fine in first simulation run. Connection doesn't close after model reset. In the second run, motors stopped immediately even the registers are true in PLC. I have to reboot PLC to make it works again.

Using Omron PLC as Modbus server and Flexsim as client. I also used other client tool to test connection with PLC by disconnecting and reconnecting and no issue found.

FlexSim 18.2.3
emulationmodbus
01.png (146.5 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joshua S avatar image Joshua S commented ·

When you say tags, are you using an OPC server which uses tags, or strictly Modbus which uses registers?

0 Likes 0 ·
Steven Chen avatar image Steven Chen Joshua S commented ·

Oh, it's registers not tags. My mistake.

0 Likes 0 ·

1 Answer

Steven Chen avatar image
0 Likes"
Steven Chen answered

I found a way to sync registers on model start. Simply add an event on model start and write as input to inform PLC to reset all registers (PLC codes that assign variables with default value).

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.