LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Splitting string

Good morning, from the VISA read of a multimeter configured to read the maximum, minimum and average value of a voltage that is incremented 8 times via a for loop I get a string output.
However, I would like to obtain the maximum, minimum and average strings separately.
Is there a way to do this instead of using the Split String block? 20221202_110837.jpg

0 Kudos
Message 1 of 6
(1,424 Views)

We don't do well with photographs of your monitor.

 

You show us an array of eight strings (some are empty, some look truncated). Is this the raw data? Are you sure your communication is correct?

Can you parse it? What have you tried?

 

There are dozens of ways to parse these value, some are simpler and some are more convoluted (e.g. using "split string" is typically not a good idea).

 

In order for us to help you:

 

  1. Attach your VI.
  2. Make sure that array has typical default data (run Instrument until you see what's on the photo, right-click array...data operations...make current values default...save the VI under a new name an attach it here. Use save for previous if you have LabVIEW 2021 or 2022).
  3. tell us exactly what you want to display/save/etc. and how.
  4. Give a link to the manual of the instrument describing the data formats.
0 Kudos
Message 2 of 6
(1,387 Views)

Hi slash,

 


@Slash96 wrote:

Is there a way to do this instead of using the Split String block?


Oh boy, who came to the conclusion to use such badly formatted strings???

 

Surely you can go without using SplitString:

 

Btw. attaching bad photographs of computer screens is just silly! Why don't you attach your VI with some response data included by setting an indicator with default data? Why do we have to re-type your response data to be able to help you???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 6
(1,302 Views)

The comment in the code...😂

0 Kudos
Message 4 of 6
(1,266 Views)

@Slash69: no. What you must do is to split the strings first, convert to number and THEN you can use the MIN/MAX VI on them. Average is also manual, but simple with a FOR loop and its auto-indexing.

0 Kudos
Message 5 of 6
(1,261 Views)

Almost looks like the numbers are formatted with a fixed field width and no delimiters. (Some have done that in the early days of computing, e.g. (as discussed here) to simplify parsing. (Wild guess. I won't be counting characters on a blurry photograph!)

 

Obviously, the OP has significantly more problems, e.g. truncation and frame shifts. The communication needs to be fixed first! We can help with that.

0 Kudos
Message 6 of 6
(1,216 Views)