08-21-2009 03:04 PM
Hello, I am using a PCI-7344 motion controller card to drive 2 stepper motors in closed loop mode. The motors are 2 phase and have a 1.8 degree pitch (200 steps per rev). I have the MID-7602 set to 50 microsteps/steps to allow me to have 10,000 steps per revolution. The linear encoders on the motors are 40,000 counts per revolution. I am trying generate a velocity based ttl signal using the linear encoders of the motors but it is not working. Regardless of my velocity, my encoder count per revolution doesn't change, so I have a constant TTL train independent of my velocity. I would like to create a velocity dependent TTL train. I am trying to synchronize the motor velocity with data sampling. The problem i'm having is that the PCI-7344 and MID-7604 is unable to maintain constant velocity with my motors (velocity fluctuates by approx. 4%). At this point, I am unable to correct for the error in velocity. I would, however like to come up with a way to generate a ttl train (~8kHz) using the the fluctuating velocity, such that if I specify 77.4 rpm is equal to 8kHz, when the stage velocity changes the ttl train changes accordingly.
So this would mean:
75.0 rpm = 7.7320kHz.
77.4 rpm = 8kHz
80.0 rpm = 8.247kHz
I also have 2 PCI-6251 daq boards if I have to use daq-mx...
Any help would be most appreciated. Thanks
David C.
UCSD Bioengineering...
08-22-2009 03:49 PM
08-22-2009 04:43 PM
Hi,
Thank you for your response. So I'm working with an XY microscope stage that comes with encoders for position feedback. I'm currently using a divide by N VI, which uses NI-daqmx counters, to downsample the X-axis motors encoder frequency to a ccd camera's pixel line rate based on stage speed. Synchronizing the the pixel line rate to the stage's velocity allows me to capture images of moving objects without linear motion blur. The problem i'm having is that i'm unable to operate my stage with constant velocity. That is the velocity fluctuates by about 4%. My divide by N counter maintains constant pixel line rate so regardless of stage velocity I get the same pixel line rate, so my images suffer from linear motion blur.
Example...
I set my stages velocity to 77.4 rpm. This is equivalent to 8kHz line rate for my ccd.
As the stage moves, the stage velocity varies from 75.8 to 78.9 rpm in a sine wave fashion. The stage never really hits 77.4 and stays at that value. The ttl line rate I generate from the encoder signal of the axis motor however does maintain the 8kHz line rate that I want to create.
So what I'm looking for is a solution to either generate the right constant velocity I require (77.4 rpm) or a way to have my line rate reflect the true velocity of the stage at any moment in time.This will allow me to truly synchronize image collection with stage motion.
Any help would be greatly appreciated...
08-22-2009 08:14 PM
08-23-2009 10:14 AM
08-23-2009 03:14 PM - edited 08-23-2009 03:16 PM
You can check the signal with the scope, but I would guess that the problem is in the ballscrew. Ballscrews, particularly rolled ones, are known to not be perfect. The sinusoidal variation you are seeing is commonly called drunkeness. That is why load mounted (linear) encoders are required for precise positioning. I think that the best option for you is to use servo motors, and close the position loop with the linear encoder. I am not sure that your controller can do that, but it should be able to. Check with NI for that. You could then split the encoder signal and send it to your camera system DAQ.
Another option would be to use leadscrew compensation. Again, not sure if your controller has that ability. That is basically a table that adds correction factors for various positions along the ballscrew.