Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

measure pulse width and generate pulse depends on the width

Hi,
 
i have a serias of pulses ... 600 micro,30 micro,30 micro (around 10 times) ........ nothing for 1 mili second ..
 
so i need to generate a pulse after the first pulse arrives ... (its width around 600microSecond)
1. use the first counter to measure the pulses ...
2. if arrived pulse ... 500microSecond<the pulse width<700microSeconds .... then generate pulse with second timer ....
 
the problem is that i dont want to use the while loop inside the labview ...
can i programm the counters to make the width calculation and if the width is bigger to generate trigger to the second counter .... ?
 
the hardware is 6014 sample card ....
 
thanks
gena
 
(see attached)
0 Kudos
Message 1 of 2
(3,592 Views)
Hi Gena,

I am assuming you are using the DAQmx drivers in LabVIEW for your PCI-6014.  Avoiding a While loop may be difficult if you need to perform this measurement many times and you might not know when the signal is going to begin.  Without a While loop, you'll have to set up your timeout period long enough so the pulses will begin before your VI stops.

With this in mind, you may want to look at some of the shipping examples with the DAQmx driver.  You can find these in LabVIEW's Help menu by going to Find Examples.  For measuring the pulse width, browse the folders in the Example finder by going to Hardware Input and Output>>DAQmx>>Counter Measurements>>Period or Pulse Width.  In this folder, there is the Meas Pulse Width.vi, which measures the pulse width once and stops.  You should be able to take the pulse width measurement you get from here and check to see if it's in your range, then output a pulse on the other counter if it is in the range.  The pulse output examples can be found in Hardware Input and Output>>DAQmx>>Generating Digital Pulses>>Gen Dig Pulse.vi.

Thaison V
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,569 Views)