esrf

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

K6221.MAC
See other macros in category: All
Description:
    Macros motors to control KEITHLEY current source K6221 through GPIB
Documentation:
    DESCRIPTION
    Configure first a macro motor controller with DEVICE field set to string "k6221" and ADDR field set to the full GPIB address where the controller can be reached (ex: "0:12"). Therefore there must be ONE macro motor controller per K6221
    Then configure a motor using the previous controller, the "channel" is used to select what to control. 0 for "output current" and 1 for "compliance voltage"
    The unit of "current" motor will be amps and the unit of "voltage" motor will be volts.

Macros:
    k6221cmd
    Usage: k6221cmd motor command
    Send the given command to the controller associate to the given motor and print out the answer if there is one.
    Ex: k6221cmd m0 *IDN?

    k6221on
    Usage: k6221on motor
    Switch on output of the controller associate with given motor.

    k6221off
    Usage: k6221off motor
    Switch off output of the controller associate with given motor.

Internal Macros:
    k6221_config
    Usage: k6221_config ()
    Called by spec after reading the config file

    k6221_cmd
    Usage: k6221_cmd ()
    Called by spec on motor operation.

    _k6221_error_clear
    Usage: _k6221_error_clear (addr)
    Clear any previous error

    _k6221_error_print
    Usage: _k6221_error_print (addr, msg, silent)
    Retrieve current error and print it out with the optional given message except if silent has be requiered. Returns non null if there was an error pending.

    _k6221_onoff
    Usage: _k6221_onoff (mne, state)
    Control controller output for the given motor.

    _k6221_cmd
    Usage: _k6221_cmd (addr, command)
    Send the given command to the controller given by its address and returns the answer if there is one. Otherwise returns an empty string.

Filename: k6221.mac
Author: MP BLISS (Original 9/2015).
$Revision: 1.0 $ / $Date: 2015/09/18 06:17:06 $
Last mod.: 18/09/2015 08:17 by perez