Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

DCMCT-Quanser position measurement with Labview

Hi,

 

I am doing a small project regarding DC motor control. The DC motor I am using is the Quanser DC motor (DCMCT). The DCMCT works on NI ElVIS platform and I am using DAQ PCI -6251 data acquisition board.The quanser counter terminal is ctr0 and I need to do position control with the motor.

I am experiencing a problem with this because I can not read the position when the motor direction change.

 

If I give an input voltage wave of +/-2V to motor , the motor will change rotation direction when the voltage value changes. But my counter keeps incrementing.

I want my counter value to increment when motor rotate one direction and decrement when the motor direction change. Else I can not do position control.

 

 I need to know what I am doing wrong... I have attached some of the VIs I found and tried on Quanser DCMCT.

 

Your help is appreciated.

 

Thanks

0 Kudos
Message 1 of 5
(7,232 Views)

What type of encoder are you using on the motor?  You have the PFI lines correctly selected, but what pins are you connected the different signals from the encoder to?  On the 6251, PFI 8 is pin 37, PFI 10 is pin 45, PFI 9 is pin 3.  (ref page 18 of the 625x specifications

 

And just to confirm, you're running the "quadratureencoderm-series.vi" is that correct?

Eric S.
AE Specialist | Global Support
National Instruments
0 Kudos
Message 2 of 5
(7,214 Views)

I am using the Quanser DC motor. It is built to be compatible with NI ELVIS. I do not have details about the encoder. I could not find a Quanser specification sheet with enough details.

I know the counter is ctr0 and when I give a test voltage and test the measurement of the motor of the counter from "Measurement and Automation" --> test pannel (Right click on the DAQ) only from PFI8 I receive an input. I do not get any input from other PFI lines.

 

The manual of the motor says that it can do position control and there fore I believe it should be able to detect direction.

 

Yes , I am running "quadratureencoderm-series.vi".

 

 

 

 

0 Kudos
Message 3 of 5
(7,186 Views)

In the case of correct wiring and correctly operating DC motor , can you please tell what kind of an output is coming from PFI10.

(eg - pulse train same as PFI 8 (leading/lagging) , binary signal indicating direction)

 

Thanks.

0 Kudos
Message 4 of 5
(7,183 Views)

Hi nilush,

 

Assuming it is a quadrature encoder, then both A and B lines will be pulse trains (the encoder will output these, and they will be read by the ELVIS counter).  A and B will be 90 degrees out of phase, meaning halfway through the A high pulse the B line will go high (when going forward).  When going backward, it switches, and A rises halfway through the B pulse.

 

For a diagram of this, look at page 7-15 (pdf page 121) of the M series user manual.

 

For your first question, of how to connect this, I looked into the Quanser attachment, and found the manual for it online on Lehigh's website.  On page 5 (pdf  page 7) it says that when you installed the Quanser attachment it should have come with two example VIs already written:

 

 

QNET_DCMCT_Lab_01_Speed_Control.vi
 QNET_DCMCT_Lab_02_Position_Control.vi

 

QNET_DCMCT_Lab_01_Speed_Control.vi

QNET_DCMCT_Lab_02_Position_Control.vi

 

So, if you have those on your computer please look at those to see if / how they work. The manual didn't specify what type of encoder it has or how it is connected, but you should be able to deduce that from the position control example program.

 

 

Eric S.
AE Specialist | Global Support
National Instruments
0 Kudos
Message 5 of 5
(7,160 Views)