LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a sequence that exports data at the end of each frame, rather than at the end of the entire structure.

Hi Everyone,

I'm an audio electronics engineer designing an automated test system for digital audio processors.  The main idea of my system is to input various waveforms into the board, and perform processing on the output to determine that the chip is performing well enough (in terms of noise, distortion, et cetera...).  To do this, I have several waveforms that I would like to input in sequence, with the same measurement and analysis going on each time.  Being totally new to LabVIEW, I assumed that this would require a sequence structure.  My initial idea was to have each page of the sequence contain a different waveform to be played back.  On the outside of this sequence structure, there is some analysis going on.  It seems simple enough, right?

I first created a simple waveform generator inside a sequence structure.  Then I passed the important values out the structure to the rest of the system with "tunnels".  I tested this program and it worked great!  The sound plays back and is rerecorded through the sound card, and then simple analysis is performed to determine if the chip passes or fails.  Now I wanted to create a second waveform to test.

However, when I added a second page to my sequence, I was unable to pass the values out on the same tunnels.  What am I doing wrong?  I read the help file and learned that these structures don't pass values until every page in the sequence has completed execution.  That's not what I want.  I want to pass the values out each time an individual page completes execution.

I have searched several forums and read tutorials and the like, but I must be missing something obvious.  In truth, I am an electrical and audio engineer, and sometimes I'm a little dim in the programming area.  Can anyone help?

Thanks in advance!

Brett


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

How about replacing the the sequence structure with a case structure. Then name each case what you want. Right click the input tunnel and select control. This way you can select which waveform you want to test.

Hope this helps.

Now Using LabVIEW 2019SP1 and TestStand 2019
Message 2 of 7
(3,220 Views)
Great, thanks.  I'll give it a shot and post again with the results.
0 Kudos
Message 3 of 7
(3,216 Views)
OK, that got me started...  I'm sure I'll have plenty more questions coming soon, but at least I'm making some progress now!
0 Kudos
Message 4 of 7
(3,204 Views)
hello brett,
you should beeter use a for loop and a case structure. Wire the iteration
indicator (the blue I) of the for loop with the case structure selector.
Wire a constant (2 by example) to the number of loop to process (The blue N
of the for loop).
In the case 0, you can create your waveform at 1000 Hz and in the case 1 an
other waveform by example.
The rest of your code should be in the for loop. use auto indexing in order
to obtain arrays of results outside the for loop.

regards
jerome


"TheSleeve" <x@no.email> a écrit dans le message de news:
1137102073527-310114@exchange.ni.com...
> Hi Everyone,
>
> I'm an audio electronics engineer designing an automated test system
> for digital audio processors.&nbsp; The main idea of my system is to
> input various waveforms into the board, and perform processing on the
> output to determine that the chip is performing well enough (in terms
> of noise, distortion, et cetera...).&nbsp; To do this, I have several
> waveforms that I would like to input in sequence, with the same
> measurement and analysis going on each time.&nbsp; Being totally new to
> LabVIEW, I assumed that this would require a sequence structure.&nbsp;
> My initial idea was to have each page of the sequence contain a
> different waveform to be played back.&nbsp; On the outside of this
> sequence structure, there is some analysis going on.&nbsp; It seems
> simple enough, right?
>
> I first created a simple waveform generator inside a sequence
> structure.&nbsp; Then I passed the important values out the structure
> to the rest of the system with "tunnels".&nbsp; I tested this program
> and it worked great!&nbsp; The sound plays back and is rerecorded
> through the sound card, and then simple analysis is performed to
> determine if the chip passes or fails.&nbsp; Now I wanted to create a
> second waveform to test.
>
> However, when I added a second page to my sequence, I was unable to
> pass the values out on the same tunnels.&nbsp; What am I doing
> wrong?&nbsp; I read the help file and learned that these structures
> don't pass values until every page in the sequence has completed
> execution.&nbsp; That's not what I want.&nbsp; I want to pass the
> values out each time an individual page completes execution.
>
> I have searched several forums and read tutorials and the like, but I
> must be missing something obvious.&nbsp; In truth, I am an electrical
> and audio engineer, and sometimes I'm a little dim in the programming
> area.&nbsp; Can anyone help?
>
> Thanks in advance!
>
> Brett
>
> <img src="http://easy2upload.net/uploads/c435638679.jpg">


0 Kudos
Message 5 of 7
(3,190 Views)
Thanks...  Should one of the structures be within another?  It seems to me the case structure should be inside the for loop?
0 Kudos
Message 6 of 7
(3,187 Views)

Hi Brett,

Yes, the Case Structure should be in the For Loop.  If I understand your original question correctly, take the code in your original screenshot, replace the Sequence Structure with a Case Structure (so you can select which waveform to use), then wrap *everything* in a For Loop so that all the code runs multiple times.  You would probably be indexing the For Loop with an array of something (selections for the waveforms, perhaps?) as opposed to just wiring in a constant to the For Loop 'N' terminal.

Hope this helps,

-D

0 Kudos
Message 7 of 7
(3,176 Views)