esrf

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

See other macros in category: All
Description:
    Macromotor to control the PACE5000 K0443 Pressure Automated Calibration Equipment
Documentation:
    DESCRIPTION
    Control of the PACE5000 K0443 Pressure Automated Calibration Equipment.
    Control with serial line with following resources:
    - baudrate: 9600
    - parity: none
    - charlength: 8
    - stopbits: 1
    - timeout: 0xa
    in spec: serial line in cooked mode
    Control via etrernet sockets
    The macromotor controller to be used is 'pace5000'. Each macromotor of that type must define a parameter: "serial" with the serial device index or "etrernet" with the "address:socket_number" in the config. There are two protocols. If nothing specified, ptotocol emulationg older Drug instruments will be used. Otherwise in the "ptotocol" parameter should be set to "SCPI".

Macros:
    pace5000_debug
    Usage: pace5000_debug
    toggle the debug mode if (!(whatis("__pace5000_debug") & 2)) rdef __pace5000_debug \'#$*\'

    pace5000_simul
    Usage: pace5000_simul
    toggle debug mode for the present macros.

    pace5000_remote
    Usage: pace5000_remote <mnemonic>
    setting as remote the required bender

    pace5000_flush
    Usage: pace5000_flush <mnemonic>
    flush the serial line associated to that bender

    pace5000_local
    Usage: pace5000_local <mnemonic>
    setting as local the required bender

Internal Macros:
    pace5000_config
    Usage: pace5000_config(num,cmd,p1,p2,p3)
    MACRO MOTOR: Called by spec after reading the config file

    pace5000_par
    Usage: pace5000_par(num,key,todo,p1)
    MACRO MOTOR: Called by spec for setting after reading the config file, after calling _config() and only if parameters are set in the config file for a motor. Called with motor_par for setting a parameter (if parameter in config file or not), and for getting a parameter (if motor NOT in the config file, otherwise spec manages it). It manages:
    - 'serial' or 'ethernet'

    _pace5000_comm
    Usage: _pace5000_comm(num, cmd, norep)
    sends to serial line 'serial_number' the string 'cmd'.
    It automatically ends the command with \\r and \\n

    pace5000_cmd
    Usage: pace5000_cmd(num,key,p1,p2)
    MACRO MOTOR: Called by spec on motor operation. It manages:
    - position
    - start_one
    - get_status

    _check_pace5000
    Usage: _check_pace5000 <mnemonic>
    check that it is a motor

    _pace5000_report_error
    Usage: _pace5000_report_error (code, ctrlchar)
    In the case of SCPI protocol: the ctrlchar is the device name. A command is sent to the controller's error register to get the error code. In the case of the old protocol, the code has the format <value>\@<8biterrorcode> and the ctrlchar is "@". In the both cases the function returns 0 if no error or 1 if there is an error, which is also printed.

    _pace_setpress
    Usage: _pace_setpress(num, val)


    _pace_scpi_error
    Usage: _pace_scpi_error(err)


Filename: pace5000.mac
Author: mcd january 2011
Last mod.: 19/08/2013 14:20 by witsch