08-13-2012 11:48 AM - edited 08-13-2012 11:48 AM
hi,
I might have been asking few times about ramp and still have things to ask 😄
In attached VI I have 2 ways of generating the same ramp, but I found that the first one executed faster than the second one (inner loop has more data per iteration).
The question is, if I'm using the same configuration of DAQ devices, would this both ramp generations finish at the same time?
Regards,
Yan.
08-17-2012 03:57 AM
Dear Yan,
I've taken a quick look on your LabVIEW VI. May I ask you to summarize a little bit your application and which Multifunction DAQ device do you utilize? What do you want to control with the ramp and sawtooth waveform, you are generating? Therefore I could get a better understanding on what you want to do?
Because from my point of view, it would be easier to use the LabVIEW Waveform Palette Functions: http://zone.ni.com/reference/en-XX/help/371361H-01/lvwave/waveform_generation_vis/
Concerning your question, why the second loop (below) executes slower than the first one is, because the inner loop (N connector) in the lower loop executes 4 Mio times and the above loop executes only 2 Mio times.
I've prepared a small example VI with the mentioned Waveform (WF) Palette VIs to demonstrate the usage. The advantage of those WF-VIs is that they could be directly connected to DAQmx Write functions ;-)!
I'm looking forward to your response!
br
Wolfgang
08-17-2012 09:15 AM
Hi Wolfgang, thanks for your response and I really appreciate your effort to provide example, but since I'm using LV 2010, its too bad I can't see your VI in my Labview.
I'm using PXI 6733 to generate analog signals. I need to generate ramps/sinewaves/DC using multiple channels at the same time, with controllable parameters for ramp (min,max,time,delay start) and sinewave (freq,cycles,Amplitude,delay start).
The datasheet of 6733 (page A-2) says, I can generate and update signals about 750 kS/s using all 8 channels simultaneously. But when I build my ramp or sinewave using my messy VI, I keep getting problem with generation (memory problem). I'm trying to generate with (2^19 = 524288) samples for one shot, its ok. But when I increase my samples (2^20 = 1048576), somehow it wouldnt work (eventhough I'm using longer generation time, ex: 2 million samples for 4 seconds generation). So I think I need to modify my generation, so that I can buffer my generation, and it wouldnt be generated all at once in one time. That's why I think to "divide" my signal generation.
Concerning your question, why the second loop (below) executes slower than the first one is, because the inner loop (N connector) in the lower loop executes 4 Mio times and the above loop executes only 2 Mio times.
And actually, if you see the structure closely, I'm using inverter at the input of N1, which means, the inner loop of the first one execute 500k times and the outer loop execute 2 times only.
Meanwhile the second one, the inner loop execute 250k times and the outer loop execute 4 times. Like I said, Ramp 1 and Ramp 2 have the same array size and same elements.
So, if you look at my VI screenshot, I was thinking to split my generation into 1 second iteration instead all at once (and it should be able to generate about 750 kS/s from the datasheet). And I thought I can generate my signals per iteration using the VI that I upload earlier in the first post.
Sorry if you might get confused, but what I'm trying to achieve is, how can I generate my signals (with its input parameters), with more samples than 2^19 samples. How should I "split" my signal generation, so that the device PXI 6733 would generate for me 4MS pro channel in 8 seconds (just for example).
Regards,
Yan.