12-02-2019 08:33 AM
Hello,
In the program I have done, in the "Sincronismo" case I want to see if the "Modelo de bloque" has the character "B" and show this with a boolean. In my case the "Modelo de bloque" is an indicator, maybe because of that I can´t use in the "Match Pattern Function". So how can I do it for my program?
Solved! Go to Solution.
12-02-2019 08:51 AM
I will give you two options, with the first being my preference.
1. Store the string value in a shift register.
2. User a Local Variable to read your indicator value.
12-02-2019 08:53 AM
What is the data the you are going to have to evaluate? Is it going to be the same every time? It will be tough to look for the letter B with out finding B in other data that you may receive. Can you give examples of the different expected responses so the we can better help you find a good solution to your problem?
12-02-2019 08:55 AM
Use a local variable: right click on the terminal of "Modelo de bloque" and choose Create->Local Variable.
The local will be created in write mode. Right click on the variable and select "Change to Read".
Beware: use local variables only when really needed; never where you can use a regular wire.
More information on local variables in the LabVIEW help and tutorials.
12-03-2019 02:21 AM
I am going to receive different strings in "Modelo de bloque", for example: 111222AAABBB, ABABABAB112222, AAAB111111AAB... also I can receive strings without the letter "B", for example, 22221111112222
12-03-2019 02:30 AM
@labview99 ha scritto:
I am going to receive different strings in "Modelo de bloque", for example: 111222AAABBB, ABABABAB112222, AAAB111111AAB... also I can receive strings without the letter "B", for example, 22221111112222
Fine. What's the question here?
12-03-2019 02:43 AM
Sorry,
Is the answer to the question of Tim
12-03-2019 02:45 AM
Thank you so much for your help Paolo!!
12-04-2019 02:35 AM
Hello,
I have tryed to do a program where I find the character "A" in one string and when it finds the first "A" I want to turn on the button of the array that corresponds.
I have done this program but it turns on all the "A" of the string and I want to turn on only the first A found in the string.
12-04-2019 02:51 AM - edited 12-04-2019 02:52 AM
Hi 99,
until now you were looking for letter "B", now you are looking for an "A"?
What's the big difference so you need to start a new thread?
When you only want to find the first occurance of a letter in a string then you should not compare all chars but Search1DArray to find it…