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

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing queue reference to a subvi using queue message handler

You can ease on your string reference worries by cleverly utilizing the properties of typedef enums and the "format into string"-function 😉
Best regards,

Jarle Ekanger, MSc, PhD, CLD
Flow Design Bureau AS

- "The resistance of wires in LabVIEW is not dependent on their length."
0 Kudos
Message 11 of 12
(525 Views)

@JarleEkanger wrote:
You can ease on your string reference worries by cleverly utilizing the properties of typedef enums and the "format into string"-function 😉

Or by not using them.

 

Putting the Obtain Queue, with attached name constant, in a sub VI also makes it (a bit) better...

 

Finding the references is just one of the problems. Name collision is another. I've seen "frameworks" fail, because someone created a VI named "main", and the framework used VI names as (totally redundant) named queues. Of course there was another (totally redundant) queue already using "main".

 

In sort, it's causing more problems then it solves. And they can almost always be avoided. Avoiding it will almost certainly result in better data flow. Having to connect a wire might seem annoying, when you can simply use a string to get access, but those wires make your program a lot more readable.

 

But suit yourself. I've seen it go sour too often.

0 Kudos
Message 12 of 12
(519 Views)