Windmill Software Ltd
Data Acquisition Intelligence

October 2011

The Newsletter for PC-Based Data Acquisition and Control
Issue 159        October 2011
--------------------ISSN 1472-0221----------------------

Monitor brings articles on data acquisition techniques, 
application stories, special offers for our readers and 
the highlights of the measurement and control news of 
the month. I hope you find it useful but should you 
wish to remove yourself from our mailing please go to

Today we have a story of how Windmill data logging 
software helped food scientists determine characteristics 
of food cooked by high pressure frying.  We are always 
on the look out for more stories of data acquisition in 
action, so please share your application with us.

Many measurement devices can be connected to a PC via 
RS422 and RS485 cables.  We explain the difference between 
RS232, RS422 and RS485; their advantages and drawbacks; 
and how RS422 and RS485 function in practice.  Don't 
forget that as a subscriber you can download our free 
ComDebug software to log data from RS422, RS485 and RS232 

* Windmill News: Using Windmill to Study Pressure Frying
* Understanding RS422 and RS485
* DAQ News Round-up

Food Scientists Use Windmill to Study Pressure Frying

In industrial cooking, high pressure frying produces 
more juicy and tender food than traditional atmospheric 
frying - the vapour naturally released from the food 
generating the pressure. Food scientists from the 
University of Mersin, Turkey and Lund University, Sweden, 
are studying how modifying factors that affect the boiling 
temperature of the oil in pressure frying may make the 
food more desirable.  As part of their research they are 
using Windmill Software to continually collect data 

The scientists needed to determine accurate temperature 
distribution: from this they could judge texture 
development, colour changes and the formation of 
carcinogenic substance.  

During their experiments they fryed potato slabs in a 
modified pressure cooker.  They placed thermocouples 
in the potato slab and oil to measure temperatures.  

During frying they placed the pressure cooker on an 
analytical scale from Elastocon AB. They connected 
the scale to a PC via RS232.  Windmill software, 
running on the PC, took weight readings throughout the 
frying process.  Loss of water vapour through the 
pressure cooker's safety valve led to a decrease in 
the system mass, and this mass change allowed the 
calculation of the rate of change in mass in the 
potato sample over time.

Every 2 seconds, Windmill recorded the change in mass 
of the frying system. From this, and the temperature 
data, the researchers could determine the heat transfer 
coefficient and thus temperature distribution.

The Windmill RS232 data collection software is 
currently reduced from to £145 to £50 in our on-line 

Further Reading:
Erdogdu, F. and P. Dejmek, "Determination of Heat 
Transfer Coefficient during High Pressure Frying of 
Potatoes", J. Food Eng., 96, 528-532 (2010)

Understanding RS422 and RS485 Wiring

Those familiar with RS232 will know that the standard 
defines how RS232 lines should  be driven electrically: 
what they are called, what information they carry and 
even the connectors and pin numbers to use (see	 if you are 
interested in details of the RS232 standard).  RS422 
and RS485, by contrast, define only the electrical 
characteristics of the driver.

Advantages or RS485 and RS422
RS485 and RS422 drive lines in a differential fashion: 
two wires are required for each signal.  If you wish to 
transmit four signals then eight wires are needed.  The 
figure below shows a single RS485 / RS422 signal being 
transmitted. To transmit a logic 1, line B is high and 
line A is low.  To transmit a logic 0, line B is low and 
line A is high.  The advantage of this arrangement is 
that signals can be transmitted faster and over greater 
distances than is possible with a single wire. 

Diffences Between RS422 and RS485
In both RS422 and RS485, one driver can drive many 
receivers. In RS485 each driver can be switched off 
allowing multiple units to send data over a single 
pair of wires. This is not possible in RS422. This 
extra feature causes extra problems for RS485 units. 
Other differences are small so hereafter I will refer 
to units as RS485 but the remarks apply to RS422 also. 
Interface units often describe themselves as RS422/RS485 
because a RS485 unit which is not using its extra 
capability is RS422 compatible.

When instruments are described as having an RS485 interface 
this tells you nothing for sure about the signals being 
transmitted. Usually though only the Transmit Data (TX) 
and Receive Data (RX) of a normal serial port are converted 
to RS485 or RS422. The other signals of the serial port are 
not used. Three arrangements are commonplace: Write only, 
4-wire (full duplex) and 2-wire (half duplex).

Write Only System: Sending Data Only
In this arrangement the computer sends data out over a 
single RS485 pair of wires to many instruments. It never 
reads any data back. An example of this is the remote 
control of  CCTV cameras. The operator can send out 
messages to move the camera. His feedback is the TV 
picture so no return data is needed. This requires 
only conversion of the RS232 TX signal to RS485.

Full Duplex System: Sending and Receiving Data over 4 Wires
Full Duplex means that data can pass simultaneously 
both to and from the instruments. This requires 
4 wires - one pair to Transmit and one pair to 
Receive.  The computer alone controls the TX 
transmit line. It sends out a message which includes 
an Address. The addressed instrument alone replies by 
driving the RX line. 

This does mean that all the connected instruments must 
use the same software protocol - otherwise there will 
be confusion as to which instrument is being addressed. 
A simple conversion of RS232 to RS485 will suffice 
for this arrangement and no special demands are 
made on general purpose software such as ComDebug.

Half Duplex System: Sending and Receiving Data over 2 Wires
Half Duplex means that data can only pass in one 
direction at a time. In this arrangement both TX 
and RX signals share a single pair of wires.  This 
can save in installation costs. 

The computer drives the lines to send out its 
request message but must turn its driver off to 
allow the instrument to reply.  This is the tricky 
bit.  Many RS232-to-RS485 converters recruit the 
RTS line of the serial port to switch the 
RS485 driver On and Off.  However Windows has never 
made more than a half hearted attempt to support 
such an arrangement. 

The multi-tasking nature of Windows means that it 
is always difficult to make actions occur at exact 
times - in this case there can be a significant 
delay between the request being sent out and the 
driver being switched off. If the instrument starts 
its reply before the switch-off then the start of 
the reply will be missed. Instrument manufacturers 
are forced to find their own solutions to this 
problem. This may include special software, special 
hardware or both. 

In recent years most Serial Ports have been 
implemented as USB-to-Serial arrangements.  These 
units always include a microprocessor and this can 
perform the task of controlling the RS485 driver 
very well. If you need to implement a 2-wire 
RS485 system you should always obtain a USB-to-RS485 
converter that advertises this special feature.  An 
example type that we use is Moxa 1130.  This unit 
automatically switches off the driver when there 
is no more data to send. Such a unit can work 
with general purpose software such as ComDebug or 
HyperTerminal. Beware though that it may not work 
with the special software supplied by instrument 
manufacturers which may assume a particular RS232-
to-RS485 converter and may produce errors when 
used with any other unit. 

Preventing Voltage Reflection
When a signal is sent down a cable there is always 
a reflection voltage which returns up the cable. 
This reflection is bigger as signals' edges get 
faster and lines get longer.  It can be minimised 
by terminating the ends of the line with the 
characteristic impedance of the system.  This is 
120 ohm for RS485. 

How to Arrange the RS485 Wires
Ideally an RS485 system consists of a single 
linear cable (no branches) with 120 ohm resistors 
connected across the 2 wires at each end of the 

RS485 can handle speeds of over 10 Mbits per 
second and line lengths of over 1 km.  If you 
are operating anywhere near these values you must 
arrange your wiring close to the ideal. 

For many applications where baud rates are slow 
(say 9600 baud), and lines are only tens of meters 
long, this is not essential. The wiring requirements 
can then be relaxed to allow cables to run in star 
arrangement from the computer and the terminating 
resistors become optional.

Line Pull Ups: Avoiding Serial Errors
In many RS485 multidrop systems there are times 
when no unit is driving the RS485 lines. They can 
then go to any voltage and may produce serial errors. 
To avoid this it is often necessary to fit resistors 
which pull one line high and the other line low putting 
the line into the passive state. The RS485 converters 
usually include such resistors which can be connected 
if needed. 

Signal Names: Caution Required
You will find that your RS485 signal names for a line 
pair are either A,B or +,-. In an ideal world you would 
simply connect A on the computer to A on the instrument. 
However these names are not consistently applied by 
manufacturers and you may need to connect A on the 
computer to B on the instrument.

Further Reading:
Monitor Issue 32--Serial Communications: RS422, 
RS485 and Modbus

DAQ News Round-up

Welcome to our round-up of the data acquisition and 
control news.  If you would like to receive more 
timely DAQ news updates then either grab our RSS 
newsfeed at 
follow us on Twitter at!/DataAcquisition

Discovery of Duqu malware sparks fears of Stuxnet 2.0
   Security researchers have discovered a new form of 
   malware that appears to have been created by the same 
   people behind the Stuxnet worm uncovered last year.  The 
   malware, named Duqu, gathers intelligence from industrial 
   control system manufacturers, possibly for use in mounting 
   Stuxnet-like attacks against facilitates such as power 
   stations that use the industrial control systems. 
   Source: New Scientist

Wind Energy Test and Monitoring Market Poised for Growth
   According to a report by Frost & Sullivan,  new 
   opportunities are unfolding for the wind test and 
   measurement market as the need for certification and 
   verification of wind turbine components increases. 
   Both component manufacturers and wind power operators 
   need to test, monitor, and inspect procedures during 
   the product's lifecycle.
   Source: Frost & Sullivan

Smart sensors stop flickering wind turbines 
   An algorithm that determines when annoying shadows 
   from wind turbines reach residential areas could end 
   complaints of "shadow flicker".
   Source: New Scientist

Wireless and Sustainability Report Reveals Big Cost Savings 
   An emerging wireless-enabled environment has the 
   potential to drive billions of dollars in energy 
   savings and reshape how industry, agriculture and the 
   public sector approach sustainability, according to a 
   new report. 
   Source: CTIA-The Wireless Association

EcoDriver project aims to help drivers improve fuel efficiency
   Motorists could soon be provided with real-time 
   interactive feedback about their fuel-efficiency 
   performance.  The £13m pan-European EcoDriver 
   initiative, led by Leeds University, will consider a 
   suite of potential add-on devices over the next 
   four years.
   Source: The Engineer

* Copyright Windmill Software Ltd
* Reprinting permitted with this notice included
* For more articles see

We are happy for you to copy and distribute this 
newsletter, and use extracts from it on your own web site 
or publication, providing the above notice is 
included and a link back to our website is in place.

An archive of previous issues is at
and an index of articles at

Windmill Software Ltd, PO Box 58, North District Office,
Manchester, M8 8QR, UK
Telephone: +44 (0)161 833 2782
Facsimile: +44 (0)161 833 2190
E-mail: [email protected]


To receive Monitor every month please fill in your e-mail address below. We will not pass your address to any third parties, nor send you any unsolicited e-mail.

Subscribe Monitor

You will receive an e-mail confirming your subscription, with details of how to download the free software. If you don't receive this then your spam filter may be blocking our message. Make sure it is set to accept messages from [email protected] If you have problems contact the Editor.

Previous Issue Next Issue