Cascade Driver for Hilscher Fieldbus CIF Cards: Version 4.1
Prev |  | Next

# swapByteOrder

swapByteOrder -- controls byte order of 16-bit point access.

## Synopsis

    (swapByteOrder card_id value)

## Parameters

`card_id`

  The ID of the card.

`value`

  Use `1` for TRUE or `0` for FALSE. If TRUE, the byte order is swapped, if FALSE the byte order remains unchanged.

## Returns

`OK`

        (swapByteOrder card_id value)

Where `value` can be `1` (TRUE) or `0` (FALSE).

## Description

This command controls the byte order of 16-bit point accesses. If set, the bytes are swapped when point data is read or written to the device, otherwise the data is unmodified. No byte swapping is done on block data accesses. DOUBLE and INT16 type points assume bytes are in 'Little Endian' (low byte first) order. This command is used to compensate for cards that use the reverse byte order. The default mode is that bytes are not swapped.

| Some cards may also be configured in hardware to perform byte swapping, in which case this command may not be required.

## Example

        (swapByteOrder t)

Prev | Home | Next
remove | Up | taskstarted

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.