tuning Servo Parameters of XY stage without load and horizontal on the table
This commit is contained in:
63
Readme.md
63
Readme.md
@@ -79,4 +79,67 @@ Tested with shapepath.py: THE BEST TRAJECTORY RESULT IST WITH PVT MOTION
|
||||
|
||||
|
||||
|
||||
Optimize/Test Parameters with Parker Stage
|
||||
------------------------------------------
|
||||
|
||||
cd /home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/cfg
|
||||
gpasciiCommander --host SAROP11-CPPM-MOT6871 -i
|
||||
!mx-stage()
|
||||
#1..3$
|
||||
&1
|
||||
#1..3j/
|
||||
|
||||
load program prg/testPerfGrid.prg
|
||||
b2r
|
||||
|
||||
cd ~/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/src/usrServo
|
||||
make #will install the user servo loop
|
||||
watch P3000 (average following error)
|
||||
tweak servo parameters ->!motor_servo(mot=3,ctrl='ServoCtrl',Kp=20,Kvfb=220,Ki=0.02,Kvff=240,Kaff=1500,MaxInt=1000)
|
||||
|
||||
Same for motor 2 -> watcp P2000
|
||||
Increase load will need an increase of gains to compensate following error
|
||||
|
||||
Motor[2].Servo.Kp=20
|
||||
Motor[2].Servo.Kvfb=1000
|
||||
Motor[2].Servo.Ki=0.07
|
||||
Motor[2].Servo.Kvff=1000
|
||||
Motor[2].Servo.Kaff=4000
|
||||
|
||||
|
||||
Motor[3].Servo.Kp=20
|
||||
Motor[3].Servo.Kvfb=220
|
||||
Motor[3].Servo.Ki=0.02
|
||||
Motor[3].Servo.Kvff=240
|
||||
Motor[3].Servo.Kaff=1500
|
||||
|
||||
./shapepath.py --yx
|
||||
average error x 0.313575 um, y 0.461707 um, 0.629583 um
|
||||
|
||||
./shapepath.py
|
||||
average error x 0.371877 um, y 0.317152 um, 0.542073 um
|
||||
|
||||
|
||||
|
||||
Start motion on external signal
|
||||
-------------------------------
|
||||
|
||||
open plc 1
|
||||
Coord[1].DesTimeBase=0 // freezes timebase at boot
|
||||
while(1)
|
||||
{
|
||||
if(PowerBrick[0].GpioData[0].0.1==1)
|
||||
{
|
||||
PowerBrick[0].GpioData[0].16.8=255
|
||||
Coord[1].DesTimeBase=Sys.ServoPeriod
|
||||
}
|
||||
else
|
||||
{
|
||||
PowerBrick[0].GpioData[0].16.8=7
|
||||
Coord[1].DesTimeBase=0
|
||||
}
|
||||
}
|
||||
close
|
||||
enable plc 1
|
||||
-> run motion program. press gpio 0 to run at 100%
|
||||
|
||||
|
||||
Reference in New Issue
Block a user