LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with saving Front Panel in applictaion only

I having an issue with my VI here. I have some code to save a front panel screenshot of my test when it finishes. It works fine on the computer that has my Labview 14 installed on it. When I create my application and delpoy onto another station. It wont save my screenshot. I could install labview on the computer that wont save the front panel screenshot but there has got to be a way. I could run a HTML report but the "database guy" claims it is much easier for him to retreive a .jpg file.

Any ideas? Thanks!

 

Capture1211.JPG

0 Kudos
Message 1 of 6
(3,193 Views)

You may not have the correct permissions to write a file where you want to. See if you have any errors coming from the save jpeg function.

0 Kudos
Message 2 of 6
(3,189 Views)

What are you using for the VI path when built into an EXE?  If you want a picture of THIS VI, remove the path and open reference.  Also Image Depth is 1, 4, 8, or 24.  100 doesn't make it any better.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 3 of 6
(3,173 Views)
Make sure the front panel of the VI is in memory. The code optimization in LV will happily optimize front panels out of existence if the application builder doesn't think they are needed.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 6
(3,153 Views)

In particular, when building the application, go to the source file settings and make sure that the front panel of the relevant VI is not removed. Since I assume that you are trying to take a screenshot of a front panel that is visible to the user, most likely that's not the problem.

 

Most likely you are not forming the path correctly. For more details, have a look at this document.

0 Kudos
Message 5 of 6
(3,140 Views)

Aggregating some of the previous comments and adding:

 

  1. Make sure LV doesn't remove the FP of the VI you want to see. The easiest way to do this is to create a property ndoe for a control in that VI and put a comment next to that node.
  2. Make sure the path to the VI is correct. Paths change when you build an EXE. It's easiest to just use a VI reference as the input and use the This VI constant to get that reference. You can also use a string instead of a path to open a reference to a VI that's already loaded without worrying about its path.
  3. Look at the error of the function. WIthout that you don't know what the issue is.
  4. Likewise, the error for the method.
  5. Make sure you can write to the path you're writing to.
  6. Use a correct image depth. I believe 24 is the default, so you don't even need to enter it.
  7. Use PNG instead of JPEG, as it's much better for type of image (JPEG has compression artifacts). There might be a DLL that's added to the data folder of your EXE that you need to have there for this to work. I don't remember if that's still the case.

___________________
Try to take over the world!
Message 6 of 6
(3,097 Views)