Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

counting anolog pulse using analog I/O module

Hi,

I am struggling to figure out how to get pulses recorded from an anlog pulser. The pulser produces about 5 pulses in a minute (slow) in form of voltage between 5 to 24 Vdc. I need to record the pulses and the time they occur with a increment to every pulse which will record the flow rate in term sof ft3/min or similar units. Please advice how can this be achieved. I could use the count button press uploaded by some one on the forum,  to record the counter in a file. Can anybody help me write the code as I am very new to labview and an stuck in generating the code.

0 Kudos
Message 1 of 6
(4,685 Views)

rajcerc

 

What type of hardware are you considering to acquire the signal?  Typically 5 - 24 V signals would be considered discrete rather than analog, and will have some impact on the code approach.

 

Though not to say you can't use an analog input to read pulses within range, here's an example program.

 

https://decibel.ni.com/content/docs/DOC-10786

 

 

Wayne T. | Application Engineer | National Instruments
0 Kudos
Message 2 of 6
(4,653 Views)

Thanks I figured out some code to register teh pulses and would be thankfull if some expert can have a lood at the consistance of it. I dont have the input signal hence am generating the analog square wave. The attached VI reads the pulses into count. However, few thing that I wanted and I dont have skills yet to achieve is

1. Everytime the VI runs the bool count reset to 1 and starts, how can I make it remeber the last recorded cool count, as this is teh case similar to rotating dial of meter or odometer style.

2. I am not able to get the timestamp with each pulse recorded in a file for multi channel pulse sensor whose frequecies will not be synchronised.

 

Regards

thanks in advance

0 Kudos
Message 3 of 6
(4,645 Views)

Thanks Wayne_T, This VI might work havenet tested as I told you I dont have real signals yet connected to the module. Can you suggest what neets to modify this VI for multi channel input (4 in number) and then writing to a file with time stamp(actual sate and time not relative to start)

0 Kudos
Message 4 of 6
(4,642 Views)

rajcerc,

 

It would probably be worth your time to examine some examples of data acquisition in LabVIEW.  To start with, I recommend opening the Example Finder in LabVIEW and navigate to Hardware Input and Output >> DAQmx >> Analog Input to review how the NI-DAQmx driver is used to acquire data.  This demonstrates how to set up channels, sampling rates, displaying to a graph, etc.  Also, I note you are looking at writing to a file.  Look in the Example Finder for that as well.

 

Have a great weekend.

Wayne T. | Application Engineer | National Instruments
0 Kudos
Message 5 of 6
(4,618 Views)

To "remember" a value, use a shift register. When the loop is run again, it will refer back to the previously iterated value. As for the timestamp, write the time using the timestamp command into the file at the same time you write your recorded value.

0 Kudos
Message 6 of 6
(4,557 Views)