Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

NI9011 and NI9411 lost points from quadrature encoder

Hi everyone!

 

I have a big problem! I have a cRio9075 with a NI9011 to read a TTL x10 quadrature encoder (heidenhain MT1271). The module can read the encoder but it have a serious problem. When the encoder moves fast, the module lost some signals (cannot catch all signals sent from encoder) and returns wrong position values. Therefore it losts the reference (obviously). 

 

I talked with portuguese support (supported by france) and the application enginnering advices to me a NI9411. I bought that, make all connections but the problems still remain...

 

I also tried get values from scan mode, but the problem still.

 

My fpga code to get value:

 

 

http://i39.tinypic.com/14w6jkm.png

 

Another thing that i cannot understand is chassi clock. In website appears 400MHz (https://www.ni.com/en-us/support/model.crio-9075.html) but in projects only 40MHz is recognized:

 

http://i42.tinypic.com/2u5xdw7.png

 

Regards,

 

Rúben Jerónimo

Software Developer

Streak, Automation Engineering

0 Kudos
Message 1 of 17
(6,976 Views)

item 1.

you need to use the timed loop in FPGA to use the single cycle timed loop SCTL for this function.  if you place a tick count timer, you will see that your existing code is running fairly slow.  by using the SCTL, it will run at 40 mHz and be limited by the module bandwidth (2 MHz edge resolution)

 

item 2

400 MHz is CPU clock.  40 MHz is FPGA clock.

Stu
0 Kudos
Message 2 of 17
(6,953 Views)

Hi McFarlane, thanks for your reply.

 

I followed your suggestion but the problem still going. The module used is 9411. You can see my code bellow. 

Thanks for your help

 

 

Regards,

 

Rúben Jerónimo

 

Software Developer

Streak, Automation Engineering

 
0 Kudos
Message 3 of 17
(6,937 Views)

the SCTL is correct.  is the symtom different?  you do have a coersion dot on the output indicating a type mismatch between your shift register value and your indicator.

how fast is your encoder producing lines (rev/sec *effective line count).

Stu
0 Kudos
Message 4 of 17
(6,916 Views)

Hi McFarlane, thanks again for your reply.

 

The symtom is the same... In few words the module cannot catch all points sent by encoder. In attached image you can find the encoder specs. I am a little "newbie" in this area (labview and quadrature encoders).

My encoder is MT1271 (TTL x10)

Thank you very much for your help!

 

 

 

 

Regards,

 

Rúben Jerónimo

 

Software Developer

Streak, Automation Engineering

0 Kudos
Message 5 of 17
(6,908 Views)

what is the speed that you are having trouble with?  

it works at low speed but not at high speed?

are you connected differentially?

 

Stu
0 Kudos
Message 6 of 17
(6,903 Views)

Dear McFarlane, you're right! When i move the encoder slow it works normaly and all points, apparently, are catched by fpga. But when i move it very fast, some points are not catched by fpga/module. 

I connect encoder following the NI examples (A signal in DIO0, B signal in DIO1, Z signal in DIO2). 

 

Thanks for your help.

 

 

 

Regards,

 

Rúben Jerónimo

 

Software Developer

Streak, Automation Engineering

0 Kudos
Message 7 of 17
(6,900 Views)

the encoder had specs like 30 mm/min which is very slow.  as long as you are moving it that rate or slower, i think you will be ok.

does the encoder have A! and B!?  if so, connect them as well.  it will provide a more noise immune system.

 

Stu
0 Kudos
Message 8 of 17
(6,893 Views)

Hi McFarlane, thanks again for your reply!

 

Let me see if i see your point: you're saying that if i move the encoder slower that 30mm/min the values catched by FPGA/Module should be fine, but if i move it faster, i lose some points, right?

Yes, the encoder have A/, B/ and Z/ signals. In NI9401 module i can only connect A, B and Z signals, in DIO0, DIO1 and DIO2. Using NI9411 i connected A, A/, B, B/, Z and Z/ in DIO0a, DIO0b, DIO1a, DIO1b, DIO2a, DIO2b. The result is same, in both modules. 

 

In also connected 0v to COM on both modules. I cannot see any another solution for this problem. 

I'm also a little disapointed with NI application engineer that cannot help me with a real and functional solution.

 

One more time, McFarlane thanks for your help.

 

 

Regards,

 

Rúben Jerónimo

 

Software Developer

Streak, Automation Engineering

0 Kudos
Message 9 of 17
(6,875 Views)

I recommend using the 9411 differentially (A,A/, B, B/) for your application.  it does not change the functionality but is more noise immune than the 9401 for encoder input.

The encoder specs were limited to 30mm/min.  the resulting encoder line rate is well below the ability of the 9411 so i suspect that the error in your readings is due to the encoder limitation.  I have used the 9411 for encoder applications with much higher rates than the one you are trying.  

is the rate of 30mm/min adequate for your application?  are you all set now?

Stu
0 Kudos
Message 10 of 17
(6,864 Views)