FieldTalk Modbus Master Library for .NET
FieldTalk Modbus Master Library for .NET
Namespaces
FieldTalk.Modbus.Master
MbusMasterFunctions Class
MbusMasterFunctions Methods
readFileRecord Method
readFileRecord Method (Int32, MbusMasterFunctions.FileSubRequest[])
readFileRecord Method (Int32, Int32, Int32, Int32, Int16[])

# MbusMasterFunctions readFileRecord Method (Int32, Int32, Int32, Int32, Int16 )

Modbus function 20, Read File Record.

Namespace: FieldTalk.Modbus.Master
Assembly: FieldTalk.Modbus.Master (in FieldTalk.Modbus.Master.dll) Version: 2.15.2-eval+3d8362b4bb861c05760d48b11d303e954bb8597c
Syntax
C#
VB
C++
Copy

    public int readFileRecord(
    	int slaveAddr,
    	int refType,
    	int fileNo,
    	int recordNo,
    	short[] recordArr
    )

    Public Function readFileRecord (
    	slaveAddr As Integer,
    	refType As Integer,
    	fileNo As Integer,
    	recordNo As Integer,
    	<OutAttribute> recordArr As Short()
    ) As Integer

    public:
    int readFileRecord(
    	int slaveAddr,
    	int refType,
    	int fileNo,
    	int recordNo,
    	[InAttribute] [OutAttribute] array<short>^ recordArr
    )

#### Parameters

slaveAddr
  Type: System
  Int32
  Modbus address of slave device or unit identifier (Range: 0 - 255)
refType
  Type: System
  Int32
  Reference type (Must be specified as 6).
fileNo
  Type: System
  Int32
  File number (Range 1-65535). 3 is the input registers file, 4 is the holding registers file.
recordNo
  Type: System
  Int32
  Record Number (Range: 0 - 65535). The first record to write to, 0-based numbering.
recordArr
  Type:
  System
  Int16
  Buffer which will be filled with the data read (Range 1-125)

#### Return Value

Type: Int32
BusProtocolErrors.FTALK_SUCCESS on success or error code. See BusProtocolErrors for possible error codes.
Remarks
Performs a file record read for a single subrequest.

Note
No broadcast supported

See Also

#### Reference

MbusMasterFunctions Class
readFileRecord Overload
FieldTalk.Modbus.Master Namespace
FieldTalk Modbus Master Library for .NET
Library version 2.15.2