11-20-2014 05:42 AM
Hello,
I am searching for a way to communicate within labview with API. I am not familiar with API. I received a easy manual on how to control an instrument via a browser. See attachment.
In the command line from chrome I type things like:
http://192.168.1.100/mmsp/measurement/scans/-1/get
And a receive a reaction from the tool. I would like to do this with labview and get the results in labview.
I have no idea where to start.
Can somebody help me out?
best regards,
Rens van Geffen
11-20-2014 06:05 AM
11-20-2014 06:16 AM
I don't know if GerdW's suggestion will work as I'm not that familiar with datasockets but I have another possible solution:
The data that it returns is in JSON string format. You can use the HTTP Client VIs to 'GET' the URL which will return a string just like the data you see in your browser.
You will then need to parse the string from JSON to a LabVIEW data type to get your data. LabVIEW 2013 onwards has native JSON support so you can just create a cluster that matches the data type (string name, origin, data { string scannum, string scansize, double array values } etc.) and it will convert for you.
If using an older version of LabVIEW, you can either use the string functions to parse it yourself or use an addon/toolkit - there seems to be a few available from a quick google search (https://www.google.co.uk/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#sourceid=chrome-psyapi2...