LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Functional Global: How can I build a concatenated string from different cases strings

 

Hi,

 

I have again a little problem: I want to write Strings selected from different cases into one String Indicator using Functional Global

Variable. I have not found a way yet.

 

I look forward to any suggestion !

 

Best regards,

B.

 

Download All
0 Kudos
Message 1 of 9
(2,967 Views)

I don't understand what you're trying to do. Concatenate what with what?

 

Do not use a DBL to drive a case structure. It is meaningless. Use an I32, or better yet, use a typedef'ed enum.

0 Kudos
Message 2 of 9
(2,957 Views)

Hi smercurio_fc,

 

I want to write the two Strings into one String Indicator. Each case I run should add the text to

that indicator, separated by tab or blank, not overwriting the old string.

 

After the two cases are excecuted, this should be the string: TDR11 to high  TDR22 to high

 

Thanks for your help.

 

B.

0 Kudos
Message 3 of 9
(2,953 Views)

As long as you can list all the states this seems pretty easy to do.

Download All
0 Kudos
Message 4 of 9
(2,938 Views)

Hi,

 

I changed a bit your FGV. I added a first case for initalizing the string, then I add substrings for each "number".

I didn't pay attention to separator, but you just have to add them in the FGV.

 

What you have to understand in an FGV is that the shift register is the memory of your FGV, and you need to use it in order to get back the last value of your data.

 

Regards,

Olivier L. | Certified LabVIEW Developer


Download All
0 Kudos
Message 5 of 9
(2,928 Views)

Hi,

 

the problem is that only true cases should be written to the string.

 

Background is that I will have a 1D array like : 1101

 

Only for the 1 values , a specific text should be written to the String indicator.

 

My example tried to keep it simple: only the choosen Cases should write their text.

 

Thanks so far !

 

 

 

 

0 Kudos
Message 6 of 9
(2,923 Views)

I think it's just a matter on the way the High level VI will call the FGV.

You just have to call the FGV with "numbers" associated with "True" values and not to call it when your "False" and work is done.

 

Regards,

Olivier L. | Certified LabVIEW Developer


0 Kudos
Message 7 of 9
(2,921 Views)

Thanks for your help Oliver !

 

What if I would do this for more then 2 Messages ?

 

Br. Bortoba

0 Kudos
Message 8 of 9
(2,920 Views)

You just have to add more cases in your case structure.

 

But, instead of your actual architecture, I propose you a more evolutive one, that probably better fits your needs.

 

Regards,

Olivier L. | Certified LabVIEW Developer


Download All
0 Kudos
Message 9 of 9
(2,910 Views)