LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pulse width measurement for RPM problem

First, I'm a complete LabView newb, so bear with me....I have about a total of 36 hrs actually using the software.

 

Here's the problem. I have a very simple setup with a 12V DC motor which I'm measuring the motor voltage and using a hall effect sensor to capture the shaft rpm, which is through a gearbox and has a MAX of approx 105 RPM's at full voltage. The raw data is being capture with a cDAQ-9174 and I'm getting the voltage from the motor and sensor through an NI 9219 analog input. Capturing and displaying the motor voltage...no problem. Capturing and displaying the signal sensor....no problem. Getting the pulse width measurement from the sensor signal....there is the problem. I keep getting an error for the "mid-ref level was not crossed".

 

What I did was take the raw signal, convert it from analog to digital just to get it to zero's and ones, then converted it back to analog so the pulse width measurement VI could analyze the signal. I cannot get it measure the pulse width so I can convert it RPM. I have messed with every setting on the pulse width VI and the timing and measurement VI and I keep getting that mid reference level error.

 

I attached a screen shot of the setup and what I'm trying to do. Any help would be greatly appreciated. The test setup doesn't show it connected to the 9219, but all that would show is channels 0 and 1 with the pos / neg connections to ports 4 and 5.

Download All
0 Kudos
Message 1 of 11
(3,748 Views)

What all modules do you have in your cDAQ-9174?  What are the voltage levels from the hall effect sensor?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 11
(3,727 Views)

It's the 9219 analog input module and the sensor output voltage is 0-5V.

0 Kudos
Message 3 of 11
(3,715 Views)

Please forgive my ignorance, but why do you convert from analog to digital and then immediately back to analog?

0 Kudos
Message 4 of 11
(3,706 Views)

The only reason I'm doing that is I'm not concerned at all with the sensors output voltage. The circuit is either open or closed....all I need to see is the 0 or 1 condition. But, the pulse width VI will not accept the digital ouput, that's why I drop it back to analog.

0 Kudos
Message 5 of 11
(3,703 Views)

If you had a DIO module, I would tell you to just a counter input and have it just give you a frequency measurement.  Simple calculation from there to go from Hz to RPM.

 

The Pulse Width VI has inputs for threshold.  So just pass your raw data into it and adjust the configuration inputs to setup the measurement as you need it.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 11
(3,694 Views)

 That's where I'm stuck. I've tried adjusting the threshold values in the VI's front panel and can't get rid of the mid reference error.

0 Kudos
Message 7 of 11
(3,688 Views)

I know its just something little I'm missing I just can't get that one function to work.

0 Kudos
Message 8 of 11
(3,686 Views)

These are the settings I'm not sure about. I've tried to tweak these to anything that seems to make sense but it hasn't solved the mid reference issue.

0 Kudos
Message 9 of 11
(3,675 Views)

1. Get rid of the Select Signals.  That is already being done with the Split Signals.

2. Get rid of the To Digital Waveform.

3. Get rid of the To Analog Waveform.  This conversion bad and forth looks like it is killing your signal.

 

In short, you have too many functions to do nothing.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 11
(3,662 Views)