N00R
Hi so
I have openplc runtime on raspberry Pi 4 model b and plc is set to run on startup but it doesn't connect to Arduino slave until I reconnect it by changing com ports in slave device

I didn't physically change the Arduino usb port

In slave device i have to switch com port from 
/dev/ttyUSB0
To
/dev/ttyAM0
then start & stop plc (to make it register new Port)
then again change to
/dev/ttyUSB0
And start plc

Only then it connects to Arduino mega

And I need it to automatically connect on raspberry bootup as I'm using raspberry Pi as a hmi
N00R
While I was looking for solutions i found out that

It doesn't connect once
Like on first start it doesn't connect to slave and gives error writing modbus ....


But after stopping and starting plc again it works

So my only problem is to restart plc once it's started

To do so I tried calling 127.0.0.1:8080/stop_plc & 127.0.0.1:8080/start_plc but it requires to login first

Is there a way to skip login or just a way to restart plc without login or can it be fixed to run correctly on bootup?
Reply 0 0
N00R
I tried start/stop command but it doesn't work only way to make it work is to first switch to AMA0 and start plc then switch back to USB0 and start plc
Reply 0 0
Reply