05-31-2024 09:45 AM
I am new to web service development and am reaching out to see if anyone can provide some insight for web browser configuration of an application. I have a .exe that I am going to deploy and run on a master computer that will not have Labview, but the RTE. I also need to be able to access the app from a web browser and am curious how to be able to do this? I went into the web service section of the build spec and it asked for a server. I created this server but I do not understand how to configure the web browser itself. Any help would be greatly appreciated.
05-31-2024 06:46 PM
See Archived: Publish a LabVIEW VI to a Web Page With the Web Publishing Tool if you are using LabVIEW prior to 2022.
Alternatively, see Tutorial: Creating and Publishing a LabVIEW Web Service to the Application Web Server (Real-Time, Wi...
06-03-2024 06:47 AM
Thanks for the reply! However, I followed the tutorial previously and did not find it useful for my application. This tutorial is more of what I would need to do, but it does not provide any instructions on how to run the application in a browser window
06-03-2024 07:35 AM
@kyleozinga wrote:
Thanks for the reply! However, I followed the tutorial previously and did not find it useful for my application. This tutorial is more of what I would need to do, but it does not provide any instructions on how to run the application in a browser window
If your (running) application has a web service interface, you should be able to type the URL in a browser, and it the application should reply.
The browser sends a HTTP GET to the application's web service, and it replies (if the URL is correct).
Nothing needs to be running in the browser.
You could do the same from CURL (command line) or any application that talks webservice.
You can of course make something that runs in the browser (e.g. with G Web Development software). This could communicate with your application's web service.
It's not clear to me what you want. A WebService is just a means of communication, not something that runs in a browser.
06-03-2024 08:00 AM
Thank you for the quick response. As for the application web service, what needs to be created in the web service itself? I created the web service, do I just need to create an HTTP (GET) in the web resources folder?
06-03-2024 08:24 AM
@kyleozinga wrote:
Thank you for the quick response. As for the application web service, what needs to be created in the web service itself? I created the web service, do I just need to create an HTTP (GET) in the web resources folder?
Yes.
Have you seen the Web Service examples? From the menu, select Find Examples.... and type "webservice".
The address book example has a read me explaining how to communicate with a WebService from a browser.
The weather station example has both a client and server in LabVIEW.
06-03-2024 08:46 AM
I have but I don't understand how it will relate to wanted to show and control the front panel of my application. My application has multiple controls and all reference a Microsoft SQL server to provide data, and I want it to run exactly as it does on the application. Like I mentioned previously, I am brand new to Web Services and don't understand how to create the web services VI to interface with my application.
06-03-2024 09:48 AM - edited 06-03-2024 09:52 AM
@kyleozinga wrote:
I have but I don't understand how it will relate to wanted to show and control the front panel of my application.
If you 'simply' want to show the front panel in a browser, I doubt a WebService is the solution.
LabVIEW has web hosting features (both Windows and RT), remote panel technology, and there might be other tricks. See for instance the link in the 1st reply.
@kyleozinga wrote:
My application has multiple controls and all reference a Microsoft SQL server to provide data, and I want it to run exactly as it does on the application. Like I mentioned previously, I am brand new to Web Services and don't understand how to create the web services VI to interface with my application.
The WebService command should set data (by reference), send events, or do things like that to make it do what you want.
There's no way I know of that automatically makes WS commands do what your user interface does. You'd have to make it.
It seems to me once you get the WebService communication working (which isn't hard), the problem is shifted to architecture and 'normal' LabVIEW: how to make a asynchronous process control your front panel.
But that only takes case of the LabVIEW side. You'd need a similar or completely different solution for the client side...
06-03-2024 10:13 AM
I want the front panel to be shown, the client computer being able to select one of the active samples running, be able to change the sample time, and have it displayed on the XY graph. So you're saying this is not worthwhile? The samples don't need changed, and all the subVI will be untouched in the browser, but the higher ups want to be able to view the sample data in real time when traveling.
06-03-2024 10:24 AM
@kyleozinga wrote:
I want the front panel to be shown, the client computer being able to select one of the active samples running, be able to change the sample time, and have it displayed on the XY graph. So you're saying this is not worthwhile? The samples don't need changed, and all the subVI will be untouched in the browser, but the higher ups want to be able to view the sample data in real time when traveling.
I'm saying a WebService might not be the solution.
A WebService could be part of the solution, but a WebService is just a communication protocol.
There probably are replacements for the suggested (obsolete?) webpublishing tool, but I'd have to dig for that too.