esrf

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

See other macros in category: All
Description:
    nd287cnt.mac
Documentation:
    DESCRIPTION
    Macrocounter for reading the ND287 Heidenhain controller, via ethernet
    Spec configuration:
    The controller nd287 must be declared in the SCALERS part
    - When the device has two interfaces X1 & X2 use the controller nd287x2
     
    SCALERS      DEVICE    ADDR  <>MODE  NUM    <>TYPE
        YES       nd287    nd2-28710       1      Macro Counter (for 1 interface)
     
        YES       nd287x2  nd287id011      1      Macro Counter (for 2 interfaces)

    - ADDR: controller IP (host)
     
    The device is defined in the Scaler (Counter) Configuration
     
    Number      Name   Mnemonic  <>Device  Unit  Chan  <>Use As  Scale Factor
        10      enc1       enc1   MAC_CNT    0    0     counter          1 (for 1 interface)

        10      enc1       enc1   MAC_CNT    0    1     counter          1 (for 2 interfaces)
        11      enc2       enc2   MAC_CNT    0    2     counter          1 (for 2 interfaces)

    - Unit refers to the macrocounter index in the SCALERS part


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

    nd287_simul
    Usage: nd287_simul
    toggle simul mode for the present macros.

    nd287_flush
    Usage: nd287_flush (host)
    flushes

    nd287_flushbytes
    Usage: nd287_flushbytes (host)
    flushes one byte

    nd287_ver
    Usage: nd287_ver (host)
    get version reading long words

    nd287_dispos
    Usage: nd287_dispos (host)
    get displayed position reading string.
    - returns numerical value

    nd287_err
    Usage: nd287_err (host)
    read error messages as string

Internal Macros:
    nd287_config
    Usage: nd287_config (mne,type,p1,p2,p3)
    Macro counter mechanism (1 encoder): config

    nd287_cmd
    Usage: nd287_cmd (mne,type,p1,p2,p3)
    Macro counter mechanism (1 encoder): cmd

    nd287x2_config
    Usage: nd287x2_config (mne,type,p1,p2,p3)
    Macro counter mechanism (2 encoders): config

    nd287x2_cmd
    Usage: nd287x2_cmd (mne,type,p1,p2,p3)
    Macro counter mechanism (2 encoders): cmd

    nd287_put
    Usage: nd287_put (host,cmd,framework_length,command_number)
    send a command without arguments (not verbose)

    nd287_putarg
    Usage: nd287_putarg (host,cmd,framework_length,command_number,argument)
    send a command with arguments (not verbose)

    nd287_getheader
    Usage: nd287_getheader (host)
    reads the header of a response
    - return the theoretical number of remaining bytes (verbose)

    _nd287_getheader
    Usage: _nd287_getheader (host)
    reads the header of a response (not verbose)
    - return the theoretical number of remaining bytes

    nd287_putget
    Usage: nd287_putget (host,cmd,framework_lengh, command_number)
    sends a command without arguments, reads the header and the remaining bytes. verbose

    nd287_putgetarg
    Usage: nd287_putgetarg (host,cmd,framework_length,command_number,argument)
    sends a command with argument, reads the header and the remaining bytes. verbose

    nd287_get
    Usage: nd287_get (host)
    read nn bytes

    nd287_verbytes
    Usage: nd287_verbytes (host)
    get version reading bytes

    _nd287_dispos
    Usage: _nd287_dispos (host)
    get displayed position reading string (without printing)
    - returns numerical value

    nd287_disposbytes
    Usage: nd287_disposbytes (host)
    get display position reading bytes

    nd287_errbytes
    Usage: nd287_errbytes (host)
    read error messages as bytes

    nd287_posbytes
    Usage: nd287_posbytes (host)
    read encoder position as integers

    _nd287_extractpos
    Usage: _nd287_extractpos (string)
    extracting numerical value

Filename: nd287cnt.mac
Author: mcd november 2012
Last mod.: 04/05/2017 15:51 by homsrego