LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to continuously append Waveform in while loop ??

Hello every one! I'm stuck, I tried almost everything, this looks simple  task I can't get it working.

 

 I have a While Loop, which generates each time equal Waveform portion, I want for example run this loop 3-4 times and output appended Waveform with all data.

 

 

 I can't just copy, because every loop iteration "RAMP Pattern" will generate other portion of data. For example first loop iteration: Ramp generates from 0 to 2 (duration), next iteration RAMP generates from 2 to 4 (waveform duration). Sampling are equal and durations. I want do this because - this way I can avoid very very BIG array processing, splitting array processing to small parts

I think it will increase performance of my VI. 

 

 How to do this? Please help

 

 I attach my VI below.

 

 

 

0 Kudos
Message 1 of 6
(4,840 Views)

Well, this is all backwards and you are making a few mistakes.

 

  • You know the number of iterations, so you need a FOR loop instead of a while loop.
  • The inner FOR loop always calculates the same thing, so it does not belong inside the outer loop. One run is enough!
  • You should built the array as DBL and make it into a waveform at the end.

 

I no longer have LabVIEW 7.1, but here's a quick draft. It would be slightly more efficient to initialize the final sized 1D array once and then use "replace array subset" to insert the data N times. Modify as needed.

 

Message Edited by altenbach on 06-07-2009 10:44 AM
0 Kudos
Message 2 of 6
(4,830 Views)

Hi altenbach!

 

I think I explained my problem unclear.

 

I want continuous synchronized output. - This means VI produces new signal portion - just at time and phase when it previously finished.

 

I found this implementation in LabView function "Basic Function Generator.vi", so now I know how to synch up timing.

 

But I don't know how to synch with phase, because VI uses Call library Node.

 

Here I attach block diagram with highlighted point which i'm interesting at.

 

 

 

 

Synchronous_Output.JPG

0 Kudos
Message 3 of 6
(4,815 Views)

 

I'm close to a solution, I think I've synchronized phase and timing, but I missed something,

 

because there is strange trebble sound 

0 Kudos
Message 4 of 6
(4,811 Views)
What is interesting:  when I set Duration to 1 instead of 0.04 (for Generator 1) the trebble sound disappear, but I need to use short time
0 Kudos
Message 5 of 6
(4,809 Views)
any ideas ?
0 Kudos
Message 6 of 6
(4,742 Views)