LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I have an optical sensor how do I get a RPM or frequency measurement?

I have three optical sensors on a gyroscope rig connected to a 6601 card producing a square wave of 0-5V. I can get an edge count.  But how do I get an RPM or frequency measurement?

0 Kudos
Message 1 of 27
(3,176 Views)
Hi Ree,

The PCI-6601 can perform various measurement tasks on pulsetrains inputted into the card. Given a plusetrain it can measure the period, frequency and the pulse width of that pulsetrain. How you measure the RMP and Freqency of whatever you are measuring depends on how you are obtaining these readings. If the sensor that you are using (to measure RMP and Frequency) outputs a pulsetrain to indicate its reading then you can indeed measure this signal with your hardware.

I recomend that you have a look at NI Example Finder and search for "counter/timer". You should find several examples that you can use to measure your input pulsetrain.

Let me know how you get on with this and if you have any further questions.

Regards,

Ian Colman
Applications Engineer
National Instruments UK & Ireland
Message 2 of 27
(3,146 Views)

Dear Ian

 

I have to say I’m not having a lot of luck with the example finder.  I have three optical sensors all hooked up to LabVIEW.  I can count the pulses no problem, I just don’t seem to be able to connect a clock.  As I think I want a “Period Measurement” or a “Buffered Period.”

 

Best wishes

 

Robert

0 Kudos
Message 3 of 27
(3,110 Views)

Dear Robert,

Would you like to attach your code to a reply to this post and let me take a look at it for you? I'd be happy to help get it in a working state for you.

Regards,

Ian

Message 4 of 27
(3,106 Views)

Yes Please, the code I have created for the three optical sensors is attached.  One of the sensors is counting holes on a disk, so one of the signals is divided by 24 to give one revolution (24 holes in the edge of the disk).  Thanks

Best wishes

Robert

0 Kudos
Message 5 of 27
(3,102 Views)
Hi Robert,
 
Thanks for attaching your code. Could you let me know exactly what data you want to present from the data acquired on sennsor 1, 2 and 3 respectivily. For example:
 
Sensor 1) ? (insert)
Sensor 2) ? (insert)
Sensor 3) Acquire a pulse train in, count the number of pulses in 1 second, divide by 24 in order to get number of average number of revolutions/sec, update this value every second. (modify if not correct)
 
If you let me know this I'll be able to write something that should solve your problem or at least be of significant help to you.
 
Best Regards,
 
Ian
Message 6 of 27
(3,095 Views)
Dear Ian

Sensor 1) Acquire a pulse train in, count the number of pulses in 1 second, to get number of average number of revolutions/sec, update this value every second.

Sensor 2) Acquire a pulse train in, count the number of pulses in 1 second, update this value every second.

Sensor 3) Acquire a pulse train in, count the number of pulses in 1 second, divide by 24 in order to get number of average number of revolutions/sec, update this value every second.

Thanks for your help

Best wishes

Robert

 


0 Kudos
Message 7 of 27
(3,090 Views)
Hi Robert,

I have written something that you might want to try out.

The things you may need to modify for your system are:

a) The location of the counters using the drop down lists on the front panel
b) The scales of the gauges on the front panel (double left-click on the max or min value on the gauge to change them)

Give that a try and let me know how you get on. If you experience an error please tell me the error code.

Regards,

Ian Colman
Applications Engineer
National Instruments UK & Ireland


Message Edited by Ian Colman on 01-18-2008 03:31 AM
Message 8 of 27
(3,075 Views)

Dear Ian

Thank you so much, it is great to have something to start work with.  I have managed to modify the program and to get some data from my sensors.

Now I would like record the data and display it on a graph.  From the program I have what is the easiest way to do this?

Thanks again for your help

Best wishes

Robert

0 Kudos
Message 9 of 27
(3,036 Views)
Hi Robert,
 
You're very welcome, I'm glad the VI was of help to you. If you want to display the data on a graph in real-time you can place a Waveform Chart on the front pannel, double click on the outside of the chart to zoom to the item on the block diagram, then wire in your desired data into the graph (in the same way i have done with the gauges).
 
When you say record the data, do you wish to write it to file?
 
Best Wishes
 
Ian 
 
P.S. If you find my messages usefull, I'd very much appreciate it if you rated one of my posts. To do this just click the one of the numbers in the bottom right of a post of mine. Many thanks indeed.


Message Edited by Ian Colman on 01-23-2008 08:14 AM
Message 10 of 27
(3,033 Views)