LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Find a character in a string

Solved!
Go to solution

Hi 99,

 


@labview99 wrote:

I am trying to turn on the  button of the array when I found one "A" in the string and I continue without knowing how to do. Can you help me please


Until now you didn't attach any VI showing your current state of progress.

How should we help when we don't know where you are?

(I prefer LV2017…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 21 of 37
(981 Views)

Sorry,

I attach now

 

0 Kudos
Message 22 of 37
(978 Views)

Hi 99,

 

your VI does not contain any array of strings, it's a simple string called "Modelo de bloque"…

Btw. why don't you use a shift register to store that value? No need for local variables!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 23 of 37
(975 Views)

yes, the array of strings is not use in this VI

0 Kudos
Message 24 of 37
(971 Views)

I want to search for the letter "A" in the string and turn on the button that corresponds to the position of the letter "A"

0 Kudos
Message 25 of 37
(970 Views)
Solution
Accepted by topic author labview99

Hi 99,

 

then all you need to know is the position of the "A" char to set a TRUE in your boolean array:

check.png

 

yes, the array of strings is not use in this VI

Then why do you ask about this?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 26 of 37
(968 Views)
0 Kudos
Message 27 of 37
(962 Views)

Because you didn't implement all of the shown code…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 28 of 37
(959 Views)

Yes, you are right. I am so sorry I messed you up😔

Thank you so much for all your help!

Best regards

0 Kudos
Message 29 of 37
(957 Views)

Hello,

I have one program where I have one string separated with "-" and the I puted in  one arrayu. In my porgram the string I refer to is the "element 2"and the array "array". Now I want to find in the array if   any element of the array is the letter "P" only the letter "P". 

This is the way to do it?array3.PNG

 

I attach the program also

0 Kudos
Message 30 of 37
(960 Views)