05-08-2012 09:13 PM
Funny enough, I couldn't find the example again either. Anyways, I found this one instead:
Count Digital Events with DAQmx
05-09-2012 03:54 AM
I am a little bit confused, why you want to use the 4-20 mA as digital signal and you want to count it?!!
Why you do not use it as analog signal and scale it to the range of your flowmeter?
it seems that the PXI-6238 has 0-20 mA AIs,
05-09-2012 05:20 AM
@Zekasa wrote:
I am a little bit confused, why you want to use the 4-20 mA as digital signal and you want to count it?!!
Why you do not use it as analog signal and scale it to the range of your flowmeter?
it seems that the PXI-6238 has 0-20 mA AIs,
The output of the flowmeter is according to the first post just digital pulses he want to count 🙂 no need to waste an analog input.
To measure the flow with a counter, there are different ways to do it:
Measure with two counters N pulses during M timeticks -> most precise for frequency , however I expect the flowmeter is in a 1% class,
@Measure with one upcounting counter, read the value every second (with 32 bit counter @ 2kHz it will take some time for roll over ) and calculate the flow during one second/minute and have the total massflow 🙂
I would start with 'Count Digital Events.vi' and switch to 'Count Digital Event-Buffered-Continous-Ext Clk.vi' when I need to read analog signals in sync (using the analog sample clock as Ext Clk).
Both vi should be found at Help->Find example-> Search 'Count'
(Maybe you need to add your Hardware ... )