# ReadDiscrete

Reads a range of bits from a discrete input channel.

Inputs

Parameter | Description
Event | Specifies the update event on which to read.
Start Bit | Specifies the first bit of the set. The value of this parameter varies: The default value is 1. You cannot set the Start Bit to 0. The minimum allowed value is 1. The maximum allowed value varies depending on hardware and the number of input lines: In-Sight 2800: 3 In-Sight 3800: 3
Number of Bits | Specifies the number of bits in the set. The value of this parameter varies: The default value is 1. The minimum allowed value is 1. The maximum allowed value varies depending on hardware and the number of input lines: In-Sight 2800: 3 In-Sight 3800: 3 Note: Number of Bits varies depending on hardware support and the number of input lines.

Note: You can configure Discrete I/O lines to be either an input or output, which affects the maximum values for Start Bit and Number of Bits.

## ReadDiscrete

Outputs

Returns | The positive integer value read, or #ERR. The Start Bit and Number of Bits must fall within the range of input bits, or the function returns #ERR.