LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble in Saving data after switching to LabVIEW 2010

Hello

 

I recently switched to LabVIEW 2010 from 2009. everything works fine except the saving the data to a measurement file. It worked fine until the file size goes upto around 2000 kb. Then it gives Error -5 illustrated in the screen shots. It syas something related to GPIB which i dont understand. I have recreated a simple vi to which replicates the problem i have in my main VI. Could anyone please see whats wrong. i am sure it has got to do something with the format of the file or the naming ..

attached are the files..

Download All
0 Kudos
Message 1 of 8
(2,960 Views)

Hi shanky1023,

 

The screenshots are showing two different errors.  These are two separate issues.   In your Sine Wave.VI that you attached, you are getting error 1.   This error indicates that the path name is incorrect.  This maybe because the path on your computer does not exist or is not accessible.   Try replacing the path constant with a path control.  This will allow you to browse to the file path on your front panel and will automatically format the path correctly.   

 

Best Regards,

 

Starla T. 

0 Kudos
Message 2 of 8
(2,907 Views)

Hey Starla..

 

I get the second error after i say OK to the first one.. I dont think there shud be a problem with the path name as it saves the file to the specified path .. the only problem is after the file size exceeds around 2000 kb i get this error.. So the file i get is only abot 15 seconds of my experimental data.. i dunno why the file size should be a problem..

 

 

Shankar

0 Kudos
Message 3 of 8
(2,898 Views)

Could you be running out of space on the drive?

 

I see the path is c:\users\student.  Since this is some sort of "student" account, could the IT department have limited the amount of drive space the user "student" has available?

0 Kudos
Message 4 of 8
(2,891 Views)

No i explored that option too..I made sure there was enough space on the drive.. also subsequent files get saved too showing there is no problem with space. every file gets saved till it exceeds the size of 2 mb approximately.. after that the error pops crashing my vi...

0 Kudos
Message 5 of 8
(2,888 Views)

Try indexing the signal at the output of the loop and then writing to file when the loop completes. I duplicated your error on my computer at around 1600KB and by indexing and writing at the end, I had no problems.

0 Kudos
Message 6 of 8
(2,882 Views)

Hi

 

I am new to LabVIEW so i am not clear on wat you are saying here.. Do u mean to say that i keep saving my data in a for loop and then write it to the measurement file ?? can u elaborate a little bit on this... ?

also i don understand still why the problem exists in the first place..

 

Shankar 

0 Kudos
Message 7 of 8
(2,877 Views)

Hi shanky1023,

 

I couldn't duplicate the error.   I ran the Sine Wave VI for about fives minutes and let the file build up to 20,000 KB and still saw no problem.  I think issue may be a limitation on your computer or operating system.  Ravens Fan had a good suggestion.  Instead of continuously saving the file as new data comes in, try collecting all the desired data in an array and then saving that array.   This way you are only saving the file once.  This is generally a good practice for any application.  File I/O depends heavily on you computer and operating system and can significantly slow down your program. You should always optimize the amount of File I/O performed in any code.

 

Hope this helps -- Starla T. 

0 Kudos
Message 8 of 8
(2,843 Views)