esrf

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

PI_E712 $Revision: 1.2 $
See other macros in category: All
Description:
    Macros to control a piezo PI controller connected via serial line or ethernet.
Documentation:
    DESCRIPTION
    This macro file allows to connect a piezo to a macro motor in SPEC.
    Controllers currently supported are:
    PI E-712 (SERIAL)
    ID01
    PI E-712 (ETHERNET)
    ID13 ID16


    SETUP
    Configuring macro motors
    1) You must have a "MOTORS" defined with:
    DEVICE set to "pi_e712"
    TYPE set to "Macro Motor"
    ADDR set to the address of the controller, examples:
    for SERIAL: "1"
    for ETHERNET: "id13e712"
    NUM must be set also to at least 6
    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 the piezo axis of the controller starting from 1 for the first channel
    Extra motor_par() parameters
    motor_par(motor,"servo")
    Returns non zero if the piezo closed loop is active
    motor_par(motor,"servo",1|0)
    Activates or open the piezo closed loop


Macros:
    piezogcsdebug
    Usage: piezogcsdebug [personal msg]
    Switch on or off the print of debug messages

Internal Macros:
    pi_e712_perr
    Usage: pi_e712_perr(msg)


    pi_e712_prn
    Usage: pi_e712_prn(msg)


    pi_e712_config
    Usage: pi_e712_config(num,type,p1,p2,p3)
    MACRO MOTOR: Called by spec after reading the config file

    pi_e712_cmd
    Usage: pi_e712_cmd(num,key,p1,p2)
    MACRO MOTOR: Called by spec on motor operation.

    pi_e712_par
    Usage: pi_e712_par(num,key,todo,p1)
    MACRO MOTOR: Called by spec on motor operation.

    pi_e712_motputget
    Usage: pi_e712_motputget (motor_num, cmd)
    Send a string command to the controller using the interface configured for the motor specified and waits for the controller answer. Returns an empty string if no error, ".error." otherwise.

    pi_e712_putget
    Usage: pi_e712_putget (dev, interface, cmd)
    Send a string command to the controller using the interface specified and waits for the controller answer. Returns an empty string if no error, ".error." otherwise.

    pi_e712_motput
    Usage: pi_e712_motput (motor_num, cmd)
    Send a string command to the controller using the interface configured for the motor specified. Returns an empty string if no error, ".error." otherwise.

    pi_e712_put
    Usage: pi_e712_put (dev, interface, cmd)
    Send a string command to the controller using the interface specificied. Returns an empty string if no error, ".error." otherwise.

    pi_e712_motget
    Usage: pi_e712_motget (motor_num)
    Waits for a valid string answer from controller using the interface configured for the motor specified. Returns the string ".error." in case of problem.

    pi_e712_get
    Usage: pi_e712_get (dev, interface)
    Waits for a valid string answer from controller using the interface specified. Returns the string ".error." in case of problem.

Filename: pi_e712.mac
Author: BLISS MP+RH 2012
Last mod.: 07/03/2016 17:26 by witsch