I'm trying to access and read network shared variables from web using the instructions given in LV help.
I'm send the request as follows, but cannot get the value.
I've created couple of variables, deployed them and continuously updating their values on the target. I can successfully read those variable in LV host application, but cannot get them as described in the corresponding help instructions.
Any help is appreciated.
Thank you for for your reply.
Actually I need to get shared variable data not in the LabVIEW environment, but web.
I need to get the value with HTTP Get command. In the help the command is described as follows, but I cannot get it to work.
I'm using Postman to send the request and get response, but never get it.
You can give curl a try. I think it's build in, at least in my Windows 10, but probably earlier as well.
Although I don't see why the results would be different, it would be a 2nd opinion.
You should also be able to use that URL in a browser. IIRC, you can remove parts from the end of the URL, and get a higher level response. So you might be able to remove from the URL until you get anything, and than build up the URL small steps at a time.
A ping would rule out any network problems.
I'll do some digging, I'm sure I did this a while ago. But most recently I did it for SystemLink, which is similar but with variation on the URL. I'd think the URL is the biggest problem here. I'm sure I put a link to useful info somewhere...
I have tried with the browser as well, but got the same result.
Also the Postman is running Curl inside, so it is also not helping.
I'm getting the following response:
<h2>Access Error: 404 -- Not Found</h2>
<pre>Cannot open document for: /nivariable/VariableValues(%27ni.var.psp://169.254.141.232/NSV/Status%27)/Value</pre>
I used (from localhost) this in the past:
So IIRC, port 8080 is used for HTTP, but not for the shared variable engine. 3580 is probably default.
I have tried to create and deploy shared variables on Host PC as well, and tried to get their values as:
But again the same error, both with the Postman and browser. Still cannot figure out what is the issue.
Are there any settings for the shared variable that maybe I'm missing, or perhaps some software on the target?
Do you get anything with:
I get XML:
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?> <service xml:base="http://localhost:3580/nivariable/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app"> <workspace> <atom:title>Default</atom:title> <collection href="VariableObjects"> <atom:title>VariableObjects</atom:title> </collection> <collection href="VariableValues"> <atom:title>VariableValues</atom:title> </collection> <collection href="VariableValueGroups"> <atom:title>VariableValueGroups</atom:title> </collection> </workspace> </service>
Any other request I get """ does not have permission to read VariableValues".