Timing of serial events

What is the best pratice of timing in serial communication?


When there is an issue with the communication counterpart, that there MUST be a delay between two telegrams sent from the PC, how do I best implement that?

I have researched the OnTxEmpty event, but it seems to fire the exact same millisecond as i send a buffer of 12 characters to the Tx buffer.

Is the TVaComm component externally buffered by the Windows serial buffer ? 

Some RS485 adapters (half duplex) needs to be controlled by RTS to switch between RX/TX, is this properly supported by TVaComm?

Kind regards
Søren Bech

+1

I want to use these components to talk to modbus clients. Slow 8 bit RS485 devices with low performance. Also modbus expects 3.5+ time unit delays at the end of a message to signal the end.

TVaComm has a read and a write software buffer. As soon as data is written in the write buffer and the serial port hardware buffer (typically a small buffer) is not full, data is written from the software buffer to the hardware port. If you want to delay the writing of data, you'd need to throttle writing data to the VaComm software buffer.