03-19-2013 01:39 PM
Hi,
I am trying to have LabView save the front panel image to file automatically at the end of a test without prompting for file name or location. I had success with saving the panel front image after the tests, but a dialog box would come up and ask for a file name and location. What I've attempted to do is use user input from the beginning of the program to use as the file name and have the directory be constant. I have followed various examples I've seen on the internet, but have had no luck in actually saving the image to file automatically.
Could you take a look at my screenshot of the end of my program? The two pink wires coming into the screen are from an User Input dialogue prompt.
Thanks for your help,
Dylan
03-19-2013 02:00 PM - edited 03-19-2013 02:01 PM
Have you put a probe on the wire coming out of the Build Path primative? Make sure it's returning a valid path. If Build Path fails, it won't and you will still get that dialog. Often times, a misplaced or incorrect '/' or '\' can cause this sort of problem. As good coding practice, you should also use the "get system directory" instead of hardcoding C:\ . Sometimes C:\ won't be the system root directory on some computers. That function will allow you to always grab the root.
03-19-2013 02:01 PM
It looks like your code should work. Here are potential reasons for why it won't:
If these don't help you find the reason, you should upload the VI itself, or at least add an indicator of the path and show us what the path going into the VI is.
03-21-2013 04:48 PM
Thank you for your assistance. I've made a few changes as per your suggestions, but have not had any luck in having the image automatically save to file.
I've attached the VI, if you would have a moment to take a look at it.
Thank you,
Dylan
03-21-2013 05:25 PM
Did you make sure the dialog actually comes from there as I suggested?
Also, what's the path going into the VI? Can you add probes on all the wires there and get a screenshot?
03-22-2013 08:25 AM - edited 03-22-2013 08:27 AM
dschmitt,
I was able to download your VI. I just copied and pasted the SAVE FP portion and stuck constants for the string inputs (user). I had no problems at all. Note* you will want to add ".png" to your concatenate string or else you will get an unrecognized file format.
Make sure that your "vi path" is populated with the local address of your vi. I would recommend just using the "vi server reference" under application control, but either should work.
I noticed you took your case structure out. Are you getting the exact same issue? or is it something different?
I was sure that tst's comment (#1) was what you were experiencing, but since you removed your case structure and it's still not working, I'm curious.
-Chazzzmd