11-10-2011 06:39 PM
I have a labwindows application that is monitoring hardware that is connected to the PC. I want to take screen captures of existing controls, such as graphs, numerics, etc. and put them on a locally hosted web page so that the application can be viewed from a smartphone's web browser. I've found a package to take pictures of the panels that works great: http://www.gdargaud.net/Zips/ReadSavePng.zip
If I have an html document that shows a set of images with fixed file names, and I periodically update those same image files with new pictures of my panel, assuming I figure out the how to navigate my browser to the html file, I could view my controls over the internet in pseudo-real time, correct?.
Is there an easier way to do this? A library or something?
11-11-2011 01:55 AM
Todd,
which CVI version are you using? Guillaume functions have been superseded by built-in functions like SaveBitmapToJPEGFile (starting from CVI 7.1) and SaveBitmapToPNGFile (starting from CVI 8 or 8.5, I'm not sure about it). If you are using one of these releases or a more recent one you can do this to produce an image file of your panel:
GetPanelDisplayBitmap (panelHandle, VAL_VISIBLE_AREA, VAL_ENTIRE_OBJECT, &bitmapID); SaveBitmapToPNGFile (bitmapID, "yourfile.png"
Regarding the web app, you could more simply write a file from your app with relevant data and have a web page that periodically reads the file and displays data: it should be faster and with a little more effort in designing the page you'll have a lighter app for your phone. Unfortunately I cannot help in this respect as I'm not a web designer, but we have produced a similar app for use on a PC web browser and I suppose porting the concept to mobile devices is possible.