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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NetworkStream「Connected Property」

Solved!
Go to solution

this property help「Returns FALSE if the local host does not report a connection between the endpoints.」

i want to know how to check connection.

0 Kudos
Message 1 of 4
(1,131 Views)
Solution
Accepted by topic author letmeknow

I've used Network Streams for LabVIEW RT systems for almost a decade, but I've never used the Connected property.  Under what circumstances do you need it?

 

Bob Schor

Message 2 of 4
(1,062 Views)

i use this property to check 「HOST⇔RT connection」 alive or not.

if 「connected property value is false」, then RT set「analog output voltage」 to 0V(for ensurrng safety).

 

In long time(24Hour) working system, system check 「connected property is false or not」 every 1 second cycle.

In 24 Hour、「connected property is false(1~3seconds)」occure every 3~4 hours.

 

i want to know why temporary disconnection occur.

0 Kudos
Message 3 of 4
(1,053 Views)
Solution
Accepted by topic author letmeknow

I use the NS "Is Connected" property before sending data from RT to Host to at least in theory, save a

little time in detecting an error. Without it one would have to wait for the timeout to occur (~700ms).

 

Note that from the help description - it does not actually contact the remote endpoint. So does it really

help that much? I don't know, but I'm going with the belt and suspenders approach.

One thing worth checking - verify that your NS reference is maintained throughout your code.

"Use default if unwired" or a for loop without using a shift register can bite you.

 

Over several systems including an 1100 hour life test, I haven't seen spurious connection errors.

 

I'm only half joking when I ask, "Is someone next store using an Arc Welder"?

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Message 4 of 4
(1,041 Views)