LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Switching between 2 string values

Solved!
Go to solution

This is probably a trivial question, but how do I switch between 2 string values to be sent to one input terminal of a larger concatonated string function. The values need to be changed every 100ms or so.

 

Thanks

 

mhaque

0 Kudos
Message 1 of 11
(4,110 Views)
Solution
Accepted by topic author mhaque

You're right, it's trivial. Smiley Wink

 

concatenate.PNG

 

Best regards,

 

Balze

 

P.S.: Attachment VI LV2009

Message 2 of 11
(4,102 Views)

Why so complicated??? 😮

 

You can do this particular string manipulation in a single atomic operation using "Append True/False String" 😄

 

Message 3 of 11
(4,085 Views)

That's why you are a "knight of NI" and a "Labview Champion" and I'm not  . Smiley Sad

Smiley Wink

0 Kudos
Message 4 of 11
(4,078 Views)

Is there a time delay on this VI or is the switching immediate?

 

If there is a time delay, does it correspond to the whole while loop?

 

Thanks

 

mhaque

0 Kudos
Message 5 of 11
(4,074 Views)

No,

 

this is (nearly) the same: (Altenbachs is single VI version)

the_same_result.PNG

Message 6 of 11
(4,065 Views)

 


@mhaque wrote:

Is there a time delay on this VI or is the switching immediate?


 

The switching happens as soon as the computation completes. There is no data dependency to the wait function, thus both (the wait and the computation of the string) execute in parallel.

For each new iteration, the string will thus update within nanoseconds while the wait prevents going to the next iteration until it has completed.

0 Kudos
Message 7 of 11
(4,060 Views)

 


@Balze wrote:

That's why you are a "knight of NI" and a "Labview Champion" and I'm not  . Smiley Sad

Smiley Wink


 

Actually, I was specifically only commeting on your suggestions. The original problem description was:

 

"...be sent to one input terminal of a larger concatonated string function..."

 

If if this switchable string goes somewhere in the middle of a huge concatenate string function, you solution might actually be more appropriate. 😄

Message 8 of 11
(4,044 Views)

Hi

 

This VI works, but what does the 200 and the 100 signify?

 

Sometimes my main VI hangs I believe it could be related to this VI.

 

Thanks

 

mhaque

0 Kudos
Message 9 of 11
(3,776 Views)

you are right altenbach with the "append true/false string" I can only put the strings to be switched at the end. Since I need it to be in the beginning Balze's solutions gets the job done. However what does the 200 before the "qoutient and remainder" function represent as well as the 100 before the"greater than equal to" function? Are they the time delay? I'm quite confused.

 

Mhaque

0 Kudos
Message 10 of 11
(3,770 Views)