esrf

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

FLEXDC_TCP.MAC
See other macros in category: Positioning
Description:
    Macro motors for FlexDc (TCP/IP) controller from Nanomotion
Documentation:
    DESCRIPTION
    Configuring macro motors
    1) You must have an entry in "MOTORS" table for each controller
    - The "DEVICE" field must be set to string "flexdc_tcp"
    - The "ADDR" must be set to the TCP name of your controller (with port)
    - The "NUM" should be set to 2
    - The "TYPE" field must be set to "Macro Motors"
    2) For each axis you must define a motor with:
    - The "Controller" field set to "MAC_MOT"
    - The "Unit" field, numbered from 0, must be set to the MOTORS entry.
    - The "Chan" field, numbered from 0, must be set to the channel on the FLEXDC_TCP controller
    - Optional parameter "status_po_cmd" set to non zero if status should wait for power cut (dead zone)
    In order to configure a macro counter:
    1) You must have a "SCALERS" defined with:
    DEVICE set to "flexdc_tcp_c"
    TYPE set to "Macro Counter"
    NUM must be set also
    2) Per axis you must define a counter with:
    Device set to "MAC_CNT"
    Mnemonic what you want.
    parameters "motor" -> mnemonic of the motor to reflect position.
    Unit do not mind
    Chan do not mind


Macros:
    flexdc_tcp_show
    Usage: flexdc_tcp_show motor
    Print out all information from the controller concerning the specified motor

    flexdc_home
    Usage: flexdc_home (<mot_num>)
    Runs a homing and wait for completion : in case of Ctrl-C it sends an ABORT.

    _fdc_abort
    Usage: _fdc_abort (<mot_num>)
    Sends a stop command to flex controller axis coresponding to motor <mot_num>

    flexdc_tcp_home
    Usage: flexdc_tcp_home (<mot_num>)
    Runs the homing procedure.

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

    flexdc_tcp_par
    Usage: flexdc_tcp_par(mot_num, key, todo, p1, p2)
    Called by spec after reading the config file, after calling _config() and only if parameters are set in the config file for a motor.

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

    flexdc_tcp_get_pos
    Usage: flexdc_tcp_get_pos(mot_num)


    flexdc_tcp_get_read_pos
    Usage: flexdc_tcp_get_read_pos(mot_num)


    flexdc_tcp_get_vel
    Usage: flexdc_tcp_get_vel(mot_num)


    flexdc_tcp_get_read_vel
    Usage: flexdc_tcp_get_read_vel(mot_num)


    flexdc_tcp_get_sr
    Usage: flexdc_tcp_get_sr(mot_num)


    flexdc_tcp_get_po
    Usage: flexdc_tcp_get_po(mot_num)


    flexdc_tcp_get_pe
    Usage: flexdc_tcp_get_pe(mot_num)


    flexdc_tcp_get_param
    Usage: flexdc_tcp_get_param(mot_num, param)


    flexdc_tcp_set_pos
    Usage: flexdc_tcp_set_pos(mot_num, position)


    flexdc_tcp_set_vel
    Usage: flexdc_tcp_set_vel(mot_num, velocity)


    flexdc_tcp_set_param
    Usage: flexdc_tcp_set_param(mot_num, param, val)


    flexdc_tcp_get_status
    Usage: flexdc_tcp_get_status(mot_num)


    flexdc_tcp_show_CA
    Usage: flexdc_tcp_show_CA(mot_num)


    flexdc_in_target
    Usage: flexdc_in_target(mot_num)


    _flexdc_tcp_wr
    Usage: _flexdc_tcp_wr (dev, cmd)
    Sends <cmd> command to <dev> device. <cmd> is checked to fix terminators. Returns string ".error." if no echo from controller Returns empty string otherwise

    _flexdc_tcp_query
    Usage: _flexdc_tcp_query (dev, cmd)
    Returns string ".error." if no echo from controller Returns empty string if no answer from controller

    _flexdc_tcp_connect
    Usage: _flexdc_tcp_connect (dev)
    Try to open a connection to the specified device. Returns 0 if success otherwise string ".error.".

    flexdc_tcp_c_config
    Usage: flexdc_tcp_c_config(count_num, type, p1, p2, p3)
    Called by spec after reading the config file

    flexdc_tcp_c_cmd
    Usage: flexdc_tcp_c_cmd(count_num, key, p1, p2)
    Called by spec on counter operation.

    flexdc_tcp_vel_config
    Usage: flexdc_tcp_vel_config(count_num, type, p1, p2, p3)
    Called by spec after reading the config file

    flexdc_tcp_vel_cmd
    Usage: flexdc_tcp_vel_cmd(count_num, key, p1, p2)
    Called by spec on counter operation.

    flexdc_tcp_sr_config
    Usage: flexdc_tcp_sr_config(count_num, type, p1, p2, p3)
    Called by spec after reading the config file

    flexdc_tcp_sr_cmd
    Usage: flexdc_tcp_sr_cmd(count_num, key, p1, p2)
    Called by spec on counter operation.

    flexdc_tcp_po_config
    Usage: flexdc_tcp_po_config(count_num, type, p1, p2, p3)
    Called by spec after reading the config file

    flexdc_tcp_po_cmd
    Usage: flexdc_tcp_po_cmd(count_num, key, p1, p2)
    Called by spec on counter operation.

Filename: flexdc_tcp.mac
Author: CG+MP BLISS (Original 02/2010).
$Revision: 1.3 $ / $Date: 2013/07/01 05:17:22 $
Last mod.: 01/07/2013 07:17 by perez