LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
donkdonk

underpass (subway) for data exchange between parallel loops

Status: Completed

Available in LabVIEW 2016 and later. Right-click on any terminal and select Create > Channel Writer... to launch the Select Channel Endpoint dialog and create a channel wire.

There are several methods to exchange data between parallel loops.

These methods however are (intrinsically) not following LabVIEW's dataflow-along-wire paradigm.

 

If you think in different layers, where several loops are running in parallel at the surface, you could have subsurface datatransfer.

You could add a new "tunnel mode" to the LabVIEW 2013 right mouse menu on the border of a loop.

There you could also specify whether you would like the data passing the boundary to be queued.

You would however think of something to visualize these settings at the loop boundary as well as having some error terminals in case of queues.

 

 

Underpass_data_transport_be.jpg

28 Comments
AristosQueue (NI)
NI Employee (retired)

I'm glad you count channel wires as completing this idea... even though we went with overpasses instead of underpasses. 🙂 Work on channel wires started about six years ago and went through a lot of design evolution. I'm pleased that we finally had a feature to deliver at NIWeek 2016. I hope it works for you. One note about the 2015 stuff -- we did break binary compatibility between 2015 and 2016, so if you use the 2015 stuff, you'll have to redrop your channel endpoints when you upgrade to 2016.

donkdonk
Member
@AristosQueue, Thanks for your reaction and your warning about the endpoints compatibility issue between 2015 and 2016.
donkdonk
Member
Talking about 2015 channel wires: I did not find the equivalent of (shared) variables. Using tags seems the way to go, however the consumer loop waits for new data to arrive. For a particular use case, I'd like it to run independently and take the latest value even if it is not updated. AristosQueue, I know your you don't like tags used in this way, but I humbly ask you to climb down from your "ivory tower" 😉 as you might know the answer.
AristosQueue (NI)
NI Employee (retired)

donkdonk: For LV 2015, wire a timeout of zero to the reader. Syntax shifted for LV 2016.

donkdonk
Member

AristosQueue: Thanks for the timeout tip. Two remarks: 1) it was hard to find a read endpoint with time out; finally I found the lossy pipe with read timeout (I found it by placing the default lossy pipe, then richtclick> replace>endpoint>readtimeout). 2) when timed out it does not give the last value, but a zero.

 

BTW: For the "tag type" channel wire, I cannot find one with a time out terminal.

Darren
Proven Zealot
Status changed to: Completed

Available in LabVIEW 2016 and later. Right-click on any terminal and select Create > Channel Writer... to launch the Select Channel Endpoint dialog and create a channel wire.

AristosQueue (NI)
NI Employee (retired)

donkdonk: Hm... my memory of LV 2015 is clearly getting foggy... we've revised the endpoints multiple times since then, and I guess I'm starting to confuse them. Sorry for the wild goose chase.

donkdonk
Member

Channel wire (tag)Channel wire (tag)

Working with channel wires now. Easy to work with, but wow, a tremendous amount of work underneath the surface by NI!

And, as AristosQueue already pointed out, NI chose a loop overpass whereas I thought of an underpass 😉

 

Looks pretty much as I envisaged it (however I imagined the write and read endpoints to be part of the loop boundaries). And as a bonus, NI gives you the option of "Write With Abort" (not used here to show how similar the idea is to its implementation).