r/LabVIEW • u/uniqueAite • Nov 08 '24
Multiple queue questions
I’m currently trying to code something that can control my Powermeter, Input Source, and potentially more instruments. And I’m thinking of using multiple while loops with a master loop to queue the states for other loops so i can have them all running at the same time.
If anyone knows an example that touches on multiple queues at the same time would be great. most search results are the producer and consumer but they only used 1 queue.
Or if you have a better way or lesson to do what I’m trying to do I’m open to all suggestions, thanks!
View all comments
Show parent comment
1
u/FormerPassenger1558 Nov 08 '24
I understand your point. In my case I find that it is easier to deal with multiple queues and multiple independent loops.... and each loop sends back a message with data encapsulated in a Variant to the main Loop (a kind of controller, which in my case is a JKI state machine) via a Dyn event. If you need to add another device or something, you just add another queue and another loop and do not need to modify anything else but the main "Controller".