From 2f3744282890289cd442a0a590a49be453e0ab4c Mon Sep 17 00:00:00 2001 From: Thierry Zamofing Date: Tue, 14 Aug 2018 11:59:01 +0200 Subject: [PATCH] tweak xy stage part1 --- Readme.md | 27 +++++++++++++++++++++++++++ SAR-EXPMX2.subs | 20 ++++++++++---------- cfg/MX1_setup.cfg | 12 ++++++------ cfg/MX2_home.cfg | 2 +- python/shapepath.py | 2 +- qt/ESB_MX_exp.ui | 6 +++--- 6 files changed, 48 insertions(+), 21 deletions(-) diff --git a/Readme.md b/Readme.md index ebd8bdc..faf3e7b 100644 --- a/Readme.md +++ b/Readme.md @@ -960,4 +960,31 @@ Alles bündig bei je 67mm m3 -330 m4 1900 +Wedge Mover Limits: +X -2.13 .. 1.5 +Y -1.68 .. 2.28 +Individual motor limits: +Y-Min (moving until all limits kick in) +#1..4p +19594 16978 22575.5 21962 + +Y-Max +#1..4p +-23962.5 -23414 -22669 -22413 + +right: +#1..4p +-2023 2049 -3362 3379 + +left +#1..4p +3017 -3170 1415.5 -1693 + + +Y: -1.67 + +B : +T +L +R diff --git a/SAR-EXPMX2.subs b/SAR-EXPMX2.subs index 0df5419..8c1ed67 100644 --- a/SAR-EXPMX2.subs +++ b/SAR-EXPMX2.subs @@ -17,14 +17,14 @@ file asyn.template {{P="$(P_M)2", PORT=$(PORT_M)}} file PPMACMotor.template { pattern{ DESC , P , M , PORT , ADDR, DIR, VELO, HVEL, ACCL, JAR, MRES , PREC, EGU , DHLM, DLLM} - { "Wedge 1" , "$(P_M)", "MOT_WEDGE1", "$(PORT_M)", 1 , 0 , 1. , .5 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 } - { "Wedge 2" , "$(P_M)", "MOT_WEDGE2", "$(PORT_M)", 2 , 0 , 1. , .5 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 } - { "Wedge 3" , "$(P_M)", "MOT_WEDGE3", "$(PORT_M)", 3 , 0 , 1. , .5 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 } - { "Wedge 4" , "$(P_M)", "MOT_WEDGE4", "$(PORT_M)", 4 , 0 , 1. , .5 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 } - { "Wedge X" , "$(P_M)", "MOT_WEDGEX", "$(PORT_M)", 9 , 0 , 1. , .5 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 } - { "Wedge Y" , "$(P_M)", "MOT_WEDGEY", "$(PORT_M)", 10 , 0 , 1. , .5 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 } - { "Wedge A" , "$(P_M)", "MOT_WEDGEA", "$(PORT_M)", 11 , 0 , 1. , .5 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 } - { "Wedge B" , "$(P_M)", "MOT_WEDGEB", "$(PORT_M)", 12 , 0 , 1. , .5 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 } - { "Backlight", "$(P_M)", "MOT_BLGT" , "$(PORT_M)", 5 , 1 , 40E3, 20E3, 0.1 , 20 , -1 , 0 , "usr", 0 , 0 } - { "Cryojet" , "$(P_M)", "MOT_CRYO" , "$(PORT_M)", 6 , 1 , 10., 5. , 0.1 , 20 , -0.001, 3 , "mm", 0 , 0 } + { "Wedge 1" , "$(P_M)", "MOT_WEDGE1", "$(PORT_M)", 1 , 0 , 1. , .5 , 0.1 , 20 , 0.001, 3 , "mm" , 0 , 0 } + { "Wedge 2" , "$(P_M)", "MOT_WEDGE2", "$(PORT_M)", 2 , 0 , 1. , .5 , 0.1 , 20 , 0.001, 3 , "mm" , 0 , 0 } + { "Wedge 3" , "$(P_M)", "MOT_WEDGE3", "$(PORT_M)", 3 , 0 , 1. , .5 , 0.1 , 20 , 0.001, 3 , "mm" , 0 , 0 } + { "Wedge 4" , "$(P_M)", "MOT_WEDGE4", "$(PORT_M)", 4 , 0 , 1. , .5 , 0.1 , 20 , 0.001, 3 , "mm" , 0 , 0 } + { "Wedge X" , "$(P_M)", "MOT_WEDGEX", "$(PORT_M)", 9 , 1 , 1. , .5 , 0.1 , 20 , 0.001, 3 , "mm" , 0 , 0 } + { "Wedge Y" , "$(P_M)", "MOT_WEDGEY", "$(PORT_M)", 10 , 0 , 1. , .5 , 0.1 , 20 , 0.001, 3 , "mm" , 0 , 0 } + { "Wedge A" , "$(P_M)", "MOT_WEDGEA", "$(PORT_M)", 11 , 0 , 1. , .5 , 0.1 , 20 , 0.001, 3 , "mm" , 0 , 0 } + { "Wedge B" , "$(P_M)", "MOT_WEDGEB", "$(PORT_M)", 12 , 1 , 1. , .5 , 0.1 , 20 , 0.001, 3 , "mm" , 0 , 0 } + { "Backlight", "$(P_M)", "MOT_BLGT" , "$(PORT_M)", 5 , 1 , 40E3, 20E3, 0.1 , 20 , 1 , 0 , "usr", 0 , 0 } + { "Cryojet" , "$(P_M)", "MOT_CRYO" , "$(PORT_M)", 6 , 1 , 10., 5. , 0.1 , 20 , 0.001, 3 , "mm", 0 , 0 } } diff --git a/cfg/MX1_setup.cfg b/cfg/MX1_setup.cfg index 4e7ce0d..6f46587 100644 --- a/cfg/MX1_setup.cfg +++ b/cfg/MX1_setup.cfg @@ -45,10 +45,10 @@ //use um as motor unit !encoder_sim(enc=1,tbl=9,mot=9,posSf=13000./2048) !encoder_inc(enc=1,tbl=1,mot=1,posSf=13000./650000) -//!motor_servo(mot=1,ctrl='ServoCtrl',Kp=20,Kvfb=1000,Ki=0.07,Kvff=1000,Kaff=4000,MaxInt=1000) -//!motor_servo(mot=1,ctrl='ServoCtrl',Kp=20,Kvfb=220,Ki=0.02,Kvff=240,Kaff=1500,MaxInt=1000) !motor_servo(mot=1,ctrl='ServoCtrl',Kp=25,Kvfb=400,Ki=0.02,Kvff=350,Kaff=5000,MaxInt=1000) -!motor(mot=1,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=10.,numPhase=3,invDir=True,servo=None,PhasePosSf=1./81250,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=200,WarnFeLimit=100,InPosBand=2,homing='enc-index') +!motor(mot=1,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=5,IpfGain=8,IpbGain=8,JogSpeed=10.,numPhase=3,invDir=True,servo=None,PhasePosSf=1./81250,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=200,WarnFeLimit=100,InPosBand=2,homing='enc-index') + + //Stage X Parker MX80L (top stage, mounted on Y stage) @@ -57,12 +57,12 @@ // 1 el_step = 13mm = 2048 phase_step = 166400000 PhaseCapt =256*650000 (256=scaling of encTable) // -> PhasePosSf=(2048*el_cycle)/(256*enc_step) = 8*el_cycle/enc_step =2048*1/(256*650000)=8*1/650000=1./81250=1.23077e-05 //2048 phase_step =166400000 PhaseCapt -> PhasePosSf = 2048/166400000= 2048./(256*650000) +//PhaseFreq=20000,PhasePerServo=1 -> Kvfb=220*4 Ki/=4,Kvff*=4,Kaff*=4*4 !encoder_sim(enc=2,tbl=10,mot=10,posSf=13000./2048) !encoder_inc(enc=2,tbl=2,mot=2,posSf=13000./650000) -!motor_servo(mot=2,ctrl='ServoCtrl',Kp=18,Kvfb=220,Ki=0.02,Kvff=240,Kaff=1500,MaxInt=1000) -//PhaseFreq=20000,PhasePerServo=1 -> Kvfb=220*4 Ki/=4,Kvff*=4,Kaff*=4*4 -!motor(mot=2,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=10.,numPhase=3,invDir=True,servo=None,PhasePosSf=1./81250,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=200,WarnFeLimit=100,InPosBand=2,homing='enc-index') +!motor_servo(mot=2,ctrl='ServoCtrl',Kp=22,Kvfb=350,Ki=0.02,Kvff=240,Kaff=1500,MaxInt=1000) +!motor(mot=2,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=5,IpfGain=8,IpbGain=8,JogSpeed=10.,numPhase=3,invDir=True,servo=None,PhasePosSf=1./81250,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=200,WarnFeLimit=100,InPosBand=2,homing='enc-index') //rot stage diff --git a/cfg/MX2_home.cfg b/cfg/MX2_home.cfg index da9a1b5..1cc69ef 100644 --- a/cfg/MX2_home.cfg +++ b/cfg/MX2_home.cfg @@ -17,7 +17,7 @@ open plc PLC_Homing Motor[3].HomeVel=0.5 Motor[4].HomeVel=0.5 status=1 - + while(1) { if((Motor[1].LimitStop==1 || Motor[1].FeFatal==1)){ diff --git a/python/shapepath.py b/python/shapepath.py index 0c3d1b8..89431ef 100755 --- a/python/shapepath.py +++ b/python/shapepath.py @@ -85,7 +85,7 @@ class ShapePath: #cfg = {"sequencer": ['gen_grid_points(w=2,h=2,pitch=10000,rnd=0)', 'sort_points()','gen_prog(file="'+fn+'.prg",host="SAR-CPPM-EXPMX1",mode=1,pt2pt_time=1000)', 'plot_gather("'+fn+'.npz")']} #cfg = {"sequencer": ['gen_grid_points(w=20,h=20,pitch=50,rnd=0.2)', 'sort_points()','gen_prog(file="'+fn+'.prg",host="SAR-CPPM-EXPMX1",mode=1,pt2pt_time=10,acq_per=10)', 'plot_gather("'+fn+'.npz")']} #cfg = {"sequencer": ['gen_rand_points(n=400, scale=1000)', 'sort_points()','gen_prog(file="'+fn+'.prg",host="SAR-CPPM-EXPMX1",mode=1,pt2pt_time=10)', 'plot_gather("'+fn+'.npz")']} - cfg = {"sequencer": ['gen_grid_points(w=10,h=10,pitch=100,rnd=0.4)', 'sort_points()','gen_prog(file="'+fn+'.prg",host="SAR-CPPM-EXPMX1",mode=1,pt2pt_time=10,cnt=1)', 'plot_gather("'+fn+'.npz")']} + cfg = {"sequencer": ['gen_grid_points(w=40,h=40,pitch=100,rnd=0.4)', 'sort_points()','gen_prog(file="'+fn+'.prg",host="SAR-CPPM-EXPMX1",mode=1,pt2pt_time=10,cnt=1)', 'plot_gather("'+fn+'.npz")']} #cfg = {"sequencer":['gen_rand_points(n=400, scale=1000)','sort_points()','gen_prog(file="'+fn+'.prg",host="SAR-CPPM-EXPMX1",mode=1,pt2pt_time=20,acq_per=10)','plot_gather("'+fn+'.npz")']} #cfg = {"sequencer": ['gen_swissfel_points(scale=300)','gen_prog(file="'+fn+'.prg",host="SAR-CPPM-EXPMX1",mode=1,pt2pt_time=100,acq_per=10)', 'plot_gather("'+fn+'.npz")']} #cfg = {"sequencer": ['opt_pts("'+fn+'.npz")','gen_prog(file="'+fn+'_corr.prg",host="SAR-CPPM-EXPMX1",mode=1,pt2pt_time=10,cnt=1)', 'plot_gather("'+fn+'_corr.npz")']} diff --git a/qt/ESB_MX_exp.ui b/qt/ESB_MX_exp.ui index 8a72a79..4e3b879 100644 --- a/qt/ESB_MX_exp.ui +++ b/qt/ESB_MX_exp.ui @@ -278,10 +278,10 @@ P=$(P),M=MOT_GIR_W $(P):MOT_BLGT - 28000 + -29000 - -2000 + 0 @@ -297,7 +297,7 @@ P=$(P),M=MOT_GIR_W Home BkLight - $(P):MOT_BLGT.HOMF + $(P):MOT_BLGT.HOMR 1