towards recabeling and reconfiguring all Powerbricks and Smaracts devices
Here all IOCs were started without any hardware. So in the next steps the hardware must be tested.
This commit is contained in:
31
ESB_MX.subs
31
ESB_MX.subs
@@ -1,31 +0,0 @@
|
||||
################################################################################
|
||||
#P, M - Define motor record name
|
||||
#PORT - Name of the ppmac controller port created by powerPmacCreateController
|
||||
#ADDR - Axis index - second parameter of powerPmacCreateAxis and powerPmacCreateVirtualAxis
|
||||
#
|
||||
#The rest are standard motor record fields
|
||||
################################################################################
|
||||
|
||||
#!motor(mot=1,current=600,JogSpeed=102.4*5/25.6/10,servoSf=25.6*10,invDir=True)
|
||||
# 102.4*7/ 71.67/20 um/ms =0.500 mm/s -> use 0.40 mm/s
|
||||
|
||||
#Speed: 102.4*5/25.6/10 um/ms =2 mm/s
|
||||
#Position Units are in um
|
||||
|
||||
#ms to achive speed VELO -> same as Motor[1].JogTa (if positive). Motor[1].JogTa will be set to a caculated negative number
|
||||
# JAR = EGU/s^2 -> JAR = VELO/ACCL (Jog acceleration)
|
||||
|
||||
#global {M1="TX", M2="TZ", M3="RX", M4="RZ"}
|
||||
|
||||
|
||||
file PPMACMotor.template {
|
||||
pattern{ DESC , P , M , PORT , ADDR , DIR, VELO, HVEL, ACCL, JAR, MRES , PREC, EGU , DHLM, DLLM}
|
||||
{ "Rotation Y" , "$(P_M)", "MOTOR_ROT_Y", "$(PORT_M)", "$(M1)", 1 , 50 , 50 , 0.1 , 20 , -0.001, 3 , "deg", 0 , 0 }
|
||||
{ "Sample F-Trans X", "$(P_M)", "MOTOR_FX" , "$(PORT_M)", "$(M2)", 1 , 2 , 2 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Sample F-Trans Y", "$(P_M)", "MOTOR_FY" , "$(PORT_M)", "$(M3)", 1 , 2 , 2 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "CamBase X" , "$(P_M)", "MOTOR_CAMX" , "$(PORT_M)", "$(M4)", 1 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "CamBase Y" , "$(P_M)", "MOTOR_CAMY" , "$(PORT_M)", "$(M5)", 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Backlight" , "$(P_M)", "MOTOR_BLGT" , "$(PORT_M)", "$(M6)", 1 , 40E3, 20E3, 0.1 , 20 , -1 , 0 , "usr", 0 , 0 }
|
||||
{ "Sample C-Trans X", "$(P_M)", "MOTOR_CX" , "$(PORT_M)", "$(M7)", 1 , 2 , 2 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Sample C-Trans Z", "$(P_M)", "MOTOR_CZ" , "$(PORT_M)", "$(M8)", 1 , 2 , 2 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
}
|
||||
2
Makefile
2
Makefile
@@ -3,7 +3,7 @@ MODULE = $(notdir $(shell pwd))
|
||||
BUILDCLASSES = Linux
|
||||
ARCH_FILTER = eldk42% SL6-x86_64
|
||||
EXCLUDE_VERSIONS = 3.14.8
|
||||
SCRIPTS+=$(wildcard add_device*.cmd cfg/*.cfg cfg/*.py cfg/*.pbi qt/*.ui qt/*.jpg python/*.py)
|
||||
SCRIPTS+=$(wildcard add_EXPMX*.cmd cfg/*.cfg cfg/*.py cfg/*.pbi python/*.py)
|
||||
#SOURCES+=src/DHVSaSub.cpp
|
||||
#DBDS+=src/DHVSaSub.dbd
|
||||
USR_CXXFLAGS+= -fno-operator-names
|
||||
|
||||
94
PBinspect2.pbi
Normal file
94
PBinspect2.pbi
Normal file
@@ -0,0 +1,94 @@
|
||||
[
|
||||
[
|
||||
"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
|
||||
]
|
||||
],
|
||||
"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",
|
||||
[
|
||||
7
|
||||
],
|
||||
"name=m7;caption=motor7;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=1220;floaty=261;floatw=208;floath=677;notebookid=-1;transparent=255"
|
||||
],
|
||||
[
|
||||
"StatusMotorListCtrl",
|
||||
[
|
||||
8
|
||||
],
|
||||
"name=m8;caption=motor8;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=1257;floaty=494;floatw=208;floath=677;notebookid=-1;transparent=255"
|
||||
]
|
||||
]
|
||||
@@ -4,7 +4,6 @@ record(motor,"$(P):$(M)")
|
||||
field(DTYP,"asynMotor")
|
||||
field(OUT, "@asyn($(PORT),$(ADDR))")
|
||||
field(DIR, $(DIR))
|
||||
field(VMAX,$(VELO))
|
||||
field(VELO,$(VELO))
|
||||
field(JVEL,$(VELO))
|
||||
field(HVEL,$(HVEL))
|
||||
@@ -17,12 +16,3 @@ record(motor,"$(P):$(M)")
|
||||
field(DLLM,$(DLLM))
|
||||
field(RTRY,0)
|
||||
}
|
||||
|
||||
record(asyn,"$(P):ASYN")
|
||||
{
|
||||
field(DTYP,"asynRecordDevice")
|
||||
field(PORT,"$(PORT)")
|
||||
field(ADDR,"0")
|
||||
field(OMAX,"100")
|
||||
field(IMAX,"100")
|
||||
}
|
||||
|
||||
47
Readme.md
47
Readme.md
@@ -19,7 +19,6 @@ Weight top stage: 250g=2.5N
|
||||
|
||||
|
||||
Mecapion rot stage
|
||||
------------------
|
||||
```
|
||||
http://www.lsmecapion.com/eng/
|
||||
http://www.lsmecapion.com/eng/contents/sub01/sub02_03.php
|
||||
@@ -201,12 +200,8 @@ ssh root@$PPMAC sendgetsends -1
|
||||
|
||||
execute helicalscan.py
|
||||
|
||||
```
|
||||
|
||||
HelicalScan SCRATCH
|
||||
-------------------
|
||||
```
|
||||
|
||||
SCRATCH
|
||||
-------
|
||||
|
||||
&1p ->this will trigger:forward kinematic
|
||||
cpx pmatch ->this will trigger:forward kinematic
|
||||
@@ -247,3 +242,41 @@ fwd_trf: dx:0.2 dz:0.3 w:5.72958 fy:3.3
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
Motors final setup 20.12.17
|
||||
---------------------------
|
||||
```
|
||||
SAR-CPPM-EXPMX1: biss:y timing:y
|
||||
1: fy
|
||||
2: fx
|
||||
3: ry
|
||||
4: cx
|
||||
5: cy
|
||||
6: interfero y
|
||||
7: interfero x
|
||||
|
||||
SAR-CPPM-EXPMX2: biss:n timing:n
|
||||
1: wedge1
|
||||
2: wedge2
|
||||
3: wedge3
|
||||
4: wedge4
|
||||
5: backlight
|
||||
|
||||
SAR-CPPM-EXPMX3: biss:n timing:y
|
||||
1: girder1
|
||||
2: girder2
|
||||
3: girder3
|
||||
4: girder4
|
||||
5: girder5
|
||||
|
||||
|
||||
PPMAC=MOTTEST-CPPM-CRM0485
|
||||
ssh root@$PPMAC
|
||||
cd /ioc/SAR-CPPM-EXPMX1;iocsh startup.script
|
||||
|
||||
|
||||
ssh sf-lc
|
||||
caqtdm -macro "P=SAR-EXPMX" ESB_MX_exp.ui
|
||||
|
||||
```
|
||||
|
||||
25
SAR-EXPMX1.subs
Normal file
25
SAR-EXPMX1.subs
Normal file
@@ -0,0 +1,25 @@
|
||||
################################################################################
|
||||
#P - prefix of the PV
|
||||
#PORT - Name of the ppmac controller port created by powerPmacCreateController
|
||||
#ADDR - Axis index - second parameter of powerPmacCreateAxis and powerPmacCreateVirtualAxis
|
||||
################################################################################
|
||||
|
||||
#Position Units are in um
|
||||
|
||||
#ms to achive speed VELO -> same as Motor[1].JogTa (if positive). Motor[1].JogTa will be set to a caculated negative number
|
||||
# JAR = EGU/s^2 -> JAR = VELO/ACCL (Jog acceleration)
|
||||
|
||||
#caput SAROP21-OAPU092:ASYN.AOUT '&1;#1..2p'
|
||||
#caget SAROP21-OAPU092:ASYN.TINP
|
||||
#caput SAROP21-OAPU092:ASYN.AOUT '&1;cpx abs;X(-900)Y(10)A(5200)B(5100)'
|
||||
|
||||
file asyn.template {{P="$(P_M)1", PORT=$(PORT_M)}}
|
||||
|
||||
file PPMACMotor.template {
|
||||
pattern{ DESC , P , M , PORT , ADDR, DIR, VELO, HVEL, ACCL, JAR, MRES , PREC, EGU , DHLM, DLLM}
|
||||
{ "Sample F-Trans Y", "$(P_M)", "MOT_FY" , "$(PORT_M)", 1 , 1 , 2 , 2 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Sample F-Trans X", "$(P_M)", "MOT_FX" , "$(PORT_M)", 2 , 1 , 2 , 2 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Rotation Y" , "$(P_M)", "MOT_ROT_Y", "$(PORT_M)", 3 , 1 , 50 , 50 , 0.1 , 20 , -0.001, 3 , "deg", 0 , 0 }
|
||||
{ "Sample C-Trans X", "$(P_M)", "MOT_CX" , "$(PORT_M)", 4 , 1 , 2 , 2 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Sample C-Trans Z", "$(P_M)", "MOT_CZ" , "$(PORT_M)", 5 , 1 , 2 , 2 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
}
|
||||
29
SAR-EXPMX2.subs
Normal file
29
SAR-EXPMX2.subs
Normal file
@@ -0,0 +1,29 @@
|
||||
################################################################################
|
||||
#P - prefix of the PV
|
||||
#PORT - Name of the ppmac controller port created by powerPmacCreateController
|
||||
#ADDR - Axis index - second parameter of powerPmacCreateAxis and powerPmacCreateVirtualAxis
|
||||
################################################################################
|
||||
|
||||
#Position Units are in um
|
||||
|
||||
#ms to achive speed VELO -> same as Motor[1].JogTa (if positive). Motor[1].JogTa will be set to a caculated negative number
|
||||
# JAR = EGU/s^2 -> JAR = VELO/ACCL (Jog acceleration)
|
||||
|
||||
#caput SAROP21-OAPU092:ASYN.AOUT '&1;#1..2p'
|
||||
#caget SAROP21-OAPU092:ASYN.TINP
|
||||
#caput SAROP21-OAPU092:ASYN.AOUT '&1;cpx abs;X(-900)Y(10)A(5200)B(5100)'
|
||||
|
||||
file asyn.template {{P="$(P_M)2", PORT=$(PORT_M)}}
|
||||
|
||||
file PPMACMotor.template {
|
||||
pattern{ DESC , P , M , PORT , ADDR, DIR, VELO, HVEL, ACCL, JAR, MRES , PREC, EGU , DHLM, DLLM}
|
||||
{ "Wedge 1" , "$(P_M)", "MOT_WEDGE1", "$(PORT_M)", 1 , 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Wedge 2" , "$(P_M)", "MOT_WEDGE2", "$(PORT_M)", 2 , 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Wedge 3" , "$(P_M)", "MOT_WEDGE3", "$(PORT_M)", 3 , 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Wedge 4" , "$(P_M)", "MOT_WEDGE4", "$(PORT_M)", 4 , 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Wedge X" , "$(P_M)", "MOT_WEDGEX", "$(PORT_M)", 9 , 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Wedge Y" , "$(P_M)", "MOT_WEDGEY", "$(PORT_M)", 10 , 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Wedge A" , "$(P_M)", "MOT_WEDGEA", "$(PORT_M)", 11 , 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Wedge B" , "$(P_M)", "MOT_WEDGEB", "$(PORT_M)", 12 , 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm" , 0 , 0 }
|
||||
{ "Backlight", "$(P_M)", "MOT_BLGT" , "$(PORT_M)", 5 , 1 , 40E3, 20E3, 0.1 , 20 , -1 , 0 , "usr", 0 , 0 }
|
||||
}
|
||||
25
SAR-EXPMX3.subs
Normal file
25
SAR-EXPMX3.subs
Normal file
@@ -0,0 +1,25 @@
|
||||
################################################################################
|
||||
#P - prefix of the PV
|
||||
#PORT - Name of the ppmac controller port created by powerPmacCreateController
|
||||
#ADDR - Axis index - second parameter of powerPmacCreateAxis and powerPmacCreateVirtualAxis
|
||||
################################################################################
|
||||
|
||||
#Position Units are in um
|
||||
|
||||
#ms to achive speed VELO -> same as Motor[1].JogTa (if positive). Motor[1].JogTa will be set to a caculated negative number
|
||||
# JAR = EGU/s^2 -> JAR = VELO/ACCL (Jog acceleration)
|
||||
|
||||
#caput SAROP21-OAPU092:ASYN.AOUT '&1;#1..2p'
|
||||
#caget SAROP21-OAPU092:ASYN.TINP
|
||||
#caput SAROP21-OAPU092:ASYN.AOUT '&1;cpx abs;X(-900)Y(10)A(5200)B(5100)'
|
||||
|
||||
file asyn.template {{P="$(P_M)3", PORT=$(PORT_M)}}
|
||||
|
||||
file PPMACMotor.template {
|
||||
pattern{ DESC , P , M , PORT , ADDR, DIR, VELO, HVEL, ACCL, JAR, MRES , PREC, EGU , DHLM, DLLM}
|
||||
{ "Girder 1", "$(P_M)", "MOT_GIRDER1", "$(PORT_M)", 1 , 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm", 0 , 0 }
|
||||
{ "Girder 2", "$(P_M)", "MOT_GIRDER2", "$(PORT_M)", 2 , 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm", 0 , 0 }
|
||||
{ "Girder 3", "$(P_M)", "MOT_GIRDER3", "$(PORT_M)", 3 , 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm", 0 , 0 }
|
||||
{ "Girder 4", "$(P_M)", "MOT_GIRDER4", "$(PORT_M)", 4 , 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm", 0 , 0 }
|
||||
{ "Girder 5", "$(P_M)", "MOT_GIRDER5", "$(PORT_M)", 5 , 0 , .3 , .3 , 0.1 , 20 , -0.001, 3 , "mm", 0 , 0 }
|
||||
}
|
||||
20
add_EXPMX1.cmd
Normal file
20
add_EXPMX1.cmd
Normal file
@@ -0,0 +1,20 @@
|
||||
### Required Parameters ###
|
||||
#PORT='PPMAC1'
|
||||
#P='SARFE10-OAPU090'
|
||||
#powerPmacCreateController(<port_name>, <moving_poll_pseriod [ms]>, <idle_poll_period [ms]>)
|
||||
#powerPmacCreateController("$(PORT)", 100, 100) <<< done in commom module
|
||||
###########################
|
||||
require gpasciiCommander
|
||||
! $(gpasciiCommander_DIR)/gpasciiCommander --path $(ESB_MX_DIR) $(ESB_MX_DIR)/$(P)1.cfg
|
||||
|
||||
powerPmacCreateAxis($(PORT), 1)
|
||||
powerPmacCreateAxis($(PORT), 2)
|
||||
powerPmacCreateAxis($(PORT), 3)
|
||||
powerPmacCreateAxis($(PORT), 4)
|
||||
powerPmacCreateAxis($(PORT), 5)
|
||||
#powerPmacCreateAxis($(PORT), 6)
|
||||
#powerPmacCreateAxis($(PORT), 7)
|
||||
#powerPmacCreateAxis($(PORT), 8)
|
||||
|
||||
# Load databse
|
||||
dbLoadTemplate("$(ESB_MX_TEMPLATES)/$(P)1.subs", "PORT_M=$(PORT),P_M=$(P)")
|
||||
28
add_EXPMX2.cmd
Normal file
28
add_EXPMX2.cmd
Normal file
@@ -0,0 +1,28 @@
|
||||
### Required Parameters ###
|
||||
#PORT='PPMAC1'
|
||||
#P='SARFE10-OAPU090'
|
||||
#powerPmacCreateController(<port_name>, <moving_poll_pseriod [ms]>, <idle_poll_period [ms]>)
|
||||
#powerPmacCreateController("$(PORT)", 100, 100) <<< done in commom module
|
||||
###########################
|
||||
require gpasciiCommander
|
||||
! $(gpasciiCommander_DIR)/gpasciiCommander --path $(ESB_MX_DIR) $(ESB_MX_DIR)/$(P)2.cfg
|
||||
|
||||
powerPmacCreateAxis($(PORT), 1)
|
||||
powerPmacCreateAxis($(PORT), 2)
|
||||
powerPmacCreateAxis($(PORT), 3)
|
||||
powerPmacCreateAxis($(PORT), 4)
|
||||
powerPmacCreateAxis($(PORT), 5)
|
||||
#powerPmacCreateAxis($(PORT), 6)
|
||||
#powerPmacCreateAxis($(PORT), 7)
|
||||
#powerPmacCreateAxis($(PORT), 8)
|
||||
|
||||
#powerPmacCreateVirtualAxis(<port_name>, <axis_index>, <coord_sys_index>, <axis_name>,<commaSeparatedMotorIndices)
|
||||
# !!! COMMENTS AFTER 'powerPmacCreateVirtualAxis("$(PORT)", 9, 1, "X",1)' IS NOT ALLOWED !!!
|
||||
powerPmacCreateVirtualAxis("$(PORT)", 9 , 1, "X",1,2,3,4)
|
||||
powerPmacCreateVirtualAxis("$(PORT)", 10, 1, "Y",1,2,3,4)
|
||||
powerPmacCreateVirtualAxis("$(PORT)", 11, 1, "A",1,2,3,4)
|
||||
powerPmacCreateVirtualAxis("$(PORT)", 12, 1, "B",1,2,3,4)
|
||||
|
||||
|
||||
# Load databse
|
||||
dbLoadTemplate("$(ESB_MX_TEMPLATES)/$(P)2.subs", "PORT_M=$(PORT),P_M=$(P)")
|
||||
42
add_EXPMX3.cmd
Normal file
42
add_EXPMX3.cmd
Normal file
@@ -0,0 +1,42 @@
|
||||
### Required Parameters ###
|
||||
#PORT='PPMAC1'
|
||||
#P='SARFE10-OAPU090'
|
||||
#powerPmacCreateController(<port_name>, <moving_poll_pseriod [ms]>, <idle_poll_period [ms]>)
|
||||
#powerPmacCreateController("$(PORT)", 100, 100) <<< done in commom module
|
||||
###########################
|
||||
require gpasciiCommander
|
||||
! $(gpasciiCommander_DIR)/gpasciiCommander --path $(ESB_MX_DIR) $(ESB_MX_DIR)/$(P)3.cfg
|
||||
|
||||
powerPmacCreateAxis($(PORT), 1)
|
||||
powerPmacCreateAxis($(PORT), 2)
|
||||
powerPmacCreateAxis($(PORT), 3)
|
||||
powerPmacCreateAxis($(PORT), 4)
|
||||
powerPmacCreateAxis($(PORT), 5)
|
||||
#powerPmacCreateAxis($(PORT), 6)
|
||||
#powerPmacCreateAxis($(PORT), 7)
|
||||
#powerPmacCreateAxis($(PORT), 8)
|
||||
|
||||
#powerPmacCreateVirtualAxis(<port_name>, <axis_index>, <coord_sys_index>, <axis_name>,<commaSeparatedMotorIndices)
|
||||
# !!! COMMENTS AFTER 'powerPmacCreateVirtualAxis("$(PORT)", 9, 1, "X",1)' IS NOT ALLOWED !!!
|
||||
#powerPmacCreateVirtualAxis("$(PORT)", 9 , 1, "X",1,2,3,4)
|
||||
#powerPmacCreateVirtualAxis("$(PORT)", 10, 1, "Y",1,2,3,4)
|
||||
#powerPmacCreateVirtualAxis("$(PORT)", 11, 1, "A",1,2,3,4)
|
||||
#powerPmacCreateVirtualAxis("$(PORT)", 12, 1, "B",1,2,3,4)
|
||||
#powerPmacCreateVirtualAxis("$(PORT)", 13, 1, "C",1,2,3,4)
|
||||
|
||||
|
||||
OX=1
|
||||
OY=1
|
||||
OP=1
|
||||
OYW=1
|
||||
OR=1
|
||||
|
||||
# Load databse
|
||||
dbLoadTemplate("$(ESB_MX_TEMPLATES)/$(P)3.subs", "PORT_M=$(PORT),P_M=$(P)")
|
||||
|
||||
require "HEXGIR" zamofing_t
|
||||
|
||||
# Load databse
|
||||
dbLoadTemplate("$(HEXGIR_TEMPLATES)/HEXGIR_motor.subs", "PORT_M=$(PORT),P_M=$(P),M1=1,M2=2,M3=3,M4=4,M5=5,E1=1,E2=2,E3=3,E4=4,E5=5")
|
||||
dbLoadTemplate("$(HEXGIR_TEMPLATES)/HEXGIR_girder.subs", "P_M=$(P)")
|
||||
dbLoadTemplate("$(HEXGIR_TEMPLATES)/HEXGIR_girder.subs", "P_M=$(P), X_OFFSET=$(OX),Y_OFFSET=$(OY),PITCH_OFFSET=$(OP),YAW_OFFSET=$(OYW),ROLL_OFFSET=$(OR)")
|
||||
@@ -1,33 +0,0 @@
|
||||
### Required Parameters ###
|
||||
#PORT='PPMAC1'
|
||||
#P='SARFE10-OAPU...'
|
||||
#M1_ADDR=1
|
||||
#powerPmacCreateController(<port_name>, <moving_poll_pseriod [ms]>, <idle_poll_period [ms]>)
|
||||
#powerPmacCreateController("$(PORT)", 100, 100) <<< done in commom module
|
||||
###########################
|
||||
require gpasciiCommander
|
||||
! $(gpasciiCommander_DIR)/gpasciiCommander --path $(ESB_MX_DIR) $(ESB_MX_DIR)/mx-stage.cfg
|
||||
|
||||
#M1=$(M1_ADDR)
|
||||
M1=1
|
||||
M2=$(M1)+1
|
||||
M3=$(M1)+2
|
||||
M4=$(M1)+3
|
||||
M5=$(M1)+4
|
||||
M6=$(M1)+5
|
||||
M7=$(M1)+6
|
||||
M8=$(M1)+7
|
||||
|
||||
powerPmacCreateAxis($(PORT), $(M1))
|
||||
powerPmacCreateAxis($(PORT), $(M2))
|
||||
powerPmacCreateAxis($(PORT), $(M3))
|
||||
powerPmacCreateAxis($(PORT), $(M4))
|
||||
powerPmacCreateAxis($(PORT), $(M5))
|
||||
powerPmacCreateAxis($(PORT), $(M6))
|
||||
powerPmacCreateAxis($(PORT), $(M7))
|
||||
powerPmacCreateAxis($(PORT), $(M8))
|
||||
|
||||
|
||||
|
||||
# Load databse
|
||||
dbLoadTemplate("$(ESB_MX_TEMPLATES)/ESB_MX.subs", "PORT_M=$(PORT),P_M=$(P),M1=$(M1),M2=$(M2),M3=$(M3),M4=$(M4),M5=$(M5),M6=$(M6),M7=$(M7),M8=$(M8)")
|
||||
9
asyn.template
Normal file
9
asyn.template
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
record(asyn,"$(P):ASYN")
|
||||
{
|
||||
field(DTYP,"asynRecordDevice")
|
||||
field(PORT,"$(PORT)")
|
||||
field(ADDR,"0")
|
||||
field(OMAX,"100")
|
||||
field(IMAX,"100")
|
||||
}
|
||||
@@ -4,9 +4,9 @@
|
||||
//#2-> +1. X + .5Y + 0.01A
|
||||
//#3-> + .5X +1. Y + 0.01A
|
||||
|
||||
#1-> A
|
||||
#1-> Y
|
||||
#2-> X
|
||||
#3-> Y
|
||||
#3-> A
|
||||
|
||||
Coord[1].AltFeedRate=0
|
||||
Coord[1].Tm=1 //1ms time
|
||||
@@ -17,31 +17,12 @@ 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[3].JogTs=0
|
||||
Motor[3].JogTa=-2.5
|
||||
|
||||
|
||||
Motor[1].MaxSpeed=360
|
||||
Motor[1].MaxSpeed=50
|
||||
Motor[2].MaxSpeed=50
|
||||
Motor[3].MaxSpeed=50
|
||||
|
||||
open prog 1
|
||||
//this uses jogspeed
|
||||
rapid abs
|
||||
X(10000) Y(0) A(0)
|
||||
X(0) Y(10000) A(0)
|
||||
X(0) Y(0) A(36000)
|
||||
X(0) Y(0) A(0)
|
||||
close
|
||||
|
||||
open prog 2
|
||||
//this uses Coord[1].Tm and limits with MaxSpeed
|
||||
linear abs
|
||||
X(10000) Y(0) A(0)
|
||||
X(0) Y(10000) A(0)
|
||||
X(0) Y(0) A(0)
|
||||
X(0) Y(0) A(36000)
|
||||
X(0) Y(0) A(0)
|
||||
close
|
||||
Motor[3].MaxSpeed=360
|
||||
78
cfg/MX1_home.cfg
Normal file
78
cfg/MX1_home.cfg
Normal file
@@ -0,0 +1,78 @@
|
||||
define(PLC_Homing='1')
|
||||
define(statusHoming='P100')
|
||||
statusHoming=0
|
||||
|
||||
//statusHoming:
|
||||
// 1: M1 phased
|
||||
// 2: M2 phased
|
||||
// 4: M1 homed
|
||||
// 8: M2 homed
|
||||
// 16: M1 neg limit
|
||||
// 32: M2 neg limit
|
||||
// 64: homing done
|
||||
// 128: 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
|
||||
|
||||
L20=Motor[2].MaxDac
|
||||
Motor[2].MaxDac=500
|
||||
L21=Motor[2].FatalFeLimit
|
||||
Motor[2].FatalFeLimit=2000
|
||||
L22=Motor[2].JogSpeed
|
||||
Motor[2].JogSpeed=1
|
||||
|
||||
|
||||
Motor[1].PhaseFindingStep=1
|
||||
Motor[2].PhaseFindingStep=1
|
||||
timer = Sys.RunTime + 1;while (Sys.RunTime < timer){} //wait 1 sec
|
||||
|
||||
Motor[1].HomeVel=2
|
||||
Motor[2].HomeVel=2
|
||||
|
||||
home1
|
||||
home2
|
||||
timer = Sys.RunTime + 1;while (Sys.RunTime < timer){} //wait 1 sec
|
||||
statusHoming|=1
|
||||
while(1)
|
||||
{
|
||||
if(Motor[1].FeFatal && (statusHoming&2)==0)
|
||||
{
|
||||
statusHoming=statusHoming|2
|
||||
Motor[1].HomeVel=-Motor[1].HomeVel
|
||||
home1
|
||||
}
|
||||
if(Motor[2].HomeInProgress==0 && (statusHoming&4)==0)
|
||||
{
|
||||
statusHoming=statusHoming|4
|
||||
Motor[2].HomeVel=-Motor[2].HomeVel
|
||||
home2
|
||||
}
|
||||
if(Motor[1].HomeInProgress==0 && Motor[1].HomeInProgress==0)
|
||||
{
|
||||
statusHoming=statusHoming|8
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Motor[1].PhasePos=560 // 555 581 593 558
|
||||
Motor[2].PhasePos=1540 //1549 1531 1543 1537
|
||||
|
||||
|
||||
Motor[1].MaxDac=L10
|
||||
Motor[1].FatalFeLimit=L11
|
||||
Motor[1].JogSpeed=L12
|
||||
Motor[2].MaxDac=L20
|
||||
Motor[2].FatalFeLimit=L21
|
||||
Motor[2].JogSpeed=L22
|
||||
|
||||
disable plc PLC_Homing
|
||||
close
|
||||
@@ -17,31 +17,52 @@
|
||||
// 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: Rotation stage LS Mecapion MDM-DC06DNC0H 32 poles = 1 rev = 16*2048=32768 phase_step
|
||||
//Enc 1: Rotation stage LS Mecapion 1 rev = 1048576 enc_steps
|
||||
//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 Y Parker MX80L D11 25mm one pole cycle = 13mm = 2048 phase_step
|
||||
//Enc 2: 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)
|
||||
|
||||
//Mot 3: Stage X Parker MX80L D11 25mm one pole cycle = 13mm = 2048 phase_step
|
||||
//Enc 3: Stage X Parker MX80L D11 inc_enc 20nm one pole cycle = 13mm = 650000 enc_step (20nm/enc_step)
|
||||
//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
|
||||
|
||||
//Mot/Enc 4: camera base plate X
|
||||
// OBSOLETE: Enc 4: Interferometer 1
|
||||
//Mot 4: Stage X Stada Stepper 670mA 200 poles 1 rev = 100*2048 phase_step (2 stepper motor)
|
||||
//Enc 4: Renishaw absolute BiSS
|
||||
|
||||
//Mot/Enc 5: camera base plate Y
|
||||
// OBSOLETE Enc 5: Interferometer 2
|
||||
//Mot 5: Stage Y Stada Stepper 670mA 200 poles 1 rev = 100*2048 phase_step (2 stepper motor)
|
||||
//Enc 5: Renishaw absolute BiSS
|
||||
|
||||
//Mot 6: Backlight 2.3A
|
||||
//Enc 6: Interferometer Y
|
||||
|
||||
//Mot 7: Stada Stepper: 670mA 200 poles 1 rev = 100*2048 phase_step (2 stepper motor)
|
||||
//Enc 7: Renishaw absolute BiSS
|
||||
//Enc 7: Interferometer X
|
||||
|
||||
//Mot 8: Stada Stepper: 670mA 200 poles 1 rev = 100*2048 phase_step (2 stepper motor)
|
||||
//Enc 8: Renishaw absolute BiSS
|
||||
//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=20,Kvfb=1000,Ki=0.07,Kvff=1000,Kaff=4000,MaxInt=1000)
|
||||
//!motor_servo(mot=1,ctrl='ServoCtrl',Kp=20,Kvfb=220,Ki=0.02,Kvff=240,Kaff=1500,MaxInt=1000)
|
||||
!motor_servo(mot=1,ctrl='ServoCtrl',Kp=25,Kvfb=400,Ki=0.02,Kvff=350,Kaff=5000,MaxInt=1000)
|
||||
!motor(mot=1,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=10.,numPhase=3,invDir=True,servo=None,PhasePosSf=1./81250,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=200,WarnFeLimit=100,InPosBand=2,homing='enc-index')
|
||||
|
||||
|
||||
//Stage X Parker MX80L (top stage, mounted on Y stage)
|
||||
//----------------------------------------------------
|
||||
//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)
|
||||
|
||||
!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=20,Kvfb=220,Ki=0.02,Kvff=240,Kaff=1500,MaxInt=1000)
|
||||
//PhaseFreq=20000,PhasePerServo=1 -> Kvfb=220*4 Ki/=4,Kvff*=4,Kaff*=4*4
|
||||
!motor(mot=2,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=10.,numPhase=3,invDir=True,servo=None,PhasePosSf=1./81250,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=200,WarnFeLimit=100,InPosBand=2,homing='enc-index')
|
||||
|
||||
|
||||
//rot stage
|
||||
@@ -53,92 +74,33 @@
|
||||
// -> 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
|
||||
|
||||
!encoder_sim(enc=1,tbl=9,mot=9,posSf=360000./32768)
|
||||
!encoder_biss(enc=1,tbl=1,mot=1,numBits=20,posSf=360000./1048576)
|
||||
Motor[1].pPhaseEnc=Acc84B[0].Chan[0].SerialEncDataA.a
|
||||
//Motor[1].pAbsPhasePos=Acc84B[0].Chan[0].SerialEncDataA.a
|
||||
|
||||
!motor_servo(mot=1,ctrl='ServoCtrl',Kp=0.8,Kvfb=20,Ki=0.001,Kvff=40,Kaff=0,MaxInt=1000)
|
||||
!motor(mot=1,dirCur=0,contCur=1000,peakCur=2000,timeAtPeak=1,IiGain=1.5,IpfGain=0,IpbGain=3,JogSpeed=180.,numPhase=3,invDir=True,servo=None,PhasePosSf=1./8192,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=3000,WarnFeLimit=1000,InPosBand=10, HomeOffset=228987)
|
||||
|
||||
|
||||
//Stage Y Parker MX80L
|
||||
//--------------------
|
||||
//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)
|
||||
//use um as motor unit
|
||||
!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=20,Kvfb=1000,Ki=0.07,Kvff=1000,Kaff=4000,MaxInt=1000)
|
||||
//!motor_servo(mot=2,ctrl='ServoCtrl',Kp=20,Kvfb=220,Ki=0.02,Kvff=240,Kaff=1500,MaxInt=1000)
|
||||
!motor_servo(mot=2,ctrl='ServoCtrl',Kp=25,Kvfb=400,Ki=0.02,Kvff=350,Kaff=5000,MaxInt=1000)
|
||||
!motor(mot=2,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=10.,numPhase=3,invDir=True,servo=None,PhasePosSf=1./81250,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=200,WarnFeLimit=100,InPosBand=2,homing='enc-index')
|
||||
|
||||
|
||||
//Stage X Parker MX80L (top stage, mounted on Y stage)
|
||||
//----------------------------------------------------
|
||||
//Motor[3].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)
|
||||
|
||||
!encoder_sim(enc=3,tbl=11,mot=11,posSf=13000./2048)
|
||||
!encoder_inc(enc=3,tbl=3,mot=3,posSf=13000./650000)
|
||||
!motor_servo(mot=3,ctrl='ServoCtrl',Kp=20,Kvfb=220,Ki=0.02,Kvff=240,Kaff=1500,MaxInt=1000)
|
||||
//PhaseFreq=20000,PhasePerServo=1 -> Kvfb=220*4 Ki/=4,Kvff*=4,Kaff*=4*4
|
||||
!motor(mot=3,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=10.,numPhase=3,invDir=True,servo=None,PhasePosSf=1./81250,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=200,WarnFeLimit=100,InPosBand=2,homing='enc-index')
|
||||
|
||||
//Interferometer 1,2
|
||||
//------------------
|
||||
//!encoder_inc(enc=4,tbl=4,mot=4)# ,posSf=13000./650000)
|
||||
//!encoder_inc(enc=5,tbl=5,mot=5)# ,posSf=13000./650000)
|
||||
|
||||
//camera base plate X,Y
|
||||
//---------------------
|
||||
|
||||
//102400000 ustep 200000 encCnt = 10mm = 10000um
|
||||
//posSf = userUnits/encoder_steps = 10000/200000 =1./20
|
||||
//servoSf=motor_u_steps/userUnits = 102400000/10000 = 10240./1
|
||||
!encoder_inc(enc=4,posSf=1./20)
|
||||
!motor(mot=4,dirCur=250,JogSpeed=.3,invDir=0,servoSf=10240.,InPosBand=1,HomeOffset=0)
|
||||
Motor[4].Pos2Sf=0 // Pos2Sf set to 0 to avoid programming leak values
|
||||
|
||||
//-51200000 ustep = -200000 encCnt == 10mm =10000 um
|
||||
//posSf = userUnits/encoder_steps = 10000/-200000 =1/-20.
|
||||
//servoSf=motor_u_steps/userUnits = -51200000/10000 = -5120./1
|
||||
!encoder_inc(enc=5,posSf=1./20)
|
||||
!motor(mot=5,dirCur=250,JogSpeed=.3,invDir=0,servoSf=5120.,InPosBand=1,HomeOffset=0)
|
||||
Motor[5].Pos2Sf=0 // Pos2Sf set to 0 to avoid programming leak values
|
||||
|
||||
|
||||
//Backlight
|
||||
//---------
|
||||
//#6j=0 //down
|
||||
//#6j=-31000 //up
|
||||
!encoder_sim(enc=6)
|
||||
!motor(mot=6,dirCur=1800,JogSpeed=40,invDir=False)
|
||||
!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[0].SerialEncDataA.a
|
||||
!motor_servo(mot=3,ctrl='ServoCtrl',Kp=0.8,Kvfb=20,Ki=0.001,Kvff=40,Kaff=0,MaxInt=1000)
|
||||
!motor(mot=3,dirCur=0,contCur=1000,peakCur=2000,timeAtPeak=1,IiGain=1.5,IpfGain=0,IpbGain=3,JogSpeed=180.,numPhase=3,invDir=True,servo=None,PhasePosSf=1./8192,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=3000,WarnFeLimit=1000,InPosBand=10, HomeOffset=228987)
|
||||
|
||||
|
||||
//Stada stage
|
||||
//----------------------------------------------------
|
||||
//-----------
|
||||
//512000 ustep == 50000 encCnt == 2500um
|
||||
//posSf = userUnits/encoder_steps
|
||||
//servoSf=motor_u_steps/userUnits
|
||||
|
||||
!encoder_biss(enc=7,numBits=32,posSf=1./20)
|
||||
!encoder_biss(enc=8,numBits=32,posSf=1./20)
|
||||
!motor(mot=7,current=200,JogSpeed=0.5,invDir=1,servoSf=204.8,InPosBand=1,HomeOffset=39278)
|
||||
!motor(mot=8,current=200,JogSpeed=0.5,invDir=1,servoSf=204.8,InPosBand=1,HomeOffset=39736)
|
||||
!encoder_biss(enc=4,numBits=32,posSf=1./20)
|
||||
!encoder_biss(enc=5,numBits=32,posSf=1./20)
|
||||
!motor(mot=4,current=200,JogSpeed=0.5,invDir=1,servoSf=204.8,InPosBand=1,HomeOffset=39278)
|
||||
!motor(mot=5,current=200,JogSpeed=0.5,invDir=1,servoSf=204.8,InPosBand=1,HomeOffset=39736)
|
||||
|
||||
//turn off servon and inpos below ... user units (here 1um)
|
||||
//Motor[7].InPosBand=1;Motor[7].Servo.BreakPosErr=Motor[7].InPosBand
|
||||
//Motor[8].InPosBand=1;Motor[8].Servo.BreakPosErr=Motor[8].InPosBand
|
||||
|
||||
#1,7,8hmz
|
||||
//Interferometer 1,2
|
||||
//------------------
|
||||
!encoder_inc(enc=6,tbl=6,mot=6)# ,posSf=13000./650000)
|
||||
!encoder_inc(enc=7,tbl=7,mot=7)# ,posSf=13000./650000)
|
||||
|
||||
#3,4,5hmz
|
||||
|
||||
//holding current
|
||||
!holding_current(m4=[0,240],m5=[0,240],m6=[1400,1800],m7=[0,200],m8=[0,200])
|
||||
!holding_current(m4=[0,240],m5=[0,240])
|
||||
|
||||
|
||||
27
cfg/MX2_coordTrf.cfg
Normal file
27
cfg/MX2_coordTrf.cfg
Normal file
@@ -0,0 +1,27 @@
|
||||
// ---------- 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
|
||||
|
||||
|
||||
|
||||
70
cfg/MX2_home.cfg
Normal file
70
cfg/MX2_home.cfg
Normal file
@@ -0,0 +1,70 @@
|
||||
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
|
||||
//motID :P0 : Motor Number
|
||||
//direction :P1 : Motion direction to first limit switch: -1 -> #1j- ,+1 -> #1j+
|
||||
//status :P100: local status
|
||||
//timer :P101: local timer
|
||||
|
||||
open plc PLC_Homing
|
||||
define(motID='L0',direction='P1',status='P100',timer='P101')
|
||||
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=10
|
||||
while(1)
|
||||
{
|
||||
if((Motor[1].MinusLimit==1 || Motor[1].FeFatal==1)){
|
||||
if((Motor[2].MinusLimit==1 || Motor[2].FeFatal==1)){
|
||||
if((Motor[3].MinusLimit==1 || Motor[3].FeFatal==1)){
|
||||
if((Motor[4].MinusLimit==1 || Motor[4].FeFatal==1)){
|
||||
status=11
|
||||
break
|
||||
}}}}
|
||||
}
|
||||
timer = Sys.RunTime + 2
|
||||
status=100
|
||||
while (Sys.RunTime < timer){} //wait 2 sec
|
||||
status=101
|
||||
jog1:1000; jog2:1000; jog3:1000; jog4:1000;
|
||||
timer = Sys.RunTime + 2
|
||||
status=200
|
||||
while (Sys.RunTime < timer){} //wait 2 sec
|
||||
status=201
|
||||
while(1)
|
||||
{
|
||||
if(Motor[1].DesVelZero==1 && Motor[2].DesVelZero==1 && Motor[3].DesVelZero==1 && Motor[4].DesVelZero==1)
|
||||
{
|
||||
status=12
|
||||
break
|
||||
}
|
||||
}
|
||||
timer = Sys.RunTime + 2
|
||||
while (Sys.RunTime < timer){}
|
||||
home 1; home 2; home 3; home 4
|
||||
status=13
|
||||
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=14
|
||||
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=15
|
||||
break
|
||||
}
|
||||
}
|
||||
disable plc PLC_Homing
|
||||
close
|
||||
25
cfg/MX2_setup.cfg
Normal file
25
cfg/MX2_setup.cfg
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
//Wedge Movers
|
||||
--------------
|
||||
!encoder_inc(enc=1,posSf=1./20)
|
||||
!motor(mot=1,current=120,JogSpeed=1,HomeVel=.5,servoSf=12.28878*20,homing='enc-index',invDir=True,HomeOffset=2855,InPosBand=1)
|
||||
|
||||
!encoder_inc(enc=2,posSf=1./20)
|
||||
!motor(mot=2,current=120,JogSpeed=1,HomeVel=.5,servoSf=12.28878*20,homing='enc-index',invDir=True,HomeOffset=2844,InPosBand=1)
|
||||
|
||||
!encoder_inc(enc=3,posSf=1./20)
|
||||
!motor(mot=3,current=120,JogSpeed=1,HomeVel=.5,servoSf=12.28878*20,homing='enc-index',invDir=True,HomeOffset=204,InPosBand=1)
|
||||
|
||||
!encoder_inc(enc=4,posSf=1./20)
|
||||
!motor(mot=4,current=120,JogSpeed=1,HomeVel=.5,servoSf=12.28878*20,homing='enc-index',invDir=True,HomeOffset=2094,InPosBand=1)
|
||||
|
||||
|
||||
//Backlight
|
||||
//---------
|
||||
//#5j=0 //down #5j=-31000 //up
|
||||
!encoder_sim(enc=5)
|
||||
!motor(mot=5,dirCur=1800,JogSpeed=40,invDir=False)
|
||||
|
||||
|
||||
!holding_current(m5=[1400,1800])
|
||||
22
cfg/MX3_setup.cfg
Normal file
22
cfg/MX3_setup.cfg
Normal file
@@ -0,0 +1,22 @@
|
||||
//5 simulated cam movers
|
||||
|
||||
|
||||
!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
|
||||
@@ -5,6 +5,6 @@
|
||||
//!common(PhaseFreq=20000,PhasePerServo=1)
|
||||
//!common(PhaseFreq=40000)
|
||||
|
||||
!torqueCtrl()
|
||||
!init()
|
||||
!coordTrf()
|
||||
!MX1_setup()
|
||||
!MX1_home()
|
||||
!MX1_coordTrf()
|
||||
4
cfg/SAR-EXPMX2.cfg
Normal file
4
cfg/SAR-EXPMX2.cfg
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
!MX2_setup()
|
||||
!MX2_home()
|
||||
!MX2_coordTrf()
|
||||
4
cfg/SAR-EXPMX3.cfg
Normal file
4
cfg/SAR-EXPMX3.cfg
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
!MX3_setup()
|
||||
//!MX3_home()
|
||||
//!MX3_coordTrf()
|
||||
72
cfg/init.cfg
72
cfg/init.cfg
@@ -1,72 +0,0 @@
|
||||
define(PLC_Homing='1')
|
||||
|
||||
open subprog 12
|
||||
enable plc PLC_Homing
|
||||
close
|
||||
|
||||
open plc PLC_Homing
|
||||
define(status='P100',timer='P101')
|
||||
|
||||
L20=Motor[2].MaxDac
|
||||
Motor[2].MaxDac=500
|
||||
L21=Motor[2].FatalFeLimit
|
||||
Motor[2].FatalFeLimit=2000
|
||||
L22=Motor[2].JogSpeed
|
||||
Motor[2].JogSpeed=1
|
||||
|
||||
L30=Motor[3].MaxDac
|
||||
Motor[3].MaxDac=500
|
||||
L31=Motor[3].FatalFeLimit
|
||||
Motor[3].FatalFeLimit=2000
|
||||
L32=Motor[3].JogSpeed
|
||||
Motor[3].JogSpeed=1
|
||||
|
||||
|
||||
Motor[2].PhaseFindingStep=1
|
||||
Motor[3].PhaseFindingStep=1
|
||||
timer = Sys.RunTime + 1;while (Sys.RunTime < timer){} //wait 1 sec
|
||||
|
||||
Motor[2].HomeVel=2
|
||||
Motor[3].HomeVel=2
|
||||
|
||||
P200=Motor[2].HomeInProgress
|
||||
home2
|
||||
home3
|
||||
timer = Sys.RunTime + 1;while (Sys.RunTime < timer){} //wait 1 sec
|
||||
P201=Motor[2].HomeInProgress
|
||||
|
||||
status=1
|
||||
while(1)
|
||||
{
|
||||
if(Motor[2].FeFatal && (status&2)==0)
|
||||
{
|
||||
status=status|2
|
||||
Motor[2].HomeVel=-Motor[2].HomeVel
|
||||
home2
|
||||
}
|
||||
if(Motor[3].HomeInProgress==0 && (status&4)==0)
|
||||
{
|
||||
status=status|4
|
||||
Motor[3].HomeVel=-Motor[3].HomeVel
|
||||
home3
|
||||
}
|
||||
if(Motor[2].HomeInProgress==0 && Motor[3].HomeInProgress==0)
|
||||
{
|
||||
status=status|8
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Motor[2].PhasePos=560 // 555 581 593 558
|
||||
Motor[3].PhasePos=1540 //1549 1531 1543 1537
|
||||
|
||||
|
||||
Motor[2].MaxDac=L20
|
||||
Motor[2].FatalFeLimit=L21
|
||||
Motor[2].JogSpeed=L22
|
||||
Motor[3].MaxDac=L30
|
||||
Motor[3].FatalFeLimit=L31
|
||||
Motor[3].JogSpeed=L32
|
||||
|
||||
disable plc PLC_Homing
|
||||
close
|
||||
124
qt/ESB_MX_exp.ui
124
qt/ESB_MX_exp.ui
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>776</width>
|
||||
<height>342</height>
|
||||
<height>643</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -49,25 +49,36 @@
|
||||
<x>20</x>
|
||||
<y>70</y>
|
||||
<width>725</width>
|
||||
<height>192</height>
|
||||
<height>456</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="macro">
|
||||
<string>
|
||||
P=$(P),M=MOTOR_CX;
|
||||
P=$(P),M=MOTOR_CZ;
|
||||
P=$(P),M=MOTOR_ROT_Y;
|
||||
P=$(P),M=MOTOR_FX;
|
||||
P=$(P),M=MOTOR_FY;
|
||||
P=$(P),M=MOTOR_CAMX;
|
||||
P=$(P),M=MOTOR_CAMY;
|
||||
P=$(P),M=MOTOR_BLGT</string>
|
||||
P=$(P),M=MOT_FY;
|
||||
P=$(P),M=MOT_FX;
|
||||
P=$(P),M=MOT_ROT_Y;
|
||||
P=$(P),M=MOT_CX;
|
||||
P=$(P),M=MOT_CZ;
|
||||
P=$(P),M=MOT_WEDGE1;
|
||||
P=$(P),M=MOT_WEDGE2;
|
||||
P=$(P),M=MOT_WEDGE3;
|
||||
P=$(P),M=MOT_WEDGE4;
|
||||
P=$(P),M=MOT_WEDGEX;
|
||||
P=$(P),M=MOT_WEDGEY;
|
||||
P=$(P),M=MOT_WEDGEA;
|
||||
P=$(P),M=MOT_WEDGEB;
|
||||
P=$(P),M=MOT_BLGT;
|
||||
P=$(P),M=MOT_GIRDER1;
|
||||
P=$(P),M=MOT_GIRDER2;
|
||||
P=$(P),M=MOT_GIRDER3;
|
||||
P=$(P),M=MOT_GIRDER4;
|
||||
P=$(P),M=MOT_GIRDER5</string>
|
||||
</property>
|
||||
<property name="filename" stdset="0">
|
||||
<string notr="true">ESB_MX_motor.ui</string>
|
||||
</property>
|
||||
<property name="numberOfItems" stdset="0">
|
||||
<number>8</number>
|
||||
<number>19</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
@@ -202,17 +213,20 @@ P=$(P),M=MOTOR_BLGT</string>
|
||||
<widget class="caMessageButton" name="camessagebutton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>620</x>
|
||||
<y>20</y>
|
||||
<width>100</width>
|
||||
<x>50</x>
|
||||
<y>570</y>
|
||||
<width>121</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Homing</string>
|
||||
<string>Homing wedge stage</string>
|
||||
</property>
|
||||
<property name="channel" stdset="0">
|
||||
<string notr="true">$(P):ASYN.AOUT</string>
|
||||
<string notr="true">$(P)2:ASYN.AOUT</string>
|
||||
</property>
|
||||
<property name="label">
|
||||
<string notr="true">Homing wedge stage</string>
|
||||
</property>
|
||||
<property name="pressMessage">
|
||||
<string notr="true">enable plc 1</string>
|
||||
@@ -221,8 +235,8 @@ P=$(P),M=MOTOR_BLGT</string>
|
||||
<widget class="caRelatedDisplay" name="carelateddisplay">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>620</x>
|
||||
<y>300</y>
|
||||
<x>190</x>
|
||||
<y>570</y>
|
||||
<width>121</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
@@ -250,8 +264,8 @@ P=$(P),M=MOTOR_BLGT</string>
|
||||
<widget class="caToggleButton" name="catogglebutton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>460</x>
|
||||
<y>300</y>
|
||||
<x>200</x>
|
||||
<y>540</y>
|
||||
<width>100</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@@ -260,7 +274,7 @@ P=$(P),M=MOTOR_BLGT</string>
|
||||
<string>Backlight</string>
|
||||
</property>
|
||||
<property name="channel" stdset="0">
|
||||
<string notr="true">$(P):MOTOR_BLGT</string>
|
||||
<string notr="true">$(P):MOT_BLGT</string>
|
||||
</property>
|
||||
<property name="trueValue">
|
||||
<string>28000</string>
|
||||
@@ -272,8 +286,8 @@ P=$(P),M=MOTOR_BLGT</string>
|
||||
<widget class="caMessageButton" name="camessagebutton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>300</y>
|
||||
<x>60</x>
|
||||
<y>600</y>
|
||||
<width>100</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@@ -288,6 +302,70 @@ P=$(P),M=MOTOR_BLGT</string>
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="caMessageButton" name="camessagebutton_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>540</y>
|
||||
<width>121</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Homing fast stage</string>
|
||||
</property>
|
||||
<property name="channel" stdset="0">
|
||||
<string notr="true">$(P)1:ASYN.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_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>600</y>
|
||||
<width>151</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="label">
|
||||
<string notr="true">-ESB_MX Girder</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>HEXGIR</string>
|
||||
</property>
|
||||
<property name="files">
|
||||
<string>S_CS_HEXGIR_5Dbasic.ui</string>
|
||||
</property>
|
||||
<property name="args">
|
||||
<string>NAME=$(P), NAME1=$(P)</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>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
||||
Reference in New Issue
Block a user