Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get z-channel (zero) encoder data using an NI-9411 in scan mode?

Solved!
Go to solution
 

Hi,

 

I'm using a cRIO to read a quadrature encoder, and I need z-cannel (zero-channel) data using an NI-9411 in scan mode.

     Chassis:                  NI cRIO 9074

     C-series module:    9411

     Encoder:                 BEI H25 series (model # XH25D-SS-1440-ABZC-28V/V-SM18)

 

Now I've set this up using scan mode and the Properties>Specialty Configuration settings as follows:

     Specialty mode:      Quadrature

     Input filter:             Disabled

     Velocity Timebase: 4096us

     Index Mode:           Disabled

 

This changes the module channels to Position0, Position1, Velocity0, and Velocity1 instead of DI0, DI1, etc.  This works well for getting a velocity reading, but not the Z.

 

I need to know Z because calculations in the rest of my program depend on it.  (For this encoder Z is a digital signal that goes low when the encoder reaches 360°.  It's also a very fast signal.  At 7200 RPM, it has a pulse width of about 3.3us.   

 

How can I get Z data in Scan Mode?

0 Kudos
Message 1 of 3
(4,951 Views)
Solution
Accepted by topic author Agile

Hello Agile,

 

The index mode setting is the only way to access the Z channel in Scan Mode.  If selected the position will reset when the z channel is detected and the phase of the other two channels matches your selection.

 

It sounds like you need the actual z signal elsewhere in your code.  Perhaps you can use the position data to generate the Z channel for that purpose?

 

Let me know if you have any other questions,

 

Sebastian

Message 2 of 3
(4,949 Views)

 

The index mode setting is the only way to access the Z channel in Scan Mode.  If selected the position will reset when the z channel is detected and the phase of the other two channels matches your selection.

 


 

Thank you Sebastian.  Yes, that was the solution and I'm both happy & a little embarrassed that the solution is so easy.  Since I'm only using one encoder, I set the Index Mode (under 9411 Properties>Specialty Digital Configuration>Quadrature) to Index B0 A0.  This reset the Position0 count to zero when the z-channel was high & A0 & B0 were in position.  I verified this with a scope, and can now compare the previous position to the current position (using a shift register) to determine when the encoder (shaft) is in position.

 

Thanks again,

Darrel

Message Edited by Agile on 06-16-2009 10:19 AM
Message Edited by Agile on 06-16-2009 10:20 AM
0 Kudos
Message 3 of 3
(4,934 Views)