LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

encoder count direction with PCI-6251 and Quanser encoder

Hello all,  

 

I have been creating a PID control system for a Quanser 2-dof helicopter (http://www.quanser.com/english/downloads/products/Specialty/Quanser_2DOF_Helicoper_PIS.pdf) using Labview 8.0. The DAQ being used is an m-series PCI-6251. I have completed the majority of the work, but I am having a tough time controlling the count direction of the Encoders.

Using the quadratureencoderm-series.vi program, I have been able to read pulses from signal A, but I am unable to get a reading of any kind on Signal B, meaning that my encoder counts only in one direction, regardless of its change in direction.

 

I have done a bit of research and all articles found suggest that I wire signal B into either CTRnAUX channel (PFI 10 or PFI 11 depending on which counter), but I cannot find a B signal. Does anybody have any idea about what I may be doing wrong?

 

One factor that I think may relate to this is the only encoding type that can read signal A is the ‘two pulse’ encoder. If I chose any of the quadrature types (x1, x2 or x4) I get no read out at all!

  

Thanks for your time, it is greatly appreciated. Hopefully it is not a hardware problem!

 

Joe

0 Kudos
Message 1 of 6
(3,351 Views)

Hey,

 

What do you mean with "you cannot find a B signal"? You cannot find it as an output of the decoder or you cannot read with DAQmx.

I would suggest you to try to read the A,B and Z signals (as far as you find them on the Quadrature encoder) withing MAX by creating an Edge Detection Task. So you can get sure that the mentionend Signals are present.

Then you create an Angular Position Measurent Task where you can define the type of encoder and see where A, B and maybe also Z has to be connected at your card. If it still counts in one direction, try to reset the board in MAX and start the Task again.

 

Christian

0 Kudos
Message 2 of 6
(3,345 Views)
Hi Christian, I have 5 encoder and I need to read A, B and Z sinal. Whay hardware (PCI) I need to use?
0 Kudos
Message 3 of 6
(3,060 Views)

Hello,

 

If you want to read the encoder position values from 5 encoders simultaneously, you would need at least 5 counter/timers on the PCI board. The PCI-6602 should be a good fit for this purpose (http://sine.ni.com/nips/cds/view/p/lang/en/nid/1123). If you would like to take a look at the other data acquisition boards that we offer,  please refer to the following webpage: http://sine.ni.com/nifn/cds/view/main/p/sn/n24:PCI/lang/en/nid/1036/ap/daq . Here, you can choose your selection criteria on the left hand side. 

 

I hope this helps.

Vivek Nath
National Instruments
Applications Engineer

Machine Vision
0 Kudos
Message 4 of 6
(3,039 Views)
Hi Vivek_N, I would need at least 5 counter/timers to read the Z sinal and I can read the A and B sinalwith digital I/O lines?
0 Kudos
Message 5 of 6
(3,025 Views)

Hi,

 

Please refer to this knowledgebase article to see how to connect the A,B and Z signals to the counter: http://digital.ni.com/public.nsf/allkb/B3945A72AE53D1B086256EF7007C4D0D?OpenDocument . On page 3-4 of the NI 6602 user manual (see previous post), you can find the pin assignments. I hope this helps.

Vivek Nath
National Instruments
Applications Engineer

Machine Vision
0 Kudos
Message 6 of 6
(2,994 Views)