Windmill Software Ltd
|
![]() March 2011 |
RS232 Handshaking and Flow Control |
New: Our Windmill software suite to gather data from almost any instrument with an RS232 serial port, plus serial trouble-shooting software is now reduced from £145 to £50. Compatible with Windows 7. From February 2011, our Monitor newsletter subscribers may download free COM port trouble-shooting software, together with a trial of the Windmill data acquisition software. When to use RS232 Handshaking or Flow Control?The RS232 protocol includes handshaking (also known as flow control). Although this is often not necessary, it has two functions.
The fact that your instrument comes equipped with inputs and outputs that can be used for handshaking is no guarantee that handshaking is needed. Unless you know differently, when connecting the instrument to the PC it is best to start with the assumption that handshaking is not required. If you start with no handshaking what symptoms might indicate that it really is needed?. Well one possibility is that the computer misses part of a message because its input buffer overflows. With Windmill's COMIML software the buffers are 3000 bytes long so you are unlikely to be bothered by this problem. The other possibility is that the instrument misses part of a message sent by the computer. This will probably cause the instrument not to work properly. There are two types of handshaking: hardware and software. Software Handshaking: Xon \ XoffXon \ Xoff Handshaking is a software protocol that is often used to control data flow. Suppose that the computer were sending data to an instrument which could accept no more data for the time being - the instrument would send the single Xoff character to the computer which would stop sending data until it received an Xon character to restart transmission. The same arrangements would apply for the reverse direction of data flow. Xon is ASCII character 17 and Xoff ASCII character 19. Hardware HandshakingHandware handshaking is not often used, so you can tie any potential handshake lines to fixed voltages so that they do not affect operation. In fact many manufacturers add tying resistors to handshake lines so that if you do not want to use them you simply make no connection. If you do decide that handshaking must be used then you need to know which lines your communications software (such as COMIML) and your instrument use. COMIML, for example, uses the DTR (Data Terminal Ready) line to indicate when it is able to receive data. Other programs may use the RTS (request to Send) line. The instrument will probably use the CTS (Clear To Send) line to indicate when it is ready to receive data. Once you select hardware handshaking in COMIML, the state of the CTS input to the computer becomes important. When hardware handshake is not selected the CTS line state is ignored. COMIML keeps the DTR output permanently high.
Our free ComDebug software lets you see, and set, the state of the DTR, RTS, CTS and other COM port lines. Related Topics: |
Home | Windmill 7 Software | Data Acquisition Shop | Contact Us | Contents | Search
| Copyright Windmill Software Ltd 2001 PO Box 58, North District Office, Manchester, M8 8QR, UK. E-mail, Tel: +44 161 833 2782 Designed by Studholme.net |