04-25-2010 08:45 AM
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
04-25-2010 04:42 PM
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.
04-26-2010 12:04 AM
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
04-26-2010 12:22 AM
Hi Mike,
This is something that i saw a while back on this forum that may help you out:
Hope this helps
Rgs,
Lucither
04-26-2010 03:06 AM
Hi Mike,
First of all, welcome to NI Discussion Forums!
I presume your "Tacometer" isn't for eating 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!
04-26-2010 03:21 AM
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 :)!
04-26-2010 03:35 AM
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!
04-26-2010 04:27 AM
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
04-26-2010 04:29 AM
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 ??
04-26-2010 04:33 AM
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.