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: 

Producer/Consumer question

Solved!
Go to solution

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.

Download All
0 Kudos
Message 1 of 3
(2,483 Views)
Solution
Accepted by topic author LarsUlrich

@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.

GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 3
(2,471 Views)

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.

0 Kudos
Message 3 of 3
(2,459 Views)