LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer data from web to LabVIEW

Hi all
i'm trying to transfer data from a web page to labview and i'm using GET.VI after that i'm using Match Pattern.vi to parse the usefull data out from that long string results
i have a problem in prasing data
any help please
Thanks

Download All
0 Kudos
Message 1 of 11
(2,718 Views)

Hi ahmed,

 

i have a problem in prasing data

Which problem do you have in parsing the data?

What is the expected result and where do you fail?

 

Additional note:

How should we help when you only attach images? Attach the VI!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(2,710 Views)

Hi Gred W ,

sorry if i didn't expalin well so i mean the data in the tab in the web page as shown in the capture when i run the VI i have Nothing in my tab.

thanks

0 Kudos
Message 3 of 11
(2,685 Views)

Hi Ahmed,

 

when I run your VI with the string constant I get this result:

check.png

There are results: You only need to increase the size of the string indicators!

(Switching to a different display mode of those strings might help too.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 11
(2,682 Views)

thanks for the response but as you can notice in my boucle while i stop when the length of my html text is zero in fact i need to prase data for the 12 Ports but i only get results only for X1 ? 

0 Kudos
Message 5 of 11
(2,676 Views)

Hi ahmed,

 

i only get results only for X1 ?

Maybe you need to search for X2, X3, and so on?

Are you sure your search criteria is correct all the time?

 

Edit:

You are searching for a constant 'id="port label_0"', while this label changes for each item in the HTML table to label_1, label_2m and so on.

Did you even compare your search criterias with the actual HTML text?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 11
(2,673 Views)

Hi GredW ,

 

Yes exactly that's the problem i was using this other devices to transfer ports informations in which i have the same constant string before port name , any ideas please on how can i extract all ports informations from this html text .

this is my last VI version

 

Best Regards

Ahmed

0 Kudos
Message 7 of 11
(2,648 Views)

Hi Ahmed,

 

any ideas please on how can i extract all ports informations from this html text .

As already said before: you need to search for incrementing port labels!

Searching for a constant "label_0" will always result in just the first entry found!

 

Quick fix: search for "port_label_"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 11
(2,646 Views)

Hi Gred W ,

 

thanks but in the port indicator i need to display only port name " X1" for example but like that it will display :

0"

        >

X1

also the same problem with link parameters when it's  UP and Down i don't have the same constant string .

Best Regards

Ahmed

0 Kudos
Message 9 of 11
(2,644 Views)

Hi Ahmed,

 

i don't have the same constant string .

As you know what you are looking for you can create your search algorithm accordingly.

(This is much easier than to parse unknown text…)

- You know the generic structure of your HTML text, so you can easily parse single rows of your table.

- In each row you know the number and expected content of each cell.

So create an algorithm to get table rows, then parse each row…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 11
(2,635 Views)