08-15-2014 02:39 PM
Hello all,
I have spent the afternoon looking over all the KB articles and forum threads I can find trying to figure it out, but no luck. It s.e.e.m.s. like a lot of the help doesn't refer to the correct menu entries any more for LabVIEW 2013.... But anyway, I have a VI which I have exported to an executable (.exe) for Windows 7 from LV2013 (also on Win7). What I would like to do, is either have elements of the front panel visible on a web page, or the whole thing visible with remote control functionality, depending on which is simpler to achieve.
I have followed the instructions here<http://digital.ni.com/
So I changed to instead of embedding the VI, using the monitor mode, updating once a second, which also fails. The page loads fine, apart from the image file, whose container appears with the "broken image" symbol.
Any ideas?
08-15-2014 09:46 PM
What kind of data is on the front panel that you need to see? Do you need to be able to control the LV exe from the web interface as well?
Mike..
08-16-2014 01:41 PM
Control would be a nice feature to have (hence why I initially tried an embedded front panel), but is not essential. Viewing the whole front panel would be good, but I would settle for passing an image of some XY charts and some numeric outputs to a static web page.
08-16-2014 02:30 PM
08-17-2014 03:08 AM
Hmm. Maybe web server wasn't the right terminology? I work in a physics lab for a major UK university, and I just wanted to have experimental data available (to monitor during a run) on the Uni network using the lab computer as a server. I have achieved similar stuff before using python and Bottle to rig up a quick "status" page for previous experiments, which could be accessed by going to a certain address while on the university VPN. As a result, automatically only people who are already trusted users of the university network should have access.
The data are not in any way secret, so if there is not control over the experiment to be had, then it doesn't matter who accesses the page. On the other hand, if the VI is embedded in the page, then I should restrict acces, just to prevent any possible damage to my equipment through misuse.
Does that help?
Thanks, Matt
08-17-2014 07:09 AM - edited 08-17-2014 07:10 AM
Very cool! I hadn't heard of Bottle before. In any case, the job will be easy. First, create a simple page that displays the graphs as images with predefined names.
Next, is the LV code. There is a graph method that allows you to grab the current content of the graph and save it as an image. Tell LV to save the image every so often with the path, name and filetype that Bottle is expecting. And I think you're basically done.
LV generates the images and Bottle makes them visible as a webpage. Sort of like the "Hello World" example on the Bottle website, but with pictures.
Mike...
08-17-2014 08:48 AM
Ok yes, that would be a valid way of approaching the problem. I could even just re-use most of my old Bottle code from the last version of the setup, which did precisely what you suggest with a python script handling communication with the devices (it was a simpler setup). I will put some serious thought into using the method you propose, nevertheless I was hoping to somehow make use of the "web publishing" feature of LabVIEW to make a nice and easy web-based UI for the experiment, if at all possible.
08-17-2014 09:51 AM
There is the web application approach, but it has its own learning curve and you are already familiar with the Bottle tool. If you are interested in learning about the web application functionality, there are examples online.
Mike...