06-20-2017 06:29 PM
I'm trying to find all the systems that are online. Here's what I came up with:
Unfortunately, I'm noticing that if the RIO is recently turned off, it will still return "Connected - Running" even though I should be getting a system "only if online", I have "force property refresh" true and the user guide says "To determine if a Real-Time target is online, use the System Property Node to return the System Status property." Is there a good way to get if a unit is online?
As a side note the timeouts seem like they are mostly ignored, Find Time is 7 seconds, Open Time is 3 seconds when they should be closer to 1000.
06-21-2017 03:23 PM
yes I did something similar with the system config APIs to what you did and encountered the exact same problems. I think a better less complicated solution is to make your cRIOs send out a UDP message every few seconds or so. UDP messages get "broadcast" over the network and do not expect a reply. Then you can listen for UDP messages and use the information in the UDP packet to connect.
06-21-2017 03:38 PM - edited 06-21-2017 03:39 PM
I'd prefer it didn't rely on my stuff and could work with a formatted system. Maybe I can hit a web server? I was also hoping I could get NI to fix or clarify what "if online" and "force refresh", "status", or "timeout" really mean because none of them are working as I would expect.
06-21-2017 03:54 PM - edited 06-21-2017 03:54 PM
well if you have all the cRIO IP addresses as static you could just do a windows (or linux) ping command via the system exec to each known address. But if you want them to be able to be dynamic IP address yeah there really isn't a good built in solution that I know of. I am fairly convinced system config VIs are bugged.