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:
- 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
- In the Message Edit dialogue box click the Parse button.
- From the Extract menu select Extract Record Number
- Create a channel to hold this record number.
- Go back to the main menu and choose to Edit the Instrument Timings if you want to change the data persistence time.
- 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.
- Select Settings from the menu bar.
- Select "Log on First Channel Change".
- Enter a Log Duration of 0 as you only want to take one set of readings at a time.
- Clear the Indicate empty scans box.
- Decide how often you want Logger to check the first channel for a new value and enter this into the Read Inputs Every box.
- 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