4
$\begingroup$

I stumbled upon the European Data Incubator project, and wanted to play around with some of their data. I'm trying to open this dataset, which contains a bunch of .dat and .r64 files. The project says:

This .DAT file is a text file that just specifies the file structure of the robot raw data included in the .R64 file described next.

[...]

This .R64 file is a Real64 file that contains the robot raw data according to the file structure defined by the .DAT file already described. A 15-attributes sample consisting of an hexadecimal register for each of following 15 attributes is included in the file every 4 ms:

[...]

In order to be able to read and properly interpret this .R64 file, special software such as Atom or Sublime has to be used, since the row data are stored in an inverted hexadecimal format.

I guess they mean just a regular hex editor (https://atom.io/packages/hex-editor). With hex editor the file looks as follows (definitely seems to be hex format as we see patterns in how the data appears):

enter image description here

The .dat file looks as follows:

KABHVS111110R01_NextGenDrive#1.dat

DIAEXTENDED

#BEGINGLOBALHEADER
  1,DOS
101,---
102,rob "#KR270R2700 ULTRA C4 FLR"
103,---
104,06.03.2018
105,08:56:29
106,880000000
110,#dd.mm.yyyy HH:MM:SS ns
111,9.9000000000E+34
112,High -> Low
#ENDGLOBALHEADER

#BEGINCHANNELHEADER
200,Zeit
201,Zeitkanal
202,sec
210,IMPLIZIT  
220,22500
240,0.00000
241,0.00400000
#ENDCHANNELHEADER

#BEGINCHANNELHEADER
200,Sollgeschwindigkeit
201,AT_Drive
202,°/s
210,EXPLIZIT
211,KABHVS111110R01m1_NextGenDrive#1.r64
213,BLOCK
214,REAL64
220,22500
221,1
240,0
241,1.000000e-03
#ENDCHANNELHEADER

...

KABHVS111110R01_NextGenDrive#1.r64

Some binary data of some sort

But past this point I'm stuck, which brings me to my question:

Any idea how I can make sense of the data inside the .r64 file?

DATASET
I uploaded the data to WeTransfer so you can get it without creating an account on EDI

$\endgroup$
  • 1
    $\begingroup$ To implement this, a variety of tasks have to be solved which, in my opinion, exceeds the scope of a single question, including: (1) Interpreting the dat file.(2) Importing the r64 file as Binary, extracting sequences of bytes according to the positions learned from the dat file in (1). (3) Interpreting the byte sequences as different formats, including: integer, float, date-time, string. $\endgroup$ – Theo Tiger Apr 25 '18 at 11:54
  • $\begingroup$ Yepp. I don't know what the purpose of providing data sets in one's own invented data format should be without providing also import and export routines for at least one (not too exotic) programming language. (Apart from harvesting some EU grants of course...) $\endgroup$ – Henrik Schumacher Apr 25 '18 at 12:06
  • $\begingroup$ don't know what in the world "inverted hexadecimal" means. Anyway start with OpenRead[..,BinaryFormat->True] and BinaryRead read the first few bytes as character format and hopefully you will see the string "#KR270R2700 ULTRA C4 FLR" .. $\endgroup$ – george2079 Apr 25 '18 at 12:54
  • $\begingroup$ if you want anybody to look at the files you should put them someplace that doesn't require creating an account for access. $\endgroup$ – george2079 Apr 25 '18 at 13:45
  • $\begingroup$ @george2079: indeed, I added a link to the data in my question $\endgroup$ – Panda Coder Apr 25 '18 at 14:43
4
$\begingroup$

The file appears to be nothing but 15 columns of 64 bit reals:

f = OpenRead["KABHVS111110R01_NextGenDrive#1.r64", 
  BinaryFormat -> True]
all = BinaryReadList[f, "Real64", ByteOrdering -> -1];
Partition[all[[;; 200]], 15] // TableForm
Close[f]

enter image description here

note column 15 is the difference of cols 13&14, consistent with the description (program position, real position, and difference). cols 10&11 could be kelvin temps (*1000). Some of the other columns don't make sense though.

note also there doesn't look to be a "header" as they are saying is described in the dat file.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.