功能块 ViBaseListApplication

<< 点击显示目录 >>

主页  mappVision帮助助手 > 机器视觉帮助 > mapp Vision  > 编程 > > 核心库 > ViBase  > 功能块
 >

功能块 ViBaseListApplication

功能块 ViBaseListApplication 可用于列出当前可从控制器加载到相机模块的所有现有视觉应用程序。

功能块

vibaselistapplication

接口

输入/输出

名称

数据类型

说明

输入

MpLink

指向ViComponentType的指针

指向视觉组件的指针,可加载的视觉应用程序应列在该组件上。

IN

执行

BOOL

在此输入的上升沿开始执行功能块。

输入

格式

ViBaseFormatEnum

决定用于列出视觉应用程序的文本格式。

viBASE_FORMAT_PLAIN_TEXT = 0(默认):

元素以纯文本格式列出,以便直接使用,例如在 ViBaseLoadApplication 中。

字符串数组 1D (stringValue)

viBASE_FORMAT_ITEMCOLLECTION = 1:

元素以 ItemCollection 格式列出 {"value":"VA 名称","text":"VA 名称"}。

用于与 mapp 视图选择器部件连接使用。

数组 ItemCollection(数据提供程序)

输入

列表

指向ViBaseFormatPlainTextType[MaxEntries]的指针

指向ViBaseFormatItemCollectionType[MaxEntries]的指针

指向写入列表的内存区域的指针。

这通常与输入 "格式 "决定的匹配类型数组的起始地址相对应。

对于 viBASE_FORMAT_PLAIN_TEXT:ViBaseFormatPlainTextType。

对于 viBASE_FORMAT_ITEMCOLLECTION:ViBaseFormatItemCollectionType。

IN

ListLen

UDINT

所提供内存区域的大小。

它必须是由输入 "格式 "决定的数据类型大小的倍数。

通常是输入 "List "时指定起始地址的数组的数据大小(SIZEOF)。

输出

完成

BOOL

执行成功。功能块执行完毕。

BOOL

功能块处于活动状态,必须继续调用。

出错

错误

BOOL

执行过程中出错。

输出

状态 ID

DINT

状态信息。

输出

NrEntries

UINT

可加载的现有视觉应用程序的数量。

表格: 功能块 ViBaseListApplication 的输入和输出

ViComponentType

数据类型为 ViComponentType 的变量为内部变量。在创建视觉组件时,将自动创建一个相关的 "ViComponentType "变量。可以通过视觉组件的名称来引用该变量。

ViBaseFormatEnum

枚举常量

说明

viBASE_FORMAT_PLAIN_TEXT

0

元素以纯文本格式列出,可在 ViBaseLoadApplication 中直接使用。

mapp 视图绑定:例如 widget 表格

字符串数组 1D (stringValue)

viBASE_FORMAT_ITEMCOLLECTION

1

项目以 ItemCollection 格式列出 {"值":"VA 名称","文本":"VA 名称"}。

mapp 视图绑定:选择器部件

数组 ItemCollection (dataProvider)

表格:ViBaseFormatEnum

ViBaseFormatItemCollectionType / ViBaseFormatPlainTextType

名称

数据类型

说明

ViBaseFormatItemCollectionType

STRING[130]

该类型用于以 ItemCollection 格式显示视觉应用程序的列表条目。

这种类型的数组可在 mapp View 中用于选择器部件上的 ItemCollection 绑定。

ViBaseFormatPlainTextType

字符串[50]

该类型用于以纯文本格式显示视觉应用程序的列表条目。

这种类型的数组可在 mapp View 中用于 StringArra1D 绑定,例如在表格中。

本节主题:

功能描述

输入和输出说明

状态编号


Function block ViBaseListApplication can be used to list all existing vision applications that can currently be loaded from the controller to a camera module.

Function block

vibaselistapplication

Interface

I/O

Name

Data type

Description

IN

MpLink

Pointer to ViComponentType

Pointer to the vision component for which the loadable vision application should be listed.

IN

Execute

BOOL

Execution of the function block begins on a rising edge of this input.

IN

Format

ViBaseFormatEnum

Determines the text format used to list the vision applications.

viBASE_FORMAT_PLAIN_TEXT = 0 (default):

Elements are listed in plain text format for direct use, e.g. in ViBaseLoadApplication.

StringArray1D (stringValue)

viBASE_FORMAT_ITEMCOLLECTION = 1:

Elements are listed in ItemCollection format {"value": "VA name", "text": "VA name"}.

for use in connection with mapp View Selector widgets.

Array ItemCollection (dataProvider)

IN

List

Pointer to ViBaseFormatPlainTextType[MaxEntries]

or

Pointer to ViBaseFormatItemCollectionType[MaxEntries]

Pointer to the memory area where the list will be written.

This typically corresponds to the starting address of an array of matching type that is determined by input "Format".

For viBASE_FORMAT_PLAIN_TEXT: ViBaseFormatPlainTextType.

For viBASE_FORMAT_ITEMCOLLECTION: ViBaseFormatItemCollectionType.

IN

ListLen

UDINT

Size of the memory area provided.

This must be a multiple of the size of the data type determined by input "Format".

Typically the data size (SIZEOF) of the array whose starting address is specified on input "List".

OUT

Done

BOOL

Execution successful. The function block is finished.

OUT

Busy

BOOL

The function block is active and must continue to be called.

OUT

Error

BOOL

Error during execution.

OUT

StatusID

DINT

Status information.

OUT

NrEntries

UINT

Number of existing loadable vision applications.

Table: Inputs and outputs of function block ViBaseListApplication

ViComponentType

Variables of data type ViComponentType are internal variables. During the creation of a vision component, an associated "ViComponentType" variable will be automatically created. This can be referenced by the name of the vision component.

ViBaseFormatEnum

Enum constant

Value

Description

viBASE_FORMAT_PLAIN_TEXT

0

The elements are listed in plain text format and can be used directly in ViBaseLoadApplication, for example.

mapp View binding: e.g. widget Table

StringArray1D (stringValue)

viBASE_FORMAT_ITEMCOLLECTION

1

The items are listed in ItemCollection format {"value": "VA name", "text": "VA name"}.

mapp View binding: Selector widgets

Array ItemCollection (dataProvider)

Table: ViBaseFormatEnum

ViBaseFormatItemCollectionType / ViBaseFormatPlainTextType

Name

Data type

Description

ViBaseFormatItemCollectionType

STRING[130]

This type is intended for list entries of vision applications in ItemCollection format.

An array of this type can be used in mapp View for ItemCollection bindings on selector widgets.

ViBaseFormatPlainTextType

STRING[50]

This type is intended for list entries of vision applications in plain text.

An array of this type can be used in mapp View for StringArra1D bindings, e.g. in a table.

Topics in this section:

Function description

Description of inputs and outputs

Status numbers