Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
Analog instruments | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: Detection | ||||||
Description:
| ||||||
Documentation:
This macro set is intended to operate instruments that provide analog readings as pseudocounters. They will be called "multimeters" even if they might be other type of instruments or signal sources. These macros may replace those in pico.mac adding new features. The more relevant are: EXAMPLE EXAMPLE EXAMPLE INTERNALS To add a new type of signal source one must do the following: 1.- Choose a string <type> to identify the type of the instrument. 2.- If the instrument needs any kind of initialisation include it in a macro called multim_init_<type>. This is executed at the end of multimsetup and reconfig. One can include here any check or parameter initialisation that might speed up the counting. 3.- Write a macro called multim_read_<type> that gets the instrument reading and saves it in the local variable `value'. If the value is succesfully set, the macro must set the variable `ok' to 1. Have a look to multim_read_kgpib and multim_init_kgpib as examples of how to check and read the parameters. | ||||||
Macros:
Usage: multimsetup <counter1> [<counter2> ...] [<parameter>=<value> ...] This macro configures the list of pseudocounters to be loaded with the analog readings. It is possible to add parameters to change the defaults. All the parameters will affect to all the counters regardless of their position in the line. If one wants to set particular parameters to specific counters, he should use several multimsetup lines. As it is explained below whenever a essential parameter, like the scale factor or the instrument address, is not especified it will be taken from the config file. Parameters that are meaningless for a particular type of signal source are accepted but ignored. The currently implemented parameters are the following: type: the type of signal source. Accepted values are: address: the GPIB address of the multimeter in the standard spec format. If it is not especified, the address for a GPIB instrument is constructed from the "unit" and "channel" fields associated to the counter in the config file: "unit" corresponds to the interface number and "channel" to the instrument address in the bus. integrate: if set to "yes" makes the pseudocounter work in integrating mode. The default is "no" that correspond to averaging mode. In one case the multimeter readings during the counting interval are time integrated by spec, while in the other they are time averaged. average: if set to "yes" makes the pseudocounter work in a simple averaging mode. Values are accumulated and then divided by the number of measurements. scale: The scale factor that multiplies the instrument readout. If it is not especified, the value is taken from the "scale" field in the config file. trigger: By default is set to yes. The effect of this parameter is device dependent. For "kgpib" multimeters the intruments are triggered at the beginning of the counting interval discarding any old values stored in the intrument buffers. device: the device name for ICV150 VME boards. channel: the channel number for ADC's in ICV150 VME boards. If it is not especified, the value is taken from the "channel" field in the config file, only mandatory for OS9 device server, the Linux version of the server exports one device per channel. sample: If set to yes, the device will be read only once each count; otherwise it will be read as much as possible during the counting time (taking into account the polltime parameter). Default is no. polltime: specifies the minimum time between accesses to the device in seconds. By default the devices will be polled during counting at a rate determined by the COUNTERSPOLLTIME and the total access time of all the multim devices. Sometimes this can represent an overload of some resource, which can be controlled by this parameter. motor, center and fwhm: description of the simulated peak for "dummy" signals. timeconstant: time constant in minutes of an exponentially decaying "dummy" signal. If it is not especified, the value is taken from the "channel" field in the config file. multimunsetup Usage: multimunsetup <key> Removes the configuration for a particular pseudocounter. It is called internally by the automatic unsetup procedure but it can be also called by the user. multimshow Usage: multimshow This macro displays the current configuration. picosetup Usage: picosetup This macro is a version of the old picosetup compatible with the new macros. It is included only for backward compatibility. picopol Usage: picopol This macro changes the sign of the scale factor for those electrometers configured by picosetup pico_azero Usage: pico_azero counter_name [on/off] Toggle Keithley pico amperemeter Automatic ZERO checking . Used to achieve optimum accuracy for low current measurements, readings become slower by a factor of 3. pico_av Usage: pico_av counter_name [on/off] switch Keithley pico amperemeter averging on or off, second argument is optional. av_K648x Usage: av_K648x counter_name [on/off] Please do not use anymore, for backwards compatibility only. pico_autorange Usage: pico_autorange counter_name [on|off] Toggle Keithley pico amperemeter Automatic RANGE. pico_setrange Usage: pico_setrange counter_name [range] Set Keithley SCPI instrument RANGE. Or read the RANGE and asks a range if no range value is asked. multim_range Usage: multim_range <mnemonic> <list|range> change gain setting. Allowed values for range are "2nA", "20nA", "200nA", "2uA", "20uA", "200uA", "2mA", "auto" and "fix". "fix" disables autoranging, keeping the currently chosen gain. multim_query_range Usage: multim_query_range mnemonic This macro uses a macro fuction which returns the used range of the instrument. Example: multim_query_range pd2 | ||||||
Internal Macros: | ||||||
Usage: _multimsetup (<argument_string>) This macro does the actual setup. multim_precount Usage: multim_precount (<counter>) This macro function initialises variables for the pseudocounting. multim_getcounts Usage: multim_getcounts (<counter>, <polling>) This macro function reads the signal and averages or performs the integration as necessary. multim_init_kgpib Usage: multim_init_kgpib Particular initialisation for type=kgpib multim_read_kgpib Usage: multim_read_kgpib Reads the instrument for type=kgpib multim_init_vmeadc Usage: multim_init_vmeadc Particular initialisation for type=vmeadc multim_read_vmeadc Usage: multim_read_vmeadc Reads the ADC value for type=vmeadc multim_init_lvmeadc Usage: multim_init_lvmeadc Particular initialisation for type=lvmeadc multim_read_lvmeadc Usage: multim_read_lvmeadc Reads the ADC value for type=lvmeadc multim_init_madc Usage: multim_init_madc Setup a single channel variables when type=madc. multim_read_madc Usage: multim_read_madc Read a single value when type=madc. multim_init_dummy Usage: multim_init_dummy Iniatises values for a multimeter for type=dummy. Uses undocumented parameters "motor", "fwhm" and "center" (peak simulation) and "timeconstant" (exponential decay). multim_read_dummy Usage: multim_read_dummy Simulates the reading of a multimeter for type=dummy multim_config Usage: multim_config (<counter_name>) This macro checks and configures the internal parameters. multim_init Usage: multim_init (<counter>) This macro initialises the instruments if there is something to initialise. It returns 0 after a correct initialization and -1 if an error happens. _picosetup Usage: _picosetup multim_init_bliss_keithley_gpib Usage: multim_init_bliss_keithley_gpib multim_read_bliss_keithley_gpib Usage: multim_read_bliss_keithley_gpib multim_init_kscpi Usage: multim_init_kscpi Particular initialisation for type=kscpi multim_read_kscpi Usage: multim_read_kscpi Reads encoder value for type=kscpi kscpi_put Usage: kscpi_put(cntrl,str) kscpi_get Usage: kscpi_get(cntrl) kscpi_flush Usage: kscpi_flush(cntrl) multim_init_tangoelect Usage: multim_init_tangoelect Particular initialisation for type=tangoelect multim_read_tangoelect Usage: multim_read_tangoelect Reads the ADC value for type=tangoelect _multim_query_range Usage: _multim_query_range mnemonic This macro function returns the used range of the instrument. Example: _multim_query_range(4) | ||||||
|