• Libraries
  • Shop
  • Doc
  • Free Modbus
  • Support
  • Login
FieldTalk Modbus Slave Library for .NET
FieldTalk Modbus Slave Library for .NET
Namespaces
FieldTalk.Modbus.Slave
MbusDataTableInterface Class
MbusDataTableInterface Methods
getMasterInfo Method
readCoilsTable Method
readDeviceIdentification Method
readEnronRegistersTable Method
readExceptionStatus Method
readFileRecord Method
readHoldingRegistersTable Method
readInputDiscretesTable Method
readInputRegistersTable Method
reportRunIndicatorStatus Method
reportSlaveId Method
timeOutHandler Method
writeCoilsTable Method
writeEnronRegistersTable Method
writeFileRecord Method
writeHoldingRegistersTable Method
Click or drag to resizeClick or drag to resize

MbusDataTableInterfacereadInputDiscretesTable Method

Override this method to implement a Data Provider function to read Coils.

Namespace:  FieldTalk.Modbus.Slave
Assembly:  FieldTalk.Modbus.Slave (in FieldTalk.Modbus.Slave.dll) Version: 2.11.0-eval+eb1ecbe71c969eff5d7c05d58da16dade0474678
Syntax
C#
VB
C++
Copy
protected virtual bool readInputDiscretesTable(
	int startRef,
	bool[] bitArr
)
Protected Overridable Function readInputDiscretesTable ( 
	startRef As Integer,
	<OutAttribute> bitArr As Boolean()
) As Boolean
protected:
virtual bool readInputDiscretesTable(
	int startRef, 
	[InAttribute] [OutAttribute] array<bool>^ bitArr
)

Parameters

startRef
Type: SystemInt32
Start register (Range: 1 - 65536)
bitArr
Type: SystemBoolean
Buffer which has to be filled with the reply data (Length: 0 - 2000). Each char repesents one discrete!

Return Value

Type: Boolean
true indicates a successful access and that valid reply data is contained in regArr. The Server Engine will reply the data passed in regArr 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

Remarks
When a slave receives a poll request for the 0:00000 data table it calls this method to retrieve the data.

Required: No

Default Implementation: Returns false which indicates to Server Engine that this address range is unsupported.

Examples
A simple and very common implementation is to map the Input Discretes to the same address space than the Coils table:
C#
VB
C++
Copy
protected override int readInputDiscretesTable(int startRef, bool[] bitArr)
{
   return readCoilsTable(startRef, bitArr);
}
Protected Overrides Function readInputDiscretesTable(ByVal startRef As Integer, ByVal bitArr() As Boolean) As Integer
    Return readCoilsTable(startRef, bitArr)
End Function

No code example is currently available or this language may not be supported.

See Also

Reference

MbusDataTableInterface Class
FieldTalk.Modbus.Slave Namespace
FieldTalk Modbus Slave Library for .NET
Library version 2.11.0
Speak to the Experts
Modbus Organization Member logo

We are member of the Modbus Organization, Inc.

Buy with Confidence
30-day money back guarantee All our FieldTalk web sales are backed by a 30-day Money Back Guarantee.
We Accept
Bank VISA MasterCard PayPal
Customer Info
  • Info & Contact
  • Customer Login
  • Terms of Service
  • Terms of Sale
  • Privacy Policy
© 2005-2025 proconX Pty Ltd. All rights reserved. proconX and FieldTalk are trademarks of proconX Pty Ltd.
All other trademarks and registered trademarks appearing on www.modbusdriver.com are the property of their respective owners.