Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

compare individual characters in a string

Hi,

 

I am trying to do some string comparison and was looking for pointers. I send queries to my device through LabView and capture the query result which is a 5 letter string. I want to look for certain characters at certain index numbers. What would be the best possible approach?

 

For eg: When I send a particular query, I get the result RUUII. How do I verify that my first character is 'R' and my 4th character is 'I'. If it is not 'R' , I want to execute a certain set of steps. If it is 'R' a different set of steps would be executed. I am using Labview 6.1.

 

Thanks,

Sukanya 

0 Kudos
Message 1 of 2
(3,460 Views)

Hi

 

This message belongs to the labview thread, not the instrumentIO thread.

 

But look at the string functions and play with match character, string subset and case statements.

greetings from the Netherlands
0 Kudos
Message 2 of 2
(3,449 Views)