LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase Checking for 2 Encoder

Currently i am using a encoder with 2 channel output. This encoder will generate pulses once it detect a rotation at the shafts mounted to it. The purpose of the 2 channel output is to check the direction of rotation. 2nd signal will be 90 degree out of phase from 1st signal. if wish to detect the direction of rotation, which function should i be using in the labview.
 
Attachment is the code to detect the pulse generation (Total pulse generate) but do not detect the direction. 
0 Kudos
Message 1 of 7
(2,982 Views)
Or its it possible to check which signal is leading and which signal is lagging between 2 signal. (Both will generate same amount of pulses, but either 1 is lagging about 90 degree out of phase)
 
Thanks alot for ur help and time.
0 Kudos
Message 2 of 7
(2,967 Views)
Or its it possible to check which signal is leading and which signal is lagging between 2 signal. (Both will generate same amount of pulses, but either 1 is lagging about 90 degree out of phase)
 
Thanks alot for ur help and time.
0 Kudos
Message 3 of 7
(2,966 Views)
The logic to completely check a quadrature encoder for direction is straightforward, but requires some planning. For example if your system can possibly vibrate while not rotating and that vibration can cause one encoder phase to switch back and forth repeatedly at a higher rate than the time between pulses at the fastest rotation speed, then your logic must be able to deal with that. This can happen on either phase and on either state of the other phase, making four combinations possible.

Some counter boards may have the logic built in (or have it in the driver software). If you do it in software, draw out a complete state chart diagram to make sure that you have covered every possible case.

Lynn
0 Kudos
Message 4 of 7
(2,961 Views)

Hi John,

Like you mentioned earlier, i did encounter the problem of vibration. Is there any way to figure out which of the two signals generated start first? (from the attachment)

 

Thanks.

0 Kudos
Message 5 of 7
(2,958 Views)
    There are some good quadrature encoder theory papers at these links:
http://zone.ni.com/devzone/cda/tut/p/id/7109
http://zone.ni.com/devzone/cda/tut/p/id/4763
http://zone.ni.com/devzone/cda/tut/p/id/2879

They should give you good starting information.

Jason
Wire Warrior

Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!
0 Kudos
Message 6 of 7
(2,954 Views)

Thanks Jason, i will have a look hope it do help.

 

0 Kudos
Message 7 of 7
(2,952 Views)