LabVIEW Channel Wires

cancel
Showing results for 
Search instead for 
Did you mean: 

I figured out how to Spawn Clones that use Channels using Start Asychronous Call

I really like the new Channels in LabVIEW 2016.  I find that they allow me a much simpler and cleaner design for multi-loop Projects, which might have an Event Structure that feeds into a Message Handler/State Machine, with a Producer/Consumer pair handling DAQ and data processing/display tasks.  I wanted to use this technology and refactor a large LabVIEW RT Project, but there I started most of my parallel loops using Start Asynchronous Call, and had no way to get data into it using a Channel.

I didn't completely give up.  A recent new Project had 4 parallel loops, two of which (the Producer and Consumer) were reduced to a single VI, so those I just put on the Main routine's Block Diagram.

However, another Project involved handling multiple identical "stations", identical hardware, the same (but asynchronous) processing, which I accomplished by making them "Clones", VIs with the Pre-allocated Reentrant Clone property, and (again) starting them in a For Loop using Start Asynchronous Call.  Oops, how to accomplish this?

In an "Aha!" moment, the solution came to me -- use the Best of Both Worlds.  Create a Named Queue for each Clone to pass Channel-bound data into the Clone, and have a single Queue for all the Clones to pass data back to a "Main Routine Consumer" (along with a Clone ID so the Consumer can tell them apart).

I've attached a Zip file that has my Channel Clone demonstration VI, along with (I'm sorry to say) an 8-page writeup, complete with color pictures, explaining How I Got To This Sorry Place.  I look forward to your comments, and also look forward to using Channels in more of my LabVIEW code (I'm not quite ready to tackle the many-hundred-VI LabVIEW RT Project mentioned above just yet ...).

Bob Schor

0 Kudos
Message 1 of 4
(6,211 Views)

Is this appropriate to post to a larger Group?  It isn't a "Question", but rather a "Statement".  I recall there's a site somewhere in Community where something like this, meant as a "How to Do It", can be posted (I may even have done this once), but don't remember the details ...

Bob Schor

0 Kudos
Message 2 of 4
(6,029 Views)

I think this is a fine place to discuss it, but a "How To" is generally in the Documents secion of the community.

https://decibel.ni.com/content/groups/channelwires?view=documents

Of course a How To can have a discussion, and a discussion can have a How To.

0 Kudos
Message 3 of 4
(6,030 Views)

Thanks, Brian.  Within this particular "Channels" group, I'm happy with it in either Discussions or Documents (and am happy, also, to have the Moderator move it to whichever location seems most appropriate).  I believe, however, that this is a Private group -- is there a Public "Document Site" where this could (or should) be posted?

BS

0 Kudos
Message 4 of 4
(6,030 Views)