04-23-2019 03:21 AM
Hi.
I would like write datalog file data that contains array (size=1M of dbl data), strings and numeric. But when I reach size of file = 4GB I have an error that it's max file size. Is there a way to write such data and have output small size file? Thanks.
04-23-2019 04:01 AM
Hi Valentin,
you can write data to a file continuously, even with more than 4GB in total.
But you should just use the basic FileOpen/Write/Close operations…
write datalog file
Use basic file operations instead of these Datalog file operations…
04-23-2019 06:29 AM
@Valentin87 wrote:
I would like write datalog file data that contains array (size=1M of dbl data), strings and numeric. But when I reach size of file = 4GB I have an error that it's max file size. Is there a way to write such data and have output small size file? Thanks.
That should work OoTB.
The max file size could be limited by your file system?
Are you simply attaching data, or do you keep an internal pointer? That pointer would need to be 64 bit.
Also, some express VIs might not use 64 bit pointers internally, and most of us wouldn't use them anyway. So if you do, that could be the cause.
It would help if you posted some code...
04-23-2019 09:44 AM
FAT32 has a 4 GB file size limit. Maybe that's what you're running into?
04-23-2019 10:53 AM
Are you using LV 32 bit or 64 bit? Any chance you're running into memory issues?
04-24-2019 04:22 AM
wiebe@CARYA wrote:
Also, some express VIs might not use 64 bit pointers internally, and most of us wouldn't use them anyway. So if you do, that could be the cause.
The Write File+ (string).vi found in the deeper catacombs of some express VIs has a 32-bit file pointer. the input is not used in the express VIs I looked at, but it might be used in some.
Post some code, so we can help you better...
10-09-2023 10:30 AM - edited 10-09-2023 10:31 AM
wiebe@CARYA wrote:
wiebe@CARYA wrote:
Also, some express VIs might not use 64 bit pointers internally, and most of us wouldn't use them anyway. So if you do, that could be the cause.
The Write File+ (string).vi found in the deeper catacombs of some express VIs has a 32-bit file pointer. the input is not used in the express VIs I looked at, but it might be used in some.
Post some code, so we can help you better...
it looks like, write binary file is affected by this - I want to write an array of clusters as one file, containing the number of array elements in the filename e.g. dump_150000, dump 160000
in this scenario, when the file size is greater than 4 GB, the resulting binary file is much smaller than 4 GB
in this particular case, this limit is somewhere between 150.000 and 160.000 rows:
I hope, this is not a bug - so if this is expected behavior, does there exist a workaround?
I am coding on Windows 10 using Labview 2023 64 Bit
10-09-2023 11:29 AM
@alexderjuengere wrote:
I hope, this is not a bug - so if this is expected behavior, does there exist a workaround?
yes, there it is: https://forums.ni.com/t5/LabVIEW/LabVIEW-quot-Write-to-Binary-File-Questions-quot/m-p/3818462#M10788...
10-09-2023 12:46 PM
Hi Alex,
@alexderjuengere wrote:
I hope, this is not a bug - so if this is expected behavior, does there exist a workaround?
What happens when you write to the file in chunks of 10000 rows?
What happens when you open the file once and use the file reference for all following file operations?
10-10-2023 11:49 AM - edited 10-10-2023 12:10 PM
@GerdW wrote:What happens when you write to the file in chunks of 10000 rows?
in my particular scenario, a dump of 10.000 rows will work as fine as 150.000 rows
@GerdW wrote:
What happens when you open the file once and use the file reference for all following file operations?
This was actually the crucial point - using "open/create file" once and then iteratively "set file position, write binary file, get file position", keeping the file refnum from open/create in a shift register and closing it after the loop has executed.