01-10-2014 04:59 AM
Hello,
I have to acquire two signals from a HALL-sensor on a test system, where a motor is turning. The sensor deliveres two square signals. I have to determine two things:
1.) Number of impulses (counting degrees)
2.) Tunring direction.
The counting of the pulses is very easy with two counter inputs, for example with a PXI 6602. But what is the right way to determine the turning direction (phase difference between the two signals: +90° = CW; -90°=CCW)
Any help is welcome!
Solved! Go to Solution.
01-10-2014 05:33 AM - edited 01-10-2014 05:36 AM
You're essentially talking about a rotary encoder. There's a Counter Input Angular Encoder option via DAQmx which already does the decoding of this for you. Both signals (A and B) from the sensor are wired to the inputs of one counter and the number of pulses is counted and then scaled. In addition, the CI Encoder VIs count up or down depending on whether A leads B or vice versa.
http://www.ni.com/gettingstarted/setuphardware/dataacquisition/quadratureencoders.htm
https://decibel.ni.com/content/docs/DOC-17346
If you're ever using an FPGA device there are a number of easy examples for writing your own decoder from a pair of digital inputs (plus a Z reference if you wish).