LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to continue recording on a new excel sheet?

Solved!
Go to solution

There are templates available for the Producer/Consumer pattern.  If you go to File -> New.. -> VI Folder -> From Template -> Frameworks -> Design Patterns you should see the Producer/Consumer option.

 

Matt

Applications Engineer
National Instruments
0 Kudos
Message 11 of 28
(1,289 Views)

Hello,

 

I used the Producer/Consumer examples to create a parallel while loop with local variables. This turned out to work better than I expected. Now I can see the data while it is being recorded in excel. However, I specified a document address to save the excel spreadsheet. Do you know if there is a way I can open a new blank excel sheet every time I want to record the data and automatically save it with a new address?

 

PS I attached the VI without the subVI; therefore. It can't run but at least you can see the algorithm of the program.

 

Jose

0 Kudos
Message 12 of 28
(1,269 Views)

Hello again,

 

I managed to make a command so that when the data is to be recorded in excel, the user may select the path and name of the file. However, even though I can see all previous documents when the file path/name window opens, I don't see the documents when I open the folder where they should be located.

 

I attached a power point presentation that illustrates this. The first slide shows the block diagram, the second one shows the file path/name window as it opens when it is chosen to record the data onto excel. The third slide shows the resulting document, and the final slide shows the folder where the documents should be locates. As can be seen the file appear in the file path/name window, but not in the actual folder.

 

Thanks for al the help so far. I've managed to progress a lot with this program, but I still find myself with other issues since I'm still an amateur at this stuff.

 

Jose

0 Kudos
Message 13 of 28
(1,255 Views)

That's definitely a strange issue you're getting.  It might be a good idea to attach an indicator to the filepath being fed in just to verify that it's exactly the same as what you're expecting.  Other than that, are you getting any errors during the "save" operation?  It seems like it's not saving the .xls file, but I can't think of any reason from what I'm seeing.  Since you're leaving the report open after the program executes, can you do a "Save As..." in excel and save it to the desktop, or somewhere you'll be able to find it right away?  Does it save properly this way?

0 Kudos
Message 14 of 28
(1,250 Views)

Kyle,

 

I ran it again and got Error -2147023174.... I'm not sure if this would explain the problem.

 

Jose

0 Kudos
Message 15 of 28
(1,240 Views)

I can't seem to find any single cause of this specific error message.  Which VI is throwing this error?  Is it the VI that saves the report?

0 Kudos
Message 16 of 28
(1,231 Views)

Kyle,

 

The VI that is causing this error is the main VI the one where it displays and records the data. I think that the function that is causing the error is the "Save To File" function.

 

Jose

0 Kudos
Message 17 of 28
(1,212 Views)

I just noticed by looking over your VI that the error wire does not go through the "Save to File" function.  Perhaps if you handle errors from this function with the Simple Error Handler, you may get some more detailed information about what might be happening.  Has this been changed in more recent versions of your code?

0 Kudos
Message 18 of 28
(1,193 Views)

Kyle,

 

I made some modifications and I has run better, but the same error popped up when I tried to get the program recording through the weekend. We want our maximum time limit to be three days; however, about one day it says that it's out of memory and then the error number pops up. I know that the excel spreadsheet is not the one out of memory since it can handle more than 250 sheets and in one day we've had about 7. Also, when I'm recording for a long period of time my measurements are changed in the excel sheets as text.

 

I can upload the VI if it's necessary; however, to run it the subVI will have to be modified since we are acquiring data from the DAQ modules.

 

Jose

0 Kudos
Message 19 of 28
(1,186 Views)

Kyle,

 

I managed to create a Dummy version of the VI and SUBVI. If you like you can take a look and let me know if you understand why is the memory getting full so quickly now. It wasn't doing that error until we recorded data for more than 24 hours.

Download All
0 Kudos
Message 20 of 28
(1,177 Views)