supriyo
Hi,
I was trying to connect factory io and openplc runtime and for that I have chosen factory io as Modbus server (screenshot attached). After that I build a start stop latching circuit using openplc editor and save it as .st file. Then in the openplc runtime I have uploaded this .st (latching circuit) file and add factory io as a slave device. Then I build a scene in factory io using conveyer belt and start, stop button and assign start, stop and conveyer as per their address.
 
Now the problem is when I'm trying to connect the modbus server with runtime it's connecting but the logic is not working. That means when I press the start button, the conveyer is not moving.
 
But with the same setup when I'm trying to execute a simple logic (for example, one PB and one LED and they are directly connected) that is working with Factory IO.
 
Kindly help me to solve the issue.
Reply 0 0
AndBat
I don't know in deeply how OpenPLC runtime works, but usually is not a good practice to use a QX as input. You can try replacing LED variable with a local one and then use this new variable to write LED.
Reply 0 0
AndBat
[203128%2F9284034%2Fblobid0]
Another check, have you tried to set "write digital" to "inputs" instead of "coils"?
Reply 0 0
thiagoralves
If Factory IO is the Modbus client now, then you must use %QX addresses, even for the input buttons. As I explained earlier, inputs are not writable on Modbus. So if you have your buttons as %IX, they are mapped to Modbus inputs, which means that Factory IO cannot write to them, so you cannot get the state of the buttons inputs from OpenPLC
Reply 0 0
supriyo
 
I have changed the addresses of start and stop button to %QX0.1 and %QX0.2 respectively. According to that I have also changed the factory IO mapping. But then also conveyor is not moving when I press the start button in factory IO.
 
I have attached the screenshots of the ladder diagram and factory IO pin mapping also.
Reply 0 0
supriyo
Kindly help me with this. I have no idea where I'm going wrong.
Reply 0 0
supriyo
I have solved the problem. I just changed my start, stop and led addressing. My start address is %QX0.0, stop- %QX0.1 and led address is %QX1.0. Also I have changed the factory io pin mapping. Now in factory io my digital input offset: 0, count: 8 and for digital output offset: 8, count: 8.
 
Using this settings I have managed to run the conveyor using factory IO and from the node-red also.
Reply 0 0
thiagoralves
Why don’t you set factory IO as slave instead of OpenPLC as slave?
Reply 0 0
supriyo
Because here I wanted to make openplc as a modbus server only and factory IO was working as Modbus client.
Reply 0 0
Reply