PreviousNext
Help > Modbus Steps Reference > Standard Functions > Read Discrete Inputs (F02)
Read Discrete Inputs (F02)

This function is used to read from 1 to 2000 contiguous status of discrete inputs in a remote device. You can specify the starting address, i.e. the address of the first input specified, and the number of inputs. The inputs are addressed starting at zero. Therefore discrete inputs numbered 1-16 are addressed as 0-15. Status is indicated as True= ON; False= OFF.

To configure this step open the Edit Step window from Sequence editor.

In the configuration dialog box, you can change the following settings:

·          Connection Name: connection used to communicate with the device.

·          Address: starting address of the discrete inputs to read.

·          Nb Inputs: number of discrete inputs to read (1 to 2000 inputs) from the starting address.

The state of the inputs is stored in Step.Result.InputsStatus as a Boolean array. Bit 0 is stored in the first element of the array. In the report, the status of the inputs is represented with string where the bit 0 is on left side.

Note  Please read Execution Trace and Steps Variables chapter to learn more about accessing configuration of this step and how to access data read.

 

See Also

Open/Close Functions

Custom Functions