Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem about linear move
#1
Hi,
I attached my setup and motion program below.I am using position compare function, the motion is very simple, just a straight line from one point to another point, but need it move slow, and the position compare woks fine,but I found the move isn’t smooth, I mean, because the motor moves very slow, I can see it moves a little, then stop, then moves a little, then stop…till it reach the position, like it was joggling. When I use rapid move,it move smoothly, but the speed is too fast.I don’t know if I need more setup about linear move.
Here is my setup:
Motor[1].ServoCtrl=1
Motor[2].ServoCtrl=1
Motor[3].ServoCtrl=1
Motor[4].ServoCtrl=1

// Disable overtravel limit inputs when set to 0
// May be needed if there are no physical switches present
//Motor[1].pLimits=Gate1[6].Chan[0].Status.a
//Motor[2].pLimits=Gate1[6].Chan[1].Status.a
//Motor[3].pLimits=Gate1[6].Chan[2].Status.a
//Motor[4].pLimits=Gate1[6].Chan[3].Status.a

// Disable amplifier enable output
// May be needed if channel is also connected to real amplifier
Motor[1].pAmpEnable=0
Motor[2].pAmpEnable=0
Motor[3].pAmpEnable=0
Motor[4].pAmpEnable=0

// Disable amplifier fault input
// May be needed if channel is also connected to real amplifier
Motor[1].pAmpFault=0
Motor[2].pAmpFault=0
Motor[3].pAmpFault=0
Motor[4].pAmpFault=0

// Set derivative gain term in servo loop to zero
// This is a Type 1 servo (single integration); does not need Kvfb
Motor[1].Servo.Kvfb=0
Motor[2].Servo.Kvfb=0
Motor[3].Servo.Kvfb=0
Motor[4].Servo.Kvfb=0

// Lower proportional gain term from default
Motor[1].Servo.Kp=40
Motor[2].Servo.Kp=40
Motor[3].Servo.Kp=40
Motor[4].Servo.Kp=40

// Add Kvff and Ki
Motor[1].Servo.Kvff=40
Motor[2].Servo.Kvff=40
Motor[3].Servo.Kvff=40
Motor[4].Servo.Kvff=40

Motor[1].Servo.Ki=0.001
Motor[2].Servo.Ki=0.001
Motor[3].Servo.Ki=0.001
Motor[4].Servo.Ki=0.001

// Deactivate commutation for all motors
Motor[0].PhaseCtrl=0 // No phase commutation active
Motor[2].PhaseCtrl=0 // No phase commutation active
Motor[3].PhaseCtrl=0 // No phase commutation active
Motor[4].PhaseCtrl=0 // No phase commutation active

Gate1[6].Chan[0].OutputMode=3 //CH1A and CH1B ouputs will be DAC and CH1C output will be PFM
Gate1[6].Chan[1].OutputMode=3 //CH2A and CH2B ouputs will be DAC and CH2C output will be PFM
Gate1[6].Chan[2].OutputMode=3 //CH3A and CH3B ouputs will be DAC and CH3C output will be PFM
Gate1[6].Chan[3].OutputMode=3 //CH4A and CH4B ouputs will be DAC and CH4C output will be PFM

Gate1[6].Chan[0].EncCtrl = 8 //Simulated feedback for channel 1
Gate1[6].Chan[1].EncCtrl = 8 //Simulated feedback for channel 2
Gate1[6].Chan[2].EncCtrl = 8 //Simulated feedback for channel 3
Gate1[6].Chan[3].EncCtrl = 8 //Simulated feedback for channel 4

// Create encoder conversion table entries for all motors
EncTable[1].Type=3
EncTable[1].pEnc=Gate1[6].Chan[2].ServoCapt.a
EncTable[1].pEnc1=Gate1[6].Chan[2].TimeBetweenCts.a
EncTable[1].index1=0
EncTable[1].index2=0
EncTable[1].index3=0
EncTable[1].index4=0
EncTable[1].MaxDelta=0
EncTable[1].ScaleFactor=1/512

EncTable[2].Type=3
EncTable[2].pEnc=Gate1[6].Chan[2].ServoCapt.a
EncTable[2].pEnc1=Gate1[6].Chan[2].TimeBetweenCts.a
EncTable[2].index1=0
EncTable[2].index2=0
EncTable[2].index3=0
EncTable[2].index4=0
EncTable[2].MaxDelta=0
EncTable[2].ScaleFactor=1/512

EncTable[3].Type=3
EncTable[3].pEnc=Gate1[6].Chan[2].ServoCapt.a
EncTable[3].pEnc1=Gate1[6].Chan[2].TimeBetweenCts.a
EncTable[3].index1=0
EncTable[3].index2=0
EncTable[3].index3=0
EncTable[3].index4=0
EncTable[3].MaxDelta=0
EncTable[3].ScaleFactor=1/512

EncTable[4].Type=3
EncTable[4].pEnc=Gate1[6].Chan[2].ServoCapt.a
EncTable[4].pEnc1=Gate1[6].Chan[2].TimeBetweenCts.a
EncTable[4].index1=0
EncTable[4].index2=0
EncTable[4].index3=0
EncTable[4].index4=0
EncTable[4].MaxDelta=0
EncTable[4].ScaleFactor=1/512

// Point motors to encoder conversion table entries
Motor[1].pEnc=EncTable[1].a
Motor[2].pEnc=EncTable[2].a
Motor[3].pEnc=EncTable[3].a
Motor[4].pEnc=EncTable[4].a

Motor[1].pEnc2=EncTable[1].a
Motor[2].pEnc2=EncTable[2].a
Motor[3].pEnc2=EncTable[3].a
Motor[4].pEnc2=EncTable[4].a

Motor[1].pDac=Acc24E2S[6].Chan[0].Pwm[2].a //Command output to CH1A address (default address + 2) for Stepper
Motor[2].pDac=Acc24E2S[6].Chan[1].Pwm[2].a //Command output to CH2A address (default address + 2) for Stepper
Motor[3].pDac=Acc24E2S[6].Chan[2].Pwm[2].a //Command output to CH3C address (default address + 2) for Stepper
Motor[4].pDac=Acc24E2S[6].Chan[3].Pwm[2].a //Command output to CH4C address (default address + 2) for Stepper

Motor[1].JogSpeed=5
Motor[2].JogSpeed=5
Motor[3].JogSpeed=5
Motor[4].JogSpeed=5

//Gate1[6].Chan[0].Pfm=5000
//Gate1[6].Chan[1].Pfm=5000
//Gate1[6].Chan[2].Pfm=5000
//Gate1[6].Chan[3].Pfm=5000

Gate1[6].Chan[0].CompA=400
Gate1[6].Chan[1].CompA=400
Gate1[6].Chan[2].CompA=1
Gate1[6].Chan[3].CompA=400

Gate1[6].Chan[0].CompB=-400
Gate1[6].Chan[1].CompB=-400
Gate1[6].Chan[2].CompB=-1
Gate1[6].Chan[3].CompB=-400

Gate1[6].Chan[0].CompAdd=1600
Gate1[6].Chan[1].CompAdd=1600
Gate1[6].Chan[2].CompAdd=4
Gate1[6].Chan[3].CompAdd=1600

Gate1[6].Chan[0].EquWrite=3
Gate1[6].Chan[1].EquWrite=3
Gate1[6].Chan[2].EquWrite=3
Gate1[6].Chan[3].EquWrite=3

The motion program is:
open prog 1 // Open buffer for entry
linear; // Linear interpolation move mode
abs; // Absolute move mode
ta500; // 1/2-second accel/decel time
ts0; // No S-curve accel/decel time
f5; // Speed of 500 axis units per time unit
X500; // Move X-axis to position of 900 units
dwell2000;
close // Close buffer, end program entry
Reply
#2
It would appear that your tuning (PID) parameters are somewhat arbitrary. These should be arrived at by following the tuning procedure as outlined in the Users Manual and software.
I generally skip the auto tune and tune manually (using the tools provided). It works very well. Other people use the auto tune as a starting point before doing a manual tune.
Properly done, I would compare the results against any other system.
Reply
#3
You have a command of "f5" in your program, which is for 5 axis units per time unit, not 500!

You don't show what your axis unit is (#1->???X) or what your time unit is (default is seconds).

I suspect you are commanding a VERY slow move, and the physical axis is breaking in and out of static friction.

Add a "Gather.Enable=2" to your program before the move (to enable gathering), and a "Gather.Enable=0" after the dwell (to disable). Make sure in the Plot utility that you are gathering both command and actual position, then plot command and actual velocity. I suspect that you will see a nice smooth command velocity profile, but a very rough actual velocity profile. This would indicate a tuning problem, as mbalentine suggests.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)