读码器参数(循环写入)

<< 点击显示目录 >>

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

读码器参数(循环写入)

信息:

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

参数

类型

数值范围

说明

循环

非循环

Enable

BOOL

0 or 1

启用/禁用该功能

W

 

NumSearchMax

USINT

0 to 255

搜索代码的最大数量

W

 

Timeout

UINT

0 to 65535

以 1 ms 为增量的搜索时间限制

W

 

ParameterMode

USINT

0 to 30

选择预定义参数集

W

 

ParameterOptimization

USINT

0 to 2

自动启用、禁用或重置示教参数

W

 

SymbolType

USINT

0 to 63

选择要搜索的代码类型

W

 

EnableRobustness

BOOL

0 or 1

启用/禁用搜索所选代码类型的稳健性

W

 

CodeGrading

BOOL

0 or 1

启用/禁用读取代码的质量分级。

W

 

Alignment

USINT

0 to 2

0 = "无

1 = "设置参考

2 = "GenerateAlignmentData" (生成对齐数据

W

 

OffsetROIX

DINT

-2622400 to 2622400

ROI 在 x 方向上的偏移量,以 1/100 像素为增量。

W

 

OffsetROIY

DINT

-2622400 to 2622400

ROI 在 Y 方向上的偏移量,以 1/100 像素为增量。

W

 

OffsetROIOrientation

INT

-17999 to 18000

从 -179.99° 到 +180° 的 ROI 方向偏移,以 1/100 度为单位。

W

 

OffsetROIRotCenterX

DINT

-2622400 to 2622400

以 1/100 像素为增量,在 x 方向上偏移旋转中心。

W

 

OffsetROIRotCenterY

DINT

-2622400 to 2622400

以 1/100 像素为增量,在 Y 方向上偏移旋转中心。

W

 

TestExecute

BOOL

0 or 1

显示采集图像中的代码。

通过 mapp Vision HMI 应用程序进行操作。

W

 

Enable

启用/禁用视觉功能。

数据类型

信息

BOOL

0

禁用图像处理(默认值)。

1

启用图像处理功能。

NumSearchMax

参数,用于确定要查找的代码/字符集的最大数量。

该值不应大于实际可查找的代码/字符集数量,否则可能会不必要地延长图像处理例程的运行时间。

数据类型

信息

USINT

0 至 255

要搜索的代码/字符集的最大数量。

信息:

该值不必与配置变量 NumResultsMax 相同,因为它只是 POWERLINK 框架的占位符。

 

信息:

理论上,也可以设置 "NumSearchMax = 0"(不单独检查),这样在执行视觉功能时会触发搜索 0 个结果。

Timeout/超时

使用该参数可限制搜索对象的时间。在时间结束前获得的所有结果均可使用(参见解码数据)。

在计算时间时,请务必考虑图像采集所需的时间和其他处理时间。从触发时刻到提供结果的确切处理时间将作为FunctionProcessingTime 返回。

数据类型

信息

UINT

0 至 65535

搜索对象的时间限制,从 1 ms 到 6.55 s,增量为 1 ms。

0 = 禁用超时(默认值)

信息:

如果 SymbolsType = 0 (IdentifySymbolType),则搜索符号类型时不使用超时。

 

信息:

从 mapp Vision 5.19 开始,参数 Timeout 在设定时间过后不会在日志中生成状态条目。在 mapp Vision 5.18 之前(包括 5.18),每次都会在日志中创建一个条目。

ParameterMode

信息:

易变参数:

更改此参数会导致内部参数更改,从而延长后续首次运行视觉功能时的处理时间。

 

为各种任务配置的参数集(非循环写入)已预装在摄像机上。用户也可以训练或定义参数集。ParameterMode 用于选择其中一个选项。

对参数集的更改仅在图像采集后生效。

数据类型

信息

USINT

0

最大识别率(极性:白底黑字)(默认值):

参数值为最大目标识别率配置(以牺牲识别速度为代价)。

1D 代码例外:如果参数模式 = 0,此处也使用 "快速识别"。

1

最大识别率(极性:黑底白字):

为最大目标识别率配置参数值(以牺牲识别速度为代价)。

一维代码例外:如果参数模式 = 1,此处也使用 "快速识别"。

10

快速识别(极性:白底黑字):

参数值配置为最快的目标识别速度(以牺牲目标识别率为代价)。

11

快速识别(极性:黑底白字):

为最快识别物体而配置参数值(牺牲物体识别率)。

20

训练参数(参数优化):

自动配置参数值(参见寄存器ParameterOptimization)。

30

用户自定义参数(专家模式):

参数值由用户独立设置。

用户自定义 "的初始值为上次选择的参数设置值。

信息:

使用 "用户定义参数 "选项需要专业知识。设置不正确的值可能导致整个摄像机功能无法使用。这只能通过重设为预定义参数集来纠正。

为了在多次采集图像后获得持续稳定的功能处理时间,强烈建议在选择预定义参数集("最大识别 "或 "快速识别")后再进行 "参数优化"。

用户自定义 "的初始值始终是上次选择的参数集的值。这意味着一旦修改,"用户自定 义 "参数只有在选择该模式时才有效。如果先修改预设参数集,然后再回到 "用户自定义 "模式,则之前对 "用户自定义 "参数集所做的任何修改都将失效。

如果需要备份修改过的 "用户自定义 "参数或加载以前保存的配方,必须在选择 "用户自 定义 "模式时进行。有关配方更改的更多信息,请参阅用例 使用参数模式 "用户自定义 "处理配方。

ParameterOptimization

如果启用此参数,则每次采集图像时都会优化参数值并将其存储到摄像机中,即必须执行图像采集。优化后的参数可在参数模式(ParameterMode)中选择。

优化后的参数集还可以选择重置。图像处理功能中存储的相应代码类型 (SymbolType) 的默认值将写入参数集。重置时还需要进行图像采集(ImageAcquisition)。

启用参数优化会增加函数处理时间

数据类型

信息

USINT

0

NoInfluenceToTrainedParameter(无影响训练参数)(默认值):

标准操作。不进行优化。

1

OptimizeTrainedParameter(优化训练参数):

参数优化激活。每次采集图像时,算法都会在后台根据采集的图像和代码优化参数。

2

ResetTrainedParameter(重置训练参数):

重置为训练参数集。

SymbolType

信息:

易变参数:

更改该参数会导致内部参数变化,从而延长后续首次运行视觉功能时的处理时间。

该参数用于从现有的标准格式列表中选择符号类型,并在采集和解释过程中进行搜索。

 

信息:

配置的符号类型始终用于评估。

采集图像中的任何其他符号类型都不会进行评估。在最坏的情况下,这些符号甚至会使所需符号类型的评估复杂化。

数据类型

信息

USINT

0

识别符号类型:自动识别代码的算法。

1 至 15

C1D

各种一维代码

20 至 25

C1D

通用产品代码(UPC)一维代码

30 至 37

C1D

全球统一标准(GS1)一维代码

50 至 55

C2D

各种二维码

60 至 63

C2D

全球统一标准(GS1)二维码

重要的一般条件/Important general conditions

要成功读取数据代码,获取的数据代码图像必须满足某些要求。一般来说,不应超出为各个参数指定的数值范围。由于这些都是软限制,因此参数值不完全在规定范围内的数据代码也可以读取。不过,由于在这种情况下并不总能确保识别,因此所有符号类型都应注意以下几点:

数据代码必须默认使用 UTF-8 编码生成。

数据代码(包括可能的静区)必须完全包含在图像中。

数据代码的元素/模块必须符合规则的网格,因此大小大致相同,外观统一。因此应避免扭曲和反射。

虽然允许最小对比度为 1,但数据代码的前景和背景之间的对比度至少应为 10,这样才能获得稳健的结果。

为获得可靠的结果,一维代码的元素宽度至少应为 2 像素,高度至少应为 8 像素。二维码模块的大小至少应为 4 像素。

如果图像中的代码过多,则应定义一个 ROI 以获得更好的结果。ROI 基本上是对搜索的限制,以加快搜索速度。

要搜索的代码应始终完全位于 ROI 中。该算法可以找到仅部分位于 ROI 内的代码(在极少数情况下,甚至可以找到已经位于 ROI 外的代码)。但是,如果部分代码位于 ROI 之外,则不能保证所有代码都能被正确找到。

一旦可以读取代码,也会对代码的底层区域进行质量评估,而与 ROI 无关。

识别符号类型/IdentifySymbolType

获取的代码会按照规定的顺序与列表中的代码类型进行比较,并根据可能的最高相关性进行识别。根据现有代码的不同,算法的执行时间会有很大差异。超时也不用于搜索符号类型。

符号类型 8(MSI)和符号类型 9(Pharmacode)不包括在搜索序列中,因为在许多情况下,尽管代码缺失或有问题,但由于缺乏可检查的属性,这些符号类型会提供结果。

IdentifySymbolType 是一个封装的 HALCON 函数,该函数使用定义的搜索值(如 NumSearchMax = 1、TestExecute = true、ParameterMode = 0)填充大量参数,输出方向上只有 DecodedData01 和 SymbolType01。

符号/代码类型/Types of symbols/codes

数值

数据代码

说明

示例

1

2/5 工业用

不常见

也称为 "2-out-of-5 代码 "或 "25 工业代码"。

每个字符由 5 个条形(2 宽 3 窄)表示,空格内无信息。

有效字符:数字

长度可变

01_1d-codes_25 industrial

2

2/5 交错

通用一维代码

代码 25 的变体,也使用空格编码。

两个数字总是组成一对:第一个数字由 5 个条码表示;第二个数字由紧接第一个数字的空格表示。因此,五条杠和空格代表一对数字。

如果字符数为奇数,则代码前加 0。

有效字符:数字

长度可变

02_1d-codes_25 interleaved

3

编码栏

不太常见

Codabar 的每个字符由 7 个元素(4 个条形,3 个空格)表示。

除了支持的字符外,还使用四个不同的起始和终止字符。

有效字符:数字和特殊字符

长度:可变

03_1d-codes_codabar

4

代码 32

制药业

代码 39 的子类型。

意大利药典 - 药品的条目编号。

有效字符:数字

长度: 8

04_1d-codes_code32

5

代码 39

通用一维代码

又称 "9 之 3 码"。每个字符由 9 个元素(5 个条形和 4 个空格)组成;在这 9 个元素中,3 个是宽元素,6 个是窄元素。

有效字符:字母数字和特殊字符

长度:可变

05_1d-codes_code39

6

代码 93

通用一维代码

代码 93 是代码 39 的进一步发展。

有效字符字母数字和特殊字符

长度可变

06_1d-codes_code93

7

代码 128

通用一维代码

Code 128 允许表示完整的 ASCII 字符集。系统自动在 3 个字符集之间切换,以便以最短的形式加密字母数字数据。

国际标准 ISO/IEC 15417 对 128 码进行了描述。

有效字符字母数字和特殊字符

长度可变

07_1d-codes_code128

8

MSI

不常见

重要:代码没有测试属性!

有效字符:数字

长度变量

08_1d-codes_msi.plessey

9

医药代码 (Laetus)

制药行业

重要:代码没有测试属性!

Pharmacode 只能编码从 3 到 131070 的整数。

原则上,Pharmacode 可正向或反向读取,因此也可返回两个不同的结果。这些结果由 DecodedData(n) 返回,中间用逗号隔开。因此,最好限制药典的搜索参数(例如指定方向 C1dOrientation)。

有效字符:数字

长度可变

09_1d-codes_pharmacode

10

EAN-8

零售

用于小型物品的欧洲物品编号。

EAN 现在被称为 GTIN(全球贸易物品编号)。

有效字符:数字

长度: 8

10.1d-codes_ean-8

11

EAN-8 附加组件 2

零售

用于小件商品的欧洲商品编号,带有 2 位附加代码。

EAN 现在被称为 GTIN(全球贸易物品编号)。

有效字符:数字

长度: 10

11.1d-codes_ean-8-addon2

12

EAN-8 附加组件 5

零售

欧洲物品编号,用于小型物品的 5 位附加编码。

EAN 现在被称为 GTIN(全球贸易物品编号)。

有效字符:数字

长度: 13

12.1d-codes_ean-8-addon5

13

EAN-13

零售

用于标记零售产品的欧洲物品编号。

EAN 现在被称为 GTIN(全球贸易物品编号)。

有效字符:数字

长度: 13

13_1d-codes_ean-13

14

EAN-13 附加组件 2

零售

欧洲商品编号,用于用 2 位数附加代码标记零售产品。

EAN 现在被称为 GTIN(全球贸易物品编号)。

有效字符:数字

长度:15

14.1d-codes_ean-13-addon2

15

EAN-13 附加组件 5

零售

欧洲商品编号,用于用 5 位附加码标记零售产品(特别是与 ISBN 条形码一起作为书籍的价格规格)。

EAN 现称为 GTIN(全球贸易物品编号)。

有效字符:数字

长度:18

15.1d-codes_ean-13-addon5

16

最高

19

保留

x

x

20

UPC-A

零售

UPC-A 码是 UPC 码的 12 位标准版本,与 EAN 码相似。它也被称为 UPC 12。

每个字符由两条杠和两个空格组成。

有效字符:数字

长度: 12

20_1d-codes_upca

21

UPC-A 附加组件 2

零售

带有 2 位附加码的 UPC-A 代码。

有效字符:数字

长度: 14

21.1d-codes_upca-addon2

22

UPC-A Add-On 5

零售

带有 5 位附加码的 UPC-A 代码。

有效字符:数字

长度: 17

22.1d-codes_upca-addon5

23

UPC-E

零售

UPC-E 代码是 UPC 代码的 8 位短版本,其中第八位是校验位,第一位是系统标识符,始终为 "0"。

有效字符:数字

长度: 8

23_1d-codes_upce

24

UPC-E Add-On 2

零售

带有 2 位附加码的 UPC-E 代码。

有效字符:数字

长度: 10

24.1d-codes_upce-addon2

25

UPC-E Add-On 5

零售

带有 5 位附加码的 UPC-E 代码。

有效字符:数字

长度: 13

25.1d-codes_upce-addon5

26

Up to

29

保留

x

x

30

GS1-128

物流

按照全球统一标准(GS1)规范获取数据结构的 128 码。

有效字符:字母数字

长度可变

30_1d-codes_gs1-128

31

GS1 数据条

全向

GS1 条形码

GS1 DataBar 是 GS1 的一个条形码系列。其前身为缩减空间条形码 (RSS-14)。

有效字符:数字

长度: 14

31_1d-codes_gs1.databar.omnidir

32

GS1 DataBar

截断

GS1 条形码

GS1 DataBar 是 GS1 的一个条形码系列。前身为缩减空间条码 (RSS-14)。

有效字符:数字

长度: 14

32_1d-codes_gs1.databar.truncated

33

GS1 DataBar

堆叠

GS1 条形码

GS1 DataBar 是 GS1 的一个条形码系列。前身为缩减空间条码 (RSS-14)。

有效字符:数字

长度: 14

33_1d-codes_gs1.databar.stacked

34

GS1 DataBar

堆叠全向

GS1 条形码

GS1 DataBar 是 GS1 的一个条形码系列。其前身为缩减空间条形码 (RSS-14)。

有效字符:数字

长度: 14

34_1d-codes_gs1.databar.stacked.omnidir

35

GS1 DataBar

有限

GS1 条形码

GS1 DataBar 是 GS1 的一个条形码系列。前身为缩减空间条码 (RSS-14)。

有效字符:数字

长度: 14

35_1d-codes_gs1.databar.limited

36

GS1 DataBar

扩展

GS1 条形码

GS1 DataBar 是 GS1 的一个条形码系列。其前身是缩减空间条码(RSS-14)。

除商品编号(GTIN)外,"扩展 "变体还可用于编码其他信息(如日期、重量、批次)。

有效字符:数字

长度可变

36_1d-codes_gs1.databar.expanded

37

GS1 数据条

扩展堆叠

GS1 条形码

GS1 DataBar 是 GS1 的一个条形码系列。其前身是缩减空间条码(RSS-14)。

除商品编号(GTIN)外,"扩展 "变体还可用于编码其他信息(如日期、重量、批次)。

有效字符:数字

长度: 14(第一行)。可选择多两行。那么最多74 个数字字符/41 个字母数字字符

37_1d-codes_gs1.databar.expanded.stacked

38

Up to

49

保留

x

x

50

数据矩阵 ECC 200

通用二维码

由 4 个主要部分组成,采用 Reed-Solomon 纠错技术。有了这种纠错功能,即使高达 25% 的数据被覆盖或破坏,数据矩阵仍可读取。

有效字符:字母数字和特殊字符

长度可变

50_2d-codes_data.matrix.ecc.200

51

QR 码型号 1

普通二维码

矩阵四个角中三个角上的搜索元素提供方位。包括里德-所罗门纠错

有效字符:字母数字和特殊字符

长度可变

Model 2

51.52_2d-codes_qr-code.model2

52

QR 码 2 型

普通二维码

矩阵四个角中三个角上的搜索元素提供方位。包括里德-所罗门纠错

有效字符:字母数字和特殊字符

长度可变

Model 2

51.52_2d-codes_qr-code.model2

53

微型 QR 码

普通二维码

二维码的一种变体,优化到最小尺寸,左上角只有一个搜索元素

有效字符:字母数字和特殊字符

长度可变

53_2d-codes_micro.qr-code

54

PDF417

通用二维码

便携式数据文件

标准操作模式:ASCII、二进制模式和数字模式

有效字符字母数字和特殊字符

长度可变

54_2d-codes_pdf417

55

阿兹台克代码

普通二维码

代码中心是由多个嵌套方格组成的搜索元素。包括 Reed-Solomon 纠错。

有效字符:字母数字和特殊字符

长度可变

55_2d-codes_aztec.code

56

Up to

59

保留

x

x

60

GS1 数据矩阵

物流

GS1

二维代码,用于加密超小型产品上纯产品标识以外的数据。

有效字符:字母数字和特殊字符

长度可变

60_2d-codes_gs1.datamatrix

61

GS1 QR 码 1 型

物流

GS1

二维代码,用于加密超小型产品上纯产品标识以外的数据。

有效字符:字母数字和特殊字符

长度可变

Model 2

61.62_2d-codes_gs1.qr-code.model2

62

GS1 QR 码 2 型

物流

GS1

二维码,用于加密超小型产品上纯产品标识以外的数据。

有效字符:字母数字和特殊字符

长度可变

Model 2

61.62_2d-codes_gs1.qr-code.model2

63

GS1 Aztec 代码

物流

GS1

二维代码,用于加密超小型产品上纯产品标识以外的数据。

有效字符:字母数字和特殊字符

长度可变

63_aztec

64

Up to

255

保留

x

x

EnableRobustness

该参数可提高搜索所选符号类型时的稳健性,适用于混合代码类型的采集图像。稳健性意味着搜索和识别所选代码类型的参数范围更窄、更具体,从而避免出现误报。不过,这也会增加函数处理时间(FunctionProcessingTime)。

如果配置要求也能找到小代码(模块大小小于 15),则启用该参数非常有用。如果图像中可能出现另一种类型的代码,启用此参数尤为重要。

举例说明:

选择微型 QR 码作为要搜索的符号类型。

搜索区域(ROI)包含一个 QR 码和一个 Micro QR 码。

如果没有 EnableRobustness,也可以在 QR 码中找到 Micro QR 码。

数据类型

信息

BOOL

0

禁用对所选代码类型的稳健搜索(默认值)。

1

启用稳健性

信息:

该参数仅适用于二维码。

CodeGrading

该参数对读取的代码进行分级。质量分级结果存储在参数GradingValue(n) 中。

一维条码按照 ISO 15416 标准分级,二维码(PDF417 除外)按照 ISO TR 29158 标准分级(相当于 AIM DPM-1-2006),PDF417 按照 ISO 15415 标准分级。

启用 CodeGrading 功能后,会对运行时间和内部内存消耗产生影响。

数据类型

信息

BOOL

0

禁用代码分级(默认值)

1

启用代码分级

Alignment

信息:

易变参数:

更改该参数会导致内部参数变化,从而延长后续首次运行视觉功能时的处理时间。

在对齐(1 或 2)期间,NumResultsMax 会自动设置为 1(内部)。对齐参考数据存储在视觉功能数据中。但只有当参数 Alignment 设置为 1 至 2 时才会这样做。当然,对齐时只能教导 1 个模型(作为参考)。

有关对齐功能的更多信息,请参阅视觉功能 - 对齐。

数据类型

信息

USINT

0

无。无对齐

1

设置参照

2

生成对齐数据

OffsetROIX

图像区域内感兴趣区域 (ROI) 在 X 方向上的偏移量。

数据类型

信息

DINT

-2622400 至 2622400

ROI 在 x 方向上的偏移量,以 1/100 像素为增量。因此可以选择 -26224.00 至 26224.00 像素的位置。

OffsetROIY

图像区域内感兴趣区域 (ROI) 在 Y 方向上的偏移量。

数据类型

信息

DINT

-2622400 至 2622400

ROI 在 Y 方向上的偏移量,以 1/100 像素为增量。因此可以选择 -26224.00 至 26224.00 像素的位置。

OffsetROIOrientation

感兴趣区域 (ROI) 方向的偏移量。方向以 1/100 度的增量指定。

对于 -179.99° 至 +180.00° 的角度范围,可用值范围为 -17999 至 18000。超出此范围的值将被解释为 +180° 。

数据类型

信息

INT

-17999 至 18000

-179.99°至 180.00°,增量为 1/100 度。

OffsetROIRotCenterX

数据类型

信息

DINT

-2622400 至 2622400

旋转中心在 x 方向上的偏移量,以 1/100 像素为增量。因此可以选择 -26224.00 至 26224.00 像素之间的位置。

OffsetROIRotCenterY

数据类型

信息

DINT

-2622400 至 2622400

旋转中心在 Y 方向上的偏移量,增量为 1/100 像素。因此可以选择 -26224.00 至 26224.00 像素之间的位置。

TestExecute

信息:

易变参数:

更改该参数会导致内部参数变化,从而延长后续首次运行视觉功能时的处理时间。

该参数执行代码搜索,并在 mapp Vision HMI 应用程序中显示找到的区域(找到的代码轮廓)。

数据类型

信息

BOOL

0

禁用 TestExecute(默认值)

1

执行 TestExecute

信息:

该参数在 I/O 映射中不可见。操作通过 mapp Vision HMI 应用程序进行。


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

Enable

BOOL

0 or 1

Enables/Disables the function

W

 

NumSearchMax

USINT

0 to 255

Maximum number of codes to search

W

 

Timeout

UINT

0 to 65535

Time limit for the search time in increments of 1 ms

W

 

ParameterMode

USINT

0 to 30

Selects predefined parameter sets

W

 

ParameterOptimization

USINT

0 to 2

Automatically enables, disables or resets taught-in parameters

W

 

SymbolType

USINT

0 to 63

Selects the code type to be searched for

W

 

EnableRobustness

BOOL

0 or 1

Enables/Disables robustness for the search of the selected code type

W

 

CodeGrading

BOOL

0 or 1

Enables/Disables quality grading of the codes read.

W

 

Alignment

USINT

0 to 2

0 = "None"

1 = "SetReference"

2 = "GenerateAlignmentData"

W

 

OffsetROIX

DINT

-2622400 to 2622400

Offset of the ROI in the x-direction in 1/100 pixel increments.

W

 

OffsetROIY

DINT

-2622400 to 2622400

Offset of the ROI in the y-direction in increments of 1/100 pixel.

W

 

OffsetROIOrientation

INT

-17999 to 18000

Offset to orient the ROI from -179.99° to +180° in 1/100 degree steps

W

 

OffsetROIRotCenterX

DINT

-2622400 to 2622400

Offset of the center of rotation in the x-direction in 1/100 pixel increments.

W

 

OffsetROIRotCenterY

DINT

-2622400 to 2622400

Offset of the rotation center in the y-direction in increments of 1/100 pixel.

W

 

TestExecute

BOOL

0 or 1

Displays codes found in the acquired image.

Operation takes place via the mapp Vision HMI application.

W

 

Enable

Enables/Disables the vision function.

Data type

Values

Information

BOOL

0

Image processing disabled (default value).

1

Image processing function enabled.

NumSearchMax

Parameter for the maximum number of codes / character sets to be found.

The value should not be greater than the actual locatable number of codes / character sets; otherwise, the runtime of the image processing routine could be unnecessarily extended.

Data type

Values

Information

USINT

0 to 255

Maximum number of codes / character sets to search for.

Information:

This value does not have to be identical to configuration variable NumResultsMax since it only serves as a placeholder for the POWERLINK frame.

 

Information:

Theoretically, "NumSearchMax = 0" can also be set (it is not checked separately), which triggers a search for 0 results when the vision function is executed.

Timeout

The search for objects is limited in time using this parameter. All results obtained up to the end of the time are then available (see DecodedData).

When calculating times, be sure to account for the time required for image acquisition and other processing times. The exact processing time from the trigger moment to the provision of the result is returned as FunctionProcessingTime.

Data type

Values

Information

UINT

0 to 65535

Time limit for searching for objects from 1 ms to 6.55 s in increments of 1 ms.

0 = Timeout disabled (default)

Information:

If SymbolsType = 0 (IdentifySymbolType), Timeout is not used to search for the symbol type.

 

Information:

Starting with mapp Vision 5.19, parameter Timeout does not generate a status entry in the logbook when the set time has elapsed. Up to and including mapp Vision 5.18, an entry was created in the logbook each time.

ParameterMode

Information:

Volatile parameter:

Changing this parameter results in an internal parameter change, which results in longer processing time during the first subsequent run of the vision function.

 

Parameter sets configured for various tasks (acyclic write) are preinstalled on the camera. A set of parameters can also be trained or defined by the user. ParameterMode is used to select one of these options.

A change made to the parameter set only takes effect after an image acquisition.

Data type

Values

Information

USINT

0

Max. recognition (polarity: black on white)(default value):

Parameter values are configured for maximum object recognition rate (at the expense of recognition speed).

Exception for 1D codes: "Fast recognition" is also used here if ParameterMode = 0.

1

Max. recognition (polarity: white on black):

Parameter values are configured for maximum object recognition rate (at the expense of recognition speed).

Exception for 1D codes: "Fast recognition" is also used here if ParameterMode = 1.

10

Fast recognition (polarity: black on white):

Parameter values are configured for fastest possible object recognition (at the expense of object recognition rate).

11

Fast recognition (polarity: white on black):

Parameter values are configured for fastest possible object recognition (at the expense of object recognition rate).

20

Trained parameters (parameter optimization):

Parameter values are configured automatically (see register ParameterOptimization).

30

User-defined parameter (expert mode):

Parameter values are set independently by the user.

The initial values of "User-defined" are the values of the last previously selected parameter set.

Information:

The use of selection "User-defined parameters" requires expert knowledge. Setting incorrect values may render complete camera functions unusable. This may only be corrected by resetting to a predefined parameter set.

In order to obtain a consistently stable FunctionProcessingTime after a number of acquired images, a subsequent "parameter optimization" is strongly recommended after selecting a predefined parameter set ("Max. recognition" or "Fast recognition").

The initial values of "User-defined" are always the values of the last previously selected parameter set. This means that once modified, "User-defined" parameters are only valid as long as this mode is selected. If a change takes place to a preconfigured parameter set and then back to "User-defined", any changes that were previously made to parameter set "User-defined" are no longer available.

If modified "User-defined" parameters should be backed up or a previously saved recipe loaded, this must be done with mode "User-defined" selected. For additional information about recipe changes, see use case Handling recipes with ParameterMode "User-defined".

ParameterOptimization

If this parameter is enabled, the values are optimized with each further image acquisition and stored in the camera, i.e. ImageAcquisition must be executed. The optimized parameters can then be selected in ParameterMode.

Optionally, a parameter set can also be reset after being optimized. The default values stored in the image processing function for the respective code type (SymbolType) are written to the parameter set. ImageAcquisition is also necessary when resetting.

Enabling ParameterOptimization increases the FunctionProcessingTime.

Data type

Values

Information

USINT

0

NoInfluenceToTrainedParameter (default value):

Standard operation. Optimization is not performed.

1

OptimizeTrainedParameter:

Parameter optimization is active. With each image acquisition, the algorithm optimizes the parameter in the background to the acquired image and code.

2

ResetTrainedParameter:

Resets to the trained parameter set.

SymbolType

Information:

Volatile parameter:

Changing this parameter results in an internal parameter change, which results in longer processing time during the first subsequent run of the vision function.

Parameter for selecting a symbol type from an existing list of standard formats, which will be searched for in the acquisition and interpreted.

 

Information:

The configured symbol type is always used for the evaluation.

Any other symbol types in the acquired image are not evaluated. In the worst case, these can even complicate the evaluation of the desired symbol type.

Data type

Values

Information

USINT

0

IdentifySymbolType: Algorithm for automatic identification of the code.

1 to 15

C1D

Various 1D codes

20 to 25

C1D

Universal Product Code (UPC) 1D codes

30 to 37

C1D

Global Standards One (GS1) 1D codes

50 to 55

C2D

Various 2D codes

60 to 63

C2D

Global Standards One (GS1) 2D codes

Important general conditions

To successfully read a data code, the acquired image of the data code must meet certain requirements. In general, the ranges of values specified for the individual parameters should not be exceeded. Since these are soft limits, data codes whose parameter values are not completely within the specified range can also be read. Since recognition is not always ensured in such cases, however, the following points should be observed for all symbol types:

The data code must be generated with UTF-8 encoding by default.

The data code (including a possible quiet zone) must be completely included in the image.

The elements/modules of a data code must fit into a regular grid and therefore be of approximately the same size and of uniform appearance. Distortions and reflections should therefore be avoided.

Although a minimum contrast of 1 is permitted, the data codes should have a contrast of at least 10 between the foreground and background for robust results.

For robust results, the elements of 1D codes should be at least 2 pixels wide and 8 pixels high. The modules of 2D codes should have a size of at least 4 pixels.

If there are too many codes in an image, an ROI should be defined to achieve a better result. The ROI basically limits the search in order to speed it up.

The code to be searched for should always be located completely in the ROI. The algorithm can find codes that are only partially in the ROI (in rare cases, even codes that are already outside the ROI). However, it cannot be guaranteed that all codes will be found correctly if parts of them are outside the ROI.

As soon as a code can be read, the quality assessment is also made on the underlying area of the code, regardless of the ROI.

IdentifySymbolType

The acquired code is compared with the code types from the list in a defined order and identified based on the highest possible correlation. Depending on the existing code, the execution time of the algorithm can vary greatly. Timeout is also not used to search for the symbol type.

Symbol types 8 (MSI) and 9 (Pharmacode) are not included in the search sequence, as these would provide a result in many cases due to their lack of checkable properties, although the code is either missing or faulty.

IdentifySymbolType is an encapsulated HALCON function that fills a number of parameters with defined values for the search (e.g. NumSearchMax = 1, TestExecute = true, ParameterMode = 0) and only DecodedData01 and SymbolType01 in the output direction.

Types of symbols/codes

Value

Data code

Description

Example

1

2/5 Industrial

Not very common

Also known as "2-out-of-5 code" or "Code 25 Industrial".

Each character is represented by 5 bars (2 wide, 3 narrow) with no information in the spaces.

Valid characters: Numeric

Length: Variable

01_1d-codes_25 industrial

2

2/5 Interleaved

General 1D code

Variant of Code 25, which also uses spaces for encoding.

Two digits always form a pair: The first digit is represented by 5 bars; the second digit is represented by the immediately following spaces of the first digit. Five bars and spaces thus represent a pair of digits.

If there are an odd number of characters, the code is preceded by a zero.

Valid characters: Numeric

Length: Variable

02_1d-codes_25 interleaved

3

Codabar

Not very common

Each character of the Codabar is represented by 7 elements (4 bars, 3 spaces).

In addition to the supported characters, four different start and stop characters are used.

Valid characters: Numeric and special characters

Length: Variable

03_1d-codes_codabar

4

Code 32

Pharmaceutical industry

Subtype of Code 39.

Italian Pharmacode - Article number for pharmaceutical products.

Valid characters: Numeric

Length: 8

04_1d-codes_code32

5

Code 39

General 1D code

Also known as "Code 3 of 9". Each character is composed of 9 elements (5 bars and 4 spaces); of these 9 elements, 3 are wide and 6 are narrow.

Valid characters: Alphanumeric and special characters

Length: Variable

05_1d-codes_code39

6

Code 93

General 1D code

Code 93 is a further development of Code 39.

Valid characters: Alphanumeric and special characters

Length: Variable

06_1d-codes_code93

7

Code 128

General 1D code

Code 128 allows the full ASCII character set to be represented. The system automatically switches between 3 character sets in order to encrypt alphanumeric data in the shortest possible form.

Code 128 is described in international standard ISO/IEC 15417.

Valid characters: Alphanumeric and special characters

Length: Variable

07_1d-codes_code128

8

MSI

Not very common

IMPORTANT: Code has no test properties!

Valid characters: Numeric

Length: Variable

08_1d-codes_msi.plessey

9

PharmaCode (Laetus)

Pharmaceutical industry

IMPORTANT: Code has no test properties!

Pharmacode can only encode integers from 3 to 131070.

In principle, pharmacode can be read forward or backward and can therefore also return 2 different results. These are returned by DecodedData(n), separated by commas. It can therefore be advisable to restrict the search parameters for pharmacode (e.g. by specifying an orientation C1dOrientation).

Valid characters: Numeric

Length: Variable

09_1d-codes_pharmacode

10

EAN-8

Retail

European article number for small articles.

EAN is now referred to as GTIN (Global Trade Item Number).

Valid characters: Numeric

Length: 8

10.1d-codes_ean-8

11

EAN-8 Add-On 2

Retail

European article number for small articles with a 2-digit additional code.

EAN is now referred to as GTIN (Global Trade Item Number).

Valid characters: Numeric

Length: 10

11.1d-codes_ean-8-addon2

12

EAN-8 Add-On 5

Retail

European article number for small articles with a 5-digit additional code.

EAN is now referred to as GTIN (Global Trade Item Number).

Valid characters: Numeric

Length: 13

12.1d-codes_ean-8-addon5

13

EAN-13

Retail

European article number for marking retail products.

EAN is now referred to as GTIN (Global Trade Item Number).

Valid characters: Numeric

Length: 13

13_1d-codes_ean-13

14

EAN-13 Add-On 2

Retail

European article number for marking retail products with a 2-digit additional code.

EAN is now referred to as GTIN (Global Trade Item Number).

Valid characters: Numeric

Length: 15

14.1d-codes_ean-13-addon2

15

EAN-13 Add-On 5

Retail

European article number for marking retail products with a 5-digit additional code (in particular as a price specification on books in conjunction with the ISBN barcode)

EAN is now referred to as GTIN (Global Trade Item Number).

Valid characters: Numeric

Length: 18

15.1d-codes_ean-13-addon5

16

Up to

19

Reserve

x

x

20

UPC-A

Retail

The UPC-A code is the 12-digit standard version of the UPC code and similar to the EAN code. It is also referred to as UPC 12.

Each character is made up of two bars and two spaces.

Valid characters: Numeric

Length: 12

20_1d-codes_upca

21

UPC-A Add-On 2

Retail

UPC-A code with 2-digit additional code.

Valid characters: Numeric

Length: 14

21.1d-codes_upca-addon2

22

UPC-A Add-On 5

Retail

UPC-A code with 5-digit additional code.

Valid characters: Numeric

Length: 17

22.1d-codes_upca-addon5

23

UPC-E

Retail

The UPC-E code is the 8-digit short version of the UPC code, where the eighth digit is the check digit and the first digit is a system identifier, which is always "0".

Valid characters: Numeric

Length: 8

23_1d-codes_upce

24

UPC-E Add-On 2

Retail

UPC-E code with a 2-digit additional code.

Valid characters: Numeric

Length: 10

24.1d-codes_upce-addon2

25

UPC-E Add-On 5

Retail

UPC-E code with a 5-digit additional code.

Valid characters: Numeric

Length: 13

25.1d-codes_upce-addon5

26

Up to

29

Reserve

x

x

30

GS1-128

Logistics

A Code 128 that acquisitions data structured per Global Standards One (GS1) specifications.

Valid characters: Alphanumeric

Length: Variable

30_1d-codes_gs1-128

31

GS1 DataBar

Omnidirectional

GS1 barcode

GS1 DataBar is a family of barcodes from GS1. Formerly known as Reduced Space Symbology (RSS-14).

Valid characters: Numeric

Length: 14

31_1d-codes_gs1.databar.omnidir

32

GS1 DataBar

Truncated

GS1 barcode

GS1 DataBar is a family of barcodes from GS1. Formerly known as Reduced Space Symbology (RSS-14).

Valid characters: Numeric

Length: 14

32_1d-codes_gs1.databar.truncated

33

GS1 DataBar

Stacked

GS1 barcode

GS1 DataBar is a family of barcodes from GS1. Formerly known as Reduced Space Symbology (RSS-14).

Valid characters: Numeric

Length: 14

33_1d-codes_gs1.databar.stacked

34

GS1 DataBar

Stacked omnidirectional

GS1 barcode

GS1 DataBar is a family of barcodes from GS1. Formerly known as Reduced Space Symbology (RSS-14).

Valid characters: Numeric

Length: 14

34_1d-codes_gs1.databar.stacked.omnidir

35

GS1 DataBar

Limited

GS1 barcode

GS1 DataBar is a family of barcodes from GS1. Formerly known as Reduced Space Symbology (RSS-14).

Valid characters: Numeric

Length: 14

35_1d-codes_gs1.databar.limited

36

GS1 DataBar

Expanded

GS1 barcode

GS1 DataBar is a family of barcodes from GS1. Formerly known as Reduced Space Symbology (RSS-14).

The "Expanded" variant can also be used to encode additional information (e.g. date, weight, batch) in addition to the article number (GTIN).

Valid characters: Numeric

Length: Variable

36_1d-codes_gs1.databar.expanded

37

GS1 DataBar

Expanded stacked

GS1 barcode

GS1 DataBar is a family of barcodes from GS1. Formerly known as Reduced Space Symbology (RSS-14).

The "Expanded" variant can also be used to encode additional information (e.g. date, weight, batch) in addition to the article number (GTIN).

Valid characters: Numeric

Length: 14 (first row). Optionally two more rows. Then max. 74 numeric / 41 alphanumeric characters

37_1d-codes_gs1.databar.expanded.stacked

38

Up to

49

Reserve

x

x

50

Data Matrix ECC 200

General 2D code

Consists of 4 main components and uses Reed-Solomon error correction. With this error correction, the data matrix remains readable even if up to 25% is covered or destroyed.

Valid characters: Alphanumeric and special characters

Length: Variable

50_2d-codes_data.matrix.ecc.200

51

QR Code Model 1

General 2D code

Search elements in three of the four corners of the matrix provide orientation. Including Reed-Solomon error correction

Valid characters: Alphanumeric and special characters

Length: Variable

Model 2

51.52_2d-codes_qr-code.model2

52

QR Code Model 2

General 2D code

Search elements in three of the four corners of the matrix provide orientation. Including Reed-Solomon error correction

Valid characters: Alphanumeric and special characters

Length: Variable

Model 2

51.52_2d-codes_qr-code.model2

53

Micro QR Code

General 2D code

A variant of the QR code optimized to the smallest dimension with only one search element in the upper left corner

Valid characters: Alphanumeric and special characters

Length: Variable

53_2d-codes_micro.qr-code

54

PDF417

General 2D code

Portable data file

Standard operating modes: ASCII, binary mode and numeric mode

Valid characters: Alphanumeric and special characters

Length: Variable

54_2d-codes_pdf417

55

Aztec code

General 2D code

In the center of the code is the search element consisting of several nested squares. Including Reed-Solomon error correction.

Valid characters: Alphanumeric and special characters

Length: Variable

55_2d-codes_aztec.code

56

Up to

59

Reserve

x

x

60

GS1 DataMatrix

Logistics

GS1

2D code for the encryption of data beyond pure product identification on very small products.

Valid characters: Alphanumeric and special characters

Length: Variable

60_2d-codes_gs1.datamatrix

61

GS1 QR Code Model 1

Logistics

GS1

2D code for the encryption of data beyond pure product identification on very small products.

Valid characters: Alphanumeric and special characters

Length: Variable

Model 2

61.62_2d-codes_gs1.qr-code.model2

62

GS1 QR Code Model 2

Logistics

GS1

2D code for the encryption of data beyond pure product identification on very small products.

Valid characters: Alphanumeric and special characters

Length: Variable

Model 2

61.62_2d-codes_gs1.qr-code.model2

63

GS1 Aztec code

Logistics

GS1

2D code for the encryption of data beyond pure product identification on very small products.

Valid characters: Alphanumeric and special characters

Length: Variable

63_aztec

64

Up to

255

Reserve

x

x

EnableRobustness

This parameter increases robustness when searching for the selected symbol type and is intended for acquired images with mixed code types. Robustness means that the parameters for searching and recognizing the selected code type are narrower and more specific, which prevents false positive detections. In return, however, the FunctionProcessingTime is increased.

It is useful to enable this parameter if the configuration requires small codes (size in modules < 15) to be found also. This is particularly relevant if a code of another type can occur in one of the images.

Example:

Micro QR code was selected as the symbol type to be searched for.

The search area (ROI) contains a QR code and a Micro QR code.

Without EnableRobustness, a Micro QR code could also be found within the QR code.

Data type

Values

Information

BOOL

0

Robust search for the selected code type is disabled (default).

1

Robustness enabled

Information:

This parameter is only relevant for 2D codes.

CodeGrading

The parameter grades the read codes. The result of the quality grade is stored in parameter GradingValue(n).

1D barcodes are graded per the criteria of ISO 15416, 2D codes (except PDF417) per the criteria of ISO TR 29158 (corresponds to AIM DPM-1-2006) and PDF417 per ISO 15415.

When enabled, CodeGrading has an influence on runtime and internal memory consumption.

Data type

Values

Information

BOOL

0

Code grading disabled (default)

1

Code grading enabled

Alignment

Information:

Volatile parameter:

Changing this parameter results in an internal parameter change, which results in longer processing time during the first subsequent run of the vision function.

NumResultsMax is automatically set to 1 (internally) during Alignment (1 or 2). Alignment reference data is stored in the vision function data. Only if parameter Alignment is set from 1 to 2, however. Of course, only 1 model (as reference) can be taught for Alignment.

For additional information about function Alignment, see Vision functions - Alignment.

Data type

Values

Information

USINT

0

None. No alignment

1

SetReference

2

GenerateAlignmentData

OffsetROIX

Offset of the region of interest (ROI) within the image area in the x-direction.

Data type

Values

Information

DINT

-2622400 to 2622400

Offset of the ROI in the x-direction in 1/100 pixel increments. A position from -26224.00 to 26224.00 pixels can therefore be selected.

OffsetROIY

Offset of the region of interest (ROI) within the image area in the y-direction.

Data type

Values

Information

DINT

-2622400 to 2622400

Offset of the ROI in the y-direction in increments of 1/100 pixel. A position from -26224.00 to 26224.00 pixels can therefore be selected.

OffsetROIOrientation

Offset to the orientation of the region of interest (ROI). The orientation is specified in increments of 1/100 degrees.

For the angle range of -179.99° to +180.00°, this results in a usable range of values of -17999 to 18000. Values outside this range of values are interpreted as +180°.

Data type

Values

Information

INT

-17999 to 18000

-179.99° to 180.00° in increments of 1/100 degree.

OffsetROIRotCenterX

Data type

Values

Information

DINT

-2622400 to 2622400

Offset of the center of rotation in the x-direction in 1/100 pixel increments. A position from -26224.00 to 26224.00 pixels can therefore be selected.

OffsetROIRotCenterY

Data type

Values

Information

DINT

-2622400 to 2622400

Offset of the rotation center in the y-direction in increments of 1/100 pixel. A position from -26224.00 to 26224.00 pixels can therefore be selected.

TestExecute

Information:

Volatile parameter:

Changing this parameter results in an internal parameter change, which results in longer processing time during the first subsequent run of the vision function.

The parameter performs a code search and displays the found regions (contour of the found code) in the mapp Vision HMI application.

Data type

Values

Information

BOOL

0

TestExecute disabled (default)

1

Execute TestExecute

Information:

This parameter is not visible in the I/O mapping. Operation takes place via the mapp Vision HMI application.