LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

controlling a testing procedure in labview

I have a test procedure which makes use of state machine approach.I want to give the user options such as:

 

"run":for starting the test

"pause":for pausing the test

"resume":for resuming the test run from paused state

"abort":for aborting the test

 

All the above options are given in the customized run time menu bar.Currently I am using a producer-customer approach wherein 1st while loop keeps track of menu items(user selection) & 2nd one is for running the test(has test state machine inside it).

 

Any ideas on how to implement the above control features efficiently in the testing procedure?

 

Thanks

0 Kudos
Message 1 of 14
(2,907 Views)

any suggestions guys??

0 Kudos
Message 2 of 14
(2,878 Views)

So, what is the problem?

 

you have a producer where the user events are tracked. when a menu option is selected, your producer would detect the event. will it pass the event info to the consumer and how?

 

you have the consumer which has a test procedure running. so, when the producer sends the event info, execute the corresponding states!

 

please give details of the issue you are facing. if you want design help, then post the code (LV 2010 or lower) so that we can tell you how to improve.

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 3 of 14
(2,865 Views)

TestStand?

 

...or, add an "Idle" state to your State Machine and let your UI producer loop enque trips there to the front of the queue on a 'pause' command.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 4 of 14
(2,857 Views)

TestStand is a good hint 😉

 

Using LV, the state machine must be "self-feeding" to act as a sequencer. You can add a logic after each case (within the loop, outside the case structure) to query for "pause". If it is pressed, backup the "next state" (additional shift register) and replace it with "idle" as next state.

If the button (toggle as pause/resume) is unpressed, restore the backuped "next state".

 

Using producer/consumer complicates the query a little since you have the queue as "next step" storage, but the approach is 'transferable'.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 14
(2,847 Views)

i have used global var to control test sequence, before the execution of next step its checking if pause is active, its not best way to do it. Test sequence is inside for loop connected to array where all seetings are. It works fine so far.

 

0 Kudos
Message 6 of 14
(2,825 Views)

I am using following method for my VI:

 

undefined

 

In this the lower while loop has the state machine instead of the "inner while loop".I want to know how I can implement "pause" & "resume" features in this. Is there any way to make it more efficient by using dynamic events, queues etc. coz I can see most of the producer-consumer examples are based on these approaches.I am new to LV so I exactly dont know how can I apply those things here. 

0 Kudos
Message 7 of 14
(2,791 Views)

One more problem that I encountered while using the above method is that the consumer loop has to be executed only once in order to execute the test state machine.For doing this, I am using "run" variable value to stop the main loop of consumer.By doing so the vi becomes unresponsive to the "run" menu item after single execution of the test and thus I have to stop the vi and re run it for running the test for the 2nd time. Any suggestions to solve this problem??

0 Kudos
Message 8 of 14
(2,770 Views)

Can you attach your code in 2009 version.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 9 of 14
(2,766 Views)

You do not use the producer/consumer architecture. You are using a simple two loop architectures which is using local variables for data transfer.

 

You should rework your VI to match a real producer/consumer.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 10 of 14
(2,756 Views)