07-27-2020 03:20 PM
Hi,
This might be a simple answer for most people but I am struggling to get the z index position of the incremental encoder. I am using the DAQ assistant to read the encoder and can read the angle out perfectly but I have no idea how to read the z index.
Hardware - NI-USB 6229
Solved! Go to Solution.
07-27-2020 05:10 PM
Just to make sure to ask the obvious - have you double checked your wiring? Are you connected to the pins that you *think* you're connected to? Have you configured the correct pins in your DAQ Assistant?
Speaking of correct pins:
The difference is that you have have terminal A set to PFI 13, while it looks like it should be PFI 3.
(PFI 3 is both CTR 1 SRC and CTR 1 A. PFI 13 is just CTR 1 OUT.)
Now, since I cannot see your setup (and since I really am not experienced with setting up encoders), I do not know what difference this would make (maybe no difference at all).
But I wanted to make sure to ask the question, and point out what I noticed. I hope my comment isn't a waste of your time. 😊
-joeorbob
07-27-2020 06:06 PM
Just to stay clear on terminology, you won't be "reading" the z-index pulse. You just want to see that the z-index will reset your encoder position back to 100 degrees, right?
In addition to checking pinout connections as joeorbob suggested, you should also check your encoder spec sheet for the correct A,B states during the Z-index pulse. The Z-index pulse will typically be "quarter-cycle gated", meaning that the pulse occurs during only 1 of the 4 possible states of (A,B). You need to configure your task to match what the encoder hardware is doing.
-Kevin P
07-28-2020 10:45 AM
Thanks for the response. So my A, B and Z are set to PF 13, 11 and 14 as I had changed the input terminals.
Here's my question - If these are the only 3 settings I use, I can read the encoder just fine but the value never resets (I have at z index - make encoder reading 0).
But if I take a wire from PF 14 (z index) and connect it to PF 4 (digital and timing I/O) to count the edges, everything suddenly works. This seems weird to me. Is this how its supposed to be? Am I supposed to be reading the Z index for this to work?
07-28-2020 10:52 AM
Clearly, I messed up one of my pinout connections. Thanks a lot guys for your responses
07-28-2020 11:00 AM
So my A, B and Z are set to PF 13, 11 and 14 as I had changed the input terminals.
In the DAQ Assistant you posted, you've configured Z for PFI 4 not PFI 14. Apparently, you've physically wired the Z index to PFI 14 because...
if I take a wire from PF 14 (z index) and connect it to PF 4 (digital and timing I/O) to count the edges, everything suddenly works.
Change your configuration to say that Z is wired at PFI 14, then you won't need the physical wire to PFI 4 any more.
-Kevin P