Histogram Control Ferdi Franceschini 2008-09-17 12:24 <command>histmem</command> command You can start and stop acquisitions and do limited configuration the histogram server with the histmem command. Note that histmem does not save data. You have to explicitly use the save command. The histogram memory server is a component that is separate from SICS. SICS currently exposes only a subset of the histogram server interface. In the future, Gumtree will provide an editor for the histogram server configuration files. For a simple experiment in beam monitor mode, where you want to histogram data until one million counts are counted in the beam monitor, from the command line you would ... histmem mode MONITOR_1 histmem preset 1000000 histmem start "wait until the histogram is finished" save For subsequent acquisitions where you want to do fast starts of the histogram server because you don't need to change configuration histmem pause do something in SICS like change the sample or temperature histmem start "wait until the histogram is finished" save You must call the histmem command with one of the following subcommands histmem start will start an acquisition in the current mode The option prevents subsequent commands from being processed until the histmem is finished. Used in scripts, when using the count or time modes histmem stop will stop the histogram memory if it is running in unlimited mode that has been started without the option. NOTE: If you are running in 'unlimited & block' mode, count or time modes, you must send an INT1712 1 to abort the acquistion or hit the Interrupt button in Gumtree. histmem veto will stop the histogram memory from counting and not clear memory. It will have no effect on configuration. Use this command if you need to pause a measurement without clearing the memory. will resume counting without clearing the memory. histmem pause if MULTIPLE_DATASETS=ENABLE mode (default - but check) use pause instead of stop for a 'fast' start. Use this if you don't have to change the histogram memory configuration. Clears histograms and counters, but doesn't reinitialisation the histogram server. if MULTIPLE_DATASETS=DISABLE mode use pause instead of veto. Does not clear histograms and counters, does not reinitialise the histogram server. Data is accumulated. Note that the MULTIPLE_DATASETS mode is set in the SICS hmm configuration files and/or on the histogram memory server. SICS does not report this value. To view this value, you must look at the config tab on the histogram server web client. histmem mode mode Allowed mode one of: MONITOR_n (where n=1,2,3 ...). If you set the mode to MONITOR_1 then the server will stop when MONITOR_1 reaches the preset counts time will stop at the preset time after start unlimited will stop when it receives a histmem stop or INT1712 1 count will stop when the total histogram counts reaches preset counts frame will stop when the preset number of TOF (time of flight) frames. e.g. when there's no TOF, there is an internal frame frequency which by default is 50Hz. So if you have a preset of 1000 frames you will get a 20 second acquisition period will stop when it reaches preset number of periods. A histogram period contains some number of frames averaged together - this is controlled by the BAT (base address table) and its attributes. The mapping can be fairly complex (e.g. time-averaged, time-history and stroboscopic acquisition) so there's not always a simple relationship between number-of-periods acquired and the DAQ time, but it can be worked out from the BAT setup count_roi Not supported. Will stop when the total histogram counts reaches preset counts in a region of interest defined in the histogram server configuration. histmem preset val the acquisition will terminate after the val period.  This is seconds if the mode is time, and counts if the mode is count or MONITOR_n. histmem freq val val is the frame frequency (Hz)  for time resolved data.  If you set a frequency of zero then this will default to 50Hz. histmem fsrce frame_source Allow values of frame_source are: (default) You can set this to if you don't have an external frame signal histmem status This doesn't report anything Started, Stopped, or Paused histmem loadconf this uploads configuration tables (e.g. OAT for setting bins) to the histogram memory OAT_TABLE with no arguments will print out SICS's copy of the OAT_TABLE OAT_TABLE bb0 bb1 bb0 bb1 {bb0 bb1 will generate a table starting at bin boundary bb0 with a spacing of (bb1-bb0) extrapolated to the maximum bin boundary.  The numbers of channels are calculated automatically. OAT_TABLE bb0 bb1 bb0 bb1 {bb0 bb1 val1 val2 val3 this version sets the number of channels explicitly SICS cannot read the current OAT_TABLE from the histogram server, the only way to make sure that SICS is in sync with the histogram memory is to use the SICS OAT_TABLE command to change your table and then to upload it to the histogram server with the histmem loadconf command Histogram memory object In most cases, the histmem command will be sufficient to configure and control an experiment. This section describes a richer level of configuration and control, using the SICS histogram memory object. The histogram memory object in SICS is used to set the configuration of the histogram memory server (described in detail in a later chapter), and to get the current histogram memory server configuration and data. Note that it is possible to for the histogram memory's configuration to be set independently from SICS e.g. through the histogram memory's web interface. Therefore, care must taken to ensure synchronisation between the SICS histogram memory object and the histogram memory server. SICS has seven histogram-memory objects as follows: hmm hmm_xy hmm_xt hmm_yt hmm_x hmm_y hmm_t which you can use to fetch xyt, xy, xt, yt, x, y and t data. For simplicity, we will use hm to refer to any of the 7 histogram memory objects. Make sure you use the one appropriate to your measurement. hm get 1 gets the current histogram memory data ie. 'live' data hm zipget 1 gets the current histogram memory data in binary zip form hm configure rank gets the rank of the current histogram memory hm configure dimn gets the current histogram memory data in binary zip form