Store PLCnext CommunityPLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

Resolved reboot

0
Votes
Undo
  1. nick-peeters
  2. PLCnext Technology & PLCnext Controls
  3. Friday, 10 September 2021
hi!

In my c++ program in some conditions i need to perform a reboot in order to update some settings.
using:

sync();
setuid(0);
reboot(RB_AUTOBOOT);

causes the firmware to trigger the hardware watchdog:
this is discussed in:

https://www.plcnext-community.net/en/discussions-2-offcanvas/how-to-reset-plcnext-device-on-admin-user-using-a-c-program.html#reply-4773

Disabling the hardware watchdog was my next move

xml file:

<?xml version="1.0" encoding="UTF-8"?>
<AcfSettingsDocument
xmlns="http://www.phoenixcontact.com/schema/acfsettings"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.phoenixcontact.com/schema/acfsettings.xsd"
schemaVersion="1.0" >

<!-- Insert new entries in related domain section in alphabetic order -->
<EnvironmentVariables>

<!-- System components-->
<EnvironmentVariable name="ARP_COMPONENT_SYSTEM_WATCHDOG" value="true" override="false" />

</EnvironmentVariables>

</AcfSettingsDocument>

uploading the file in /opt/plcnext/appshome/ will result in the firmware to fail.
no acces to the plc is possible, not using plcnext engineer nor accessing the wbm webpage

current fw 2021.6
is something wrong in the xml file?
is there a better way to perform a reboot from a c++ program?

kind regards nick
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
That's a great suggestion from Davide.
If your C++ application can access RSC services, then this would probably be the best way to restart the device.
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
dcrispino@phoenixcontact.com Accepted Answer Pending Moderation
0
Votes
Undo
Hi Nick, you can take a look here to the Restart function :
https://api.plcnext.help/api_docs_2021-6/classArp_1_1Device_1_1Interface_1_1Services_1_1IDeviceControlService.html#af84e52fe0b027cc5c567c9d0fb6e64f9

More information on RSC can be found here:
https://www.plcnext.help/te/Service_Components/Remote_Service_Calls_RSC/RSC_Remote_Service_Calls.htm

Have nice weekend
nick-peeters Accepted Answer Pending Moderation
0
Votes
Undo
hi martin,

I would be more interested in a way to reboot without having to disable the system watchdog.
Is there a way to reboot the system from c++ not having to disable the watchdog?
if not than i'll wait for a way to disable it.

kind regards nick
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
Hi Nick,

You can't use the technique described in that old blog post with FW 2021.6.
Instead, a new feature has been added to Web Based Management, that allows selected components to be disabled:
https://www.plcnext.help/te/WBM/Configuration_System_Services.htm

Unfortunately the system watchdog doesn't appear in that list.

I will need to check the current way (if any) to disable the system watchdog with FW 2021.6.

.
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.