Support Forums
Virtual PLC to act as Modbus Server

I'd like to set up a Modbus Compatible Device driver to act as a virtual PLC. I then want a separate machine to poll this virtual PLC via Modbus TCP to read the values in the Virtual PLC registers.

Is this possible - and if so, how do I set this up? I have tried creating a virtual PLC and put an analog tag with a value in there, but I cannot get a Modbus Client device to successfully connect to the virtual PLC (using 127.0.0.1 as the TCP/IP port).

Thanks

I'd like to set up a Modbus Compatible Device driver to act as a virtual PLC. I then want a separate machine to poll this virtual PLC via Modbus TCP to read the values in the Virtual PLC registers. Is this possible - and if so, how do I set this up? I have tried creating a virtual PLC and put an analog tag with a value in there, but I cannot get a Modbus Client device to successfully connect to the virtual PLC (using 127.0.0.1 as the TCP/IP port). Thanks

It looks like you need to make one small change. In your TCP/IP port tag, leave the "TCP/IP Name/Address" field blank and set the port number to whatever port you want the remote application to connect on (502 is preferred for Modbus TCP).

You will also need to set the driver's "Comm Channel" to match the remote end. Our driver supports Serial RTU, Serial ASCII, Embedded TCP/IP, and Open Modbus TCP over TCP/IP connections.

It looks like you need to make one small change. In your TCP/IP port tag, leave the "TCP/IP Name/Address" field blank and set the port number to whatever port you want the remote application to connect on (502 is preferred for Modbus TCP). You will also need to set the driver's "Comm Channel" to match the remote end. Our driver supports Serial RTU, Serial ASCII, Embedded TCP/IP, and Open Modbus TCP over TCP/IP connections.

Lawrence MacNeil
Trihedral Engineering Limited

edited Jun 22 '18 at 1:54 pm

Leaving the TCP/IP Name/Address field blank does the trick.

Thanks for the help.

Leaving the TCP/IP Name/Address field blank does the trick. Thanks for the help.
277
2
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft