12-03-2022 04:18 AM
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?
12-03-2022 09:40 AM - edited 12-03-2022 09:43 AM
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:
12-04-2022 12:03 PM - edited 12-04-2022 12:05 PM
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???
12-05-2022 02:39 AM
The comment in the code...😂
12-05-2022 02:43 AM
@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.
12-06-2022 09:12 AM
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.