12-10-2020 04:22 AM
I have quite complex program that today is used interactively to give a status report of lets say product zyx. After chosing 'xyz' and some more settings the user press "report" and is given a report page on the main vi with some text, graphs etc. Takes 1-20s.
Exporting the user interface report as a picture?
I like to improve life by having these reports available as pictures (png, pdf...) on a file server, pre made. Will increase speed and also make them accessible as links in word, excel.
How do I best export the whole report section of the main programs user interface as a picture?
Serving the report as a web page? Labview NXG?
Even more elegant solution would be to serve the report as a web page, so anybody (with access) get the report by the adress https://internal.company.name/report/product=123456
Should I aim for labview nxt to make this simple web server?
Solved! Go to Solution.
12-10-2020 04:40 AM - edited 12-10-2020 04:40 AM
Hi Ola,
you can get the actual frontpanel image using a VI method, then save it using the PictureFile functions…
LabVIEW and LabVIEW-NXG offer web access. I cannot speak about NXG and its WebModule as I haven't used this so far. But did you hear about the end of life of NXG announced by NI last week?
12-10-2020 05:30 AM
GerdW, what is happening to LabviewNXG then, I have missed that info totally?
12-10-2020 05:44 AM - edited 12-10-2020 05:45 AM
Hi Ola,
please see the very first thread in the LabVIEW board, in the section with the pinned threads… (Written on Dec. 2nd by omids)
12-10-2020 08:56 AM - edited 12-10-2020 09:00 AM
Hi Ola,
To add onto what GerdW described, the post in the thread Displaying LV Current Gen FP in NXG WebVI shows an approach for sharing the image of a LabVIEW front panel with a WebVI using the Tags API.
LabVIEW NXG Web Module will continue as a standalone product. You can see a roadmap in Future of the LabVIEW NXG Web Module.
12-11-2020 03:26 AM
I think my approach will be to use the current labview program to export the images. And maybe add a simple web server in NXG later to deliver the images over the web. Maybe I don't even need that, can probably use Apache or something.
12-18-2020 11:03 AM
There are a bunch of 3rd party solutions for this in current LabVIEW, none of which are ideal. My favorite solution is the Front Panel Publisher since it is open source, uses WebSockets for communication, and should work on any modern web browser including phones. It also somewhat works on RT targets, and reentrant VIs with various limitations. Still the project can be found here over on LAVA.
The API allows for indicator and control data to be sent over in a variety of modes. If the data type of the control is known you can try to send just the value. So for a string that would be the string value of course. But then the UI on the web will be some java script string and not look exactly like the string in the VI. Because of this controls can also be sent as an image. This means lots more data needs to be sent, and the control can't actually be controlled remotely just viewed. But this does allow for arbitrary controls like trees, and tables to be viewed when there isn't a web equivalent.
Code is still pretty rough around the edges, and the examples need some attention but it was all working last time I posted an update.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord