01-12-2009 03:33 PM - edited 01-12-2009 03:35 PM
Hi All,
I wanted to throw this by you and see what you thought. I explained the idea to our sales engineer, and maybe I did so poorly, but the short answer was that it was very complicated and the way I wanted to do it wasn't possible. I kinda got the impression he thought I had no idea what I was talking about..so this is my sanity check.
I have an application where I want to test rotating equipment. I'd like to display RPM, and Rotational Direction. I'm using 2 light sensors that will be placed right next to each other with a reflective piece on the product or above it. This way both sensors will create a pulse train as the equipment spins. Being right next to each other, one pulse train will lead and one will lag. I want to use that characterisitc to determine rotation direction.
Now the response I had from NI was fairly insistant that the product I was using would form a pulse train and output position values etc. (I did clarify that this is not an encoder with position outputs.) All I have are 2 waveforms coming out as the element spins...
Could someone confirm that this is possible? Maybe a snippet of how you do it?
Note that we did have a rep come visit to demo some hardware, and he seemed to understand the idea better. We were going to run a demo using a quadrature encoder function but he couldn't get it to work so we moved on. Maybe this is how we do it and it was just his setup? Or maybe he was trying to do what the other guy was thinking also?
Any opinions out there?
Thanks a bunch.
PS will be doing this using a PXI-6624 8 Channel Counter. (1 counter used for RPM, 2 counters used together for rotation - both coded using DAQ Assistant)
01-13-2009 02:32 AM
What you are describing is more or less the way how incremental encoders work. There are many suppliers for those encoders and the encoder have different flawors (rotary, linear) with different "encoding mechanisms" (see this for more info).
The advantage of those encoders is that many already create TTL/CMOS signals which can be directly used by the counter device. If you choose to build your own encoder, you most propably have to insert signal conditioning.
hope this helps,
Norbert
01-13-2009 03:06 AM
Hai,
You have answered your question. its just the quadrature encoder operation that you are trying to replicate. Quadrature encoder outputs two pulse trains (A and B) which are 90 degrees out of phase. The direction of rotation can be determined by detecting which signal (A or B) is leading or laging.
These two signals can be connected to the counter terminals (http://zone.ni.com/devzone/cda/tut/p/id/7109) and DAQmx functions can decode the quadrature signals to give the position (in degrees or radians) and direction of rotation.
Feel free to post if you have any queries
01-13-2009 08:33 AM
Yep using the quadrature encoder function in the DAQ Assist -> Counters is what we were trying to do at our rep visit.
Just curious but by doing this manually...how important is it for the counter to see them 90 degrees out of phase? Can they just be right next to each other, and watch which one hits first to get direction? Note that our sensor will output a 10V signal instead of TTL 5V. (Counter handles -10V....10V input) This should help with reducing how much conditioning is needed I would think. That's what we've seen in the field. A client of ours uses the 5V version of what we will be using and our data is always better quality I'm told by QA so the 10V has been mandated.
Using this setup if we don't have the phases perfect, or using a 10V signal, etc are there any other concerns with using that quadrature function in DAQ Assist?
01-13-2009 11:39 AM
If I am understanding you correctly, you want to only have two sensors placed next to each other on the rotating plane, not a series of them all the way around like a quad encoder. If that is true than I don't believe you will be able to use the Quad encoder aspect of a DAQ Assistant, as you wont actually be reading a Quad Encoder. You could either code your own interpretation of this setup using DAQmx VI's to read in the counters and produce the RPM and then compare their phases to determine direction. Or you could simple offset these sensors 90 degrees around the rotating plane and continue to use the DAQ Assistant.
With regard to your 90 degree offset being a hard and fast rule. As with anything, the more you are off the more error you are going to see in youre reading.