NI產品與技術 討論區

取消
顯示結果 
搜尋替代 
您的意思是: 

比較 string

 

請教一下, 如果我有一個 string "an apple", 我要將此string 輸出至 indicator, 如何獲知我輸入的 string 與 "an apple" 符合? 如符合, 輸出 "an apple" 至 indicator, 如不符合, 呈現 error message " not matched", 請問我該如何建立? 非常感謝各位的回答

0 積分
1 條訊息(共 5 條)
7,283 檢視

Check out the VI attached

 

Andy Chang
National Instruments
LabVIEW Control Design and Simulation
0 積分
2 條訊息(共 5 條)
7,278 檢視

An Equal? would do the job...

 

LVVILIB_STR_string compare.PNG

 

PS: attached ready sub-VI

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 積分
3 條訊息(共 5 條)
7,268 檢視
case if true 後面如果不用boolean, 而需要以string 呈現, 該如何修改? case if failed, 該如何用 one button dialog 來呈現error message? 非常感謝
0 積分
4 條訊息(共 5 條)
7,266 檢視

tjeff wrote:
case if true 後面如果不用boolean, 而需要以string 呈現, 該如何修改? case if failed, 該如何用 one button dialog 來呈現error message? 非常感謝
hi,
Sorry if I am not quite understand your question/ problems 😉
The Case if Error (Failed) is already a One Button Dialog. And, for Case if No Error (Passed), it is up to you how you want to process with the Input String, isn't it?

 

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 積分
5 條訊息(共 5 條)
7,262 檢視