10-06-2011 02:14 PM
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
Solved! Go to Solution.
10-06-2011 03:22 PM
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.
10-07-2011 07:39 AM
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