LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read certain characters from an articulated string

Solved!
Go to solution

Hi,

i have this pretty long string that i extract with the VISA read from a test that i do on a board. The problem is  that this string is a sort of table with a series of data and number, and i have to separate certain values to check them, in particular i have to check that all the numbers under "ERROR COUNT" are 0 (there are no errors).

I know it might seem easy but i'm not very good on working with strings and arrays.

I leave here the string that i'm talking about,

thank you.

0 Kudos
Message 1 of 6
(818 Views)

Seems nicely formatted with fixed-width fields so the simplest would be to just take substrings. What have you tried? What do you want at the end (a single number for each line (sum of errors)? all the errors? A boolean TRUE/FALSE for errors/no errors?)

0 Kudos
Message 2 of 6
(811 Views)

@DavideBrusamolino02 wrote:

Hi,

i have this pretty long string that i extract with the VISA read from a test that i do on a board. The problem is  that this string is a sort of table with a series of data and number, and i have to separate certain values to check them, in particular i have to check that all the numbers under "ERROR COUNT" are 0 (there are no errors).

I know it might seem easy but i'm not very good on working with strings and arrays.

I leave here the string that i'm talking about,

thank you.


The most fun way is just to try out all the string stuff and see what works.  Try just one field first, then the same field for all the records, then all the fields for all the records.


This proves:

  1. I can properly read one field.
  2. I can properly differentiate each record because I can successfully parse the same field in all the records.
  3. I can read everything I need to read.
Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 6
(793 Views)
Solution
Accepted by topic author DavideBrusamolino02

As a first step, Please attach a string that actually has some nonzero error count! Makes verification much less error prone. 😄

 

 

Assuming you are only interested in the test, error count, and time, here's one simple possibility:

 

altenbach_0-1677083532961.png

 

It can easily be expanded to parse the other substrings, of course.

 

Message 4 of 6
(782 Views)

@altenbach wrote:

As a first step, Please attach a string that actually has some nonzero error count! Makes verification much less error prone. 😄

 

 

Assuming you are only interested in the test, error count, and time, here's one simple possibility:

 

altenbach_0-1677083532961.png

 

It can easily be expanded to parse the other substrings, of course.

 


You took all the fun out of it.  😄

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 6
(776 Views)

Just some Fingerübungen during breakfast. 😄

0 Kudos
Message 6 of 6
(768 Views)