LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to select individual parts of a string and put it in a indicator?

I have this string......Set Torque 1 = 2.5 (Torque = 2.5). I only want the value of Torque 1 to go into an indicator (2.5).  I have many strings like this and the value for Torque is never the same.  How can each value of Torque 1.  I also wanted the value of Torque 2 to go into an indicator.   I turned all of my strings to tokens and used the match first string function.  It matches to the keywords that I chose and returns the remaining part of the string.  How can I use the match first string function to individually send the values for torque 1 and 2 to separate indicators?
0 Kudos
Message 1 of 3
(2,576 Views)
You can use a combination of Match Pattern to accomplish this.  See attached vi.
- tbob

Inventor of the WORM Global
Message 2 of 3
(2,570 Views)
Presumably you're already doing this in a loop...  if not, put it in a loop, and use a case structure wired to the token value (string like "Torque 2" - you'll have to do this manually for each case, for each token), and inside that case, wire the value to the appropriate indicator.
0 Kudos
Message 3 of 3
(2,569 Views)