Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Writting on skyline (systemLink) tags from a rPI when the webserver runs locally

Solved!
Go to solution

Hi,

 

I made a basic webpage using the G Web Dev module and built a webpage.

If I run the NI WebServer on my PC, I can write tags from the rPI to my service URL and display my webpage with updated tag values.

 

Then I created a webservice on the rPi and targetted the built web files.

I started the dev server on the rPi and deployed the webfile on it.

I access my webpage on port 8001 and the code seems to run without error.

However, if I try to write my tag from the rPi to ... the rPi (localhost:8001) I then have an error -251043 "A supported version of the 'nitag' web service is not installed on the configured web server.".

 

From what I understand, the webserver shipped with LINX on the rPI is not able to handle skyline tags.

Am I true ?

 

I've tried to look at anything relevant on the opkg side to update/upgrade things on the rPI but nothing seems relevant.

Does that mean that I can't use tags if the rPI is used as the webserver ?

CLA, CTA

View Cyril Gambini's profile on LinkedIn
0 Kudos
Message 1 of 4
(475 Views)
Solution
Accepted by topic author CyGa

Does that mean that I can't use tags if the rPI is used as the webserver ?


It depends on the architecture you are trying to achieve. You cannot host the tag server itself on the Raspberry PI, that is correct.

 

If you are trying to make the RPI like a "network appliance", i.e. a completely standalone device you connect to the network, then you cannot leverage the tag service because the NI Web Server and the Tag Service do not run on RPI. You would instead have to make your own data APIs with the LabVIEW Application Web Server for managing data. The Call LabVIEW Web Service demonstrates having a WebVI call a custom LabVIEW Web Service.

 

What I'd recommend is keeping a separate PC with the NI Web Server, Tag Service, and Web App Hosting Service which are all included with G Web Development Software. Host your built web application on the NI Web Server and have the RPI communicate to the NI Web Server using Tags and Messages.

 

Users then visit the NI Web Server to access the different Web Applications (built WebVIs) that are published there and you get user management (login / logout) and access permissions (tag read / write permissions) out of the box.

 

That also gives you the flexibility of leveraging SystemLink Cloud if you want secure access over the internet with minimal changes to your application (just change where the RPI publishes tags).

 

The How to Build a Web UI for Your LabVIEW-Based Test System presentation goes over all of the above patterns and discusses them. I'd recommend giving it a watch to get a introduction to the different architectures for making web applications.


Milan
0 Kudos
Message 2 of 4
(424 Views)

Hi Milan,

 

The idea was to have a rPI has an autonomous device performing slow data acquisition and publishing a webpage showing the current values of the sensors connected to it. So the rPI would have to publish the webpage and host the webserver.

Clients would be PC used to visualize the data and connecting to the webpage served by the rPI. So no intermediate server between the rPI and clients.

 

Since the webserver that I can host a rPI doesnt' support tags, then I guess I'll have to fall back to websocket or HTTP requests.

 

Thank you for the links, I'll take a look.

CLA, CTA

View Cyril Gambini's profile on LinkedIn
Message 3 of 4
(416 Views)

@CyGa wrote:

Clients would be PC used to visualize the data and connecting to the webpage served by the rPI. So no intermediate server between the rPI and clients.

 

Since the webserver that I can host a rPI doesnt' support tags, then I guess I'll have to fall back to websocket or HTTP requests.


I have done this and I used websockets as you have called out already.  Here is a good example of creating a rPI interface with websockets: https://www.mediamongrels.com/make-ing-with-labview-raspberry-pi-part-4-user-interfaces-with-labview...

David Wilt
The New Standard LLC
Message 4 of 4
(353 Views)