From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

probleme lecture fichier ini volumineux

This is the files

Download All
0 Kudos
Message 11 of 17
(524 Views)

I have confirmed your problem on LabVIEW 2013 and submitted CAR #446803 to track it.  I also did a quick check with an alternate way to read it in.  If you split the file into two parts - a config style part and a spreadsheet style part, it opens and reads in about 0.3s on my computer.  Opening the original file with the config file VI took about 310s on my computer.  I have attached the split file and my test code.

 

If you don't have many files, they can be split manually using a standard text editor, such as Notepad++.  If you have a lot of them, you could programatically split the files.  Depending upon how consistent the top part of the file is, it may be easier to use the original algorithm I posted.

 

If you need further assistance, please let us know.

0 Kudos
Message 12 of 17
(500 Views)

Hi, I have a lot files to convert with multi section so this answer is not good for me.

 

Thanks

 

Ludo

0 Kudos
Message 13 of 17
(492 Views)

This VI does the front end parsing for you (or part of it).  It reads the file, converts the first part to an INI file, writes it, then reopens as an INI file so you can read the tags.  It also extracts the column headers, timestamps, and data array and places them in arrays so you can save them as you wish.

 

Note that you can save timestamps in HDF5 in quite a few ways.  The easiest is to create a custom data type composed of a 64-bit signed integer and a 64-bit unsigned integer.  The signed integer is the number of seconds since January 1904 midnight GMT.  The unsigned integer is the fractional seconds.  Look up timestamp data type processing in these forums for more info.  You can get this data by typecasting a LabVIEW timestamp into a cluster of two 64-bit integers.  The first integer in the cluster is the unsigned one.

 

Good luck.

 

Code in LabVIEW 2012

0 Kudos
Message 14 of 17
(484 Views)

Hi I test your vi. But i can have more than one section ([historisation01], [historisation02],[historisation03]) so that not good for me.

 

Ludo

0 Kudos
Message 15 of 17
(473 Views)

The same method will work, but you will need to find the locations in the file of the different sections and then read them in separately.  Given this, I would probably use my original suggestion - read the file in 65000 byte chunks and process it line-by-line yourself.  A state machine should do the job.  If you are not familiar with state machines, there are multiple tutorials on these forums.  Remember to design your state machine before you start coding.  It will make the process much faster.  Let us know if you run into issues.

0 Kudos
Message 16 of 17
(466 Views)

Thanks, but i have a lot of files and i want to convert in hdf5 datas and key with value. So maybe i will give the work to another person working in c or python. I am very surprise that new labview are less efficient with ini file than older version.

 

 

Thanks

 

Ludo

0 Kudos
Message 17 of 17
(448 Views)