Windmill Software Ltd
Data Acquisition Intelligence

March 2007

The Newsletter for PC-Based Data Acquisition and Control
Issue 104         March 2007
--------------------ISSN 1472-0221----------------------

Thank you for subscribing to Monitor.  I hope you enjoy 
the newsletter but should you wish to cancel your 
subscription, you can do so at

* Windmill Tips: COMIML Checklist
* Excel Corner: How to Use a Macro to Insert a Chart
* DAQ News Roundup

Windmill Tips: COMIML Checklist

COMIML lets Windows software collect data measurement 
devices connected to the PC's COM port.  These include 
electronic balances used in a laboratory, GPS receivers 
used in the field and data loggers used in process plant.  
The COMIML device driver can communicate over RS232, 
RS422, RS485 or Modbus.  More details of COMIML are at

The first thing to do with CONFIML is configure it for 
use with your instrument. 

1. From the Windmill start menu select ComDebug. This 
   utility lets you configure CONFIML.

2. In ComDebug's opening screen select "Create a new 
   Windmill Instrument File". The Main Menu appears.

3. Choose "Edit COM Port Settings" and enter your 
   instrument's communications settings: baud rate, 
   com port number, etc.  Click the Help button if you 
   are not sure of the settings to use.

4. From the Main Menu choose "Add a new Message".  
   This lets you send a message to your instrument 
   and view its reply.

   a. If your instrument needs to be sent a command to 
      return data, then type this command into the 
      Prompt grid. If you need to enter characters not 
      available from the keyboard, such as Returns or 
      Linefeeds, you can
      - Use the NonPrint menu, or
      - Enter the Hexadecimal code into the Hex column, or 
      - Press the Num Lock key and, using the numeric 
        keypad, enter the decimal code into the Char column.

   b. If your instrument does not need to be sent any 
      commands then leave the Prompt string grid blank.

   c. Select Send. The instrumentĘs reply is shown in 
      the Reply grid. 

5.  Extract the relevant data from the 
    instrument's reply.  Click the Parse button. 
    a. Click Add Action to search for or ignore 
       characters in the instrument's reply.
    b. Type the characters to search for, or the number 
       of characters to ignore, into the Parameters box
    c. Click over the next row then select Extract. 
       The Channel Details box appears. 
    d. You now need to create a channel in which to 
       store the extracted data.  In the Channels 
       Details box click Add Channel.
    e. Click this channel in the grid and select it.
    f. You are returned to the Reply Parser window 
       and enter an Extract parameter. For instance, 
       if you chose "Extract N Bytes" then type the 
       number of bytes (characters) that make up 
       your data. 
    g. Click Step to test the parsing.
    h. If everything is correct Click OK. Otherwise 
       edit your settings.

6.  Choose whether you want to continually take readings 
    from your instrument in the background, or to take 
    readings only when requested to do so. In the Main 
    Menu choose "Edit the Instrument Timings".  If you 
    have an instrument that sends data regularly without 
    any prompting you would usually choose background 

7. Save your settings. From the Main Menu select 
   Save .IMD file.

8. Repeat for any other instruments.

9. Windmill lists all your serial instruments as 
   modules within a COMIML Device.  Go back to the 
   opening screen and click "Edit Windmill Device". 
   Press the Add button and select one of the instrument 
   files. Add as many files as you have instruments.

10. Run the Windmill ConfIML program and add the 
    COMIML Serial Instrument Handler.

11. Run the SetupIML program. This lets you specify 
   how you want to use your instrument.  Select 
   COMIML from the Device menu and double-click 
   your channels to choose names, units, ranges and 
   alarm levels. 

12. You are now ready to use the Windmill logging, 
   charting, display and control programs.  The next 
   time you use Windmill you can go straight to this 

Further Reading

For these instructions with picture see

The ComDebug.hlp file contains full instructions on 
using COMIML. Press the Help button during 
configuration then go to the Overview topic.

For more about the COMIML Serial Driver go to

Issue 47 of Monitor used a real-world example of how to 
configure COMIML for use with a custom PLC.

For a full explanation of the COM port settings: baud 
rate, parity, etc, see

If you cannot pursuade your instrument to send data 
visit	#serial

If you have any other problems using COMIML contact 
[email protected]

Excel Corner: How to Use a Macro to Insert a Chart

This sub-routine will embed a chart into an Excel 
worksheet called Sheet1. 

Sub AddChart()
   Dim chtChart As Chart
   'Create a new chart.
   Set chtChart = Charts.Add
   'Set the Sheet on which to place the chart
   Set chtChart = chtChart.Location(Where:=xlLocationAsObject, Name:="Sheet1")
   With chtChart
      .ChartType = xlLine
      'Set data source range.
      .SetSourceData Source:=Sheets("Sheet1").Range("A5:h16"), PlotBy:= _
      .HasTitle = True
      .ChartTitle.Text = "=Sheet1!R1C1"
      'Set where the chart is placed
      With .Parent
        .Top = Range("A17").Top
        .Left = Range("A17").Left
        .Name = "Chart"
      End With
   End With
End Sub	

The location defines on which sheet the chart is to be 
placed. xlLocationAsObject specifies that the chart is 
embedded on the worksheet, rather than being placed on 
its own Chart sheet.

ChartType defines the type of chart to be drawn. Our 
example uses a line chart. Other chart types include, 
xlColumnClustered, xlScatter and xlBarStacked.

Source defines the location of your data. Ours is in 
cells A5 to H16 of Sheet1.

The Top and Left settings define where you want the 
chart to appear. We've set it to appear immediately 
below our data at A17

For more tips on using Excel for data acquisition and 
analysis see

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  Read for notes
on how to display the news on your own web site, 
read it via e-mail, mobile phone or a newsfeed viewer.

Physicists pioneer new super-thin technology
   Researchers have used the world's thinnest material 
   to create a new type of technology, which could be 
   used to make ultra-fast electronic switches. 
   Physicists at The University of Manchester and The 
   Max-Planck Institute have created a new kind of a 
   membrane that is only one atom thick.
   Source: The University of Manchester

DCS Market in Asia Thriving 
   Strong economic activity in Asia is spurring the growth 
   of manufacturing, which in turn is propelling the growth 
   of the automation market in the region.  The Asian market 
   for Distributed Control Systems (DCS) is expected to grow 
   at 9.0% over the next five years, according to a new 
   ARC Advisory Group study.
   Source: Arc Advisory Group

Back-up satellite to secure Galileo navigation system
   The frequencies allotted to the Galileo satellite navigation 
   system will be safeguarded under a deal announced by the 
   European Space Agency. "From now on, there will always be 
   a European navigation satellite in space," the ESA 
   announcement promised.
   Source: New Scientist

New Coating Is Virtual Black Hole for Reflections
   Non-reflecting material may help solar cells catch more 
   of the Sun's rays. Researchers have created an anti-
   reflective coating that allows light to travel through it, 
   but lets almost none bounce off its surface. At least 10 times 
   more effective than the coating on sunglasses or computer 
   monitors, the material, which is made of silica nanorods, 
   may be used to channel light into solar cells or allow more 
   photons to surge through the surface of a 
   light-emitting diode (LED).
   Source: National Science Foundation

* 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]

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.


Previous Issue Next Issue