06-23-2019 08:47 PM
I have an application where I need to pass data from LabVIEW to NXG. To try this out, I am using the Multiple Tag Writer example project in LabVIEW, which runs a VI called Write Multiple Tags Client. No issues running this VI in LabVIEW 2018.
In NXG 3.1, I have created a gvi that can read the tag. (pictured in the attachment). This works just fine.
I would like to make this a web VI. I tried copying/recreating the code into a gviweb, but when I run it, I get an error:
"Javascript message: Failed to load http://localhost/nitag/v2/tags
Is there a reason why this kind of VI works as a gvi, but not gviweb?
Thanks.
Solved! Go to Solution.
06-24-2019 06:22 AM
Since the WebVI is a web application running in a browser hosted by NXG, you probably need to enable CORS from the NI Web Server Configuration utility.
06-24-2019 06:47 AM
That worked. I'm glad the solution was simple.
06-24-2019 09:39 PM
Follow up question.
I built the web application following this page:
http://www.ni.com/documentation/en/labview-web-module/latest/manual/building-a-web-application/
Then, I hosted it on the NI web server
http://www.ni.com/documentation/en/labview-web-module/latest/manual/hosting-ni-web-server/
I can see/run the application when I'm in a browser on the same computer. I tried to access the web application on my phone (connected to the same network). I can see the web VI, but I get error 363650. It looks like it's related to CORS, but CORS is enabled for all, just like in your instructions.
09-26-2019 02:46 AM - edited 09-26-2019 02:46 AM
Hi, ,me too. I get the same error related to CORS. Is this problem is still occur? Did you somehow manage to overcome it?
09-26-2019 04:44 AM
Take a look at this post. I had posted the question in a separate thread.