LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using one counter/digital line as a trigger to reset another counter line

Solved!
Go to solution

Hi I am using a PXIe-6366 device and I am using a shaft encoder which has 3 outputs; 2 outputs, A and B, which produce 720 pulses per revolution (both 90 degrees out of phase) and the third ouput, Z,  is a marker which pulses once every full revolution.

 

I am using 'A' as counter in my code but I would like to use 'Z' marker to reset the 'A' counter continously. Is this something that is possible?

 

I came across this picture from the NI site which uses a button to reset the counter - I believe I could use a similar code but just need to replace the button with my Z counter as a trigger

 

https://decibel.ni.com/content/docs/DOC-6576

 

For further information this shaft will be run at a max of 3000rpm (50Hz) - and I am not sure if such high speed would be an issue when resetting the counter A line. The PXIe chassis I think also has capabilities of triggering but not sure how to set this in MAX.

 

Any suggestions? Many thanks

 

Notay

0 Kudos
Message 1 of 3
(2,278 Views)
Solution
Accepted by topic author Notay

This is the standard arrangement for a quadrature encoder, although it sounds like you're only using the A channel rather than both A and B.  Take a look at the section labeled "Position Measurement" under Counter Input Applications in your device manual.  Also these two examples may be helpful:

Angular Position Measurement with a Quadrature Encoder

Connect Quadrature Encoders to a DAQ Device

These show how you can use the Z signal to reset the position counter to a specific value.

Message 2 of 3
(2,272 Views)

Many thanks - I actually wanted angular position. I was going to use the counter values and convert them into degrees using simple maths but this does everything for you. Cheers nathand

0 Kudos
Message 3 of 3
(2,263 Views)