esrf

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

K2701.mac
See other macros in category: Multimeter Temperature
Description:
    Macros to work with a Keithley 2701 via a tcp/ip socket interface.
Documentation:
    DESCRIPTION
    The keithley 2701 is a multichannel multimeter with a socket interface. Different kind of thermocouples measuring, voltage, current, resistance and frequency are possible.

    These macros have been tested only with thermocouples of type K and 4-wire pt100. Even if the code could, in principle, support other types of measuring, precise configuration may be necessary.

    This device is not recommended for fast measuring. At the ESRF an alternative solution is to use wago modules. Typical overhead measuring times for a Keithley 2701 are around 200 ms for one channel, around 400 ms for a three channel configuration compared with just a few ms for wago modules. Nevertheless this device presents at least two advantages. One is the flexibility and easyness of its setup. The second one is that some features are available that are not available with wago: for example, the higher accuracy obtained with a 4wire pt100, instead of only 3-wire supported by the corresponding wago module.

    The keithley tcp/ip socket connection is a single client connection. This would, in principle, stops several application configuring measuring channels on the device at the same time as only one can have an open socket to the device. It is possible to have a multi-client setup by using a Socketserver proxy device server (check your bliss contact to set it up). Nevertheless, as clients may have different measuring configurations, a conflict could quickly arise. Multiple clients MUST use exactly the same channel configuration.

    EXAMPLE
       k2701setup k2701-1 id06/k2701/1
       k2701setup k2701-2 keithid32a:1394
    
       k2701add kt1 k2701-1 101 TEMP_K
       k2701add kt2 k2701-1 102 TEMP_K
       k2701add kt3 k2701-1 101 TEMP_PT100
       k2701add kvolt k2701-2 101 VOLT
    
       k2701init
    


Macros:
    k2701setup
    Usage: k2701setup cntlname device
    Defines a keithley 2701 controller in the system. Parameter ident is an arbitrary name to identify the controller later.

    Parameter device can take two forms:
    socket
    host:port (ex: keythid06a:1394 )
    server
    tango devname (ex: id06/k2701/1)


    The socket naming is simple and does not require any extra software on the other hand k2701 devices only support one simultaneous client to talk to it.

    If you want to have it configured at the same time in more than one spec application or GUI, the second option must be used. For this it is necessary to run a tango server that needs to be configured and started beforehand.

    k2701add
    Usage: k2701add <mne> <ctrl-ident> <ch> <readtype>
    Add a counter on one Keithley 2701 controller previously defined with k2701setup

    Parameters are:
    mne:
    counter mnemonic where counts will be read
    ctrl-ident:
    ident given in previous k2701setup
    ch:
    channel in controller for this counter
    readtype:
    one of the following:
    TEMP:PT100, TEMP:K, CURR:AC, CURR:DC, VOLT:AC, VOLT:DC, RES, FREQ,


    k2701init
    Usage: k2701init
    Initializes controllers. Includes a reset after configuration

    k2701show
    Usage: k2701show
    Not implemented yet

Internal Macros:
    k2701_unsetup
    Usage: k2701_unsetup
    Performs clean up on unsetup (take away k2701add from setup)

    k2701_ctrlunsetup
    Usage: k2701_ctrlunsetup
    Performs clean up on ctrl unsetup (take away k2701setup from setup)

    k2701channels
    Usage: k2701channels


    k2701_resetctrl
    Usage: k2701_resetctrl( ctrl )


    k2701_confctrl
    Usage: k2701_confctrl( ctrl )


    k2701_confchan
    Usage: k2701_confchan( mne )


    _k2701_reset
    Usage: _k2701_reset(ctrl)
    resets a controller

    _k2701_speed
    Usage: _k2701_speed(ctrl)
    gets a small improvement in speed

    _k2701_config_voltdc
    Usage: _k2701_config_voltdc(ctrl,chlist)


    _k2701_config_voltac
    Usage: _k2701_config_voltac(ctrl,chlist)


    _k2701_config_currdc
    Usage: _k2701_config_currdc(ctrl,chlist)


    _k2701_config_currac
    Usage: _k2701_config_currac(ctrl,chlist)


    _k2701_config_res
    Usage: _k2701_config_res(ctrl,chlist)


    _k2701_config_freq
    Usage: _k2701_config_freq(ctrl,chlist)


    _k2701_config_tc
    Usage: _k2701_config_tc(ctrl,chlist,tc_type)


    _k2701_config_pt100
    Usage: _k2701_config_pt100(ctrl,chlist)


    _k2701_trig
    Usage: _k2701_trig(ctrl, nbchan)


    _k2701_form
    Usage: _k2701_form(ctrl)


    _k2701_routopen
    Usage: _k2701_routopen(ctrl,chlist)


    _k2701_route
    Usage: _k2701_route(ctrl,chlist)


    k2701_ctrlget
    Usage: k2701_ctrlget


    k2701_chget
    Usage: k2701_chget


    k2701send
    Usage: k2701send( ctrl, kcmds, nbcmds )
    Sends one or several commands. No answer expected

    k2701read
    Usage: k2701read(ctrl, cmd)
    Sends one command. Returns answer

    _k2701_write
    Usage: _k2701_write( cmd, sockdev, socktype )
    Sends one command through socket. No answer expected

    _k2701_read
    Usage: _k2701_read( cmd , sockdev, socktype)
    Sends one command through selected socket. Returns answer

    k2701_cleanminus
    Usage: k2701_cleanminus( instr )
    Clean spurious minus sign at the beginning of response string

Filename: k2701.mac
Author: V.Rey BLISS/ESRF (2008)
Last mod.: 23/04/2008 10:51 by rey