Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Data Formats TOB1, TOA5, CSIXML and CSIJSON


CTS Apr 26, 2014 02:21 PM

Hi,
I am trying to stream data from my CR1000 to a ftp server using the built in streaming function. The help files refers to various file options with various data formats. What are these options and how do they influence the file created.

I need to have a filename generated once per day with hourly data appended to it for that day. The next day will have a new file name. I am able to create my filename, but the header information in the file is to much.

Any info is much appreciated

Thx
Erik


smile Apr 26, 2014 09:36 PM

Please read CR1000 manual (Revision: 7/11) at:
-12.1.1.6.1 Data File Format Examples
- There are descriptions and examples of the different formats

as follows:

12.1.1.6.1 Data File Format Examples
TOB1
TOB1 files may contain an ASCII header and binary data. The last line in
the example contains cryptic text which represents binary data.
Example:
"TOB1","11467","CR1000","11467","CR1000.Std.20","CPU:file
format.CR1","61449","Test"
"SECONDS","NANOSECONDS","RECORD","battfivoltfiMin","PTemp"
"SECONDS","NANOSECONDS","RN","",""
"","","","Min","Smp"
"ULONG","ULONG","ULONG","FP2","FP2"
}Ÿp' E1HOEŸp' E1H›Ÿp' E1HªŸp' E1H¹Ÿp' E1H
TOA5
TOA5 files contain ASCII (American Standard Code for Information
Interchange) header and comma separated data.
Example:
"TOA5","11467","CR1000","11467","CR1000.Std.20","CPU:file
format.CR1","26243","Test"
"TIMESTAMP","RECORD","battfivoltfiMin","PTemp"
"TS","RN","",""
"","","Min","Smp"
"2010-12-20 11:31:30",7,13.29,20.77
"2010-12-20 11:31:45",8,13.26,20.77
"2010-12-20 11:32:00",9,13.29,20.8
CSIXML
CSIXML files contain header information and data in an XML (eXtensible
Markup Language) format.
Example:
<?xml version="1.0" standalone="yes"?>
<csixml version="1.0">
<head>
<environment>
<station-name>11467</station-name>
<table-name>Test</table-name>
<model>CR1000</model>
<serial-no>11467</serial-no>
<os-version>CR1000.Std.20</os-version>
<dld-name>CPU:file format.CR1</dld-name>
</environment>
<fields>
<field name="battfivoltfiMin" type="xsd:float"
process="Min"/>
<field name="PTemp" type="xsd:float" process="Smp"/>
</fields>
</head>
<data>
<r time="2010-12-20T11:37:45"
no="10"><v1>13.29</v1><v2>21.04</v2></r>
<r time="2010-12-20T11:38:00"
no="11"><v1>13.29</v1><v2>21.04</v2></r>
Section 12. Memory and Final Data Storage
357
<r time="2010-12-20T11:38:15"
no="12"><v1>13.29</v1><v2>21.04</v2></r>
</data>
</csixml>
CSIJSON
CSIJSON files contain header information and data in a JSON (Java Script
Object Notation) format.
Example:
"signature": 38611,"environment": {"stationfiname":
"11467","tablefiname": "Test","model":
"CR1000","serialfino": "11467",
"osfiversion": "CR1000.Std.21.03","progfiname": "CPU:file
format.CR1"},"fields": [{"name":
"battfivoltfiMin","type": "xsd:float",
"process": "Min"},{"name": "PTemp","type":
"xsd:float","process": "Smp"}]},
"data": [{"time": "2011-01-06T15:04:15","no": 0,"vals":
[13.28,21.29]},
{"time": "2011-01-06T15:04:30","no": 1,"vals":
[13.28,21.29]},
{"time": "2011-01-06T15:04:45","no": 2,"vals":
[13.28,21.29]},
{"time": "2011-01-06T15:05:00","no": 3,"vals":
[13.28,21.29]}]


Dana Apr 28, 2014 06:07 PM

If you look at the FTPClient help in CRBasic for FileOption, you will see some of the choices do not list "header" as part of the description. Choosing one of these will omit the header.

Make sure you include the timestamp -- your data will be useless without it! :)

Dana W.


johndoe123456 Jan 3, 2024 07:57 AM

This post is under review.

Log in or register to post/reply in the forum.