LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Include non-visible area in Web Publishing tool screenshot / Run VI from command line

Hello everyone,

 

I am trying to host a periodically updating screenshot of my VI for hosting it on a local web server. I have tried the Web Publishing Tool but the screenshot only includes the visible area and the rest of my front panel gets cropped. I have tried to see if I can get past this but I have had no luck so far as there are very few settings regarding this. Can someone please let me know if this is a limitation in the Web Publishing tool or if there are options to include the non visible area?

 

Alternatively, I have also found a VI from one of the knowledge articles for a VI which generates a jpg screenshot of my VI and it captures my remote panel completely. I intend to run this VI externally from a command line / script but the only article I have found so far asks me to run "labview.exe filename.vi" and this only open my VI in a LabView window. Is there a way to execute the contents of the VI from the command line and pass a few parameters?

 

Thank you!

0 Kudos
Message 1 of 8
(1,360 Views)

You can compile the VI into EXE and Pass Command Line Arguments to a LabVIEW Executable

-------------------------------------------------------
Applications Engineer | TME Systems
0 Kudos
Message 2 of 8
(1,347 Views)

Thank you very much for the response. I tried what you said and added the cmd line args as inputs to my fields in the VI and built it into an executable. There is one thing that confuses me, the VI that I am working on takes the filepath of another VI and takes a screenshot of the external VI. When I open the VI and provide the path the screenshot captured includes the current state of the VI (i.e., the state of the front panel when the VI is running) but when I pass the same path through the command line I only get a static front panel image. Is there something I am missing?

 

0 Kudos
Message 3 of 8
(1,305 Views)

I can't imagine the issue with only the statement.

Would you mind uploading some code so that we can reproduce the issue on our side?

-------------------------------------------------------
Applications Engineer | TME Systems
0 Kudos
Message 4 of 8
(1,297 Views)

Sure, I can provide more details. I have 3 VIs attached below, they do the following:

1. take_front_panel_screenshot.vi -> This vi implements the suggestions for using cli and needs to be compiled into an exe for usage.

2. upgraded.vi -> Consider this as the base VI for which I try to take the screenshot. Opening and starting it generates a waveform that continuously changes.

3. ss_autostart.vi -> This is the original vi which takes 2 filepaths (one for an image output and the other for a VI path) and running it in LabView directly generates a screenshot with the current state of the chosen VI.

4. image.jpg -> the output that I see when I run this setup from the exe provided.

 

The 1st arg for the binary is the path to the VI and the second path is the path to an image file for generating an output. I used absolute paths since relative paths were not being resolved correctly.

 

As it can be seen I do get an image of the front panel but it does not show the current running state of the VI (although I have it running and the ss_autostart.vi captures this perfectly).

 

Please let me know if any further details can be useful.

 

PS: I could not upload the binary due to content restrictions.

 

Thank you.

0 Kudos
Message 5 of 8
(1,293 Views)

What do you mean by "current state of the chosen VI"?

I run the ss_autostart.vi in LabVIEW ADE and it gave me the exact image as the one you attached. I don't see any part of that VI has properties related to VI state.

-------------------------------------------------------
Applications Engineer | TME Systems