01-08-2021 07:54 AM
Hi there,
i have troubles with the WebService and really ask myself why this is so complicated. But well, maybe it's super easy if one would only know how.
First up the situation:
I have a device in a laboratory that needs to be operated by a remote user. At the same time a user in the laboratory might want to work on the device e.g. to change an optical element. So there should be the possibillity to block the device for remote access.
The system:
I am running LabView 2019 Developer Edition 32bit
The solution so far:
I started a project in LabView, added two WebServices (probably would also work with one, but it developed this way, don't think thats the problem).
So under Web Resources in the Project Explorer are two entrys now (both via GET Method).
I wrote a short .html page for testing purposes and added that also to the project to make it easier to send the parameters. (Later that URL will be send by a python script.)
Now i added some more .vi
There is a .vi that disentangles the string that comes via the WebService (these are the parameters for starting the measurements of the device).
Then there is a .vi that handles the status of the device (free, busy, blocked) and some Functional Global Variables to hand around the data within the project.
This Status.vi got a nice big LED on the Front Panel and a button to block the device. So once a user works on the device in the Lab he presses the button and the LED turns from Green to Red and the Status is set to "blocked". So when a remote user tries to start a measurement now, the .vi that disentangles the string from the URL first checks the status and won't send the command to start the device.
In short i need a system which receives Data via a URL but shows a Front Panel on the computer in the lab (which will act as WebServer).
I managed to get that all working when i start the Debug Server. Works perfectly.
I often read in LabView forums that running the debug server or publishing the project is bascily the same except for the possibilitys to debug. But of course it doesn't work anymore when i publish it.
The WebServices won't start and there is no Front Panel anymore that starts.
So next i tried it with a built. (Producing a .exe)
If i start that, the one front panel i want to have on the Host Computer starts like it should but no sign of a Web Service appears in the Web Services Management (the silverlight application in the browser).
With the Debug Server its really easy since it tells you the URL you have to type in. With the built-version ... well, it even won't give you the port number. You have to serach for it.
Does anybody can help with this frustrating experience ?
Not sure what other details I have to provide to give you the chance to help. So please let me know what information is missing.
Thanks
Jay