LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automating Testing Procedures

Hi everyone,

 

I'm fairly new to Labview but I have had practice using MATLAB Simulink.

 

I am trying to automate some testing which in principle sounds easy, but i keep running up against walls and my own brain trying to overcomplicate things.

 

What I need to do is:

- Initialise a SigGen and SpecAnalyser with initial values (So far I have them read in from a .ini file)

- Put a frequency signal at a certain power into my hardware, put results into a table

- Repeat by +1 dB until 85% then 95%, Put results in table

- Then +10 dB, put results in table

- Repeat all above at a different frequency

- Repeat all above with a different signal

- Repeat all above for a different frequency band.

- Put all results into an excel file

 

I think i am going to need a bunch of while loops within each other.. but I also think using a flat sequencer or even an event case could do the trick.. 

 

What would people recommend as i am kinda trying to do all three and im getting into a muddle

0 Kudos
Message 1 of 7
(3,615 Views)

Two words....state machine. 

aputman
Message 2 of 7
(3,608 Views)

You're trying to validate or characterize a semiconductor DUT. Unless you need a fancy GUI or application, you can easily get away with a single VI implementation like you mentioned a bunch of loops sequenced in order to test.

 

I would not recommend a State Machine unless you have some sort of UI interaction. Of course, if you need to contain the test code in a small space, you can use an Iteration state machine, which is very simple, iteration terminal of while loop is tied to case structure terminal, in the default case wire true to stop looping, implement you code in all other cases and will be executed in the order of case numbers.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 3 of 7
(3,593 Views)

@RobJ95 wrote:

Hi everyone,

 

I'm fairly new to Labview but I have had practice using MATLAB Simulink.

 

I am trying to automate some testing which in principle sounds easy, but i keep running up against walls and my own brain trying to overcomplicate things.

 

What I need to do is:

- Initialise a SigGen and SpecAnalyser with initial values (So far I have them read in from a .ini file)

- Put a frequency signal at a certain power into my hardware, put results into a table

- Repeat by +1 dB until 85% then 95%, Put results in table

- Then +10 dB, put results in table

- Repeat all above at a different frequency

- Repeat all above with a different signal

- Repeat all above for a different frequency band.

- Put all results into an excel file

 

I think i am going to need a bunch of while loops within each other.. but I also think using a flat sequencer or even an event case could do the trick.. 

 

What would people recommend as i am kinda trying to do all three and im getting into a muddle


I have to agree this screams State Machine...

 

Also if you ever, EVER, find yourself thinking a Sequence Structure (Stacked or Flat) is the way yo do it...

 

THINK AGAIN! Because except for a very few limited cases a Sequence Structure is never the right way.

 

Take the tutorials and remember "Think Data Flow" 

 

I also must add: Contrary to what santo_13 said: I have been programming LabVIEW for over 20 years and find myself using a State Machine architecture probably >%95 of the time, Be it a Simple, Event driven, or Queued state machine. Honestly if you understand how they work even the Queued Message handler and the newer Channeled Message Handler design patterns are just fancy State Machines.

========================
=== Engineer Ambiguously ===
========================
Message 4 of 7
(3,590 Views)

Thanks for the responses.

See I agree, I think its a State Machine too because I want it to do "Test" and then once "Test" is done, to move on to "Test2" and etc.

 

I think I now just need to get my head around building it and once that's sorted i should be okay

 

I do need a simple UI, at the moment it initilizes the default values and creates an excel file. I'll add a "Start Test" button which will (for now) be all the UI needs to do.

0 Kudos
Message 5 of 7
(3,573 Views)

Check out the JKI State Machine on VIPM.  If you choose to use this template, it would be worth your time to study how it works, turn on "Highlight Execution" (light bulb mode) and observe.  

aputman
0 Kudos
Message 6 of 7
(3,564 Views)

For a test sequencer, I also will use a State Machine.  Though, my test sequences use what I will refer to as a Queued State Machine.  The idea here is that I use a queue to state what states to call.  This allows me to enqueue many states all at once.  This also really helps me in that it is easier to break up a "Test" into many steps (states).  I also took some ideas from the JKI State Machine and allow parameters to be included with the enqueued states, allowing even more reuse in your states.  I have my own library I wrote specifically for this.



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 7 of 7
(3,561 Views)