04-19-2006 11:44 AM
04-19-2006 12:46 PM
LV1958
We need more inofrmation on your hardware, like make/model of motor and screw. From your code it looks like you are toggling a bit on the digital port to send a pulse to a motor driver. Could it be that the motor driver has a microstepping mode where 1 pulse only provide 1/4 of a step of movement???
By the way, there is no data flow with regards as to when the 50msec delay occurs before or after setting the bit state. So you could get 0, 50, or 100msec delay between bit toggles. I suggest you rectify that situation, or use a counter output on your DAQ card as opposed to a digital output if your hardware has that feature.
04-19-2006 08:47 PM
04-20-2006 04:06 AM
04-20-2006 09:28 AM
04-20-2006 09:30 AM
04-20-2006 09:31 AM
It appears that way...
More fine control, maybe?
04-20-2006 11:21 AM
04-20-2006 11:47 AM
LV1958:
I am at a loss here. Typically a step motor rotates so many degrees/step. It appears the motor on the linear actuator is 7.5 degrees/step based off of 48steps/rev factor you state. 7.5 degress is common for step motors. I cant say why you are a factor of 4 off. When you give the driver one pulse, it should move the motor 1 step unless the driver is in half or micro step mode. I see your driver does support half step mode, make sure that you are not in this mode which could account for 1/2 of your 'error'.
Ignoring rotary motion, what about linear motion? The lead on the motor screw is 0.001"/step. I would suggest you set your loop to 1000 iterations and see how far it travels. If all is correct, it shoud move 1 inch (1000*0.001).
Hope this gives you some 'leads' to go off of.
Again, please take note about my previous comment about data flow and timing delay uncertanty in your code. This could potentially be a source of error. You could always use 4 sequence frames total, 1st for digital bit firing, 2nd for delay, 3rd for digital bit firing, and 4th for delay.
04-20-2006 12:35 PM