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.
What all modules do you have in your cDAQ-9174? What are the voltage levels from the hall effect sensor?
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.
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.
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.
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.
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.