LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CGI data from website

Solved!
Go to solution

Hi,

 

I using LabView with Axis camera in my project and i didn't know how to download data from CGI file whitch is on website.

When i write path to file in IE (for eg. http://xxx.xxx.xx.xx/axis-cgi/motion/motiondata.cgi) I see:

 

group=0;level=14;threshold=35

 

I want to download to LabView one from this value (for eg. 14) but how?

Another problem is logging to this site. I must write login and password if I want to see site content and Axis have special ActiveX Property Node to this (on image).

 

Can anybody help me?

 

PS. Sorry for my English.

0 Kudos
Message 1 of 4
(6,280 Views)
Solution
Accepted by topic author CGI data from website

Hi,

to get data from HTTP request, you could use the HTTP Client Palette in LabVIEW. You can find it in the function palette > Data Communication > Protocols

After performing a GET operation, you will receive the body of the response: "group=0;level=14;threshold=35"

After it you need only to parse this string into numbers using ex. Scan String. under the String palette.

 

About sending username and password:

If the Axis camera http server accepts basic http authentication, you can use the "Open Handle.vi" from the HTTP Client palette, and wire the username and password strings to the input. This will send this data.

Please see the attached screenshot. I don't have any Axis camera, but I hope it can help you to give a starting point.

 

If you want to send other data, or interact with your camera webserver, you can use GET and POST http methods.

 

Best Regards,

Tamas Szekely

0 Kudos
Message 2 of 4
(6,240 Views)

Hi Tamas Szekely,

thank you for your answer. I check it out next week.

Have a nice weekend 🙂

0 Kudos
Message 3 of 4
(6,231 Views)

Tamas Szekely your solution works very good! Thank you! 🙂

0 Kudos
Message 4 of 4
(6,211 Views)