LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write array elements in a file n times.

Hi, i have an array of 8 elements and i want to write this array n-times in a file (i.e 10000 identical copies of the array in a file) .. how to do it ?

 

tnx, Massimo.

0 Kudos
Message 1 of 4
(2,539 Views)

Well, you didn't post your code, so I can't see what you did, but wrapping the Write command in a For loop and wiring 10000 to the "N" input suggests itself.  Have you any training at all in LabVIEW?  Have you viewed the most basic on-line Tutorials?  [You can find links on the first page of this Forum].

 

Bob Schor

0 Kudos
Message 2 of 4
(2,520 Views)

wrote:

Hi, i have an array of 8 elements and i want to write this array n-times in a file (i.e 10000 identical copies of the array in a file) .. how to do it ?

 

tnx, Massimo.


You don't provide sufficient information to give you  a solution. Is this a formatted file? Are there specific delimiters between each value and between each set of eight? Should it be a flat binary file? Some other data structure?

 

Yes, you can use a loop to append the data N times to an existing file, or you can create the large data structure in memory and write it once. There are many ways to do this. Are you more worried about speed or about memory usage?

 

Such a file seems very redundant. For better compression, it could just contain the multiplier and the eight unique values. 😄

 

What is the purpose of the file? Is this to be read by another program?

0 Kudos
Message 3 of 4
(2,505 Views)

wrote:

Hi, i have an array of 8 elements and i want to write this array n-times in a file (i.e 10000 identical copies of the array in a file) .. how to do it ?

 

tnx, Massimo.


It may help your question :smileywinkHow to write array elements.png

0 Kudos
Message 4 of 4
(2,504 Views)