LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Detect LV runtime engine prior to showing Remote panel in browser?

I work on a web server that delivers remote panels embedded in browser windows.  On new machines, the labview runtime engine needs to be downloaded and installed.
 
Currently, when a new user 'hits' the remote panel, the user is prompted and then downloads the component.  However, the user experiences some errors that can be confusing.  The first time, the remote panel is not embedded properly and the user must go 'BACK' then reload the page.
 
We would like to check and detect whether the LVRT engine is installed prior to posting a webpage that contains a remote panel.
 
What is the best way to detect whether the LVRT engine is installed on a remote computer?
 
Jim West
0 Kudos
Message 1 of 10
(3,858 Views)

I'm not sure I understand.

Do you want to detect that the RTE is not installed on the clients?

Where do you want to detect it? On the client? On the server?

What are you planning to do once you detect it? Do you have a running program you can do something with?

 

You might wish to have a look at the HTML code generated by the RFP wizard. I think this line is what instructs the browser to download the RTE if it is not installed is

OBJECT ID="LabVIEWControl" CLASSID="CLSID:A40B0AD4...."... CODEBASE="ftp://ftp.ni.com/...LVRunTimeEng.exe"

You might be able to generate a conditional refresh if the RTE was installed by calling something like HTTP-EQUIV="refresh", but my knowledge of HTML is far from enough to tell you whether this is viable.


___________________
Try to take over the world!
0 Kudos
Message 2 of 10
(3,844 Views)

Do you want to detect that the RTE is not installed on the clients? Yes

Where do you want to detect it? I would like the CGI on the server, which is a LabVIEW executable, to figure it out prior to posting the page with an embedded remote panel.

What are you planning to do once you detect it? I would present the user with a page with instructions on how to download and install the RTE.  This would be in place of the originally requested page.  The original requested page would be a page with a remote panel embedded in the page.

Do you have a running program you can do something with? Yes, the server is running a process servicing the incoming request from the client.

I was hoping an NI person had a clear way using error codes from an specific process to detect the RTE.

Jim

0 Kudos
Message 3 of 10
(3,834 Views)


@Jim West wrote:

I would like the CGI on the server, which is a LabVIEW executable, to figure it out prior to posting the page with an embedded remote panel.


I am very much out of my element here, but isn't is contrary to the common behaviour of the WWW server\client model? I mean, to know something like that you would have to request that the client tell the server whether or not it has something installed. That sounds not very secure.

As it is now, it looks like the server does nothing. The HTML has a reference to the ActiveX object in it - if the client does not find the required ActiveX object, it is simply redirected to where it can download it and it is up to the client to decide whether to install or not. I assume that you can use a similar piece of HTML code to redirect the client to your page, but I doubt you can get it to send information on itself without installing anything on it.


___________________
Try to take over the world!
0 Kudos
Message 4 of 10
(3,825 Views)
My brain is swimming... I haven't had enough coffee this morning... There is a chicken and egg issue.  As soon as I post the page, the client knows it needs to install the Labview runtime engine.  However, my Labview process has already attempted to place the remote panel in the page.   I get an error.  I'll admit that I haven't delved into my software since there are two spawned processes involved.  One process responds to the request and another lingers in memory running the remote panel until the user finishes. 
 
From my perspective my lingering process should be sufficient to get the remote panel displayed when the RTE in finished installing but here is the catch.  Installing the RTE requires a reboot, therefore the server process would need to linger in memory a long time and then would need to recoginize that a user from the same computer and login is looking for the page.  Not really the way to go.  I can't have a process on the server lingering waiting for a user to reboot his computer and then do something when they start running again.  That process needs to die right away if the RTE is not available.
 
Jim
0 Kudos
Message 5 of 10
(3,824 Views)

@Jim West wrote:
My brain is swimming... I haven't had enough coffee this morning... There is a chicken and egg issue.  As soon as I post the page, the client knows it needs to install the Labview runtime engine.  However, my Labview process has already attempted to place the remote panel in the page.   I get an error.  I'll admit that I haven't delved into my software since there are two spawned processes involved.  One process responds to the request and another lingers in memory running the remote panel until the user finishes. 
 
From my perspective my lingering process should be sufficient to get the remote panel displayed when the RTE in finished installing but here is the catch.  Installing the RTE requires a reboot, therefore the server process would need to linger in memory a long time and then would need to recoginize that a user from the same computer and login is looking for the page.  Not really the way to go.  I can't have a process on the server lingering waiting for a user to reboot his computer and then do something when they start running again.  That process needs to die right away if the RTE is not available.
 
Jim



Would it be possible for this lingering process to check to see if the web server read has timed out?  The default is 60 seconds, and you can change it by going to Tools>>Options>>Web Server: Configuration.

Trey B
Applications Engineering
National Instruments

0 Kudos
Message 6 of 10
(3,804 Views)
You should also have an application property listing the connected RFP clients. You can poll this property to know when the client is disconnected.

___________________
Try to take over the world!
0 Kudos
Message 7 of 10
(3,783 Views)

I ran into the same problem some time ago, when setting up www.cjconline.dk. This site runs completely in LabVIEW, the front end runs in the web server in internet toolkit, whereas when the user completes the login, is given access to remotepanels.

One easy way of controlling the i RTE installation is to keep track if a user has logged on the website, first time logon-users should be directed to a page diplaying download and installation instructions. The automatic download of the RTE is not working well and is so slog (big) that most users loose their patience and never get it completed.

Currently what I do, it to ship a CD to any user that wants access to cjconline.dk, prior to giving them the user/password needed to logon.

 

 

0 Kudos
Message 8 of 10
(3,610 Views)

Thank you for responding...  I think prompting on initial login is a good idea.

We have lost all respect for the remote panel technology.  We used the RPs all over our website and we were constantly fighting problems.  The only RP we are using are the most complicated GUIS that are very hard to convert to HTML.  We are planning to abandon RP technology in our next major release.

We have several issues with the remote panels.

1) The activeX control does not reliably install itself on the initial install.  Even if your code is 'patient'

2) We have an intermittant problem when you open two remotes panels in the in same browser but on different tabs.  It will crash IE.

3) The thing will just crash IE on occasion.

Jim West

Summitek Instruments

0 Kudos
Message 9 of 10
(3,594 Views)

Jim,

You are right, I see crashes all the time too. NI does not really seem able to help much, support questions always seem to dead-end themselves. For instance in LV8.2, sharing the port 80 between the CGI scripts of the internet toolkit and remotepanels was not at all possible (althoug it worked in LV 7.1). I never accomplished making anyone at NI realize this.

But none-the-less I will say with LabVIEW, being experienced helps avoid pittfalls and LV still is a unsurpassed tool for doing almost anything. For instance, cjconline.dk receives datapackages transferred via TCP/IP throug a GPRS modem/datalogger that samples serial insturmens etc. Setting up an TCP/IP server in LabVIEW for receiving the datapackages from our remote devices took less than a day. Not many other envoriments give such flexibility. Just dont select "Explort simplified image" when right clicking on a graph displayed in a remote panel, it will crash IE. Not being able to use multiple tabs is a new one to me.

Anyhow, good luck, Greetings from Denmark

søren

p.s Dont blame you for not using remote panels the next time, I am dependent on the web server in the internet toolkit - it has not been modified/upgraded since LV 5 !.

 

 

0 Kudos
Message 10 of 10
(3,590 Views)