fixing 5 CAM transformation, higher current for cryojet

This commit is contained in:
2019-01-21 15:42:16 +01:00
parent d19ea28d23
commit 069e7795e5
4 changed files with 240 additions and 17 deletions

View File

@@ -11,6 +11,7 @@ def MX3_coordTrf(fileParser,kwargs):
...
Documentation:
/home/zamofing_t/Documents/doc-ext/SwissFEL/Devices/5CAM/cam_mov7.pdf
'Cam Movers for SLS undulators' (21.5.2013, Calvi, Bruegger, Zimoch)
home/zamofing_t/Documents/doc-ext/DeltaTau/Training/TrainingSlides/22-Power PMAC Cam Tables 2014-04.ppt
Ref Manual: 96-106,488, 527-528, 655
@@ -35,6 +36,10 @@ S=D*X
'''
kw=kwargs
if not kw.has_key('q'):
kw['q']=0.
kw['sqrt2']=sqrt(2.)
fileParser.parse_txt('''
// ---------- Coordinate System/Transformation ----------
@@ -46,9 +51,11 @@ S=D*X
#4->I
#5->I
Coord[1].Ta=100
Coord[1].Td=100
Coord[1].AltFeedRate=1
Coord[1].Ta=10
Coord[1].Td=10
Coord[1].AltFeedRate=1000
Coord[1].Tm=-10000 //1000um/FeedTime -> 1mm/sec
Coord[1].FeedTime=1000 //default value 1000um
Motor[1].MaxSpeed=Motor[1].JogSpeed
Motor[2].MaxSpeed=Motor[2].JogSpeed
Motor[3].MaxSpeed=Motor[3].JogSpeed
@@ -59,10 +66,11 @@ open forward
//define(AA1='L1',AA2='L2',AA3='L3',AA4='L4',AA5='L5')
define(AA1='L2',AA2='L1',AA3='L4',AA4='L5',AA5='L3')
define(r='L6',scl='L7')
define(r='L6',scl='L7',q='L8')
define(S1='L11',S2='L12',S3='L13',S4='L14',S5='L15')
define(X='C6',Y='C7',U='C3',V='C4',W='C5')
r=$height/$width
q=$q
scl=$exc/$sqrt2
S1=scl*cos(AA1*$camSf)
S2=scl*cos(AA2*$camSf)
@@ -75,11 +83,11 @@ open forward
//X=D^-1*S
X=+.5*S1 -.5*S2 +(r+.25)*S3 +(r-.75)*S4 +(.25-r)*$sqrt2*S5
Y=+.5*S1 +.5*S2 +.25*S3 +.25*S4 +.25*$sqrt2*S5
U= +1.*S3 +1.*S4 -1.*$sqrt2*S5
V=-1.*S1 +1.*S2 +1.5*S3 -.5*S4 -.5*$sqrt2*S5
W=-1.*S1 -1.*S2 +.5*S3 +.5*S4 +.5*$sqrt2*S5
X= +.5*S1 -.5*S2 +(r+.75)*S3 +(r-.25)*S4 -(r+.25)*$sqrt2*S5
Y=(1.+q)*.5*S1 +(1.+q)*.5*S2 +(1.-q)*.25*S3 +(1.-q)*.25*S4 +(1.-q)*.25*$sqrt2*S5
U= +1.*S3 +1.*S4 -1.*$sqrt2*S5
V= -1.*S1 +1.*S2 +.5*S3 -1.5*S4 +.5*$sqrt2*S5
W= -1.*S1 -1.*S2 +.5*S3 +.5*S4 +.5*$sqrt2*S5
//send 1"fwd_res %f %f %f %f %f\\n",X,Y,U,V,W
@@ -89,7 +97,7 @@ close
open inverse
//define(AA1='L1',AA2='L2',AA3='L3',AA4='L4',AA5='L5')
define(AA1='L2',AA2='L1',AA3='L4',AA4='L5',AA5='L3')
define(r='L6',scl='L7')
define(r='L6',scl='L7',q='L8')
define(S1='L11',S2='L12',S3='L13',S4='L14',S5='L15')
define(X='C6',Y='C7',U='C3',V='C4',W='C5')
@@ -99,12 +107,13 @@ open inverse
//send 1"inv_inp(%f) %f %f %f %f %f\\n",D0,X,Y,U,V,W
r=$height/$width
q=$q
S1=+.5*X +.5*Y +(.25-.5*r)*U -.25*V -.25*W
S2=-.5*X +.5*Y +(.5*r-.25)*U +.25*V -.25*W
S3=+.5*X +.5*Y +(.25-.5*r)*U +.25*V +.25*W
S4=-.5*X +.5*Y +(.25+.5*r)*U -.25*V +.25*W
S5= .5*$sqrt2*Y -.25*$sqrt2*U +.25*$sqrt2*W
S1=+.5*X +.5*Y -(.25+.5*r)*U -.25*V -.25*(1-q)*W
S2=-.5*X +.5*Y +(.25+.5*r)*U +.25*V -.25*(1-q)*W
S3=+.5*X +.5*Y +(.25-.5*r)*U +.25*V +.25*(1+q)*W
S4=-.5*X +.5*Y +(.25+.5*r)*U -.25*V +.25*(1+q)*W
S5= .5*$sqrt2*Y -.25*$sqrt2*U +.25*$sqrt2*(1+q)*W
scl=$sqrt2/$exc
AA1=acos(S1*scl)/$camSf