• Libraries
  • Shop
  • Doc
  • Free Modbus
  • Support
  • Login
FieldTalk Modbus Master Library for .NET
FieldTalk Modbus Master Library for .NET
Namespaces
FieldTalk.Modbus.Master
MbusSerialClientBase Class
MbusSerialClientBase Methods
enableRs485Mode Method
openProtocol Method
Click or drag to resizeClick or drag to resize

MbusSerialClientBaseenableRs485Mode Method

Enables RS485 mode

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 enableRs485Mode(
	int rtsDelay
)
Public Function enableRs485Mode ( 
	rtsDelay As Integer
) As Integer
public:
int enableRs485Mode(
	int rtsDelay
)

Parameters

rtsDelay
Type: SystemInt32
Delay time in ms (Range as 0 - 100000) which applies after the transmit buffer is empty. 0 disables this mode.

Return Value

Type: Int32
BusProtocolErrors.FTALK_SUCCESS on success or error code. See BusProtocolErrors for possible error codes.
Remarks
In RS485 mode the RTS signal can be used to enable and disable the transmitter of a RS232/RS485 converter. The RTS signal is asserted before sending data. It is cleared after the transmit buffer has been emptied and in addition the specified delay time has elapsed. The delay time is necessary because even the transmit buffer is already empty, the UART's FIFO will still contain unsent characters.

The use of RTS controlled RS232/RS485 converters should be avoided if possible. It is difficult to determine the exact time when to switch off the transmitter with non real-time operating systems like Windows and Linux. If it is switched off to early characters might still sit in the FIFO or the transmit register of the UART and these characters will be lost. Hence the slave will not recognize the message. On the other hand if it is switched off too late then the slave's message is corrupted and the master will not recognize the message.

Note Note
The delay value is indicative only and not guaranteed to be maintained. How precise it is followed depends on the operating system used, it's scheduling priority and it's system timer resolution.
Note Note
A protocol must be closed in order to configure it.
See Also

Reference

MbusSerialClientBase Class
FieldTalk.Modbus.Master Namespace
FieldTalk Modbus Master Library for .NET
Library version 2.15.2
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.