Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

labwindow remote control

Hi,

i am having problem to remotelly control the front panel when i save it as index.htm file. when i try to click the front panel display on the index.htm, it directs me to the url "cltpull_panel.map" and displays 'this page can not be display' because it unable to link the cltpull_panel.jpg with the cltpull_panel.map file. so basically what is the problem? how can i link the .jpg file with .map.

below is part of the CVI which is about the cviinet part and also the source code for the index.htm file. hope this can make u guys clearly understand my problem.

thank you
*******************************************************************************************************************

int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0) /* Needed if linking in external compiler; harmless otherwise */
return -1; /* out of memory */

handle = LoadPanel (0, "cltpull_panel.uir", PANEL);
popuphandle = LoadPanel (handle, "cltpull_panel.uir", POPUP);
DisplayPanel (handle);
webserverHandle = INET_StartWebServer (80, 10, "", "c://try");
INET_RegisterPanelAutoUpdate (webserverHandle, handle,
INET_UPDATE_CLIENTPULL, "c://try/cltpull_panel.jpg",
"index.htm", 5, 0);
INET_RegisterPanelWebInput (webserverHandle, handle, "cltpull_panel.map", 0);
RunUserInterface ();
INET_PanelToJPEG( handle, "c://try/cltpull_panel.jpg", 0, 80);
DiscardPanel(handle);
INET_EndWebServer (webserverHandle);

return 0;

}
*******************************************************************************************************************
-------------------------- index.html ---------------------------


<br>Smoth Server Push<br>


This Sample HTML Page is Powered by:


National Instruments'


LabWindows/CVI Internet Toolkit





0 Kudos
Message 1 of 4
(2,890 Views)
Hello RobertTao,

You should trying removing the call to INET_PanelToJPEG() that is after the RunUserInterface call. Your JPEG file should have already been created before you call the INET_RegisterPanelAutoUpdate function.

More importantly, the path to the JPEG file in INET_RegisterPanelAutoUpdate() should be relative to the Document Root Directory specified in the INET_StartWebServer function. Since you define your Document Root Directory to be "c://try" in the INET_StartWebServer function, your path to the JPEG image in the INET_RegisterPanelAutoUpdate function should be "cltpull_panel.jpg". In addition, this JPEG file should be physically located in the Document Root Directory ("c://try").


Hope that helps. Thanks.
0 Kudos
Message 2 of 4
(2,869 Views)
Hi Wendy,

i have put all my files including the .jpg file into 1 root directory name c:\rootdir. but yet, i still facing the same problem which say that 'this page can not be displayed.

i have include my problem inside a word file which i printscreen the problem im facing, so hope you guys can understand more about my problem.

so what other step should i include in order to remotel control the front panel on the index.htm.

thank you for helping me because i am really new to LabWindow.
below is part of the source code for my problem.

*******************************************************************************************************************

int main (int argc, char *argv[])
{
int i;

if (InitCVIRTE (0, argv, 0) == 0) /* Needed if linking in external compiler; harmless otherwise */
return -1; /* out of memory */

/** Generate some random data first **/
for (i=0; i<100; i++)
datapoints[i] = 100.0 * rand() / RAND_MAX;

handle = LoadPanel (0, "fastclntpull.uir", PANEL);
DisplayPanel (handle);
webserverHandle = INET_StartWebServer (80, 10, "", "c:/rootdir");
INET_RegisterPanelAutoUpdate (webserverHandle, handle,
INET_UPDATE_CLIENTPULL, "graphs.jpg",
"index.htm", 0, 0);
INET_RegisterPanelWebInput (webserverHandle, handle, "graphs.map", 0);
RunUserInterface ();
INET_EndWebServer (webserverHandle);
return 0;
}

*******************************************************************************************************************
0 Kudos
Message 3 of 4
(2,858 Views)
Hello Robert,

I see the problem now. Thanks for including the screen shot of your Internet browser.
You shouldn't be running the HTML page from your C drive. Instead of "C:\rootdir\index.htm", your web address should be "http://your ip address or your computer name/index.htm". Since you're running a webserver in your rootdir folder, then your computer name or ip address will automatically link to that directory and look for index.htm in that folder.

Thanks.
0 Kudos
Message 4 of 4
(2,851 Views)