10-25-2012 01:34 PM
I have a question about the producer/consumer event structure:
I have attached a picture of (a portion of) my block diagram (it's rather large...) to give you an idea of how this program will be set up. It uses a producer/consumer events structure. I have also attached a picture of the front panel.
On the front panel, the 2 things to note are the tab structure and the set of controls on the right of the tab structure.
The idea is that clicking the "click to start" button will run whatever test you have selected with the tab control, so if you are clicked on "Exploratory" like it is shown in the photo, the exploratory routine will run - the tab control defines the main case that will execute in the consumer loop - typically a frequency sweep.
I want the controls to the right of the tab control to directly control the instrumentation by sending a 1 time line of code to the machine. I have done this by creating a seperate event case in the producer loop for each control, that will send the desired line of code.
What I want to know is, will those controls (to the right of the tab control) still work while one of the consumer cases is running - aka will I be able to execute a visa write in the producer loop while the consumer loop is busy doing its thing? I am nowhere near finished with this program to a point where I would be able to test it, so I want to make sure I am not going down a path that is going to bite me later on. One of the tab cases (the endurance one) will have a 2 hour run time (and someof the others will be similarly long) and I want to make sure that the user still has use of the basic functional capabilities over the machine while the test is running.
Solved! Go to Solution.
10-25-2012 01:57 PM - edited 10-25-2012 01:59 PM
@LarsUlrich wrote:
What I want to know is, will those controls (to the right of the tab control) still work while one of the consumer cases is running - aka will I be able to execute a visa write in the producer loop while the consumer loop is busy doing its thing?
That is one of the points of the Producer/Consumer. Yes, you can still send out your VISA commands in the producer.
As a side note, you really should pass your queue reference through all of your event cases. You will lose your reference if you don't.
10-25-2012 02:04 PM
Thank you and yes I will do that! I created that event case real quick (I will probably put that stuff in a sub.vi) and forgot about the que reference.