olisting Posted October 30, 2013 Report Share Posted October 30, 2013 (edited) Hi all, i've a project on a cRIO with some I/Os running under LabVIEW 2012. Now i want to visible my results on a website with the cRIO webserver. So i wrote a web service witch show the content of some shared variables. Because the default website show only a table with each name and content of the variables, i toke a string variable and save a html link to a picture in it (<img src="myGraph.bmp">). In my LabVIEW code i get the image of the graph using a property node and save it to an *.bmp file. Code of the initalisation of the variable and saving an empty graph at start up: Now when i deployed my program the picture was saved and the website look like i want to. But when i run my cRIO as a standalone it seemd that he didn't open the frontpanel and so he take an empty picture with. I checked if the frontpanel was removed by the build specifications and i try to set a invoke node to open the frontpanel first. But both didn' help. I'm a native html but a good LabVIEW programmer. So i try to solve it in LabVIEW. But perhaps there is an easier way in html. But up to now i don't know how to reference to the webservice variables from an html file. I found an example for forms connecting to webservices. There i've to send the returned website with a LabVIEW build html string and i don't know how drawing an graph in html. Now i'm thinking about drawing my own graph in a picture with LabVIEW and saving them... So have anyone an idea how i get a graph easier to the website? thanks for help and sorry for my bad english grammar Oliver Edited October 30, 2013 by ofrank Quote Link to comment
Neville D Posted October 31, 2013 Report Share Posted October 31, 2013 As you found out, all front panel properties don't work exactly the same in LV-RT. I don't think opening the front panel property will work on RT, since VI's don't really have front panels in that environment. If you look at the help for various properties, there is a chart that shows whether that property will work in RT or executable form and whether they are read only or read/write. You might have to write a VI running on a PC that accesses the data points from RT and plots whatever graph you need there. Quote Link to comment
olisting Posted October 31, 2013 Author Report Share Posted October 31, 2013 Hi Neville D, As you found out, all front panel properties don't work exactly the same in LV-RT. You are absolutly right. The invoke node "FP.Open" don't work in the same way on a RT-system like on a standard PC. Also if looked already in the help for that method. But NI just write "Available in Real-Time Operating System=Yes". That means in this case: you won't get an error running that method... You might have to write a VI running on a PC that accesses the data points from RT and plots whatever graph you need there. That is no option for me because the RT-system running standalone. The task was to check the state wih a browser on any PC or laptop wich will be connected to the system temporarily. So i think i've to draw a graph by hand if no one other have an idea... Thanks Oliver Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.