homing plc and fixes
This commit is contained in:
167
PBinspect.pbi
167
PBinspect.pbi
@@ -24,45 +24,134 @@
|
|||||||
[
|
[
|
||||||
"WatchListCtrl",
|
"WatchListCtrl",
|
||||||
[
|
[
|
||||||
["EncTable[1].PrevEnc",null],
|
[
|
||||||
["Motor[1].Pos","lambda v: '%.8g'%float(v)"],
|
"Motor[1].idCmd",
|
||||||
["Motor[1].DesPos","lambda v: '%.8g'%float(v)"],
|
"lambda v: '%.8g'%float(v)"
|
||||||
["Motor[1].PosError","lambda v: '%.8g'%float(v)"],
|
],
|
||||||
["Motor[1].Servo.Integrator","lambda v: '%.8g'%float(v)"],
|
[
|
||||||
["Motor[1].ServoOut","lambda v: '%.8g'%float(v)"],
|
"Motor[1].iqCmd",
|
||||||
["Motor[1].idCmd","lambda v: '%.8g'%float(v)"],
|
"lambda v: '%.8g'%float(v)"
|
||||||
["Motor[1].iqCmd","lambda v: '%.8g'%float(v)"],
|
],
|
||||||
["Motor[1].idMeas","lambda v: '%.8g'%float(v)"],
|
[
|
||||||
["Motor[1].iqMeas","lambda v: '%.8g'%float(v)"],
|
"Motor[1].idMeas",
|
||||||
["Motor[1].iaMeas","lambda v: '%.8g'%float(v)"],
|
"lambda v: '%.8g'%float(v)"
|
||||||
["Motor[1].ibMeas","lambda v: '%.8g'%float(v)"],
|
],
|
||||||
["Motor[1].I2tSum","lambda v: '%.8g'%float(v)"],
|
[
|
||||||
["EncTable[2].PrevEnc",null],
|
"Motor[1].iqMeas",
|
||||||
["Motor[2].Pos","lambda v: '%.8g'%float(v)"],
|
"lambda v: '%.8g'%float(v)"
|
||||||
["Motor[2].DesPos","lambda v: '%.8g'%float(v)"],
|
],
|
||||||
["Motor[2].PosError","lambda v: '%.8g'%float(v)"],
|
[
|
||||||
["Motor[2].Servo.Integrator","lambda v: '%.8g'%float(v)"],
|
"EncTable[2].PrevEnc",
|
||||||
["Motor[2].ServoOut","lambda v: '%.8g'%float(v)"],
|
null
|
||||||
["Motor[2].idCmd","lambda v: '%.8g'%float(v)"],
|
],
|
||||||
["Motor[2].iqCmd","lambda v: '%.8g'%float(v)"],
|
[
|
||||||
["Motor[2].idMeas","lambda v: '%.8g'%float(v)"],
|
"Motor[2].Pos",
|
||||||
["Motor[2].iqMeas","lambda v: '%.8g'%float(v)"],
|
"lambda v: '%.8g'%float(v)"
|
||||||
["Motor[2].iaMeas","lambda v: '%.8g'%float(v)"],
|
],
|
||||||
["Motor[2].ibMeas","lambda v: '%.8g'%float(v)"],
|
[
|
||||||
["Motor[2].I2tSum","lambda v: '%.8g'%float(v)"],
|
"Motor[2].DesPos",
|
||||||
["EncTable[3].PrevEnc",null],
|
"lambda v: '%.8g'%float(v)"
|
||||||
["Motor[3].Pos","lambda v: '%.8g'%float(v)"],
|
],
|
||||||
["Motor[3].DesPos","lambda v: '%.8g'%float(v)"],
|
[
|
||||||
["Motor[3].PosError","lambda v: '%.8g'%float(v)"],
|
"Motor[2].PosError",
|
||||||
["Motor[3].Servo.Integrator","lambda v: '%.8g'%float(v)"],
|
"lambda v: '%.8g'%float(v)"
|
||||||
["Motor[3].ServoOut","lambda v: '%.8g'%float(v)"],
|
],
|
||||||
["Motor[3].idCmd","lambda v: '%.8g'%float(v)"],
|
[
|
||||||
["Motor[3].iqCmd","lambda v: '%.8g'%float(v)"],
|
"Motor[2].Servo.Integrator",
|
||||||
["Motor[3].idMeas","lambda v: '%.8g'%float(v)"],
|
"lambda v: '%.8g'%float(v)"
|
||||||
["Motor[3].iqMeas","lambda v: '%.8g'%float(v)"],
|
],
|
||||||
["Motor[3].iaMeas","lambda v: '%.8g'%float(v)"],
|
[
|
||||||
["Motor[3].ibMeas","lambda v: '%.8g'%float(v)"],
|
"Motor[2].ServoOut",
|
||||||
["Motor[3].I2tSum","lambda v: '%.8g'%float(v)"]
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[2].idCmd",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[2].iqCmd",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[2].idMeas",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[2].iqMeas",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[2].iaMeas",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[2].ibMeas",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[2].I2tSum",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"EncTable[3].PrevEnc",
|
||||||
|
null
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[3].Pos",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[3].DesPos",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[3].PosError",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[3].Servo.Integrator",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[3].ServoOut",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[3].idCmd",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[3].iqCmd",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[3].idMeas",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[3].iqMeas",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[3].iaMeas",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[3].ibMeas",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Motor[3].I2tSum",
|
||||||
|
"lambda v: '%.8g'%float(v)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"P2000",
|
||||||
|
null
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"P3000",
|
||||||
|
null
|
||||||
|
]
|
||||||
],
|
],
|
||||||
"name=w;caption=watch;state=67377148;dir=4;layer=0;row=1;pos=0;prop=100000;bestw=200;besth=369;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=221;floaty=858;floatw=208;floath=377;notebookid=-1;transparent=255"
|
"name=w;caption=watch;state=67377148;dir=4;layer=0;row=1;pos=0;prop=100000;bestw=200;besth=369;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=221;floaty=858;floatw=208;floath=377;notebookid=-1;transparent=255"
|
||||||
],
|
],
|
||||||
|
|||||||
68
cfg/init.cfg
Normal file
68
cfg/init.cfg
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
define(PLC_Homing='1')
|
||||||
|
|
||||||
|
open subprog 12
|
||||||
|
enable plc PLC_Homing
|
||||||
|
close
|
||||||
|
|
||||||
|
open plc PLC_Homing
|
||||||
|
define(status='P100',timer='P101')
|
||||||
|
|
||||||
|
L20=Motor[2].MaxDac
|
||||||
|
Motor[2].MaxDac=500
|
||||||
|
L21=Motor[2].FatalFeLimit
|
||||||
|
Motor[2].FatalFeLimit=2000
|
||||||
|
L22=Motor[2].JogSpeed
|
||||||
|
Motor[2].JogSpeed=1
|
||||||
|
|
||||||
|
L30=Motor[3].MaxDac
|
||||||
|
Motor[3].MaxDac=500
|
||||||
|
L31=Motor[3].FatalFeLimit
|
||||||
|
Motor[3].FatalFeLimit=2000
|
||||||
|
L32=Motor[3].JogSpeed
|
||||||
|
Motor[3].JogSpeed=1
|
||||||
|
|
||||||
|
|
||||||
|
Motor[2].PhaseFindingStep=1
|
||||||
|
Motor[3].PhaseFindingStep=1
|
||||||
|
timer = Sys.RunTime + 1;while (Sys.RunTime < timer){} //wait 1 sec
|
||||||
|
|
||||||
|
Motor[2].HomeVel=2
|
||||||
|
Motor[3].HomeVel=2
|
||||||
|
|
||||||
|
P200=Motor[2].HomeInProgress
|
||||||
|
home2
|
||||||
|
home3
|
||||||
|
timer = Sys.RunTime + 1;while (Sys.RunTime < timer){} //wait 1 sec
|
||||||
|
P201=Motor[2].HomeInProgress
|
||||||
|
|
||||||
|
status=1
|
||||||
|
while(1)
|
||||||
|
{
|
||||||
|
if(Motor[2].FeFatal && (status&2)==0)
|
||||||
|
{
|
||||||
|
status=status|2
|
||||||
|
Motor[2].HomeVel=-Motor[2].HomeVel
|
||||||
|
home2
|
||||||
|
}
|
||||||
|
if(Motor[3].HomeInProgress==0 && (status&4)==0)
|
||||||
|
{
|
||||||
|
status=status|4
|
||||||
|
Motor[3].HomeVel=-Motor[3].HomeVel
|
||||||
|
home3
|
||||||
|
}
|
||||||
|
if(Motor[2].HomeInProgress==0 && Motor[3].HomeInProgress==0)
|
||||||
|
{
|
||||||
|
status=status|8
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Motor[2].MaxDac=L20
|
||||||
|
Motor[2].FatalFeLimit=L21
|
||||||
|
Motor[2].JogSpeed=L22
|
||||||
|
Motor[3].MaxDac=L30
|
||||||
|
Motor[3].FatalFeLimit=L31
|
||||||
|
Motor[3].JogSpeed=L32
|
||||||
|
|
||||||
|
disable plc PLC_Homing
|
||||||
|
close
|
||||||
71
cfg/init_limit.cfg
Normal file
71
cfg/init_limit.cfg
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
//home by bove to physical limits and set these to -5000um
|
||||||
|
|
||||||
|
define(PLC_Homing='1')
|
||||||
|
|
||||||
|
open plc PLC_Homing
|
||||||
|
define(status='P100',timer='P101')
|
||||||
|
|
||||||
|
L20=Motor[2].MaxDac
|
||||||
|
Motor[2].MaxDac=500
|
||||||
|
L21=Motor[2].FatalFeLimit
|
||||||
|
Motor[2].FatalFeLimit=2000
|
||||||
|
L22=Motor[2].JogSpeed
|
||||||
|
Motor[2].JogSpeed=1
|
||||||
|
|
||||||
|
L30=Motor[3].MaxDac
|
||||||
|
Motor[3].MaxDac=500
|
||||||
|
L31=Motor[3].FatalFeLimit
|
||||||
|
Motor[3].FatalFeLimit=2000
|
||||||
|
L32=Motor[3].JogSpeed
|
||||||
|
Motor[3].JogSpeed=1
|
||||||
|
|
||||||
|
|
||||||
|
Motor[2].PhaseFindingStep=1
|
||||||
|
Motor[3].PhaseFindingStep=1
|
||||||
|
timer = Sys.RunTime + 1;while (Sys.RunTime < timer){} //wait 1 sec
|
||||||
|
|
||||||
|
jog-2; jog-3;
|
||||||
|
|
||||||
|
status=1
|
||||||
|
while(1)
|
||||||
|
{
|
||||||
|
if(Motor[2].FeWarn==1 && (status&2)==0)
|
||||||
|
{
|
||||||
|
status=status|2
|
||||||
|
jog/2
|
||||||
|
Motor[2].PhasePos=310
|
||||||
|
Motor[2].HomePos=Motor[2].ActPos+5000
|
||||||
|
jog2=0
|
||||||
|
}
|
||||||
|
if(Motor[3].FeWarn==1 && (status&4)==0)
|
||||||
|
{
|
||||||
|
status=status|4
|
||||||
|
jog/3
|
||||||
|
Motor[3].PhasePos=1210
|
||||||
|
Motor[3].HomePos=Motor[3].ActPos+5000
|
||||||
|
jog3=0
|
||||||
|
}
|
||||||
|
if(status==7)
|
||||||
|
{
|
||||||
|
status=status|8
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
timer = Sys.RunTime + 2
|
||||||
|
while (Sys.RunTime < timer){} //wait 2 sec
|
||||||
|
status=100
|
||||||
|
timer = Sys.RunTime + 2
|
||||||
|
status=200
|
||||||
|
while (Sys.RunTime < timer){} //wait 2 sec
|
||||||
|
status=201
|
||||||
|
|
||||||
|
Motor[2].MaxDac=L20
|
||||||
|
Motor[2].FatalFeLimit=L21
|
||||||
|
Motor[2].JogSpeed=L22
|
||||||
|
Motor[3].MaxDac=L30
|
||||||
|
Motor[3].FatalFeLimit=L31
|
||||||
|
Motor[3].JogSpeed=L32
|
||||||
|
|
||||||
|
disable plc PLC_Homing
|
||||||
|
close
|
||||||
@@ -43,6 +43,7 @@ $$$***
|
|||||||
//!common(PhaseFreq=40000)
|
//!common(PhaseFreq=40000)
|
||||||
|
|
||||||
!torqueCtrl()
|
!torqueCtrl()
|
||||||
|
!init()
|
||||||
|
|
||||||
|
|
||||||
&1
|
&1
|
||||||
@@ -51,8 +52,8 @@ $$$***
|
|||||||
//#3-> + .5X +1. Y + 0.01A
|
//#3-> + .5X +1. Y + 0.01A
|
||||||
|
|
||||||
#1-> A
|
#1-> A
|
||||||
#2-> Y
|
#2-> X
|
||||||
#3-> X
|
#3-> Y
|
||||||
|
|
||||||
Coord[1].AltFeedRate=0
|
Coord[1].AltFeedRate=0
|
||||||
Coord[1].Tm=1 //1ms time
|
Coord[1].Tm=1 //1ms time
|
||||||
|
|||||||
@@ -53,8 +53,9 @@ Motor[1].pPhaseEnc=Acc84B[0].Chan[0].SerialEncDataA.a
|
|||||||
//use um as motor unit
|
//use um as motor unit
|
||||||
!encoder_sim(enc=2,tbl=10,mot=10,posSf=13000./2048)
|
!encoder_sim(enc=2,tbl=10,mot=10,posSf=13000./2048)
|
||||||
!encoder_inc(enc=2,tbl=2,mot=2,posSf=13000./650000)
|
!encoder_inc(enc=2,tbl=2,mot=2,posSf=13000./650000)
|
||||||
!motor_servo(mot=2,ctrl='ServoCtrl',Kp=20,Kvfb=1000,Ki=0.07,Kvff=1000,Kaff=4000,MaxInt=1000)
|
//!motor_servo(mot=2,ctrl='ServoCtrl',Kp=20,Kvfb=1000,Ki=0.07,Kvff=1000,Kaff=4000,MaxInt=1000)
|
||||||
!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)
|
!motor_servo(mot=2,ctrl='ServoCtrl',Kp=20,Kvfb=220,Ki=0.02,Kvff=240,Kaff=1500,MaxInt=1000)
|
||||||
|
!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')
|
||||||
|
|
||||||
|
|
||||||
//Stage X Parker MX80L (top stage, mounted on Y stage)
|
//Stage X Parker MX80L (top stage, mounted on Y stage)
|
||||||
@@ -68,7 +69,7 @@ Motor[1].pPhaseEnc=Acc84B[0].Chan[0].SerialEncDataA.a
|
|||||||
!encoder_inc(enc=3,tbl=3,mot=3,posSf=13000./650000)
|
!encoder_inc(enc=3,tbl=3,mot=3,posSf=13000./650000)
|
||||||
!motor_servo(mot=3,ctrl='ServoCtrl',Kp=20,Kvfb=220,Ki=0.02,Kvff=240,Kaff=1500,MaxInt=1000)
|
!motor_servo(mot=3,ctrl='ServoCtrl',Kp=20,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
|
//PhaseFreq=20000,PhasePerServo=1 -> Kvfb=220*4 Ki/=4,Kvff*=4,Kaff*=4*4
|
||||||
!motor(mot=3,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=2000,WarnFeLimit=100,InPosBand=2)
|
!motor(mot=3,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')
|
||||||
|
|
||||||
//Interferometer 1 Stage Y Parker MX80L (bottom stage)
|
//Interferometer 1 Stage Y Parker MX80L (bottom stage)
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
|
|||||||
299
logbook.md
299
logbook.md
@@ -592,14 +592,299 @@ Grid path at speed:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Interferometer
|
Interferometer 11.4.2017
|
||||||
--------------
|
------------------------
|
||||||
|
|
||||||
|
|
||||||
|
adding to torqueCtrl lines:
|
||||||
|
!encoder_inc(enc=4,tbl=4,mot=4)# ,posSf=13000./650000)
|
||||||
|
!encoder_inc(enc=5,tbl=5,mot=5)# ,posSf=13000./650000)
|
||||||
|
|
||||||
gpasciiCommander --host SAR-CPPM-EXPMX1 -i
|
gpasciiCommander --host SAR-CPPM-EXPMX1 -i
|
||||||
|
!mx-stage()
|
||||||
|
#1..3$
|
||||||
|
&1
|
||||||
|
#1..3j/
|
||||||
|
|
||||||
$$$***
|
both interferometer works
|
||||||
|
homing and move:
|
||||||
|
|
||||||
|
#2..5p
|
||||||
|
-0.04000000000000008 0.0200000000000023 -298.8984375 39.890625
|
||||||
|
> #2j=10000;#3j=0000
|
||||||
|
#2j=10000;#3j=0000
|
||||||
|
> #2..5p
|
||||||
|
#2..5p
|
||||||
|
10000 2.380040609040179e-15 -500672.5625 4334.390625
|
||||||
|
> #2j=0000;#3j=0000
|
||||||
|
#2j=0000;#3j=0000
|
||||||
|
> #2j=0000;#3j=10000
|
||||||
|
#2j=0000;#3j=10000
|
||||||
|
> #2..5p
|
||||||
|
#2..5p
|
||||||
|
-0.02000000000000006 10000 -3559.06640625 -499752.609375
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#2..5p
|
||||||
|
-0.08000000000000007 -0.003515624999636202 -0.5 7.2890625
|
||||||
|
|
||||||
|
#2j=10000
|
||||||
|
#2..5p
|
||||||
|
9999.980000000001 -0.01000000000021828 4290.96875 -500362.453125
|
||||||
|
#2j=0;#3j=10000
|
||||||
|
#2..5p
|
||||||
|
0 9999.992812500001 -499789.3984375 -3260.984375
|
||||||
|
|
||||||
|
Interferometer have 500000 counts per 10000um = 50 counts per um =20nm
|
||||||
|
at Motor[2].JogSpeed=10 the interferometer can not follow the motion.
|
||||||
|
It will not loose steps, but the maximum frequency is limiting during motion.
|
||||||
|
at Motor[2].JogSpeed=10 the interferometer and the encoder delivers similar values.
|
||||||
|
|
||||||
|
|
||||||
|
interfero_move_rec.py
|
||||||
|
self.gather={"MaxSamples":1000000, "Period":acq_per}
|
||||||
|
self.channels=channels=["Motor[3].ActPos","Motor[3].DesPos","Motor[3].PhasePos","Motor[3].idMeas","Motor[3].iqMeas"]
|
||||||
|
|
||||||
|
Gather.Enable=0
|
||||||
|
Gather.Items=6
|
||||||
|
Gather.MaxSamples=1000000
|
||||||
|
Gather.Period=10
|
||||||
|
Gather.Addr[0]=Motor[2].DesPos.a
|
||||||
|
Gather.Addr[1]=Motor[3].DesPos.a
|
||||||
|
Gather.Addr[2]=Motor[2].ActPos.a
|
||||||
|
Gather.Addr[3]=Motor[3].ActPos.a
|
||||||
|
Gather.Addr[4]=Motor[4].ActPos.a
|
||||||
|
Gather.Addr[5]=Motor[5].ActPos.a
|
||||||
|
open prog 2
|
||||||
|
linear abs
|
||||||
|
X0 Y0
|
||||||
|
dwell 10
|
||||||
|
Gather.Enable=2
|
||||||
|
X10000 Y0
|
||||||
|
dwell 100
|
||||||
|
X0 Y0
|
||||||
|
dwell 100
|
||||||
|
X0 Y10000
|
||||||
|
dwell 100
|
||||||
|
X0 Y0
|
||||||
|
dwell 1000
|
||||||
|
Gather.Enable=0
|
||||||
|
close
|
||||||
|
&1
|
||||||
|
b2r
|
||||||
|
|
||||||
|
download data with
|
||||||
|
PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1
|
||||||
|
|
||||||
|
cat /tmp/gather.txt
|
||||||
|
|
||||||
|
Motor[2].MaxSpeed=50
|
||||||
|
Motor[3].MaxSpeed=50
|
||||||
|
->gather50.txt
|
||||||
|
|
||||||
|
Motor[2].MaxSpeed=5
|
||||||
|
Motor[3].MaxSpeed=5
|
||||||
|
->gather5.txt
|
||||||
|
|
||||||
|
Motor[2].MaxSpeed=1
|
||||||
|
Motor[3].MaxSpeed=1
|
||||||
|
->gather1.txt
|
||||||
|
|
||||||
|
Changing encoder frequency on atto cube makes it run even at high speed
|
||||||
|
|
||||||
|
|
||||||
|
28. 4.2017 prepare for vibration measurement
|
||||||
|
--------------------------------------------
|
||||||
|
PPMAC=SAR-CPPM-EXPMX1
|
||||||
|
|
||||||
|
cd /home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX
|
||||||
|
PBInspect --host $PPMAC --cfg PBinspect.pbi
|
||||||
|
|
||||||
|
cd ~/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/src/usrServo
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
|
cd /home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/cfg
|
||||||
|
gpasciiCommander --host SAR-CPPM-EXPMX1 -i
|
||||||
|
!mx-stage()
|
||||||
|
#1..3$
|
||||||
|
&1
|
||||||
|
#1..3j/
|
||||||
|
|
||||||
|
#1j=360000 //360deg gegenuhrzeiger
|
||||||
|
|
||||||
|
#2j:100 //100 um right
|
||||||
|
#3j:100 //100 um up
|
||||||
|
|
||||||
|
move bottom left
|
||||||
|
#2,3$
|
||||||
|
Motor[2].PhasePos;Motor[3].PhasePos
|
||||||
|
|
||||||
|
Motor[2].PhasePos=310;Motor[3].PhasePos=1210
|
||||||
|
#2,3hmz
|
||||||
|
Motor[3].HomePos=Motor[3].HomePos+15000
|
||||||
|
|
||||||
|
|
||||||
|
Motor 2 vibriert mit 76ms =13.15 Hz
|
||||||
|
|
||||||
|
|
||||||
|
b2r
|
||||||
|
Load is now Alublock + mirrors
|
||||||
|
|
||||||
|
at 50 Hz peak to peak 200um
|
||||||
|
at 100Hz peak to Peak 50um
|
||||||
|
at 200Hz peak to Peak 13um
|
||||||
|
at 400Hz peak to Peak 1.5um
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2. 5.2017 Vertical stage with load
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
scale=0.83832 #np.sqrt(3)/2*32767/33.850/1000
|
||||||
|
|
||||||
|
Motor[3].I2tSet=670.65601
|
||||||
|
670.65601/0.83832 = 800.000
|
||||||
|
|
||||||
|
ohne Platte iqCmd = 625
|
||||||
|
Platte 133.2g iqCmd = 910
|
||||||
|
Platte 156.8g iqCmd = 965
|
||||||
|
|
||||||
|
Motor[3].IaMeas=-660
|
||||||
|
Motor[3].IbMeas=580
|
||||||
|
Motor[3].IqMeas=634.15991
|
||||||
|
|
||||||
|
|
||||||
|
Motor[3].IaMeas=-708
|
||||||
|
Motor[3].IbMeas=256
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Motor[3].IaMeas=436 =520
|
||||||
|
Motor[3].IbMeas=-632 =-753
|
||||||
|
Motor[3].IqMeas=566.46863 = 675
|
||||||
|
|
||||||
|
|
||||||
|
Claude messungen:
|
||||||
|
Phase 1: 330mA
|
||||||
|
Phase 2: 125mA
|
||||||
|
Phase 3: 694mA
|
||||||
|
|
||||||
|
Stromzange: 650 mA
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Interferometer 29.5.2017
|
||||||
|
------------------------
|
||||||
|
cd ~/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX;PBInspect --cfg PBinspect.pbi --host SAR-CPPM-EXPMX1
|
||||||
|
|
||||||
|
gpasciiCommander --host SAR-CPPM-EXPMX1 -i
|
||||||
|
!mx-stage()
|
||||||
|
#1..3$
|
||||||
|
&1
|
||||||
|
#1..3j/
|
||||||
|
|
||||||
|
zero to neative inc values
|
||||||
|
move motor 2,3 from 500 to 28500
|
||||||
|
#1..5hmz
|
||||||
|
|
||||||
|
read acquire statements and program at to of plot_interfero.py
|
||||||
|
|
||||||
|
|
||||||
|
Motor[2].MaxSpeed=30;Motor[3].MaxSpeed=30
|
||||||
|
Motor[2].MaxSpeed=10;Motor[3].MaxSpeed=10
|
||||||
|
|
||||||
|
PPMAC=SAR-CPPM-EXPMX1
|
||||||
|
PBGatherPlot -m24 -v7 --host $PPMAC --dat gather1.txt
|
||||||
|
|
||||||
|
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather0.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather1.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather2.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather3.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather4.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather5.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather6.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather7.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather8.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather9.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather10.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather11.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather12.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather13.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather14.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather15.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather16.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather17.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather18.txt
|
||||||
|
b2r
|
||||||
|
!sh PBGatherPlot -m24 -v7 --host SAR-CPPM-EXPMX1 --dat ../data_interfero_spd10/gather19.txt
|
||||||
|
|
||||||
|
|
||||||
|
Konstantfeder 2.6.2017
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
cd ~/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX;PBInspect --cfg PBinspect.pbi --host SAR-CPPM-EXPMX1
|
||||||
|
cd ~/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/cfg/;gpasciiCommander --host SAR-CPPM-EXPMX1 -i
|
||||||
|
!mx-stage()
|
||||||
|
|
||||||
|
//#1..3$
|
||||||
|
//move bottom left
|
||||||
|
#2,3$
|
||||||
|
Motor[2].PhasePos;Motor[3].PhasePos
|
||||||
|
|
||||||
|
Motor[2].PhasePos=310;Motor[3].PhasePos=1210
|
||||||
|
#2,3hmz
|
||||||
|
Motor[2].HomePos=Motor[2].HomePos+5000
|
||||||
|
Motor[3].HomePos=Motor[3].HomePos+5000
|
||||||
|
|
||||||
|
|
||||||
|
&1
|
||||||
|
|
||||||
|
#1..3j/
|
||||||
|
#2..3j=0
|
||||||
|
L2=Motor[2].MaxDac
|
||||||
|
L3=Motor[3].MaxDac
|
||||||
|
|
||||||
|
|
||||||
|
Motor[2].MaxDac=500
|
||||||
|
#2j+
|
||||||
|
|
||||||
|
enable plc 1
|
||||||
|
|
||||||
|
Motor[2].HomeVel=2
|
||||||
|
Motor[3].HomeVel=2
|
||||||
|
#2,3$
|
||||||
|
|
||||||
|
Homing 12.6.2017
|
||||||
|
---------------
|
||||||
|
|
||||||
|
cd ~/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX;PBInspect --cfg PBinspect.pbi --host SAR-CPPM-EXPMX1
|
||||||
|
cd ~/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/cfg/;gpasciiCommander --host SAR-CPPM-EXPMX1 -i
|
||||||
|
!mx-stage()
|
||||||
|
//!init()
|
||||||
|
//!init_limit()
|
||||||
|
|
||||||
|
enable plc 1
|
||||||
|
|
||||||
!common()
|
|
||||||
!encoder_inc(enc=8,tbl=8,mot=8)
|
|
||||||
!encoder_inc(enc=1,tbl=1,mot=1)
|
|
||||||
!encoder_inc(enc=2,tbl=2,mot=2)
|
|
||||||
|
|||||||
@@ -133,8 +133,8 @@ class MAErrorFrame(wx.Frame):
|
|||||||
err=doc.err
|
err=doc.err
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
rec=doc.fh['rec']
|
rec=doc.fh['rec']
|
||||||
errx = (rec[:, 2] - rec[:, 5])
|
errx = (rec[:, 1] - rec[:, 4])
|
||||||
erry = (rec[:, 1] - rec[:, 4])
|
erry = (rec[:, 2] - rec[:, 5])
|
||||||
errxy = np.sqrt(errx ** 2 + erry ** 2)
|
errxy = np.sqrt(errx ** 2 + erry ** 2)
|
||||||
doc.err = err = (errx, erry, errxy)
|
doc.err = err = (errx, erry, errxy)
|
||||||
canvas.InitChild(meta,err)
|
canvas.InitChild(meta,err)
|
||||||
|
|||||||
@@ -148,10 +148,10 @@ class MAVelocityFrame(wx.Frame):
|
|||||||
#datapoint timebase: 2 ms () per data point
|
#datapoint timebase: 2 ms () per data point
|
||||||
#velocity: um/ms (deltatau desVel= motor units per serco cycle)
|
#velocity: um/ms (deltatau desVel= motor units per serco cycle)
|
||||||
rec=doc.fh['rec']
|
rec=doc.fh['rec']
|
||||||
velxAct = np.diff(rec[:, 2])/tb
|
velxAct = np.diff(rec[:, 1])/tb
|
||||||
velxDes = np.diff(rec[:, 5])/tb
|
velxDes = np.diff(rec[:, 4])/tb
|
||||||
velyAct = np.diff(rec[:, 1])/tb
|
velyAct = np.diff(rec[:, 2])/tb
|
||||||
velyDes = np.diff(rec[:, 4])/tb
|
velyDes = np.diff(rec[:, 5])/tb
|
||||||
velAct = np.sqrt(velxAct**2+velyAct**2)
|
velAct = np.sqrt(velxAct**2+velyAct**2)
|
||||||
velDes = np.sqrt(velxDes**2+velyDes**2)
|
velDes = np.sqrt(velxDes**2+velyDes**2)
|
||||||
doc.vel = vel = (velxAct,velxDes,velyAct,velyDes,velAct,velDes)
|
doc.vel = vel = (velxAct,velxDes,velyAct,velyDes,velAct,velDes)
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ class MPLCanvasImg(FigureCanvas):
|
|||||||
ax.add_collection(ec)
|
ax.add_collection(ec)
|
||||||
|
|
||||||
|
|
||||||
hl+=ax.plot(rec[:, 5], rec[:, 4], 'b-',label='recDesPos')
|
hl+=ax.plot(rec[:, 4], rec[:, 5], 'b-',label='recDesPos')
|
||||||
hl+=ax.plot(rec[:,2],rec[:,1],'g-',label='recActPos')
|
hl+=ax.plot(rec[:,1],rec[:,2],'g-',label='recActPos')
|
||||||
ax.xaxis.set_label_text('x-pos um')
|
ax.xaxis.set_label_text('x-pos um')
|
||||||
ax.yaxis.set_label_text('y-pos um')
|
ax.yaxis.set_label_text('y-pos um')
|
||||||
|
|
||||||
@@ -267,13 +267,13 @@ class MAxyPlotFrame(wx.Frame):
|
|||||||
idx=usrData
|
idx=usrData
|
||||||
rec=self.doc.fh['rec']
|
rec=self.doc.fh['rec']
|
||||||
hl=canvas.hl
|
hl=canvas.hl
|
||||||
hl[2].set_data(rec[:idx+1, 5], rec[:idx+1, 4])
|
hl[2].set_data(rec[:idx+1, 4], rec[:idx+1, 5])
|
||||||
hl[3].set_data(rec[:idx+1, 2], rec[:idx+1, 1])
|
hl[3].set_data(rec[:idx+1, 1], rec[:idx+1, 2])
|
||||||
#ax.draw_artist(hl[2])
|
#ax.draw_artist(hl[2])
|
||||||
x=ax.get_xlim();x=(x[1]-x[0])/2;
|
x=ax.get_xlim();x=(x[1]-x[0])/2;
|
||||||
y=ax.get_ylim();y=(y[1]-y[0])/2;
|
y=ax.get_ylim();y=(y[1]-y[0])/2;
|
||||||
ax.set_xlim(rec[idx, 2]-x,rec[idx, 2]+x)
|
ax.set_xlim(rec[idx, 1]-x,rec[idx, 1]+x)
|
||||||
ax.set_ylim(rec[idx, 1]-y,rec[idx, 1]+y)
|
ax.set_ylim(rec[idx, 2]-y,rec[idx, 2]+y)
|
||||||
canvas.draw()
|
canvas.draw()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
99
python/plot_interfero.py
Executable file
99
python/plot_interfero.py
Executable file
@@ -0,0 +1,99 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# *-----------------------------------------------------------------------*
|
||||||
|
# | |
|
||||||
|
# | Copyright (c) 2016 by Paul Scherrer Institute (http://www.psi.ch) |
|
||||||
|
# | |
|
||||||
|
# | Author Thierry Zamofing (thierry.zamofing@psi.ch) |
|
||||||
|
# *-----------------------------------------------------------------------*
|
||||||
|
|
||||||
|
#Testing the interferometer
|
||||||
|
'''
|
||||||
|
zamofing_t@ganymede:~/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/cfg$ gpasciiCommander --host $PPMAC -i
|
||||||
|
$$$***
|
||||||
|
!common()
|
||||||
|
!mx-stage()
|
||||||
|
|
||||||
|
Gather.Enable=0
|
||||||
|
Gather.Items=6
|
||||||
|
Gather.MaxSamples=1000000
|
||||||
|
Gather.Period=10
|
||||||
|
Gather.Addr[0]=Motor[2].DesPos.a
|
||||||
|
Gather.Addr[1]=Motor[3].DesPos.a
|
||||||
|
Gather.Addr[2]=Motor[2].ActPos.a
|
||||||
|
Gather.Addr[3]=Motor[3].ActPos.a
|
||||||
|
Gather.Addr[4]=Motor[4].ActPos.a
|
||||||
|
Gather.Addr[5]=Motor[5].ActPos.a
|
||||||
|
open prog 2
|
||||||
|
linear abs
|
||||||
|
X1000 Y1000
|
||||||
|
dwell 10
|
||||||
|
Gather.Enable=2
|
||||||
|
X28000 Y1000
|
||||||
|
dwell 100
|
||||||
|
X1000 Y1000
|
||||||
|
dwell 100
|
||||||
|
X1000 Y28000
|
||||||
|
dwell 100
|
||||||
|
X1000 Y1000
|
||||||
|
dwell 1000
|
||||||
|
Gather.Enable=0
|
||||||
|
close
|
||||||
|
&1
|
||||||
|
b2r
|
||||||
|
|
||||||
|
download data with
|
||||||
|
PPMAC=SAR-CPPM-EXPMX1
|
||||||
|
PBGatherPlot -m24 -v7 --host $PPMAC --dat gather.txt
|
||||||
|
|
||||||
|
cat /tmp/gather.txt
|
||||||
|
|
||||||
|
Motor[2].MaxSpeed=20;Motor[3].MaxSpeed=20
|
||||||
|
Motor[2].MaxSpeed=5;Motor[3].MaxSpeed=5
|
||||||
|
Motor[2].MaxSpeed=2
|
||||||
|
Motor[3].MaxSpeed=2
|
||||||
|
b2r
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'''
|
||||||
|
|
||||||
|
import os, sys, json
|
||||||
|
import numpy as np
|
||||||
|
import matplotlib as mpl
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
import subprocess as sprc
|
||||||
|
import telnetlib
|
||||||
|
|
||||||
|
if __name__=='__main__':
|
||||||
|
def plot_gather(base):
|
||||||
|
#rec=Motor[1].ActPos,Motor[2].ActPos,Motor[3].ActPos,Motor[1].DesPos,Motor[2].DesPos,Motor[3].DesPos
|
||||||
|
#res=rot.ActPos,y.ActPos,x.ActPos,rot.DesPos,y.DesPos,x.DesPos
|
||||||
|
#idx 0 1 2 3 4 5
|
||||||
|
f1=plt.figure()
|
||||||
|
#f2 = plt.figure()
|
||||||
|
ax1 = f1.add_subplot(1,1,1)
|
||||||
|
#ax2 = f2.add_subplot(1, 1, 1)
|
||||||
|
|
||||||
|
for fn in sorted(os.listdir(base)):
|
||||||
|
print fn
|
||||||
|
rec = np.genfromtxt(base+'/'+fn, delimiter=' ')
|
||||||
|
print rec.shape
|
||||||
|
|
||||||
|
x=range(len(rec[:,0]))
|
||||||
|
#hl=ax[0].plot(x, y, color=col)
|
||||||
|
|
||||||
|
hl=ax1.plot(x,-(rec[:,0]-rec[0,0]),'k')
|
||||||
|
hl=ax1.plot(x,-(rec[:,2]-rec[0,2]),'r')
|
||||||
|
hl=ax1.plot(x,-(rec[:,4]-rec[0,4])/100,'m')
|
||||||
|
hl=ax1.plot(x,rec[:,1]-rec[0,1],'k')
|
||||||
|
hl=ax1.plot(x,rec[:,3]-rec[0,3],'b')
|
||||||
|
hl=ax1.plot(x,-(rec[:,5]-rec[0,5])/100,'c')
|
||||||
|
|
||||||
|
plt.show()
|
||||||
|
|
||||||
|
#plot_gather(base='/home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/gather5/')
|
||||||
|
#plot_gather(base='/home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/gather50/')
|
||||||
|
#plot_gather(base='/home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/python/tmp/')
|
||||||
|
#plot_gather(base='/home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/data_interfero_spd10')
|
||||||
|
#plot_gather(base='/home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/data_interfero_spd20')
|
||||||
|
plot_gather(base='data_interfero_spd10')
|
||||||
@@ -83,11 +83,11 @@ class ShapePath:
|
|||||||
#cfg = {"points": [[0, 0],[100, 0],[200, 0],[300, 0],[400, 0],[400, 100],[300, 100],[200, 100],[100, 100],[0, 100],[10, 200],[100, 200],[200, 200],[300, 200],[400, 200],[410, 300],[300, 300],[200, 300],[100, 300],[0, 300],[0, 400],[100, 400],[200, 400],[300, 400],[400, 400]],"sequencer": ['gen_prog(file="'+fn+'.prg",host="SAR-CPPM-EXPMX1",mode=0)', 'plot_gather("'+fn+'.npz")']}
|
#cfg = {"points": [[0, 0],[100, 0],[200, 0],[300, 0],[400, 0],[400, 100],[300, 100],[200, 100],[100, 100],[0, 100],[10, 200],[100, 200],[200, 200],[300, 200],[400, 200],[410, 300],[300, 300],[200, 300],[100, 300],[0, 300],[0, 400],[100, 400],[200, 400],[300, 400],[400, 400]],"sequencer": ['gen_prog(file="'+fn+'.prg",host="SAR-CPPM-EXPMX1",mode=0)', 'plot_gather("'+fn+'.npz")']}
|
||||||
#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)', 'plot_gather("'+fn+'.npz")']}
|
#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)', 'plot_gather("'+fn+'.npz")']}
|
||||||
#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=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_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_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=5,h=5,pitch=100,rnd=0.2)', 'sort_points()','gen_prog(file="'+fn+'.prg",host="SAR-CPPM-EXPMX1",mode=2,pt2pt_time=10)', 'plot_gather("'+fn+'.npz")']}
|
cfg = {"sequencer": ['gen_grid_points(w=15,h=15,pitch=100,rnd=0.2)', 'sort_points()','gen_prog(file="'+fn+'.prg",host="SAR-CPPM-EXPMX1",mode=2,pt2pt_time=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,acq_per=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": ['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")']}
|
||||||
|
|
||||||
self.cfg=dotdict(cfg)
|
self.cfg=dotdict(cfg)
|
||||||
self.args=args
|
self.args=args
|
||||||
@@ -281,10 +281,10 @@ class ShapePath:
|
|||||||
idx=np.ndarray(cnt,dtype=np.int32)
|
idx=np.ndarray(cnt,dtype=np.int32)
|
||||||
grp_cnt=int(np.sqrt(cnt))
|
grp_cnt=int(np.sqrt(cnt))
|
||||||
grp_sz=int(np.ceil(float(cnt)/grp_cnt))
|
grp_sz=int(np.ceil(float(cnt)/grp_cnt))
|
||||||
if self.args.yx==True:
|
if self.args.xy==True:
|
||||||
idxA=0;idxB=1
|
|
||||||
else:
|
|
||||||
idxA=1;idxB=0
|
idxA=1;idxB=0
|
||||||
|
else:
|
||||||
|
idxA=0;idxB=1
|
||||||
|
|
||||||
#sort points along idxA
|
#sort points along idxA
|
||||||
pts=pts[pts[:,idxA].argsort()]
|
pts=pts[pts[:,idxA].argsort()]
|
||||||
@@ -327,10 +327,10 @@ class ShapePath:
|
|||||||
pts=self.points # X,Y array
|
pts=self.points # X,Y array
|
||||||
rec = np.genfromtxt(fnLoc, delimiter=' ')
|
rec = np.genfromtxt(fnLoc, delimiter=' ')
|
||||||
#rec=Motor[1].ActPos,Motor[2].ActPos,Motor[3].ActPos,Motor[1].DesPos,Motor[2].DesPos,Motor[3].DesPos
|
#rec=Motor[1].ActPos,Motor[2].ActPos,Motor[3].ActPos,Motor[1].DesPos,Motor[2].DesPos,Motor[3].DesPos
|
||||||
#res=rot.ActPos,y.ActPos,x.ActPos,rot.DesPos,y.DesPos,x.DesPos
|
#res=rot.ActPos,x.ActPos,y.ActPos,rot.DesPos,x.DesPos,y.DesPos
|
||||||
#idx 0 1 2 3 4 5
|
#idx 0 1 2 3 4 5
|
||||||
ofsy=-rec[0,4]+pts[0,1]
|
ofsy=-rec[0,4]+pts[0,0]
|
||||||
ofsx=-rec[0,5]+pts[0,0]
|
ofsx=-rec[0,5]+pts[0,1]
|
||||||
rec[:,(1,4)]+=ofsy
|
rec[:,(1,4)]+=ofsy
|
||||||
rec[:,(2,5)]+=ofsx
|
rec[:,(2,5)]+=ofsx
|
||||||
if fnOut:
|
if fnOut:
|
||||||
@@ -345,8 +345,8 @@ class ShapePath:
|
|||||||
#hl=ax[0].plot(x, y, color=col)
|
#hl=ax[0].plot(x, y, color=col)
|
||||||
hl=ax.plot(pts[:,0],pts[:,1],'r.')
|
hl=ax.plot(pts[:,0],pts[:,1],'r.')
|
||||||
hl=ax.plot(pts[:,0],pts[:,1],'y--')
|
hl=ax.plot(pts[:,0],pts[:,1],'y--')
|
||||||
hl = ax.plot(rec[:, 5], rec[:, 4], 'b-') # desired path
|
hl = ax.plot(rec[:, 4], rec[:, 5], 'b-') # desired path
|
||||||
hl=ax.plot(rec[:,2],rec[:,1],'g-') # actual path
|
hl=ax.plot(rec[:,1],rec[:,2],'g-') # actual path
|
||||||
ax.xaxis.set_label_text('x-pos um')
|
ax.xaxis.set_label_text('x-pos um')
|
||||||
ax.yaxis.set_label_text('y-pos um')
|
ax.yaxis.set_label_text('y-pos um')
|
||||||
cid = fig.canvas.mpl_connect('button_press_event', self.onclick)
|
cid = fig.canvas.mpl_connect('button_press_event', self.onclick)
|
||||||
@@ -356,8 +356,8 @@ class ShapePath:
|
|||||||
|
|
||||||
fig = plt.figure()
|
fig = plt.figure()
|
||||||
ax = fig.add_subplot(1, 1, 1)
|
ax = fig.add_subplot(1, 1, 1)
|
||||||
errx=rec[:,2]-rec[:,5]
|
errx=rec[:,1]-rec[:,4]
|
||||||
erry=rec[:,1]-rec[:,4]
|
erry=rec[:,2]-rec[:,5]
|
||||||
err=np.sqrt(errx**2+erry**2)
|
err=np.sqrt(errx**2+erry**2)
|
||||||
|
|
||||||
hl = []
|
hl = []
|
||||||
@@ -388,11 +388,8 @@ if __name__=='__main__':
|
|||||||
'main command line interpreter function'
|
'main command line interpreter function'
|
||||||
#usage: gpasciiCommunicator.py --host=PPMACZT84 myPowerBRICK.cfg
|
#usage: gpasciiCommunicator.py --host=PPMACZT84 myPowerBRICK.cfg
|
||||||
(h, t)=os.path.split(sys.argv[0]);cmd='\n '+(t if len(h)>3 else sys.argv[0])+' '
|
(h, t)=os.path.split(sys.argv[0]);cmd='\n '+(t if len(h)>3 else sys.argv[0])+' '
|
||||||
exampleCmd=('--host=PPMAC1391 -m 63 --cfg gather.cfg',
|
exampleCmd=('-n',
|
||||||
'samplePowerBrick.cfg',
|
'-v15'
|
||||||
'-n stackCheck1.cfg',
|
|
||||||
'--host=PPMACZT84 stackCheck1.cfg',
|
|
||||||
'--host=PPMACZT84 stackCheck1.cfg -v15',
|
|
||||||
)
|
)
|
||||||
epilog=__doc__+'''
|
epilog=__doc__+'''
|
||||||
Examples:'''+''.join(map(lambda s:cmd+s, exampleCmd))+'\n '
|
Examples:'''+''.join(map(lambda s:cmd+s, exampleCmd))+'\n '
|
||||||
@@ -402,7 +399,7 @@ Examples:'''+''.join(map(lambda s:cmd+s, exampleCmd))+'\n '
|
|||||||
|
|
||||||
parser.add_option('-v', '--verbose', type="int", dest='verbose', help='verbosity bits (see below)', default=0)
|
parser.add_option('-v', '--verbose', type="int", dest='verbose', help='verbosity bits (see below)', default=0)
|
||||||
parser.add_option('-n', '--dryrun', action='store_true', help='dryrun to stdout')
|
parser.add_option('-n', '--dryrun', action='store_true', help='dryrun to stdout')
|
||||||
parser.add_option('--yx', action='store_true', help='sort y,x instead x,y')
|
parser.add_option('--xy', action='store_true', help='sort x,y instead y,x')
|
||||||
parser.add_option('--cfg', help='config file containing json configuration structure')
|
parser.add_option('--cfg', help='config file containing json configuration structure')
|
||||||
|
|
||||||
(args, other)=parser.parse_args()
|
(args, other)=parser.parse_args()
|
||||||
|
|||||||
44
python/stage_rms_current.py
Normal file
44
python/stage_rms_current.py
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
#plot and calculate rms values of sine, six state trapezoidal etc.
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
import matplotlib as mpl
|
||||||
|
import matplotlib.pyplot as pyplot
|
||||||
|
pyplot.figure()
|
||||||
|
x=np.arange(360.)
|
||||||
|
y=np.sin(x/360.*2.*np.pi)
|
||||||
|
y1=x.copy()
|
||||||
|
y1[0: 60]=x[0:60]/60
|
||||||
|
y1[ 60:120]=1
|
||||||
|
y1[120:180]=1-x[0:60]/60
|
||||||
|
y1[180:240]=-x[0:60]/60
|
||||||
|
y1[240:300]=-1
|
||||||
|
y1[300:360]=-1+x[0:60]/60
|
||||||
|
|
||||||
|
y2=x.copy()
|
||||||
|
y2[0: 30]=0
|
||||||
|
y2[30:150]=1
|
||||||
|
y2[150:210]=0
|
||||||
|
y2[210:330]=-1
|
||||||
|
y2[330:360]=0
|
||||||
|
|
||||||
|
y3=x.copy()
|
||||||
|
y3[0: 60]=.5
|
||||||
|
y3[60:120]=1
|
||||||
|
y3[120:180]=.5
|
||||||
|
y3[180:240]=-.5
|
||||||
|
y3[240:300]=-1
|
||||||
|
y3[300:360]=-.5
|
||||||
|
|
||||||
|
pyplot.plot(x,y,x,y1,x,y2,x,y3);pyplot.show()
|
||||||
|
|
||||||
|
rms=np.sqrt(np.mean(y**2))
|
||||||
|
b=np.sqrt(2)/2
|
||||||
|
rms1=np.sqrt(np.mean(y1**2))
|
||||||
|
rms2=np.sqrt(np.mean(y2**2))
|
||||||
|
rms3=np.sqrt(np.mean(y3**2))
|
||||||
|
print rms,rms1,rms2,rms3,b
|
||||||
|
|
||||||
|
print 0.8/rms, 0.8/rms1, 0.8/rms2, 0.8/rms3
|
||||||
|
|
||||||
|
|
||||||
|
#https://e2e.ti.com/blogs_/b/motordrivecontrol/archive/2013/11/08/generate-your-own-commutation-table-trapezoidal-control-3-phase-bldc-motors-using-hall-sensors
|
||||||
236
qt/ESB_MX_exp.ui
Normal file
236
qt/ESB_MX_exp.ui
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Form</class>
|
||||||
|
<widget class="QWidget" name="Form">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>776</width>
|
||||||
|
<height>221</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<widget class="caLabel" name="calabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>721</width>
|
||||||
|
<height>28</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>18</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>ESB MX $(P)</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="background">
|
||||||
|
<color alpha="0">
|
||||||
|
<red>160</red>
|
||||||
|
<green>160</green>
|
||||||
|
<blue>164</blue>
|
||||||
|
</color>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="caInclude" name="cainclude">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>80</y>
|
||||||
|
<width>725</width>
|
||||||
|
<height>72</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="macro">
|
||||||
|
<string>
|
||||||
|
P=$(P),M=MOTOR_ROT_Y1;
|
||||||
|
P=$(P),M=MOTOR_X1;
|
||||||
|
P=$(P),M=MOTOR_Y1</string>
|
||||||
|
</property>
|
||||||
|
<property name="filename" stdset="0">
|
||||||
|
<string notr="true">ESB_MX_motor.ui</string>
|
||||||
|
</property>
|
||||||
|
<property name="numberOfItems" stdset="0">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>731</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout" stretch="5,3,4,0,0,3">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lbl_DESC_1">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>DESC</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lbl_VAL_1">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>VAL</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lbl_RBV_1">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>RBV</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lbl_LLS_1">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>25</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>LLS</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lbl_HLS_1">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>25</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>HLS</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="MotPan_1">
|
||||||
|
<property name="text">
|
||||||
|
<string>Motors Panels</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="caMessageButton" name="camessagebutton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>640</x>
|
||||||
|
<y>160</y>
|
||||||
|
<width>100</width>
|
||||||
|
<height>22</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Homing</string>
|
||||||
|
</property>
|
||||||
|
<property name="channel" stdset="0">
|
||||||
|
<string notr="true">$(P).ASYN</string>
|
||||||
|
</property>
|
||||||
|
<property name="pressMessage">
|
||||||
|
<string notr="true">enable plc 1</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>caMessageButton</class>
|
||||||
|
<extends>QPushButton</extends>
|
||||||
|
<header>caMessageButton</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>caLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header>caLabel</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>caInclude</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>caInclude</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
152
qt/ESB_MX_motor.ui
Normal file
152
qt/ESB_MX_motor.ui
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Form</class>
|
||||||
|
<widget class="QWidget" name="Form">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>725</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout" stretch="5,3,4,0,0,3">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="caLineEdit" name="ca_DESC_1">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="channel" stdset="0">
|
||||||
|
<string notr="true">$(P):$(M).DESC</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="caTextEntry" name="ca_VAL_1">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="channel" stdset="0">
|
||||||
|
<string notr="true">$(P):$(M).VAL</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="caLineEdit" name="ca_RBV_1">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="channel" stdset="0">
|
||||||
|
<string notr="true">$(P):$(M).RBV</string>
|
||||||
|
</property>
|
||||||
|
<property name="unitsEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="caLed" name="caled">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>25</width>
|
||||||
|
<height>4</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="channel" stdset="0">
|
||||||
|
<string notr="true">$(P):$(M).LLS</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="caLed" name="caled_2">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>25</width>
|
||||||
|
<height>4</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="channel" stdset="0">
|
||||||
|
<string notr="true">$(P):$(M).HLS</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="caRelatedDisplay" name="carelateddisplay">
|
||||||
|
<property name="background">
|
||||||
|
<color>
|
||||||
|
<red>128</red>
|
||||||
|
<green>136</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</property>
|
||||||
|
<property name="labels">
|
||||||
|
<string>$(M)</string>
|
||||||
|
</property>
|
||||||
|
<property name="files">
|
||||||
|
<string>motorx_all.ui</string>
|
||||||
|
</property>
|
||||||
|
<property name="args">
|
||||||
|
<string>P=$(P):,M=$(M)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>caRelatedDisplay</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>caRelatedDisplay</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>caTextEntry</class>
|
||||||
|
<extends>caLineEdit</extends>
|
||||||
|
<header>caTextEntry</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>caLed</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>caLed</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>caLineEdit</class>
|
||||||
|
<extends>QLineEdit</extends>
|
||||||
|
<header>caLineEdit</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
@@ -19,6 +19,9 @@
|
|||||||
# arm,i386,i385hv,ppc460-2,ppc460-1,ppc405
|
# arm,i386,i385hv,ppc460-2,ppc460-1,ppc405
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
PPMAC=SAR-CPPM-EXPMX1
|
||||||
|
#PPMAC=SAROP11-CPPM-MOT6871
|
||||||
|
|
||||||
PMAC_ARCH=ppc465-2
|
PMAC_ARCH=ppc465-2
|
||||||
|
|
||||||
ifeq ($(PMAC_ARCH),ppc465-2)
|
ifeq ($(PMAC_ARCH),ppc465-2)
|
||||||
@@ -71,10 +74,10 @@ KBUILD_EXTRA_SYMBOLS := /usr/local/dtlibs/libppmac/Module.symvers
|
|||||||
# cp -f /usr/local/usralgo/usralgomain.c $(PWD)
|
# cp -f /usr/local/usralgo/usralgomain.c $(PWD)
|
||||||
all:
|
all:
|
||||||
$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules
|
$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules
|
||||||
scp usralgo.ko root@SAROP11-CPPM-MOT6871:/tmp
|
scp usralgo.ko root@$(PPMAC):/tmp
|
||||||
scp pp_proj.ini root@SAROP11-CPPM-MOT6871:/var/ftp/usrflash/Project/Configuration/pp_proj.ini
|
scp pp_proj.ini root@$(PPMAC):/var/ftp/usrflash/Project/Configuration/pp_proj.ini
|
||||||
scp pp_proj.ini root@SAROP11-CPPM-MOT6871:/tmp/pp_proj.ini
|
scp pp_proj.ini root@$(PPMAC):/tmp/pp_proj.ini
|
||||||
ssh root@SAROP11-CPPM-MOT6871 projpp
|
ssh root@$(PPMAC) projpp
|
||||||
|
|
||||||
# $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules V=1
|
# $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules V=1
|
||||||
# mv -f usralgo.ko ../../bin/Debug/
|
# mv -f usralgo.ko ../../bin/Debug/
|
||||||
|
|||||||
Reference in New Issue
Block a user