NI產品與技術 討論區

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

Scan From String錯誤

Hi Sir

 

1.請教一下為何使用VISA Write去寫入一command且使用VISA Read讀取

其儀器訊息並傳送至scan from string後(如附件T1),此時scan from string會呈現錯誤

訊息(如附件T2),該如何排除此一問題?

 

P.S. 使用下載的DRIVER並未出現此一問題,但若依照其寫法,再行寫過後,就會出現此一問題了

 

下載全部
0 積分
1 條訊息(共 9 條)
7,678 檢視

scan from string 是將字串轉成數字

 

所以您的用法不對

 

請使用滑鼠點 scan from string 二下,再按 help,再看最下面的範例

 

help.JPG

0 積分
2 條訊息(共 9 條)
7,674 檢視
The VISA Read in your code is giving error; the returned string may not be in the correct format for the specific Scan from Sting function.
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
3 條訊息(共 9 條)
7,670 檢視

Hi Sir

 

現有的疑問是為何相同語法(用法),會有不同結果(所有寫法都一樣,但一格不會出現錯誤訊息,另一個就會出現錯誤訊息)?

 

 

0 積分
4 條訊息(共 9 條)
7,656 檢視

先不論錯誤碼

 

建議先告知 您要的字串原本是???後來要改成???

 

 

不建議 scan from string

0 積分
5 條訊息(共 9 條)
7,649 檢視
Suggest that you check the returned strings for both cases (display as \ code) will see if there is any different.
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 積分
6 條訊息(共 9 條)
7,635 檢視
Hi muks, you surprised me here 😉 thanks!
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 積分
7 條訊息(共 9 條)
7,625 檢視

Hi ian fung

有確認過了,一樣的vi在執行後,卻有兩種結果,一個vi會出現t2的錯誤碼,而另一個vi卻不會出現(此vi能正常執行)

 

也就是因此才會覺得疑惑,才會發問為何會有此原故發生?所有vi內的內容一模一樣,但卻有兩種結果,若是scan form string

 

的因素,那相對的兩者vi因會有相同的問題產生才對吧(相同的vi應會有相同的結果)

 

 

0 積分
8 條訊息(共 9 條)
7,620 檢視

That's why you need to check the returned strings from both cases. Turn on '\' code display, run both VIs, are both the returned string exactly the same? Or, is the returned string from the error reporting VI exactly same as the one without error?

 

Another possibility is that the "Enable automatic error handling" under the Execution tab of VI Properties is unchecked for the original VI. Hence, even if there is error, it will not be reported.

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