简体   繁体   中英

how to implement a watchdog for a labview application in python

I have a labview application(2013 32bit) that will run for long periods of time, and sometimes the entire labview app crashes for unknown reasons. What I'd like to do is write an external python script which would act as the watchdog to this labview application.

So the labview app would periodically send a bit to the python script, and if the python script doesn't receive that then it will send me an alert.

The question is how I would most easily achieve this one-way communication. It looks like I could use dynamic data exchange , but that seems like overkill. A dumb way to do it would just be reading and writing to a text file. Neither side would actually have a direct form of communication. But that doesn't seem completely reliable.

Are there any better and simpler alternatives?

If I was on your place I would just send local UDP packet once a 5 seconds.

IF your architecture is modular you can send signals to your watchdog module from each module (to make sure every module is running).

The best way I think is to evaluate the problem and make your LabVIEW application running stable. For sure there is something in your code that crashes LabVIEW (ex. some queue gets full and your writer endpoint waits infinitely).

Why bother with IPC? Depending on the system you're running on there should be ways of monitoring running processes (eg. here ). Your python script can check if your labview app is running. You could even relaunch if it detects the desired process has died.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM