The Newsletter for PC-Based Data Acquisition and Control
Issue 117 www.windmill.co.uk April 2008
Welcome to Monitor. This month: receiving e-mails
whenever a measurement crosses its alarm level - see the
Excel Corner for details. Plus how to use your PC to
collect data from a Transcell digital indicator.
I hope you enjoy the newsletter but if you want to
remove yourself from our mailing list please do so at
* Windmill Notes: Interfacing a Transcell Digital Indicator
* Excel Corner: E-mailing Alarm Alerts
* DAQ News Roundup
* Data Acquisition and Control Exhibitions
Windmill Notes: Interfacing a Transcell Digital Indicator
Windmill software lets you interface Transcell digital
indicators, and other instruments with an RS232 serial
port, to a PC running Windows. To do this you need one
of our serial drivers: COMIML or LabIML. Windmill COMIML
software is very easy to use and you can try before you
buy. Alternatively, subscribers to Monitor can download
the earlier LabIML for free.
Windmill automatically feeds data from the Transcell
indicator to Windows application software like Excel.
The package also includes data logging, charting and
output control software. These are ready-to-run
applications: no programming is required.
A Transcell Digital Indicator shows weight measurements
from load cells. It requires a null modem RS232 cable.
Configuring the Free Windmill Software for a Transcell Indicator
There are three basic steps to setting Windmill to log
data from a Transcell display.
1. Run the Windmill ConfIML program and enter your
Transcell's communication settings.
2. Run the Windmill SetupIML program and choose names and
units for your display's data.
3. Run the Windmill DDE Panel, Logger or Chart program, or
Excel, to save or display data from your display.
After you have entered your configuration settings with
ConfIML and SetupIML, you don't need to use these again
and can go straight to the logging and display programs.
More details on entering the configuration settings are
This programs detects and saves a record of the hardware
you want to use.
1. Start ConfIML and Press the Add button.
2. Select LabIML RS232 ASCII Instrument Handler.
3. Type a name for the Transcell and a description. The
name and description can be anything you like. Enter 1
as the number of channels if you are collecting data
from one load cell.
4. Enter your instrument's settings. What you enter here
depends on how you have configured your Transcell
- Reading Protocol: This depends on your Transcell User
Menu setting (A3). If you have selected Simplex then
choose Continuous Flow as the Reading Protocol. If
you have selected Full Duplex, choose
Request/Response On Demand.
- Timeout: 5000
- Instrument Idle or Wait Time: 0
- Returned Message Length: For Request/Response on
Demand, use 20; for Continuous Flow, use 18
- Instrument Initialisation String: Leave blank.
5. Click the Channels button and define how to extract
data. consult your Transcell Manual
for details of the commands to send, and the format of
the display's reply. If you can't find this information
use the settings below.
- Make sure that Read channel is checked
- Enter the engineering units your gauge uses, eg kg
- Ignore the maximum and minimum settings: these are
just a guide for chart scaling etc.
- Prompt string: P (not needed with Continuous Flow)
- Parse String, Simplex Mode (Continuous Flow):
When in Simplex mode, the Transcell returns a message
indicates the start of the message. This is
non-printing character decimal 002.
is either a space for positive or - for negative
xxxxx.xx is the weight
K means kilograms (or L for pounds)
G means gross weight (N for net weight)
is the status - space for Valid, M for motion,
O for over- or under-range
is a carriage return
is a line feed
To extract the weight from this message you could
search for the start of message (decimal 002), ignore
1 character and extract the next 9 characters. This
- Parse String, Duplex mode (Request/Response On Demand)
When in Duplex mode, the Transcell returns a message
xxxxx.xx KG GR where
KG means kilogram (or lb for pounds)
GR means gross (or NT for net)
Rest as in Simplex mode
Here you could again search for the start of message
(decimal 002), ignore 1 character and extract the
next 9 characters:
- Initialisation string and Acknowledge string:
6. Enter your communication settings. These depend upon
your User Menu settings in the Transcell Indicator.
- Com port: The port to which you have connected your
- Baud rate: As you specified for your Transcell with
the User Menu (A1).
- Data bits: As you specified for your Transcell with
the User Menu (A2). If in doubt try 8 bits and no
parity (Transcell 8n).
- Parity: As you specified for your Transcell with the
User Menu (A2). For 8 data bits the parity is always
none. For 7 data bits, parity might be odd, even or
none (Transcell 7O, 7E, 7n).
- Flow control: None.
7. Save your settings, close ConfIML and start SetupIML.
Here you can name your channel, set its units, alarms and
1. Choose to Create a New Setup and enter a name and
description. This can be anything you like.
2. From the Device menu select LabIML.
3. Your data channels will be shown as a number like 10000.
Double click this.
4. Type name for your channel, eg Weight and make sure
Enable for Input is checked.
5. Save your settings in a *.ims file, close SetupIML and run
DDE Panel or Logger
Windmill DDE Panel
1. From the File menu select Load Hardware Setup and
choose the *.ims file you just saved.
2. Connect your Transcell channels. You should see your
data in DDE Panel.
3. Proceed similarly for the Logger and Chart programs.
Getting the data into Excel
You can use the Windmill Logger program to collect data,
and after collection has finished import it into Excel.
Alternatively, you can collect data with Excel in real-
time by using an Excel macro to read data from the
Windmill DDE Panel. For more details see our Excel page at
If you are having problems receiving data from, right-
click the LabIML icon on the tool bar and select
If the LabIML Debug window says "Parsing Failed", you have
not properly defined how to extract your data. Go back to
the ConfIML window and adjust your Reply Parse String.
If the LabIML Debug window shows no incoming data at all,
you may have a cabling problem. The Trancell is a DTE type
instrument and requires a null modem RS232 cable. See
Trouble-Shooting Serial Port Connections at
http://www.windmill.co.uk/rs232-communication.html for more details.
Check also whether you have connected the Transcell in
Simplex (continuous flow) or Duplex (Request/Response)
mode. For the TI-1500 and TI-1600 If you have used the
COM1 port on the Transcell it will be in Duplex mode,
and if you have used the Transcell's COM2 port it will
be in Simplex mode.
Interfacing a Transcell Digital Indicator
Excel Corner: Excel Corner: E-mailing Alarm Alerts
One of our readers is collecting live temperature data
in Excel. He asked us how he could get Excel to send him
an e-mail whenever the temperature exceeded a given level.
To do this you need to:
1. Collect the live data.
2. Detect when the data changes.
3. Test whether the watched value exceeds its alarm level.
4. If so send the e-mail.
These tasks are accomplished by four macros. You can
download a spreadsheet with examples of these macros from
1. Collect the Live Data
Although you can normally collect live data simply by
copying and pasting a link from the Windmill DDE Panel,
this will not work for our purpose. The data will be
displayed and automatically update, but the formula
behind the data remains the same. This means that Excel
will see the cell contents as unchanging and will not
know when the data value has updated. Instead use the
macro given in
For more details about collecting live data in Excel see
2. Detect when the Value Changes
To do this we can use one of Excel's worksheet event
Private Sub Worksheet_Change.
You must enter this as a private macro. To do this
right-click the Sheet name tab, choose View Code and
enter your macro. If you were collecting live data in
cell A2 then the following code would detect when this
live data changed, and if so would run the
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$2" Then TestCondition
The macro runs everytime the worksheet changes.
Target is a predefined variable which represents the
location of the cell or range in which you are
interested. When a change occurs the macro checks
whether the target data changed, and if so runs the
specified macro (TestCondition).
3. Test whether this Changed Value Exceeds its Alarm Level
This is a simple macro to test whether the data value
in cell A2 exceeds the alarm level entered in cell A1.
If so then the SendEmail macro runs.
If ActiveSheet.Range("A2") > ActiveSheet.Range("A1") Then SendEmail
4. Sending an E-mail
The SendMail Method sends an Excel Workbook as an
attachment to specified recipients.
ActiveWorkbook.SendMail Recipients:="email@example.com", Subject:="Temperature Too High"
This will send the active workbook containing
the data to firstname.lastname@example.org.
You cannot send text in the body of the message or
attach files other than an Excel workbook.
When you run the macro you may get a message from
your e-mail client saying "A program is attempting
to send an e-mail on your behalf. Do you wish to
send the e-mail?". You need to disable this in the
Security settings of your e-mail client (Outlook
for example), and then restart Excel. You also
need to set your e-mail client to send messages
immediately and not to wait until the Send button
For how to change the e-mail address from which the
e-mail is sent, see Issue 118 of Monitor.
For more tips on using Excel for data acquisition and
analysis see http://www.windmill.co.uk/excel/ and
DAQ News Roundup
Welcome to our roundup of the data acquisition and
control news. If you would like to receive more
timely DAQ news updates then grab our RSS newsfeed
at http://www.windmillsoft.com/monitor.xml. Read
http://www.windmill.co.uk/newsfeed.php for notes
on how to display the news on your own web site,
read it via e-mail, mobile phone or a newsfeed viewer.
Cool Microsensors Offer Improved Analysis
Researchers at the National Institute of Standards
and Technology (NIST) have combined two tiny but
powerful NIST inventions on a single microchip, a
cryogenic sensor and a microrefrigerator. The
combination offers the possibility of cheaper,
simpler and faster precision analysis of materials
such as semiconductors and stardust.
Source: National Institute of Standards and Technology
Self-Powered Tyre Sensors
Morgan Electro Ceramic, has developed technology
which can power car tyre pressure monitoring
systems (TPMS) using wheel movement instead of
batteries. The device, a piezoelectric bimorph,
enables TPMS manufacturers to design self-powered
remote sensors that accurately measure tyre
pressure, with none of the lifetime and disposal
issues associated with batteries.
Source: Morgan Electro Ceramics
Robotic Jellyfish Swim and Fly at Hannover Fair
The biggest draws at Festo's Hannover Fair exhibits
have been biologically inspired robotic creatures
that show off cutting-edge automation technologies.
Turning once again to nature for inspiration, the
company's engineers this year came up with robotic
jellyfish that either swim or fly. AquaJelly robots
also manage their own battery-charging behavior.
They communicate with an in-tank charging dock
wirelessly via ZigBee, for example, to make sure
the dock isn't occupied when they need to charge.
Source: Design News
Wireless for Process Manufacturing Growing at 32%
The market for wireless devices and equipment in
process manufacturing will grow at 32% per year to
2012, according to a new ARC Advisory Group study.
Wireless process sensing is expected to be the fastest
growing market segment as the market absorbs a deluge
of new wireless sensing products that comply with
wireless versions of industrial standards.
Source: ARC Advisory Group
Data Acquisition and Control Exhibitions
Every four months we list the exhibitions around the
world related to data acquisition and control.
29 April - 1 May 2008
The UK's complete production line event for the
electronics industry. It encompasses all aspects
of the electronics manufacturing process, from
design to production and test.
3-8 May 2008
Industrial automation, instrumentation and
Automation Vietnam 2008
8-10 May 2008
International factory automation, electrical and
power transmission and material handling
technology exhibition and conference.
ESEC : Embedded Systems Expo
14-16 May 2008
The largest embedded systems exhibtiion
National Manufacturing Week
27-30 May 2008
Serves the automation, process, electronics
and electrical industries.
SIEE - Pollutec
19-22 June 2008
International exhibition of equipment and
services for water.
25-27 June 2008
Design engineering and manufacturing solutions expo.
* Copyright Windmill Software Ltd
* Reprinting permitted with this notice included
* For more articles see http://www.windmill.co.uk
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
Do you have a question, comment or suggestion on this
newsletter? Fill in this form to contact the editor.
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.