From 12:00 AM CDT Sunday, October 17 - 11:30 AM CDT Sunday, October 17, ni.com will be undergoing 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
(794 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
(767 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
(764 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
(763 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
(759 Views)
0 Kudos
Message 6 of 10
(756 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
(753 Views)
Solution
Accepted by topic author 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
(751 Views)

Well, shame on me.

 

Thanks. 

Duri
0 Kudos
Message 9 of 10
(743 Views)

glad to assist you ❤️

0 Kudos
Message 10 of 10
(740 Views)