为视觉功能的输入和输出接线

<< 点击显示目录 >>

主页  mappVision帮助助手 > 机器视觉帮助 > mapp Vision  > 编程 > 编辑器 > 视觉应用程序编辑器(视觉) > 编辑视觉应用 >

为视觉功能的输入和输出接线

视觉功能的循环输入显示在左侧;循环输出显示为右侧的连接器。

一个视觉功能的输入端可以与另一个视觉功能的输入端、变量或输出端连线。

布线只能在连接器之间拖动。要定义布线,必须将鼠标移至连接器上。绿色矩形表示可以用鼠标在此处拖动布线。布线可以松散地临时创建到视觉应用程序上,也可以直接连接到目标连接器上。

单击并拖动一端即可重新连接现有布线。

vfwire

输入

input

输入端的名称可在属性窗口中设置。

使用 "输入 "功能,可通过输入输入名称来定义视觉应用的输入。一旦在视觉应用程序中使用,已定义的输入端就会出现在摄像机的 I/O 接口上。

视觉功能输入可将输入用作数据源。这样,视觉功能输入端就完成了 "接线 "和配置。然后就可以直接在 I/O 接口上使用。

信息:

每个视觉功能只能使用一次输入。

变量

variable

变量的名称和值可在属性窗口中设置。

通过输入变量的名称和数值,变量可用于为视觉应用程序的视觉功能定义循环输入值。一旦在视觉应用程序中接线,就会定义变量的数据类型。

变量可用作视觉功能输入的数据源。这样,视觉功能输入端就被 "连接 "起来,从而完成配置。

变量 "继承 "其所连接的第一个视觉功能输入端的数据类型。这意味着无需手动配置数据类型。

 

变量不能在运行时修改。其值可在 mapp Vision HMI 应用程序中像输入一样进行更改。但该值不会保存。

 

信息:

每个视觉功能只能使用一次变量。

输出

output

输出的名称可在属性窗口中设置。

应在摄像机 I/O 接口上显示的视觉应用程序输出值通过输出进行配置。输出需要一个唯一、有效的名称和数据源。只有视觉功能输出才能用作输出的数据源。首先选择 VF 实例,然后选择该 VF 实例的输出。每个 VF 输出只能在 I/O 接口上使用一次。

信息:

某些视觉功能输出可多次使用,例如结果的位置。对于这些输出,每个可能的结果都有一个单独的数据点。以输入的名称为基础,然后添加结果的索引作为扩展名。可能结果的数量受 VF 常量 "NumResultsMax "的限制。

 

信息:

必须至少配置一个有效的视觉应用输出。

将两个视觉功能直接连接在一起

可以将一个视觉功能实例("目标 VF")的输入连接到另一个视觉功能实例("源 VF")的输出。只有当源 VF 的执行编号低于目标 VF,且视觉功能的输入或输出具有相同的数据类型时,才可以这样做。

布线

布线由其起点和终点定义。还可以使用两个遥控点改变布线的曲率。

只能保存有效的布线。无效布线显示为红色。要找出布线无效的原因,必须选择该布线。错误原因会显示在属性窗口中。

redwire

关闭视觉应用程序后,无效布线将被丢弃。

每个视觉功能的所有输入端都必须布线,否则视觉程序将无法执行。


The cyclic inputs of a vision function are displayed on the left side; the cyclic outputs are displayed as connectors on the right side.

Inputs of a vision function can be wired to inputs, variables or outputs of another vision function.

Wiring can only be dragged between connectors. To define a wiring, the mouse must be moved over the connector. A green rectangle indicates that a wiring can be dragged here with the mouse. Wiring can be temporarily created loosely to the vision application or connected directly to the target connector.

Existing wiring can be re-hooked by clicking and dragging one end.

vfwire

Inputs

input

The name of an input can be set in the properties window.

With Inputs, the inputs of the vision application are defined by entering a name for the input. As soon as they are used in the vision application, the defined inputs will be available on the camera's I/O interface.

An input can be used as a data source by a vision function input. The vision function input is then "wired" and thus fully configured. It can then be used directly on the I/O interface.

Information:

An input can only be used once per vision function.

Variables

variable

The name and value of a variable can be set in the properties window.

Variables are used to define cyclic input values for vision functions of the vision application by entering a name and value for the variable. As soon as it is wired in the vision application, the data type for the variable is defined.

A variable can be used as a data source by a vision function input. The vision function input is then "wired", thus fully configured.

A variable "inherits" the data type of the first vision function input it is connected to. This means that the data type does not need to be manually configured.

 

A variable cannot be modified at runtime. Its value can be changed in the mapp Vision HMI application like an input. This value is not saved, however.

 

Information:

A variable can only be used once per vision function.

Outputs

output

The name of an output can be set in the properties window.

The vision application output values that should be visible on the camera's I/O interface are configured with Outputs. An output needs a unique, valid name and a data source. Only vision function outputs can be used as a data source for an output. The VF instance is selected first, then an output of this VF instance. Each VF output can only be available on the I/O interface once.

Information:

Certain vision function outputs are available more than once, such as the position of a result. For these outputs, a separate data point is available for each possible result. The entered name is used as the basis, and the index of the result is then added as an extension. The number of possible results is limited by VF constant "NumResultsMax".

 

Information:

At least one valid vision application output must be configured.

Wiring two vision functions directly together

Inputs of a vision function instance ("target VF") can be wired to outputs of another vision function instance ("source VF"). This is only possible if the source VF has a lower Execution number than the target VF and the input or output of the vision functions has an identical data type.

Wirings

A wiring is defined by its starting point and endpoint. Optionally, the curvature of a wiring can be changed using the two remote control points.

Only valid wirings can be saved. Invalid wiring is displayed in red. To find out why a wiring is invalid, the wiring must be selected. The reason for the error is then displayed in the properties window.

redwire

Invalid wiring is discarded when the vision application is closed.

All inputs of each vision function must be wired; otherwise, the vision application is not ready for execution.