# Read Multiple Input Lines

Use the ReadDiscrete function Functions are tools that are available in Spreadsheet for processing and analyzing acquisitions or other results. You can add functions to your Spreadsheet job to create tool chains and produce results for specific applications. to read multiple input lines.

The Number of Bits parameter of the function determines the number of continuous bits that the function reads from the input lines. To read multiple lines, set the Number of Bits to a value higher than 1, depending on the Start Bit parameter value and the vision system used.

Consider the following for this example:

- An In-Sight 2800 vision system is used.

- The vision system receives input on the bidirectional lines INOUT2 and INOUT3, which are set to input:

To read from the INOUT2 and INOUT3 input lines, the Start Bit needs to be 2, and the Number of Bits needs to be 2. Insert a ReadDiscrete function to a cell with the following parameters:

    ReadDiscrete($A$0,2,2)

The value the function returns is the converted decimal value of the binary value of the input bits. For example, if the function returns 2, it means that a signal is received on input line 3, which is the second bit that is read:

Line Index | Input Line | Bit Read
--- | --- | ---
2 | INOUT2 | 0
3 | INOUT3 | 1