Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
ELMETER_MH.MAC | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: All | ||||||
Description:
| ||||||
Documentation:
The macro set offers the possibility to set-up the electrometer TANGO attributes as macro counter. The macro counter controller defined in spec config is called elmeter and has as the ADDR the device server device (e.g. d29/elmeter/all) For each controller the type additional parameter shoud be configured (e.g.CONPAR:type = K_6485). Each counter should have a parameter device (e,g, CNTPAR:device = d29/keithley/wb) which is the one used to controll one counter only (for start, gain setting etc.) and an optional parameter autorange (e.g. CNTPAR:autorange = 1) which indicates if the automatic range should be set. DEPENDENCIES spec_utils.mac | ||||||
Macros:
Usage: elm_getrange <[c_mne]> Get the c_mne counter range. elm_setrange Usage: elm_setrange [cntmne range] Set the cntmne counter range - allowed values: 2 (corersponds to 20mA + 5% = 21mA maximum input current) to 9 (2nA + 5% = 2.1nA maximum input current). Note that setting the range stops the autorange mode! elm_getrate Usage: elm_getrate <[counter_mnemonic]> Get the c_mne counter rate. elm_setrate Usage: elm_setrate [cntmne rate] Set the cntmne counter rate - allowed values: 0.01 to 5 (corresponding to 0.2ms to 100ms sampling time). elm_unsetup Usage: elm_unsetup Removes all cdef and globals for all the electrometer macro counters. | ||||||
Internal Macros: | ||||||
Usage: elmeter_config (hwn, type, unit, module, chan) Called after reading the config file. If return the string ".error.", spec will consider the channel unusable. elmeter_cmd Usage: elmeter_cmd (hwn, key, p1, p2) Execute the command key for the counter hwn, with parameters p1 and p2 if needed. The keys used are as follows: "start_one" and "prestart_all" - start the counting Parameters: p1 - counting time. Parameters: p2 - 2 (count to a time preset - tcount()). "counts" - return the current counts. Parameters:none. "get_status" - only used for polling counter Parameters:none. "halt_all" - stop the counting and read the controller (all the counters in one go) Parameters: p1 - controller unit number. Return the string ".error.", spec will consider the channel unusable. elmeter_par Usage: elmeter_par (hwn, key, action, p1) Get/set the corresponding electrometer counter par get_index Usage: get_index (ctrl,unit) Get the index in the list of devices, served by the ctrl controller device server. elmeter_getpropsc Usage: elmeter_getpropsc (ctn) Get the counter properties. Save it as a index counter parameter. elm_start Usage: elm_start (hwn,p1) Start the hwn counting for p1 seconds. elm_stopall Usage: elm_stopall () Stop all the configured counters. elm_stop Usage: elm_stop (hwn) Stop the hwn counting. elm_read Usage: elm_read (p1) Read the p1 controller. Mark all the read counters as not counting. elm_autorange_off Usage: elm_autorange_off (hwn) Stop the hwn counter autorange. elm_autorange_on Usage: elm_autorange_on (hwn) Start the hwn counter autorange. elm_autorange_status Usage: elm_autorange_status (hwn) Get the hwn counter autorange status (1 if autorange, 0 if not) elm_autorange_set Usage: elm_autorange_set (hwn,stat) Set the hwn counter autorange on (stat=1) or off (stat = 0). elm_autorange_restore Usage: elm_autorange_restore(hwn) _pow2int Usage: _pow2int (value) Convert 2e-xxx to xxx _elm_getrange Usage: _elm_getrange (hwn) Get the hwn counter range. _elm_setrange Usage: _elm_setrange (hwn, range) Set the hwn counter range - allowed values: 2e-2 to 2e-9 Note that setting the range stops the autorange mode! _elm_getrate Usage: _elm_getrate (hwn) Read the hwn counter rate. _elm_setrate Usage: _elm_setrate (hwn, rate) Set the hwn counter rate - allowed values: 0.01 to 5 elm_cdefs Usage: elm_cdefs (hwn) Set some hwn counter defs to be used whith scans. _elm_unsetup Usage: _elm_unsetup (cnt) removes cdef and globals for counter number cnt. bench_ct Usage: bench_ct (cmd, nb, tt) Do a bench of the command cmd, nb times. Subtracs the count time tt if needed. Return the mean execution time value. | ||||||
|