01-26-2023 02:18 PM
I am working with a team that is trying to build a GWEB application on a localhost to control some equipment via LabVIEW. Is there any way for GWEB to call and open a vi? It seem like I need that VI open and they try to control things through GWEB.
Solved! Go to Solution.
01-26-2023 02:42 PM
If G Web needs to talk to an application, that application needs to already be running and be capable of handling web requests, whether using the SystemLink APIs (SystemLink server/cloud not needed), WebSockets, or LabVIEW Web Services (or other, more involved approaches).
G Web Apps are just static content that gets delivered to a browser and runs in that browser which could be any machine, with or without LabVIEW / Run-Time. A browser isn't LabVIEW and isn't a LabVIEW Run-Time, nor does it directly integrate with either. You'll find a lot of identical context in this discussion: https://forums.ni.com/t5/G-Web-Development-Software/Conversion-of-VI-to-G-webvi/td-p/4279527
01-26-2023 03:13 PM
I am not sure if I am using the correct wording. The goal I have is to start my LabVIEW application that is closed from GWEB. The way I see it now open and start a LabVIEW vis and open and start GWEB/Brower application. Is there a way to have GWEB open and start a LabVIEW vi.
Everything running on the Localhost
01-26-2023 03:30 PM
No, as stated it needs to already be running to be accessible from G Web. If absolutely needed another approach would be to have another program running that acts as a server to respond to web app requests to launch a program, which the G Web app could then communicate with.
Web apps can't arbitrarily run applications on systems that doesn't provide that capability. Browsers are sandboxed environments to keep the web/systems as safe as possible. If you want something that can launch an application from a web app request, you need to make that yourself.