Windmill Data Acquisition Software Logo
24 May 2023

Windmill Software
Data Acquisition Intelligence
Call now: +44 (0)161 834 6688


Logging Only when New Data arrives from Sensors and Devices

The Windmill Logger program regularly saves data from sensors and instruments to the computer's hard disk. You can choose to log only new data values. This allows external events to control logging. For example, you could tell Logger to save data values only when you press a button on your instrument. It is also useful if your instrument sends data sporadically.

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. In ComDebug, create a new data channel and "Extract Record Number" to it. Also, make sure the data persistence time (the time that the data remains valid) is longer than Logger's "Read Inputs Every" interval. To do all this
    1. In the Message Edit dialogue box click the Parse button.
    2. From the Extract menu select Extract Record Number
    3. Create a channel to hold this record number.
      Logging only when new data arrives
    4. Go back to the main menu and choose to Edit the Instrument Timings if you want to change the data persistence time.
  2. 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.
  3. Select Settings from the menu bar.
    Logging only new data
  4. Select "Log on First Channel Change".
  5. Enter a Log Duration of 0 as you only want to take one set of readings at a time.
  6. Clear the Indicate empty scans box.
  7. Decide how often you want Logger to check the first channel for a new value and enter this into the Read Inputs Every box.
  8. Press the Logger's Start button. Now, whenever your instrument sends new data, and only then, Logger will record the value.

To download a trial of Windmill Logger subscribe to Monitor.


Further Reading

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

Related Topics: