Initial revision
This commit is contained in:
134
doc/user/tchm.htm
Normal file
134
doc/user/tchm.htm
Normal file
@ -0,0 +1,134 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Tcl-interface to the SINQ histogram memory</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>The Tcl-interface to The SINQ histogram memory</H1>
|
||||
<P>
|
||||
The entry point to the Tcl interface for the SINQ histogram memory is the
|
||||
SINQHM command. The exact syntax is:<BR>
|
||||
<EM>SINQHM name computer port </EM><BR>
|
||||
This command creates a new command, name, which will be used in future to refer
|
||||
to the histogram memory. The next parameters specify the computer name of the histogram memory (HM)
|
||||
and the port number where it is listening (mostly 2400). This command initialises all
|
||||
necesaary data structures and starts a connection to a SINQ HM master server. For the explanation of that,
|
||||
please refer to documentation for the histogram memory.
|
||||
</P>
|
||||
<H2>Configuration commands</H2>
|
||||
<P>
|
||||
Now the HM is ready to be configured. The name created as above will for the purpose
|
||||
of this explanation been assumed to be HMM, for histogram memory master. This
|
||||
understands the following commands:
|
||||
|
||||
<DL>
|
||||
<DT>HMM config mode modif n length binwidth
|
||||
<DD> this configures the HM. The parameters are: mode as the measuring mode,
|
||||
modif, another mode qualifier, n the number of histograms, length for the
|
||||
length of the histograms and binwidth, the size of an individual bin. Currently only
|
||||
1,2,4 are supported binwidths. The mode parameter can be:
|
||||
|
||||
<DL>
|
||||
<DT>SQHM_TRANS
|
||||
<DD> transparent mode, no binning takes place. Useful for debugging.
|
||||
<DT>SQHM_HM_DIG
|
||||
<DD>normal histogram mode with digitised read out.
|
||||
<DT>SQHM_HM_PSD
|
||||
<DD> a special for charge division read out for a PSD. Binning takes place.
|
||||
<DT>SQHM_HM_TOF
|
||||
<DD> time of flight mode.
|
||||
</DL>
|
||||
Possible values for the modif are:
|
||||
|
||||
<DL>
|
||||
<DT>SQHM_DEBUG
|
||||
<DD>starts a debugger in the histogram memory.
|
||||
<DT>SQHM_UD
|
||||
<DD>selction of histogram according to up/down bit from electronics???
|
||||
<DT>SQHM_CNT_OR
|
||||
<DD>counts out of range events, for debugging purposes.
|
||||
<DT>SQHM_BO_IGN
|
||||
<DD> ignores bin overflow.
|
||||
<DT>SQHM_BO_SMAX
|
||||
<DD> leaves overflowed bins at maximum count.
|
||||
<DT>SQHM_BO_CNT
|
||||
<DD>count bin overflows. They are left in a table.
|
||||
<DT>SQHM_STROBO
|
||||
<DD> stroboscopic mode. A signal from the front end electrics defines the
|
||||
histogram where to bin too.
|
||||
</DL>
|
||||
<DT>HMM deconfig harsh
|
||||
<DD> deconfigures the HM. harsh can be 0 or 1. If 1 all child processes will
|
||||
be removed as well.
|
||||
<DT> HMM debug level
|
||||
<DD> controls the level of debugging information printed by the HM to its COM1
|
||||
console port.
|
||||
<DT> HMM exit
|
||||
<DD> terminates the histogram memory software. DO NOT USE, a reboot is necessary
|
||||
or a manual restart of the software.
|
||||
<DT> HMM status
|
||||
<DD> prints a status report for the HM.
|
||||
<DT> HMM DAQ name
|
||||
<DD> starts a data aquisition client with name name. This is needed in order
|
||||
to invoke data aquisition and read the histogram memory. For more information
|
||||
see the main histogram memory documentation. Name is a new command afterwards.
|
||||
<DT> HMM delDAQ name
|
||||
<DD> terminates the client name. Its associated command gets removed as well.
|
||||
</DL>
|
||||
|
||||
</P>
|
||||
|
||||
<H2>Data aquisition commands</H2>
|
||||
This section describes the commands understood by the command generated by
|
||||
HMM DAQ name. These commands control data aquisition and read out. For the
|
||||
purpose of this description, the name of the DAQ command will be assumed
|
||||
to be HMS, for histogram memory slave. This understands the following commands:
|
||||
|
||||
<DL>
|
||||
<DT>HMS read n start end array
|
||||
<DD> This reads histogram n into the Tcl array array, which will
|
||||
be created as necessary. A value of -1 for n means read
|
||||
out of the whole histogram memory. Reading starts at bin start and end bins are read.
|
||||
The resulting array will hold values from 0 - end (i.e. Array(0), array(1),..)
|
||||
where the values read can be found.
|
||||
<DT> HMS write n start end array
|
||||
<DD> can be used to write data to the histogram memory. The meaning of the
|
||||
parameters is the same as for read. Please take care to initialise the
|
||||
value array properly.
|
||||
<DT> HMS zero n start end
|
||||
<DD> a special form of write, which fills the HM with 0.
|
||||
<DT> HMS start
|
||||
<DD> starts a data aquisition.
|
||||
<DT> HMS stop
|
||||
<DD> stops a data aquisition.
|
||||
<DT> HMS inhibit
|
||||
<DD> pauses a data aquistion.
|
||||
<DT> HMS continue
|
||||
<DD> continues an inhibited data aquisition session.
|
||||
</DL>
|
||||
</P>
|
||||
|
||||
<P>
|
||||
So, this is fairly complex In order clarify the usage of this feature, an example
|
||||
will be given. In this example a DMC type HM will be configured, data be collected
|
||||
and read out. The DAQ slave will be deleted.
|
||||
The data read out will be printed.
|
||||
|
||||
<PRE>
|
||||
SINQHM HMM pfe31.psi.ch 2400
|
||||
HMM deconfig 1
|
||||
HMM config SQHM_HM_DIG SQHM_BO_SMAX 1 400 4
|
||||
HMM DAQ HMS
|
||||
HMS zero 1 0 400
|
||||
HMS start
|
||||
after 30000 # sleep 30 seconds
|
||||
HMM status
|
||||
HMS stop
|
||||
HMS read 1 0 400 Result
|
||||
HMM delDAQ HMS
|
||||
for { set i 0} { $i < 400 } { incr i} {
|
||||
puts stdout [format "Counts in bin %d: %d" $i $Result($i)]
|
||||
}
|
||||
</PRE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
Reference in New Issue
Block a user