diff --git a/cfg/MX1_home.cfg b/cfg/MX1_home.cfg
index 3012fef..fade213 100644
--- a/cfg/MX1_home.cfg
+++ b/cfg/MX1_home.cfg
@@ -1,4 +1,5 @@
define(PLC_Homing='1')
+define(PLC_HomingCY='2')
define(statusHoming='P100')
statusHoming=0
@@ -133,3 +134,39 @@ N1: //ENDPLC
disable plc PLC_Homing
close
+
+
+open plc PLC_HomingCY
+ define(timer='L1')
+ statusHoming=0
+ if (Motor[3].PlusLimit==1){
+ jog3:-2000 // move out of limit switch
+ statusHoming|=16
+ while(Motor[3].DesVelZero!=0){}
+ }
+
+ Motor[3].pLimits=0
+ Motor[3].HomeVel=1
+ Motor[3].HomeOffset=-1000
+ timer = Sys.RunTime + 2. ;while (Sys.RunTime < timer){} //wait x sec
+ statusHoming|=1
+ home3 //homing to +lim, moving to relative position HomeOffset=-1000 and set this position to 0
+ timer = Sys.RunTime + .5 ;while (Sys.RunTime < timer){} //wait x sec
+ while(Motor[3].HomeInProgress){}
+ if(Motor[3].HomeComplete)
+ statusHoming=statusHoming|2
+ else
+ {
+ statusHoming|=256
+ send 1"CY_Achse home failed\n"
+ }
+
+ statusHoming|=4
+ timer = Sys.RunTime + 1.;while (Sys.RunTime < timer){} //wait x sec
+ Motor[3].pLimits=PowerBrick[0].Chan[2].Status.a //seset limit switches
+ Motor[3].HomePos-=14000 //set this position to 14000um
+ //timer = Sys.RunTime + 2.;while (Sys.RunTime < timer){} //wait x sec
+ //jog3:-1000 // move 1000um out of limit switch
+ statusHoming|=8
+ disable plc PLC_HomingCY
+close
\ No newline at end of file
diff --git a/cfg/MX1_setup.cfg b/cfg/MX1_setup.cfg
index 36d6996..a9cbd7f 100644
--- a/cfg/MX1_setup.cfg
+++ b/cfg/MX1_setup.cfg
@@ -106,13 +106,13 @@ Motor[2].pEncLoss=0
//!encoder_inc(enc=3,tbl=11,mot=11,posSf=1)
!encoder_inc(enc=3,tbl=3,mot=3,posSf=0.25)
!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=12.,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')
+!motor(mot=3,dirCur=0,contCur=1000,peakCur=2000,timeAtPeak=1,IiGain=1,IpfGain=3,IpbGain=3,JogSpeed=12.,numPhase=2,invDir=False,servo=None,PhasePosSf=0,PhaseFindingDac=0,PhaseFindingTime=0,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=3000,WarnFeLimit=1000,InPosBand=50,homing='hi-limit',FaultMode=0)
Motor[3].Servo.Kp=20
Motor[3].Servo.BreakPosErr=1
Motor[3].Servo.KBreak=10
Motor[3].Servo.Ki=0
-Motor[3].Servo.OutDbOn=150
-Motor[3].Servo.OutDbOff=150
+Motor[3].Servo.OutDbOn=50
+Motor[3].Servo.OutDbOff=50
//Motor[3].Servo.Kp=80
//Motor[3].Servo.BreakPosErr=0
@@ -145,7 +145,7 @@ Motor[3].Servo.OutDbOff=150
!encoder_inc(enc=6,tbl=6,mot=6 ,posSf=.01) //1 incr=10nm -> posSf=.01 to scale to um
!encoder_inc(enc=7,tbl=7,mot=7 ,posSf=-.01) //1 incr=10nm,inverse direction -> posSf=.01 to scale to um
-#3,4,5hmz
+#4,5hmz
//holding current
!holding_current(m4=[0,240],m5=[0,240])
diff --git a/cfg/MX3_setup.cfg b/cfg/MX3_setup.cfg
index 4d4fab7..0ce890c 100644
--- a/cfg/MX3_setup.cfg
+++ b/cfg/MX3_setup.cfg
@@ -45,7 +45,7 @@ Motor[5].Servo.BreakPosErr=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.)
+!motor(mot=6,dirCur=1400,servoSf=102400./2000,invDir=False,JogSpeed=2,InPosBand=1,FatalFeLimit=1000,HomeOffset=1684405.)
// break configuration
diff --git a/evr_PCIe-300DC.subs b/evr_PCIe-300DC.subs
index 10af1a9..a2c0e43 100644
--- a/evr_PCIe-300DC.subs
+++ b/evr_PCIe-300DC.subs
@@ -69,7 +69,7 @@ file "$(mrfioc2_TEMPLATES=db)/evr-pcie-300DC.db"
Pul1-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
Pul1-Ena-Sel=1, #0 = Disabled, 1 = Enabled
Pul1-Polarity-Sel=1, #0 = Active High, 1 = Active Low
- Pul1-Delay-SP=1992.8, #Pulser delay in us
+ Pul1-Delay-SP=750, #Pulser delay in us
Pul1-Width-SP=5000, #Pulser width in us
Pul1-Prescaler-SP=1, #0-65535 : Pulser prescaler
@@ -404,7 +404,7 @@ pattern { EVT, FUNC }
#
file "$(mrfioc2_TEMPLATES=db)/evr-pulserMap.template"{
pattern {PID F, EVT, ID}
- {0, Trig, 254, 0 } # ESB JF-Start
+ {0, Trig, 214, 0 } # ESB JF-Start
{1, Trig, 40, 0 } # ESB JF-Acquire frame
{2, Trig, 22, 0 } # ESA laser diag-1
{3, Trig, 0, 0 }
diff --git a/qt/ESB_MX_exp.ui b/qt/ESB_MX_exp.ui
index ffd1d01..4ef853b 100644
--- a/qt/ESB_MX_exp.ui
+++ b/qt/ESB_MX_exp.ui
@@ -7,7 +7,7 @@
0
0
720
- 680
+ 695
@@ -192,6 +192,28 @@
false;false;false;false;false;false;false;false;false;false;false;false;false;false;false;false
+
+
+
+ 10
+ 660
+ 120
+ 22
+
+
+
+ Homing CY stage
+
+
+ $(P):asyn1.AOUT
+
+
+ Homing CY stage
+
+
+ enable plc 2
+
+