LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tachometer

Hello

 

I want to measure RPM using a switch. Everytime the switch go on, LabView need to count it as 1 RPM. Im using a USB-6215, and the switch is connected to AI15 and when the switch is on a voltage of 5V appers.

 

Can anybody help me to make some kind of voltage/RPM counter?

 

Best Regards

Mike

0 Kudos
Message 1 of 12
(4,569 Views)

What part do you need help with?

What have you done so far?

Post your VI and explain specific problems or questions.

 

Is this just a request for forum users to do your homework?

If so, that's not the intent of the forums.

LabVIEW 5.0 seems so long ago...
0 Kudos
Message 2 of 12
(4,542 Views)

 

 

Homework? No its not

 

 

 

I just want to count everytime i pust a button, but i really dont know how to do it :S I am new to Labview, but i already have build a voltage and anemometer.

 

I don't know how to set it up??? 

 

Mike
0 Kudos
Message 3 of 12
(4,526 Views)

Hi Mike,

 

This is something that i saw a while back on this forum that may help you out:

 

Tacometer.png

 

Hope this helps Smiley Very Happy

 

Rgs,

 

Lucither

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
Message 4 of 12
(4,521 Views)

Hi Mike,

 

First of all, welcome to NI Discussion Forums!

I presume your "Tacometer" isn't for eatingSmiley Wink Can you please provide us a description of your application? Where does the Switch signal comes from? Are you pushing the switch by hand or is this a motor encoder application?

For a simple button pushing application you can just use a DAQ assistant to read the AI15 and for each 5V threshold we can just add 1 to a counter indicator. See "Push Button.png"

For a motor enocoder application you can use the HW counter on the USB-6215 and again using DAQ assistant to create a counter measurement.

 

I hope this helps!

 

Thanks!

-----------------------------------------------------
Dennis Morini
District Sales Manager
National Instruments Denmark
http://www.ni.com/ask
0 Kudos
Message 5 of 12
(4,503 Views)

 

 

Thanks!

 

 

 

But actually it think it would be better if i could connect a switch/button between GND and AI15, and when i press the button/switch it need to count for every time i press the button.

 

 

 

Is that possible?

 

Thanks :)! 

 

0 Kudos
Message 6 of 12
(4,493 Views)

Hi Mike,

 

Yes, you can use this solution as long as AI15 reads 5V for each button push.

 

Please let me know how it works!

 

Thanks!

-----------------------------------------------------
Dennis Morini
District Sales Manager
National Instruments Denmark
http://www.ni.com/ask
0 Kudos
Message 7 of 12
(4,484 Views)

Really simple Mike,

 

1)Setup your DAQ card

2)Acquire from your DAQ card in a loop continuously, Queue outputs to consumer loop,

3) in consumer loop count number of times switch has been triggered at 5V an add it to current number of switches kept in a shift registe in that loop.

4) Close down producer when lorry has finished journey and close down consumer on error of Queue.

 

hope this helps.

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 8 of 12
(4,475 Views)

 

Thanks 🙂

 

 

Could you might send me the VI? Because i dont know how to insert that kind of blue wire on the diagram and the "5" to the greater or equal ??

 

 

 

0 Kudos
Message 9 of 12
(4,471 Views)

MikeDahl wrote:

 

Thanks 🙂

 

 

Could you might send me the VI? Because i dont know how to insert that kind of blue wire on the diagram and the "5" to the greater or equal ??

 

 

 


 

 

Right click on the block diagram and create the VI from the express VIs pallete, my solution is better if your RPM could go faster than your sampling rate or loop rate and it doesn't slow the loop down, but it's not as simple. Look up "Producer Consumer" in the help.

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 10 of 12
(4,467 Views)