10-07-2016 10:53 AM
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
10-07-2016 10:56 AM
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
10-07-2016 12:22 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-07-2016 02:55 PM
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