Before we can start a scan, we have to set some environment variables: ScanDir, ScanFile, ActiveMntGrp and possibly JsonRecorder. JsonRecorder has to be set to True to generate json-encoded output on doors, used by pyspMonitor and SardanaMonitor. Here are some examples:
p09/door/exp.01 [11]: senv ScanFile tst.fio ScanFile = tst.fio p09/door/exp.01 [12]: senv ScanDir /home/p09user/temp ScanDir = /home/p09user/temp p09/door/exp.01 [13]: senv JsonRecorder True JsonRecorder = True p09/door/exp.01 [14]: senv ActiveMntGrp mg1 ActiveMntGrp = mg1
The command lsenv displays all environment variables:
p09/door/exp.01 [15]: lsenv Name Value Type -------------- --------------------- ------ ScanID 26 int ActiveMntGrp mg1 str _ViewOptions {'ShowDial': False} dict JsonRecorder True bool ScanFile ['tst.fio'] list ScanDir /home/p09user/temp str
The command lsmeas displays the contents of the MeasurementGroup:
p02/door/exp.01 [24]: lsmeas Active Name Timer Experim. channels -------- ------ ---------- ----------------------------------------------------------- * mg1 eh2a_t01 eh2a_t01, sis3302_01, eh2a_vfc01, eh2a_vfc02, eh2a_vfc03, exp_petra
We open an additional xterm to launch a tool that displays graphics, Figure 7.10 shows the widget:
$ SardanaMonitor.py
This is the scan command:
p02/door/exp.01 [25]: ascan ch2_dmy01 0 1 10 0.1 Operation will be saved in None (fio) Scan #38 started at Wed Nov 14 16:01:33 2012. It will take at least 0:00:01.100000 Moving to start positions... #Pt No dt ch2_dmy01 eh2a_t01 sis3302_01 eh2a_vfc01 eh2a_vfc02 eh2a_vfc03 exp_petra 0 0.063441 0 0.1 (2048,) 0.292209 0.283309 0.394454 98937 1 0.356575 0.1 0.1 (2048,) 0.292259 0.283359 0.39486 98937 2 0.549326 0.2 0.1 (2048,) 0.292309 0.283409 0.39531 98937 3 0.740467 0.3 0.1 (2048,) 0.292359 0.283459 0.39576 98937 4 0.940038 0.4 0.1 (2048,) 0.292409 0.283509 0.396204 98930 5 1.13406 0.5 0.1 (2048,) 0.292453 0.283553 0.396554 98930 6 1.32566 0.6 0.1 (2048,) 0.292565 0.283609 0.397003 98930 7 1.51697 0.7 0.1 (2048,) 0.292657 0.283657 0.397407 98930 8 1.70895 0.8 0.1 (2048,) 0.292703 0.283703 0.397804 98930 9 1.89342 0.9 0.1 (2048,) 0.292761 0.283761 0.398257 98929 10 2.10928 1 0.1 (2048,) 0.292807 0.283807 0.398707 98929 Operation saved in /home/p02user/temp/tst_00038.fio (fio) Scan #38 ended at Wed Nov 14 16:01:36 2012, taking 0:00:02.280033. Dead time 51.8% (motion dead time 10.0%)