beautypg.com

Inbyte.vi / inword.vi – Measurement Computing UL for NI LabVIEW User Manual

Page 107

background image

Universal Library Virtual Instruments (VIs)

Miscellaneous VIs

InByte.VI / InWord.VI

Reads a byte or a word from a hardware register on a board.

Summary:

Inputs:

BoardNum

[U32] - The board number assigned when installed with InstaCal. Can

be 0 to 100

PortNum

[U32] - Register on the board to read.

Outputs:

DataValue

[I32] - Value read from port.

ErrCode

[I32] - Error code. See ErrMsg.VI

Arguments:

BoardNum

The board number associated with a board when it was installed.

PortNum

Register within the board. Boards are set to a particular base address. The registers

on the boards are at addresses that are offsets from the base address of the board
(BaseAdr + 0, BaseAdr + 2, etc.). This argument should be set to the offset for the
desired register. This function takes care of adding the base address to the offset so
that the board's address can be changed without changing the code.

DataValue

Current value of the specified register.

ErrCode

Error code from the Universal Library. Zero if no error occurred. Use the ErrMsg

VI to convert ErrCode into a readable string.

Notes:

InByte.VI is used to read eight-bit ports. InWord.VI is used to read 16-bit ports.

107