LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 4 at write file +{I16} at labview 7.1

Solved!
Go to solution

Hey guys!

 

I have a program at Labview 7.1 that measure voltages and currents and write it in a file .BIN

and I have another program to read that file so I can analyze that.

 

My problem is, I never write it for so long time... usually at max 1 hour or so....

but now I have to do a job that I will need write at least 1 day so I tried to write here 

but when the program is with 18644 seconds appears this error:

 

Error 4 ocurred at write file+ [I16]: write file

 

Possible reason(s):

 

Labview: end of file encontered

 

 

I already tryed change the number of samples to the max but always stop with almost 2GB of file

 

Can anyone help me with that??

 

I upload the VI's, but the problem is on VI: grava  4V4I calibraçao 7200.vi

 

thanks 

Download All
0 Kudos
Message 1 of 40
(3,745 Views)

I would guess it's Windows limitation in handling memory.

 

Anyhow I would suggest to split it up in different files due to the fact your want to write a whole day.

This could be done very easy taking a timstamp or doing something like opening a new file every x iterations of your loop.

0 Kudos
Message 2 of 40
(3,733 Views)

Hum... maybe

but have some way to fix it?

like in a better PC maybe?

 

or another thing??

0 Kudos
Message 3 of 40
(3,722 Views)

Since you are using LV7.1 (I just realized it now Smiley Sad ) there is a limitation in the maximum file size of 2GB.

Though there is a way to get over this described here.

 

Anyhow I would strongly recommend to write your data in a new file after a certain amount of time.

 

 

Christian

0 Kudos
Message 4 of 40
(3,713 Views)

Hum thanks Christian!

 

but could you help me with the split file?
i did it once at labview 8.6

but in 7.1 have some differences

so could you help me with that?

 

maybe an example

I'm thinking in split the file in each 4 hours

so in one day i will have 6 files

 

thanks

0 Kudos
Message 5 of 40
(3,702 Views)

Just a screenshot on how you could implement it. This is done by saving a file every N iterations. You will have to change it to use the timestamp.

 

Untitled.jpg

0 Kudos
Message 6 of 40
(3,693 Views)

Well Christian

I understand a little what you put there

but which I have to change to save the file after 5 hours?

 

and I can't find some of this Vi's in labview 7.1

maybe have different names or something like that

 

could you help me with that?

 

Thanks

0 Kudos
Message 7 of 40
(3,676 Views)

Hi EduU,

 

remember the time when you create a file in a shift register. Check for your time interval (i.e. 5 hours). When time is over, close the current file and create a new one.

 

Yes, many icons/functions in the file palette changed from LV7.1 to LV8.0. Don't worry about "can't find that specific icon", just go the way mentioned above Smiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 40
(3,670 Views)

Gerd, Could you make a simple example to me?

like a simple VI

because I'm kind a noob at labview yet =x

0 Kudos
Message 9 of 40
(3,667 Views)

Hi EduU,

 

the example would lok like the one already attached.

- Open the file before the while loop starts

- write to file in the loop

- close file after the while loop

 

Now the case structure:

- in one case you close the current file, then open a new one

- in the other case you simply wire the reference/error cluster through

 

Feed the case structure with:

- check by time

- or check filesize

- or (as shown) check iteration count (suitable when writing fixed sized datablocks or when writing at fixed intervals)

 

Simply use the functions from file palette as described here (open file, write, close file, filesize) Smiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 40
(3,644 Views)