Hello, I’m using AXC F2152 controller, my program run in SampleRuntime framework https://github.com/PLCnext/SampleRuntime, My program need reboot device and I used the code: _sync();
setuid(0);
reboot(RB_AUTOBOOT);_ After reboot, the device turn on LED FAIL and can not read value from analog module Could you show me the properly way to reboot device ? Sincerely, HaiHoang
Hello, 1. When the controller restarts, are both the RUN and FAIL LEDs flashing at 2 Hz? 2. Do you see the following entry in the Output.log file after the restart?
23.03.20 13:38:40.199 Arp.System.Watchdog.Internal.SystemWatchdogRebootCounter INFO - last reboot caused by hardware watchdog
If so, then this indicates that the hardware watchdog has been triggered, which (based on my tests) is a side-effect of rebooting the PLC using this method. If this looks like the same problem you are seeing, please try disabling the hardware watchdog using this procedure: https://www.plcnext-community.net/en/hn-makers-blog/440-how-to-disable-system-components-in-the-plc-for-more-performance.html The Environment variable you want to set to “false” is ARP_SYSTEM_WATCHDOG_SUPPORT. Disabling the hardware watchdog caused my AXC F 2152 to reboot OK using this method. Hope this helps. ~ Martin.