LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write array data into a binary file in chunks?

hello ! i have a pre-allocated array of size 100 rows on which the data is being written after reading packets from serial read. My array keeps on replacing by the newer data when all of its 100 rows are filled.  I want to ask that how do i add a "record" button functionality to my program so that as soon as i press the record button the array data starts to write in the binary file from the current text entry position of the array and when i press stop button, the file writing stops. for e.g if my current text entry position was at index value 40 and i press the record button , then the recorded file must start from the value which was placed at index 40.

0 Kudos
Message 1 of 2
(2,053 Views)

Hi shaun,

 

you really should attach a VI to give an example for your problem…

 

i have a pre-allocated array of size 100 rows

So it is a 2D arrays of rows and columns? How many columns? Which datatype?

 

I want to ask that how do i add a "record" button functionality to my program so that as soon as i press the record button the array data starts to write in the binary file from the current text entry position of the array and when i press stop button, the file writing stops.

So you need a "record" button and a "stop" button. A case structure will be needed too…

Where and how do you want to add something?

 

if my current text entry position was at index value 40 and i press the record button , then the recorded file must start from the value which was placed at index 40.

Just write this "text" to the file - at the same time you use this "text" to replace the array element…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,045 Views)