LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Append text to end of file

The write characters to file was a VI - not a function like Write Text to File (and is NOT a diect replacement). I think if you have an old VI it will translate it for you. Otherwise, just recreate the old VI yourself.

0 Kudos
Message 11 of 16
(4,760 Views)

While appending text files is relatively straightforward in LabVIEW, it is far simpler using the operating system command line interface.  This assumes you are not modifying the files in any way.  In windows, the copy command will do it (type copy /? to get help).  Under Linux, use cat (man cat for help).  Command line can be automated from LabVIEW using System Exec.

 

If you want to use LabVIEW, you do not need to use the file pointer (available in Set File Position in the File I/O»Advanced File Functions menu).  LabVIEW remembers the current position in the file if you are streaming.  I would recommend a producer/consumer architecture.  The read is the producer; the write is the consumer.  Use a queue to pass data from on to the other.  Your producer will actually be a double loop - FOR loop to loop through your list of files containing a WHILE loop to read chunks of each file and pass to the consumer loop.  The consumer loop simply writes to file as it gets the chunks.  I would recommend a chunk size of about 65,000 bytes.

 

Good luck.  Let us know if you need more information.

0 Kudos
Message 12 of 16
(4,737 Views)

je réalise mon fin d'etude je suis debutant en labview mon soutenance 8 juin svp aide moi .
je un programe la suivant .
comparer 25 par un nombre aléatoire (en le nome x par exemple )
si 25 < x alors
boite de dialoge afficher " x supperieur à 25"
si 25 < x < 30 alores
boite de dialogue afficher "c'est un bon choix"

comment je developper ce programme avec labview
cvp aide moi c'est urgent

0 Kudos
Message 13 of 16
(3,854 Views)

Etant donné que la question n'a pas la moindre relation avec le sujet original, elle n'a rien à faire ici et il serait préférable de commencer une nouvelle discussion.

0 Kudos
Message 14 of 16
(3,833 Views)

There is a simple trick that works.

 

1. Create your string to be appended to an existing file.

2. Use "Build array" to make a single-cell array out of that string.

3. Use "write to spreadsheet file" and connect the string/array to the 1D input. Set the format to %s. Set the "append?" input to True.

4. Nicely appends.

0 Kudos
Message 15 of 16
(992 Views)

@Yodo2 wrote:

There is a simple trick that works.


A Rube Goldberg "solution" to an ancient, 10 year old thread. 😮 

0 Kudos
Message 16 of 16
(965 Views)