08-26-2010 11:07 PM
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.
08-27-2010 04:09 PM
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.
08-27-2010 07:01 PM
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
08-28-2010 08:34 AM
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.
09-01-2010 09:16 PM
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.
09-01-2010 09:29 PM
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?
09-01-2010 09:34 PM
How can u test the encoder using the oscilliscope? the Encoder is inside the case !
09-01-2010 10:08 PM
Wires....coming out of the case. It is the next best thing to breaking an encoder case.
09-01-2010 10:51 PM
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!
09-02-2010 05:18 AM
Reply to the thread that I posted the PMAC VI's, and I will respond there.