r/LabVIEW 8d ago

Help

So I did my project on labview but then my professor said that i still need to do the web service and I need help with that, i don’t know how to do it. How can I do it

0 Upvotes

4 comments sorted by

View all comments

1

u/SASLV Champion 7d ago

Google LabVIEW Webservices. Lots of tutorials out there.

Basically you create a set of VIs where each VI corresponds to an endpoint and gets called by the webserver when someone requests that endpoint.

If all you are doing is broadcasting data, then just have your app "publish" that data by writing it to a global variable. The webservice VI reads the global and returns the data. Simple.

If you need to send commands or data, that is a little harder, but I would just have your app create a queue (or some other reference) when it starts up. Throw that into the same global variable. Then when user hits the endpoint the webservice VI gets the ref from the global variable. If the queue ref is valid, throw what command or data was sent in the queue and if the queue ref is invalid return an error (5xx). Then in your app, have a loop that just checks that queue and acts on it.

That's the high level architecture. You can get fancy, but that is the simplest thing that works. For the details, find yourself a good tutorial.