07-04-2017 06:59 AM
Hello everyone.
I'm using LabVIEW 2015 and I came across an issue. I have several multi-channel instruments, controlled via VISA, which have the capability to perform measurements on all channels simultaneously.
Now, due to the nature of VISA, of course, the output of a query is a string. Suppose for the sake of the argument that it's formatted like
Instrument-Dependent String - CH1 -> 11000101, CH2 -> 235234, CH3 -> 484823, CH4 -> 7394231
Is there a neat way to collect the four (in this case) measurement values without having to construct a bulky pattern-matching structure (Using for example the Match Regular Expression VI)?
07-04-2017 07:11 AM
07-04-2017 07:13 AM - edited 07-04-2017 07:14 AM
There are a lot of different options, depending on the structure of the string.
In this case, I would put up a loop to 'Match Pattern' the > character, take the 'after substring' output and 'Scan from string' it as decimal.
Do the same with 'remaining string' output until the 'Scan from string' fails.
Just an example.
Well, GerdW's solution is much quicker to implement!
07-04-2017 07:15 AM - edited 07-04-2017 07:16 AM
I would just use a loop with a couple of Match Patterns inside. You can use that to parse out each value separately and autoindex the output value.
