04-06-2012 01:46 PM
I just learned that compact daq systems do not have the option of using a watchdog. I have a compact daq chassis with a DO device NI9476 and a DO device (TTL) NI9401. The output states need to go to low level in case the PC software controller "hangs". Are there any methods possible with the chassis and these modules which simulate in some way a watchdog functionality ?
Up to now I only have the idea to add a USB6509 device to my system which has watchdog functionality (this is the only USB driven decive I could find with this functionality). Using one DO line of this device I could operate a relay which cuts the power to my compact daq chassis if the watchdog expires. I guess this will work but it is for sure not an elegant method.
Any other suggestion would be very welcome.
Thanks in advance
04-13-2012 03:12 AM
Indeed CompactDaq systems do not have for the moment any hardware watchdog and then, unfortunatly you can't simulate one in any way as this functionality must be implemented in hardware (software watchdogs do exist, but of course they imply that the software properly works and are thus not intended to monitor OS crashes for example).
But perhaps you can tell a little more about your code and the "hangs" you worry about? Are you talking about "hangs" in your VI? Or is it OS crashes that you want to catch? Of course, the best solution is always to avoid those "hangs".
Regarding the coding of your VI, it is always possible the write it in such a way any "hangs" can be avoided. Proper error handling is also mandatory for that purpose.
If you want to be robust against events and crashes outside your VI, either your can catch them with a watchdog functionality (the solution you have proposed with the USB-6509 should work, but that's indeed not the most elegant one) or you can avoid them by using Real-Time systems or controllers, which are specifically designed to not "hang".
Does this reply to your question or do you need further informations?
04-13-2012 02:33 PM
Thanks for your reply. Actually I am worried about both type of "hangs", from my VI and from the OS. The OS is a windows based system, which I guess is not unknown for having some reliability issues. Also the VI may have its issues. Its a rather complex application where one vi launches a series or other vi's which have to work on a piece of hardware, using a number of semaphores etc to get things going. Though I agree that proper error handling is a necessity, I am not sure if it is always possible to write a VI which can not hang. This gives a little bit too much credit to the underlying NI labview vi's.
I agree that a different platform may be the best solution, but at this stage I have to continue with the cDAQ platform, which apart for the missing watchdog functionality, performs very well in our application. I guess I will have to go for the less elegant method of just cutting the line to my cDAQ system with a separate device with watchdog functionality. Googling around I found a larger number of USB plug in watchdog devices, most oriented to restart your PC in case of a hanging event. Maybe such a separate device would also be a nice NI product (at least I would trust it better with respect to Labview compatibility then the 50 to 100 EUR devices I found on the web.
Thanks for your support,
04-25-2012 09:30 AM
First of all, sorry for this late answer, but I still wanted to give you some more precisions.
I understand that you can have quite complex VI's with complex hierarchy and using lots of functionalities but, at the cost of a longer development time (code refactoring, architecture rethinking, ...), it is possible to have VI's which will not hang because of development issues. Of course, I can not swear that LabVIEW is 100% safe. There are issues with functions, VI's and other NI software related products, but most of the time, those issues are well-known, and you can always search the KnowledgeBase to find workarounds (http://www.ni.com/kb/).
The number of issues or bugs related to a core NI software product is really low.
But again, you would better have to rely on Real-Time system if you need more safety. As for the USB watchdog device you are talking about, I think NI is less concentrated on such devices as it is more fighting the symptom instead of the cause. Cause that you can fight by using Real-Time system (most of them actually contains also watchdogs) and proper code development.
That said, if you encounter any specific issue with your VI's, please feel free to post to this forum.
Thank you for the interest you show in NI products.