UM-0085-B09
DT80 Range User Manual
Page 31
RG
In fixed format mode:
•
all formatting commands (e.g.
FF2
,
/n
, channel names) are ignored – fixed settings are used
•
all records are prefixed by a header, which specifies that this is a data record (
D
), from DT80 serial number
081044
, running a job called
"JOB1"
. This is followed a timestamp (date, time, and sub-second time). The
0
indicates that this is real-time data, the
A
identifies the schedule, and the
0
is the in
dEX
within the schedule of
the first data value.
•
floating point data values are always specified to 8 significant digits
•
each record includes an error-detection code (
CRC
) on the end. This allows host software to reject corrupted
records.
Data records such as the above are only one of several types of fixed format message. A comprehensive description of
all fixed format message types is beyond the scope of this manual.
Logged Data
This section discusses the different formats in which logged data can be retrieved. For details on how to go about
retrieving your data, what mechanisms are available (web, file, FTP etc.) and what commands and options to use, see
.
CSV Format Data
CSV (comma separated value) is a widely used text based format for transferring data. The DT80 command
COPYD
can
be used to report logged data in CSV format. Data can be written to either:
•
the active comms port, so the data appears in the
dEX
or
DeTransfer
command window from which the
COPYD
command was issued, or
•
a file on the DT80's internal file system, or
•
a file on a removable USB device, or
•
a file on an FTP server
CSV Record Format
By default, the DT80 merges logged data and alarms from multiple schedules into a single file. The file consists of a
number of
rows
. Each row is terminated by a CR-LF sequence. Each row consists of a number of
fields
(columns),
separated by commas.
Each row consists of the following fields, in order:
•
timestamp (e.g.
2010/03/01 09:54:38.000
)
•
timezone. Currently, this field will always have the value "
n
", meaning "no timezone"
•
data values for first schedule (zero or more fields, one for each loggable channel). Numeric data values are
specified in "mixed" format (may be either standard or exponential format), to 8 significant digits and trailing
zeroes after the decimal point are trimmed. String values are enclosed in quotes, with any control characters
represented in ^c form (e.g. a CR character would appear as
^M
).
•
alarm number, alarm state (0-3) and alarm text (see Alarm Records (P91)) for first schedule (three fields; only
present if schedule has one or more loggable alarm channels)
•
data values for second schedule (if any)
•
alarm number, alarm state and alarm text for second schedule (if any)
•
(and so on, for each schedule)
The first row in the file is a
header row
, which contains a descriptive name for each field. For example, the name of a
data value field has the form
"
chanName
(
units
)"
, e.g.
"Ext Temp (degC)"
The first block of rows after the header row contain all data records for the first schedule. The next block of rows contain
all alarm records for the first schedule. Then comes the data records for the second schedule, and so on. In other words,
the CSV data is generated in schedule order,
not
in time order. However, once it is loaded into a spreadsheet it is a trivial
exercise to re-sort by the timestamp field.
Example
For example, a typical file might look like:
"Timestamp","TZ","Ext Temp (degC)","2V (mV)","1CV","B.ALnum","B.ALstate","B.ALtext"
2010/03/01 09:54:38.000,n,22.896844,-0.05822
2010/03/01 09:54:39.000,n,22.894454,-0.058563
2010/03/01 09:54:40.000,n,22.899576,-0.057869
2010/03/01 09:54:41.000,n,22.897856,-0.056656
2010/03/01 09:54:42.000,n,22.893504,-0.05735
2010/03/01 09:54:38.233,n,,,3
2010/03/01 09:54:40.249,n,,,4
2010/03/01 09:54:42.237,n,,,1
2010/03/01 09:54:40.249,n,,,,2,1,"trig 22.9"