Windmill Software Ltd
Data Acquisition Intelligence

logging data on a button press
December 2011

Logging only New Data

Home
Newsletters
DAQ Catalogue
Search

subscribe free

Logging Only when New Data arrives from Sensors, Instruments and Data Acquisition Devices

The Windmill Logger program regularly saves data from sensors and instruments to the computer's hard disk. You can choose to log continuously, or to only record a value when new data arrives. The latter allows external events to control logging.

The data does not have to change to be logged. For example, imagine you are using our COMIML serial driver to gather data from an electronic balance. Every time you press a button on the balance, COMIML takes a reading. It might be that two consecutive readings happen to be identical. However, every time COMIML takes a reading it updates a "record number". Logger watches the record number and so knows when new data is available, even if it is the same value as the previous reading.

To set Logger up to log only new data:

  1. Open Logger and select the Inputs menu. Make sure that the first channel in the Connected Channels list is the one to be monitored for updates. For data supplied by COMIML, this should be the channel holding the record number.
  2. Select Settings from the menu bar.
  3. Select "Log on First Channel Change".
  4. Enter a Log Duration of 0 as you only want to take one set of readings at a time.
  5. Clear the Indicate empty scans box.
  6. Decide how often you want Logger to check the first channel for a new value (the sampling interval) and enter this into the Read Inputs Every box.
  7. Press the Start button (but see also Using Logger with the COMIML Serial Driver if logging from serial or TCP/IP devices).

Using Logger with the COMIML Serial Driver

COMIML acquires data from instruments connected to your PC by RS232, RS422, RS485 or Modbus. Logger can then grab the data from COMIML and save it to file.

To log only new data you need to allocate the final channel in COMIML to store the record number, and set the data to remain valid for the necessary time.

To do this...

  1. In ComDebug (the COMIML configuration program) go to the Message screen
  2. Press the Parse button. The Reply Parser window appears. It should show a number of channels, each configured to extract an item of data (weight, temperature, pressure, latitude, etc.)
  3. Select the first blank action cell.
  4. From the Extract menu select Extract Record Number.
  5. Add a new channel, click it and confirm you want to select it.
  6. To set the data to remain valid, select Instrument Timings from the Main menu. Set the Data Persistence Time longer than your sampling interval (the Read Inputs Every setting in Logger). This means that the data remains valid until Logger has read it.

Logging with Excel

Instead of using the Windmill Logger program, you could use Excel to record data. For instructions on logging with Excel see our Connect to Excel page. For how to use Excel to log only new data see Issues 56 and 57 of the Monitor newsletter.


Further Reading

Windmill Logger Help: logger.hlp, available from http://www.windmill.co.uk/help.html

Windmill COMIML - http://www.windmillsoft.com/daqshop/rs232-modbus.html


Home | Windmill Measurement Software | Data Acquisition Shop | Monitor Newsletter | Contact Us | Contents: Tutorials, Tech Support, Applications, Free Stuff, etc | Search

Copyright Windmill Software Ltd 2001
PO Box 58, North District Office, Manchester, M8 8QR, UK.
E-mail, Tel: +44 161 833 2782
http://www.windmill.co.uk/gps.html
Data Acquisition News Feed (RSS) Free measurement news feed...
Designed by Studholme.net
Related Topics: