SFELPHOTON-1337: SwissMX split/ cleanup/move repositories
This commit is contained in:
113
Helical1.pbi
113
Helical1.pbi
@@ -1,113 +0,0 @@
|
|||||||
[
|
|
||||||
[
|
|
||||||
"StatusGblListCtrl",
|
|
||||||
[],
|
|
||||||
"name=g;caption=global;state=67377148;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=200;besth=369;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=41;floaty=486;floatw=208;floath=377;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"MotorListCtrl",
|
|
||||||
[
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
4,
|
|
||||||
5,
|
|
||||||
6,
|
|
||||||
7,
|
|
||||||
8,
|
|
||||||
9,
|
|
||||||
10,
|
|
||||||
11,
|
|
||||||
12,
|
|
||||||
13,
|
|
||||||
14,
|
|
||||||
15,
|
|
||||||
16
|
|
||||||
],
|
|
||||||
"name=p;caption=motor pos;state=67377148;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=200;besth=350;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"WatchListCtrl",
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"EncTable[1].PrevEnc",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"EncTable[9].PrevEnc",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[1].idCmd",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[1].Ctrl",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[1].pos",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[1].ServoOut",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P1000",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Gather.Samples",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Gather.MaxLines",
|
|
||||||
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"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"name=m1;caption=motor1;state=67377148;dir=4;layer=0;row=4;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=485;floaty=810;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
2
|
|
||||||
],
|
|
||||||
"name=m2;caption=motor2;state=67377148;dir=4;layer=0;row=4;pos=1;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=520;floaty=734;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusCoordListCtrl",
|
|
||||||
[
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"name=c1;caption=coord1;state=67377148;dir=4;layer=0;row=2;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=350;floaty=493;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
3
|
|
||||||
],
|
|
||||||
"name=m3;caption=motor3;state=67377148;dir=4;layer=0;row=5;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=1490;floaty=556;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"name=m4;caption=motor4;state=67377148;dir=4;layer=0;row=5;pos=1;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=1528;floaty=501;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
5
|
|
||||||
],
|
|
||||||
"name=m5;caption=motor5;state=67377148;dir=4;layer=0;row=6;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=1588;floaty=238;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
212
MX3_coordTrf.md
212
MX3_coordTrf.md
@@ -1,212 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
telnet SAR-CPPM-EXPMX3 50001
|
|
||||||
|
|
||||||
zamofing_t@ganymede:~/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX$ PBInspect --host SAR-CPPM-EXPMX3 --cfg PBInspect3.pbi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ssh root@SAR-CPPM-EXPMX3
|
|
||||||
sendgetsends -1
|
|
||||||
|
|
||||||
|
|
||||||
gpasciiCommander --host SAR-CPPM-EXPMX3 -i
|
|
||||||
//!MX3_coordTrf(exc=5000,height=118000,width=377500,length=600000,camSf=1.7453292519943296e-05)
|
|
||||||
!MX3_coordTrf(exc=5000,height=0,width=377500,length=600000,camSf=1.7453292519943296e-05)
|
|
||||||
!MX3_coordTrf(exc=5000,height=0,width=377500,length=600000,camSf=1.7453292519943296e-05,q=-.8)
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
list subProg10
|
|
||||||
call15
|
|
||||||
jog1=(L0)
|
|
||||||
call16
|
|
||||||
|
|
||||||
open prog 1
|
|
||||||
call15
|
|
||||||
abslinear
|
|
||||||
X(0) Y(0) U(0) V(0) w(0)
|
|
||||||
call16
|
|
||||||
close
|
|
||||||
&1b1r
|
|
||||||
|
|
||||||
open prog 1
|
|
||||||
call15
|
|
||||||
abslinear
|
|
||||||
X(2000) Y(0) U(0) V(0) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(-2000) Y(0) U(0) V(0) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(0) w(0)
|
|
||||||
call16
|
|
||||||
close
|
|
||||||
|
|
||||||
open prog 2
|
|
||||||
call15
|
|
||||||
abslinear
|
|
||||||
X(0) Y(2000) U(0) V(0) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(-2000) U(0) V(0) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(0) w(0)
|
|
||||||
call16
|
|
||||||
close
|
|
||||||
|
|
||||||
open prog 3
|
|
||||||
call15
|
|
||||||
abslinear
|
|
||||||
X(0) Y(0) U(2000) V(0) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(-2000) V(0) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(0) w(0)
|
|
||||||
call16
|
|
||||||
close
|
|
||||||
|
|
||||||
open prog 4
|
|
||||||
call15
|
|
||||||
abslinear
|
|
||||||
X(0) Y(0) U(0) V(2000) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(-2000) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(0) w(0)
|
|
||||||
call16
|
|
||||||
close
|
|
||||||
|
|
||||||
open prog 5
|
|
||||||
call15
|
|
||||||
abslinear
|
|
||||||
X(0) Y(0) U(0) V(0) w(2000)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(0) w(-2000)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(0) w(0)
|
|
||||||
call16
|
|
||||||
close
|
|
||||||
|
|
||||||
&1b1r
|
|
||||||
&1b2r
|
|
||||||
&1b3r
|
|
||||||
&1b4r
|
|
||||||
&1b5r
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open prog 2
|
|
||||||
call15
|
|
||||||
abslinear
|
|
||||||
X(2000) Y(0) U(0) V(0) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(0) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(2000) U(0) V(0) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(0) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(2000) V(0) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(0) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(2000) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(0) w(0)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(0) w(2000)
|
|
||||||
dwell 1000
|
|
||||||
X(0) Y(0) U(0) V(0) w(0)
|
|
||||||
call16
|
|
||||||
close
|
|
||||||
&1b2r
|
|
||||||
|
|
||||||
cpx call 15
|
|
||||||
#1..5j=90000
|
|
||||||
cpx call 16
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Koordinate U is wrong
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fwd_inp(0) 90000 90000 90000 90000 90000
|
|
||||||
fwd_inp(0) 2.16489e-13 2.16489e-13 2.16489e-13 2.16489e-13 2.16489e-13
|
|
||||||
fwd_res -3.17041e-14 4.01274e-13 1.26816e-13 6.34082e-14 -6.34082e-14
|
|
||||||
inv_inp(0) 2000 0 0 0 0
|
|
||||||
inv_res 73570.1 106430 73570.1 106430 90000
|
|
||||||
inv_inp(0) 0 0 0 0 0
|
|
||||||
inv_res 90000 90000 90000 90000 90000
|
|
||||||
inv_inp(0) 0 2000 0 0 0
|
|
||||||
inv_res 73570.1 73570.1 73570.1 73570.1 66421.8
|
|
||||||
inv_inp(0) 0 0 0 0 0
|
|
||||||
inv_res 90000 90000 90000 90000 90000
|
|
||||||
inv_inp(0) 0 0 2000 0 0
|
|
||||||
inv_res 81869.9 98130.1 81869.9 81869.9 101537
|
|
||||||
inv_inp(0) 0 0 0 0 0
|
|
||||||
inv_res 90000 90000 90000 90000 90000
|
|
||||||
inv_inp(0) 0 0 0 2000 0
|
|
||||||
inv_res 98130.1 81869.9 81869.9 98130.1 90000
|
|
||||||
inv_inp(0) 0 0 0 0 0
|
|
||||||
inv_res 90000 90000 90000 90000 90000
|
|
||||||
inv_inp(0) 0 0 0 0 2000
|
|
||||||
inv_res 98130.1 98130.1 81869.9 81869.9 78463
|
|
||||||
inv_inp(0) 0 0 0 0 0
|
|
||||||
inv_res 90000 90000 90000 90000 90000
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
> list forward
|
|
||||||
list forward
|
|
||||||
L6=118000/377500
|
|
||||||
L7=5000/1.4142135623700001
|
|
||||||
L11=L7*cos(L2*0.0000174532925199)
|
|
||||||
L12=L7*cos(L1*0.0000174532925199)
|
|
||||||
L13=L7*cos(L4*0.0000174532925199)
|
|
||||||
L14=L7*cos(L5*0.0000174532925199)
|
|
||||||
L15=L7*cos(L3*0.0000174532925199)
|
|
||||||
C6=0.5*L11-0.5*L12+(L6+0.25)*L13+(L6-0.75)*L14+(0.25-L6)*1.4142135623700001*L15
|
|
||||||
C7=0.5*L11+0.5*L12+0.25*L13+0.25*L14+0.25*1.4142135623700001*L15
|
|
||||||
C3=1*L13+1*L14-1*1.4142135623700001*L15
|
|
||||||
C4=-1*L11+1*L12+1.5*L13-0.5*L14-0.5*1.4142135623700001*L15
|
|
||||||
C5=-1*L11-1*L12+0.5*L13+0.5*L14+0.5*1.4142135623700001*L15
|
|
||||||
D0=248
|
|
||||||
> list inverse
|
|
||||||
list inverse
|
|
||||||
L6=118000/377500
|
|
||||||
L11=0.5*C6+0.5*C7+(0.25-0.5*L6)*C3-0.25*C4-0.25*C5
|
|
||||||
L12=-0.5*C6+0.5*C7+(0.5*L6-0.25)*C3+0.25*C4-0.25*C5
|
|
||||||
L13=0.5*C6+0.5*C7+(0.25-0.5*L6)*C3+0.25*C4+0.25*C5
|
|
||||||
L14=-0.5*C6+0.5*C7+(0.25+0.5*L6)*C3-0.25*C4+0.25*C5
|
|
||||||
L15=0.5*1.4142135623700001*C7-0.25*1.4142135623700001*C3+0.25*1.4142135623700001*C5
|
|
||||||
L7=1.4142135623700001/5000
|
|
||||||
L2=acos(L11*L7)/0.0000174532925199
|
|
||||||
L1=acos(L12*L7)/0.0000174532925199
|
|
||||||
L4=acos(L13*L7)/0.0000174532925199
|
|
||||||
L5=acos(L14*L7)/0.0000174532925199
|
|
||||||
L3=acos(L15*L7)/0.0000174532925199
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
20
Makefile
20
Makefile
@@ -1,20 +0,0 @@
|
|||||||
include /ioc/tools/driver.makefile
|
|
||||||
MODULE = $(notdir $(shell pwd))
|
|
||||||
BUILDCLASSES = Linux
|
|
||||||
ARCH_FILTER = ARCH_FILTER = $(EPICS_HOST_ARCH) RHEL7-x86_64 eldk42%
|
|
||||||
EXCLUDE_VERSIONS = 3.14 # 7.0.6
|
|
||||||
#EPICS_VERSIONS = 7.0.7
|
|
||||||
|
|
||||||
#SCRIPTS+=$(wildcard add_EXPMX*.cmd cfg/*.cfg cfg/*.py cfg/*.pbi python/*.py)
|
|
||||||
SCRIPTS+=$(wildcard add_EXPMX*.cmd cfg/*.cfg cfg/*.py cfg/*.pbi)
|
|
||||||
#SOURCES+=src/DHVSaSub.cpp
|
|
||||||
#DBDS+=src/DHVSaSub.dbd
|
|
||||||
USR_CXXFLAGS+= -fno-operator-names
|
|
||||||
|
|
||||||
.PHONY: install_ioc generate
|
|
||||||
|
|
||||||
install_ioc: generate
|
|
||||||
cd gen/ioc;make install
|
|
||||||
|
|
||||||
generate:
|
|
||||||
/opt/gfa/python-3.8/latest/bin/python generate.py -m 0xf
|
|
||||||
184
PBInspect.pbi
184
PBInspect.pbi
@@ -1,184 +0,0 @@
|
|||||||
[
|
|
||||||
[
|
|
||||||
"MotorListCtrl",
|
|
||||||
[
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
4,
|
|
||||||
5,
|
|
||||||
6,
|
|
||||||
7,
|
|
||||||
8,
|
|
||||||
9,
|
|
||||||
10,
|
|
||||||
11,
|
|
||||||
12,
|
|
||||||
13,
|
|
||||||
14,
|
|
||||||
15,
|
|
||||||
16
|
|
||||||
],
|
|
||||||
"name=p;caption=motor pos;state=67377148;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=200;besth=350;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"WatchListCtrl",
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"Motor[1].idCmd",
|
|
||||||
"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)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"EncTable[2].PrevEnc",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[2].Pos",
|
|
||||||
"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)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[2].ServoOut",
|
|
||||||
"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"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"name=m1;caption=motor1;state=67377148;dir=4;layer=0;row=2;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=485;floaty=810;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
3
|
|
||||||
],
|
|
||||||
"name=m3;caption=motor3;state=67377148;dir=4;layer=0;row=5;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=694;floaty=941;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusGblListCtrl",
|
|
||||||
[],
|
|
||||||
"name=g;caption=global;state=67377148;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=200;besth=369;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=2058;floaty=457;floatw=208;floath=377;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
2
|
|
||||||
],
|
|
||||||
"name=m2;caption=motor2;state=67377148;dir=4;layer=0;row=4;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=2588;floaty=946;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
191
PBInspect1.pbi
191
PBInspect1.pbi
@@ -1,191 +0,0 @@
|
|||||||
[
|
|
||||||
[
|
|
||||||
"StatusGblListCtrl",
|
|
||||||
[],
|
|
||||||
"name=g;caption=global;state=67377148;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=200;besth=369;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=41;floaty=486;floatw=208;floath=377;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"MotorListCtrl",
|
|
||||||
[
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
4,
|
|
||||||
5,
|
|
||||||
6,
|
|
||||||
7,
|
|
||||||
8,
|
|
||||||
9,
|
|
||||||
10,
|
|
||||||
11,
|
|
||||||
12,
|
|
||||||
13,
|
|
||||||
14,
|
|
||||||
15,
|
|
||||||
16
|
|
||||||
],
|
|
||||||
"name=p;caption=motor pos;state=67377148;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=200;besth=350;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"WatchListCtrl",
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"EncTable[9].PrevEnc",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"EncTable[10].PrevEnc",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"EncTable[11].PrevEnc",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"EncTable[12].PrevEnc",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"EncTable[13].PrevEnc",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"EncTable[14].PrevEnc",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"EncTable[15].PrevEnc",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"EncTable[16].PrevEnc",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[1].idCmd",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[2].idCmd",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[1].ServoOut",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[2].ServoOut",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[1].iqCmd",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[2].iqCmd",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"name=w;caption=watch;state=67377148;dir=4;layer=0;row=2;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"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"name=m1;caption=motor1;state=67377148;dir=4;layer=0;row=3;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=485;floaty=810;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
2
|
|
||||||
],
|
|
||||||
"name=m2;caption=motor2;state=67377148;dir=4;layer=0;row=3;pos=1;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=520;floaty=734;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"WatchListCtrl",
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"P2010",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2011",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2012",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2013",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2014",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2015",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2016",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2017",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2018",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2019",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2020",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2021",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2022",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2023",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2024",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2025",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2026",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2027",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2028",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2029",
|
|
||||||
"lambda v: '%.5g'%float(v)"
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"name=w-1;caption=watch;state=67377148;dir=4;layer=0;row=1;pos=0;prop=129863;bestw=200;besth=369;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=464;floaty=580;floatw=208;floath=377;notebookid=-1;transparent=255"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
153
PBInspect2.pbi
153
PBInspect2.pbi
@@ -1,153 +0,0 @@
|
|||||||
[
|
|
||||||
[
|
|
||||||
"StatusGblListCtrl",
|
|
||||||
[],
|
|
||||||
"name=g;caption=global;state=67377148;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=200;besth=369;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=41;floaty=486;floatw=208;floath=377;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"MotorListCtrl",
|
|
||||||
[
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
4,
|
|
||||||
5,
|
|
||||||
6,
|
|
||||||
7,
|
|
||||||
8,
|
|
||||||
9,
|
|
||||||
10,
|
|
||||||
11,
|
|
||||||
12,
|
|
||||||
13,
|
|
||||||
14,
|
|
||||||
15,
|
|
||||||
16
|
|
||||||
],
|
|
||||||
"name=p;caption=motor pos;state=67377148;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=200;besth=350;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"WatchListCtrl",
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"Motor[1].idCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[1].iqCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[1].ServoOut",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[2].iqCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[2].idCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[2].ServoOut",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[3].iqCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[3].idCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[3].ServoOut",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[4].iqCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[4].idCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[4].ServoOut",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[5].iqCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[5].idCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[5].ServoOut",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P1000",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2000",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Gather.Samples",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Gather.MaxLines",
|
|
||||||
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"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"name=m1;caption=motor1;state=67377148;dir=4;layer=0;row=4;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=485;floaty=810;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
2
|
|
||||||
],
|
|
||||||
"name=m2;caption=motor2;state=67377148;dir=4;layer=0;row=4;pos=1;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=520;floaty=734;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusCoordListCtrl",
|
|
||||||
[
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"name=c1;caption=coord1;state=67377148;dir=4;layer=0;row=2;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=350;floaty=493;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"name=m4;caption=motor4;state=67377148;dir=4;layer=0;row=5;pos=1;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=991;floaty=738;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
5
|
|
||||||
],
|
|
||||||
"name=m5;caption=motor5;state=67377148;dir=4;layer=0;row=6;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=1181;floaty=512;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
3
|
|
||||||
],
|
|
||||||
"name=m3;caption=motor3;state=67377148;dir=4;layer=0;row=5;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=1168;floaty=473;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
153
PBInspect3.pbi
153
PBInspect3.pbi
@@ -1,153 +0,0 @@
|
|||||||
[
|
|
||||||
[
|
|
||||||
"StatusGblListCtrl",
|
|
||||||
[],
|
|
||||||
"name=g;caption=global;state=67377148;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=200;besth=369;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=41;floaty=486;floatw=208;floath=377;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"MotorListCtrl",
|
|
||||||
[
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
4,
|
|
||||||
5,
|
|
||||||
6,
|
|
||||||
7,
|
|
||||||
8,
|
|
||||||
9,
|
|
||||||
10,
|
|
||||||
11,
|
|
||||||
12,
|
|
||||||
13,
|
|
||||||
14,
|
|
||||||
15,
|
|
||||||
16
|
|
||||||
],
|
|
||||||
"name=p;caption=motor pos;state=67377148;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=200;besth=350;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"WatchListCtrl",
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"Motor[1].idCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[1].iqCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[1].ServoOut",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[2].iqCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[2].idCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[2].ServoOut",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[3].iqCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[3].idCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[3].ServoOut",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[4].iqCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[4].idCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[4].ServoOut",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[5].iqCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[5].idCmd",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Motor[5].ServoOut",
|
|
||||||
"lambda v: '%.8g'%float(v)"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P1000",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"P2000",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Gather.Samples",
|
|
||||||
null
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Gather.MaxLines",
|
|
||||||
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"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"name=m1;caption=motor1;state=67377148;dir=4;layer=0;row=4;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=485;floaty=810;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
2
|
|
||||||
],
|
|
||||||
"name=m2;caption=motor2;state=67377148;dir=4;layer=0;row=4;pos=1;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=520;floaty=734;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusCoordListCtrl",
|
|
||||||
[
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"name=c1;caption=coord1;state=67377148;dir=4;layer=0;row=2;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=350;floaty=493;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"name=m4;caption=motor4;state=67377148;dir=4;layer=0;row=5;pos=1;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=991;floaty=738;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
5
|
|
||||||
],
|
|
||||||
"name=m5;caption=motor5;state=67377148;dir=4;layer=0;row=6;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=1181;floaty=512;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"StatusMotorListCtrl",
|
|
||||||
[
|
|
||||||
3
|
|
||||||
],
|
|
||||||
"name=m3;caption=motor3;state=67377148;dir=4;layer=0;row=5;pos=0;prop=100000;bestw=200;besth=669;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=1168;floaty=473;floatw=208;floath=677;notebookid=-1;transparent=255"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
record(motor,"$(P):$(M)")
|
|
||||||
{
|
|
||||||
field(DESC,"$(DESC)")
|
|
||||||
field(DTYP,"asynMotor")
|
|
||||||
field(OUT,"@asyn($(PORT=PPMAC),$(ADDR))")
|
|
||||||
field(DIR,"$(DIR=0)")
|
|
||||||
field(VMAX,"$(VMAX=0)")
|
|
||||||
field(VELO,"$(VELO)")
|
|
||||||
# field(JVEL,"$(JVEL=$(VELO)")
|
|
||||||
field(HVEL,"$(HVEL=1)")
|
|
||||||
field(ACCL,"$(ACCL=.1)")
|
|
||||||
field(JAR, "$(JAR=20)")
|
|
||||||
field(MRES,"$(MRES=1)")
|
|
||||||
field(PREC,"$(PREC=0)")
|
|
||||||
field(EGU,"$(EGU=ustep)")
|
|
||||||
field(DHLM,"$(DHLM=0)")
|
|
||||||
field(DLLM,"$(DLLM=0)")
|
|
||||||
field(MDEL,"$(MDEL=0.001)")
|
|
||||||
field(TWV,"$(TWV=0.1)")
|
|
||||||
field(RTRY,"0")
|
|
||||||
}
|
|
||||||
82
ReadmeMCS.md
82
ReadmeMCS.md
@@ -1,82 +0,0 @@
|
|||||||
asynReport 255
|
|
||||||
asynSetTraceIOMask
|
|
||||||
asynSetTraceInfoMask
|
|
||||||
asynSetTraceMask
|
|
||||||
/home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/SASE_RIXS/Readme.md
|
|
||||||
|
|
||||||
asynReport
|
|
||||||
asynReport 3 MCS
|
|
||||||
asynReport 3 asynMCS
|
|
||||||
|
|
||||||
|
|
||||||
asynSetTraceMask asynMCS 0 0xff
|
|
||||||
asynSetTraceIOMask asynMCS 0 0xff
|
|
||||||
|
|
||||||
asynSetTraceMask asynMCS,0, error|device|filter|driver|flow|warning
|
|
||||||
asynSetTraceIOMask asynMCS,0, nodata|ascii|escape|hex
|
|
||||||
asynSetTraceInfoMask asynMCS,0, time|port|source|thread
|
|
||||||
|
|
||||||
#quite/default asyn communication
|
|
||||||
asynSetTraceMask asynMCS,0, error
|
|
||||||
asynSetTraceIOMask asynMCS,0, escape
|
|
||||||
asynSetTraceInfoMask asynMCS,0, time|port|source
|
|
||||||
asynSetTraceMask MCS,0, error
|
|
||||||
asynSetTraceIOMask MCS,0, escape
|
|
||||||
asynSetTraceInfoMask MCS,0, time|port|source
|
|
||||||
|
|
||||||
|
|
||||||
#good debugging for asyn communication
|
|
||||||
asynSetTraceMask asynMCS,0, error|driver
|
|
||||||
asynSetTraceIOMask asynMCS,0, escape
|
|
||||||
asynSetTraceInfoMask asynMCS,0, time|port|source
|
|
||||||
|
|
||||||
#good debugging for motor record tracing
|
|
||||||
asynSetTraceMask MCS,0, error|device|filter|driver|flow|warning
|
|
||||||
asynSetTraceIOMask MCS,0, escape
|
|
||||||
asynSetTraceInfoMask MCS,0, time|port|source
|
|
||||||
|
|
||||||
|
|
||||||
/home/zamofing_t/Documents/doc-ext/SmaractMCS/MCSrs232InterfaceDocumentation.pdf
|
|
||||||
ncat 129.129.244.32 5000
|
|
||||||
->resut :ID4049801502
|
|
||||||
|
|
||||||
:GSI
|
|
||||||
:GIV
|
|
||||||
:GNC
|
|
||||||
|
|
||||||
:GCT0
|
|
||||||
|
|
||||||
:MPA0,123000,2000
|
|
||||||
:GP0
|
|
||||||
->:P0,123000\n
|
|
||||||
:MPA0,987,2000
|
|
||||||
:GST0
|
|
||||||
:ST0,1
|
|
||||||
|
|
||||||
#good debugging for motor record tracing
|
|
||||||
asynSetTraceMask asynS1,0, 0x09
|
|
||||||
asynSetTraceIOMask asynS1,0, 0x02
|
|
||||||
asynSetTraceInfoMask asynS1,0, 0x07
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
add a ASYn record
|
|
||||||
|
|
||||||
caqtdm -macro 'S=SARES30-SMX,M=MCS,T=MCS' ESB_MX_SmarAct
|
|
||||||
|
|
||||||
caqtdm -macro 'P=SARES30-SMX:,R=ASYN' asynOctet
|
|
||||||
|
|
||||||
caput SARES30-SMX:ASYN.AOUT :GSI
|
|
||||||
caput SARES30-SMX:ASYN.AOUT :GP0
|
|
||||||
caput SARES30-SMX:ASYN.AOUT :MPA0,123000,2000
|
|
||||||
caput SARES30-SMX:ASYN.AOUT :GST0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
caget SARES30-SMX:ASYN.TINP
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/home/zamofing_t/Documents/prj/SwissFEL/driver_modules_epics/motorBase/motorApp/MotorSrc/asynMotorController.h
|
|
||||||
|
|
||||||
if the position can not be reached, the $(S):$(M).MISS is set to 1
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
record(asyn,"$(P):$(R=asyn)")
|
|
||||||
{
|
|
||||||
field(DTYP,"asynRecordDevice")
|
|
||||||
field(PORT,"$(PORT)")
|
|
||||||
field(ADDR,"0")
|
|
||||||
field(OMAX,"100")
|
|
||||||
field(IMAX,"100")
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
|
|
||||||
&1
|
|
||||||
//#1-> 0.00001X+ 0.00001Y + A
|
|
||||||
//#2-> +1. X + .5Y + 0.01A
|
|
||||||
//#3-> + .5X +1. Y + 0.01A
|
|
||||||
|
|
||||||
#1-> Y
|
|
||||||
#2-> X
|
|
||||||
#3-> A
|
|
||||||
|
|
||||||
Coord[1].AltFeedRate=0
|
|
||||||
Coord[1].Tm=1 //1ms time
|
|
||||||
Coord[1].Ta=1
|
|
||||||
Coord[1].Td=1
|
|
||||||
Coord[1].Ts=0
|
|
||||||
|
|
||||||
//Parker: Continous Force 4N -> assume 1kg load -> acceleration=a=F/m=4m/s^2
|
|
||||||
//do not use time to accelerate but acceleration
|
|
||||||
//4m/s^2=4um/(ms)^2 Motor units=um -> JogTa= -1ms^2/4mu -2.5-> 4m/s^2 -25->0.4m/s^2
|
|
||||||
Motor[1].JogTs=0
|
|
||||||
Motor[1].JogTa=-2.5
|
|
||||||
Motor[2].JogTs=0
|
|
||||||
Motor[2].JogTa=-2.5
|
|
||||||
|
|
||||||
|
|
||||||
Motor[1].MaxSpeed=50
|
|
||||||
Motor[2].MaxSpeed=50
|
|
||||||
Motor[3].MaxSpeed=360
|
|
||||||
170
cfg/MX1_home.cfg
170
cfg/MX1_home.cfg
@@ -1,170 +0,0 @@
|
|||||||
define(PLC_Homing='1')
|
|
||||||
define(PLC_HomingCY='2')
|
|
||||||
define(statusHoming='P100')
|
|
||||||
statusHoming=0
|
|
||||||
|
|
||||||
//statusHoming:
|
|
||||||
// 1: M1 phased
|
|
||||||
// 2: M2 phased
|
|
||||||
// 4: M1 pos limit found
|
|
||||||
// 8: M2 pos limit found
|
|
||||||
// 16: M1 homed
|
|
||||||
// 32: M2 homed
|
|
||||||
// 256: homing failed
|
|
||||||
|
|
||||||
|
|
||||||
open plc PLC_Homing
|
|
||||||
define(timer='L1')
|
|
||||||
statusHoming=0
|
|
||||||
L10=Motor[1].MaxDac
|
|
||||||
Motor[1].MaxDac=500
|
|
||||||
L11=Motor[1].FatalFeLimit
|
|
||||||
Motor[1].FatalFeLimit=2000
|
|
||||||
L12=Motor[1].JogSpeed
|
|
||||||
Motor[1].JogSpeed=1
|
|
||||||
L13=Motor[1].pEncLoss
|
|
||||||
Motor[1].pEncLoss=0
|
|
||||||
|
|
||||||
L20=Motor[2].MaxDac
|
|
||||||
Motor[2].MaxDac=500
|
|
||||||
L21=Motor[2].FatalFeLimit
|
|
||||||
Motor[2].FatalFeLimit=2000
|
|
||||||
L22=Motor[2].JogSpeed
|
|
||||||
Motor[2].JogSpeed=1
|
|
||||||
L23=Motor[2].pEncLoss
|
|
||||||
Motor[2].pEncLoss=0
|
|
||||||
|
|
||||||
|
|
||||||
Motor[1].PhaseFindingStep=1
|
|
||||||
Motor[2].PhaseFindingStep=1
|
|
||||||
while(Motor[1].PhaseFindingStep>0 || Motor[2].PhaseFindingStep>0){}
|
|
||||||
if (Motor[1].PhaseFound==1)
|
|
||||||
{
|
|
||||||
statusHoming|=1
|
|
||||||
cmd "#1j/"
|
|
||||||
send 1"phasing Y_Achse ok\n"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
send 1"phasing Y Achsde error!\n"
|
|
||||||
goto 0 //ERROR_END
|
|
||||||
}
|
|
||||||
if (Motor[2].PhaseFound==1)
|
|
||||||
{
|
|
||||||
statusHoming|=2
|
|
||||||
cmd "#2j/"
|
|
||||||
send 1"phasing X_Achse ok\n"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
send 1"phasing X Achse error!\n"
|
|
||||||
statusHoming|=256
|
|
||||||
goto 0 //ERROR_END
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//move until FeWarn
|
|
||||||
Motor[1].JogSpeed=6
|
|
||||||
Motor[2].JogSpeed=6
|
|
||||||
timer = Sys.RunTime + .5;while (Sys.RunTime < timer){} //wait .5 sec
|
|
||||||
jog+1
|
|
||||||
jog+2
|
|
||||||
while(1)
|
|
||||||
{
|
|
||||||
if(Motor[1].FeWarn && (statusHoming&4)==0)
|
|
||||||
{
|
|
||||||
cmd "#1j/"
|
|
||||||
send 1"Y_Achse +limit\n"
|
|
||||||
statusHoming|=4
|
|
||||||
}
|
|
||||||
if(Motor[2].FeWarn && (statusHoming&8)==0)
|
|
||||||
{
|
|
||||||
cmd "#2j/"
|
|
||||||
send 1"X_Achse +limit\n"
|
|
||||||
statusHoming|=8
|
|
||||||
}
|
|
||||||
if((statusHoming&12)==12)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
timer = Sys.RunTime + .5;while (Sys.RunTime < timer){} //wait .5 sec
|
|
||||||
|
|
||||||
Motor[1].HomeVel=-3
|
|
||||||
Motor[2].HomeVel=-3
|
|
||||||
home1
|
|
||||||
home2
|
|
||||||
timer = Sys.RunTime + .5;while (Sys.RunTime < timer){} //wait .5 sec
|
|
||||||
while(Motor[1].HomeInProgress || Motor[2].HomeInProgress){}
|
|
||||||
|
|
||||||
if(Motor[1].HomeComplete)
|
|
||||||
statusHoming=statusHoming|16
|
|
||||||
else
|
|
||||||
{
|
|
||||||
statusHoming|=256
|
|
||||||
send 1"Y_Achse home failed\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
if(Motor[2].HomeComplete)
|
|
||||||
statusHoming=statusHoming|32
|
|
||||||
else
|
|
||||||
{
|
|
||||||
statusHoming|=256
|
|
||||||
send 1"X_Achse home failed\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
//Motor[1].PhasePos=560 // 555 581 593 558
|
|
||||||
//Motor[2].PhasePos=1540 //1549 1531 1543 1537
|
|
||||||
homez6,7
|
|
||||||
|
|
||||||
goto 1
|
|
||||||
|
|
||||||
N0: //ERROR_END
|
|
||||||
statusHoming|=256
|
|
||||||
|
|
||||||
N1: //ENDPLC
|
|
||||||
Motor[1].MaxDac=L10
|
|
||||||
Motor[1].FatalFeLimit=L11
|
|
||||||
Motor[1].JogSpeed=L12
|
|
||||||
Motor[1].pEncLoss=L13
|
|
||||||
|
|
||||||
Motor[2].MaxDac=L20
|
|
||||||
Motor[2].FatalFeLimit=L21
|
|
||||||
Motor[2].JogSpeed=L22
|
|
||||||
Motor[2].pEncLoss=L23
|
|
||||||
send 1"homeing done\n"
|
|
||||||
|
|
||||||
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=-1500
|
|
||||||
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-=29000 //set this position to 29000um
|
|
||||||
statusHoming|=8
|
|
||||||
disable plc PLC_HomingCY
|
|
||||||
close
|
|
||||||
@@ -1,153 +0,0 @@
|
|||||||
//servoSf : motorusteps/user_units
|
|
||||||
//posSf : user_units/encoder_steps
|
|
||||||
//because of many problems with pos2Sf, selt them to 0
|
|
||||||
|
|
||||||
// Here we use 'real encoder with direct PWM'. Further the axis are scaled
|
|
||||||
// in this configuration, the PID gives 'torque' to iqCmd.
|
|
||||||
// the phasePos is received from tne encoder on the motor shaft.
|
|
||||||
// The idCmd is set to 0
|
|
||||||
// the PID regulates the position by setting torque, if the motor is not at the desired position
|
|
||||||
// Compared to 'real encoder with direct microstepping', following main elements have to be reconfigured:
|
|
||||||
// SlipGain=0 (instead 0.25) ,PhasePosSf= calculated value (instead of 0)
|
|
||||||
// look also at PwmSf,PhaseMode,PhaseCtrl,
|
|
||||||
|
|
||||||
// -> PhasePosSf is calculated as follows: (2048*pole_cycle)/(256*enc_step) = 8*pole_cycle/enc_step
|
|
||||||
|
|
||||||
// e.g. Motor[x].pPhaseEnc -> PowerBrick[.].Chan[.].PhaseCapt.a
|
|
||||||
// 1 rev = 8192 phase_step = 4 pole_cycle = 512000 PhaseCapt =256*2000 (256=scaling of encTable, 2000=enc_step/rev)
|
|
||||||
// PhasePosSf 8*4/2000=0.016
|
|
||||||
|
|
||||||
|
|
||||||
// x einraster == -> x-N and x-S poles =2*x poles -> 1 rev = x*2048 ustep=phase_step
|
|
||||||
// changing the polarity from S-N-S (one pole cycle) are 2048 phase_step. phase_step is also called ustep
|
|
||||||
|
|
||||||
//Mot 1: Stage Y Parker MX80L D11 25mm one pole cycle = 13mm = 2048 phase_step
|
|
||||||
//Enc 1: Stage Y Parker MX80L D11 inc_enc 20nm one pole cycle = 13mm = 650000 enc_step (20nm/enc_step)
|
|
||||||
|
|
||||||
//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
|
|
||||||
|
|
||||||
//Mot 5: Stage Z Stada Stepper 670mA 200 poles 1 rev = 100*2048 phase_step (2 stepper motor)
|
|
||||||
//Enc 5: Renishaw absolute BiSS
|
|
||||||
|
|
||||||
//Enc 6: Interferometer Y
|
|
||||||
|
|
||||||
//Enc 7: Interferometer X
|
|
||||||
|
|
||||||
//Stage Y Parker MX80L
|
|
||||||
//--------------------
|
|
||||||
//Motor[1].pPhaseEnc -> PowerBrick[0].Chan[1].PhaseCapt.a
|
|
||||||
// 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)
|
|
||||||
//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=25,Kvfb=350,Ki=0.02,Kvff=350,Kaff=1615,MaxInt=1000,Kfff=10)
|
|
||||||
!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')
|
|
||||||
//turn off encoder loss: Motor[1].pEncLoss=PowerBrick[0].Chan[0].Status.a
|
|
||||||
Motor[1].pEncLoss=0
|
|
||||||
|
|
||||||
//Stage X Parker MX80L (top stage, mounted on Y stage)
|
|
||||||
//----------------------------------------------------
|
|
||||||
//Motor[2].pPhaseEnc -> PowerBrick[0].Chan[1].PhaseCapt.a
|
|
||||||
// 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=22,Kvfb=450,Ki=0.02,Kvff=450,Kaff=4517,MaxInt=1000,Kfff=10)
|
|
||||||
!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')
|
|
||||||
//turn off encoder loss: Motor[2].pEncLoss=PowerBrick[0].Chan[1].Status.a
|
|
||||||
Motor[2].pEncLoss=0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//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
|
|
||||||
//Motor[1].pPhaseEnc=EncTable[1].pEnc=Acc84B[0].Chan[0].SerialEncDataA.a
|
|
||||||
// -> PhasePosSf is calculated as follows: (2048*pole_cycle)/(256*enc_step) = 8*pole_cycle/enc_step
|
|
||||||
//PhasePosSf = (2048*pole_cycle)/(SerialEncDataA)=8*16/1048576=1/32
|
|
||||||
// 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 -> posSf=500um/2000=0.25
|
|
||||||
//measured: 30mm=119640.5 enc_cnt posSf=30000/119640.5=0.2507
|
|
||||||
// max. 2.1A 36V 12mm/s
|
|
||||||
|
|
||||||
//!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=50,homing='hi-limit')
|
|
||||||
Motor[3].Servo.Kp=20
|
|
||||||
Motor[3].Servo.BreakPosErr=1
|
|
||||||
Motor[3].Servo.KBreak=10
|
|
||||||
Motor[3].Servo.Ki=0
|
|
||||||
Motor[3].Servo.OutDbOn=50
|
|
||||||
Motor[3].Servo.OutDbOff=50
|
|
||||||
|
|
||||||
//Motor[3].Servo.Kp=80
|
|
||||||
//Motor[3].Servo.BreakPosErr=0
|
|
||||||
//Motor[3].Servo.KBreak=2
|
|
||||||
//Motor[3].Servo.Ki=0
|
|
||||||
//Motor[3].Servo.OutDbOn=150
|
|
||||||
//Motor[3].Servo.OutDbOff=150
|
|
||||||
|
|
||||||
//Motor[3].Servo.Kp=50
|
|
||||||
//Motor[3].Servo.BreakPosErr=5
|
|
||||||
//Motor[3].Servo.Ki=.0005
|
|
||||||
//Motor[3].Servo.OutDbOn=200
|
|
||||||
//Motor[3].Servo.OutDbOff=200
|
|
||||||
|
|
||||||
|
|
||||||
//Stada stage
|
|
||||||
//-----------
|
|
||||||
//512000 ustep == 50000 encCnt == 2500um
|
|
||||||
//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=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
|
|
||||||
//------------------
|
|
||||||
!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
|
|
||||||
|
|
||||||
#4,5hmz
|
|
||||||
|
|
||||||
//holding current
|
|
||||||
!holding_current(m4=[0,240],m5=[0,240])
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
// ---------- Coordinate System/Transformation ----------
|
|
||||||
|
|
||||||
//These values influence the speed of axis X,Y,Z and also A,B
|
|
||||||
Coord[1].Ta=100
|
|
||||||
Coord[1].Td=100
|
|
||||||
Coord[1].AltFeedRate=1000
|
|
||||||
Coord[1].Tm=-1000 //1000um/FeedTime -> 1mm/sec
|
|
||||||
Coord[1].FeedTime=1000 //default value 1000um
|
|
||||||
|
|
||||||
|
|
||||||
//Coordinate Transformation
|
|
||||||
&1
|
|
||||||
#1-> -1.X -10.Y +0.5A +5.B
|
|
||||||
#2-> +1.X -10.Y -0.5A +5.B //motor 2 has opposite direction
|
|
||||||
#3-> -1.X -10.Y -0.5A -5.B
|
|
||||||
#4-> +1.X -10.Y +0.5A -5.B //motor 4 has opposite direction
|
|
||||||
|
|
||||||
//PITCH YAW are not exposed directly, because these would need
|
|
||||||
//inverse and forward kinematics due to the angle functions
|
|
||||||
|
|
||||||
Motor[1].MaxSpeed=Motor[1].JogSpeed
|
|
||||||
Motor[2].MaxSpeed=Motor[2].JogSpeed
|
|
||||||
Motor[3].MaxSpeed=Motor[3].JogSpeed
|
|
||||||
Motor[4].MaxSpeed=Motor[4].JogSpeed
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
define(PLC_Homing='1')
|
|
||||||
|
|
||||||
//Homing:
|
|
||||||
//Move all motors left bottom
|
|
||||||
//move 1mm up
|
|
||||||
//move both mottors at same time
|
|
||||||
|
|
||||||
//move to limit switch, gather data, move to other limit switch, gather stop. move back to first limit switch
|
|
||||||
//status :P100: local status
|
|
||||||
//timer :L0: local timer
|
|
||||||
|
|
||||||
open plc PLC_Homing
|
|
||||||
define(status='P100',timer='L0')
|
|
||||||
jog-1; jog-2; jog-3; jog-4;
|
|
||||||
Motor[1].HomeVel=0.5
|
|
||||||
Motor[2].HomeVel=0.5
|
|
||||||
Motor[3].HomeVel=0.5
|
|
||||||
Motor[4].HomeVel=0.5
|
|
||||||
status=1
|
|
||||||
|
|
||||||
while(1)
|
|
||||||
{
|
|
||||||
if((Motor[1].LimitStop==1 || Motor[1].FeFatal==1)){
|
|
||||||
if((Motor[2].LimitStop==1 || Motor[2].FeFatal==1)){
|
|
||||||
if((Motor[3].LimitStop==1 || Motor[3].FeFatal==1)){
|
|
||||||
if((Motor[4].LimitStop==1 || Motor[4].FeFatal==1)){
|
|
||||||
status=2
|
|
||||||
break
|
|
||||||
}}}}
|
|
||||||
}
|
|
||||||
timer = Sys.RunTime + 2
|
|
||||||
while (Sys.RunTime < timer){} //wait 1 sec
|
|
||||||
status=3
|
|
||||||
jog1:1000; jog2:1000; jog3:1000; jog4:1000;
|
|
||||||
timer = Sys.RunTime + .1
|
|
||||||
while (Sys.RunTime < timer){} //wait 1 sec
|
|
||||||
status=4
|
|
||||||
while(1)
|
|
||||||
{
|
|
||||||
if(Motor[1].DesVelZero==1 && Motor[2].DesVelZero==1 && Motor[3].DesVelZero==1 && Motor[4].DesVelZero==1)
|
|
||||||
{
|
|
||||||
status=5
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
timer = Sys.RunTime + .1
|
|
||||||
while (Sys.RunTime < timer){}
|
|
||||||
home 1; home 2; home 3; home 4
|
|
||||||
status=6
|
|
||||||
while(1) //wait homing index found done
|
|
||||||
{
|
|
||||||
if(Motor[1].HomeComplete==1 && Motor[2].HomeComplete==1 && Motor[3].HomeComplete==1 && Motor[4].HomeComplete==1)
|
|
||||||
{
|
|
||||||
status=7
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while(1) //wait moving to zero position done
|
|
||||||
{
|
|
||||||
if(Motor[1].DesVelZero==1 && Motor[2].DesVelZero==1 && Motor[3].DesVelZero==1 && Motor[4].DesVelZero==1)
|
|
||||||
{
|
|
||||||
status=8
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
disable plc PLC_Homing
|
|
||||||
close
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
//Wedge Movers
|
|
||||||
//--------------
|
|
||||||
//Nanotec 2 ph motor 42.3mm 1.8deg, Planetgetriebe 1.5Nm I=1:12, Spindel 2mm steigung
|
|
||||||
//ST4118L1804-B 42 mm 17 50 Ncm 1.8 deg/step 1.8 A/Wicklung 49 mm €34.10
|
|
||||||
|
|
||||||
//102400*12=1228800 == 2mm
|
|
||||||
//#1j:1228800 -> 1 rev = 2mm = 2000inc
|
|
||||||
//posSf = userUnits/encoder_steps =1
|
|
||||||
//servoSf=motor_u_steps/userUnits = 1228800/2000. = 614.4
|
|
||||||
|
|
||||||
//#1 = wedge 1a
|
|
||||||
//#2 = wedge 1b
|
|
||||||
//#3 = wedge 2a
|
|
||||||
//#4 = wedge 2b
|
|
||||||
|
|
||||||
//steigung Keil: 11.4212deg = arctan(0.2)=11.31deg -> Steigung 1:5
|
|
||||||
//on 146mm from 35 to 21.5mm 146/(35-21.5)=10.81
|
|
||||||
//on 280mm from 61mm to 38 mm 280/(61-38)=
|
|
||||||
|
|
||||||
//!encoder_sim(enc=1)
|
|
||||||
//!encoder_inc(enc=1,tbl=9,mot=9,posSf=1)
|
|
||||||
//!motor(mot=1,dirCur=120,JogSpeed=102.4*1,invDir=False)
|
|
||||||
//Motor[1].pLimits=0
|
|
||||||
|
|
||||||
!encoder_inc(enc=1,posSf=1.)
|
|
||||||
!motor(mot=1,dirCur=1000,JogSpeed=1.,HomeVel=.5,servoSf=614.4,homing='enc-index',invDir=False,HomeOffset=0,InPosBand=1,FaultMode=0)
|
|
||||||
|
|
||||||
!encoder_inc(enc=2,posSf=1.)
|
|
||||||
!motor(mot=2,dirCur=1000,JogSpeed=1.,HomeVel=.5,servoSf=614.4,homing='enc-index',invDir=False,HomeOffset=0,InPosBand=1,FaultMode=0)
|
|
||||||
|
|
||||||
!encoder_inc(enc=3,posSf=1.)
|
|
||||||
!motor(mot=3,dirCur=1000,JogSpeed=1.,HomeVel=.5,servoSf=614.4,homing='enc-index',invDir=False,HomeOffset=0,InPosBand=1,FaultMode=0)
|
|
||||||
|
|
||||||
!encoder_inc(enc=4,posSf=1.)
|
|
||||||
!motor(mot=4,dirCur=1000,JogSpeed=1.,HomeVel=.5,servoSf=614.4,homing='enc-index',invDir=False,HomeOffset=0,InPosBand=1,FaultMode=0)
|
|
||||||
|
|
||||||
|
|
||||||
//Backlight
|
|
||||||
//---------
|
|
||||||
//#5j=0 //down #5j=-31000 //up
|
|
||||||
!encoder_sim(enc=5)
|
|
||||||
!motor(mot=5,dirCur=1800,JogSpeed=40,invDir=False)
|
|
||||||
|
|
||||||
|
|
||||||
//Cryojet
|
|
||||||
//---------
|
|
||||||
//Max. 1.5A -1024000=-10mm
|
|
||||||
//posSf = userUnits/encoder_steps =10000/1024000 =10./1024
|
|
||||||
//servoSf=motor_u_steps/userUnits = 1024000/10000. = 102.4
|
|
||||||
!encoder_sim(enc=6,posSf=10./1024)
|
|
||||||
!motor(mot=6,dirCur=1500,JogSpeed=10,invDir=False,servoSf=102.4)
|
|
||||||
|
|
||||||
|
|
||||||
!holding_current(m1=[0,1000],m2=[0,1000],m3=[0,1000],m4=[0,1000],m5=[1400,1800],m6=[0,1000])
|
|
||||||
@@ -1,129 +0,0 @@
|
|||||||
def MX3_coordTrf(fileParser,kwargs):
|
|
||||||
from math import sqrt
|
|
||||||
'''
|
|
||||||
--- mandatory ---
|
|
||||||
exc : excentricity of cam
|
|
||||||
height: Height of the beam above moved plane
|
|
||||||
width : x-distance of P2 to P3
|
|
||||||
length: y-distance of P1 to P2,P3
|
|
||||||
camSf : scale factor to convert cam encoder to rotation angle (360deg=2*pi)
|
|
||||||
--- optional ---
|
|
||||||
...
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
Coordinate Transformation
|
|
||||||
-------------------------
|
|
||||||
L1-5: AA1-5 : Cam Angle = Motor position
|
|
||||||
L11-15: S1-5 : Linear shift of the cam S.= E/sqrt(2)*sin(AA.)
|
|
||||||
C3-7: X,Y,U,V,W : X,Y positions and rotation around axes X,Y,Z
|
|
||||||
|
|
||||||
open forward
|
|
||||||
L1-L5 are input motor positions, C3-C7 are output coordinate
|
|
||||||
X=D^-1*S
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open inverse
|
|
||||||
L1-L5 are output motor positions, C3-C7 are input coordinate
|
|
||||||
S=D*X
|
|
||||||
|
|
||||||
'''
|
|
||||||
|
|
||||||
kw=kwargs
|
|
||||||
|
|
||||||
if not kw.has_key('q'):
|
|
||||||
kw['q']=0.
|
|
||||||
|
|
||||||
kw['sqrt2']=sqrt(2.)
|
|
||||||
fileParser.parse_txt('''
|
|
||||||
// ---------- Coordinate System/Transformation ----------
|
|
||||||
// Set the motors as inverse kinematic axes in CS 1
|
|
||||||
&1
|
|
||||||
#1->I
|
|
||||||
#2->I
|
|
||||||
#3->I
|
|
||||||
#4->I
|
|
||||||
#5->I
|
|
||||||
|
|
||||||
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
|
|
||||||
Motor[4].MaxSpeed=Motor[4].JogSpeed
|
|
||||||
Motor[5].MaxSpeed=Motor[5].JogSpeed
|
|
||||||
|
|
||||||
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',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)
|
|
||||||
S3=scl*cos(AA3*$camSf)
|
|
||||||
S4=scl*cos(AA4*$camSf)
|
|
||||||
S5=scl*cos(AA5*$camSf)
|
|
||||||
|
|
||||||
//send 1"fwd_inp(%f) %f %f %f %f %f\\n",D0,AA1,AA2,AA3,AA4,AA5
|
|
||||||
//send 1"fwd_inp(%f) %f %f %f %f %f\\n",D0,S1,S2,S3,S4,S5
|
|
||||||
|
|
||||||
|
|
||||||
//X=D^-1*S
|
|
||||||
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
|
|
||||||
|
|
||||||
D0=$$000000f8; //U=$$8 V=$$10 W=$$20 X=$$40 Y=$$80 hex(8+int('10',16)+int('20',16)+int('40',16)+int('80',16)) -> '0xf8'
|
|
||||||
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',q='L8')
|
|
||||||
define(S1='L11',S2='L12',S3='L13',S4='L14',S5='L15')
|
|
||||||
define(X='C6',Y='C7',U='C3',V='C4',W='C5')
|
|
||||||
|
|
||||||
//if(D0>0)
|
|
||||||
// send 1"Velocity calculation NOT SUPPORTED\\n"
|
|
||||||
|
|
||||||
//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*(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
|
|
||||||
AA2=acos(S2*scl)/$camSf
|
|
||||||
AA3=acos(S3*scl)/$camSf
|
|
||||||
AA4=acos(S4*scl)/$camSf
|
|
||||||
AA5=acos(S5*scl)/$camSf
|
|
||||||
|
|
||||||
//send 1"inv_res %f %f %f %f %f\\n",AA1,AA2,AA3,AA4,AA5
|
|
||||||
|
|
||||||
close
|
|
||||||
|
|
||||||
''',kw)
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
//the motor has 512*200*100 usteps per revolution (512 uystep/step, 200 steps/rev 1:100 gear)
|
|
||||||
//the ssi-encoder has 2**18=262144 steps per revolution
|
|
||||||
//calibration values such that 0 mdeg is the highest point (+5mm) and 180000mdeg = lowest point (-5mm)
|
|
||||||
//#1: homeoffset: -20907.5928142
|
|
||||||
//#2: homeoffset: 102320.329068
|
|
||||||
//#3: homeoffset: 168946.772022
|
|
||||||
//#4: homeoffset: -87830.7554146
|
|
||||||
//#5: homeoffset: -47956.2759182
|
|
||||||
|
|
||||||
!encoder_ssi(enc=1,numBits=18,posSf=-5625./4096)
|
|
||||||
!motor(mot=1,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=10,FatalFeLimit=1000,HomeOffset=65477.,FaultMode=0)
|
|
||||||
|
|
||||||
!encoder_ssi(enc=2,numBits=18,posSf=-5625./4096)
|
|
||||||
!motor(mot=2,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=10,FatalFeLimit=1000,HomeOffset=-154370.,FaultMode=0)
|
|
||||||
|
|
||||||
!encoder_ssi(enc=3,numBits=18,posSf=-5625./4096)
|
|
||||||
!motor(mot=3,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=10,FatalFeLimit=1000,HomeOffset=-5248.,FaultMode=0)
|
|
||||||
|
|
||||||
!encoder_ssi(enc=4,numBits=18,posSf=-5625./4096)
|
|
||||||
!motor(mot=4,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=10,FatalFeLimit=1000,HomeOffset=-46620.,FaultMode=0)
|
|
||||||
|
|
||||||
!encoder_ssi(enc=5,numBits=18,posSf=-5625./4096)
|
|
||||||
!motor(mot=5,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=10,FatalFeLimit=1000,HomeOffset=93168.,FaultMode=0)
|
|
||||||
|
|
||||||
Motor[1].Servo.BreakPosErr=0
|
|
||||||
Motor[2].Servo.BreakPosErr=0
|
|
||||||
Motor[3].Servo.BreakPosErr=0
|
|
||||||
Motor[4].Servo.BreakPosErr=0
|
|
||||||
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 = 0.05nm/1enc_cnt=1/20
|
|
||||||
//Open loop
|
|
||||||
//!encoder_sim(enc=6,posSf=2000./102400,pos2Sf=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=1684405.)
|
|
||||||
|
|
||||||
|
|
||||||
// break configuration
|
|
||||||
// at the beginning brakes were handeled with 'custom motion', but this has been removed,
|
|
||||||
// as it was possible to cofigure simple brake handling with the motor on a better approach
|
|
||||||
// s.a. following implementation
|
|
||||||
// ~/Documents/prj/SwissFEL/epics_ioc_modules/PBPG/cfg/motEnc-PBPG050.cfg
|
|
||||||
//!holding_current template not needed. The brake stuff below turns off the amplifiers
|
|
||||||
// brake
|
|
||||||
// PowerBrick[0].GpioData[0].16 is GPIO-OUT[1]
|
|
||||||
|
|
||||||
Motor[1].pBrakeOut = PowerBrick[0].GpioData[0].a // put proper reference to gpio here !!!
|
|
||||||
Motor[1].BrakeOutBit = 16
|
|
||||||
Motor[1].BrakeOffDelay = 100 // delay in ms before the brake is released after motion was triggered
|
|
||||||
Motor[1].BrakeOnDelay = 100 // delay in ms before the amplifier is disabled after motion has stopped
|
|
||||||
|
|
||||||
Motor[2].pBrakeOut = PowerBrick[0].GpioData[0].a // put proper reference to gpio here !!!
|
|
||||||
Motor[2].BrakeOutBit = 17
|
|
||||||
Motor[2].BrakeOffDelay = 100 // delay in ms before the brake is released after motion was triggered
|
|
||||||
Motor[2].BrakeOnDelay = 100 // delay in ms before the amplifier is disabled after motion has stopped
|
|
||||||
|
|
||||||
Motor[3].pBrakeOut = PowerBrick[0].GpioData[0].a // put proper reference to gpio here !!!
|
|
||||||
Motor[3].BrakeOutBit = 18
|
|
||||||
Motor[3].BrakeOffDelay = 100 // delay in ms before the brake is released after motion was triggered
|
|
||||||
Motor[3].BrakeOnDelay = 100 // delay in ms before the amplifier is disabled after motion has stopped
|
|
||||||
|
|
||||||
Motor[4].pBrakeOut = PowerBrick[0].GpioData[0].a // put proper reference to gpio here !!!
|
|
||||||
Motor[4].BrakeOutBit = 19
|
|
||||||
Motor[4].BrakeOffDelay = 100 // delay in ms before the brake is released after motion was triggered
|
|
||||||
Motor[4].BrakeOnDelay = 100 // delay in ms before the amplifier is disabled after motion has stopped
|
|
||||||
|
|
||||||
Motor[5].pBrakeOut = PowerBrick[0].GpioData[0].a // put proper reference to gpio here !!!
|
|
||||||
Motor[5].BrakeOutBit = 20
|
|
||||||
Motor[5].BrakeOffDelay = 100 // delay in ms before the brake is released after motion was triggered
|
|
||||||
Motor[5].BrakeOnDelay = 100 // delay in ms before the amplifier is disabled after motion has stopped
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
!encoder_sim(enc=1,tbl=1,mot=1)
|
|
||||||
!motor(mot=1,dirCur=0,contCur=100,peakCur=100,timeAtPeak=1,JogSpeed=100.,numPhase=3,invDir=True)
|
|
||||||
Motor[1].pLimits=0;Motor[1].AmpFaultLevel=0;Motor[1].pAmpEnable=0;Motor[1].pAmpFault=0
|
|
||||||
|
|
||||||
!encoder_sim(enc=2,tbl=2,mot=2)
|
|
||||||
!motor(mot=2,dirCur=0,contCur=100,peakCur=1000,timeAtPeak=1,JogSpeed=100.,numPhase=3,invDir=True)
|
|
||||||
Motor[2].pLimits=0;Motor[2].AmpFaultLevel=0;Motor[2].pAmpEnable=0;Motor[2].pAmpFault=0
|
|
||||||
|
|
||||||
!encoder_sim(enc=3,tbl=3,mot=3)
|
|
||||||
!motor(mot=3,dirCur=0,contCur=100,peakCur=1000,timeAtPeak=1,JogSpeed=100.,numPhase=3,invDir=True)
|
|
||||||
Motor[3].pLimits=0;Motor[3].AmpFaultLevel=0;Motor[3].pAmpEnable=0;Motor[3].pAmpFault=0
|
|
||||||
|
|
||||||
!encoder_sim(enc=4,tbl=4,mot=4)
|
|
||||||
!motor(mot=4,dirCur=0,contCur=100,peakCur=1000,timeAtPeak=1,JogSpeed=100.,numPhase=3,invDir=True)
|
|
||||||
Motor[4].pLimits=0;Motor[4].AmpFaultLevel=0;Motor[4].pAmpEnable=0;Motor[4].pAmpFault=0
|
|
||||||
|
|
||||||
!encoder_sim(enc=5,tbl=5,mot=5)
|
|
||||||
!motor(mot=5,dirCur=0,contCur=100,peakCur=1000,timeAtPeak=1,JogSpeed=100.,numPhase=3,invDir=True)
|
|
||||||
Motor[5].pLimits=0;Motor[5].AmpFaultLevel=0;Motor[5].pAmpEnable=0;Motor[5].pAmpFault=0
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
//$$$***
|
|
||||||
//!common()
|
|
||||||
//!common(PhaseFreq=20000,PhasePerServo=4)
|
|
||||||
//!common(PhaseFreq=20000,PhasePerServo=1)
|
|
||||||
//!common(PhaseFreq=40000)
|
|
||||||
|
|
||||||
!MX1_setup()
|
|
||||||
!MX1_home()
|
|
||||||
!MX1_coordTrf()
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
!MX2_setup()
|
|
||||||
!MX2_home()
|
|
||||||
!MX2_coordTrf()
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
|
|
||||||
!MX3_setup()
|
|
||||||
//!MX3_setup_sim() // comment out !MX3_setup() when this is active
|
|
||||||
//!MX3_home()
|
|
||||||
//using 360000 for 1 rev. -> 1.7453292519943296e-05=np.pi/180000
|
|
||||||
//excentricity= 5mm
|
|
||||||
//height = 90+28mm = 118
|
|
||||||
//width = (450+305)/2=377.5
|
|
||||||
//length = 600mm
|
|
||||||
//pivotpoint q= -.7 0= center 1=mover upstream -1=mover downstream ca. 100mm from downstream
|
|
||||||
//!MX3_coordTrf(exc=5000,height=118000,width=377500,length=600000,camSf=1.7453292519943296e-05)
|
|
||||||
!MX3_coordTrf(exc=5000,height=118000,width=377500,length=600000,camSf=1.7453292519943296e-05,q=-.7)
|
|
||||||
|
|
||||||
//Motor 1 -> AA2
|
|
||||||
//Motor 2 -> AA1
|
|
||||||
//Motor 3 -> AA5
|
|
||||||
//Motor 4 -> AA3
|
|
||||||
//Motor 5 -> AA4
|
|
||||||
|
|
||||||
// define(AA1='L1',AA2='L2',AA3='L3',AA4='L4',AA5='L5')
|
|
||||||
// define(AA1='L2',AA2='L1',AA3='L4',AA4='L5',AA5='L3')
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
&1
|
|
||||||
|
|
||||||
//initialization code
|
|
||||||
open plc 1
|
|
||||||
homez1..5
|
|
||||||
L0 = Sys.RunTime + .1
|
|
||||||
while (Sys.RunTime < L0){} //wait .1 sec
|
|
||||||
jog/1..5
|
|
||||||
while (Sys.RunTime < L0){} //wait .1 sec
|
|
||||||
|
|
||||||
if (Motor[1].ActPos-Motor[1].HomePos<-180000)
|
|
||||||
Motor[1].HomePos=Motor[1].HomePos-360000
|
|
||||||
if (Motor[2].ActPos-Motor[2].HomePos<-180000)
|
|
||||||
Motor[2].HomePos=Motor[2].HomePos-360000
|
|
||||||
if (Motor[3].ActPos-Motor[3].HomePos<-180000)
|
|
||||||
Motor[3].HomePos=Motor[3].HomePos-360000
|
|
||||||
if (Motor[4].ActPos-Motor[4].HomePos<-180000)
|
|
||||||
Motor[4].HomePos=Motor[4].HomePos-360000
|
|
||||||
if (Motor[5].ActPos-Motor[5].HomePos<-180000)
|
|
||||||
Motor[5].HomePos=Motor[5].HomePos-360000
|
|
||||||
disable plc 1
|
|
||||||
close // plc 1
|
|
||||||
|
|
||||||
enable plc 1
|
|
||||||
|
|
||||||
#1..5dkill
|
|
||||||
|
|
||||||
#6hmz
|
|
||||||
//motor 1..5 use break setup to kill motor
|
|
||||||
!holding_current(m6=[0,700])
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
//simulated 8 motors without needing real ones
|
|
||||||
//$$$***
|
|
||||||
//!common()
|
|
||||||
|
|
||||||
//use some step and direction lines to setup simulate motors
|
|
||||||
// /afs/psi.ch/user/h/humar_t/public/Modules/XMI/cfg/xmi.cfg
|
|
||||||
|
|
||||||
!encoder_sim(enc=1,tbl=1,mot=1)
|
|
||||||
!motor(mot=1,dirCur=0,contCur=100,peakCur=100,timeAtPeak=1,JogSpeed=8.,numPhase=3,invDir=True)
|
|
||||||
Motor[1].pLimits=0;Motor[1].AmpFaultLevel=0;Motor[1].pAmpEnable=0;Motor[1].pAmpFault=0
|
|
||||||
|
|
||||||
!encoder_sim(enc=2,tbl=2,mot=2)
|
|
||||||
!motor(mot=2,dirCur=0,contCur=100,peakCur=1000,timeAtPeak=1,JogSpeed=8.,numPhase=3,invDir=True)
|
|
||||||
Motor[2].pLimits=0;Motor[2].AmpFaultLevel=0;Motor[2].pAmpEnable=0;Motor[2].pAmpFault=0
|
|
||||||
|
|
||||||
!encoder_sim(enc=3,tbl=3,mot=3)
|
|
||||||
!motor(mot=3,dirCur=0,contCur=100,peakCur=1000,timeAtPeak=1,JogSpeed=8.,numPhase=3,invDir=True)
|
|
||||||
Motor[3].pLimits=0;Motor[3].AmpFaultLevel=0;Motor[3].pAmpEnable=0;Motor[3].pAmpFault=0
|
|
||||||
|
|
||||||
!encoder_sim(enc=4,tbl=4,mot=4)
|
|
||||||
!motor(mot=4,dirCur=0,contCur=100,peakCur=1000,timeAtPeak=1,JogSpeed=8.,numPhase=3,invDir=True)
|
|
||||||
Motor[4].pLimits=0;Motor[4].AmpFaultLevel=0;Motor[4].pAmpEnable=0;Motor[4].pAmpFault=0
|
|
||||||
|
|
||||||
!encoder_sim(enc=5,tbl=5,mot=5)
|
|
||||||
!motor(mot=5,dirCur=0,contCur=100,peakCur=1000,timeAtPeak=1,JogSpeed=8.,numPhase=3,invDir=True)
|
|
||||||
Motor[5].pLimits=0;Motor[5].AmpFaultLevel=0;Motor[5].pAmpEnable=0;Motor[5].pAmpFault=0
|
|
||||||
|
|
||||||
!encoder_sim(enc=6,tbl=6,mot=6)
|
|
||||||
!motor(mot=6,dirCur=0,contCur=100,peakCur=1000,timeAtPeak=1,JogSpeed=8.,numPhase=3,invDir=True)
|
|
||||||
Motor[6].pLimits=0;Motor[6].AmpFaultLevel=0;Motor[6].pAmpEnable=0;Motor[6].pAmpFault=0
|
|
||||||
|
|
||||||
!encoder_sim(enc=7,tbl=7,mot=7)
|
|
||||||
!motor(mot=7,dirCur=0,contCur=100,peakCur=1000,timeAtPeak=1,JogSpeed=8.,numPhase=3,invDir=True)
|
|
||||||
Motor[7].pLimits=0;Motor[7].AmpFaultLevel=0;Motor[7].pAmpEnable=0;Motor[7].pAmpFault=0
|
|
||||||
|
|
||||||
!encoder_sim(enc=8,tbl=8,mot=8)
|
|
||||||
!motor(mot=8,dirCur=0,contCur=100,peakCur=1000,timeAtPeak=1,JogSpeed=8.,numPhase=3,invDir=True)
|
|
||||||
Motor[8].pLimits=0;Motor[8].AmpFaultLevel=0;Motor[8].pAmpEnable=0;Motor[8].pAmpFault=0
|
|
||||||
|
|
||||||
Motor[3].JogSpeed=1000 //used for joging
|
|
||||||
Motor[3].MaxSpeed=1000 //used for motion program
|
|
||||||
#1..8j/
|
|
||||||
@@ -1,471 +0,0 @@
|
|||||||
file "$(mrfioc2_TEMPLATES=db)/evr-pcie-300DC.db"
|
|
||||||
{
|
|
||||||
{
|
|
||||||
|
|
||||||
## Global settings
|
|
||||||
ExtInhib-Sel=0, #0 = Use Inhibit, 1 = Always permitt : Use HW trigger inhibit (EVRTG only)
|
|
||||||
Link-Clk-SP=142.8, #50-150 : Event Link speed (MHz)
|
|
||||||
Time-Src-Sel=0, #0 = Event clk, 1 = Mapped codes, 2 = DBus4 : Source for timestamping clock.
|
|
||||||
Time-Clock-SP=0.0, #50-150 : Timestamp tick rate (MHz)
|
|
||||||
PLL-Bandwidth-Sel=4, #0 = HM, 1 = HL, 2 = MH, 3 = MM, 4 = ML: PLL Bandwidth Select (see Silicon Labs Si5317 datasheet)
|
|
||||||
|
|
||||||
## Delay compensation
|
|
||||||
DlyCompensation-Enabled-Sel=1, #0 = Disabled, 1 = Enabled: Enables or disables delay compensation
|
|
||||||
DlyCompensation-Target-SP=5000, # Delay compensation value in [ns]. Should be set to max(path + someDelta) of all receivers in the timing system. This value can also be retrieved from an external record (see macro below).
|
|
||||||
DlyCompensation-Source="SIN-TIMAST-TMA:EvrDC-SP CP", # delay compensation target value is sourced from the record referenced here.
|
|
||||||
# this value must be set the same for all EVRs in the timing network. This is why we have a single record which acts as a source for all EVRs in the same timing network.
|
|
||||||
# NOTE: The value of DlyCompensation-Source needs to include CP to ensure the value is updated when the source changes.
|
|
||||||
# The CP can not be hidden in the template file because this would lead to an invalid input link CP when no substitution value for DlyCompensation-Source is provided.
|
|
||||||
# Recommended setting for SwissFEL is SIN-TIMAST-TMA:EvrDC-SP CP
|
|
||||||
DlyCompensation-Source-Disa=0, #0 = Enabled, 1 = Disabled: enables or disables sourcing the delay compensation target value from record specified with 'DlyCompensation-Source' macro
|
|
||||||
|
|
||||||
## Prescalers
|
|
||||||
PS0-Div-SP=2, #2-4294967295 :Integer divisor between the Event Clock and the sub-unit output.
|
|
||||||
PS0-PulserMap-L-SP=0, #0-65535 :Trigger a pulser on prescaler rising edge. Pulsers 0-15 are bit-wise selectable
|
|
||||||
PS0-PulserMap-H-SP=0, #0-255 :Trigger a pulser on prescaler rising edge. Pulsers 16-23 are bit-wise selectable
|
|
||||||
PS1-Div-SP=2, #2-4294967295 :Integer divisor between the Event Clock and the sub-unit output.
|
|
||||||
PS1-PulserMap-L-SP=0, #0-65535 :Trigger a pulser on prescaler rising edge. Pulsers 0-15 are bit-wise selectable
|
|
||||||
PS1-PulserMap-H-SP=0, #0-255 :Trigger a pulser on prescaler rising edge. Pulsers 16-23 are bit-wise selectable
|
|
||||||
PS2-Div-SP=2, #2-4294967295 :Integer divisor between the Event Clock and the sub-unit output.
|
|
||||||
PS2-PulserMap-L-SP=0, #0-65535 :Trigger a pulser on prescaler rising edge. Pulsers 0-15 are bit-wise selectable
|
|
||||||
PS2-PulserMap-H-SP=0, #0-255 :Trigger a pulser on prescaler rising edge. Pulsers 16-23 are bit-wise selectable
|
|
||||||
PS3-Div-SP=2, #2-4294967295 :Integer divisor between the Event Clock and the sub-unit output.
|
|
||||||
PS3-PulserMap-L-SP=0, #0-65535 :Trigger a pulser on prescaler rising edge. Pulsers 0-15 are bit-wise selectable
|
|
||||||
PS3-PulserMap-H-SP=0, #0-255 :Trigger a pulser on prescaler rising edge. Pulsers 16-23 are bit-wise selectable
|
|
||||||
PS4-Div-SP=2, #2-4294967295 :Integer divisor between the Event Clock and the sub-unit output.
|
|
||||||
PS4-PulserMap-L-SP=0, #0-65535 :Trigger a pulser on prescaler rising edge. Pulsers 0-15 are bit-wise selectable
|
|
||||||
PS4-PulserMap-H-SP=0, #0-255 :Trigger a pulser on prescaler rising edge. Pulsers 16-23 are bit-wise selectable
|
|
||||||
PS5-Div-SP=2, #2-4294967295 :Integer divisor between the Event Clock and the sub-unit output.
|
|
||||||
PS5-PulserMap-L-SP=0, #0-65535 :Trigger a pulser on prescaler rising edge. Pulsers 0-15 are bit-wise selectable
|
|
||||||
PS5-PulserMap-H-SP=0, #0-255 :Trigger a pulser on prescaler rising edge. Pulsers 16-23 are bit-wise selectable
|
|
||||||
PS6-Div-SP=2, #2-4294967295 :Integer divisor between the Event Clock and the sub-unit output.
|
|
||||||
PS6-PulserMap-L-SP=0, #0-65535 :Trigger a pulser on prescaler rising edge. Pulsers 0-15 are bit-wise selectable
|
|
||||||
PS6-PulserMap-H-SP=0, #0-255 :Trigger a pulser on prescaler rising edge. Pulsers 16-23 are bit-wise selectable
|
|
||||||
PS7-Div-SP=2, #2-4294967295 :Integer divisor between the Event Clock and the sub-unit output.
|
|
||||||
PS7-PulserMap-L-SP=0, #0-65535 :Trigger a pulser on prescaler rising edge. Pulsers 0-15 are bit-wise selectable
|
|
||||||
PS7-PulserMap-H-SP=0, #0-255 :Trigger a pulser on prescaler rising edge. Pulsers 16-23 are bit-wise selectable
|
|
||||||
|
|
||||||
## Distributed bus
|
|
||||||
PulserMap-Dbus0-SP=0, #0-16777215 :Trigger a pulser on DBus bit rising edge. Pulsers 0-23 are bit-wise selectable
|
|
||||||
PulserMap-Dbus1-SP=0, #0-16777215 :Trigger a pulser on DBus bit rising edge. Pulsers 0-23 are bit-wise selectable
|
|
||||||
PulserMap-Dbus2-SP=0, #0-16777215 :Trigger a pulser on DBus bit rising edge. Pulsers 0-23 are bit-wise selectable
|
|
||||||
PulserMap-Dbus3-SP=0, #0-16777215 :Trigger a pulser on DBus bit rising edge. Pulsers 0-23 are bit-wise selectable
|
|
||||||
PulserMap-Dbus4-SP=0, #0-16777215 :Trigger a pulser on DBus bit rising edge. Pulsers 0-23 are bit-wise selectable
|
|
||||||
PulserMap-Dbus5-SP=0, #0-16777215 :Trigger a pulser on DBus bit rising edge. Pulsers 0-23 are bit-wise selectable
|
|
||||||
PulserMap-Dbus6-SP=0, #0-16777215 :Trigger a pulser on DBus bit rising edge. Pulsers 0-23 are bit-wise selectable
|
|
||||||
PulserMap-Dbus7-SP=0, #0-16777215 :Trigger a pulser on DBus bit rising edge. Pulsers 0-23 are bit-wise selectable
|
|
||||||
|
|
||||||
|
|
||||||
## Pulsers
|
|
||||||
Pul0-Name-I="Pulser 0" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul0-Name-I.DESC="Pulse for WSC readout." #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul0-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul0-Polarity-Sel=1, #0 = Active High, 1 = Active Low
|
|
||||||
Pul0-Delay-SP=0, #Pulser delay in us (DI 1 event at 5400, need to trigger for bunch at 7500)
|
|
||||||
Pul0-Width-SP=5000, #Pulser width in us
|
|
||||||
Pul0-Prescaler-SP=1, #0-65535 : Pulser prescaler
|
|
||||||
|
|
||||||
Pul1-Name-I="Pulser 1" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
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=750, #Pulser delay in us
|
|
||||||
Pul1-Width-SP=5000, #Pulser width in us
|
|
||||||
Pul1-Prescaler-SP=1, #0-65535 : Pulser prescaler
|
|
||||||
|
|
||||||
Pul2-Name-I="Pulser 2" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul2-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul2-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul2-Polarity-Sel=1, #0 = Active High, 1 = Active Low
|
|
||||||
Pul2-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul2-Width-SP=5000, #Pulser width in us
|
|
||||||
Pul2-Prescaler-SP=1, #0-65535 : Pulser prescaler
|
|
||||||
|
|
||||||
Pul3-Name-I="Pulser 3" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul3-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul3-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul3-Polarity-Sel=0, #0 = Active High, 1 = Active Low
|
|
||||||
Pul3-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul3-Width-SP=0, #Pulser width in us
|
|
||||||
Pul3-Prescaler-SP=1, #0-65535 : Pulser prescaler
|
|
||||||
|
|
||||||
Pul4-Name-I="Pulser 4" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul4-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul4-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul4-Polarity-Sel=0, #0 = Active High, 1 = Active Low
|
|
||||||
Pul4-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul4-Width-SP=0, #0-65535 : Width in us
|
|
||||||
|
|
||||||
Pul5-Name-I="Pulser 5" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul5-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul5-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul5-Polarity-Sel=0, #0 = Active High, 1 = Active Low
|
|
||||||
Pul5-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul5-Width-SP=0, #0-65535 : Width in us
|
|
||||||
|
|
||||||
Pul6-Name-I="Pulser 6" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul6-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul6-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul6-Polarity-Sel=0, #0 = Active High, 1 = Active Low
|
|
||||||
Pul6-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul6-Width-SP=0, #0-65535 : Width in us
|
|
||||||
|
|
||||||
Pul7-Name-I="Pulser 7" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul7-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul7-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul7-Polarity-Sel=0, #0 = Active High, 1 = Active Low
|
|
||||||
Pul7-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul7-Width-SP=0, #0-65535 : Width in us
|
|
||||||
|
|
||||||
Pul8-Name-I="Pulser 8" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul8-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul8-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul8-Polarity-Sel=0, #0 = Active High, 1 = Active Low
|
|
||||||
Pul8-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul8-Width-SP=0, #0-65535 : Width in us
|
|
||||||
|
|
||||||
Pul9-Name-I="Pulser 9" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul9-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul9-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul9-Polarity-Sel=0, #0 = Active High, 1 = Active Low
|
|
||||||
Pul9-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul9-Width-SP=0, #0-65535 : Width in us
|
|
||||||
|
|
||||||
Pul10-Name-I="Pulser 10" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul10-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul10-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul10-Polarity-Sel=0, #0 = Active High, 1 = Active Low
|
|
||||||
Pul10-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul10-Width-SP=0, #0-65535 : Width in us
|
|
||||||
|
|
||||||
Pul11-Name-I="Pulser 11" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul11-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul11-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul11-Polarity-Sel=0, #0 = Active High, 1 = Active Low
|
|
||||||
Pul11-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul11-Width-SP=0, #0-65535 : Width in us
|
|
||||||
|
|
||||||
Pul12-Name-I="Pulser 12" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul12-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul12-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul12-Polarity-Sel=0, #0 = Active High, 1 = Active Low
|
|
||||||
Pul12-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul12-Width-SP=0, #0-65535 : Width in us
|
|
||||||
|
|
||||||
Pul13-Name-I="Pulser 13" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul13-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul13-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul13-Polarity-Sel=0, #0 = Active High, 1 = Active Low
|
|
||||||
Pul13-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul13-Width-SP=0, #0-65535 : Width in us
|
|
||||||
|
|
||||||
Pul14-Name-I="Pulser 14" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul14-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul14-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul14-Polarity-Sel=0, #0 = Active High, 1 = Active Low
|
|
||||||
Pul14-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul14-Width-SP=0, #0-65535 : Width in us
|
|
||||||
|
|
||||||
Pul15-Name-I="Pulser 15" #Description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul15-Name-I.DESC="" #Secondary description of the pulser. Maximum 40 characters allowed!
|
|
||||||
Pul15-Ena-Sel=1, #0 = Disabled, 1 = Enabled
|
|
||||||
Pul15-Polarity-Sel=0, #0 = Active High, 1 = Active Low
|
|
||||||
Pul15-Delay-SP=0, #Pulser delay in us
|
|
||||||
Pul15-Width-SP=0, #0-65535 : Width in us
|
|
||||||
|
|
||||||
|
|
||||||
## Front panel outputs
|
|
||||||
# Available -Src-SP choices:
|
|
||||||
# 0 Pulser 0
|
|
||||||
# 1 Pulser 1
|
|
||||||
# 2 Pulser 2
|
|
||||||
# 3 Pulser 3
|
|
||||||
# 4 Pulser 4
|
|
||||||
# 5 Pulser 5
|
|
||||||
# 6 Pulser 6
|
|
||||||
# 7 Pulser 7
|
|
||||||
# 8 Pulser 8
|
|
||||||
# 9 Pulser 9
|
|
||||||
# 10 Pulser 10
|
|
||||||
# 11 Pulser 11
|
|
||||||
# 12 Pulser 12
|
|
||||||
# 13 Pulser 13
|
|
||||||
# 14 Pulser 14
|
|
||||||
# 15 Pulser 15
|
|
||||||
# 32 DBus 0
|
|
||||||
# 33 DBus 1
|
|
||||||
# 34 DBus 2
|
|
||||||
# 35 DBus 3
|
|
||||||
# 36 DBus 4
|
|
||||||
# 37 DBus 5
|
|
||||||
# 38 DBus 6
|
|
||||||
# 39 Dbus 7
|
|
||||||
# 40 Prescaler 0
|
|
||||||
# 41 Prescaler 1
|
|
||||||
# 42 Prescaler 2
|
|
||||||
# 43 Prescaler 3
|
|
||||||
# 44 Prescaler 4
|
|
||||||
# 45 Prescaler 5
|
|
||||||
# 46 Prescaler 6
|
|
||||||
# 47 Prescaler 7
|
|
||||||
# 63 Force Low
|
|
||||||
# 62 Force High
|
|
||||||
|
|
||||||
|
|
||||||
# Universal outputs
|
|
||||||
# Slot 0
|
|
||||||
FrontUnivOut0-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut0-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut0-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut0-Src-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut0-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
FrontUnivOut1-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut1-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut1-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut1-Src-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut1-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
# Slot 1
|
|
||||||
FrontUnivOut2-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut2-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut2-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut2-Src-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut2-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
FrontUnivOut3-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut3-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut3-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut3-Src-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut3-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
# Slot 2
|
|
||||||
FrontUnivOut4-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut4-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut4-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut4-Src-SP=0, # Use pulser 0 which generates 5000 us long pulse
|
|
||||||
FrontUnivOut4-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
FrontUnivOut5-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut5-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut5-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut5-Src-SP=1, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut5-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
# Slot 3
|
|
||||||
FrontUnivOut6-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut6-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut6-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut6-Src-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut6-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
FrontUnivOut7-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut7-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut7-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut7-Src-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut7-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
# Slot 4
|
|
||||||
FrontUnivOut8-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut8-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut8-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut8-Src-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut8-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
FrontUnivOut9-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut9-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut9-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut9-Src-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut9-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
# Slot 5
|
|
||||||
FrontUnivOut10-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut10-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut10-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut10-Src-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut10-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
FrontUnivOut11-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut11-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut11-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut11-Src-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut11-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
# Slot 6
|
|
||||||
FrontUnivOut12-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut12-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut12-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut12-Src-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut12-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
FrontUnivOut13-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut13-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut13-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut13-Src-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut13-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
# Slot 7
|
|
||||||
FrontUnivOut14-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut14-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut14-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut14-Src-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut14-Src2-SP=63, # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
FrontUnivOut15-Name-I="" # Description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut15-Name-I.DESC="" # Secondary description of the output. Maximum 40 characters allowed!
|
|
||||||
FrontUnivOut15-Ena-SP=1, # Default to enabled
|
|
||||||
FrontUnivOut15-Src-SP=63 # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
FrontUnivOut15-Src2-SP=63 # Defaults to Force low (if enabled -> Ena-SP)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
## Mapping between hardware event code and a software (EPICS) database event
|
|
||||||
## In addition to firing an EPICS database event on each occurance of hardware event, a counter for the specific EVT is increased.
|
|
||||||
#
|
|
||||||
# Macros:
|
|
||||||
# SYS = System name (auto expanded by parent)
|
|
||||||
# DEVICE = Event receiver / timing card name (same as mrmEvrSetupVME()) Eg. EVR0. (auto expanded by parent)
|
|
||||||
# EVT = Event code (hardware). Set EVT=0 to disable.
|
|
||||||
# CODE = EPICS database event number (software)
|
|
||||||
# FLNK = If provided, forward links to the record after all records from this template are processed
|
|
||||||
#
|
|
||||||
file "$(mrfioc2_TEMPLATES=db)/evr-softEvent.template"{
|
|
||||||
pattern { EVT, CODE, FLNK }
|
|
||||||
{ "22", "22", "" } # ESA laser diag-1
|
|
||||||
{ "28", "28", "" } # BeamSync read-1
|
|
||||||
}
|
|
||||||
# If you want to enable measuring the jitter on received events comment out the previous substitution and use this one instead
|
|
||||||
#
|
|
||||||
# Additinal macros:
|
|
||||||
# HIST_LEN = number of histogram bins created from frequency measurements. Default 200.
|
|
||||||
# HIST_ULIM = histogram upper limit. Default 12.
|
|
||||||
# HIST_LLIM = histogram lower limit. Default 8.
|
|
||||||
#
|
|
||||||
# NOTE: make sure your system supports the 'histogram' record before using this template!
|
|
||||||
#
|
|
||||||
#file "$(mrfioc2_TEMPLATES=db)/evr-softEvent-measure.template"{
|
|
||||||
#pattern { EVT, CODE, FLNK }
|
|
||||||
# { "1", "1", "" }
|
|
||||||
# { "2", "2", "" }
|
|
||||||
# { "3", "3", "" }
|
|
||||||
#}
|
|
||||||
|
|
||||||
## Mapping between hardware event code and a special function of the EVR
|
|
||||||
## Each event can be mapped only to one function!
|
|
||||||
## There are some default events, that allways trigger specific functions!
|
|
||||||
## Available functions:
|
|
||||||
## - Blink : An LED on the EVRs front panel will blink when the code is received.
|
|
||||||
## - Forward : The received code will be immediately retransmitted on the upstream event link.
|
|
||||||
## - Stop Log (default event 121): Freeze the circular event log buffer. An CPU interrupt will be raised which will cause the buffer to be downloaded. This might be a useful action to map to a fault event.
|
|
||||||
## - Log : Include this event code in the circular event log.
|
|
||||||
## - Heartbeat (default event 122): This event resets the heartbeat timeout timer.
|
|
||||||
## - Reset PS (default event 123): Resets the phase of all prescalers.
|
|
||||||
## - TS reset (default event 124): Transfers the seconds timestamp from the shift register and zeros the sub-seconds part.
|
|
||||||
## - TS tick (default event 125): When the timestamp source is 'Mapped code' then any event with this mapping will cause the sub-seconds part of the timestamp to increment.
|
|
||||||
## - Shift 1 (default event 113): Shifts the current value of the seconds timestamp shift register up by one bit and sets the low bit to 1.
|
|
||||||
## - Shift 0 (default event 112): Shifts the current value of the seconds timestamp shift register up by one bit and sets the low bit to 0.
|
|
||||||
## - FIFO : Bypass the automatic allocation mechanism and always include this code in the event FIFO.
|
|
||||||
#
|
|
||||||
# Macros:
|
|
||||||
# SYS = System name (auto expanded by parent)
|
|
||||||
# DEVICE = Event receiver / timing card name (same as mrmEvrSetupVME()) Eg. EVR0. (auto expanded by parent)
|
|
||||||
# EVT = Event code (hardware). Set EVNT=0 to disable.
|
|
||||||
# FUNC = Function to be mapped
|
|
||||||
# Choices are: "FIFO", "Latch TS", "Blink", "Forward",
|
|
||||||
# "Stop Log", "Log", "Heartbeat", "Reset PS",
|
|
||||||
# "TS reset", "TS tick", "Shift 1", "Shift 0",
|
|
||||||
#
|
|
||||||
file "$(mrfioc2_TEMPLATES=db)/evr-specialFunctionMap.template"{
|
|
||||||
pattern { EVT, FUNC }
|
|
||||||
{"1", "Blink"}
|
|
||||||
}
|
|
||||||
|
|
||||||
## Control for mapping a Pulser geneator to an event code in hardware.
|
|
||||||
## Each pulser-function combination can be mapped to multiple events.
|
|
||||||
## Available functions:
|
|
||||||
## - Trig : causes a received event to trigger a pulser. A Pulser based on pulser polarity, delay and width will be outputted.
|
|
||||||
## - Set : causes a received event to force a pulser into set state(based on pulser polarity).
|
|
||||||
## - Reset: causes a received event to force a pulser into reset state(based on pulser polarity).
|
|
||||||
#
|
|
||||||
## Pulser polarity defines the pulser set and reset state:
|
|
||||||
## - Active high: Output is logic high in set state and logic low in reset state
|
|
||||||
## - Active low: Output is logic low in set state and logic high in reset state
|
|
||||||
#
|
|
||||||
# Macros:
|
|
||||||
# SYS = system name (auto expanded by parent)
|
|
||||||
# DEVICE = Event receiver / timing card name (same as mrmEvrSetupVME()) Eg. EVR0. (auto expanded by parent)
|
|
||||||
# PID = Pulser ID #
|
|
||||||
# F = Pulser generator function
|
|
||||||
# Choices are: "Trig", "Set", "Reset"
|
|
||||||
# EVT = Initial event code
|
|
||||||
# ID = Mappings must have unique ID for each PID-F combination.
|
|
||||||
# Only mappings with ID=0 are displayed in the GUI
|
|
||||||
#
|
|
||||||
file "$(mrfioc2_TEMPLATES=db)/evr-pulserMap.template"{
|
|
||||||
pattern {PID F, EVT, ID}
|
|
||||||
{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 }
|
|
||||||
{4, Trig, 0, 0 }
|
|
||||||
{5, Trig, 0, 0 }
|
|
||||||
{6, Trig, 0, 0 }
|
|
||||||
{7, Trig, 0, 0 }
|
|
||||||
{8, Trig, 0, 0 }
|
|
||||||
{9, Trig, 0, 0 }
|
|
||||||
{10, Trig, 0, 0 }
|
|
||||||
{11, Trig, 0, 0 }
|
|
||||||
{12, Trig, 0, 0 }
|
|
||||||
{13, Trig, 0, 0 }
|
|
||||||
{14, Trig, 0, 0 }
|
|
||||||
{15, Trig, 0, 0 }
|
|
||||||
|
|
||||||
|
|
||||||
{0, Set, 0, 0 }
|
|
||||||
{1, Set, 0, 0 }
|
|
||||||
{2, Set, 0, 0 }
|
|
||||||
{3, Set, 0, 0 }
|
|
||||||
{4, Set, 0, 0 }
|
|
||||||
{5, Set, 0, 0 }
|
|
||||||
{6, Set, 0, 0 }
|
|
||||||
{7, Set, 0, 0 }
|
|
||||||
{8, Set, 0, 0 }
|
|
||||||
{9, Set, 0, 0 }
|
|
||||||
{10, Set, 0, 0 }
|
|
||||||
{11, Set, 0, 0 }
|
|
||||||
{12, Set, 0, 0 }
|
|
||||||
{13, Set, 0, 0 }
|
|
||||||
{14, Set, 0, 0 }
|
|
||||||
{15, Set, 0, 0 }
|
|
||||||
|
|
||||||
|
|
||||||
{0, Reset, 0, 0 }
|
|
||||||
{1, Reset, 0, 0 }
|
|
||||||
{2, Reset, 0, 0 }
|
|
||||||
{3, Reset, 0, 0 }
|
|
||||||
{4, Reset, 0, 0 }
|
|
||||||
{5, Reset, 0, 0 }
|
|
||||||
{6, Reset, 0, 0 }
|
|
||||||
{7, Reset, 0, 0 }
|
|
||||||
{8, Reset, 0, 0 }
|
|
||||||
{9, Reset, 0, 0 }
|
|
||||||
{10, Reset, 0, 0 }
|
|
||||||
{11, Reset, 0, 0 }
|
|
||||||
{12, Reset, 0, 0 }
|
|
||||||
{13, Reset, 0, 0 }
|
|
||||||
{14, Reset, 0, 0 }
|
|
||||||
{15, Reset, 0, 0 }
|
|
||||||
}
|
|
||||||
|
|
||||||
## Flash access support
|
|
||||||
## Uncomment this substitution to load records that expose read and write access to the flash chip on the device.
|
|
||||||
#
|
|
||||||
# Macros:
|
|
||||||
# SYS = System name (auto expanded by parent)
|
|
||||||
# DEVICE = Event receiver / timing card name (same as mrmEvrSetupVME()) Eg. EVR0. (auto expanded by parent)
|
|
||||||
#
|
|
||||||
#file "$(mrfioc2_TEMPLATES=db)/flash.template"
|
|
||||||
#{
|
|
||||||
# {}
|
|
||||||
#}
|
|
||||||
485
generate.py
485
generate.py
@@ -1,485 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
#*-----------------------------------------------------------------------*
|
|
||||||
#| |
|
|
||||||
#| Copyright (c) 2019 by Paul Scherrer Institute (http://www.psi.ch) |
|
|
||||||
#| |
|
|
||||||
#| Author Thierry Zamofing (thierry.zamofing@psi.ch) |
|
|
||||||
#*-----------------------------------------------------------------------*
|
|
||||||
'''
|
|
||||||
generate .subs and _startup.script files
|
|
||||||
mode bits:
|
|
||||||
0x001: genYAML()
|
|
||||||
0x002: genIOC()
|
|
||||||
0x004: genLauncher()
|
|
||||||
|
|
||||||
Long Doc'''
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
import logging, sys, os, json
|
|
||||||
import string
|
|
||||||
|
|
||||||
class Generate:
|
|
||||||
yamlParam={
|
|
||||||
# ioc : ( host , port , ver , arch , osys , osys_id ,
|
|
||||||
# 'SAR-CSSU-EXPMX1' : ('SAR-CSSU-EXPMX1' , 50001 , '3.14.12' , 'moxa42-armv6l' , 'moxa42-armv6l' , 'moxa42-armv6l' , ) ,
|
|
||||||
'SAR-CPPM-EXPMX1' : ('SAR-CPPM-EXPMX1' , 50001 , '7.0.7' , 'eldk42-ppc4xxFP' , 'eldk42-ppc4xxFP' , 'eldk42-ppc4xxFP' , ) ,
|
|
||||||
'SAR-CPPM-EXPMX2' : ('SAR-CPPM-EXPMX2' , 50001 , '7.0.7' , 'eldk42-ppc4xxFP' , 'eldk42-ppc4xxFP' , 'eldk42-ppc4xxFP' , ) ,
|
|
||||||
'SAR-CPPM-EXPMX3' : ('SAR-CPPM-EXPMX3' , 50001 , '7.0.7' , 'eldk42-ppc4xxFP' , 'eldk42-ppc4xxFP' , 'eldk42-ppc4xxFP' , ) ,
|
|
||||||
'SAR-CPPM-EXPMX4' : ('SAR-CPPM-EXPMX4' , 50001 , '7.0.7' , 'eldk42-ppc4xxFP' , 'eldk42-ppc4xxFP' , 'eldk42-ppc4xxFP' , ) ,
|
|
||||||
'SARES30-CPCL-MCSSMX' : ('saresc-vserv-01' , 50001 , '7.0.7' , 'x86_64' , 'RHEL8' , 'rhel' , ) ,
|
|
||||||
}
|
|
||||||
|
|
||||||
iocSmarAct={
|
|
||||||
'SARES30-CPCL-MCSSMX':
|
|
||||||
{
|
|
||||||
'port':'MCS',
|
|
||||||
'host':'129.129.244.32', # 00:04:a3:a2:71:35, MCS0060 Serial: 3762
|
|
||||||
'prefix':'SARES30-SMX',
|
|
||||||
'loc':'EH.057 MobRack',
|
|
||||||
'fmt':'{{{PORT:5},{S:14},{M:6},{ADDR:>4},{DESC:14},{DIR:3},{VELO:4},{DHLM:>6},{DLLM:>6},{EGU:4},{PTYP:4},{RTRY:4}}}\n',
|
|
||||||
'motLst':(
|
|
||||||
# dir: Pos:0 Neg:1
|
|
||||||
( 'DESC' , 'M' , 'ADDR', 'DHLM', 'DLLM', 'DIR', 'EGU', 'PTYP'),
|
|
||||||
('COLLI:TX' , 'MCS1' , 0 , 12 , -10 , 1 , 'mm' , 'S' ) ,
|
|
||||||
('COLLI:TY' , 'MCS2' , 1 , 12 , -10 , 1 , 'mm' , 'S' ) ,
|
|
||||||
('Motor3' , 'MCS3' , 2 , 10 , -10 , 0 , 'mm' , 'S' ) ,
|
|
||||||
('POSTTUBE:TX1', 'MCS4' , 3 , 10 , -10 , 0 , 'mm' , 'S' ) ,
|
|
||||||
('POSTTUBE:TX2', 'MCS5' , 4 , 10 , -10 , 0 , 'mm' , 'S' ) ,
|
|
||||||
('POSTTUBE:TY1', 'MCS6' , 5 , 15 , -20 , 0 , 'mm' , 'S' ) ,
|
|
||||||
('POSTTUBE:TY2', 'MCS7' , 6 , 15 , -20 , 0 , 'mm' , 'S' ) ,
|
|
||||||
('POSTTUBE:TZ' , 'MCS8' , 7 , 10 , -10 , 1 , 'mm' , 'S' ) ,
|
|
||||||
('Motor9' , 'MCS9' , 8 , 10 , -10 , 0 , 'mm' , 'S' ) ,
|
|
||||||
('SLITS:X1' , 'MCS10', 9 , 10 , -10 , 1 , 'mm' , 'S' ) ,
|
|
||||||
('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' ) ,
|
|
||||||
('unused' , 'MCS14', 13 , 10 , -10 , 0 , 'mm' , 'S' ) ,
|
|
||||||
('unused' , 'MCS15', 14 , 10 , -10 , 0 , 'mm' , 'S' ) ,
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
iocPowerBrick={
|
|
||||||
# HOST runScript
|
|
||||||
'SAR-CPPM-EXPMX1':{
|
|
||||||
'port':'PPMAC',
|
|
||||||
'prefix':'SAR-EXPMX',
|
|
||||||
'loc':'EH.057 MobRack',
|
|
||||||
'fmt':
|
|
||||||
'{{{P:10},{M:10},{ADDR:4},{DESC:19},{DIR:3},{VELO:4},{HVEL:4},{MRES:5},{PREC:4},{EGU:4}}}\n',
|
|
||||||
'motLst':(
|
|
||||||
( '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 , 0 , 16 , 2 , 0.001 , 4 , 'mm' ) ,
|
|
||||||
( '"Sample C-Trans Y"' , 'MOT_CY' , 3 , 0 , 12 , 4 , 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' ) ,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
'SAR-CPPM-EXPMX2':{
|
|
||||||
'port':'PPMAC',
|
|
||||||
'prefix':'SAR-EXPMX',
|
|
||||||
'loc':'EH.057 MobRack',
|
|
||||||
'fmt':
|
|
||||||
'{{{P:10},{M:10},{ADDR:4},{DESC:12},{DIR:3},{VELO:4},{HVEL:4},{MRES:5},{PREC:4},{EGU:4}}}\n',
|
|
||||||
'motLst':(
|
|
||||||
( 'DESC' , 'M' , 'ADDR' , 'DIR' , 'VELO' , 'HVEL' , 'MRES' , 'PREC' , 'EGU' ) ,
|
|
||||||
( '"Wedge 1"' , 'MOT_WEDGE1' , 1 , 0 , 1. , .5 , 0.001 , 3 , 'mm' ) ,
|
|
||||||
( '"Wedge 2"' , 'MOT_WEDGE2' , 2 , 0 , 1. , .5 , 0.001 , 3 , 'mm' ) ,
|
|
||||||
( '"Wedge 3"' , 'MOT_WEDGE3' , 3 , 0 , 1. , .5 , 0.001 , 3 , 'mm' ) ,
|
|
||||||
( '"Wedge 4"' , 'MOT_WEDGE4' , 4 , 0 , 1. , .5 , 0.001 , 3 , 'mm' ) ,
|
|
||||||
( '"Wedge X"' , 'MOT_WEDGEX' , 9 , 1 , 1. , .5 , 0.001 , 3 , 'mm' ) ,
|
|
||||||
( '"Wedge Y"' , 'MOT_WEDGEY' , 10 , 0 , 1. , .5 , 0.001 , 3 , 'mm' ) ,
|
|
||||||
( '"Wedge A"' , 'MOT_WEDGEA' , 11 , 0 , 1. , .5 , 0.001 , 3 , 'mm' ) ,
|
|
||||||
( '"Wedge B"' , 'MOT_WEDGEB' , 12 , 1 , 1. , .5 , 0.001 , 3 , 'mm' ) ,
|
|
||||||
( '"Backlight"' , 'MOT_BLGT' , 5 , 1 , 40E3 , 20E3 , 1 , 0 , 'usr' ) ,
|
|
||||||
( '"Cryojet"' , 'MOT_CRYO' , 6 , 1 , 10. , 5. , 0.001 , 3 , 'mm' ) ,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
'SAR-CPPM-EXPMX3':{
|
|
||||||
'port':'PPMAC',
|
|
||||||
'prefix':'SAR-EXPMX',
|
|
||||||
'loc':'EH.057 MobRack',
|
|
||||||
'fmt':
|
|
||||||
'{{{P:10},{M:10},{ADDR:4},{DESC:13},{DIR:3},{VELO:4},{MRES:5},{PREC:4},{EGU:4}}}\n',
|
|
||||||
'motLst':(
|
|
||||||
( 'DESC' , 'M' , 'ADDR' , 'DIR' , 'VELO' , 'MRES' , 'PREC' , 'EGU' ) ,
|
|
||||||
( '"Girder 1"' , 'MOT_GIR_1' , 1 , 0 , 40 , 0.001 , 3 , 'deg' ) ,
|
|
||||||
( '"Girder 2"' , 'MOT_GIR_2' , 2 , 0 , 40 , 0.001 , 3 , 'deg' ) ,
|
|
||||||
( '"Girder 3"' , 'MOT_GIR_3' , 3 , 0 , 40 , 0.001 , 3 , 'deg' ) ,
|
|
||||||
( '"Girder 4"' , 'MOT_GIR_4' , 4 , 0 , 40 , 0.001 , 3 , 'deg' ) ,
|
|
||||||
( '"Girder 5"' , 'MOT_GIR_5' , 5 , 0 , 40 , 0.001 , 3 , 'deg' ) ,
|
|
||||||
( '"Girder X"' , 'MOT_GIR_X' , 9 , 0 , 40 , 0.001 , 3 , 'mm' ) ,
|
|
||||||
( '"Girder Y"' , 'MOT_GIR_Y' , 10 , 0 , 40 , 0.001 , 3 , 'mm' ) ,
|
|
||||||
( '"Girder U"' , 'MOT_GIR_U' , 11 , 0 , 40 , 0.001 , 3 , 'mrad' ) ,
|
|
||||||
( '"Girder V"' , 'MOT_GIR_V' , 12 , 0 , 40 , 0.001 , 3 , 'mrad' ) ,
|
|
||||||
( '"Girder W"' , 'MOT_GIR_W' , 13 , 0 , 40 , 0.001 , 3 , 'mrad' ) ,
|
|
||||||
( '"Detector Z"' , 'MOT_DET_Z' , 6 , 1 , 4 , 0.001 , 3 , 'mm' ) ,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
'SAR-CPPM-EXPMX4':{
|
|
||||||
'port':'PPMAC',
|
|
||||||
'prefix':'SAR-EXPMX',
|
|
||||||
'loc':'EH.057 MobRack',
|
|
||||||
'fmt':
|
|
||||||
'{{{P:10},{M:10},{ADDR:4},{DESC:27},{DIR:3},{VELO:4},{MRES:5},{PREC:4},{EGU:4}}}\n',
|
|
||||||
'motLst':(
|
|
||||||
('DESC', 'M', 'ADDR', 'DIR', 'VELO', 'MRES', 'PREC', 'EGU'),
|
|
||||||
# desc , m , addr , dir , velo , hvel , accl , jar , mres , prec , egu , dhlm , dllm ,
|
|
||||||
# NOT YET ANY MOTOR
|
|
||||||
),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
tplYaml='''\
|
|
||||||
ioc_host: {host}
|
|
||||||
ioc_port: {port}
|
|
||||||
epics_version: {ver}
|
|
||||||
cpu_architecture: {arch}
|
|
||||||
os: {osys}
|
|
||||||
os_id: {osys_id}
|
|
||||||
'''
|
|
||||||
|
|
||||||
# /home/zamofing_t/Documents/doc-ext/SmaractMCS/MCS2PositionerTypes.pdf Positioner Types Cross Reference
|
|
||||||
lutPSENS={ # abrev_(MCS2code, MCS1code)
|
|
||||||
'S':(300,1),'SD':(301,21),'SP':(302,5),'SC':(303,6),'SCD':(304,24),'SC500':(307,18),'SR20':(309,8),
|
|
||||||
'SR':(312,2),'SR2':(313,23),'SR77':(316,20),'SR120':(320,37),'G605DS':(325,48),'G775DS':(328,49),
|
|
||||||
'LE':(342,43),'LED':(343,44),'L':(345,41),'LD':(346,42),'LC':(348,38),'LCD':(349,40),'LR':(354,39),
|
|
||||||
'M':(357,9),'MD':(358,32),'GD':(363,11),'GE':(366,12),'G605L':(381,50),'G775L':(383,51),'G605LE':(387,53),
|
|
||||||
'G775LE':(389,54),'G605LC':(396,57),'G775LC':(398,58),'G775LE':(389,54),
|
|
||||||
}
|
|
||||||
|
|
||||||
tplMcsCtrl='''\
|
|
||||||
###################################################################
|
|
||||||
# DO NOT EDIT: Generated with epics_ioc_modules/ESB_MX/generate.py
|
|
||||||
# This is the IOC {ioc} on {ioc_host}:{ioc_port}
|
|
||||||
##################################################################
|
|
||||||
|
|
||||||
epicsEnvSet("ENGINEER", "zamofing_t")
|
|
||||||
epicsEnvSet("LOCATION", "{loc}")
|
|
||||||
|
|
||||||
###### require modules ############
|
|
||||||
# motorSmarAct community driver
|
|
||||||
# smarActMot PSI templates and other files
|
|
||||||
require motorSmarAct
|
|
||||||
require smarActMot
|
|
||||||
require ESB_MX
|
|
||||||
|
|
||||||
###### initialize device ############
|
|
||||||
drvAsynIPPortConfigure("asyn{port}", "{host}:5000", 0, 0, 0)
|
|
||||||
#ctrlPort, asynPort, number of axes, active poll period (ms), idle poll period ms), [default debug lvl]
|
|
||||||
MCSCreateController("{port}", "asyn{port}", {num_ax}, 100, 1000, 0x00)
|
|
||||||
|
|
||||||
'''
|
|
||||||
|
|
||||||
mcsSubsHdr='''\
|
|
||||||
file asyn.template {{{{P={prefix}, PORT=asyn{port}}}}}
|
|
||||||
|
|
||||||
##### MCS
|
|
||||||
file $(smarActMot_DIR)/db/MCS_axis.template
|
|
||||||
{{
|
|
||||||
pattern
|
|
||||||
'''
|
|
||||||
|
|
||||||
tplPwrBrkCtrl='''\
|
|
||||||
##########################################
|
|
||||||
# DO NOT EDIT: Generated with generate.py
|
|
||||||
# This is the IOC on host {ioc}
|
|
||||||
##########################################
|
|
||||||
# PPMAC responsible: Thierry Zamofing
|
|
||||||
##########################################
|
|
||||||
|
|
||||||
###### initialize device ############
|
|
||||||
require PB_COMMON
|
|
||||||
{req}
|
|
||||||
|
|
||||||
#powerPmacCreateController(<port_name>, <moving_poll_pseriod [ms]>, <idle_poll_period [ms]>)
|
|
||||||
powerPmacCreateController("{port}", 200, 1000)
|
|
||||||
|
|
||||||
###### initialize axes ############
|
|
||||||
'''
|
|
||||||
|
|
||||||
tplPwrBrkAxis='''\
|
|
||||||
powerPmacCreateAxis({PORT}, {ADDR})
|
|
||||||
'''
|
|
||||||
|
|
||||||
tplEXPMX1='''
|
|
||||||
###### initialize EVR ############
|
|
||||||
# https://git.psi.ch/epics_driver_modules/mrfioc2
|
|
||||||
require mrfioc2
|
|
||||||
runScript $(mrfioc2_DIR)/mrfioc2_evr-PCIe.cmd, "DEVICE=EVR0,EVR_SUBS=$(ESB_MX_DIR)/db/evr_PCIe-300DC.subs,EVR_DOMAIN=0x2,EVR_BUS=0x21,SYS=SAR-EXPMX"
|
|
||||||
|
|
||||||
###### initialize EVR data buffer ############
|
|
||||||
# https://git.psi.ch/epics_driver_modules/mrfioc2_regDev
|
|
||||||
require mrfioc2_regDev
|
|
||||||
runScript $(mrfioc2_regDev_DIR)/mrfioc2_regDev_pulseID_RX.cmd, "DEVICE=EVR0,SYS=SAR-EXPMX"
|
|
||||||
|
|
||||||
require PB_EXTRA
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)motorStatus.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_FY, M_NO=1")
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)motorStatus.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_FX, M_NO=2")
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)motorStatus.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_CY, M_NO=3")
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)motorStatus.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_CX, M_NO=4")
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)motorStatus.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_CZ, M_NO=5")
|
|
||||||
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)killOne.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_FY, M_NO=1")
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)killOne.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_FX, M_NO=2")
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)killOne.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_CY, M_NO=3")
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)killOne.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_CX, M_NO=4")
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)killOne.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_CZ, M_NO=5")
|
|
||||||
'''
|
|
||||||
|
|
||||||
tplEXPMX2='''
|
|
||||||
#powerPmacCreateVirtualAxis(<port_name>, <axis_index>, <coord_sys_index>, <axis_name>,<commaSeparatedMotorIndices)
|
|
||||||
# !!! COMMENTS AFTER 'powerPmacCreateVirtualAxis("$(PORT)", 9, 1, "X",1)' IS NOT ALLOWED !!!
|
|
||||||
powerPmacCreateVirtualAxis(PPMAC, 9 , 1, "X",1,2,3,4)
|
|
||||||
powerPmacCreateVirtualAxis(PPMAC, 10, 1, "Y",1,2,3,4)
|
|
||||||
powerPmacCreateVirtualAxis(PPMAC, 11, 1, "A",1,2,3,4)
|
|
||||||
powerPmacCreateVirtualAxis(PPMAC, 12, 1, "B",1,2,3,4)
|
|
||||||
'''
|
|
||||||
|
|
||||||
tplEXPMX3='''
|
|
||||||
#powerPmacCreateVirtualAxis(<port_name>, <axis_index>, <coord_sys_index>, <axis_name>,<commaSeparatedMotorIndices)
|
|
||||||
# !!! COMMENTS AFTER 'powerPmacCreateVirtualAxis("$(PORT)", 9, 1, "X",1)' IS NOT ALLOWED !!!
|
|
||||||
powerPmacCreateVirtualAxis(PPMAC, 9 , 1, "X",1,2,3,4)
|
|
||||||
powerPmacCreateVirtualAxis(PPMAC, 10, 1, "Y",1,2,3,4)
|
|
||||||
powerPmacCreateVirtualAxis(PPMAC, 11, 1, "U",1,2,3,4)
|
|
||||||
powerPmacCreateVirtualAxis(PPMAC, 12, 1, "V",1,2,3,4)
|
|
||||||
powerPmacCreateVirtualAxis(PPMAC, 13, 1, "W",1,2,3,4)
|
|
||||||
|
|
||||||
# Load databse
|
|
||||||
#dbLoadTemplate("$(ESB_MX_TEMPLATES)/$(P)3.subs", "PORT_M=$(PORT),P_M=$(P)")
|
|
||||||
|
|
||||||
require PB_EXTRA
|
|
||||||
#- Brakes - need to load motor status PVs as well
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)motorStatus.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_GIR_1, M_NO=1")
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)motorStatus.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_GIR_2, M_NO=2")
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)motorStatus.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_GIR_3, M_NO=3")
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)motorStatus.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_GIR_4, M_NO=4")
|
|
||||||
dbLoadRecords("$(PB_EXTRA_TEMPLATES)motorStatus.db" "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_GIR_5, M_NO=5")
|
|
||||||
dbLoadRecords("${PB_EXTRA_TEMPLATES}motorBrake.db", "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_GIR_1, M_NO=1")
|
|
||||||
dbLoadRecords("${PB_EXTRA_TEMPLATES}motorBrake.db", "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_GIR_2, M_NO=2")
|
|
||||||
dbLoadRecords("${PB_EXTRA_TEMPLATES}motorBrake.db", "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_GIR_3, M_NO=3")
|
|
||||||
dbLoadRecords("${PB_EXTRA_TEMPLATES}motorBrake.db", "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_GIR_4, M_NO=4")
|
|
||||||
dbLoadRecords("${PB_EXTRA_TEMPLATES}motorBrake.db", "SYS=SAR-EXPMX, PORT=PPMAC, M=MOT_GIR_5, M_NO=5")
|
|
||||||
'''
|
|
||||||
|
|
||||||
pwrBrkSubsHdr='''\
|
|
||||||
file asyn.template {{{{P={prefix}, PORT={port},R=asyn{idx}}}}}
|
|
||||||
|
|
||||||
file PPMACMotor.template
|
|
||||||
{{
|
|
||||||
pattern
|
|
||||||
'''
|
|
||||||
|
|
||||||
# tpl_asyn='''\
|
|
||||||
#record(asyn,"$(P):$(R=asyn)")
|
|
||||||
#{
|
|
||||||
# field(DTYP,"asynRecordDevice")
|
|
||||||
# field(PORT,"$(PORT)")
|
|
||||||
# field(ADDR,"0")
|
|
||||||
# field(OMAX,"100")
|
|
||||||
# field(IMAX,"100")
|
|
||||||
#}
|
|
||||||
#'''
|
|
||||||
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
os.makedirs('gen/ioc/',exist_ok=True)
|
|
||||||
#os.makedirs('gen/db/',exist_ok=True)
|
|
||||||
|
|
||||||
def genYAML(self):
|
|
||||||
|
|
||||||
for ioc,p in self.yamlParam.items():
|
|
||||||
param=dict(zip(('host','port','ver','arch','osys','osys_id',),p))
|
|
||||||
fn=f'gen/ioc/{ioc}_parameters.yaml'
|
|
||||||
print('generate '+fn+' ...')
|
|
||||||
fh=open(fn,'w')
|
|
||||||
fh.write(self.tplYaml.format(**param))
|
|
||||||
fh.close()
|
|
||||||
print('done.')
|
|
||||||
|
|
||||||
def genIOC(self):
|
|
||||||
print('### genIOC ###')
|
|
||||||
fn='gen/ioc/Makefile'
|
|
||||||
print('generate '+fn+' ...')
|
|
||||||
with open(fn,'w') as fh:
|
|
||||||
fh.write('include /ioc/tools/ioc.makefile\n')
|
|
||||||
self.genPowerBrickIOC()
|
|
||||||
self.genSmarActIOC()
|
|
||||||
|
|
||||||
|
|
||||||
print('done.')
|
|
||||||
|
|
||||||
def genLauncher(self):
|
|
||||||
print('### genLauncher ###')
|
|
||||||
|
|
||||||
# os.makedirs('gen/',exist_ok=True)
|
|
||||||
# fn='gen/launcher_part.json'
|
|
||||||
# print('generate '+fn+'...')
|
|
||||||
# fh=open(fn,'w')
|
|
||||||
# for dev,ioc in dev2ioc.items():
|
|
||||||
# fh.write('''\
|
|
||||||
#{{ "type": "caqtdm" , "text": "{dev} translation", "panel": "galil_dmc_ctrl.ui", "macros": "DMC={dev}_DMC1:,M1=TX" }},
|
|
||||||
#'''.format(dev=dev))
|
|
||||||
# fh.close()
|
|
||||||
|
|
||||||
def genPowerBrickIOC(self):
|
|
||||||
yamlParam=Generate.yamlParam
|
|
||||||
tplCtrl=Generate.tplPwrBrkCtrl
|
|
||||||
tplAxis=Generate.tplPwrBrkAxis
|
|
||||||
#tplAxSR=Generate.tplMcsAxisSaveRestore
|
|
||||||
subsHdr=Generate.pwrBrkSubsHdr
|
|
||||||
|
|
||||||
for ioc,v in Generate.iocPowerBrick.items():
|
|
||||||
# fh_ss startup script
|
|
||||||
# fh_sb substitution
|
|
||||||
# fh_sr save restore
|
|
||||||
|
|
||||||
fmt=' '+v['fmt']
|
|
||||||
hdr=v['motLst'][0]
|
|
||||||
if len(v['motLst'])>1:
|
|
||||||
motLst=v['motLst'][1:]
|
|
||||||
else:
|
|
||||||
motLst=tuple()
|
|
||||||
param= {k: v[k] for k in {'port','prefix','loc'}}
|
|
||||||
param['ioc']=ioc
|
|
||||||
param['idx']=ioc[-1]
|
|
||||||
param['num_ax']=len(motLst)
|
|
||||||
param['req']='require ESB_MX\n\n! $(gpasciiCommander_DIR)/gpasciiCommander --path $(ESB_MX_DIR) $(ESB_MX_DIR)/{prefix}{idx}.cfg'.format(**param)
|
|
||||||
#print(param)
|
|
||||||
|
|
||||||
fn=f'gen/ioc/{ioc}_startup.script'
|
|
||||||
print('generate '+fn+' ...')
|
|
||||||
fh_ss=open(fn,'w')
|
|
||||||
|
|
||||||
fn=f'gen/ioc/{ioc}_gen.subs' # with a name _* the .subs file is recognize by the 'ioc install' tool
|
|
||||||
print('generate '+fn+' ...')
|
|
||||||
fh_sb=open(fn,'w')
|
|
||||||
|
|
||||||
#fn=f'gen/ioc/cfg/{ioc}_sr.req'
|
|
||||||
#print('generate '+fn+' ...')
|
|
||||||
#fh_sr=open(fn,'w')
|
|
||||||
|
|
||||||
fh_ss.write(tplCtrl.format(**param))
|
|
||||||
|
|
||||||
fh_sb.write(subsHdr.format(**param))
|
|
||||||
port=param['port']
|
|
||||||
prefix=param['prefix']
|
|
||||||
motPar=dict(zip(hdr, hdr))
|
|
||||||
motPar['PORT']='PORT'
|
|
||||||
motPar['P']='P'
|
|
||||||
fh_sb.write(fmt.format(**motPar))
|
|
||||||
for motPar in motLst:
|
|
||||||
motPar=dict(zip(hdr, motPar))
|
|
||||||
motPar['PORT']=v['port']
|
|
||||||
motPar['P']=v['prefix']
|
|
||||||
fh_sb.write(fmt.format(**motPar))
|
|
||||||
if motPar['ADDR']<=8:
|
|
||||||
fh_ss.write(tplAxis.format(**motPar))
|
|
||||||
fh_sb.write('}\n\n')
|
|
||||||
|
|
||||||
if ioc=='SAR-CPPM-EXPMX1':
|
|
||||||
fh_ss.write(Generate.tplEXPMX1)
|
|
||||||
elif ioc=='SAR-CPPM-EXPMX2':
|
|
||||||
fh_ss.write(Generate.tplEXPMX2)
|
|
||||||
elif ioc=='SAR-CPPM-EXPMX3':
|
|
||||||
fh_ss.write(Generate.tplEXPMX3)
|
|
||||||
|
|
||||||
fh_ss.close()
|
|
||||||
fh_sb.close()
|
|
||||||
|
|
||||||
|
|
||||||
def genSmarActIOC(self):
|
|
||||||
tplCtrl=Generate.tplMcsCtrl
|
|
||||||
#tplAxis=Generate.tplMcsAxis
|
|
||||||
#tplAxSR=Generate.tplMcsAxisSaveRestore
|
|
||||||
subsHdr=Generate.mcsSubsHdr
|
|
||||||
lutPSENS=Generate.lutPSENS
|
|
||||||
os.makedirs('gen/ioc/cfg/',exist_ok=True)
|
|
||||||
for ioc,v in Generate.iocSmarAct.items():
|
|
||||||
# fh_ss startup script
|
|
||||||
# fh_sb substitution
|
|
||||||
# fh_sr save restore
|
|
||||||
fmt=' '+v['fmt']
|
|
||||||
hdr=v['motLst'][0]
|
|
||||||
if len(v['motLst'])>1:
|
|
||||||
motLst=v['motLst'][1:]
|
|
||||||
else:
|
|
||||||
motLst=tuple()
|
|
||||||
param= {k: v[k] for k in {'port','host','prefix','loc'}}
|
|
||||||
try:
|
|
||||||
ioc_host,ioc_port=Generate.yamlParam[ioc][:2]
|
|
||||||
except KeyError as e:
|
|
||||||
_log.warning(repr(e)+': skipped');continue
|
|
||||||
param['ioc']=ioc
|
|
||||||
param['ioc_host']=ioc_host
|
|
||||||
param['ioc_port']=ioc_port
|
|
||||||
param['num_ax']=len(motLst)
|
|
||||||
#print(param)
|
|
||||||
|
|
||||||
fn=f'gen/ioc/{ioc}_startup.script'
|
|
||||||
print('generate '+fn+' ...')
|
|
||||||
fh_ss=open(fn,'w')
|
|
||||||
|
|
||||||
fn=f'gen/ioc/{ioc}_gen.subs' # with a name _* the .subs file is recognize by the 'ioc install' tool
|
|
||||||
print('generate '+fn+' ...')
|
|
||||||
fh_sb=open(fn,'w')
|
|
||||||
|
|
||||||
#fn=f'gen/ioc/cfg/{ioc}_sr.req'
|
|
||||||
#print('generate '+fn+' ...')
|
|
||||||
#fh_sr=open(fn,'w')
|
|
||||||
|
|
||||||
fh_ss.write(tplCtrl.format(**param))
|
|
||||||
fh_sb.write(subsHdr.format(**param))
|
|
||||||
h=hdr+('PORT','S','VELO','RTRY')
|
|
||||||
motPar=dict(zip(h, h))
|
|
||||||
fh_sb.write(fmt.format(**motPar))
|
|
||||||
for motPar in motLst:
|
|
||||||
motPar=dict(zip(hdr, motPar))
|
|
||||||
try:
|
|
||||||
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')
|
|
||||||
motPar['PORT']=v['port']
|
|
||||||
motPar['S']=v['prefix']
|
|
||||||
motPar['VELO']=2
|
|
||||||
motPar['RTRY']=1
|
|
||||||
fh_sb.write(fmt.format(**motPar))
|
|
||||||
#fh_ss.write(tplAxis.format(**motPar))
|
|
||||||
#fh_sr.write(tplAxSR.format(**motPar))
|
|
||||||
fh_sb.write('}\n\n')
|
|
||||||
fh_ss.close()
|
|
||||||
fh_sb.close()
|
|
||||||
#fh_sr.close()
|
|
||||||
|
|
||||||
#fn='gen/ioc/asyn.template'
|
|
||||||
#print('generate '+fn+' ...')
|
|
||||||
#with open(fn,'w') as fh:
|
|
||||||
# fh.write(Generate.tpl_asyn)
|
|
||||||
|
|
||||||
if __name__=='__main__':
|
|
||||||
def parse_args():
|
|
||||||
import argparse
|
|
||||||
(h, t)=os.path.split(sys.argv[0]);cmd='\n '+(t if len(h)>20 else sys.argv[0])+' '
|
|
||||||
#print(sys.argv,h,t)
|
|
||||||
exampleCmd=('', '-m0xf -v0' )
|
|
||||||
epilog=__doc__+'\nExamples:'+''.join(map(lambda s:cmd+s, exampleCmd))+'\n'
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(epilog=epilog,formatter_class=argparse.RawDescriptionHelpFormatter)
|
|
||||||
parser.add_argument('-m', '--mode', type=lambda x: int(x,0), help='mode bits', default=0xff)
|
|
||||||
args = parser.parse_args()
|
|
||||||
#print(args)
|
|
||||||
|
|
||||||
obj=Generate()
|
|
||||||
if args.mode&0x1:
|
|
||||||
obj.genYAML()
|
|
||||||
if args.mode&0x2:
|
|
||||||
obj.genIOC()
|
|
||||||
if args.mode&0x4:
|
|
||||||
obj.genLauncher()
|
|
||||||
|
|
||||||
parse_args()
|
|
||||||
|
|
||||||
1023
logbook.md
1023
logbook.md
File diff suppressed because it is too large
Load Diff
@@ -70,7 +70,7 @@ hostname=socket.gethostname()
|
|||||||
if hostname=='ganymede':
|
if hostname=='ganymede':
|
||||||
sys.path.insert(0, os.path.expanduser('~/Documents/prj/SwissFEL/PBTools/'))
|
sys.path.insert(0, os.path.expanduser('~/Documents/prj/SwissFEL/PBTools/'))
|
||||||
else:
|
else:
|
||||||
sys.path.insert(0, os.path.expanduser('/sf/cristallina/applications/mx/zamofing_t/PBTools/'))
|
sys.path.insert(0, os.path.expanduser('/sf/cristallina/applications/SwissMX/PBTools/'))
|
||||||
|
|
||||||
from pbtools.misc.pp_comm import PPComm
|
from pbtools.misc.pp_comm import PPComm
|
||||||
from pbtools.misc.gather import Gather
|
from pbtools.misc.gather import Gather
|
||||||
|
|||||||
1164
qt/ESB_MX_5cam.ui
1164
qt/ESB_MX_5cam.ui
File diff suppressed because it is too large
Load Diff
@@ -1,132 +0,0 @@
|
|||||||
<?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>610</width>
|
|
||||||
<height>735</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Form</string>
|
|
||||||
</property>
|
|
||||||
<property name="autoFillBackground">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="caLabel" name="caLabel_0">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>781</width>
|
|
||||||
<height>26</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>Expert</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Smaract Controller $(P):$(M)</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading</set>
|
|
||||||
</property>
|
|
||||||
<property name="foreground">
|
|
||||||
<color>
|
|
||||||
<red>0</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</property>
|
|
||||||
<property name="background">
|
|
||||||
<color alpha="0">
|
|
||||||
<red>0</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</property>
|
|
||||||
<property name="colorMode">
|
|
||||||
<enum>caLabel::Default</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="caInclude" name="cainclude_3">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>5</x>
|
|
||||||
<y>53</y>
|
|
||||||
<width>590</width>
|
|
||||||
<height>672</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="macro">
|
|
||||||
<string>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</string>
|
|
||||||
</property>
|
|
||||||
<property name="filename" stdset="0">
|
|
||||||
<string notr="true">motor_exp.ui</string>
|
|
||||||
</property>
|
|
||||||
<property name="numberOfItems" stdset="0">
|
|
||||||
<number>15</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing" stdset="0">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>caInclude::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="caShellCommand" name="cashellcommand">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>480</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>109</width>
|
|
||||||
<height>24</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="label">
|
|
||||||
<string notr="true">-Homing</string>
|
|
||||||
</property>
|
|
||||||
<property name="background">
|
|
||||||
<color>
|
|
||||||
<red>128</red>
|
|
||||||
<green>136</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</property>
|
|
||||||
<property name="labels">
|
|
||||||
<string>Homing</string>
|
|
||||||
</property>
|
|
||||||
<property name="files">
|
|
||||||
<string>python /ioc/modules/qt/ESB_MX_SmarAct_home.py</string>
|
|
||||||
</property>
|
|
||||||
<property name="args">
|
|
||||||
<string>$(P):$(M)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>caLabel</class>
|
|
||||||
<extends>QLabel</extends>
|
|
||||||
<header>caLabel</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>caInclude</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header>caInclude</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>caShellCommand</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header>caShellCommand</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
@@ -1,154 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
#*-----------------------------------------------------------------------*
|
|
||||||
#| |
|
|
||||||
#| Copyright (c) 2014 by Paul Scherrer Institute (http://www.psi.ch) |
|
|
||||||
#| |
|
|
||||||
#| Author Thierry Zamofing (thierry.zamofing@psi.ch) |
|
|
||||||
#*-----------------------------------------------------------------------*
|
|
||||||
'''
|
|
||||||
Homing procedure for PPRM.
|
|
||||||
|
|
||||||
Long Doc'''
|
|
||||||
#for ID in 1 2 3 4 5 6
|
|
||||||
#do
|
|
||||||
#caput MYPREFIX:MOTOR_$ID.RLV 55
|
|
||||||
#caput MYPREFIX:MOTOR_$ID.SET Set
|
|
||||||
#caput MYPREFIX:MOTOR_$ID.VAL 0
|
|
||||||
#caput MYPREFIX:MOTOR_$ID.SET Use
|
|
||||||
#done
|
|
||||||
|
|
||||||
#for ID in 1 2 3 4 5 6
|
|
||||||
#do
|
|
||||||
#caput MYPREFIX:MOTOR_$ID.RLV -10
|
|
||||||
#done
|
|
||||||
|
|
||||||
|
|
||||||
import logging, sys, os, json
|
|
||||||
import CaChannel,time
|
|
||||||
|
|
||||||
class SwissMxSmarAct:
|
|
||||||
|
|
||||||
def __init__(self, args):
|
|
||||||
self.args=args
|
|
||||||
prefix=self.args.var[0]
|
|
||||||
if prefix[-1]==':':prefix[:-1]
|
|
||||||
self.prefix=prefix
|
|
||||||
self.pv=pvDict=dict()
|
|
||||||
for i in range(1,16):
|
|
||||||
#SARES30-ESBMX1:FRM_FORW.PROC
|
|
||||||
#SARES30-ESBMX1:DRIVE
|
|
||||||
s1=prefix+'%i'%i
|
|
||||||
for j in ('.VAL','.RBV','.HOMF','.HOMR','.MSTA','_AUTOZERO'):
|
|
||||||
s2=s1+j
|
|
||||||
print(s2)
|
|
||||||
pv = CaChannel.CaChannel(s2)
|
|
||||||
pv.setTimeout(10.0)
|
|
||||||
pv.search()
|
|
||||||
pvDict[s2]=pv
|
|
||||||
CaChannel.ca.pend_io(10.0)
|
|
||||||
#print(pvDict)
|
|
||||||
#pvDict['cryorbv'] = CaChannel.CaChannel("SAR-EXPMX:MOT_CRYO.RBV")
|
|
||||||
#pvDict['cryorbv'].search()
|
|
||||||
|
|
||||||
def home(self,idx,fwd):
|
|
||||||
print('home motor %i fwd:%d...'%(idx,fwd))
|
|
||||||
pv=self.pv[self.prefix+'%i'%idx+'_AUTOZERO']
|
|
||||||
pv.putw(1) #set autozero on
|
|
||||||
if fwd:
|
|
||||||
pv=self.pv[self.prefix+'%i'%idx+'.HOMF']
|
|
||||||
else:
|
|
||||||
pv=self.pv[self.prefix+'%i'%idx+'.HOMR']
|
|
||||||
#print('aaa')
|
|
||||||
pv.putw(1) #set position and move
|
|
||||||
#print('bbb')
|
|
||||||
CaChannel.ca.pend_event(0.1)
|
|
||||||
#print('ccc')
|
|
||||||
|
|
||||||
def waitHomed(self,idx):
|
|
||||||
#print('ddd')
|
|
||||||
pv=self.pv[self.prefix+'%i'%idx+'.MSTA']
|
|
||||||
#print('eee',pv,self.prefix+'%i'%idx+'.MSTA')
|
|
||||||
while pv.getw()==0:
|
|
||||||
print('wait motor %i homing done ...'%idx)
|
|
||||||
CaChannel.ca.pend_event(0.2)
|
|
||||||
#print('fff')
|
|
||||||
|
|
||||||
def moveAbs(self,idx,val):
|
|
||||||
pv=self.pv[self.prefix+'%i'%idx+'.VAL']
|
|
||||||
pv.putw(val) #set position and move
|
|
||||||
|
|
||||||
|
|
||||||
def check_pos(self, idx, val, tolerance=0.1):
|
|
||||||
pvrbv = self.pv[self.prefix+'%i'%idx+'.RBV']
|
|
||||||
pvst = self.pv[self.prefix+'%i'%idx+'.MSTA']
|
|
||||||
|
|
||||||
CaChannel.ca.pend_event(0.2)
|
|
||||||
while pvst.getw():
|
|
||||||
CaChannel.ca.pend_event(0.2)
|
|
||||||
rbv=pvrbv.getw()
|
|
||||||
if abs(val - rbv) > tolerance:
|
|
||||||
raise Exception("failed to reach target value %g,%g,%g"%(val,rbv,tolerance))
|
|
||||||
|
|
||||||
def homing(self):
|
|
||||||
#start homing in desired direction
|
|
||||||
#cryorbv = self.pv['cryorbv']
|
|
||||||
#if cryorbv.getw() < 4.9:
|
|
||||||
# raise Exception("Cryojet is too close, move it to 5.0 mm")
|
|
||||||
|
|
||||||
# home Colli Y first and move it to the TOP
|
|
||||||
###self.home(2, True)
|
|
||||||
###CaChannel.ca.pend_event(0.5)
|
|
||||||
###self.waitHomed(2)
|
|
||||||
###CaChannel.ca.pend_event(0.5)
|
|
||||||
###self.moveAbs(2, 10.0)
|
|
||||||
###self.check_pos(2, 10.0)
|
|
||||||
|
|
||||||
###for idx,fwd in ((1,True),(4,True),(5,True),(6,True),(7,True),(8,True),(10,True),(11,True),(12,True),(13,True),(14,True),(15,True),):
|
|
||||||
for idx,fwd in ((1,True),(2,True),(3,True),(4,True),(5,True),(6,True),(7,True),(8,True),(9,True),(10,True),(11,True),(12,True),(13,True),(14,True),(15,True),):
|
|
||||||
self.home(idx,fwd)
|
|
||||||
CaChannel.ca.pend_event(0.5)
|
|
||||||
####wait homing done
|
|
||||||
###for idx in (1,4,5,6,7,8,10,11,12,13,14,15,):
|
|
||||||
### self.waitHomed(idx)
|
|
||||||
|
|
||||||
####move to desired position
|
|
||||||
###for idx,val in ((1,-10),(4,.4),(5,.5),(6,.6),(7,.7),(8,.8),(10,1.0),(11,1.1),(12,1.2),(13,1.3),(14,1.4),(15,1.5),):
|
|
||||||
### self.moveAbs(idx,val)
|
|
||||||
print('Homing done')
|
|
||||||
|
|
||||||
if __name__=='__main__':
|
|
||||||
from optparse import OptionParser, IndentedHelpFormatter
|
|
||||||
class MyFormatter(IndentedHelpFormatter):
|
|
||||||
'helper class for formating the OptionParser'
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
IndentedHelpFormatter.__init__(self)
|
|
||||||
|
|
||||||
def format_epilog(self, epilog):
|
|
||||||
if epilog:
|
|
||||||
return epilog
|
|
||||||
else:
|
|
||||||
return ""
|
|
||||||
|
|
||||||
def parse_args():
|
|
||||||
'main command line interpreter function'
|
|
||||||
#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])+' '
|
|
||||||
exampleCmd=('SARES30-ESBMX',
|
|
||||||
)
|
|
||||||
epilog=__doc__+'''
|
|
||||||
Examples:'''+''.join(map(lambda s:cmd+s, exampleCmd))+'\n '
|
|
||||||
|
|
||||||
fmt=MyFormatter()
|
|
||||||
parser=OptionParser(epilog=epilog, formatter=fmt)
|
|
||||||
#parser.add_option('', '--host', dest='host', help='hostname (or none to use locally)', metavar='HOST')
|
|
||||||
#parser.add_option('-v', '--verbose', type="int", dest='verbose', help='verbosity bits (see below)', default=0)
|
|
||||||
(args, other)=parser.parse_args()
|
|
||||||
print(args,other)
|
|
||||||
args.var=other
|
|
||||||
smrct=SwissMxSmarAct(args)
|
|
||||||
smrct.homing()
|
|
||||||
|
|
||||||
#os.environ['EPICS_CA_ADDR_LIST']='localhost'
|
|
||||||
parse_args()
|
|
||||||
|
|
||||||
247
qt/ESB_MX_exp.ui
247
qt/ESB_MX_exp.ui
@@ -1,247 +0,0 @@
|
|||||||
<?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>720</width>
|
|
||||||
<height>695</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Form</string>
|
|
||||||
</property>
|
|
||||||
<widget class="caLabel" name="calabel">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</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>10</x>
|
|
||||||
<y>50</y>
|
|
||||||
<width>700</width>
|
|
||||||
<height>582</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="macro">
|
|
||||||
<string>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</string>
|
|
||||||
</property>
|
|
||||||
<property name="filename" stdset="0">
|
|
||||||
<string notr="true">motor_1m.ui</string>
|
|
||||||
</property>
|
|
||||||
<property name="numberOfItems" stdset="0">
|
|
||||||
<number>21</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing" stdset="0">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="caMessageButton" name="camessagebutton">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>130</x>
|
|
||||||
<y>640</y>
|
|
||||||
<width>120</width>
|
|
||||||
<height>22</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Homing wedge stage</string>
|
|
||||||
</property>
|
|
||||||
<property name="channel" stdset="0">
|
|
||||||
<string notr="true">$(P):asyn2.AOUT</string>
|
|
||||||
</property>
|
|
||||||
<property name="label">
|
|
||||||
<string notr="true">Homing wedge stage</string>
|
|
||||||
</property>
|
|
||||||
<property name="pressMessage">
|
|
||||||
<string notr="true">enable plc 1</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="caToggleButton" name="catogglebutton">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>350</x>
|
|
||||||
<y>640</y>
|
|
||||||
<width>100</width>
|
|
||||||
<height>22</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Backlight</string>
|
|
||||||
</property>
|
|
||||||
<property name="channel" stdset="0">
|
|
||||||
<string notr="true">$(P):MOT_BLGT</string>
|
|
||||||
</property>
|
|
||||||
<property name="trueValue">
|
|
||||||
<string>-29000</string>
|
|
||||||
</property>
|
|
||||||
<property name="falseValue">
|
|
||||||
<string>0</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="caMessageButton" name="camessagebutton_2">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>250</x>
|
|
||||||
<y>640</y>
|
|
||||||
<width>90</width>
|
|
||||||
<height>22</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Home BkLight</string>
|
|
||||||
</property>
|
|
||||||
<property name="channel" stdset="0">
|
|
||||||
<string notr="true">$(P):MOT_BLGT.HOMR</string>
|
|
||||||
</property>
|
|
||||||
<property name="pressMessage">
|
|
||||||
<string notr="true">1</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="caMessageButton" name="camessagebutton_3">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>640</y>
|
|
||||||
<width>120</width>
|
|
||||||
<height>22</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Homing fast stage</string>
|
|
||||||
</property>
|
|
||||||
<property name="channel" stdset="0">
|
|
||||||
<string notr="true">$(P):asyn1.AOUT</string>
|
|
||||||
</property>
|
|
||||||
<property name="label">
|
|
||||||
<string notr="true">Homing fast stage</string>
|
|
||||||
</property>
|
|
||||||
<property name="pressMessage">
|
|
||||||
<string notr="true">enable plc 1</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="caRelatedDisplay" name="caRelatedDisplay_12">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>510</x>
|
|
||||||
<y>640</y>
|
|
||||||
<width>180</width>
|
|
||||||
<height>31</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="label">
|
|
||||||
<string notr="true">-related panels</string>
|
|
||||||
</property>
|
|
||||||
<property name="foreground">
|
|
||||||
<color>
|
|
||||||
<red>0</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</property>
|
|
||||||
<property name="background">
|
|
||||||
<color>
|
|
||||||
<red>89</red>
|
|
||||||
<green>126</green>
|
|
||||||
<blue>225</blue>
|
|
||||||
</color>
|
|
||||||
</property>
|
|
||||||
<property name="labels">
|
|
||||||
<string>SmarAct;Girder;EVR;EVR-simple</string>
|
|
||||||
</property>
|
|
||||||
<property name="files">
|
|
||||||
<string>ESB_MX_SmarAct.ui;ESB_MX_5cam.ui;G_EVR_main.ui;S_LAS-TMAIN.ui</string>
|
|
||||||
</property>
|
|
||||||
<property name="args">
|
|
||||||
<string>P=SARES30-SMX,M=MCS,T=MCS;P=$(P);SYS=$(P),DEVICE=EVR0,FF=PCIe;SYS=$(P),DEVICE=EVR0,FF=PCIe</string>
|
|
||||||
</property>
|
|
||||||
<property name="stackingMode" stdset="0">
|
|
||||||
<enum>caRowColMenu::Menu</enum>
|
|
||||||
</property>
|
|
||||||
<property name="removeParent" stdset="0">
|
|
||||||
<string>false;false;false;false;false;false;false;false;false;false;false;false;false;false;false;false</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="caMessageButton" name="camessagebutton_4">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>660</y>
|
|
||||||
<width>120</width>
|
|
||||||
<height>22</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Homing CY stage</string>
|
|
||||||
</property>
|
|
||||||
<property name="channel" stdset="0">
|
|
||||||
<string notr="true">$(P):asyn1.AOUT</string>
|
|
||||||
</property>
|
|
||||||
<property name="label">
|
|
||||||
<string notr="true">Homing CY stage</string>
|
|
||||||
</property>
|
|
||||||
<property name="pressMessage">
|
|
||||||
<string notr="true">enable plc 2</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>caRelatedDisplay</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header>caRelatedDisplay</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>caMessageButton</class>
|
|
||||||
<extends>QPushButton</extends>
|
|
||||||
<header>caMessageButton</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>caToggleButton</class>
|
|
||||||
<extends>QCheckBox</extends>
|
|
||||||
<header>caToggleButton</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>
|
|
||||||
Reference in New Issue
Block a user