07-02-2008 06:06 PM
07-02-2008 06:15 PM
07-02-2008 06:37 PM
apologies for teh b&w images. i was in a hurry and forgot to dump the color images.
first image shows how the VI (move_PDF) is called in the main application.
The second image shows the details of move_pdfs.vi
Like I mentioned in my prevoius post, if I include a simple message box in the move_pdfs vi, then there is a pop up which means Labview does go through the vi.
But if I probe the filenames array or any other element inside the vi, i think "list folder" or "move" commands are not being executed.
Thanks in advance.
07-02-2008 06:52 PM
Maybe once the code is cleaned up a bit, it is easier to tell where the problem is.
07-02-2008 09:13 PM
07-02-2008 10:18 PM - edited 07-02-2008 10:20 PM
Thanks for the feedback. It is very annoying that the VI executes perfectly everytime I run my appliction with "move_PDFs" vi in "highlight execution" mode. If I turn the mode off, then the VI does not even go through "list folder" and "move" commands. I also cleaned up the vi and am attaching it with this post.
Help would be appreciated.
I forgot to add that after the main application exits with "move_PDFs" not executing correctly, if I just hit the "run" button on front panel of the "move_PDFs" vi it moves all the PDFs to the correct location perfectly.
Thanks,
07-02-2008 10:53 PM
When you turn on execution highlighting and something works, that's a pretty sure indicator that you have a race condition and race conditions are caused by use of global and local variables. From what you have shown, using a global to set the final destination is just silly. You could easily pass the value directly. Do you know if the main is even setting the path correctly? Your problem is in the main and you did not attach that.
And, as already mentioned, you should be working directly with paths - not strings. Just use the Build Path function to add a file name to a path.
07-02-2008 11:36 PM - edited 07-02-2008 11:38 PM
07-03-2008 12:28 AM
In the two images that I have sent, the first image shows part of the main application.
i have a flat structure: the first frame is where the PDFs are created. The second frame is where I force the global variable to be updated. And the third frame is where I call the move PDFs.
I thought this would be logical, and it seems that labview does move through them sequentially. just that it does not call the move_PDFs explicitly.
I wil try to shy away from globals and will send the path into the VI as input. And will update tomorrow on how things go.
Thanks for all the help.
07-03-2008 12:42 AM