Monitor - ISSN 1472-0221
The Newsletter for Data Acquisition and Control
Issue 288 February 2023

Welcome to Monitor, thank you for subscribing.

You can download Monitor as a pdf file from https://www.windmill.co.uk/monitor/monitor288.pdf.

Follow @DataAcquisition on Twitter Data Acquisition News Feed (RSS)

Contents

* Controlling the flow of data
* Your Data Acquisition Questions Answered: Multiple Temperature Monitoring Points

Controlling the flow of data

Web link: https://www.windmill.co.uk/handshaking.html

Many measurement instruments use serial communications - often via a serial-USB adaptor. When connecting such a measurement instrument you may have to decide whether or not to use flow control (also known as handshaking). Although this is often not necessary, it has two functions.

  1. It allows the computer to stop your instrument from sending data when the computer is not ready for it.
  2. It allows your instrument to prevent the computer from sending data when the instrument not ready for it.
Do you need a handshake to communicate?
Do you need a handshake to communicate?

The fact that your instrument comes equipped with inputs and outputs that can be used for flow control is no guarantee that flow control is needed. Unless you know differently, when connecting the instrument to the computer it is best to start with the assumption that flow control is not required.

If you start with no flow control 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 ComDebug 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 flow control: hardware and software.


Software Flow Control: Xon \ Xoff

Xon \ Xoff Flow Control or 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 Flow Control

Handware flow control is not often used: you can therefore 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 serial communication software lets you see, and set, the state of the DTR, RTS, CTS and other COM port lines.

Setting the state of DTR, RTS, CTS and other COM port lines.


What to do when the Instrument needs DTR Low and RTS high: Removing the Flow Control

Some software, like the Windmill COMIML serial driver, use the DTR line for flow control, setting it high to indicate that it is ready to receive data. Some instruments, though, need DTR to be low and RTS to be high before they will provide data.

In this situation you need to change the connections on the RS232 cable.

Connect pins 8 and 7 (i.e. CTS drives RTS)
Connect pins 1, 4, 6 This should maintain the DTR line in the correct state, by connecting it to DCD and DSR

This would normally be done at the instrument end rather than the computer end of the cable.

Also check that transmit at one end goes to receive at the other.

You can download our ComDebug serial communication and data logging software for free from https://www.windmill.co.uk/serial.html. This communicates and logs data from RS232, RS422, RS485, Modbus and TCP/IP devices.


Your Data Acquisition Questions Answered: Multiple Temperature Monitoring Points

Question

"We wish to record temperature at various points in a room and display the readings on our PC. What would you recommend?"

Answer

To measure the temperature at multiple points in a room take a look at the Microlink 851-TC or the Microlink 751-TC. These allow to you measure up to 16 temperatures using thermocouples. The Windmill software which comes with the hardware will save and display the values in units of your choice on your computer. The readings can be imported into Excel or other software for analysis.

Monitoring temperature
Monitoring Temperatures

Read more about the Microlink 851-TC temperature measurement package.


Subscribe to Monitor

Previous Issue Next Issue