LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Encoder count direction, using an E-series terminal board with an M-series DAQ.

I have been taking encoder measurements using a US digital E2 encoder. It is wired to a Quanser E-series terminal board (this is essential to the system as it is carrying out some Quanser experiments) which is then connected to a NI M-series PCI-6251 DAQ which is taking and recording the measurements. I have been unsuccessful so far in getting the encoder count to change direction with the change in direction of the encoder, and I think the problem lies in the fact I have an E-series terminal board used in conjunction with an M-series DAQ.

 

I have acquired the ‘A signal’ so I am able to count in one direction, but I cannot acquire the ‘B signal’ and I think that this is because the terminal board is sending the ‘B signal’ to pin 16 (P0.6), which is the correct pin for an E-series DAQ, however my M-series DAQ is trying to find the signal on pin 45 (PFI10).

 

I have been using the quadratureencoderm-series.vi (http://zone.ni.com/devzone/cda/epd/p/id/1569 ) which lets you specify both inputs to the counter, however when I try to find either P0.6 or pin16 as a possible option to wire to the counter, I cannot.

 

Can anyone shed any light on how I can get my M-sereis DAQ to find a signal on pin 16 (P0.6)? or am I addressing the problem wrong?

 

Thanks again

Joe

0 Kudos
Message 1 of 5
(3,503 Views)

perhaps a better way to word my overall problem would be:

 

Does anyone know how i can specify pin 16 (P0.6) as my input signal for chanel B on my DAQ counter?

0 Kudos
Message 2 of 5
(3,498 Views)

I think there are actually 2 contributing issues here.  I don't know what terminal block you have, but I just consulted this page to find pinout information for E-series and M-series devices.

 

Issue 1: Terminal blocks are often labeled with both pin #'s *and* some kind of logical label that designates pin function.  The pin's logical function will vary from board to board, but terminal block pin 16 will always route to board pin 16.   So, right now you're wired to pin 16 on the terminal block and the M-series board will see the signal on pin 16.

 

Issue 2: Pin 16 is a digital input which provides a "poor-man's" approximation to directional counting with a quad encoder on an E-series board.  An M-series board has *true* quadrature capability, so you shouldn't bother with the poor-man's approximation any more.  Make use of true quadrature.

   I can't open the vi from this PC, but you'll want your M-series vi configured as an encoder-based position measurement, *NOT* as a edge-counter with direction controlled by a digital state.  Then you'll need to move the wire over to one of the pins with a "PFI" designation, maybe PFI10=pin 45.  All the "PFI" pins are all available and programmable for use by counter input tasks.  The digital port 0 pins (such as pin 16 = port 0 line 6) are *NOT* usable as counter inputs.

 

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 3 of 5
(3,478 Views)

Thanks that has cleared things up a fair bit, I didn’t realise that P0.6 was the digital line for port 0 line 6; I have since been able to locate this signal quite easily.

 

So now I have my ‘A signal’ into the counter and my ‘B signal’ into port 0 line 6, which is a pretty useless combination really.

 

There is a possibility that I have access to an old E-series DAQ. If I can get it, it should fix the problem, but if I cant I am thinking about physically changing the wiring on the terminal board so that the ‘B signal’ is sent to pin 45 (PF10), which should be a simpler task.

 

Thanks for your time mate, it is greatly appreciated

Joe

0 Kudos
Message 4 of 5
(3,465 Views)

I would strongly advise that you change the wiring and and continue to use the M-series board.  The E-series board isn't guaranteed to track position accurately across direction changes.  See this article.  The M-series board will also give you the option of 4x resolution.

 

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 5 of 5
(3,455 Views)