# InWord()

Reads a word from a hardware register on a board.

Member of the MccBoard class.

## Function Prototype

VB .NET

Public Function InWord(ByVal portNum As Integer) As Integer

C# .NET

public int InWord(int portNum)

## Parameters

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).

Set this parameter to the offset for the desired register. This method takes care of adding the base address to the offset, so that the board's address can be changed without changing the code.

## Returns

- The current value of the specified register

## Notes

- InByte() is used to read 8 bit ports. InWord() is used to read 16-bit ports.
- This method was designed for use with ISA bus boards. Use with PCI bus boards is not recommended.