RevPiModIO wrote: ↑16 Aug 2023, 08:08
And it's running now?
Are the sections [MQTT], [XMLRPC], etc. also double in your configuration file? If so, please delete the duplicate occurrences completely.
The value `plcprogram_watchdog = 1` is not good! The number is the timeout in seconds. If you activate the software watchdog, it must also be triggered in the program (which is the same BIT as the RevPi Connect uses for the hardware watchdog) or you use the functions of RevPiModIO. The value of 1 means that the software watchdog must be detected within a second, that is too close! If you use the watchdog in your program, you should set it higher about 10-30 or disable it with a 0.
Please also check the logs: `cat /var/log/revpipyload`
Greeting
Sven
Hi Sven,
Sorry, it seems that I copied wrongly and it duplicates, the one in my revpi is the one with no duplications, please refer below:
Code: Select all
[DEFAULT]
autoreload = 1
autoreloaddelay = 15
autostart = 1
plcworkdir = /var/lib/revpipyload
plcworkdir_set_uid = 1
plcprogram = program.py
plcprogram_stop_timeout = 5
plcprogram_watchdog = 0
plcarguments =
plcuid = 0
plcgid = 0
pythonversion = 3
replace_ios = /etc/revpipyload/replace_ios.conf
reset_driver_action = 2
rtlevel = 0
zeroonerror = 1
zeroonexit = 0
[PLCSLAVE]
plcslave = 0
aclfile = /etc/revpipyload/aclplcslave.conf
bindip = *
port = 55234
watchdog = 1
[XMLRPC]
xmlrpc = 1
aclfile = /etc/revpipyload/aclxmlrpc.conf
bindip = 127.0.0.1
[MQTT]
mqtt = 0
basetopic = revpi0000
sendinterval = 15
send_on_event = 0
write_outputs = 0
broker_address = localhost
port = 1883
tls_set = 0
username =
password =
client_id =
I have followed your advice for now and disabled watchdog. This is what I get from `cat /var/log/revpipyload` previously:
Code: Select all
2023-05-24 23:27:12 [WARNING ] restart plc program after crash
2023-05-24 23:27:13 [ERROR ] plc program crashed - exitcode: 1
2023-05-24 23:27:13 [WARNING ] set piControl0 to ZERO after PLC program error
2023-05-24 23:27:28 [WARNING ] restart plc program after crash
2023-05-24 23:27:29 [ERROR ] plc program crashed - exitcode: 1
2023-05-24 23:27:29 [WARNING ] set piControl0 to ZERO after PLC program error
After making the changes, I have key in these command:
Code: Select all
sudo service revpipyload reload
sudo service revpipyload start
However, the script still didn't run.. my code actually suppose to send data to a register and it suppose to show up on the other side (read register), do i need to add specific revpi command into my code for the auto start to work?
Thank you!
