Input Bit

Command

INB <bit number>

Description

The Input Bit command returns the state of the input bits referenced by the parameter. A non-zero value represents a high voltage and a 0 represents a low voltage. This command returns a single bit which is useful for making decisions. However host communication benefits from packed information. Using a controller resident application program it is an option to consolidate input bit status into a single user word if desired.

Escapes

A Parameter Out Of Range Escape Code will be generated if the parameter references an input beyond the range of the controller.

Examples

This list of commands configure DIO 1 as an output, turns DIO 1 off, reads back the value as a input getting a response of 0, and checks the On case as well:

Related Topics

Set Output Bit