diff --git a/Readme.md b/Readme.md
index 5e4f771..ebc7e13 100644
--- a/Readme.md
+++ b/Readme.md
@@ -1463,4 +1463,21 @@ Sys.Udata[0];EncTable[20].PrevEnc
2.1 trigger zu spät
1.9 trigger zu früh
+```
+23.11.23 Changing stages
+------------------------
+```
+https://jira.psi.ch/browse/SFELPHOTON-888
+
+recommissioning exchanged stages. The software must not be changed.
+the cabeling has to change so that it fits as it worked before.
+ SAR-EXPMX:MOT_FX: stages behave totally different not working
+ SAR-EXPMX:MOT_FY: stages behave totally different not working.encoder counts inverse?
+ SAR-EXPMX:MOT_CX: moves in closed loop, limitswitch +- must be swapped
+ SAR-EXPMX:MOT_CZ: moves in closed loop, limitswitch +- must be swapped
+ SAR-EXPMX:MOT_CY: before commissioning check encoder signal Level TTL?
+
+ -> we need the old stage to be able to check and compare each motor step by step.
+
+```
diff --git a/cfg/MX1_setup.cfg b/cfg/MX1_setup.cfg
index 0e75747..887a162 100644
--- a/cfg/MX1_setup.cfg
+++ b/cfg/MX1_setup.cfg
@@ -23,9 +23,16 @@
//Mot 2: Stage X Parker MX80L D11 25mm one pole cycle = 13mm = 2048 phase_step
//Enc 2: Stage X Parker MX80L D11 inc_enc 20nm one pole cycle = 13mm = 650000 enc_step (20nm/enc_step)
+//OLD Stage 3
//Mot 3: Rotation stage LS Mecapion MDM-DC06DNC0H 32 poles = 1 rev = 16*2048=32768 phase_step
//Enc 3: Rotation stage LS Mecapion 1 rev = 1048576 enc_steps
+// OWIS stage HMV 10N-303HiDS 42.N00.30WJ (DC-Mot. mech Endswitch Norm.Closed)
+// 30mm max 12mm/s max 35V max 2.1A 500um/rev 2000enc_cnt/rev Incr. enc with home mark TTL level
+//Mot 3: Stage Y DC-Motor (Brushed DC)
+//Enc 3: Stage Y Incr. Encoder
+
+
//Mot 4: Stage X Stada Stepper 670mA 200 poles 1 rev = 100*2048 phase_step (2 stepper motor)
//Enc 4: Renishaw absolute BiSS
@@ -66,8 +73,9 @@ Motor[1].pEncLoss=0
Motor[2].pEncLoss=0
-//rot stage
-//---------
+
+//rot stage (decomissioned)
+//-------------------------
//use 360'000 for 360 deg as motor unit
//1 rev = 16*2048=32768 phase_step = 1048576 enc_steps
//PhasePosSf= 8*el_cycle/enc_step =8*16/1048576=1./8192
@@ -77,11 +85,23 @@ Motor[2].pEncLoss=0
// Motor 3: 0dB at 18.8Hz Friction 70curr_bits
// Kaff= 1/((18.8*2*np.pi)**2/5000**2 ) = 1791.6970285327388
+//!encoder_sim(enc=3,tbl=11,mot=11,posSf=360000./32768)
+//!encoder_biss(enc=3,tbl=3,mot=3,numBits=20,posSf=360000./1048576)
+//Motor[3].pPhaseEnc=Acc84B[0].Chan[2].SerialEncDataA.a
+//!motor_servo(mot=3,ctrl='ServoCtrl',Kp=10,Kvfb=220,Ki=0.001,Kvff=220,Kaff=1792,MaxInt=1000,Kfff=5)
+//!motor(mot=3,dirCur=0,contCur=1000,peakCur=2000,timeAtPeak=1,IiGain=2,IpfGain=12,IpbGain=12,JogSpeed=180.,numPhase=3,invDir=False,servo=None,PhasePosSf=1./8192,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=3000,WarnFeLimit=1000,InPosBand=10, HomeOffset=228987)
+
+
+//Y stage OWIS
+//------------
+//2000enc/rev 500um/rev
+//1 rev = 2000 enc_cnt = 500um
+// max. 2.1A 36V
+
!encoder_sim(enc=3,tbl=11,mot=11,posSf=360000./32768)
-!encoder_biss(enc=3,tbl=3,mot=3,numBits=20,posSf=360000./1048576)
-Motor[3].pPhaseEnc=Acc84B[0].Chan[2].SerialEncDataA.a
-!motor_servo(mot=3,ctrl='ServoCtrl',Kp=10,Kvfb=220,Ki=0.001,Kvff=220,Kaff=1792,MaxInt=1000,Kfff=5)
-!motor(mot=3,dirCur=0,contCur=1000,peakCur=2000,timeAtPeak=1,IiGain=2,IpfGain=12,IpbGain=12,JogSpeed=180.,numPhase=3,invDir=False,servo=None,PhasePosSf=1./8192,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=3000,WarnFeLimit=1000,InPosBand=10, HomeOffset=228987)
+!encoder_inc(enc=3,tbl=3,mot=3,posSf=13000./650000)
+!motor_servo(mot=3,ctrl='ServoCtrl',Kp=10,Kvfb=0,Ki=0.0,Kvff=0,Kaff=0,MaxInt=1000,Kfff=0)
+!motor(mot=3,dirCur=0,contCur=1000,peakCur=2000,timeAtPeak=1,IiGain=1,IpfGain=3,IpbGain=3,JogSpeed=2.,numPhase=2,invDir=False,servo=None,PhasePosSf=0,PhaseFindingDac=0,PhaseFindingTime=0,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=3000,WarnFeLimit=1000,InPosBand=10,homing='enc-index')
//Stada stage
@@ -90,10 +110,10 @@ Motor[3].pPhaseEnc=Acc84B[0].Chan[2].SerialEncDataA.a
//posSf = userUnits/encoder_steps
//servoSf=motor_u_steps/userUnits
-!encoder_biss(enc=4,numBits=32,posSf=1./20)
-!encoder_biss(enc=5,numBits=32,posSf=1./20)
-!motor(mot=4,current=200,JogSpeed=0.5,invDir=1,servoSf=204.8,InPosBand=1,HomeOffset=39278)
-!motor(mot=5,current=200,JogSpeed=0.5,invDir=1,servoSf=204.8,InPosBand=1,HomeOffset=39736)
+!encoder_biss(enc=4,numBits=32,posSf=-1./20)
+!encoder_biss(enc=5,numBits=32,posSf=-1./20)
+!motor(mot=4,current=200,JogSpeed=0.5,invDir=0,servoSf=204.8,InPosBand=1,HomeOffset=-39278)
+!motor(mot=5,current=200,JogSpeed=0.5,invDir=0,servoSf=204.8,InPosBand=1,HomeOffset=-39736)
//Interferometer 1,2
diff --git a/cfg/MX3_setup.cfg b/cfg/MX3_setup.cfg
index 731669a..4d4fab7 100644
--- a/cfg/MX3_setup.cfg
+++ b/cfg/MX3_setup.cfg
@@ -30,15 +30,22 @@ Motor[5].Servo.BreakPosErr=0
// PKP266D14BA2 1.4A 1.8deb/step
+// encoder: Renishaw: RL26BAT050B050A 26 bit, 50nm/enc_cnt
//!encoder_sim(enc=6)
//!motor(mot=6,dirCur=1400,JogSpeed=40,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
// #6j=102400 -> 1 rev
//#6j=102400 == 1 rev == 102400 enc_cnt == 2000*1um
+//#6j=102400 steps == 1 rev == 2000*20 enc_cnt == 2000*1um
//servoSf : motorusteps/user_units = 102400./2000
-//posSf : user_units/encoder_steps = 2000./102400
+//posSf : user_units/encoder_steps = 0.05nm/1enc_cnt=1/20
+//Open loop
//!encoder_sim(enc=6,posSf=2000./102400,pos2Sf=0)
-!encoder_sim(enc=6,posSf=2000./102400)
-!motor(mot=6,dirCur=1400,servoSf=102400./2000,invDir=False,JogSpeed=2,InPosBand=1,FatalFeLimit=1000,HomeOffset=0.)
+//!encoder_biss(enc=6,tbl=16,mot=16,numBits=26,posSf=1./20)
+//!motor(mot=6,dirCur=1400,servoSf=102400./2000,invDir=False,JogSpeed=2,InPosBand=1,FatalFeLimit=1000,HomeOffset=0.)
+//Closed loop
+!encoder_sim(enc=6,tbl=16,mot=16,posSf=2000./102400)
+!encoder_biss(enc=6,numBits=26,posSf=1./20)
+!motor(mot=6,dirCur=1400,servoSf=102400./2000,invDir=False,JogSpeed=2,InPosBand=1,FatalFeLimit=1000,HomeOffset=1516405.)
// break configuration
diff --git a/cfg/SAR-EXPMX3.cfg b/cfg/SAR-EXPMX3.cfg
index 23ac792..bd6de05 100644
--- a/cfg/SAR-EXPMX3.cfg
+++ b/cfg/SAR-EXPMX3.cfg
@@ -53,6 +53,7 @@ enable plc 1
#1..5dkill
+#6hmz
//motor 1..5 use break setup to kill motor
!holding_current(m6=[0,700])
diff --git a/generate.py b/generate.py
index b69db15..4a3abf2 100755
--- a/generate.py
+++ b/generate.py
@@ -53,8 +53,8 @@ class Generate:
('SLITS:X2' , 'MCS11', 10 , 10 , -10 , 1 , 'mm' , 'S' ) ,
('SLITS:Y1' , 'MCS12', 11 , 10 , -10 , 1 , 'mm' , 'S' ) ,
('SLITS:Y2' , 'MCS13', 12 , 10 , -10 , 1 , 'mm' , 'S' ) ,
- ('XEYE:TX' , 'MCS14', 13 , 10 , -10 , 0 , 'mm' , 'S' ) ,
- ('XEYE:TY' , 'MCS15', 14 , 10 , -10 , 0 , 'mm' , 'S' ) ,
+ ('unused' , 'MCS14', 13 , 10 , -10 , 0 , 'mm' , 'S' ) ,
+ ('unused' , 'MCS15', 14 , 10 , -10 , 0 , 'mm' , 'S' ) ,
),
}
}
@@ -71,9 +71,9 @@ class Generate:
( 'DESC' , 'M' , 'ADDR' , 'DIR' , 'VELO' , 'HVEL' , 'MRES' , 'PREC' , 'EGU' ) ,
( '"Sample F-Trans Y"' , 'MOT_FY' , 1 , 0 , 16 , 2 , 0.001 , 4 , 'mm' ) ,
( '"Sample F-Trans X"' , 'MOT_FX' , 2 , 1 , 16 , 2 , 0.001 , 4 , 'mm' ) ,
- ( '"Rotation Y"' , 'MOT_ROT_Y' , 3 , 0 , 50 , 50 , 0.001 , 4 , 'deg' ) ,
- ( '"Sample C-Trans X"' , 'MOT_CX' , 4 , 1 , 2 , 2 , 0.001 , 4 , 'mm' ) ,
- ( '"Sample C-Trans Z"' , 'MOT_CZ' , 5 , 1 , 2 , 2 , 0.001 , 4 , 'mm' ) ,
+ ( '"Sample C-Trans Y"' , 'MOT_CY' , 3 , 0 , 2 , 2 , 0.001 , 4 , 'mm' ) ,
+ ( '"Sample C-Trans X"' , 'MOT_CX' , 4 , 0 , 2 , 2 , 0.001 , 4 , 'mm' ) ,
+ ( '"Sample C-Trans Z"' , 'MOT_CZ' , 5 , 0 , 2 , 2 , 0.001 , 4 , 'mm' ) ,
( '"Interfero Y"' , 'ENC_FY' , 6 , 0 , 2 , 2 , 0.001 , 4 , 'mm' ) ,
( '"Interfero X"' , 'ENC_FX' , 7 , 0 , 2 , 2 , 0.001 , 4 , 'mm' ) ,
),
@@ -426,7 +426,7 @@ file PPMACMotor.template
for motPar in motLst:
motPar=dict(zip(hdr, motPar))
try:
- motPar['PTYP']=lutPSENS[motPar['PTYP']][1] #idx0 is for MCS1
+ motPar['PTYP']=lutPSENS[motPar['PTYP']][1] #idx1 is for MCS1
except KeyError as e:
if motPar['PTYP']!=0:
_log.info(f'{motPar["PTYP"]} not in lookup table')
diff --git a/qt/ESB_MX_5cam.ui b/qt/ESB_MX_5cam.ui
index 0ee8efb..50c4bc7 100644
--- a/qt/ESB_MX_5cam.ui
+++ b/qt/ESB_MX_5cam.ui
@@ -7,7 +7,7 @@
0
0
776
- 619
+ 798
@@ -48,15 +48,15 @@
20
70
- 725
- 240
+ 731
+ 420
P=$(P),M=MOT_GIR_1;P=$(P),M=MOT_GIR_2;P=$(P),M=MOT_GIR_3;P=$(P),M=MOT_GIR_4;P=$(P),M=MOT_GIR_5;P=$(P),M=MOT_GIR_X;P=$(P),M=MOT_GIR_Y;P=$(P),M=MOT_GIR_U;P=$(P),M=MOT_GIR_V;P=$(P),M=MOT_GIR_W
- ESB_MX_motor.ui
+ PB_motor.ui
10
@@ -195,7 +195,7 @@
20
- 570
+ 750
411
31
@@ -211,7 +211,7 @@
20
- 520
+ 700
451
41
@@ -225,7 +225,7 @@
20
- 320
+ 500
341
194
@@ -1223,7 +1223,7 @@
450
- 330
+ 510
161
31
diff --git a/qt/ESB_MX_SmarAct.ui b/qt/ESB_MX_SmarAct.ui
index 3f42cfc..1cd9d8d 100644
--- a/qt/ESB_MX_SmarAct.ui
+++ b/qt/ESB_MX_SmarAct.ui
@@ -29,7 +29,7 @@
Expert
- Smaract Controller $(S):$(M)
+ Smaract Controller $(P):$(M)
Qt::AlignLeading
@@ -65,7 +65,7 @@
- S=$(S),T=$(T),M=$(M)1;S=$(S),T=$(T),M=$(M)2;S=$(S),T=$(T),M=$(M)3;S=$(S),T=$(T),M=$(M)4;S=$(S),T=$(T),M=$(M)5;S=$(S),T=$(T),M=$(M)6;S=$(S),T=$(T),M=$(M)7;S=$(S),T=$(T),M=$(M)8;S=$(S),T=$(T),M=$(M)9;S=$(S),T=$(T),M=$(M)10;S=$(S),T=$(T),M=$(M)11;S=$(S),T=$(T),M=$(M)12;S=$(S),T=$(T),M=$(M)13;S=$(S),T=$(T),M=$(M)14;S=$(S),T=$(T),M=$(M)15
+ P=$(P),T=$(T),M=$(M)1;P=$(P),T=$(T),M=$(M)2;P=$(P),T=$(T),M=$(M)3;P=$(P),T=$(T),M=$(M)4;P=$(P),T=$(T),M=$(M)5;P=$(P),T=$(T),M=$(M)6;P=$(P),T=$(T),M=$(M)7;P=$(P),T=$(T),M=$(M)8;P=$(P),T=$(T),M=$(M)9;P=$(P),T=$(T),M=$(M)10;P=$(P),T=$(T),M=$(M)11;P=$(P),T=$(T),M=$(M)12;P=$(P),T=$(T),M=$(M)13;P=$(P),T=$(T),M=$(M)14;P=$(P),T=$(T),M=$(M)15
MCS_stage.ui
diff --git a/qt/ESB_MX_exp.ui b/qt/ESB_MX_exp.ui
index 982a7b6..ed50e92 100644
--- a/qt/ESB_MX_exp.ui
+++ b/qt/ESB_MX_exp.ui
@@ -7,7 +7,7 @@
0
0
776
- 640
+ 977
@@ -47,155 +47,26 @@
20
- 70
- 725
- 504
+ 50
+ 731
+ 882
- P=$(P),M=MOT_FY;P=$(P),M=MOT_FX;P=$(P),M=MOT_ROT_Y;P=$(P),M=MOT_CX;P=$(P),M=MOT_CZ;P=$(P),M=MOT_WEDGE1;P=$(P),M=MOT_WEDGE2;P=$(P),M=MOT_WEDGE3;P=$(P),M=MOT_WEDGE4;P=$(P),M=MOT_WEDGEX;P=$(P),M=MOT_WEDGEY;P=$(P),M=MOT_WEDGEA;P=$(P),M=MOT_WEDGEB;P=$(P),M=MOT_BLGT;P=$(P),M=MOT_CRYO;P=$(P),M=MOT_GIR_X;P=$(P),M=MOT_GIR_Y;P=$(P),M=MOT_GIR_U;P=$(P),M=MOT_GIR_V;P=$(P),M=MOT_GIR_W;P=$(P),M=MOT_DET_Z
+ P=$(P),M=MOT_FY;P=$(P),M=MOT_FX;P=$(P),M=MOT_CY;P=$(P),M=MOT_CX;P=$(P),M=MOT_CZ;P=$(P),M=MOT_WEDGE1;P=$(P),M=MOT_WEDGE2;P=$(P),M=MOT_WEDGE3;P=$(P),M=MOT_WEDGE4;P=$(P),M=MOT_WEDGEX;P=$(P),M=MOT_WEDGEY;P=$(P),M=MOT_WEDGEA;P=$(P),M=MOT_WEDGEB;P=$(P),M=MOT_BLGT;P=$(P),M=MOT_CRYO;P=$(P),M=MOT_GIR_X;P=$(P),M=MOT_GIR_Y;P=$(P),M=MOT_GIR_U;P=$(P),M=MOT_GIR_V;P=$(P),M=MOT_GIR_W;P=$(P),M=MOT_DET_Z
- ESB_MX_motor.ui
+ PB_motor.ui
21
-
-
-
- 20
- 50
- 731
- 21
-
-
-
-
- 2
-
- -
-
-
-
- 0
- 0
-
-
-
- DESC
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- VAL
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- RBV
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 25
- 0
-
-
-
-
- 20
- 16777215
-
-
-
- LLS
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 25
- 0
-
-
-
-
- 20
- 16777215
-
-
-
- HLS
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Motors Panels
-
-
- Qt::AlignCenter
-
-
-
-
-
140
- 590
+ 940
120
22
@@ -217,7 +88,7 @@
360
- 590
+ 940
100
22
@@ -239,7 +110,7 @@
260
- 590
+ 940
90
22
@@ -258,7 +129,7 @@
20
- 590
+ 940
120
22
@@ -280,7 +151,7 @@
560
- 590
+ 940
180
31
@@ -303,13 +174,13 @@
- SmarAct;SmarAct (old);Girder;EVR;EVR-simple
+ SmarAct;Girder;EVR;EVR-simple
- ESB_MX_SmarAct.ui;ESB_MX_SmarAct_main.ui;ESB_MX_5cam.ui;G_EVR_main.ui;S_LAS-TMAIN.ui
+ ESB_MX_SmarAct.ui;ESB_MX_5cam.ui;G_EVR_main.ui;S_LAS-TMAIN.ui
- S=SARES30-SMX,M=MCS,T=MCS;P=SARES30-ESBMX;P=$(P);SYS=$(P),DEVICE=EVR0,FF=PCIe;SYS=$(P),DEVICE=EVR0,FF=PCIe
+ P=SARES30-SMX,M=MCS,T=MCS;P=$(P);SYS=$(P),DEVICE=EVR0,FF=PCIe;SYS=$(P),DEVICE=EVR0,FF=PCIe
caRowColMenu::Menu
diff --git a/qt/ESB_MX_motor.ui b/qt/ESB_MX_motor.ui
deleted file mode 100644
index b7c19d9..0000000
--- a/qt/ESB_MX_motor.ui
+++ /dev/null
@@ -1,178 +0,0 @@
-
-
- Form
-
-
-
- 0
- 0
- 725
- 24
-
-
-
- Form
-
-
-
- 2
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 1
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 0
- 0
-
-
-
- $(P):$(M).DESC
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- $(P):$(M).VAL
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- $(P):$(M).RBV
-
-
- true
-
-
-
- -
-
-
-
- 25
- 4
-
-
-
- $(P):$(M).DMOV
-
-
-
- 0
- 85
- 255
-
-
-
-
- -
-
-
-
- 25
- 4
-
-
-
- $(P):$(M).LLS
-
-
-
- -
-
-
-
- 25
- 4
-
-
-
- $(P):$(M).HLS
-
-
-
- -
-
-
- -$(M)
-
-
-
- 128
- 136
- 255
-
-
-
- more;all
-
-
- motorx_more.ui;motorx_all.ui
-
-
- P=$(P):,M=$(M);P=$(P):,M=$(M)
-
-
- caRowColMenu::Menu
-
-
-
-
-
-
-
- caRelatedDisplay
- QWidget
-
-
-
- caTextEntry
- caLineEdit
-
-
-
- caLed
- QWidget
-
-
-
- caLineEdit
- QLineEdit
-
-
-
-
-
-