FieldTalk™ Modbus Master .NET Library

MbusMasterFunctions.readInputDiscretes Method (Int32, Int32, Boolean[], Int32)

Modbus function 2 (02 hex), Read Inputs Status/Read Input Discretes.

[Visual Basic]
Overloads Public Function readInputDiscretes( _
   ByVal slaveAddr As Integer, _
   ByVal startRef As Integer, _
   ByVal bitArr As Boolean(), _
   ByVal numDiscretes As Integer _
) As Integer
[C#]
public int readInputDiscretes(
   int slaveAddr,
   int startRef,
   bool[] bitArr,
   int numDiscretes
);

Parameters

slaveAddr
Modbus address of slave device or unit identifier (Range: 1 - 255)
startRef
Start reference (Range: 1 - $10000)
bitArr
Buffer which will contain the data read.
numDiscretes
Number of inputs to be read (Range: 1-2000).

Return Value

BusProtocolErrors.FTALK_SUCCESS on success or error code. See BusProtocolErrors for possible error codes.

Remarks

Reads the contents of the discrete inputs (input status, 1:00000 table).

Note    No broadcast supported

See Also

MbusMasterFunctions Class | FieldTalk Namespace | MbusMasterFunctions.readInputDiscretes Overload List