キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Switching between 2 string values

解決済み
解決策を見る

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 件の賞賛
メッセージ1/11
5,881件の閲覧回数
解決策
受理者 mhaque

You're right, it's trivial. スマイリー ウインク

 

concatenate.PNG

 

Best regards,

 

Balze

 

P.S.: Attachment VI LV2009

メッセージ2/11
5,873件の閲覧回数

Why so complicated??? 😮

 

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

 

メッセージ3/11
5,856件の閲覧回数

That's why you are a "knight of NI" and a "Labview Champion" and I'm not  . スマイリー 悲しい

スマイリー ウインク

0 件の賞賛
メッセージ4/11
5,849件の閲覧回数

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 件の賞賛
メッセージ5/11
5,845件の閲覧回数

No,

 

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

the_same_result.PNG

メッセージ6/11
5,836件の閲覧回数

 


@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 件の賞賛
メッセージ7/11
5,831件の閲覧回数

 


@Balze wrote:

That's why you are a "knight of NI" and a "Labview Champion" and I'm not  . スマイリー 悲しい

スマイリー ウインク


 

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. 😄

メッセージ8/11
5,815件の閲覧回数

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 件の賞賛
メッセージ9/11
5,547件の閲覧回数

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 件の賞賛
メッセージ10/11
5,541件の閲覧回数