Windmill Software Ltd
Data Acquisition Intelligence

Monitor
August 2007

-------------------------Monitor------------------------
The Newsletter for PC-Based Data Acquisition and Control
Issue 109          www.windmill.co.uk        August 2007
--------------------ISSN 1472-0221----------------------

Welcome to the August issue of Monitor.  I hope you 
enjoy the newsletter but should you wish to cancel 
your subscription you can do so at 
http://www.windmill.co.uk/newsletter.html

CONTENTS
========  
* Windmill Notes: NMEA Data Acquisition Checklist
* Excel Corner: Formatting All Data Series in a Chart
* DAQ News Roundup
* Data Acquisition Exhibitions
________________________________________________________
________________________________________________________

Windmill Notes: NMEA Data Acquisition Checklist
________________________________________________________

Many instruments use NMEA messages to communicate with 
a computer, including GPS receivers, echo sounders 
and anemometers.

You can collect data from instruments communicating via 
NMEA using the Windmill 7 COMIML software for RS232 Devices. 

Using Windmill to Collect NMEA Readings
===========================================

The first time you use Windmill you need to tell it: 
- how to communicate with your instrument
- which readings you wish to collect.
In future sessions you can immediately start acquiring 
data simply by launching the Windmill DDE or Logger 
program.

Collecting Data for the First Time
==================================

1. Use an RS232 serial cable to plug your instrument 
   into one of the PC's COM ports.

2. Use the Windmill 4.3 ConfIML program (or the 
   Windmill 6 ComDebug program) to enter your 
   instrument's settings.

   In ConfIML:
   a. Click the Add button.

   b. Select LabIML RS232 ASCII Instrument Handler and 
      click Add. 

   c. Type a name for your instrument and description. 
      These can be anything you like.  Decide how many 
      types of measurement you want to collect, and 
      enter this as the number of channels.  For example, 
      if you were collecting latitude, longitude and depth, 
      you would need 3 channels. Press OK.
	
   d. Enter your instrument settings. These depend on 
      your device and its messages, but if in doubt 
      start with these:
      - Reading Protocol: Continuous Flow
      - Instrument Idle or Wait Time: 0
      - Data Persistence: 5000 (assuming you are taking 
        readings more often than once every 5 seconds)
      - Returned Message Length: 100
      - Instrument Initialisation String: Leave blank.

3. Use ConfIML to define which data items you want to 
   collect.

   a. Click the Channels button. 

   b. Enter data collection instructions into the 
      Parse String box.  These tell Windmill which piece 
      of the data string to extract.  A data string will 
      look something like this...
      $WIMWV,151.0,R,001.30,N,A
      This contains wind velocity data from a boat
      where 151.0 = wind direction, R = wind direction 
      relative to the boat, 001.30 = speed and N = knots.

      - You need to first fix your position in the string. 
        Click the Reply Parse String box then click the 
        String Search button. Type $WIMWV, into the 
        Search For box. This will stop the parser at 
        the wind direction.
      - Click the Extract Until char button and 
        enter , into the Extract box. In our example 
        this will obtain the wind direction.
      - The Reply Parse String will look like this: \S"$WIMWV,"\E","
      - To also extract the wind speed: select channel 1, 
        search for "R," and extract until ,.
      - See your instrument's Manual for details of its 
        data strings.
      - Click OK to close the Channels dialogue and 
        Settings dialogue

6. Use ConfIML to enter your communication settings. 
   Click the Comms button. Check your instrument's Manual 
   for its settings, but if in doubt start with these:
      - Baud rate: 4800 
      - Bits: 8
      - Parity: none
   Save your settings and leave ConfIML.

7. Run the SetupIML program. Here you can name your 
   channels, set units, any alarm thresholds and so on.
   a. From the Device menu select LabIML.
   b. Your data channels will be shown as numbers like 
      10000, 10001, 10002. Double click a channel.
   c. Type name for your channel, eg Windspeed, and 
      make sure Enable for Input is checked. 
   d. Save your settings in a *.ims file and 
      close SetupIML.

8. Run Windmill DDE Panel
   a. From the File menu select Load Hardware Setup 
      and choose the *.ims file you just saved.
   b. Connect your channels. You should see your data 
      in DDE Panel.
   c. Proceed similarly for the Logger and Chart programs. 

9. Sort out any Problems
   If the data shown is not what you expected...

   a. Right-click the LabIML icon on the task bar 
      and select "Debug Options". 

   b. If the LabIML Debug window says "Parsing Failed", 
      you need to refine your parsing instructions.
      - Close all Windmill programs and IML Device icons.
      - In ConfIML select your instrument.
      - Press the Settings button.
      - Press the Channels button and adjust the 
        Reply Parse String.

   c. If you receive an Error 114 message, this means 
      that no data is available from your instrument. 
      This might be caused by:
      - too short a persistence time, 
      - the "returned message length" being shorter 
        than the actual length of the message,
      - a parsing problem,
      - a cabling problem
      Change the settings in ConfIML or try swapping
      the cable. For more trouble-shooting options 
      see http://www.windmill.co.uk/rs232-communication.html	

6. Transfer the data to Excel or a Mapping program
   You can use the Windmill Logger program to collect 
   data, and after collection has finished import it 
   into Excel or a mapping program. Alternatively, you 
   can collect data with Excel in real-time by writing 
   an Excel macro to read data from the 
   Windmill DDE Panel. For more details see 
   http://www.windmill.co.uk/excel/

Further Reading
===============

Interfacing NMEA Instruments to a PC
http://www.windmill.co.uk/nmea.html

Parsing messages from instruments
http://www.windmill.co.uk/parse.html

Connecting a GPS Receiver to a Laptop PC
http://www.windmill.co.uk/gps.html

Interfacing a Garmin GPS Receiver
http://www.windmill.co.uk/garmin.html

Guide to Automatic Sea-Floor Mapping
http://www.windmill.co.uk/seafloormapping.html
________________________________________________________
________________________________________________________

Excel Corner: Formatting All Data Series in a Chart
________________________________________________________

When you have many data series on your chart it is 
time-consuming and tedious to format each one 
individually.  There are two ways to speed up 
the formatting. 

1. Format one series then select the next and press F4 
   to repeat, and so on.
2. Write a macro to format all series. Here is an 
   example of a macro which formats all series in all 
   charts on a worksheet.

Sub FormatDataSeries()
For Each Chart In ActiveSheet.ChartObjects
  Chart.Activate
  ActiveChart.ChartArea.Select
  For Each Series In ActiveChart.SeriesCollection
    Series.Select
    With Selection.Border
       .ColorIndex = 46
       .Weight = xlThin
       .LineStyle = xlDash
      End With
    With Selection
        .MarkerBackgroundColorIndex = 40
        .MarkerForegroundColorIndex = 2
        .MarkerStyle = xlSquare
        .Smooth = True
        .MarkerSize = 6
    End With
    Next Series
  Next Chart
End Sub

You can modify this to suit your chart. Use the macro 
recorder to change the style of one data series to as 
you want it, then copy the settings required to 
your macro.

For more tips on charting with Excel see
http://www.windmill.co.uk/excel/excel-charting.html
For how to use Excel for data acquisition see
http://www.windmill.co.uk/excel/
________________________________________________________
________________________________________________________

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 https://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.

Fickle ocean current foils climate modellers
   Scientists can now monitor the ocean continuously, 
   thanks largely to RAPID, an array of instruments 
   strung on cables moored to the seabed. RAPID measures 
   the ocean's pressure profile, which scientists can use 
   to calculate how water is flowing. What they see is 
   that the overturning circulation fluctuates wildly, 
   making historical comparisons difficult.
   Source: New Scientist
   http://environment.newscientist.com/article/dn12494-fickle-ocean-current-foils-climate-modellers.html

See what you're spewing as you drive
   In future drivers may only have to glance at the 
   dashboard to see the pollution spewing out of their 
   vehicle's exhausts.  A team from The University of 
   Manchester has constructed a laser measuring device 
   capable of recording levels of carbon dioxide, carbon 
   monoxide and methane from directly inside an exhaust. 
   Once optimised, the process could be incorporated 
   into onboard diagnostic systems that would monitor 
   emissions as vehicles drive along - and potentially 
   help people reduce their emissions by adjusting their driving style.
   Source: The University of Manchester
   http://www.manchester.ac.uk/

Nanoscale Blasting Adjusts Resistance in Magnetic Sensors
   A new process for adjusting the resistance of 
   semiconductor devices by carpeting a small area of 
   the device with tiny pits, like a yard dug up by 
   demented terriers, may be the key to a new class of 
   magnetic sensors.  The technique allows engineers to 
   tailor the electrical resistance of individual 
   layers in a device without changing any other part 
   of the processing or design.
   Source: National Institute of Standards and Technology
   https://www.nist.gov/

First Automated River-Monitoring System Planned
   The first automated monitoring and forecasting 
   network for an American river is being set up by 
   The Beacon Institute and IBM. The River and Estuary 
   Observatory Network will allow minute-to-minute 
   monitoring of New York's 315-mile Hudson River.  
   The system will capture temperature, salinity and 
   pollution measurements; map fish populations via 
   acoustical data; and track particular fish species 
   through radio tagging.
   Source: IBM
   http://www-03.ibm.com/

Worldwide DCS Market Experiences Growth Resurgence
   The Distributed Control Systems (DCS) market 
   experienced unprecedented growth in 2006, increasing 
   by over 14% compared to 2005 and it is expected to 
   continue growing at a healthy rate through 2011, 
   according to a new ARC Advisory Group study.  They 
   conclude though, that 2006 will be the peak year 
   for growth.
   Source: ARC Advisory Group
   http://www.arcweb.com/
________________________________________________________
________________________________________________________

Data Acquisition Exhibitions
________________________________________________________

PTA-2007
   Moscow, Russia
   26-28 September 2007
   Annual exhibition of technologies and equipment for process automation and embedded systems.
   http://www.pta-expo.ru/en/

MSV
   Brno, Czech Republic
   1-5 October 2007
   International engineering fair: portal for new products, innovations and key trends in engineering and other industries. 
   http://www.bvv.cz/msv-gb

Instrumentation South
   Reading, Berkshire, UK
   3-4 October 2007
   Cover all aspects of the uses in industry of test, measurement, data acquisition and control.
   http://www.instrumentation.co.uk/

DMS
   Osaka, Japan
   3-5 October 2007
   Tenth design engineering & manufacturing solutions exhibition.
   http://www.dms-kansai.jp/english/
________________________________________________________
________________________________________________________

* 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 
http://www.windmill.co.uk/newsletter.html

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]
http://www.windmill.co.uk/
https://www.windmillsoft.com/

Do you have a question, comment or suggestion on this 
newsletter? Fill in this form to contact the editor.

Subscribing

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.

*  Email:
*  Format:
    First Name:
    Last Name:
    Country:
*  Enter the security code shown:

Previous Issue Next Issue