LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to view and control a VI remotely from a web browser

Solved!
Go to solution

Hello,

 

I want to see and control a vi using a web browser.
I followed the steps recommended in help and I can see and control the front panel of my vi.
So far everything is OK.


First problem:
A button activates a simple window display a message (One Dialog button). The dialog box opens on the server computer but can not be seen in brouser and therefore can not be closed remotely.

 

The second problem:
Another button activates another window (vi) loaded dynamically. The VI is reentrant and is open with option 0xC0 ("Enable simultaneous calls on reentrant VIs" and "Prepare to call and forget"). By activating the button, it opens multiple instances of the VI properly and runs on the server computer, but their are not visible to the client computer.
I created, after the same algorithm, corresponding HTML file for the dynamically loaded VI and it is saved in the same place with the main program HTML file.

 

What to do as the client computer can operate main VI and adjacent windows from the browser?

 

Thanks,
Cristian

0 Kudos
Message 1 of 4
(4,462 Views)
Solution
Accepted by topic author Marinica

You can't if you're using remote front panels - they do not allow for popup/additional windows. You will need to rewrite your VI to include everything on the main front panel.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 2 of 4
(4,406 Views)

Hello, 

 

Reading more on forum these days, I started to have this hunch.
Thanks for the confirmation.


Unfortunately a solution with a single screen is virtually impossible.
The program acquires and displays the "signals" collected from various field: such as analog signals (pressure and temperature), discrete signals of one or more bits. These are hundreds of such signals and can not be tracked simultaneously by a user. When the values ​​of signals coming out of the normal range, the information is displayed in the main window and the user can open a window with details (dynamically loaded VI's). This VI displays a few signals (maximum 48) related to a particular equipment or a particular area, easily understood by the user. If the system is more complex, then it can go deeper, opening a new instance of the same VI but with reference to other "signals".


I wonder if I can use "Data Socket", but I suspect not. Having multiple instances of the same VI loaded with different data, "Data Socket" will not be able to differentiate between instances.


So I started to think of another structure in which a computer is just acquisition and processing of information (server) and the user or users can access what they need from ather computers (clients). In this case the Client computers must run an application that has remote viewing of desired signals.

 

Can be other ideas?


Best Regards, 

0 Kudos
Message 3 of 4
(4,379 Views)

Another option would be to use something like WebSockets and have your LabVIEW application communicate with a web-page you've designed/developed with Javascript. Then you can use things like floating windows/dialogues with jQuery. It's a lot of work though as you'll need to define your websockets API for talking to your application and then develop the web-page in HTML/CSS/JavaScript for your user interface.

 

Unfortunately, even browsers are moving away from pop-up windows (chrome and various addons tend to block popups and they don't play nice with mobile devices). You can have semi-dialogue-like pop-ups though with modal dialogues: https://jqueryui.com/dialog/#modal-message Note though that they are contained within the browser window.

 

My advice would be to think about creating a custom UI in LabVIEW that works with a single pane / panel (you can use tab controls!) and use that with remote front panels. Then decide if you want to invest the time/effort in a WebSockets/Web Services approach with your own browser-based UI. Note as well that remote front panels don't work in Chrome properly any more.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 4 of 4
(4,372 Views)