esrf

Beamline Instrument Software Support
SPEC Macro documentation: [ Macro Index | BCU Home ]

PICOAMMETER.MAC
See other macros in category: All
Description:
    Support for the Keithley 485/486/487 picoammeter as a pseudo counter
Documentation:
    DESCRIPTION
    The Keithley 486 picoamtermeter is a very sensitive detector for weak electrical currents with a detection limit of 10 fA. It directly converts current into a digital reading that is display on the front panel and can be read via a GPIB interface on the back panel.
    A common application is to read out X-ray detectors such as silicon PIN diodes or ionization chambers. A silicon PIN diode is connected directly to the current input of the picoammter without any voltage source. This way the photocurrent is proportional to the photon flux over typically 9 order of magnitude or more.
    Alternatively the picoammeter can used a current amplifier. At its analog on the back panel it generated a voltage between -2 and +2 that is proportional to the current with a gain factor of 10^3 to 10^9 V/A in steps of a factor 10. This gain factor can be set via the front panel or the GPIB interface. The picoammeter is used this way when the time structure of the current signal is of interest, e.g. for recording on an oscilloscope, lock-in detection or gating. Also the analog output can be used as input for a voltage-to- frequency converter with digital counter, if long-term averaging of a noisy signal is desired.

Macros:
    picoammeter_setup
    Usage: picoammeter_setup mnemonic GPIB=addr
    Setup the channel of the Keithley Picoampermeter as counter for "ceil" and "binary" need spec_utils

    picoammeter_setup
    Usage: picoammeter_setup counter GPIB=addr [voltage_counter]
    Assigns a software counter to a picoammeter. You have to define a scaler in "config" first with the name "current_counter" and "Device" set to NONE.

    Syntax 1: picoammeter_setup counter GPIB=addr

    Directly read the current from te biult-in analog-to-digital converter via GPIB. The value of the counter is the measured current in amperes. If you want to measure the current in a different unit, e.g. nanoampere, set the "Scale factor" in "config" to 1e9.
    The picoammeter will be read multiple times during counting for averaging. This macro tries to speed up the readout rate by making use of the internal data store of the picoameter and transferring GPIB data in blocks. This way typically 25 readings are averaged per second of counting time.

    Syntax 2: picoammeter_setup counter GPIB=addr voltage_counter

    This is an alternative way of reading a Picoammeter, using it as current amplifier and reading the analog output voltage.
    This way a long-term average can be obtained which higher precision, if a voltage-to-frequency is used in conjection with a digital counter.
    This macro assumed that the "voltage_counter" is scaled so its units are volts. Then the "counter" will be in units of ampere if its scale factor is set to 1. If the counter "voltage_counter" is an integrating counter such as VCT6, then is should be scaled to Vs and "counter" will be in units of As.
    This macro does nothing but reading the counter "voltage_counter" and the current gain settings of the picoammeter via GPIB, calculate the current and assign it to the "counter".

    picoammeter_unsetup
    Usage: picoammeter_unsetup
    undo "picoammter_setup"

    picoammeter
    Usage: picoammeter
    print status info

    picoammeter_range
    Usage: picoammeter_range mnemonic|address [range]
    change gain setting. Allowed values for range are "auto", "2nA", "20nA", "200nA", "2uA", "20uA", "200uA", "2mA" and "fix". "fix" disables autoranging, keeping the currently chosen gain.

    picozerochk
    Usage: picozerochk mnemonic|address [mode]
    change zero check setting. Allowed values are "auto", "on", "off".

    picoammeter_off
    Usage: picoammeter_off
    disable readout of all picoammeter devices until next "reconfig" or "picoammeter_on"

    picoammeter_on
    Usage: picoammeter_on
    use this macro after "picoammeter_off" to reenable the picoammeter readout

Internal Macros:
    picoammeter_check
    Usage: picoammeter_check mnemonic
    "hook macro" for "config_mac" Checks avaliability of device and disables the counter hook macros if device does not repond (not powered up, GPIB-ENET unavailable, SPEC configuration changed, cabling problem, etc.)

    picoammeter_precount
    Usage: picoammeter_precount mnemonic
    "hook macro" for "user_prepcounts".
    Setup picoammeter to use the internat data store for maximum acqisition rate. In priciple up to 512 value can be recoreded in one go, one each 20 ms. However in practive the number values is limited by SPEC`s GPIB buffer size of 512 bytes to 30.

    picoammeter_pollcounts
    Usage: picoammeter_pollcounts mnemonic
    "hook macro" for "user_pollcounts"

    picoammeter_getcounts
    Usage: picoammeter_getcounts mnemonic
    "hook macro" for "user_getcounts"

    picoammeter_calculate_current
    Usage: picoammeter_calculate_current mnemonic
    "hook macro" for "user_getcounts"
    This macro reads the current gain settings of the corresponding picoammeter via GPIB, aplies it as scaling factor to the analog voltage output, calculates the current and assign it to the counter "mnemonic".

    picoammeter_gpib_put
    Usage: picoammeter_gpib_put (address,string)
    This function sends data to a GPIB device, like "gpib_put()". However, is catches the error condition "Not CIC or lost CIC during command" (CIC = controller in charge), which occurres frequently with the GPIB-ENET controller. This is a transient error occuring when another SPEC application is using the same GPIB controller and can be mended by sending the command again.
    Then return value is the number of bytes send.

    picoammeter_gpib_get
    Usage: picoammeter_gpib_get (address)
    This function receives data from a GPIB device, like "gpib_get()". However, is catches the error condition "Not CIC or lost CIC during command" (CIC = controller in charge), which occurres frequently with the GPIB-ENET controller. This is a transient error occuring when another SPEC application is using the same GPIB controller and can be mended by retrying.
    Then return value is the number of bytes send.

Filename: picoammeter.mac
Author: Schotte, 21 Feb 2000 - 17 June 2000
Last mod.: 05/09/2012 14:07 by guilloud