esrf

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

VMEDS.MAC
See other macros in category: All
Description:
    Macros for accessing a VME bus through the vmeds device server.
Documentation:
    OVERVIEW
    This macro set uses calls to the vmeds device server to emulate the spec functions for data access through VME controllers.
    Only the memory area configured in the device server is accessible and all the functions require a first argument with the name of the device and the memory offset used by the device server to calculate absolute addresses.
    The data types available are "D8" (the default), "D16" and "D32" and can be specified in the argument <dmode>.
    The device server allows two types of data transfer a slower one (the default) that uses system functions to access the memory and can catch bus errors and a faster one that makes memory read/write operations directly.
    The fast mode can be selected by using the string "fast" as last argument. This mode should only be used when one is sure that the hardware is present and the read/write operation is allowed, otherwise a device server crash may happen.
    (NOTE: In the current version data blocks of more than one item cannot be written in the VME memory using the fast mode)

    EXAMPLE
    vmeds_get("isg/vmeds109/1", 0x400)
    Reads a single byte from offset 0x400.
    vmeds_put("isg/vmeds109/1", 0x000, 0xffff, "D16")
    Writes the word 0xffff at offset 0.
    vmeds_move("isg/vmeds109/2", 0xff00, mdata, 256, "D32", "fast")
    Reads the first 256 long words starting at offset 0xff00 into the array mdata using fast access mode.


Macros:
    vmeds_get
    Usage: vmeds_get (<device>, <offset> [, <dmode> [, "fast"]])
    Reads a data item from the VME.

    vmeds_put
    Usage: vmeds_put (<device>, <offset>, <data> [, <dmode> [, "fast"]])
    Writes the data item <data> in the VME.

    vmeds_move
    Usage: vmeds_move (<device>, <from>, <to> [, <cnt> [, <dmode> [, "fast"]]])
    Function that transfers data between the VME and spec. The transfer direction is defined by the <from> and <to> arguments. One of them must be a non-associative array and the other a memory offset in the VME bus. The number of data items copied is given by <cnt> or if it is missing by the number of elements in the array.

    vmeds_fget
    Usage: vmeds_fget (<device>, <offset> [, <dmode>])
    Version of vmeds_get that always uses fast transfer mode.

    vmeds_fput
    Usage: vmeds_fput (<device>, <offset>, <data> [, <dmode>])
    Version of vmeds_put that always uses fast transfer mode.

    vmeds_fmove
    Usage: vmeds_fmove (<device>, <from>, <to> [,<cnt> [, <dmode>]])
    Version of vmeds_move that always uses fast transfer mode.

Internal Macros:
Filename: vmeds.mac
Author: P.Fajardo, (Original 8/98). $Revision: 3.0 $ / $Date: 1999/03/17 10:12:51 $
Last mod.: 08/08/2002 14:37 by berruyer