From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use system config api to determine if a RIO is online?

I'm trying to find all the systems that are online. Here's what I came up with:

 

get if unit is online.png

 

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.

0 Kudos
Message 1 of 4
(2,559 Views)

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.

0 Kudos
Message 2 of 4
(2,515 Views)

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.

0 Kudos
Message 3 of 4
(2,510 Views)

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.

0 Kudos
Message 4 of 4
(2,505 Views)