Hi all,
The program: I am trying to create a program which takes in a continuous stream of data from an external source. The user can interact with the front panel to do various things such a plotting the data, starting a calibration process, stopping a calibration process, etc.
I have attached a VI which a very simplified example of what I am trying to do.
In this VI, loop 3 is taking that live stream of data and processing it into various doubles, strings, etc. and passes that data via a queue to loop 2. Loop 2 is what does all the logic and display for the program (In actual application, I would have many sub-VI's inside here to do this). Loop 1 is what handles the user inputs. So far, the solution I have been able to come up with is using local variables to take the user input from loop 1 and select the appropriate process in loop 2. This is functional and would work but I am wondering if there is something better.
The problem: How can I do this without using local variables?
- I have considered using an event driven state machine but to my understanding, the issue with that is once a process has started, you cannot do anything until the case returns to the "wait for event" case.
- I could combine loop 2 and 3, get rid of the data1 queue entirely and then use queues to pass the enum state/cases from loop 1. However, the issue with this is that combining loop2/3 would be too much processing for a single loop and would slow the whole program down.
Thanks,
mkhan