From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to make a locally hosted web app from a panel?

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?

 

 

 

0 Kudos
Message 1 of 2
(2,491 Views)

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.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,488 Views)