I have OpenPLC runtime running in an Ubuntu VM.  On the same host machine, I have Factory I/O running.  Per your suggestion in another forum topic, I set the Modbus TCP server in Factory I/O to TCP port 503 and left OpenPLC runtime at TCP port 502.

I have setup the driver in Factory I/O.  It is Slave ID:1, with 10 Inputs and 10 Coils.  I currently have Buttons connected to Input 0 and Input 1.  I have lights connected to Coil 0, Coil 1 and Coil 2.  A simple setup to make sure it works before I dig in and go crazy with the Factory.

In OpenPLC Editor I have the buttons mapped to inputs %IX100.0 and %IX100.1.  I have the lights mapped to outputs %QX100.0, %QX100.1 and %QX100.2.

I have a simple ladder diagram based on the Hello World program.  The first button is the Start button, which is illuminated when pressed and the second button is the Stop button, which is illuminated when the system is running.  The third light is the system running light which is activated by the Start button press, and deactivated by the Stop button press, just like in the Hello World program.

It runs fine in the OpenPLC editor simulator.  It compiles fine when I load it in the OpenPLC runtime.  And it Runs without any errors.

However, the lights (coils) are never activated.  When I go to the monitor page, I initially see all of the values are FALSE, except the Stop button which is TRUE.  The Stop button light should be TRUE as well (like it is in simulation).  

When I press the appropriate buttons in the Factory I/O GUI, the values for the buttons in the OpenPLC runtime monitor page change correctly.  However, I never see the lights illuminate, either in Factory I/O or on the monitor page of the runtime.

Any thoughts?
Quote 0 0
How have you configured the Factory IO slave device in the Slave Devices page?
Quote 0 0
Please see the attached image.
Quote 0 0
Well, interestingly it seems to be working this morning.  I left the PLC running all night and it is now magically working this morning.  After I posted yesterday, I left the computer to hangout with my kids who had come over, changing nothing.  After posting the image above, I went into Factory I/O and clicked the start button (again, no changes) and it is working.

I'll keep playing with it to see if the same behavior returns.
Quote 1 0