cardSwapByteOrder

cardSwapByteOrder — controls byte order of 16-bit point access.

Synopsis

       
(cardSwapByteOrder 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

(cardSwapByteOrder 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.

[Note]

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

Example

The following command would swap the byte order of card 0.

(cardSwapByteOrder 0 1)