enhance syncronization -> parameters in setup_sync
-> sp.setup_sync(verbose=args.verbose&0x40,timeOfs=0.03,timeCor=0.0005) - cleanup code - add motion markers - add debug data - rework triggerSync - BUT nothing should change in Sync
This commit is contained in:
190
Readme.md
190
Readme.md
@@ -1274,4 +1274,194 @@ Make z to move over the grid.
|
||||
|
||||
|
||||
?? what are the PV for the camera, zoom etc ???
|
||||
```
|
||||
|
||||
|
||||
30.9.22 Debug Synchronization
|
||||
=============================
|
||||
|
||||
https://docs.google.com/document/d/1soSuCZYyfGf_ntcgG_Y1_WeGuo_687OuFn0s4sMj1uY/edit
|
||||
|
||||
|
||||
remote ssh tunnel + start gather_server
|
||||
---------------------------------------
|
||||
```
|
||||
PPMAC=SAR-CPPM-EXPMX1
|
||||
rsync -va ~/Documents/prj/SwissFEL/PBTools/pbtools/gather/gather_server root@$PPMAC:/tmp/
|
||||
lsof -i -n | grep '127.0.0.1:1000'
|
||||
ssh -L 10001:localhost:22 root@$PPMAC 'uname -a'
|
||||
ssh -L 10002:localhost:2332 root@$PPMAC 'uname -a'
|
||||
ssh root@$PPMAC
|
||||
LD_LIBRARY_PATH=/opt/ppmac/libppmac/ /tmp/gather_server
|
||||
```
|
||||
|
||||
cleanup /tmp/
|
||||
-------------
|
||||
```
|
||||
PPMAC=SAR-CPPM-EXPMX1
|
||||
ssh root@$PPMAC rm /tmp/gather_server /tmp/triggerSync
|
||||
ssh root@$PPMAC ls -l /tmp
|
||||
```
|
||||
|
||||
start debug tools
|
||||
-----------------
|
||||
```
|
||||
PPMAC=SAR-CPPM-EXPMX1
|
||||
PBInspect --host=$PPMAC&
|
||||
gpasciiCommander --host $PPMAC -i
|
||||
ssh root@$PPMAC
|
||||
ssh root@$PPMAC rm /tmp/gather_server /tmp/triggerSync
|
||||
ssh root@$PPMAC ls -l /tmp
|
||||
```
|
||||
|
||||
restart IOC
|
||||
-----------
|
||||
```
|
||||
ssh saresc-cons-03
|
||||
PPMAC=SAR-CPPM-EXPMX1
|
||||
telnet $PPMAC 50001
|
||||
Ctrl-X
|
||||
dbgf SAR-CPPM-EXPMX1:MOD_VER
|
||||
|
||||
caget SAR-CPPM-EXPMX1:MOD_VER
|
||||
|
||||
```
|
||||
|
||||
checking versions
|
||||
-----------------
|
||||
```
|
||||
git: 7a968aac967
|
||||
asyn 427.0.2
|
||||
motorBase alpha_220518
|
||||
asynMotor alpha_220518
|
||||
powerPmac alpha_220518
|
||||
PB_COMMON 2.0.1
|
||||
gpasciiCommander 0.9.0
|
||||
ESB_MX 0.0.2
|
||||
```
|
||||
|
||||
zamofing_t@ganymede:~/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX$
|
||||
git loggraph -10
|
||||
* 7a968aa 2022-09-20 (HEAD -> master, tag: latest, tag: 0.0.2, psigithub/master) change speeds and directions [Thierry Zamofing]
|
||||
* 00588f8 2022-09-16 minor changes [Thierry Zamofing]
|
||||
* d52a6ce 2022-08-30 minor changes [Thierry Zamofing]
|
||||
* f47e111 2022-05-20 (tag: 0.0.1) add DET_Z motor [Thierry Zamofing]
|
||||
* 8e5b15e 2022-05-20 wip [Thierry Zamofing]
|
||||
* 399282c 2019-03-20 enhance triggering [Thierry Zamofing]
|
||||
* eda8caf 2019-03-19 wip [Thierry Zamofing]
|
||||
* 0c45705 2019-03-08 optimize [Thierry Zamofing]
|
||||
* c962ebd 2019-03-06 documentation [Thierry Zamofing]
|
||||
|
||||
git reset --hard 7a968aa
|
||||
rmake -e LIBVERSION=42.42.42 uninstall install
|
||||
-> restart IOC
|
||||
|
||||
ssh root@$PPMAC rm /tmp/triggerSync
|
||||
cd python
|
||||
git dt latest -- shapepath.py
|
||||
./shapepath.py --host=localhost:10001:10002
|
||||
|
||||
removing test verion
|
||||
ssh sf-lc7 ls -l /ioc/modules/ESB_MX/
|
||||
ssh sf-lc7 rm -rf /ioc/modules/ESB_MX/42.42.42
|
||||
|
||||
|
||||
IOC locations
|
||||
-------------
|
||||
```
|
||||
~/Documents/prj/SwissFEL/epics_ioc_boot_sf/ESC_all/ESB_MX_PowerBrick
|
||||
They are just using the new alphy driver. That should have no impact on the motion config.
|
||||
```
|
||||
|
||||
|
||||
Current (old) Synchronization
|
||||
-----------------------------
|
||||
```
|
||||
default:
|
||||
/ESB_MX/src/triggerSync/triggerSync.c -> read usage
|
||||
simulate start trigger -> pshm->Coord[1].Q[10]=1 to simulate a Jungfrau aquire start\n\
|
||||
simulate frame trigger -> pshm->Coord[1].Q[11]
|
||||
Coord[1].Q[0] is incremented at each trigger
|
||||
|
||||
Coord[1].DesTimeBase is adjusted at each frame trigger
|
||||
|
||||
Coord[1].pDesTimeBase=Coord[1].DesTimeBase.a
|
||||
|
||||
|
||||
gpascii: set Gather.Enable=1
|
||||
PMAC: LD_LIBRARY_PATH=/opt/ppmac/libppmac/ /tmp/triggerSync 10 0 11 -> wait for start trigger
|
||||
gpascii: set Start trigger: pshm->Coord[1].Q[10]=1 or set EVR that generates the trigger
|
||||
PMAC: start Gather (Gather.Enable=2)
|
||||
count and sync frames:
|
||||
Coord[1].Q[0] = frame counter
|
||||
gpascii: stop Gather -> Gather.Enable=0
|
||||
PMAC: triggerSync stops when Gather.Enable=0
|
||||
|
||||
|
||||
```
|
||||
|
||||
Enhanced Synchronization
|
||||
------------------------
|
||||
```
|
||||
(to be tested)
|
||||
Coord[1].pDesTimeBase=Coord[1].DesTimeBase.a
|
||||
For “external time base”, in which the coordinate system’s time base value is proportional to the
|
||||
frequency of an incoming encoder signal or pulse train, Coord[x].pDesTimeBase should be set
|
||||
to EncTable[i].DeltaPos.a
|
||||
|
||||
Setup EncTable:
|
||||
EncTable[n].type = (3)Software 1/T encoder extension (5)Four-byte read 32 bit int (11) Float 32f or 64f
|
||||
|
||||
The ERV are mapped to
|
||||
//Power PMAC Software Reference Manual.pdf Gate3[i].Chan[j].Status -> page 919 UserFlag
|
||||
(gate3_1->Chan[0].Status&0x800) = Gate3[1].Chan[0].UserFlag Trigger start
|
||||
(gate3_1->Chan[1].Status&0x800) = Gate3[1].Chan[1].UserFlag Trigger frame
|
||||
|
||||
|
||||
Use EncTable 20 as Frame counter
|
||||
Gate3[1].Chan[1].EncCtrl = $encctrl
|
||||
EncTable[20].type = 3
|
||||
EncTable[20].pEnc = Gate3[1].Chan[1].UserFlag.a (is same as Gate3[1].Chan[1].Status) thus it will not work
|
||||
EncTable[20].pEnc1 = Gate3[1].Chan[0].TimerA.a
|
||||
EncTable[20].index1 = 0
|
||||
EncTable[20].index2 = 0
|
||||
EncTable[20].index3 = 0
|
||||
EncTable[20].index4 = 0
|
||||
EncTable[20].index5 = 0
|
||||
EncTable[20].ScaleFactor = 1/256
|
||||
-> THIS DOES NOT WORK WITH CURRENT CONNECTIONS !
|
||||
-> ONE PHYSICAL ENCODER WOULD NEED PULSE AND DIRECTION INPUT AND SET Gate3[1].Chan[1].EncCtrl TO 'pulse and direction' mode
|
||||
|
||||
|
||||
> Sys.Ddata[0]=Sys.Ddata[0]+10
|
||||
|
||||
Use EncTable 20 as Frame counter
|
||||
Gate3[1].Chan[1].EncCtrl = $encctrl
|
||||
EncTable[20].type = 11 //loating point read
|
||||
EncTable[20].pEnc = Sys.Ddata[0].a
|
||||
EncTable[20].pEnc1 = Gate3[1].Chan[0].TimerA.a
|
||||
EncTable[20].index1 = 0
|
||||
EncTable[20].index2 = 0
|
||||
EncTable[20].index3 = 0
|
||||
EncTable[20].index4 = 0
|
||||
EncTable[20].index5 = 99 //multiply with 100
|
||||
EncTable[20].index5 = 1 //float64
|
||||
EncTable[20].ScaleFactor = 1/256
|
||||
EncTable[20].ScaleFactor=1E-3
|
||||
|
||||
|
||||
Use EncTable 20 as Frame counter
|
||||
EncTable[20].type = 1 //32 Bit uint
|
||||
EncTable[20].pEnc = Sys.Udata[0].a
|
||||
EncTable[20].index1 = 0
|
||||
EncTable[20].index2 = 0
|
||||
EncTable[20].index3 = 0
|
||||
EncTable[20].index4 = 0
|
||||
EncTable[20].index5 = 0
|
||||
EncTable[20].index5 = 0
|
||||
EncTable[20].ScaleFactor=1E-3
|
||||
|
||||
|
||||
2.1 trigger zu spät
|
||||
1.9 trigger zu früh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user