一般エラー処理
- 更新日2025-07-30
- 9分で読める
エラーが発生したかどうかを示します。エラーが発生すると、このVIはエラーの記述を返し、オプションでダイアログボックスを表示します。

入力/出力
[user-defined descriptions]
—
[user-defined descriptions] is an array of descriptions of user-defined codes. 入ってくるエラーがユーザ定義コードと一致する場合、VIではメッセージのユーザ定義説明から対応する説明を使用します。
[user-defined codes]
—
[user-defined codes] is an array of numeric error codes you can use to define error codes and messages for your own VIs. VIはエラーコードの内部データベースを検索した後、この配列を検索します。エラーコード-8999~-8000、5000~9999、500,000~599,999は、ユーザが独自のエラーメッセージを定義するために予約されています。
[error code] (0)
—
[error code] is a numeric error code. エラー入力がエラーを示す場合、VIでは エラーコードを無視します。それ以外の場合、VIはその値をテストします。値が0でない場合はエラーを示します。
[error source] (" ")
—
[error source] is an optional string you can use to describe the source of error code.
search ni.com link visible?(T)
—
search ni.com link visible? determines whether the Search ni.com for error hyperlink appears in the dialog box. Set to TRUE to display the hyperlink. Clicking the hyperlink opens search results for the error code on ni.com in the default web browser. The hyperlink appears only for LabVIEW-defined error codes in the development environment. The default is TRUE.
type of dialog (OK msg:1)
—
type of dialog determines what type of dialog box to display, if any. このパラメータの値に関係なく、VIではエラー情報およびエラーを記述するメッセージを出力します。
error in (no error)
—
error in describes error conditions that occur before this node runs. This input contains status, code, and source, which provide standard error in cluster element functionality.
[exception action] (none:0)
—
[exception action] is a way for you to create exceptions to error handling. VIは、エラーコードとエラーソースが例外コードと例外ソースに一致すると例外動作を実行します。例外ソースのデフォルト値を使用する場合、VIが例外動作を実行するために例外コードのみが一致する必要があります。
[exception code]
—
[exception code] is the error code that you want to treat as an exception. The default is 0.
[exception source]
—
[exception source] is the error message that you want to use to test for an exception. The default is an empty string.
error?
—
error? returns TRUE if an error occurs. If this VI finds an error, it sets the parameters in the error cluster.
code out
—
code out is the error code indicated by error in or error code.
source out
—
ソース出力は、エラーのソースを示します。 ソース出力文字列は、エラー入力のソース文字列よりも記述的です。
message
—
message describes the error code that occurred, the source of the error, and a description of the error. VIがエラーの説明を返さない場合、エラーコードの説明を検出するために、いくつかの方法を使用できます。同じエラー・コードに対して複数の説明が存在する場合、VIはすべての説明をorで区切って表示する。
error out
—
error out contains error information. This output provides standard error out functionality. |
[user-defined descriptions]
—
[user-defined codes]
—
[error code] (0)
—
[error source] (" ")
—
search ni.com link visible?(T)
—
type of dialog (OK msg:1)
—
error in (no error)
—
error?
—
code out
—
source out
—
error out
—