LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

parsing through large abounts of data

Hello, this is my first time turning to the discussion forums for help but I cannot find anything else helpful.

 

I am sending commands to the cmd prompt on my computer and and recieving large amounts of data in return, and all I want is to be able to check for a single mac address. In my vi, I have a couple of examples of what some of the data may look like and this works but only if you know what the address you are looking for is. I wanted to try and make this more universal, so that I would be able to look for a specific spot in the returned data and then look for my mac address there. It is looking for the address from the returned data, and then looking for he same address in a seperate cmd prompt and then comparing the two to make sure that the same address is on both sides.

 

Basically I am wondering if I can look for a small snipet of data cmd prompt and then from there, look for the piece of data that I want. Is this possible to do?

 

Thanks, any help is appreciated!data parse.png

0 Kudos
Message 1 of 7
(3,285 Views)

please attach your VI (or a snippet) instead of a picture. We cannot run or test a picture.

0 Kudos
Message 2 of 7
(3,273 Views)

I think I might have found a solution where I could use the match pattern vi and look for something that will always be in the code and maybe do that a few times and blow off the top and bottom of the code so that I am left with a small section that will be easier to search for the address that I am looking for.

0 Kudos
Message 3 of 7
(3,266 Views)

I was able to find a way to search through the large amounts of data that I would recieve and find only the mac address that I was looking for, and then go into a nother data set and find another address to compare it to. I have them both output as an array of strings and I would like to compare them to give a pass/fail test to see if they are the same. I know that in this case they are the same, but I have used both comparison modes of the equal? function and neither of them are working for me.

 

What am I doing wrong? I just want to compare these two string arrays to show that they are equal or not. data parse.png

0 Kudos
Message 4 of 7
(3,229 Views)

You have arrays of strings, thus, by default, you get an array of booleans, one for each pairwise comparison of the elements in the input arrays.

 

If you want to know if the entire arrays are identical, right-click the equal comparison and select "compare aggregates" instead. Now you get a scalar boolean.

0 Kudos
Message 5 of 7
(3,207 Views)

@KovAcevich7 wrote:

What am I doing wrong? I just want to compare these two string arrays to show that they are equal or not. 


Also, please place typical data also in "string 2", make the current values default, save and attach the VI again. Currently "String 2" is empty and we cannot test.

0 Kudos
Message 6 of 7
(3,201 Views)

I was able to find a solution to my own problem. Under the string>additional string functions I was able to find the "Search and Replace Pattern.vi" and with that I was able to pick all of the characters in my string that I wanted removed. This allowed me to do away with the for loop in the prevous posts and take out only what I wanted from the strings.

0 Kudos
Message 7 of 7
(3,188 Views)