04-10-2019 09:27 AM
Hi,
I am a basic labview programmer here. I would like to ask how do I integrate queue operations together with the calling of sub-vis for a school project. I am tasked to use queue state machine (queue operations) instead for a project displaying on a LCD display. (Ie. When a feeder switch is pressed, LCD display changes from press button to dispense food >> Food dispensing) How do I approach this problem of integrating sub vis together with the queue operations? Do give me some advice... Attached here is the image of my block diagram.....
04-10-2019 10:41 AM
I feel like I need to get some clarification here. What exactly do you mean by "Queued State Machine"? I only ask because there has been some radical changes in terminology over the last 5-10 years. What used to be called a Queued State Machine is now properly called a Queued Message Handler (similar to a Producer/Consumer, but with messages to do something instead of a stream of data to process). Now a QSM is a State Machine that stores its states in a queue.
If you really want a QSM, then I recommend you have a good look at the JKI State Machine, which is essentially a QSM but with the states stored in a string instead of a queue. But the JKI State Machine will give you most of the concepts you need to do a QSM.
04-10-2019 08:43 PM
Hi Crossrulz,
Appreciate your suggestions here. Sorry for not being clear here. What I meant was that if I could use queue operations for my project instead such as using functions as flush queue,dequeue and enqueue in this vi. But the problem is that I have used sub vis to call for the LCD Display instead and I am quite lost in using such queue operations when I am tasked to do so. Any advise or suggestions on this? Thanks..
04-10-2019 09:15 PM
Here's a challenge -- let LabVIEW teach you about Queued Message Handlers! Open LabVIEW, in the Getting Started screen choose New Project, then choose Queued Message Handler (and step back, Magic is about to happen ...). Choose a Name for this Project, click "Edit Overlay" and at least color (or write in) the little box, click Finish, and when the Project opens, click on Main to see the Queued Message Handler example.
Don't panic! Head over to Documentation and open the HTML "Queued Message Handler Documentation" that NI thoughtfully provided. Spend some time reading, and don't be afraid to "play" with the code.
Bob Schor