<< 点击显示目录 >> 主页
mappVision帮助助手 > 机器视觉帮助 > mapp Vision > 用例 > OCR - 识别和读取字符 处理参数模式为 "用户定义 "的配方 |
本节介绍在创建、保存和编辑配方时如何使用参数模式 "用户自定义"。术语 "配方 "是指单个视觉功能的集合参数值。参数模式 "用户定义 "允许读码器和OCR使用用户定义的参数,而不是使用预定义的参数值集。
•有关配置模式的信息
•读码器视觉功能的参数模式
•视觉功能OCR的参数模式
在在线 mapp Vision HMI 应用程序中创建用户自定义配方。
步骤
•获取合适的图像;代码或文字必须可见。
•从下拉菜单中选择所需的视觉功能。
•参数模式选择 "用户定义"(方括号内为相应的 POWERLINK 值)。执行视觉功能以确认选择。
•现在可以编辑参数了。
•成功配置视觉功能后,使用保存选项 "保存当前应用程序 "将整个视觉应用程序和配方保存到控制器中(请参阅保存视觉应用程序)。
举例说明: 参数优化成功后 ,可通过 将参数模式 从 "训练 "参数改为 "用户定义"参数来加载以这种方式确定的优化参数 , 然后将其保存为用户定义的配方。
也可以通过 HMI 应用程序编辑现有的用户自定义配方,但需要注意的是,在 HMI 应用程序之外,参数模式的值已经设置为 "用户自定义 "值。
•断开在线 HMI 应用程序与视觉组件的连接(关闭页面、连接到另一个视觉组件或导航到主屏幕)。
•将 HMI 应用程序外的ParameterMode设置为 "用户定义"。这可以在 AS 软件的 I/O 配置中使用 "强制 "或通过应用程序完成。
•将联机 HMI 应用程序重新连接到摄像机,如有必要,可使用下拉菜单手动重新加载视觉应用程序(请参阅加载视觉应用程序),如果上一次尝试连接时配方已被覆盖。
信息:
打开已包含用户自定义配方的视觉应用程序时,在联机 HMI 应用程序中连接视觉组件时,参数模式的值必须已设置为 "用户自定义"。否则,摄像机上的参数值将被配置的参数值覆盖。
只要用户不主动覆盖视觉应用程序,控制器上存储的所有视觉功能(配方)的视觉应用程序和参数值都不会受此行为影响。
信息:
如果在未为参数模式设置 "用户定义 "值且未将视觉应用程序保存到控制器的情况下,通过视觉功能 "读码器 "或 "OCR "中的联机人机界面应用程序与带有用户定义配方的摄像机建立连接,则该配方将丢失。必须手动重置参数值并将其保存到控制器中。
在加载包含视觉功能"读码器"或"OCR"的视觉应用程序时,若要正确加载参数值,则无需将视觉功能的ParameterMode设置为 "用户定义"。但是,如果使用不同的参数模式执行视觉应用程序,用户定义的参数值将被覆盖。这时必须将整个视觉应用程序从控制器重新加载到相机。
This section describes how to use parameter mode "User-defined" when creating, saving and editing a recipe. The term "recipe" refers to the collected parameter values of a single vision function. ParameterMode "User-defined" allows Code reader and OCR to work with user-defined parameters instead of using a predefined set of parameter values.
•Information about the configuration mode
•ParameterMode for vision function Code Reader
•ParameterMode for vision function OCR
A vision application must be configured with vision function Code reader or OCR.
A user-defined recipe is created in the online mapp Vision HMI application.
Procedure
•Acquire a suitable image; the code or writing must be visible.
•Switch to the desired vision function by selecting it from the drop-down menu.
•Select "User-defined" for ParameterMode (the corresponding POWERLINK value is provided in the square brackets). Confirm selection by executing the vision function.
•The parameters can now be edited.
•After successful configuration of the vision function, save the entire vision application with the recipe to the controller using save option "Save current application" (see Saving the vision application).
Example: After successful ParameterOptimization, the optimized parameters determined in this way can be loaded by changing ParameterMode from "trained" parameters to "user-defined" parameters and then saved as a user-defined recipe.
An existing user defined recipe can also be edited later via the HMI application, but it is important to note that the value for ParameterMode is already set to the value for "user-defined" outside the HMI application.
•Disconnect the online HMI application from the vision component (close page, connect to another vision component or navigate to the home screen).
•Set the value for ParameterMode outside of the HMI application to "User-defined". This is done either in the I/O configuration with "Force" in Automation Studio or via the application.
•Reconnect the online HMI application to the camera and, if necessary, manually reload the vision application using the drop-down menu (see Loading a vision application) if the recipe was overwritten during a previous connection attempt.
Information:
When opening a vision application that already contains a user-defined recipe, the value of ParameterMode must already be set to "User-defined" when connecting to the vision component in the online HMI application. If this is not the case, the parameter values on the camera are overwritten with the configured set of parameter values.
The vision application and parameter values of all vision functions (recipes) stored on the controller are not affected by this behavior as long as the vision application is not actively overwritten by the user.
Information:
This recipe will be lost if a connection to a camera with a user-defined recipe is established with the online HMI application in vision function Code Reader or OCR without setting value "User-defined" for ParameterMode and without having saved the vision application to the controller. The parameter values must be reset manually and saved to the controller.
When loading a vision application that contains vision function Code Reader or OCR with a user-defined recipe, ParameterMode of the vision function does not have to be set to "User-defined" for the parameter values to be loaded correctly. If the vision application is executed with a different ParameterMode, however, the user-defined parameter values are overwritten. The entire vision application must then be reloaded from the controller to the camera.