LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

switching between different waveforms on the same channels

Dear all,

I want to use certain AO lines of the PXI 6723 board to generate 3 (at least) different waveforns sequentially on them.
I would like to switch from generation of the first waveform to generation of the second one and then the third one at an arbitrary moment of time (upon receipt of a trigger signal).
I wonder if there is a known way to accomplish such task in LabView and is it possible to look at the sample code?

Thanks in advance.


0 Kudos
Message 1 of 9
(4,026 Views)

Take a look at 'Function Generator.vi' that you will find in examples shipped with LabVIEW

I remember modifyingand using it for a similiar requirement

0 Kudos
Message 2 of 9
(3,990 Views)
Thank you!

Maybe my question should be put into more general form:

Is there a way to run two (and more) tasks that use the same channels but different timing parameters (and triggers) sequentially with zero "dead time" between them?

I mean that, for example, I want to output a waveform One with frequency f1 that starts by trigger t1 and then output another waveform Two with frequency f2 that starts by trigger t2 and I want these waveforms to follow each other without any delay and on the same output lines such that when trigger t2 comes waveform One stops and gives way to waveform Two.

I wonder if there is a general way to make two different tasks using same channels run one by one with no delay between them?

Thanks for your reply!

0 Kudos
Message 3 of 9
(3,982 Views)

I wonder if there is a general way to make two different tasks using same channels run one by one with no delay between them?
This will not be possible, coz configuring your task and setting AO channel parameters as per that task will take some finite time.
That would give you a brief period of flat line (if you plot the generated signal on a display unit eg: oscilloscope, you can observe this)
 
The best way to achieve this would be to modify/ change the data ( in terms of pattern, offset, amplitude and frequency etc) that you are writing/generating so that the same/ current running task will generate different waveform with no time lapse between each waveform type.
 
Hope this helps
 
Regards,
Dev

Message Edited by devchander on 11-09-2006 12:07 AM

Message Edited by devchander on 11-09-2006 12:08 AM

Message 4 of 9
(3,958 Views)
Thanks!

This definitely helps.

I think the length of the "flat line time" while changing channel parameters will depend on how fast LabView software runs under Windows.
Is it true? That would be not a cool thing in my opinion .. 🙂
Is there a way to pass the task of reprogramming the chennels down to the hardware itself?
(I guess it is not possible with every board...)

Best regards,
A.M.

0 Kudos
Message 5 of 9
(3,945 Views)

I think the length of the "flat line time" while changing channel parameters will depend on how fast LabView software runs under Windows.
Is it true?
Yes and also how fast the paramaters are set and take effect on your hardware
 

Is there a way to pass the task of reprogramming the chennels down to the hardware itself?
(I guess it is not possible with every board...)

 
Not possible I believe!
 
All the best with your application
 
Any further doubts, do post!Smiley Happy
 
Regards,
Dev

0 Kudos
Message 6 of 9
(3,914 Views)

@ampm wrote:
I want to use certain AO lines of the PXI 6723 board to generate 3 (at least) different waveforns sequentially on them.
I would like to switch from generation of the first waveform to generation of the second one and then the third one at an arbitrary moment of time (upon receipt of a trigger signal).
I wonder if there is a known way to accomplish such task in LabView and is it possible to look at the sample code?



If you can create your waveforms such that they all have the same update rate, you could make a single large waveform with each of your three waveforms and only output 1/3 of it on each trigger. (Timing: Finite samples, number of samples = 1/3 waveform size). You might have to set it up as a Retriggerable Analog Ouput, which requires using counters to gate the analog generation.  (http://digital.ni.com/public.nsf/allkb/1887ABF66B6884C286256B680055F592)
Message 7 of 9
(3,889 Views)
Thanks!

I have one more general question:
How does performance of a program written using LabView compares to that of a programm written in C/C++ (provided both programs realize the same tasks)?
I guess the performance of the C code as well as the LabView one depends much on who is writing it, but maybe there are general 'rules of thumb' and known or 'benchmarks' for comparison?

0 Kudos
Message 8 of 9
(3,839 Views)

The speed of a LabVIEW application relative to one written in C is not really an easy thing to benchmark.  It totally depends on the application (complex algorithms, parallel loops, etc.).  In most applications though, the performance of a LabVIEW application should be comparable to the performance of a C program.

-Justin D

0 Kudos
Message 9 of 9
(3,829 Views)