mje Posted October 12, 2011 Report Share Posted October 12, 2011 I'm starting to evaluate my options for an embedded application I'll be writing in a few months that will require an API to be exposed via HTTP. I'm specifically not looking for remote panels, rather XML based responses. That is something does say a GET /daq/data.vi/foo request, which would say return the latest bit of data on the foo channel (think ajax). I've spent a few hours playing with the G Web Server, and it seems to allow me to do exactly what I want via the internet toolkit when I use the VIs in the CGI palette. Then there's the (non G) Web Server, that is the one that is configured via the LabVIEW options. Correct me if I'm wrong, but this option seems dedicated to remote panel access? Any of you have experience exposing an API through HTTP in LabVIEW? I suppose I'm looking to evaluate my options here. As I see it I'm seeing a few options. G Web Server: Already have proof of principle down, but not sure if it's portable to an embedded platform, or how light weight it is. Web Server: Doesn't seem to be an option since it appears to be centered around remote panels? Roll my own HTTP server in native G-code: A basic HTTP server shouldn't be that hard to write given the limited subset of the standard I'd need to use, but I'd also rather not re-invent the wheel. Any other options? Quote Link to comment
ned Posted October 12, 2011 Report Share Posted October 12, 2011 I don't have a lot of experience with this, but the native LabVIEW web services might be very close to what you want - I think it will even return XML. It's the same web server that serves remote front panels, but that's not the only thing it can do. From the help, "By default, a Web method VI returns data to HTTP clients as an XML string. The XML string includes a summary of the data in the output terminals wired to the connector pane of the Web method VI." Quote Link to comment
mje Posted October 12, 2011 Author Report Share Posted October 12, 2011 Oh, that does look promising! Thank you, ned. 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.