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.

use FileRead Filewrite


kokihualpa Feb 20, 2017 10:42 AM

Hello

I have a file "name.txt" in the datalogger and I want extract a data of that file and see in public of the datalogger with a program.

example

name.txt:

"TOA5","CR800Series","CR800","29950","CR800.Std.27","CPU:PROGRAMA SINDICATO 18-04-14.CR8","12470","TB1M"
"TIMESTAMP","RECORD","batt_volt","PM10","ATemp","BPres","RH","SO2","WD","WS"
"TS","RN","","ug/m3","Deg C","mmHg","%","ug/m3","Degrees","m/s"
"","","Smp","Smp","Smp","Smp","Smp","Smp","Smp","Smp"
"2014-04-19 15:45:00",0,13.21,15.65,106,479,46.16,9.64,11.83,1.869
"2014-04-19 15:46:00",1,13.21,15.65,106,478.7,45.69,9.64,52,2.389
"2014-04-19 15:47:00",2,13.21,17.02,106,478.8,45.25,12.05,44.18,3.668
"2014-04-19 15:48:00",3,13.21,16.34,106,478.8,45.85,9.64,30.49,2.988
"2014-04-19 15:49:00",4,13.21,17.71,106,478.9,46.46,9.64,58.94,2.509
"2014-04-19 15:50:00",5,13.21,17.02,106,479,46.29,9.64,81.9,3.028
"2014-04-19 15:51:00",6,13.21,15.65,106,478.9,46.7,9.64,39.09,2.828
"2014-04-19 15:52:00",7,13.21,15.65,106,479,46.9,9.64,64.89,4.188

and I want put in variables:

date="2014-04-19 15:50:00"

batt=13.21

and see it in public in the loggernet

can you help me?


Hafez Feb 20, 2017 03:16 PM

the east way to change the Txt extention to CSV, name.csv then open direct with excell it will come on colums

i hope that what u mean


jtrauntvein Feb 21, 2017 11:27 PM

Take a look at the help for the FileOpen(), FileClose(), FileReadLine() and SplitStr() functions.  You would use FileOpen() to open the file, FileReadLine() to read a line out of the file, SplitStr() to parse the line into an array of values, and, finally, FileClose() to release the file handle.

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