From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Channel Wires

cancel
Showing results for 
Search instead for 
Did you mean: 

Jeff K Presents Channel Wires (LV 2016)

In this hour long presentation, Jeff Kodosky presents an introduction to his most recent innovation in LabVIEW: Channel Wires. Come hear Jeff as he walks us through his motivations behind creating the higher level abstraction for asynchronous communications between independent actors as well as gives us the basics on how to use them.

Message 1 of 4
(7,346 Views)

This was a wonderful presentation, but also a tad "dangerous".  After reading it, and getting my hands on a "newer implementation of Channels" (my earlier post, entitled something like "I Drank Jeff K's Kool-Aid", was yanked for violating NDA), I actually tried using Channel Wires in some existing code.

It felt a little strange, but I'm now a convert!  The ability to signal "This is the last element" on a Stream, or "That last one was the last element" (which you can do by setting the Valid? input to False and Last? to True) really neatly handles sychronized stopping of Producer/Consumer loops.  Similarly, Tags not only can replace Globals, they also make terrific Notifiers.

One thing I noticed is that because Channels don't have Error Lines associated with them, several of my loops (including, for example, the Event Loop) got smaller as no Error Lines were needed.  Really cool.

So here's a Question/Request.  In the presentation of the Message Channel, Jeff referred to the Message Class, and I didn't really understand his point.  I think an expanded example discussing the Message Channel with special reference to the Message Class would be very helpful.

I have been using Messages (my Main loop is often a CMH = Channel Message Handler, but my Message is the "old-fashioned" cluster of Message + Variant Data.  I do know that one can replace the QMH with the Command Pattern (I've taken a sip from AQ's Kool-Aid, but haven't imbibed quite as deeply).  Expounding on how (and why) we can use the Message Class with Message Channels could be a real eye-opener.

Bob Schor

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

The 2015 messenger channel was clunky. It's hard to have any discussion about why you should use it. 🙂 But LV 2016 has at least two and I think three rich examples of the messenger channel. If you're in the beta, please check those out and comment in the beta forum.

For those outside of the beta program, the messenger channel is a channel where the data elements have a bit more "sentience" than just being dead data. The elements in a messenger channel are messages, each one a coherent entity with its own context. Messages can be meaningfully combined because they define their own merge behavior. They have a unique ID that can be used to acknowledge the receipt of a message. They are FIFOs like the Streams, but they are intended to handle broadcasts and/or multicasts (many senders, one receiver), unlike the Streams.

Does that make sense?

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

Yes, makes sense (and I'm having fun replacing QMH with CMH).  However, at 11:21 in Jeff K's presentation, he's talking about using a Messenger with a Message Class. "Being class-based, the Messenger Channel can implement some interesting capabilities, such as Merge".  What?  There's an intriguing Demo that flashes by, something mysterious is going on, and I'd very much "like to know more", including --

  • What happens when (Messenger) Channels transport Objects, as opposed to non-OOP LabVIEW constructs?
  • What additional capabilities emerge from such a combination?
  • Is there an implementation of the Command Pattern that uses Messenger Channels, for example?  Any demos to inspect and test out?

Bob Schor

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