Discussions au sujet de NI LabVIEW

annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

lire directement fichier binaire

Résolu !
Accéder à la solution

Bonjour,

 

Peut être qu'un de vous l'a déjà fait .

J'ai écrit un tableau de waveform dans un fichier journal à l'aide de [ write waveforms to file .vi] , j'aimerais pouvoir le lire (fichier .dat) directement avec python (par exemple) , savez vous comment est codé le fichier pour pouvoir le lire ?

Merci de votre aide.

Christophe.

0 Compliments
Message 1 sur 4
939 Visites
Solution
Accepté par l'auteur du sujet maybebis

Hi Christophe,

 


@maybebis wrote:

Maybe one of you already did.

I wrote a waveform array to a log file using [write waveforms to file .vi], I would like to be able to read it (.dat file) directly with python (for example), do you know how is encoded the file to be able to read it?


Simple answer: when you want to define a know file format then you need to define it - and not rely on someone else to do it in a way suitable to you…

 

You can look into the WriteWaveformToFile function to see how NI does the saving: Basically it is a Datalog file (also available in the Advanced File functions palette), which is know to (probably) change the internal formats with each LabVIEW version.

I recommend to use other (well-defined) file formats, like TDMS. There should be Python libraries available to read TDMS data…

 

(Btw. you should ask your questions in English in this forum - or use the regional French board…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Compliments
Message 2 sur 4
918 Visites

Hi GerdW,

 

This is the french LV board. 😀

 

En te souhaitant une agréable journée. 😂

0 Compliments
Message 3 sur 4
860 Visites

Thanks you , all.

0 Compliments
Message 4 sur 4
857 Visites