The Event Messenger Channel, "formally" introduced in LabVIEW 2017 but available as a "Beta" in LabVIEW 2016, provides a useful (if probably under-used) way to provide Channel "Feedback/Input" into a LabVIEW Event Structure. However, there are some "missing Name pieces" that are inconsistent with the naming of "ordinary" User Events (and an interesting internal inconsistency with those Ordinary User Events that I didn't discover until wrestling with these issues involving the Event Messenger Channel).
This Snippet shows two User Events:
The two RefNums are put into a Cluster to allow the two Refnums to be bundled by name and wired to the Event Loop's Dynamic Event Terminal. Note that the Cluster Names take the names "OK" and "Stop" given to the Refnum Constants used to created the Named Cluster. [It's much less "interesting" if you use a simple "Bundle" and partially lose the ability to Name That Event].
Event Messenger User Event
When you go to choose the Event for the Event Case, you get the following Event Sources:
Event Sources
Note that the Event Messenger User Event, named OK, with a variable named Go, has no "identifier" in the list of Event Sources, only <channel value>. Indeed, if there were several Event Messenger Channel Wires bundled together, all given different names, they would all appear in this "Selection" Screen with identical names, but referring (unbeknownst to the Developer) to different Channels. Note that in the Event Structure, itself, this Event is listed as <OK.channel value>, so it is at least (in the Event Structure) picking up the name the User gave to the Event Reference.
The other User Event Case (for a "normal" User Event), uses both the name used to create the User event (here "Go") and the name used for the Event Registration Refnum (here "Stop"), creating an Event Source named "Go" (the User Event name) and an Event Structure label of <Stop.Go>. I'd "discovered" (don't remember how I learned this) the trick of putting a Label on a Constant used to Create User Event to "Label" the User Event in the Event Structure, and learned the trick of creating labeled Event Registration Constants and bundling by Name to (partly) create named Event Messenger Cases from the Event Messenger Example files (thanks, AQ or whoever developed these Examples).
Stop/Go Event Case
I'd like to suggest that, at a minimum, <channel value> be replaced with the label, if present, of the variable used to create the Channel Writer. The quirk whereby an "ordinary" User Event can get two names (as in Stop.Go), one from the Create User Event, the other from generating the Registration Refnum, probably shouldn't be touched lest other code breaks, but it is amusing ...
Bob Schor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has not received any kudos within a year after posting will be automatically declined.