LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calling data from a web page

I am trying to communicate with an external database. I want to give the database a certain number and recieve back another corresponding number.The way it is currently done is with MATLAB. MATLAB opens a browser (in the background because you cannot see it) and connects to a url that has the certain number in it. That url connects to the database which sends the corresponding number back to the browser, which MATLAB then extracts. I was wondering if LabView has any similar built in function that can do this. If not, i think i will be able to create the correct url and have labview open a browser, but I am not sure how to extract the value that the data base sends back. I know this may not be super clear, so feel free to ask any questions. thanks in advance

0 Kudos
Message 1 of 3
(1,988 Views)

Take a look at the DataSocket functions. You can wire a URL to the Read command and it will return the text of the document available at that URL. Then you just need to parse out the value that you want. In order to get help with that you'll have to provide the format of the response.

0 Kudos
Message 2 of 3
(1,973 Views)

I found the best way to do this was to use the LabVIEWHTTPclient.lvlib:GET.vi, this will return a string of the data which you can then parse. If anyone stumbles across this thread..

 

0 Kudos
Message 3 of 3
(1,967 Views)