LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Posting vi's on the internet to unlimited amount of users with your own server

Currently I'm working on a VI that I want to make available to an unlimited amount of users via the internet. The problem is that the version of Labview that I have only lets one user access control of the vi at a time. First I want to have this program run continuously without anyone pressing the run button or asking to gain control. Second I want it to run off of my own computer or a different server. Third, I want it to run regardless if the person has the labview run-time engine or not. Finally, it all has to be accessible through one url. Can anyone help me on this?
0 Kudos
Message 1 of 7
(3,063 Views)

There are several issues here.

First, you need access to a server where you can have a valid internet IP address and where you will be allowed to run executable code. This is not a minor issue and you should make sure you can do this.

Second, users can not control a VI without the LV RTE installed. They can view it if it's in snapshot or monitoring mode, but not control it.

Third, I believe that the only version that allows giving control to more than one user at the same time is the new 8.2 and I don't think you can get around this.

You could try using an alternative mode of control. Programs like VNC allow users to control your entire computer, along with the VI, but that's probably something you don't want. Other options include using some of the software that was developed to allow just this, but the programs I know of (LabVNC and AppletVIEW) were never finalized.

The good news from all this is that if you build your VI into an exe (using the application builder, if you have it) it will run automatically. The other option is to go into File>>VI Properties>>Execution and check Run When Opened. You will also need to add a command to the server's startup routine to open LV with this VI.


___________________
Try to take over the world!
0 Kudos
Message 2 of 7
(3,049 Views)
Tst,

Isn't there some way to set static buttons on a web page to send a certain string or command via TCP/IP to the server?  What port is used, how does this work with other systems?  I mean, on a basic level, there's communication from server to client via a certain set of ports.  Can't this be used to receive strings as commands and update a graphic on a web page as a result....

In what format is something like www.ni.com?opendocument...... sent?  Is there any way to intercept things like this in LV?

It's pretty much a poor man's interface, but surely it's possible.

Bear in mind I've never even gone close to implementing anything along these lines, I just find it hard to imagine it's IMPOSSIBLE.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 3 of 7
(3,041 Views)

I'm far from being an expert on this myself and I haven't actually done anything like this. In any case, Jmax seems not to be an internet guru either, just someone who wants to be able to control the VI from anywhere, without having to install anything and with no limitations. Smiley Very Happy

The closest thing I've done to this was an experiment I did once where I grabbed the image of a VI and sent it to another VI (on a PDA) and there I detected where the user was clicking on the image and sent that back to the computer for simulating the click. A small web application to do this can probably be written, but it is definitely beyond my skills.

As for how data is transferred on the internet, there are quite a few protocols, but I don't really know anything about them. I believe NI uses Javascript to maintain your login data and dynamically generates the HTML code of the pages you're viewing based on its internal DB. Personally, I haven't managed to use LV to talk to NI's web site, because apparently the browser sends some additional data when dealing with Javascript which the internet toolkit VIs could not send or identify, so what I got was HTML code for an anonymous user.


___________________
Try to take over the world!
0 Kudos
Message 4 of 7
(3,025 Views)
Jeffrey Travis wrote a book called 'Internet Applications in LabVIEW'. It was written for LabVIEW 5.1 and before the remote panels feature was available. I'm not at my office and can't quote it directly but there are techniques using ActiveX and/or CGI functions in the Internet Toolkit. Unfortunately, the book is now out of print. I'm not willing to sell my copy but someone else might be.
0 Kudos
Message 5 of 7
(3,021 Views)
Hi Jmax,
(If you're still listening)  Interesting question!  I saw this shortly after it posted and wanted to reply, but waited so you'd get some competent advice first. Smiley Wink
 
OK, so you have little money to throw at this, but what about time - do you have time to learn a language?
If you were willing to design your web-interface in Java, you could communicate to a LabVIEW application via data-sockets.  I'm not clear on whether you want a single LabVIEW program serving multiple users, or does every user get his own copy of the program?  It ought to be possible to launch multiple re-entrant versions of the same VI as required.
 
Sounds crazy! - but let me know if you're interested. Smiley Happy
This has been a pet idea of mine since the late 90s and it wouldn't take much to [help] make it happen.
 
Cheers.

Message Edited by tbd on 08-17-2006 11:32 PM

Message Edited by tbd on 08-17-2006 11:33 PM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 6 of 7
(2,995 Views)

If you want multiple copies, that's another issue, and you could probably do this purely in LV. For example, instead of using VI server to launch your reentrant VIs, write a program which copies both the VI and the htm file and then modifies the htm file to point at the new copy. Then, the real trick would be to be able to forward the current user to the new htm file, thus releasing our "login" VI. Once the user stops using his or hers copy, the VI and htm file can be deleted.

The entire copying\running\forwarding part can probably be done either with some web language or using LV, but at least the forwarding part will probably require some understanding which I don't have. I know that forwarding is a simple command in HTML, but I don't know about changing the html, refreshing the page or setting a timer. Then again, I don't really care, either. Smiley Wink

Unfortunately, this wouldn't help for controlling the same program. For that, you would probably need something along the lines of what I described earlier.


___________________
Try to take over the world!
0 Kudos
Message 7 of 7
(2,985 Views)