11-09-2021 04:46 AM
Hi,
We are about to add HTTP(s) access to data on a sbRIO 9628. Data will be in files either JSON or XML. Our software platform is Labview 2018 or upgraded to 2020. Our customer wants us to implement support for REST commands using HTTP. It seems very difficult to overview it and find related documentation.
Typical questions:
1. Where to start if a Newbie on this matter?
2. Product sheets for the sbRIO-96xx implies " The
built-in real-time controller also features Web (HTTP) and file (FTP) servers" but why and how is that related to hardware ?
3. From Labview 2020 NI web server is told to replace Application web server ? Where to find detailed information on differences and how to configure ?
4. Do we need anything else than activation of a web server and a toolkit in Labview for REST API ?
/Thanks for any answer that can help /Dan
11-09-2021 06:34 AM
Well, it is in so far related to the hardware, as your sbRIO is a complete little computer running NI Linux RT and in order to be able to access it as some REST capable server there needs to be a real HTTP server on it. NI Linux RT is derived from Linux but not your standard Ubuntu Linux or RedHat Linux and hence it is not as trivial as installing one of these distributions onto it. Instead NI has created a full installation image that comes with some standard components that also include an embedded web server installation, rather than a full featured Apache server with PHP , Java Script and a zillion other extensions, that would likely tax the embedded hardware so much that LabVIEW Real-time would have a hard time to get even close to being anything like real-time.
In terms of implementing REST capable services on your LabVIEW application you will most likely want to look into the topic about LabVIEW WebServices. These are VIs that you create in your project that run in the context of your LabVIEW application but also communicate through the WebService API with the configured HTTP server. This makes that your WebService VIs can interact with the rest of your LabVIEW application but essentially also run from inside the HTTP server to respond to according HTTP requests from clients.
11-10-2021 06:21 PM
Thanks for the answer so far!
But we still wonder where to start to get detailed knowledge about all this? Are there any published/downloadable documentation to buy or for free? There are checkboxes related to deployment of code and e.g. if a web server is present in the sbRIO hardware, can/shall we exclude to download one.
Things do of cause change with time but I remember the excellent documentation that was part of early Labview 4.0 and further versions in the 90'ies ? It was possible to get full understanding of code logics, memory usage, toolkit content and application builder behaviour.
11-10-2021 06:40 PM
Have you looked at this: https://zone.ni.com/reference/en-XX/help/371361R-01/lvconcepts/webservices/
11-11-2021 02:15 AM
Hi again,
Now you're talking! I have not read that yet but it seems farly detailed. Will read it.
But I have realised that the very first step is to separate terminology "Web server" from "Web services". Me and others around me did in fact mess up this terms.
The "Application web server" is told to replaced by "NI web server" from Labview version 2020. Meanwhile, the sbRIO9628 requires minimum Labview 2019 if I'm not wrong. How does that requirement affect the coding and the deployment ? What parts of the help text from Labview 2018 is then supposed to be obsolete? Do we drop the "not wanted" dependency on Microsoft Silverlight if heading for "NI web server". Or do I mess things upp again? Sorry for continuing with so many questions 🙂
/Kind Regards Dan