LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I find the z index of the incremental encoder

Solved!
Go to solution

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

0 Kudos
Message 1 of 6
(1,406 Views)
Solution
Accepted by topic author adi3012

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:

  • I noticed that in your DAQ Assistant, you have your A, B, and Z terminals set to PFI 13, 11, and 4, respectively.
  • Looking at the pinout diagrams here and here, it looks like CTR 1 (which you've selected) uses PFI 3, 11, and 4.

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

0 Kudos
Message 2 of 6
(1,371 Views)
Solution
Accepted by topic author adi3012

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 3 of 6
(1,349 Views)

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?

0 Kudos
Message 4 of 6
(1,304 Views)

Clearly, I messed up one of my pinout connections. Thanks a lot guys for your responses

0 Kudos
Message 5 of 6
(1,293 Views)

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 6 of 6
(1,290 Views)