LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rt shared variable from cRIO to computer without loss

So the network streams API only requires the names of two endpoints on *one* side. That is, there is a defined "listener" and "connecter" just like with TCP. You can tell the cRIO to try to open a stream at //myStreamName and then your host can connect to it without your cRIO ever knowing the name of the computer. If you need to have some metadata you need to share, what I've done in the past is make a listening stream at a fixed address "//crio/myConnListener" and then that stream is used to negotiate everything else.

 

DNS would also work and it should work just like you'd expect in a normal computer, and you can use a system exec call to flush the dns if needed.

0 Kudos
Message 11 of 18
(1,051 Views)

im curious to know why you can setup a network shared variable to have FIFO property, when that actually does not obey to the FIFO rules? So whats the point in having this option?

0 Kudos
Message 12 of 18
(1,036 Views)

So there is buffering and streaming. The RT FIFO option is so you can use them in a time-critical loop.

 

Buffering is described here: http://www.ni.com/white-paper/12176/en/

However since SVs are fundamentally tag-oriented it rarely makes sense (to me) to enable it.

0 Kudos
Message 13 of 18
(1,024 Views)

good Q Heel, the shared FIFO dose not follow normal FIFO rules, since the host of the FIFO have no idear on how much data there is in the FIFO or who is reading it

0 Kudos
Message 14 of 18
(1,012 Views)

Exactly, and since you don't have that control and you lack information about the size and contents of the buffer, I can't recommend it.

 

Note: in my last post I misspoke, I meant to say "so there is buffering and enabling RT FIFOs". 

0 Kudos
Message 15 of 18
(988 Views)

Agree about the need for buffering on the network shared variable - but my point to the LabVIEW implementers is: Don't call this a FIFO because this it can only be if it maintains first-in-first out integrity, which it does not. So it confuses the users to call it a FIFO.

0 Kudos
Message 16 of 18
(985 Views)

Its definitely a FIFO and has FIFO semantics, but I agree it would be more immediately understandable if it were called a lossy FIFO/lossy buffer. The actual behavior is what an RT FIFO (or lossy enqueue) does.

0 Kudos
Message 17 of 18
(978 Views)

So now i have made my program with network streams as sugested, and it works great. but if my program crashs i run in to the poblem that my network stream allready exist.

Error text is: An endpoint with the same name already exists

 

Any good idears or work arounds? since the posts all points to and idear to acces existing streams have bin posted 4 years ago.
And i just want my data to get from A to B 🙂

 

0 Kudos
Message 18 of 18
(903 Views)