From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Search for online cRIO

Solved!
Go to solution

I'm trying to detect connected and running cRIO in the local network based on the status (Connected - Running/Disconnected). Reason I'm doing it like this is, that when the device is powered off, it still can be found by Find Hardware.vi.

 

Snipped in the attachment basically does what I'm looking for, but I'm having problem with the Initialize Session.vi which takes from 6s to 50s, when the device is not connected or powered off. No problem when the device is connected and powered on.

 

Does anyone know why Initialize Session.vi takes so much time?

Could you recommend other solution to searching for cRIO?

 

Thanks

Duri
0 Kudos
Message 1 of 10
(3,231 Views)

Hello,

It may take that long, because Initialize Session.vi waits for a confirmation from the cRIO, but as the cRIO is not powered on, it waits until timeout event occurs

0 Kudos
Message 2 of 10
(3,204 Views)

if you are trying to detect if a certain cRIO is connected, you can implement a heartbeat monitoring using a dedicated shared variable, which can store the time it has been modified,  and by checking that time you can make sure if the RIO is online.

 
 

 

 

0 Kudos
Message 3 of 10
(3,201 Views)

Hi hy_,

 

I understand this and would say that it is expected behavior, but Initialize Session.vi has Connect Timeout (4000 ms) input, which does not seems to work.

 

To your second reply:

Once I successfully connect to cRIO, I'm monitoring "vital" functions. So this is handled. But the problem is when I'm starting the Main Host application and searching for particular device, which might be powered off if the user forgot to have device powered on and connected prior to starting Main Host application.

Duri
0 Kudos
Message 4 of 10
(3,200 Views)

According to specifications, initialize session can take longer than the specified timeout in some occasions.

 

https://zone.ni.com/reference/en-XX/help/373107N-01/nisyscfg/initialize_session/

0 Kudos
Message 5 of 10
(3,196 Views)
0 Kudos
Message 6 of 10
(3,193 Views)

Yes, so some occasion seems to be the basic one, when the device is not connected.

 

Is there any other way to detect online cRIO except using Initialize Session.vi and Status System property?

 

The other one was already reported to moderator.

Duri
0 Kudos
Message 7 of 10
(3,190 Views)
Solution
Accepted by Duri

We can set a static IP address on cRIO and ping it to check whether it's online

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z00000159SmSAI&l=en-GB

Message 8 of 10
(3,188 Views)

Well, shame on me.

 

Thanks. 

Duri
0 Kudos
Message 9 of 10
(3,180 Views)

glad to assist you ❤️

0 Kudos
Message 10 of 10
(3,177 Views)