From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ 9178 & NI 9401 - ASM Incremental Rotary Encoder not working beyond a certain frequency

Solved!
Go to solution

I am using a cDAQ 9178 chassis with an NI 9401 DIO module.  I am trying to convert the output from an ASM incremental rotary encoder (in radians) to rpm.  

 

Sensor head (PMIS4-20-50-240kHz-TTL24V-Z0-2M-S)

Magnetic Ring (PMIR7N-20-50-M-20)

 

The encoder outputs 2500 pulses per rev (5V TTL output).  The maximum speed that the encoder will see is 2800rpm, which equals 2800rpm*2500ppr/60 = 116,667.67 Hz in terms of frequency.  

 

From the NI 9401 Operating Specs:

Maximum input signal switching frequency by number of input channels, per channel

8 input channels..........................9 MHz
4 input channels..........................16 MHz
2 input channels..........................30 MHz

 

I'm only using 1 channel so I'm assuming that the 9401 should be more than capable of handling the 116kHz that the ASM encoder is spitting out.  

 

Everything works properly up to approximately 2100rpm (~87,500Hz) but then I start to see a drop in rpm followed by a flattened behaviour and then a slight increase. But never higher than 2100rpm.  Our test rig is being inspected for other reasons at the moment so I can't produce a plot of the behavior (I can reupload later).  I'm thinking that this must be an aliasing issue with the counter or something along those lines.  I have a digital filter set up with a minimum pulse width of 4.0E-6.  This is two times smaller than the minimum pulse width at a frequency of 116kHz (0.0000085714).  I don't think that this should be affecting the calculation.  

 

Any suggestions? This rpm value is critical to our application. 

 

Thanks in advance, 

-MB

Best regards,
Brown

The more I know...the more I don't know
Download All
0 Kudos
Message 1 of 7
(5,770 Views)

Hey Brown_ktr,

 

Do you have an active ssp? I recommend you to call to 866-275-6964 for NI support.


Regards,
Daniel M.
Applications Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 7
(5,754 Views)

Also please check that your cDAQ and that the cable you are using to connect it to the computer are capable to transmit at this rate. Sometimes the card can acquire data faster than these 2 other factors.

 


Regards,
Daniel M.
Applications Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 3 of 7
(5,714 Views)

I don't have an active SSP at the moment.  From what I can find, The cDAQ 9178 and the cable connecting it to the computer should be able to transmit at this rate.

 

I've attached a screenshot of what's happening to the rpm calculation.  Not too sure where to go from here. 

 

EncoderIssues.JPG

Best regards,
Brown

The more I know...the more I don't know
0 Kudos
Message 4 of 7
(5,698 Views)

Hey Brown,

 

Have you tried to increase the sample rate that you have set to 1000 Hz in the front panel? Also do you know the frequency at which the sample clock is working on your application? 


Regards,
Daniel M.
Applications Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 5 of 7
(5,653 Views)
Solution
Accepted by topic author Brown@KTR

Brown@KTR wrote:

 

I have a digital filter set up with a minimum pulse width of 4.0E-6.  This is two times smaller than the minimum pulse width at a frequency of 116kHz (0.0000085714).  I don't think that this should be affecting the calculation.  

 


At a frequency of 116 kHz the period is ~8.57 us, but the pulse width would be half of that at 50% duty cycle.  Factor in rise/fall times, and it's quite possible that 4 us is too long for your encoder signal.

 

The shape of this graph supports this theory if you consider that there is variance in the exact pulse width of each encoder pulse.  The shortest of pulses are ignored once the filter starts to kick in, and as the RPM increases longer and longer pulses are then ignored as well.

 

Try lowering the digital filter minimum pulse width (2 us or even 1 us) and see how it goes.

 

 

Best Regards,

John Passiak
Message 6 of 7
(5,639 Views)

Thank you John.  1us worked well. 

 

It's a little embarrassing that I didn't think about the 50% duty cycle...but I'm glad that it's working now. 

 

Cheers, 

-MB

Best regards,
Brown

The more I know...the more I don't know
0 Kudos
Message 7 of 7
(5,634 Views)