documentation triggerSync with mermaid

This commit is contained in:
2024-10-31 15:57:26 +01:00
parent cf4a9362f2
commit 4b38db8405
4 changed files with 429 additions and 46 deletions

View File

@@ -1,5 +1,8 @@
triggerSync
===========
```
samples: root@:/opt/ppmac#
/tmp/triggerSync 40 11 trigger all 40 ms, simulated start, use real frame triggers, verbose
@@ -8,37 +11,27 @@ samples: root@:/opt/ppmac#
/tmp/triggerSync 40 7 trigger all 40 ms, simulated start and frame triggers, with sync, minimal verbose
For real triggers, deltatau is using flags from the EVR-card:
//Simulated triggers uses Q variables
#define SIMFLAG0 (pshm->Coord[1].Q[10])
#define SIMFLAG1 (pshm->Coord[1].Q[11])
//Power PMAC Software Reference Manual.pdf Gate3[i].Chan[j].Status -> page 919 UserFlag
//real triggers, uses inputsfrom the EVR-card
// s.a. Power PMAC Software Reference Manual.pdf Gate3[i].Chan[j].Status -> page 919 UserFlag
#define FLAG0 (gate3_1->Chan[0].Status&0x800)
#define FLAG1 (gate3_1->Chan[1].Status&0x800)
work of triggerSync program:
- wait for [SIM]FLAG0 (arm trigger)
- once armed, each [SIM]FLAG1 trigger is a frame trigger.
SIMFLAG[0|1] are vairables Coord[1].Q[10] and Coord[1].Q[11]
the EVR flags are set in;
caqtdm -attach -macro SYS=SAR-EXPMX,DEVICE=EVR0,FF=PCIe G_EVR_main.ui
FLAG0 == Gate3[1].Chan[0].UserFlag == FrontUnivOut4 -> Pulser0 -> (active Low, 5000us delay 0us) Map: 214
FLAG1 == Gate3[1].Chan[1].UserFlag == FrontUnivOut5 -> Pulser1 -> (active Low, 5000us delay 750us) Map: 40
Pulser 0: event 214 is 'ESC multipurpose event. In this case used as: start motion'
Pulser 1: maps event 40 = 'ESA_detector 100 Hz' >>> should be 77='ESC detector'
event 214 is set with the CTA. For tests one can set manually
caput SAR-EXPMX-EVR0:FrontUnivOut4-Src-Scale-SP 9 # Force High(0) -> arm event, before start motion
caput SAR-EXPMX-EVR0:FrontUnivOut4-Src-Scale-SP 8 # Force Low(1) -> trigger motion
caput SAR-EXPMX-EVR0:FrontUnivOut4-Src-Pulse-SP 0 # set back to Pulser 0 -> reset for CTA usage
This are values how they should be:
Here values as they were set (??.10.24):
caget SAR-EXPMX-EVR0:FrontUnivOut4-Src-Pulse-RB SAR-EXPMX-EVR0:FrontUnivOut5-Src-Pulse-RB \
SAR-EXPMX-EVR0:Pul0-Polarity-Sel SAR-EXPMX-EVR0:Pul0-Delay-RB SAR-EXPMX-EVR0:Pul0-Width-RB \
SAR-EXPMX-EVR0:Pul1-Polarity-Sel SAR-EXPMX-EVR0:Pul1-Delay-RB SAR-EXPMX-EVR0:Pul1-Width-RB \
@@ -108,3 +101,4 @@ caput SAR-EXPMX-EVR0:FrontUnivOut4-Src-Pulse-SP 0
Gather.Enable=0 # end triggerSync
```