esrf

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

pi_e753.mac $Revision: 1.14 $
See other macros in category: All
Description:
    Macros to control a piezo PI E753 controller connected via TCP/IP.
Documentation:
    DESCRIPTION
    the PI E-753 is a single channel controller for piezo actuator. For debug purpose mainly, it is also possible to configure a macro counter that will read the position of a piezo axis. But to avoid duplicating parameters, the counter has no parameter and takes them from its corresponding macro motor. In order to guess the motor to use, the name of the counter must be the same as the motor with \"_c\" added at the end. For instance: \"nnn_x_c\" for \"nnn_x\"

    SETUP
    In order to configure a macro motor:
    1) You must have a "MOTORS" defined with:
    DEVICE set to "pi_e753"
    TYPE set to "Macro Motor"
    ADDR set to the TCP Address of the controller
    NUM must be set to 1
    2) Per piezo axis you must define a motor with:
    Controller set to "MAC_MOT"
    Unit field must be set to the "MOTOR" entry.
    Chan field must be set to 0 the piezo axis of the controller
    In order to configure a macro counter:
    1) You must have a "SCALERS" defined with:
    DEVICE set to "pi_e753_c"
    TYPE set to "Macro Counter"
    NUM must be set also
    2) Per piezo axis you must define a counter with:
    Device set to "MAC_CNT"
    Mnemonic must the motor mne plus "_c"
    Unit do not mind
    Chan do not mind


Macros:
    pi_e753_infos
    Usage: pi_e753_infos <mot_num>


    pi_e753_get_model
    Usage: pi_e753_get_model (<tcp_dev>)
    Returns the controller model name (should be E-753)

    pi_e753_wav_start
    Usage: pi_e753_wav_start <motor> <hz> <amplitude>
    Start waveform generation on given motor.
    <motor> : SPEC motor.
    <hz> : frequency of the wave in Hz.
    <ampl> : wave amplitude in microns.

    pi_e753_wav_stop
    Usage: pi_e753_wav_stop <motor>
    Print out the waveform status for given motor.

    pi_e753_wav_status
    Usage: pi_e753_wav_status <motor>
    Print out the waveform status for given motor.

Internal Macros:
    pi_e753_tcp_put
    Usage: pi_e753_tcp_put (<tcp_dev>, <cmd>)
    Sends <cmd> to a tcp device. Adds \n at end of <cmd> Uses tcp/ip device : <tcp_dev>.

    pi_e753_tcp_get
    Usage: pi_e753_tcp_get (<tcp_dev>)
    Returns ???

    pi_e753_send
    Usage: pi_e753_send (<mot_num>, <cmd>)
    Send <cmd> to controller of motor <mot_num> and returns the answer. <mot_num> : SPEC motor number. <cmd> : String with or without terminator.

    pi_e753_send_no_ans
    Usage: pi_e753_send_no_ans (<mot_num>, <cmd>)
    Sends <cmd> to controller corresponding to motor <mot_num> do not wait for an answer.

    pi_e753_get_pos
    Usage: pi_e753_get_pos (<mot_num>)
    Returns the setpoint read from the controller.

    pi_e753_get_real_pos
    Usage: pi_e753_get_real_pos (<mot_num>)
    Returns the position given by the capacitive captor.

    pi_e753_set_pos
    Usage: pi_e753_set_pos (<mot_num>, <position>)
    Sends to controller of axis corresponding to <mot_num> a move to <position> command. Sends "MOV 1 <position>"

    pi_e753_set_open_loop_pos
    Usage: pi_e753_set_open_loop_pos (<mot_num>, <position>)
    Sends to controller of axis corresponding to <mot_num> a move to <position> command. Sends "SVA 1 <position>"

    test_status
    Usage: test_status


    pi_e753_get_err
    Usage: pi_e753_get_err (<mot_num>)
    Returns the error code read from the controller. ERR? command clean the last error code seen.

    pi_e753_get_status
    Usage: pi_e753_get_status (<mot_num>)


    pi_e753_get_closed_loop_status
    Usage: pi_e753_get_closed_loop_status (mot_num)
    Returns 1 if closed loop is active Returns 0 if closed loop is NOT active Returns -1 otherwise

    pi_e753_get_ont_status
    Usage: pi_e753_get_ont_status (<mot_num>)
    Returns the individual "on-target status" of axis corresponding to motor <mot_num> Sends "ONT?

    pi_e753_get_motion_status
    Usage: pi_e753_get_motion_status (<mot_num>)
    Returns the "motion status" of axis corresponding to motor <mot_num> Sends "#5"

    pi_e753_stop
    Usage: pi_e753_stop (<mot_num>)
    Sends to controller of motor <mot_num> a stop command. Sends "STP" (no HLT in e-753...)

    pi_e753_check_ctrl
    Usage: pi_e753_check_ctrl(mot_num)
    Checks if controller is responding Sends "IDN?"

    pi_e753_config
    Usage: pi_e753_config ()
    Called by spec after reading the config file

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

    pi_e753_cmd
    Usage: pi_e753_cmd ()
    MACRO MOTOR: Called by spec on motor operation.

    pi_e753_c_config
    Usage: pi_e753_c_config ()
    Called by spec after reading the config file

    pi_e753_c_cmd
    Usage: pi_e753_c_cmd ()
    Called by spec on counter operation.

    _pi_e753_wav_start
    Usage: _pi_e753_wav_start (<mot_num>, <hz>, <ampl>)
    Start waveform generation on motor <mot_num>.
    <mot_num>: SPEC motor number.
    <hz> : frequency of the wave in Hz.
    <ampl> : wave amplitude in microns.

    _pi_e753_wav_stop
    Usage: _pi_e753_wav_stop (<mot_num>)
    Stop waveform generation on motor <mot_num>. Returns the state of waveform generator.

    _pi_e753_wav_action
    Usage: _pi_e753_wav_action (<mot_num>, <action>)
    Starts or stop waveform generation on motor <mot_num>. Returns the state of waveform generator.

    _pi_e753_wav_status
    Usage: _pi_e753_wav_status (<mot_num>)
    Returns non null if a waveform is beeing generated on motor <mot_num>.

Filename: pi_e753.mac
Author: BLISS 2006
$Revision: 1.14 $ / $Date: 2020/02/28 09:26:11 $
$RCSfile: pi_e753.mac,v $
Last mod.: 28/02/2020 10:26 by witsch