10-23-2017 08:52 AM - last edited on 10-24-2017 08:39 AM by Kristi_Martinez
Hi community,
I try to parse a .r64/.dat file (exported from DEWESoft) in MatLab.
Online I found a function which was implented exclusively for this usecase.
If I run this script I get a critical error. The function needs to know where a channel begins/ends (listed below).
elseif strcmp(ImpExp,'IMPLICIT') && step > 0
% Kanal mit konstanter Schrittweite (z.B. Zeit)
variable.(name) = [] ;
variable.(name)(:,1) = wert_start:step:wert_ende ;
Belong to this Article I saw that I have to change the Parameters to get the Start-Pointer of the first value in the channel (Index 240,221,...).
My exported .dat-file does not store the end-value of the channel.
end
% --------- IMPLICIT oder EXPLIZIT ---------
if strncmp(zeilen(nn),'210',3)
ImpExp = zeilen{nn}(5:end);
end
% --------- Kanallaenge ---------
if strncmp(zeilen(nn),'220',3)
laenge = str2double(zeilen{nn}(5:end));
end
% --------- Startzeile ---------
if strncmp(zeilen(nn),'221',3)
channelstart = str2double(zeilen{nn}(5:end));
end
% --------- Schrittweite ---------
if strncmp(zeilen(nn),'241',3)
step = str2double(zeilen{nn}(5:end));
end
% --------- Startwert ---------
if strncmp(zeilen(nn),'250',3)
wert_start = str2double(zeilen{nn}(5:end));
end
% --------- Endwert ---------
if strncmp(zeilen(nn),'251',3)
wert_ende = str2double(zeilen{nn}(5:end));
end
#BEGINCHANNELHEADER 200,Time 201,Data 202,s 210,IMPLICIT 220,137 240,0 241,1 253,increasing 260,Numeric #ENDCHANNELHEADER
Does anyone know how to solve this problem?
Regards
Daniel
10-24-2017 09:49 AM
Hi Daniel,
In a DIAdem DAT file, an IMPLICIT channel is one whose values are completely defined in the *.dat file and not present in the *.r64 file. You simply use the linear equation with offset and slope and number of values to recreate the data array. There is no end position in the *.r64 file, there is no starting position in the *.r64 file. The offset, slope and number of values are all in the *.dat file, and that's all you need.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
10-25-2017 06:37 AM
Hi Brad,
I solved that problem. The software with which I exported the .dat-File discriminates between an .R64 and .R32 file. ![]()
Solution: 1) Export all datas as 64-bit or 2) include the second file in which the binaries are stored.
Thank you!
Daniel