Case Studies
Signal saving in GageScope for Windows
PURPOSE
The purpose of this document is to describe different formats used in GageScope for Windows to store data and give the user some examples of post-acquisition data manipulation.
Although they did not request to look at any software and had been prepared to do some computer programming, GageScope Ò PC Oscilloscope Software, was recommended. This allowed the customer to get up and running quickly without writing a single line of computer code.
GENERAL
GageScope for Windows can store data in the following formats:
1. GageScope for DOS Signal file format
2. 32 bit Signal file format extension
3. ASCII format
BINARY FORMAT
Since the GageScope for DOS Signal file format is described in detail in the GageScope for DOS user manual, in this document we will forgo its description. It suffices to say that the GageScope for DOS signal file is a binary file consisting of the fixed size header followed by the binary stream of data.
The 32 bit Signal file format extension is based on the GageScope signal format with a few modifications allowing the user save up to 32-bit-wide data and variable gain.
32 BIT EXTENSION
Two fields were added to the file header:
· sample_resolution_32 has the same meaning as the old sample_resolution but can store 32-bit numbers.
· sample_offset_32 has the same meaning as the old sample_offset but can store 32-bit numbers.
In addition, the set of the valid values for the resolution12bit was extended to 3:
- 0 - 8 bit data;
- 1 - 12/16 bit data
- 3 - 32 bit data.
To distinguish the 32 bit extension, apply the following logic:
If sample_resolution equals 1 or resolution12bit equals 3, then the signal was stored as 32-bit-wide data; otherwise the file was stored in the legacy GageScope format. Variable gain
Since GageScope for Windows is capable of storing math channels, the legacy fixed set of gains (±10 V, ±5 V, ±2 V, ±1 V, ±500 mV, ±200 mV, ±100 mV, ±50 mV) is not sufficient. Therefore, the notion of variable gain was introduced.
If the most significant bit of the captured_gain field of the signal header is set, the field contains the gain in the new format:
| Bit |
15 |
14 |
13 |
12-11 |
7-10 |
3-6 |
0-2 |
| Name |
Format |
Diff.Input |
Impedance |
Point position |
Digit1 |
Digit2 |
Digit3 |
Description |
Set to
indicate
new
format |
Reserved for Internal
Driver usage. |
Specified placement
of the decimal point:
0- .xxx
1- x.xx
2- xx.x
3- xxx. |
Gain stored as 3-digit BCD number in volts.
Least significant bit of Digit3 is assumed
equal to 0, thus minimum value is .002
(2 mV) and maximum value is 998. (998 V). |
CHOICE OF FORMAT
In order to avoid unnecessary compatibility problems, GageScope for Windows will store data in the 32 bit signal file extension only if the data cannot be stored in the legacy format {1} see bottom of page . However, due to internal architecture reasons, 8-bit data will be stored in 16-bit quantities. This is probably a bit unusual, but perfectly compliant with the legacy GageScope format.
While storing data acquired in SuperRes mode, GageScope for Windows can specify the sample rate as external. This is done to store "broken" sample rates not listed in the sample rate table.
Generally it is not recommended to rely on the signal file header to store acquisition parameters; use the stored setup file instead.
ASCII FORMATS
There several options available to the user when storing data in ASCII format:
· Hex/Decimal representation of the data
· Output of the time column {2}
· Choice of the data representation:
1. Volts - data stored as decimal volt value
2. Raw - data can be stored in decimal or hex form and represents
sample values as they are stored in the CompuScope's memory.
The data can be converted to the Volts format by applying the following formula:

where sample_offset and sample_resolution are hardware specific parameters
and can be found in the GageScope for DOS manual {3} , and channel_gain is
selected in the Channel control.
3. Corrected - data can be stored in decimal or
hex form. This format is very close to Raw except data conversion is applied to
make sample_offset equal to zero.
ADDITIONAL OPTIONS
There are three additional options for saving signals available in GageScope for Windows:
1. Save all channels. All visible traces in the active display will be saved. The last two characters of the file name specify the trace number.
2. Save visible portion. Only a portion of the signal will be saved. The region for storage is bracketed by cursors or, in case one or both cursors are hidden, by display boundaries.
3. Split mulrec. Each record of the multiple record acquisition is stored in a separate file.
These options can be used in any combination with each other and with other options.
DATA MANIPULATION
Certain program settings will affect signal saving operations. Changing the input range of one of the source channels of the math channel may change the way the gain of the resulting channel is stored. For example, if CH_3 = CH_1 + CH_2 and both CH_1 and CH_2 have an input range of ±1 V, then CH_3 will have a gain of ±2 V. This is a standard gain value, thus the gain of CH_3 will be stored in the legacy format. However, if the input range of CH_1 is changed to ±2 V, the resultant gain will change to ±3 V, forcing storage in the new gain format.
Another example is data co-adding. Let us assume we co-add 12-bit data. The sum of two 12-bit numbers is a 13-bit number, the sum of four 12-bit numbers is 14-bit number, etc. In general, the sum of K N-bit numbers is ceil (log2(K*(2N-1))) number, where ceil is the function returning the closest integer no less than its argument. So if we co-add 18 12-bit values, the result will be a 17-bit number, therefore forcing storage in the 32-bit signal format extension {4} .
{1}Note that GageScope for Windows always stores data in dual channel mode and software multiple record. This is done because these options are most straightforward and hardware independent.
{2}Time is always stored in decimal floating point format. Hex/Decimal selection is relevant only for acquisition data.
{3}SuperRes averaging will modify the sample_resolution as well as the number of significant bits. For more information, refer to the Data Manipulation section.
{4}The number of significant bits in a co-added channel could easily be verified by feeding a full-scale amplitude signal and storing the data in Raw Corrected Hex ASCII format. |
This application note is provided "as is" without any warranties of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability or fitness for a particular purpose. Gage Applied Technologies further does not warrant the accuracy and completeness of the material contained herein. Gage Applied Technologies may make changes to this material, or to the products described in it, at any time without notice.