VDL.mac |
[
source code |
installed at |
configured at
]
|
See other macros in category:
All
|
Description:
Macros for data acquisition on vdl boards
|
Documentation:
DESCRIPTION
These macros allow to define and run data acquisition on vdl boards
They use the Spec built in features for the VDL board. The software
simulates additional vdl channels to get the results from internal
calculation. Imagine the additional channels as if the vdl hardware
could do the calculations itself.
SETUP
The meaning of each channels is assigned by assigning a channel
number:
0 ! ] raw data channel a1
. ! ] channel b1
. ! ]
2*multi-1 ! ] channel bmulti
2*multi ! nb of reads per multiplexed entry
2*multi+1 ! live time (*TG) per entry
2*multi+2 ! nb of calculations done
! BPM2 ! BPM1 ! PHD2 ! PHD1
2*multi+3 ! xb1 ! xb1 ! It/Io 1 ! It/Io 1
2*multi+4 ! yb1 ! yb1 ! It/Io 2 ! ln (Io/It) 1
2*multi+5 ! xb2 ! sum1 ! ln (Io/It) 1 !
2*multi+6 ! yb2 ! ! ln (Io/It) 2 !
2*multi+7 ! sum1 !
2*multi+8 ! sum2 !
As an example consider the channel numbers in the following cases:
- BPM1 Beam position monitor with 1 beam
(4 raw data entries per card -> 2 * multiplexed)
- BPM2 Beam position monitor with 2 multiplexed beams
(8 raw data entries per card -> 4 * multiplexed)
- PHD1 Photodiode with I and I0
(2 entries per card -> 1 * multiplexed)
- PHD2 Photodiode with I and I0 multiplexed for 2 beams.
(4 raw data entries per card -> 2 * multiplexed)
- MAG1 Photodiode with I and I0 1beam but magn. switching
Channel No ! BPM1 ! BPM2
0 ! RawData1 ! RawData1 Beam1
1 ! RawData2 ! RawData2 Beam1
2 ! RawData3 ! RawData1 Beam2
3 ! RawData4 ! RawData2 Beam2
4 ! No of rawdata reads ! RawData3 Beam1
5 ! Total TG time ! RawData4 Beam1
6 ! No of calculations ! RawData3 Beam2
7 ! X (Hor. Beam Pos) ! RawData4 Beam2
8 ! Y (Vert.Beam Pos) ! No of rawdata reads
9 ! Sum of Rawdatas ! Total TG time
10 ! No of calculations ! No of calculations
11 ! ! X1 (Hor. Beam1 Pos)
12 ! ! Y1 (Vert Beam1 Pos)
13 ! ! X2 (Hor. Beam2 Pos)
14 ! ! Y2 (Vert Beam2 Pos)
15 ! ! Sum1 (Sum of RawD1)
16 ! ! Sum2 (Sum of RawD2)
Channel No ! PHD1 ! PHD2
0 ! RawData Ch A I0 ! RawData1 Ch A Beam1 I0
1 ! RawData Ch B I ! RawData2 Ch B Beam1 I
2 ! No of rawdata reads ! RawData1 Ch A Beam2 I0
3 ! Total TG time ! RawData2 Ch B Beam2 I
4 ! No of calculations ! No of rawdata reads
5 ! I/I0 ! Total TG time
6 ! ln (Io/It) ! No of calculations
7 ! I/I0 Beam1
8 ! I/I0 Beam2
9 ! ln (Io/It) Beam1
10 ! ln (Io/It) Beam2
|
Macros:
vdlshowpar
Usage: vdlshowpar
Prints the current parameters on the screen
vdldevsetup
Usage: vdldevsetup ["MODE TD TG REF TMOD FRE NOACQ CMOD MULTI MAG DARKA DARKB"
"MODE2 .. DARKB2" ...]
Without parameters ,the uses is asked additional parameters for the vdl
cards he configured in SPECs config editor.
A star (*) in place of a parameter will not change the actual value.
This allows macros to be written that allow to change only certain values
(like TD or TG).
The meaning of the different parameters
- Mode
- The mode parameter of the VDL card. (See hardware reference,
differences are internal-external reference signal, internal-external
start and stop)
- TD
- the delay time in ms at each reference cycle.
- TG
- the measuring time in ms at each reference cycle.
- Ref time
- depends on the mode.Gives either the internal
reference frequency (the ref time is this number in OS9 ticks (= 10ms)) or
a time out for the other modes (also given in ticks (10ms))
- Time mode
- You can choose between 3 different ways the number
of acquisitions is calculated from the user input.
- fixed : User input (as in ct 4 or ct -100) is ignored and the
number of acquisitions is taken from the global "no of acq" given
above.
- elapsed : Spec tries to match the estimated measurement time with
the user input. (ct 1 will measure during one second).
In this mode, higher multiplexed VDL cards will measure during the
same time interval and therefore do less acqisitions per multiplexed
entry. If the user asks for a certain number of acqisitions (ct -100)
this number will be the real number of acqisitions and has to be divided
by the the multiplex factor to get the number of acquisitions per
multiplexed entry. (The number will be rounded to a multiple of the
multiplex factor). Once again this has been done to match the
measurement times of different VDL cards with different multiplex
factor but the same chopper frequency)
- live : The time the user gives will be the live time of the
measurement (TG * no of acquisitions per multiplexed entry).
The number of acquisitions given by ct -100 is this time the number
of acquisitions per multiplexed entry). This mode is for users
who prefer to work with "constant statistics".
It is strongly recommanded to use only one time mode and not to switch
between them. Users might otherwise very fast get confused. The recommanded
time mode is "elapsed" time.
- Frequency chopper
- given in Hz. This frequency is used only in
time mode "elapsed" (see above). It represents the chopper frequency
and is used to calculate the time an acquisition will take.
- No of Acq
- Only used in time mode "fixed" representing the number
of acquisitions on this VDL card. (The number of raw data is twice
(Channel A/B) this number )
- Calc mode
- You have to tell the internal calculation routines
if you connected a beam position monitor (BPM), a photo diode with
I and I0 (PHD), a photodiode used with magn. field switching (MAG), or
you want the software to do no calculations on
individual acuisitions.
- Multiplexing
- Is the number of times every channel of the VDL
card has to be multiplexed to get the number of raw data necessary.
(Example: PHD1: 1 , PHD2: 2 , BPM1: 2 , BPM2: 4)
- Cycles for up field
-
This number is only used in calc mode 3 (MAG) for magnetic field
switching (MCD,XMCD). The number specifies after how many cycles
the of the chopper the magetic field changes sign.
- DarkA ,DarkB
-
Only used without chopper (mode 4). The
value given will be deduced from the counts read from the VDL.
DarkA is used for Channel A. DarkB is used for Channel B.
|
Internal Macros:
|
vdlsetpar
Usage: vdlsetpar
sets the vdl parameters according to the global array VDL_xxx
vdlgetpar
Usage: vdlgetpar
fills the global array VDL_xxxx with the vdl parameters.
|
Filename: | vdl.mac |
Author: | J.Klora |
Last mod.: | 08/08/2002 14:37 by berruyer |
|