08-12-2011 12:50 PM
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
08-15-2011 10:02 AM
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
08-16-2011 03:23 PM
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
08-16-2011 06:41 PM
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?
08-17-2011 10:14 AM
Kyle,
I ran it again and got Error -2147023174.... I'm not sure if this would explain the problem.
Jose
08-18-2011 12:36 PM - edited 08-18-2011 12:37 PM
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?
08-22-2011 09:14 AM
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
08-23-2011 05:44 PM
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?
08-24-2011 11:23 AM
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
08-24-2011 05:04 PM
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.