发生错误时,显示有错误发生。如发生一个错误,该VI返回错误描述,或选择性地打开一个对话框。


icon

输入/输出

  • c1dstr.png [user-defined descriptions]

    [user-defined descriptions] is an array of descriptions of user-defined codes.

    如输入错误与用户定义代码中的某项匹配,VI可在消息中返回用户定义描述的相应说明信息。

  • c1di32.png [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、500000至599999为用户保留,用于用户自定义错误信息

  • ci32.png [error code] (0)

    [error code] is a numeric error code.

    错误输入表明有错误,VI可忽略错误代码。如无错误,VI可对其进行检测。非0值表示错误。

  • cstr.png [error source] (" ")

    [error source] is an optional string you can use to describe the source of error code.

  • cbool.png search ni.com link visible?(T)
  • cu16.png type of dialog (OK msg:1)

    type of dialog determines what type of dialog box to display, if any.

    不论值如何,VI都输出错误信息和描述错误的消息

    0无对话框-不显示对话框。有助于通过程序控制错误处理。
    1确定信息(默认)-显示包含一个“继续”按钮的对话框。确认该对话框后,该VI将控制返回至主VI。
    2继续或停止消息-显示多按钮对话框,用于停止或继续。如用户选择停止,则该VI调用停止函数停止执行。
    3确定信息 + 警告-显示包含警告和一个“继续”按钮的对话框。确认该对话框后,该VI将控制返回给主VI。
    4继续/停止 + 警报-显示含有多条警告和按钮的对话框,用于停止或继续。如用户选择停止,则该VI调用停止函数停止执行。
  • cerrcodeclst.png 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.

  • ci32.png [exception action] (none:0)

    [exception action] is a way for you to create exceptions to error handling.

    错误代码错误源等于异常代码异常源,VI可执行异常操作。如异常源使用默认值,只需异常代码匹配VI即可进行异常操作

    0无异常(默认)-连接异常代码异常源后,仍进行无异常错误处理。
    1取消匹配错误将常见的错误作为无错误处理。如VI取消错误,错误?为FALSE,代码输出为0,且源输出为空字符串。
    2设置匹配错误-更新错误的警告。该参数在VI未找到错误设置中状态错误代码参数描述的错误,错误输入代码值与异常代码匹配,错误源与异常源匹配。如VI设置错误,则错误?为真,代码输出错误输入代码的值,且源输出错误输入的值。
  • ci32.png [exception code]

    [exception code] is the error code that you want to treat as an exception. The default is 0.

  • cstr.png [exception source]

    [exception source] is the error message that you want to use to test for an exception. The default is an empty string.

  • ibool.png error?

    error? returns TRUE if an error occurs. If this VI finds an error, it sets the parameters in the error cluster.

  • ii32.png code out

    code out is the error code indicated by error in or error code.

  • istr.png source out

    源输出表明错误的源。

    源输出字符串比错误输入字符串更具描述性。

  • istr.png message

    message describes the error code that occurred, the source of the error, and a description of the error.

    如VI未返回对于错误的说明,可采取措施查找错误代码说明。如果同一错误代码存在多个描述,VI 将显示所有描述,并用 或 分隔。

  • ierrcodeclst.png error out

    error out contains error information. This output provides standard error out functionality.