esrf

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

ICEPAP.MAC
See other macros in category: Positioning Obsolete
Description:
    Macros to control ISG ICEPAP motor controller as a macro motor and to configure macro counters to read DRIVERs temperatures (obsolete: use ice.mac instead)
Documentation:
    DESCRIPTION
    Configuring macro motors
    1) You must have an entry in "MOTORS" table for each icepap MASTER
    - The "DEVICE" field must be set to "icepap"
    - The "ADDR" must be set to the MASTER network name. The communication port can optionaly be specified also (ex: "isgtmp5:5000")
    - The "NUM" should be set to 128
    - 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 must be set to the MOTORS entry.
    - The "Module" field must be set to the ICEPAP rack numer (seen on the red 7 segments display of the top left hand card)
    - The "Chan" field must be set to the DRIVER address (ex: 5 for the 5th DRIVER of crate 0 or ex: 23 for the 3rd DRIVER of crate 2)
    - Example: "0/1/2" refers to the first icepap controller declared, and the 2nd DRIVER of the rack having the number "1" on its display.
    - The "Generic parameter 1" parameter (type "m" to access it) is the motor type (ex: "pk267"). For the moment the motor types and their parameters are defined in: ~blissadm/local/spec/userconf/icepap_catalogue
    - The "Generic parameter 2" and nexts can be any of the following options:
    - "SWOFF" to disable limitswitches
    - "DIRINV" to reverse the motor direction according to limitswitches
    Configuring macro counters to read a single DRIVER
    1) You must have a "SCALER" define with "icepapcnt" as "DEVICE" and "Macro Counter" as "TYPE".
    2) You must define a counter with "MAC_CNT" as "Device".
    - The "Unit" field must be set to the SCALER entry.
    - The "Chan" field must be set to the DRIVER address (ex: 5 for the 5th DRIVER of crate 0 or ex: 23 for the 3rd DRIVER of crate 2)
    Configuring macro counters to read several DRIVERs
    1) You must have a "SCALER" define with "icepapcalc" as "DEVICE" and "Macro Counter" as "TYPE"
    2) For each counter declared:
    - The "Device" field set to "MAC_CNT"
    - The "Unit" field must be set to the SCALER entry.
    - The "Chan" field is not used.
    - The "Misc 1" parameter (type "s" to access it) is the crate number (ex: 0)
    - The "Misc 2" parameter is the type of calculation done on the DRIVERs temperatures of the crate. Possible values are "max", "min", "avg"


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

    icepap_reset
    Usage: icepap_reset [hostname[:port]]
    Reset all the racks of the specified ICEPAP MASTER

    icepap_lock
    Usage: icepap_lock axis
    CONFIG LOCK: Add a lock on the specified axis (ex: 0/2)

    icepap_unlock
    Usage: icepap_unlock axis
    CONFIG LOCK: Remove a lock on the specified axis (ex: 0/2)

    icepap
    Usage: icepap [hostname[:port]]
    Console implementation to communicate to icepap MASTER

    icepap_prog
    Usage: icepap_prog [hostname[:port] [file] [addr] [options]]
    Program a the ICEPAP module with the specified binary file

    icepap_mdspreset
    Usage: icepap_mdspreset [hostname:port]
    Reset the MASTER DSP

    icepap_ddsppgm_sl
    Usage: icepap_ddsppgm_sl [hostname:port [driver]]
    Program one or all DRIVER DSP numbered from 1 to 8 using the backplane serial line and the DDSP programm taken from MDSP flash (no binary transferred)

Internal Macros:
    icepap_fiforst
    Usage: icepap_fiforst(dev)
    Reset socket communication and MASTER FIFOs

    icepap_cleanup
    Usage: icepap_cleanup(dev)
    Call on <Ctrl-C>

    icepapdebug_init
    Usage: icepapdebug_init
    Needed to initialize debug print out macro the first time the file is loaded.

    icepap__tocase
    Usage: icepap__tocase (string, case)
    Convert to lower (case==1) or to upper (case==0) case the string passed

    icepap__tolower
    Usage: icepap__tolower (string)
    Return the lower string of the string passed

    icepap__toupper
    Usage: icepap__toupper (string)
    Return the upper string of the string passed

    icepap_read_cat
    Usage: icepap_read_cat()
    Read the catalogue of motor parameters from a file

    icepap_chkerr
    Usage: icepap_chkerr (ans)
    Check if the answer given contains an ERROR and if yes request the error message

    icepap_set_mot
    Usage: icepap_set_mot (device,crate,board,motor_ref,mne)
    Set for a motor its parameter according to catalogue. The motor is specified by crate and board. The mne field is for debug print out only. The device is the network name of the MASTER.

    icepap_specver
    Usage: icepap_specver()
    MACRO MOTOR: Check that spec is not too old to support controller parameters in the config file. Return 0 if > = 5.06.04-4

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

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

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

    _icepap_islockfile
    Usage: _icepap_islockfile()
    CONFIG LOCK: Check that lock file exist and create empty if not

    _icepap_lock
    Usage: _icepap_lock (axis,lock)
    CONFIG LOCK: Add or remove (lock=1 or 0) a lock on the specified axis (ex: 0/2)

    _icepap_islock
    Usage: _icepap_islock (axis)
    CONFIG LOCK: Return 1 if a lock exist for the specified axis (ex: 0/2) Return 0 if there is no lock. Return -1 in case of error.

    _icepapcnt_gettemp
    Usage: _icepapcnt_gettemp (hostname:port, address)
    MACRO COUNTER: Read the temperature on the specified address Returns 0 in case of error

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

    icepapcnt_cmd
    Usage: icepapcnt_cmd(num,key,p1,p2)
    MACRO COUNTER: Called by spec on counter operation.

    icepapcalc_config
    Usage: icepapcalc_config(num,typ,p1,p2,p3)
    MACRO COUNTER: Called by spec after reading the config file

    icepapcalc_cmd
    Usage: icepapcalc_cmd(num,key,p1,p2)
    MACRO COUNTER: Called by spec on counter operation.

    _icepap_check
    Usage: _icepap_check (hostname:port)
    Do not touch, needed by the "raleur"

    _icepap_close
    Usage: _icepap_close (hostname:port)


    _icepap_wr
    Usage: _icepap_wr (dev,addr,cmd)


    _icepap_wrrd
    Usage: _icepap_wrrd (dev,addr,cmd)


    _icepap_query
    Usage: _icepap_query (dev,addr,cmd)


    icepaptst
    Usage: icepaptst hostname:port crate board
    Custom debug sequence (H.GONZALEZ)

    icepap_massacre
    Usage: icepap_massacre hostname:port
    Intensive test loop on the specified Icepap MASTER (ex: "isgtmp5:5000")

Filename: icepap.mac
Author: MP BLISS (Original 8/05).
$Revision: 1.3 $ / $Date: 2008/07/17 14:29:34 $
Last mod.: 12/08/2008 16:25 by rey