From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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

Is this your top level VI or just a VI to control what to do next? If its your top level VI you shoudl convert it to a State Machine. Otherwise, force program execution with the error line and SubVIs, not a sequence structure. Sequence structures are not very scalable and they take up a lot of block diagram realestate. 

 

Making that change will help making what you are tryng to do easier.

Message 11 of 21
(902 Views)

Okay, I set it up as a state machine, now how do I create a button to start the vi without having to use the 2 button dialog boxes?  See attached.

0 Kudos
Message 12 of 21
(892 Views)

HAve you used an event structure before? I think this will be your best bet to get your state machine running without the two button dialog box. Instead of polling for an input like you are doing, it uses event driven programming. You can set up a boolean called "Start Tests" and monitor for a value change on that boolean in your event structure. Then, based on what button is clicked, you can enqueue the proper states and take the proper action. Article on event driven programming: http://zone.ni.com/devzone/cda/tut/p/id/3331

 

Your event structure will live in a "Monitor" state where you monitor for inputs. Maybe you'll set it up so that you have a "Test 1" and "Test 2" case. When the "Test" boolean is clicked you'll go to the Test 1 case, and then go to the test 2 case. And then back to your monitor case. Maybe you'll save your data in which case you'll go to a Save Data state after Test 2.

 

Does that help/make sense? 

0 Kudos
Message 13 of 21
(888 Views)

Yes, but don't you need to have the full developement system to use event structures?  I am using base developement!

0 Kudos
Message 14 of 21
(886 Views)

Oh... you're right about that. Maybe you can just poll a boolean called "start test" and watch for a value change through the polling. To know if the last unit passed or failed you could use a pass/fail boolean instead of using the dialog. 

0 Kudos
Message 15 of 21
(881 Views)

Thanks for all your help

0 Kudos
Message 16 of 21
(874 Views)

I think this is more like what you want as you discussed. This uses semaphores.

0 Kudos
Message 17 of 21
(858 Views)

Thanks

 

0 Kudos
Message 18 of 21
(856 Views)

I think I got everything all figured out now thanks, I didn't end up using a queue or semiphore!  Feel free to check it out.

0 Kudos
Message 19 of 21
(851 Views)

Would love to, but I am currently using LabVIEW 9.0. Can you save it for earlier version?

0 Kudos
Message 20 of 21
(849 Views)