Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Display rpm by acquiring digital TTL signal using NI 9401 counter

I am using one hall sensor on a rotating shaft to generate pulse signal. This signal is fed to one of the DIO channels on NI 9401 Counter module which sits in slot no.6 of cDAQ 9172.

My objective is to display rpm of the rotating shaft. Also, I need to pull this digital signal(from PFI0) on an another channel(PFI1) of the module in form of output. Can you guide me through the steps on the VI. I having been trying since a long time using DAQ assistant, but with no result.

Thank you.

Also, can you tell me how can I achieve this using signal express? 

0 Kudos
Message 1 of 19
(15,088 Views)

I'm curious how you are configuring your DAQ Assistant.  You should be able to choose Aquire Signals»Counter Input»Frequency and it will give you directions on configuring your device from there.  If you are looking to do this in Signal Express you would just "Add Step»Counter Input»Frequency".  How have you had yours configured in the past and what other specific questions do you have?  Hope I can help!

aNIta B

0 Kudos
Message 2 of 19
(15,049 Views)

Level:-  beginner. 

 

The experimental set up is as follows: -

A hall sensor is sensing a magnet attached to the rotating motor shaft. The sensor's pulse signal is acquired as an input by means of NI 9401 counter module inserted on cDAQ 9172. The hall sensor is attached to DIO1 (ctr0)

I am able to display the rpm very correctly now using the following vi in Labview 8.6.

However,the rpm display is very instanteneous and at displays at every count, which means it does not show a stable rpm at all, even when the rotor rpm is set constant.

Myrequirement is : - to display a stable value of rpm. Can you guide me how I can achieve this?

 

I thought upon the logic of using a loop. let say the sample rate be 1k. The loop will read the samples from the DAQmx, and its definition should be such that it shall give out value every 1000th instance. This is to be fed to the rpm indicator guage. In that way,I get a constant rpm display for every 1 second. I am unable to implement it though so far.

 

please look at my attached vi and let me know what changes I have to do to incorporate a loop

 

Download All
0 Kudos
Message 3 of 19
(15,044 Views)

If I am understanding you correctly, I think one way to do it would be to do as I set it up in Picture1 (attached).  Another way of doing this would be to use the Counter»Multiple Samples option on your DAQmx read, reading in 1000 samples and then taking the average of those 1000 samples.  This way, you'll see less "jumpy" readings because it will be taking an average (see Picture2 to explore how you could go about doing this).  Happy Programming!

aNIta
Download All
0 Kudos
Message 4 of 19
(15,016 Views)

If you have a rotating machinery and you want to measure the speed accurately (during run up, run down and constant speeds), you have to use buffered edge counting technique and use OAT Digital tacho VI avaialble with Order analysis toolkit to convert the tacho counts to speed.  For buffered edge counting you can use the example VI...

 

C:\Program Files\National Instruments\LabVIEW 8.6\examples\DAQmx\Counter\Count Digital Events.llb\Count Digital Events-Buffered-Continuous-Ext Clk.vi

 

If order analysis toolkit is not available, then I would suggest you use this example VI to measure frequenc and convert the frequency to speed as you have done.

 

C:\Program Files\National Instruments\LabVIEW 8.6\examples\DAQmx\Counter\Measure Digital Frequency.llb\Meas Dig Freq-Buffered-Cont-Large Range 2 Ctr.vi

 

This implementation is much more accurate than the low frequency one counter method. 

------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
0 Kudos
Message 5 of 19
(14,996 Views)

Hello aNIta,

I wrote exactly same vi's as figure 1 and 2.

In the vi using for loop method, when vi is running (and the rotor running), the data-wiring coming out of DAQ mx-read counter (placed inside the for loop) reads zero.

Also in the mean method, the data reads zero. What can be the reason?

 

in contrast in the following primary vi, the DAQ mx-read counter reads the data and hence I get rpm display.But it does not have the mean or for loop implemented.

0 Kudos
Message 6 of 19
(14,988 Views)

Hello Kikidou,order analysis toolkit is not available with me, so the first method cancels out. Regardig the second vi that u suggested, it asks for more than one input of 2 counters. whereas I am using only one counter (ctr0) in NI 9205 which receives signal from Hallsensor mounted in front of the rotating element. Can you suggest me how can I incorporate the buffered method in this case?

Do I require an external trigger for this method?I can get that using NI 9205 which has PFI0 and can be used for external triggering. .

So, I  plan to try the following towards using the buffer method : -

Connect my sensor signal to the PFI0 channel in NI 9205.

Using wiring, this same signal I will give to the DIO1-COM channel (ctr0) in NI 9205.

 Is that correct?

Also do post the vi in this regard.

0 Kudos
Message 7 of 19
(14,984 Views)
Can you try the attached VI and let me know.
------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
Message 8 of 19
(14,980 Views)
Thank you, yes this works.
0 Kudos
Message 9 of 19
(14,939 Views)

Would you be able to post a copy of the VI in Labview 8.0 please? I am getting the 200141 error and am quite stuck. In another thread it appears to have worked for another user.

Thanks

Chris

0 Kudos
Message 10 of 19
(14,815 Views)