LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Faster waveform generation switching between case?

Hi,

 

I have a PCI 6251 and I am using this to do waveform triggering based on the input signal.

 

Here is my flow:

Whenever the voltage signal from the analog input is higher than a user defined threshold. the analog ouput will output a square wave of +/-1V with 20kHz. Otherwise, the same analog output should remain idle.

 

I wrote a VI (please see the attachment) with case structure. I used DAQ assitant as the input and output, and passed the signal between two while loop.

 

I am wondering if there is any better module to speed up the one I have attached?

 

Best,

Matthew

0 Kudos
Message 1 of 5
(3,010 Views)
Don't use express VIs. They are inherently inefficient inside loops.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(3,007 Views)

Thanks Mike!

 

May I know what shall I use?

 

Best,

Matthew

0 Kudos
Message 3 of 5
(2,998 Views)
You have an entire palette for DAQmx functions and numerous examples.

Why the separate loops and what is the purpose of the delay?
0 Kudos
Message 4 of 5
(2,977 Views)

Read this excellent White Paper.  If you need more information, go to support.ni.com and look for DAQmx in Tutorials.

 

Bob Schor

0 Kudos
Message 5 of 5
(2,943 Views)