08-16-2017 01:29 PM
I have a shared variable hosted on "My Computer" that I'm reading on a RT controller. Is the timestamp that the RT controller reads referenced to the RT controller's clock or is it the time stamp from the host computer when the variable was updated by the host computer?
Thanks,
XL600
Solved! Go to Solution.
08-16-2017 02:00 PM
I guess I answered this for myself. If I modify the clock of the host PC, the RT controller reads the time stamp as set on the host.
08-16-2017 02:48 PM
I asked because I wanted a reliable way to determine if my host is still active (So I can gracefully shut down my RT app on loss of the host). I use NSVs for this since they are independent of VI operation (I could use a network message instead I guess).
This is a snippet from my RT watchdog process. Since the NSV timestamp isn't referenced to the RT clock, I have to get a RT timestamp along side each NSV read to determine when to check if the NSV value has changed. I sure wish there was an optional error in to the timestamp VI. I really hate having to use flat sequence structures like this.
The HOST vi is just an FGV that my RT main uses to determine if the host is alive.
08-17-2017 11:01 AM
Thanks for closing the loop on this. Also, I haven't looked too much into it, but there are watchdog examples within LabVIEW. I am not sure if you built your project off of those, but that could help as well.
Help > Find Examples... > Search > "Watchdog"
08-17-2017 11:19 AM
I had written most of my watchdog process long ago (Before I was even using RT) so I never got a chance to use the Watchdog functions . They would have cleaned up the code quite a bit but would add the need for handling arrays of occurrences. The nice thing about those functions is they are simple to configure (Just give it a time out and use whatever loop you want to 'whack' the dog. NI should have called it 'kick', but we won't get into that right now...). You can also generate multiple watchdogs (Their IDs are essentially global) to form arrays of watchdogs.
My watchdog process does pretty much the same thing using timestamps, shift registers, and case statements.
Had I implemented it with the RT watchdog as the base timing mechanism from the start, it would likely be a much cleaner and smarter design.
NI should make the watchdog VIs into general VIs useable on all versions of LabView (Not just RT).
Thanks,
XL600