codcoder Posted November 14, 2022 Report Share Posted November 14, 2022 (edited) Hi, We have a PXI-system with a PXIe-8821 controller running LabVIEW RT (PharLap). On this controller we have a deployed LabVIEW developed application. So all standard so far. From time to time the application ends up in an erroneous state. Since the overall system is relatively complex and used as a development tool for another system, it is tedious to detect and debug each situation that leads to an error. So the current solution is to regularly reboot the controller. Both at a fixed time interval and when the controller is suspected to be in an erroneous state. To achieve this remotely we send a reboot command by spoofing the HTTP POST command sent when clicking on the "restart button" in NI's web based configuration GUI. I was surprised that this worked, but it does, and it does so pretty well. But there is an issue: we have an instrument that can get upset if the reference to it isn't closed down properly. And since this reboot on system level harshly close down our application this has increasingly started to become an issue. So I have two questions: Is there a way to detect that a system reboot is imminent and allowing the LabVIEW application to act on it? Closing down references and such. Is there another way to remotely reboot a controller? I am aware of the built in system vi's but those are more about letting the controller reboot itself. What I'm looking for is a method to remotely force a reboot. Any input is most welcome! Edited November 14, 2022 by codcoder Quote Link to comment
Rolf Kalbermatter Posted November 14, 2022 Report Share Posted November 14, 2022 27 minutes ago, codcoder said: Hi, We have a PXI-system with a PXIe-8821 controller running LabVIEW RT (PharLap). On this controller we have a deployed LabVIEW developed application. So all standard so far. From time to time the application ends up in an erroneous state. Since the overall system is relatively complex and used as a development tool for another system, it is tedious to detect and debug each situation that leads to an error. So the current solution is to regularly reboot the controller. Both at a fixed time interval and when the controller is suspected to be in an erroneous state. To achieve this remotely we send a reboot command by spoofing the HTTP POST command sent when clicking on the "restart button" in NI's web based configuration GUI. I was surprised that this worked, but it does, and it does so pretty well. But there is an issue: we have an instrument that can get upset if the reference to it isn't closed down properly. And since this reboot on system level harshly close down our application this has increasingly started to become an issue. So I have two questions: Is there a way to detect that a system reboot is imminent and allowing the LabVIEW application to act on it? Closing down references and such. Is there another way to remotely reboot a controller? I am aware of the built in system vi's but those are more about letting the controller reboot itself. What I'm looking for is a method to remotely force a reboot. Any input is most welcome! I would attack it differently. Send that reboot command to the application itself, let it clean everything up and then have it reboot itself or even the entire machine. 1 Quote Link to comment
codcoder Posted November 16, 2022 Author Report Share Posted November 16, 2022 On 11/14/2022 at 9:35 AM, Rolf Kalbermatter said: I would attack it differently. Send that reboot command to the application itself, let it clean everything up and then have it reboot itself or even the entire machine. I was afraid the answer would be something along the line "just do it properly" The thing is the application does have that feature. It is just that the option to command reboot on system level is so appealing as it works in those cases where the application is non responsive. Quote Link to comment
drjdpowell Posted November 16, 2022 Report Share Posted November 16, 2022 One option is to trigger a soft shutdown of your app, then do a reboot a short while latter. Quote Link to comment
ShaunR Posted November 16, 2022 Report Share Posted November 16, 2022 4 hours ago, codcoder said: The thing is the application does have that feature. It is just that the option to command reboot on system level is so appealing as it works in those cases where the application is non responsive. As long as it's only the app that has stopped responding you could also use the NI Webserver RPC feature to call a separate vi that reboots the machine (if that is still a thing after NXG). I'm not sure it's possible to install on a PharLap target but with SSH you can easily reboot a remote machine. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.