LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to detect signal pulse and produce output (based on no. of pulse)

hello..
i facing problem to write the code (labview) for detecting a Pulse signal.
And output will be produce immediately based on the number of pulse detected within a duration.

there will be 4 cases:
1st case is one pulse detected produce a specific output.
2nd case is two pulse detected produce a specific output
3rd case is three pulse detected produce a specific output
4th case is four pulse detected produce a specific output




The attached picture is the picture of the signal.
0 Kudos
Message 1 of 3
(2,511 Views)

Hello! Naturally you would need a counter, but I'm not clear what kind of pulses you have got. I mean, are these pulses external (like from a circuit)? And if so, how are you communicating them to the PC (DAQ, parallel port, etc)? If you're using a DAQ, you'll need to use the counter (check the Automation Explorer) for help.

Now if the pulses are in the same software (as in a button in the front panel) a simple program will do the trick. I send you an attached program that may be of help to you. Pleas specify if your pulses are external so a different approach can be suggested.

Ali



Message Edited by Ali84 on 01-07-2008 02:26 AM
0 Kudos
Message 2 of 3
(2,485 Views)

Hello,

What type of hardware are you using to acquire the signal?  Are you using a non-National Instruments board?  Either way, as stated above a counter application sounds desirable for this type of application.   This would require some type of DAQ equipment with a counter channel. 

I would suggest using an Event Counting Task with a DAQmx counter input.  The LabView Help has an Example Finder under the Help menu.  This Example Finder groups all the shipping examples.  In the Example Finder under the Browse tab, open folder titled Count Digital Events located under <Hardware Input and Output> <DAQmx> <Counter Measurements>.  These examples should be helpful with your application.  Please also refer to the links below to learn more about Event Counting.  Please note that Event Counting will continue to increment the count register for all edges of the signal.  You would be interested in resetting the count register after each case. 

Buffered Event Counting

 

Samantha
National Instruments
Applications Engineer
0 Kudos
Message 3 of 3
(2,448 Views)