07-02-2014 01:58 AM
Hello all,
Please help me if anyone have any idea about my issue.
In my application, I’m saving some information continuously in Excel with LabVIEW Report Generation Tool Kit.
When data is writing into Excel, I want to open/close the same Excel at Runtime. When I’m Trying to open/Close, Some data is missing.
I think may be “Refnum” is missing for next data Iteration. I tried to control Error Messages but still I’m not getting Correct results.
Could you please tell me if anyone knows about this.
Best Regards,
Munna
07-02-2014 04:59 AM
Why are you trying to open the report when it is being generated. Anyway you can keep the Window state to "Maximized" to see the report generated. Will that be suffucient?
07-02-2014 08:08 AM
I’m Running my application for Longtime ( Around 10Days )..So, I want to Check those Results in between That’s I want to Open and See............
==================================================================
Why are you trying to open the report when it is being generated. Anyway you can keep the Window state to "Maximized" to see the report generated. Will that be suffucient?
-----
The best solution is the one you find it by yourself
==================================================================
Maximize or minimize will works fine But, Suppose , If user closes this Report (by mistake) at Runtime then data is missing 😞
So, I want to open/Close at Anytime during Testing is Goinig On...............
07-02-2014 08:31 AM
If you say you are running for 10 days, are you keeping the reference open for that many days? Are you continously writing data to the report? I would say open the file only when you are writing data to it other time you can close the report. Please don't use the report generation to store the data.
07-02-2014 08:49 AM
Yes.. We want to test for 10days (it means we need open Reference).
=========================================
I would say open the file only when you are writing data to it other time you can close the report.Please don't use the report generation to store the data.
============================================
When I'm closing the File for Next time, even though data is missing.
Can you please give me any other Idea to store the data?
At first I used CSV for data storing but Client requested for better report Format & Sometimes he wants read file with LabVIEW (Particular Row/Column data) for Offline Analysis.
07-02-2014 09:25 AM
You should be doing this way.
When you do it this way, whenever you want to see the data, open the tool and generate the report and check it. As simple as it is.
Do not log the data to the report. You have the .tdms format also which will help you to see the data, plot graphs. Check which one will be feasible.
07-02-2014 07:21 PM
Thanks for your help.
Sorry. My problem was not about .csv/.tdms.
Because I want to place data into particular Cells in Excel ( Cell values will change at Runtime).
For your Information my Report will not exceed more than 60,000 rows so, no need to Split the File.
So, I want to know, why LabVIEW is losing ActiveX Reference when we are doing Excel Open/Close at Runtime.
Because I’m not deleting this file(just Closing). I think it should not loose.
BR,
Munna
07-02-2014 10:09 PM
I would say the best solution here would be to write the data to an array structure and then periodically (i.e. once a day/hour) or at the end of your sample time write to excel as you already are. If you have a reasonably frequent update of the excel document (i.e. hourly) then you should be able to view the data while it is running without corrupting anything or worrying about losing your reference.
07-02-2014 10:28 PM
@Munna232 wrote:
Thanks for your help.
Sorry. My problem was not about .csv/.tdms.
Because I want to place data into particular Cells in Excel ( Cell values will change at Runtime).
For your Information my Report will not exceed more than 60,000 rows so, no need to Split the File.
So, I want to know, why LabVIEW is losing ActiveX Reference when we are doing Excel Open/Close at Runtime.
Because I’m not deleting this file(just Closing). I think it should not loose.
BR,
Munna
Eventhough I am not good with ActiveX reference and how its used in RGT, let me guess what is happening.
When you use the report generation toolkit and initialize the report, actually you are opening the file but keeping the window state "Normal". So you don't see that the file is opened and when you actually open it manually there will not be any problem, but when you close the file then the reference becomes invalid. This is very similar to the case when you keep the window "Maximized" and the reference becomes invalid when you close the file. Please correct me if I am wrong.
07-02-2014 11:03 PM
Yes. Correct . When we are closing the File then Loosing it’s reference.
May be, we can control RGT error Codes (like my 1st VI). If we know Errors codes (about File open/close) then again we have to reopen same file.
But I don’t know all possible Errors about this operation.