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: 

how to setup a queue with a multiple unit tester

Hello,

 

I am working on an automated tester for some units that my company manufactures.  I have all the code down for a test in the first position out of two positions.  I don't want the units to test simultaneously i want it to wait for unit 1 to finish before unit 2 starts vice versa.  Does anybody know the easiest way to achieve this?  I have only done single unit testers in the past so I have no experience working with queue's.

0 Kudos
Message 1 of 21
(2,891 Views)

Are you working with any DAQ hardware?  You shouldn't need to use queues to get software to execute in a certain order, you can just run the error line through your functions or use a flat sequence strucuture.

0 Kudos
Message 2 of 21
(2,874 Views)

If you really want to use queue's maybe you could enqueue a cluster. In the cluster you'd have an enum for the states and another enum to indicate which fixture to run. That way you can switch the fixture enum when the first unit is done testing. Does that make sense?

 

But, without knowing more its hard to say what you should do. 

0 Kudos
Message 3 of 21
(2,870 Views)

I am using daq ni usb-6501 to be exact, I am not having trouble with the order of operations of the test itself.  I have 2 buttons 1 to start each positionl, I want to be able to press them both, but have the tester wait until the first unit that is testing is finished.

0 Kudos
Message 4 of 21
(2,862 Views)

Edit: Misread post, this comment was not applicable.

0 Kudos
Message 5 of 21
(2,850 Views)

THis can be done explicitly or implicitly.

 

Inplicit

 

Wrap the entire test in a non-reentrant VI (this is the default) that is used by both of the stations. Since the VI is not reentrant the second will have to wait for the first to finish.

 

Explicit

 

Use a semaphore that must be acquired prior to starting a test and is realeased afterwards.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 21
(2,846 Views)

Almost, I want the operator to be able to have both start buttons pressed, but not have the second unit do anything until the first unit is done and ejected.  While unit 2 is testing the operator can then load the tester with another unit in position 1 and press start, then repeat when position 2 finishes.  We don't want to pay an operator to sit and wait, we want them moving all the time for max efficiency.

0 Kudos
Message 7 of 21
(2,842 Views)

What is a non-reentrant vi?

0 Kudos
Message 8 of 21
(2,836 Views)

its is a VI that can only be run in one thread at a time.

 

I wrote more on that topic in the second post in this thread where I talk about "The Traffic Cop Behind the Scenes".

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 9 of 21
(2,833 Views)

Ben,

Maybe you could help me solve my other problem, In my code, i have my vi setup with 2 while loops.  I only have the code written for the first positon.  I have only been programming labview for about a year now.  How do I setup buttons to run my vi?  I have just been using 2 button dialogs in a case structure which is in the second while loop.  I have the output of the dialog wired to the stop of the small while loop.  When true is pushed it stops the small while loop and re-runs everything in the large while loop.  I tried putting everything in a case structure with a ok button attached to the question mark but that did not work.  See attached vi, ill take any critism that i can get.

0 Kudos
Message 10 of 21
(2,826 Views)