12-10-2009 04:24 AM
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
Solved! Go to Solution.
12-10-2009 04:54 AM
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.
12-10-2009 05:41 AM
Hum... maybe
but have some way to fix it?
like in a better PC maybe?
or another thing??
12-10-2009 06:04 AM
Since you are using LV7.1 (I just realized it now ) 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
12-10-2009 06:57 AM
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
12-10-2009 07:12 AM
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.
12-11-2009 05:58 AM
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
12-11-2009 06:23 AM
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
12-11-2009 06:32 AM
Gerd, Could you make a simple example to me?
like a simple VI
because I'm kind a noob at labview yet =x
12-11-2009 07:44 AM
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)