读码器数据(循环读取)

<< 点击显示目录 >>

主页  mappVision帮助助手 > 机器视觉帮助 > mapp Vision  > 编程 > 视觉功能 > 读码器 >

读码器数据(循环读取)

信息:

本节指定的参数是硬件模块 I/O 映射的一部分,可通过 AS 软件访问。

参数

类型

数值范围

说明

循环

非循环

图像处理错误

UINT

0 至 65535

错误类别寄存器

R

 

图像处理激活

BOOL

0 或 1

图像处理执行状态

R

 

图像定时

DINT

-2,147,483,648 至 2,147,483,647

以 1 μs 为单位的净时间

R

 

结果数

USINT

0 至 255

找到的代码数

R

 

函数处理时间

UINT

0 至 65535

视觉功能的处理时间(微秒

R

 

解码数据(n)

OCTET

OCTET [MaxStringSize+1] (最大字符串大小+1

1 至 255

以数组 OCTET 的形式返回找到的代码的内容。

R

 

符号类型(n)

USINT

1 至 63

找到的代码的符号类型。

R

 

分级值(n)

SINT

-1至40

代码质量评估

R

 

增强分级信息(n)

OCTET

OCTET [23]

-1至40

扩展分级信息的输出,基本分级值(GradingValue)评估参数由这些信息组成。

R

 

位置 X(n)

DINT

-2622400 至 2622400

图像中(找到的代码)的 X 位置,增量为 1/100 像素。

R

 

位置 Y(n)

数字

-2622400 至 2622400

图像中(找到的代码)的 Y 位置,以 1/100 像素为增量。

R

 

方向(n)

INT

-17999 至 18000

-179.99°到+180°,增量为 1/100 度

R

 

旋转中心 X

UDINT

-2622400 至 2622400

此处输出偏离指定的教导对齐模型的值。以 1/100 像素为单位。

R

 

旋转中心 Y

UDINT

-2622400 至 2622400

此处输出偏离指定的教导对齐模型的值。以 1/100 像素为单位。

R

 

图像处理错误

错误类别寄存器。

数据类型

信息

UINT

0x0001

vision_os_error:保留,当前未设置

0x0002

VISION_OS_xxx:保留,当前未设置

0x0004

vision_runtime_error:VisionServiceManager 发生异常。

0x0008

VISION_LIBRARY_ERROR:Vision 函数返回的 ErrorID < 10000。

0x0010

VISION_FUNCTION_ERROR:Vision 函数正在返回 ErrorID > 10000。

0x0020

VISION_FILE_ERROR:保存当前图像出错

0x0040

INVALID_VISION_FUNCTION:视觉函数出现异常

0x0080 至 0x8000

当前未使用

信息:

带有错误 ID 的错误信息将在 AS 软件日志记录器 "Vision "下输出。

图像处理激活

状态位指示当前是否正在执行图像处理。

数据类型

信息

BOOL

0

图像处理未激活

1

图像处理中

图像净时间

指定图像采集的净时间(多路采集 > 1 时为第一幅图像的净时间),图像处理结果在此时间内有效。

时间戳也会成为图像文件的名称。

数据类型

信息

数据

-2,147,483,648 至 2,147,483,647

NetTime 时间戳,从 1 µs 到 4294 s,增量为 1 µs(绝对 NetTime)。

结果数

找到的代码数。

数据类型

信息

USINT

0 至 255

找到的代码数。

信息:

如果在获取的图像中有代码,但在超时(Timeout)中设置的时间过后,NumResults = 0 返回,则建议执行参数优化(ParameterOptimization)。

参数优化后,新的读取过程通常会带来更好的检测结果。

功能处理时间

该参数用于指定视觉功能的处理时间,因此与处理器忙于图像处理的时间相对应。

数据类型

信息

UINT

0 至 65535

处理时间为 1 ms 至 65.5 s 的值,以 1 ms 为单位。

解码数据(n)

以 OCTET 数组形式返回读取的代码。该值对应于代码的最大大小。

某些代码类型还可能包含 NULL 字符,因此应用程序必须考虑是以字符串还是 OCTET 数组的形式进行进一步处理。

由于所有代码(无论内容如何)都是以 NULL 结尾的,因此必须考虑终止符 0。

如果代码中包含复合代码,则会在分隔符"|"后以 String_Barcode|String_CompositeCode 的形式添加。

信息:

使用此视觉功能读入的数据需经过 UTF-8 校验。对于无效字符,将输出"......"。因此,在 mapp Vision HMI 应用程序中可以立即看到输入数据中出现的无效字符。

数据类型

信息

OCTET

OCTET [最大字符串大小+1]

1 至 255

以 OCTET 数组形式返回找到的代码的内容。

该值对应于代码的最大大小。

最大内存长度为代码的最大尺寸 + 1(由于存在空结束符)。

信息:

根据参数 NumSearchMax 的计算值,该参数(索引 01、02 等)会出现 n 次。

 

信息:

如果视觉功能 "读码器 "使用了一个以上的结果,并且在超时前没有找到所有代码,则在 DecodedData 中仍将输出截至该点找到的部分结果。

符号类型(n)

返回找到的代码类型。有关可能的数据代码列表,请参阅SymbolType

数据类型

信息

USINT

1 至 63

找到的代码类型。

信息:

根据参数 NumSearchMax 的计算值,该参数(指数为 01、02 等)会出现 n 次。

分级值(n)

只有当参数CodeGrading启用时,才会对代码的整体质量进行分级;否则,GradingValue 的值为 -10。此外,如果不符合相应的基本标准(如符合休息区),则输入值 -10。

等级并不是标准规范的测量值,因为这还需要额外的要求,例如标准化的照明情况。修改数值是检测代码质量或其他环境参数是否恶化并作出反应的一个特别好的方法。

GradingValue 包含 23 个单个标准的评估,可从参数EnhancedGradingInformation(n) 中获取。GradingValue 的值与值最低的标准相对应。

数据类型

信息

SINT

-10至40

以 0.1 为增量对读码质量进行整体评估。

整体质量评估值从 0.0(最低等级)到 4.0(最高等级)不等。

信息:

根据参数 NumSearchMax 的计算值,该参数(指数为 01、02 等)会出现 n 次。

更多信息,请参阅分级值

增强分级信息(n)

输出扩展的分级信息,GradingValue(n)就是由这些信息组成的。该数组的永久大小为 23 字节,因为这是 ISO 15415、15416 和 ISO TR 29158 标准所允许的代码族分级标准的最大数量。对于不包含全部 23 个标准的代码族,所有未使用的标准都将写入数值 255。

禁用参数CodeGrading时,返回值为 -10。如果激活 CodeGrading,结果也可能是-10。这表示未遵守基本要求,例如未考虑安静区域。

数据类型

信息

OCTET

OCTET [23]

-10至40

以 0.1 为增量对代码质量的最多 23 个单项标准进行评估。

信息:

根据参数 NumSearchMax 的计算值,该参数(索引 01、02 等)会出现 n 次。

更多信息,请参阅分级值

位置 X(n)

图像中(找到的对象)的 X 位置。左上角 = 0

数据类型

信息

数据

-2622400 至 2622400

以 1/100 像素为增量的 X 位置。因此可以选择 -26224.00 至 26223.99 像素的位置。

2622400 = 超出范围

信息:

根据参数 NumSearchMax 的计算值,该参数(索引 01、02 等)会出现 n 次。

位置 Y(n)

图像中(被搜索对象)的 Y 位置。左上角 = 0

数据类型

信息

数据

-2622400 至 2622400

以 1/100 像素为增量的 Y 位置。因此可以选择 -26224.00 至 26223.99 像素的位置。

2622400 = 超出范围

信息:

根据参数 NumSearchMax 的计算值,该参数(索引 01、02 等)会出现 n 次。

方向(n)

以 1/100 度为增量指定方向。

对于 -17999 至 18000 的数值范围,可使用的角度范围为 -179.99° 至 +180.00°。小于 -17999 和大于 18000 的值被解释为 +180 度。

数据类型

数值

信息

INT

-17999至18000

以 1/100 度为增量的方向。

信息:

根据参数 NumSearchMax 的计算值,该参数(指数为 01、02 等)会出现 n 次。

旋转中心 X

图像中旋转中心(找到的物体)的 X 位置。左上角 = 0。仅与对齐相关。

数据类型

信息

UDINT

-2622400 至 2622400

此处输出偏离指定的教导对齐模型的值。

以 1/100 像素为单位。

旋转中心 Y

图像中(找到的对象)旋转中心的 Y 位置。左上角 = 0。仅与对齐相关。

数据类型

信息

UDINT

-2622400 至 2622400

此处输出偏离指定的教导对齐模型的值。

以 1/100 像素为单位。


Information:

The parameters specified in this section are part of the I/O mapping of the hardware module that can be accessed via Automation Studio.

Parameters

Type

Range of values

Description

Cyclic

Acyclic

ImageProcessingError

UINT

0 to 65535

Register of error classes

R

 

ImageProcessingActive

BOOL

0 or 1

Status of image processing execution

R

 

ImageNettime

DINT

-2,147,483,648 to 2,147,483,647

NetTime in 1 μs steps

R

 

NumResults

USINT

0 to 255

Number of codes found

R

 

FunctionProcessingTime

UINT

0 to 65535

Processing time of the vision function in microseconds

R

 

DecodedData(n)

OCTET

OCTET [MaxStringSize+1]

1 to 255

Returns the content of the found code as array OCTET.

R

 

SymbolType(n)

USINT

1 to 63

Symbol type of codes found.

R

 

GradingValue(n)

SINT

-1 to 40

Evaluation of the codes in terms of quality

R

 

EnhancedGradingInformation(n)

OCTET

OCTET [23]

-1 to 40

Output of extended grading information from which the general GradingValue assessment parameter is composed.

R

 

PositionX(n)

DINT

-2622400 to 2622400

X-position (of the found code) in the image in increments of 1/100 pixel.

R

 

PositionY(n)

DINT

-2622400 to 2622400

Y-position (of the found code) in the image in increments of 1/100 pixel.

R

 

Orientation(n)

INT

-17999 to 18000

-179.99° to +180° in increments of 1/100 degree

R

 

RotCenterX

UDINT

-2622400 to 2622400

The value deviating from the specified taught-in Alignment model is output here. In 1/100 pixel steps.

R

 

RotCenterY

UDINT

-2622400 to 2622400

The value deviating from the specified taught-in Alignment model is output here. In 1/100 pixel steps.

R

 

ImageProcessingError

Register of error classes.

Data type

Values

Information

UINT

0x0001

VISION_OS_ERROR: Reserved, currently not set

0x0002

VISION_OS_xxx: Reserved, currently not set

0x0004

VISION_RUNTIME_ERROR: An exception has occurred in VisionServiceManager.

0x0008

VISION_LIBRARY_ERROR: The vision function is returning an ErrorID < 10000.

0x0010

VISION_FUNCTION_ERROR: The vision function is returning an ErrorID > 10000.

0x0020

VISION_FILE_ERROR: Error saving the current image

0x0040

INVALID_VISION_FUNCTION: Exception by the vision function

0x0080 to 0x8000

Currently not in use

Information:

Error messages with an error ID are output in the Automation Studio Logger under "Vision".

ImageProcessingActive

The status bit indicates whether image processing is currently being performed or not.

Data type

Values

Information

BOOL

0

Image processing inactive

1

Image processing in progress

ImageNettime

Specifies the NetTime of the image acquisition (with MultiCapture > 1 that of the first image) for which the results of the image processing are valid.

The timestamp also becomes the name of the image file.

Data type

Values

Information

DINT

-2,147,483,648 to 2,147,483,647

NetTime timestamp from 1 µs to 4294 s in increments of 1 µs (absolute NetTime).

NumResults

Number of codes found.

Data type

Values

Information

USINT

0 to 255

Number of codes found.

Information:

If NumResults = 0 is returned after the time set in Timeout has elapsed although a code is present in the acquired image, it is recommended to perform parameter optimization (ParameterOptimization).

After parameter optimization, a new read process usually results in better detection results.

FunctionProcessingTime

This parameter specifies the processing time for the vision function, and thus corresponds to the time in which the processor is busy for image processing.

Data type

Values

Information

UINT

0 to 65535

Value for a processing time of 1 ms to 65.5 s in 1 ms steps.

DecodedData(n)

Returns the read code as an OCTET array. The value corresponds to the maximum size of the code.

Some code types can also contain NULL characters, which is why the application must take into account whether further processing is to take place as a string or OCTET array.

Since all codes, regardless of content, are NULL-terminated, the terminating 0 must be taken into account.

If the code contains a CompositeCode, this is appended after a separator "|" in the form String_Barcode|String_CompositeCode.

Information:

Data that is read in with this vision function is subjected to UTF-8 validation. � is output for invalid characters. It is therefore immediately visible in the mapp Vision HMI application where invalid characters occur in the input data.

Data type

Values

Information

OCTET

OCTET [MaxString-Size+1]

1 to 255

Returns the content of a found code as an OCTET array.

The value corresponds to the maximum size of the code.

The maximum memory length is the maximum size of the code + 1 (due to the null terminator).

Information:

Depending on the calculated value of parameter NumSearchMax, this parameter (with indices 01, 02, etc.) occurs n times.

 

Information:

If vision function Code Reader is used with more than one result and not all codes are found by the timeout, the partial results found up to that point are still output in DecodedData.

SymbolType(n)

Returns the code type found. For a list of the possible data codes, see SymbolType.

Data type

Values

Information

USINT

1 to 63

Type of code found.

Information:

Depending on the calculated value of parameter NumSearchMax, this parameter (with indices 01, 02, etc.) occurs n times.

GradingValue(n)

A code is only graded on overall quality if parameter CodeGrading is enabled; otherwise, GradingValue has value -10. In addition, the value -10 is entered if corresponding basic criteria, such as compliance with the rest zone, is not met.

The grade is not a normative measurement per the specifications of the standard since that would have additional requirements, such as a standardized lighting situation. Modifying the value is a particularly good way to detect deterioration in code quality or other environmental parameters and to be able to react to them.

GradingValue contains the evaluation of 23 individual criteria, which can be taken from parameter EnhancedGradingInformation(n). The value of GradingValue corresponds to the criterion with the lowest value.

Data type

Values

Information

SINT

-10 to 40

Overall evaluation of the read code quality in increments of 0.1.

The overall quality is evaluated with a value from 0.0 (lowest grade) to 4.0 (highest grade).

Information:

Depending on the calculated value of parameter NumSearchMax, this parameter (with indices 01, 02, etc.) occurs n times.

For additional information, see GradingValues.

EnhancedGradingInformation(n)

Output of extended grading information from which GradingValue(n) is composed. This array has a permanently size of 23 bytes since this is the maximum number of grading criteria for a code family permitted by standards ISO 15415, 15416 and ISO TR 29158. For code families where not all 23 criteria are present, value 255 is written to all unused criteria.

When parameter CodeGrading is disabled, the value -10 is returned. It is also possible to have -10 as result if CodeGrading is active. This indicates that the basic requirements were not observed, such as disregarding the quiet zone.

Data type

Values

Information

OCTET

OCTET [23]

-10 to 40

Evaluation of the maximum 23 individual criteria of the code quality in increments of 0.1.

Information:

Depending on the calculated value of parameter NumSearchMax, this parameter (with indices 01, 02, etc.) occurs n times.

For additional information, see GradingValues.

PositionX(n)

X-position (of the found object) in the image. Top left = 0

Data type

Values

Information

DINT

-2622400 to 2622400

X position in increments of 1/100 pixel. A position from -26224.00 to 26223.99 pixels can therefore be selected.

2622400 = Out of range

Information:

Depending on the calculated value of parameter NumSearchMax, this parameter (with indices 01, 02, etc.) occurs n times.

PositionY(n)

Y-position (of the found object) in the image. Top left = 0

Data type

Values

Information

DINT

-2622400 to 2622400

Y position in increments of 1/100 pixel. A position from -26224.00 to 26223.99 pixels can therefore be selected.

2622400 = Out of range

Information:

Depending on the calculated value of parameter NumSearchMax, this parameter (with indices 01, 02, etc.) occurs n times.

Orientation(n)

The orientation is specified in increments of 1/100 degrees.

For the range of values -17999 to 18000, this results in a usable range of angles from -179.99° to +180.00°. Values less than -17999 and greater than 18000 are interpreted as +180 degrees.

Data type

Values

Information

INT

-17999 to 18000

Orientation in increments of 1/100 degrees.

Information:

Depending on the calculated value of parameter NumSearchMax, this parameter (with indices 01, 02, etc.) occurs n times.

RotCenterX

X-position of the center of rotation (of the found object) in the image. Top left = 0. Only relevant for Alignment.

Data type

Values

Information

UDINT

-2622400 to 2622400

The value deviating from the specified taught-in Alignment model is output here.

In 1/100 pixel steps.

RotCenterY

Y-position of the center of rotation (of the found object) in the image. Top left = 0. Only relevant for Alignment.

Data type

Values

Information

UDINT

-2622400 to 2622400

The value deviating from the specified taught-in Alignment model is output here.

In 1/100 pixel steps.