# d_in()

Reads a 32-bit digital input port.

Note that for some port types, such as 8255 ports, if the port is configured for DIGITALOUT, this function will provide readback of the last output value.

## Prototype

d_in_32(board_num, port_type)

## Parameters

board_num (int)

The number associated with the board when it was installed with InstaCal or created with create_daq_device().

port_type (DigitalPortType)

The digital port to read. Some hardware allows readback of the state of the output using this function; refer to board-specific information for support information.

## Returns

- The digital input value (int)

## Notes

- Port size can vary. The return value is 0 to 65535 for a 16-bit port, 0 to 255 for an 8-bit port, and 0 to 15 for a 4-bit port. Port size can vary. The return value is 0 to 2**32 - 1 for a 32-bit port, 0 to 2**24 - 1 for a 24-bit port, 0 to 65,535 for a 16-bit port, 0 to 255 for an 8-bit port, and 0 to 15 for a 4-bit port.
- Refer to board-specific information for valid PortType values.