Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

NI pci 6251 position control

Hi

Im new to this forum and new to Labview and NI pci 6251 as well ;(

I'm using NI-PCI-6251 (DC Motor ) with Labview to control the position of a DC motor  we developed the program that reads the encoder and display the position of the DC motor shaft

but the problem is that the counter 0 (cnt0) always increases whether the disc rotating clockwise or anticlockwise??!! and when the desired position is reached the controller does nothing to stop the motor ?

i don't know what is the problem or why its happening.

 

 

 

0 Kudos
Message 1 of 14
(6,969 Views)

Hi aswwa.

 

I would fix the encoder issues first. I am not sure how are you reading the encoder. But in LabVIEW there is a shipping example that reads an encoder. If you search the Example finder fro "encoder" you will see the examples. After you can read the encode correctly, check the logic that makes your motor stop.

 

Hope this helps. Thanks and have a great day.

0 Kudos
Message 2 of 14
(6,957 Views)

Salam Esmail Hamdan,

 

I have tried to use the encoder reader from NI and we modified it and also we used the fixMseries one ...but the problem that the encoder reads and always increases

im using edge count //should i use the Angular encoder?

I attached the Ecnoder read.vi if you want to have a look

 

 

Thank you

 

0 Kudos
Message 3 of 14
(6,952 Views)

See this so you can set up your quadrature encoder with your DAQ card.  And it is just a DAQ card.  There is no position control logic in it, so that must be done in your Labview program.  Get the encoder working first, then try to tackle the position control logic.  Performance will be limited, though.

0 Kudos
Message 4 of 14
(6,925 Views)

Hi,

 

I am also doing something similar.

The problem is the motor is the DC motor from Quanser. (DCMCT).

I know the encoder channel of the motor is ctr0 and when I test from "Measurement and Automation Explorer" (Labview>>Tools) I can only read the PFI8 channel.

The motor read 4096 pulses per revolution and no reading is available from PFI10. As per Quanser the motor should be about to do position control. I have seen lab tutorials for position control in internet.

 I tested both the vi is mentioned above. The "Example" vi reads the motor position in terms of pulses. But when I rotate the motor in the other direction the count increment not decrement.

 

Also the quadratureencoderMseries vi did not read the angle position when I set the channel values.

I have attached the parameters that I set.

 

Can any one please check..

 

Thanks.

0 Kudos
Message 5 of 14
(6,874 Views)

It sounds like a wiring issue.  You have to see both the A and B channels for the encoder input to be able to count up and down.  Do you have an oscilliscope that you can use to test the encoder?

0 Kudos
Message 6 of 14
(6,868 Views)

How can u test the encoder using the oscilliscope? the Encoder is inside the case !

 

0 Kudos
Message 7 of 14
(6,866 Views)

Wires....coming out of the case.  It is the next best thing to breaking an encoder case.

0 Kudos
Message 8 of 14
(6,863 Views)

HI Brian Beal,

I've read a lot of your message about PMAC control and I really admire your knowlegde about PMAC control,and I've ran into the trouble of how to control the PMAC and UMAC recently,I downloaded the examples you've posted before,but it seems that the driver and the ActiveX files of the PMAC has already changed that I cannot run you VI even after I setup the PMAC softwares,and I cannot find a similar way to creat VIS like yours,I an really really seriously confused,could you help out,I would be very very appreciate your help,Thanks a lot!

0 Kudos
Message 9 of 14
(6,858 Views)

Reply to the thread that I posted the PMAC VI's, and I will respond there.

0 Kudos
Message 10 of 14
(6,821 Views)