Documentation
FieldTalk Modbus Slave Library for .NET
MbusDataTableInterfacewriteFileRecord Method |
Override this method to implement a Data Provider function to write
File Records which is Modbus function code 21 (15 hex).
Namespace: FieldTalk.Modbus.Slave
Assembly: FieldTalk.Modbus.Slave (in FieldTalk.Modbus.Slave.dll) Version: 2.11.0-eval+eb1ecbe71c969eff5d7c05d58da16dade0474678
protected virtual bool writeFileRecord( int refType, int fileNo, int startRef, short[] regArr )
Parameters
- refType
- Type: SystemInt32
Reference type (typically this is 6) - fileNo
- Type: SystemInt32
File number (typically 0, 1, 3 or 4) - startRef
- Type: SystemInt32
Record Number (equivalent to the start register) - regArr
- Type: SystemInt16
Buffer which contains the received data
Return Value
Type: Booleantrue indicates a successful access. The Server Engine will send a positive reply to the master.
false indicates that access has been denied or is out of range. The Server Engine will reply to the master with an exception reply message
When a slave receives a write request for function code 21 it
calls this method to pass the data to the application.
Required: No
Default Implementation: Returns false which indicates to Server Engine that this address range is unsupported.