Monitor
October 2006

-------------------------Monitor------------------------
The Newsletter for PC-Based Data Acquisition and Control
Issue 99          www.windmill.co.uk        October 2006
--------------------ISSN 1472-0221----------------------

Welcome to Monitor - we hope you find it useful.  If you 
have any suggestions for the newsletter please e-mail 
monitor@windmillsoft.com.  Should you wish 
to cancel your subscription you can do so at 
https://www.windmill.co.uk/newsletter.html

CONTENTS
========
* Using a USB-Serial Converter
* Windmill Notes: Parsing Data
* Excel Corner: Running a Macro from Several Worksheets
* DAQ News Roundup
________________________________________________________
________________________________________________________

Using a USB-Serial Converter
________________________________________________________

Many laboratory instruments can send data to a 
computer over RS232 links.  As USB ports are replacing
RS232 ports on computers, people are increasingly 
using a USB-Serial converter to access data from their 
instruments.

The converters are simple to use.  You plug the 
converter into the PC's USB port and install its driver 
software.  The USB converter will be assigned a COM port.  
You can check this by opening Windows Control Panel and 
choosing first System then Device Manager then Ports.

When using a USB-Serial converter, you need to make 
sure that it is providing data in the way expected 
by your data acquisition software. The serial 
communications settings must be the same. 

For instance, if you have set your DAQ software to 
continually acquire data you must make sure that your 
USB-to-Serial converter is continually providing data, 
and not buffering it. How you do this depends on your 
converter. For an Edgeport converter, for example, you 
need to use its utility program to set its ports for 
"low latency" and "fast read and writes".

As a subscriber to Monitor you can download a free trial 
of our Windmill data acquisition software.  
LabIML is a universal driver for instruments 
that send or accept ASCII messages over RS232.  It 
automatically feeds data from the instruments to 
Windows application software.  You could, for example, 
show readings from a GPS receiver and a sonar in an 
Excel spreadsheet, or data from an electronic balance 
in Windmill's own Logger program (also free). 

To download the free software subscribe to the 
newsletter at https://www.windmill.co.uk/newsletter.html

We also offer an updated serial driver, COMIML. 
Details of this are at 
https://www.windmill.co.uk/https://www.windmillsoft.com/daqshop/rs232-modbus.html

Further Reading
===============
Tips on Using USB-Serial Converters for Data Acquisition
________________________________________________________
________________________________________________________

Windmill Notes: Parsing Data
________________________________________________________

Windmill software lets you use your PC to collect data 
from instruments with RS232 ports.  A Windmill user 
recently asked why he was unable to extract information 
from his data string by entering several Ignore commands.

He was using the Ignore Until Character command.  This 
tells Windmill to ignore everything in the data string 
until one of the characters specified arrives.  The next 
action takes place on this character.  So, if you 
repeatedly told Windmill to ignore everything until the 
next comma (intending to skip several commas) it would 
get stuck on the first comma it found.  You could 
instead choose to skip the comma before carrying on, or 
use the Search command.

For more tips on parsing messages see
https://www.windmill.co.uk/parse.html

For more on the Windmill serial drivers see
https://www.windmill.co.uk/rs232.html
https://www.windmill.co.uk/https://www.windmillsoft.com/daqshop/rs232-modbus.html
________________________________________________________
________________________________________________________

Excel Corner: Running a Macro from Several Worksheets
________________________________________________________

Imagine you had an Excel workbook containing three 
sheets of data.  Sheet 1 holds September's data, Sheet 2 
October's and Sheet 3 November's.  You create and run a 
macro in Sheet 1 which works perfectly.  You then run it 
from Sheet 2 to try to analyse October's figures, but 
the macro persists in going back to Sheet 1. What to do?

The problem is that the macro specifies "Sheet 1", for 
example: Sheets("Sheet1").Range("A1:B49").

You need to edit the macro and set it instead to work 
on the currently active sheet.

1. At the start of your macro insert a line of code 
   like this
   Let Thisworksheet = ActiveSheet.Name
   Excel gets the name of the currently active sheet 
   and stores it as Thisworksheet.

2. Where "Sheet1" is referenced, replace it with 
   Thisworksheet.
   For example
   Sheets(Thisworksheet).Range("A1:B49")

You can now run your macro from any of the worksheets.

For more tips on using Excel for data acquisition and 
analysis see
https://www.windmill.co.uk/excel/
https://www.windmill.co.uk/excel/excel-charting.html
________________________________________________________
________________________________________________________

DAQ News Roundup
________________________________________________________

Welcome to our roundup of the latest 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 
https://www.windmill.co.uk/newsfeed.php for notes
on how to display the news on your own web site, 
read it via e-mail or through a newsfeed viewer.

Scientists Campaign for Pro-Science President
   Concerned by the US government's stance on the 
   environment, stem cell research and evolution,
   a group of scientists are campaigning to stop 
   the politicization of science where the 
   opinions of scientists are hushed up by 
   political appointees. 
   Source: SEA
   http://www.sefora.org/serendipity/

Google Launches Code Search
   Google now lets you search publicly accessible 
   source code hosted on the Internet.  It claims 
   that this will help programmers design new 
   software projects, test code and fix bugs.  If it 
   finds your code, and you don't want it to, you 
   need to edit your web's robots.txt file. 
   Source: Google
   http://www.google.com/codesearch

US Law could Admit Many More Foreign Hi-Tech Workers
   Legislation pending before Congress "would admit 
   foreign computing and engineering workers in 
   numbers much greater than historical trends or 
   casual assumptions about future employment levels" 
   according to a recent study from Georgetown 
   University, 
   commissioned by IEEE-USA. 
   Source: IEEE-USA
   http://www.ieeeusa.org/

WHO issues targets to cut air pollution
   For the first time, the World Health Organization 
   has issued global targets for cutting air pollution, 
   and it says at least 2 million people could be saved 
   from early death each year if countries meet them. 
   Good news not only for sufferers of air pollution, 
   but also for the companies making pollution 
   monitoring equipment.
   Source: New Scientist
   http://www.newscientist.com/

Ultrasonic Flowmeter Market to Grow
   Propelled by strong growth in the oil and gas 
   industry, which has begun to shed its conservative 
   stance on field device technology, the worldwide 
   market for ultrasonic flowmeters is expected to grow 
   at 9.6 percent over the next five years, according 
   to a new ARC Advisory Group study.
   Source: ARC Advisory Group
   http://www.arcweb.com/
________________________________________________________
________________________________________________________

* Copyright Windmill Software Ltd
* Reprinting permitted with this notice included
* For more articles see https://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 
https://www.windmill.co.uk/newsletter.html
and an index of articles at 
https://www.windmill.co.uk/newsletter.html

Windmill Software Ltd, PO Box 58, North District Office,
Manchester, M8 8QR, UK
Telephone: +44 (0)161 834 6688
Facsimile: +44 (0)161 833 2190
E-mail: monitor@windmillsoft.com

https://www.windmill.co.uk/

https://www.windmillsoft.com/


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.

Previous Issue Next Issue