LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HALL direction determination with counter

Solved!
Go to solution

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!

0 Kudos
Message 1 of 2
(2,639 Views)
Solution
Accepted by Madottati

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).

---
CLA
Message 2 of 2
(2,629 Views)