Discussions au sujet de NI LabVIEW

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

Incrémetation fichier txt à partir d'un certain nombre de data

Résolu !
Accéder à la solution

Bonjour, 

 

j'ai crée un petit programme permettant d’acquérir des valeurs à partir d'un scope et de les enregistrés dans un fichier texte. Tout ce passe bien sauf que l'IHM plante et je pense que c'est lié à la capacité de mon fichier. J'aimerais donc incrémenté le fichier texte à chaque fois que le fichier atteint 25Mo afin de ne pas avoir un fichier lourd pour un postraitement. 

Après plusieurs recherche sans aboutir à une solution, je viens sollicité votre aide. 

 

Merci d'avance. 

 

Ci joint un VI exemple, j'ai remplacé la partie acquisition en créant des nombres aléatoire. 

 

0 Compliments
Message 1 sur 3
865 Visites

Hi Madjikh,

 


@Madjikh wrote:

I've created a small program to acquire values from a scope and save them to a text file. Everything is fine except that the HMI crashes and I think it is related to the capacity of my file. I would therefore like to increment the text file each time the file reaches 25MB so as not to have a heavy file for postprocessing.

After several research without finding a solution, I just asked for your help.


Check the filesize.

Create a new file when filesize exceeds your limit:

This shows the basic principle.

You need to implement programmatic creation of the new filepath and writing the header into the new file…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Compliments
Message 2 sur 3
847 Visites
Solution
Accepté par l'auteur du sujet Madjikh

Hi  

 

Thank you for your help and sorry to give you news that now.

As you told me I use your example and I completed to reach a solution. 

 

Screenshot below show my solution, maybe there is another way, but this one is working. 

 

Best regards

0 Compliments
Message 3 sur 3
793 Visites