11-24-2016 03:02 AM - edited 11-24-2016 03:05 AM
hi wolfgangsimeth,
Actually i have no idea how to get the real time status of excel report code execution...i think it is the key point how to fix the problem...i placed the source code in the attachment
11-24-2016 03:40 AM
yuanjieping ha scritto:hi cente90,
do you means that after the excel report (producer) finished, one state will be enqueued, and then the progress bar VI (consumer) received the queue? if so, it looks like one time delay function is used after the excel report VI.
do i right understand?
I supposed you had the possibility to detect the status of the excel report creator in real time, so that the problem would have been limited to communicating the data between the two VIs; this is why I suggested to use a queue, which provides almost zero time delay (unless the producer enqueueing is faster than the consumer processing). In this way the VI creating the report could communicate its status in multiple moments during its execution, not only after its conclusion.
Unfortunately I run an earlier version of LV (2012), so I can't open the VIs you attached in your last post.
11-24-2016 03:44 AM
hi cente90,
i am not able to detect the status in real time.. do you have any idea?
11-24-2016 03:45 AM
You´re right. That´s the problem. You won´t be able to update a progress bar if you don´t know the progress status of your SubVI. And I´m afraid, there is no way to get that information from a SubVI. You can tell whether it´s running or not, but that´s it.
11-24-2016 04:29 AM
yuanjieping ha scritto:hi cente90,
i am not able to detect the status in real time.. do you have any idea?
Without being able to open the VI it's impossible for me to have a try, you should save it for a previous version or create a snippet for a previous version.
11-24-2016 05:15 AM
An absolute shot in the dark: if you do not have any for loop or piece of code of which you can determine execution time inside the VI that creates the report, would it be possible to divide it into logical sequences and send an artificial but reasonable approximation of its time execution state after each sequence?
Example: the VI I want to trace multiplies two numbers and adds the result to a third one: I don't know how much time is required to perform the two operations, but I can estimate each of them takes 50% of the total VI execution time. Therefore, as soon as the multiplication is completed, I send via the queue the value 50% to the progress bar VI, and after the sum I send 100%.
11-24-2016 06:11 AM
i enclosed the snippet in the attachment. actually i also use the queue to transfer the message to the progress bar....And if it is a counting VI it will be no problem to estimate the execution time with a Loop, but for creating report, i have no idea.
11-24-2016 03:02 PM
That's the Report Generation Toolkit if I'm not mistaking, so trying editing the subVIs to make them communicate their state is probably not a good idea. I'm afraid there is not very much to do then: the only alternative to the idea of my previous post is to run the report generator some times by yourself and determine how much time is takes on average to execute, and then set up a loop running in parallel inside the report generator block diagram, calibrated to last the same average execution time of the four subVIs sequence you've determined; that loop would be easy to monitor in terms of progress, and you could also force it to exit if the report generation finishes before it. This is seriously approximative (the report generator execution time depends for sure on the PC technical specifications, and also on the strings array size, I guess - you should calibrate the parallel loop with respect to it), but I can't figure out many different solutions.
11-24-2016 07:37 PM
anyway thanks for your help. i will have a try with your solution.