02-12-2010 09:32 AM
I read in another forum a posting by "NathanK" stating:
"The snapshot feature of the web server can generate images either as png or jpg. In LabVIEW 8.6 and later, the default which is generated by the web publishing tool is the png format. In this mode everything happens in memory so there is no snapshot image file generated.
In the jpg mode there is a temporary file, however it is not always the same file and the file is deleted after it is uploaded to the client. I would not recommend trying to use this programmatically.
If you need more control over a snapshot of a front panel (and you are using 8.6), I would recommend making a custom web service that takes a picture of a VI's front panel and returns it to the client. Then you would have control over the image."
I am currently using the web publishing tool snapshot feature with an EXE program written in LV8.6. However, each time a browser accesses the html file, the EXE file's memory grows by 72KB (this happens with my custom EXE program and with LabVIEW.exe when running the VI in development mode). I'm assuming this is the png that is generated each time a snapshot is taken, but the program never de-allocated the memory and the program eventually crashes. I'm aslo assuming that if I switch to "JPG mode", the web server will generate a temporary file and eventually delete it, elminating the memory leak. The problem is, I don't know how to change the modes from png (default) to jpg.
02-13-2010 12:05 AM
I don't know anything about jpg vs. png mode. You might want to post a link to the thread by NathanK that you are talking about.
But there is another thread that came up today mentioning a memory leak in the webserver you may want to view.
02-13-2010 08:37 AM
02-15-2010 01:39 PM
Hello mtru,
Did that solve your issue?
02-16-2010 08:11 AM
02-16-2010 03:00 PM
02-19-2010 02:25 PM
02-22-2010 11:50 AM
02-23-2010 05:22 PM
Hi mtru,
A potential workaround to the known issue that you were mentioning is to use embedded mode instead of monitor in the Web Publishing Tool. Have you tried something like this yet? Or were you using embedded to begin with?
02-24-2010 07:32 AM
I am and have been using the .snap function on many applications since LabVIEW 6.1. It's very simple, easy to use, does exactly what I want it to do, and is still in the documentation of LabVIEW 8.6, 2009 and 2009 SP1 as being supported.
If I am not mistaken, don't you need to have the LabVIEW runtime engine on the target system to use embedded mode? I don't want to have to try and keep everybody who wants to see a screenshot of my program to have to have a run-time engine installed. For one reason, I don't know everybody who wants to monitor our system and they literally can be anywhere in the world if the VPN to our network. Second, those who I do know would would have me install it for them. Third, why go "backwards" in capability...everybody would ask me "Why do we have to do this now?..we never had to do it before", and I don't want to use my time/energy at work to explain why NI cannot fix a memory leak that has been identified in at least the last 3 versions of LabVIEW and is still not fixed.
I had been using either LV 6.1 or 7.1 for a good part of 10 years and had very few problems with them (BTW, DAQmx is the greatest thing every put on a computer EVER). I finally make the transitioin and start using LV 8.6 on a major test platform last year, got to the very end of it and find this out. <sigh!>
It is funny (maybe not), but my work around feels like I just changed the floormats in my Toyota car to keep it from "crashing".
However, if I am mistaken and you do NOT need to use LV runtime engine for embedded mode, ignore everything I wrote above and please let me know that this is the case and I will look into it.