Job Editor

ToolGroup Items

The ToolGroup Items of the job are managed in the first tab of the Job Editor.

../../_images/job-editor-tgitems.png

All ToolGroup items of the job are displayed in this list. The check mark selects the active ToolGroup item, which is used, for example, when executing the BV via the Job Display.

With (1) ToolGroup items can be created or deleted and the order can be changed. In addition, the ToolGroup Item Editor can be opened (alternatively by double-clicking in the list). The ToolGroup Item is renamed via (3).

When creating a new ToolGroup item, the following information is required:

../../_images/job-editor-create-tgitem.png

The name must be unique within a job. It can be prefixed with a ID.

With Relative Directory is defined where the files of the Toolgroup Item are stored relative to the job. A change is only necessary for special configurations.

The type can only be set at creation time and cannot be changed later.

ToolGroup items can be copied when created, either from another currently loaded type, or via Import through the file system from any other project. When importing, the ToolGroup item to be copied is loaded and inserted into the Copy From list:

../../_images/job-editor-create-tgitem-import.png

When importing, .tgitem or .vpp files can be used. With .tgitem, all settings are loaded, including the image sources or IO assignments, while with .vpp only the Cognex ToolGroup is imported.

Hint

ToolGroup items that cannot be loaded cannot be imported.

ToolGroup Item Selectors

Selectors are defined here that can be used as an alternative to the ID for selecting the ToolGroupItem to execute. Instead of a simple ID, the VPP selector selects the ToolGroupItem to be executed based on the value of GInOut variables.

../../_images/job-editor-select-tgitem-by-selector.png
  1. Enabled: Enable or disable VPP selector.

  2. Execute selector: Select ToolGroupItem based on the current values of the GInOutVariables.

  3. GIO Variable List: Name of the variable list containing the hardware variables.

  4. variables: Comma-separated list of variable names. The buttons can be used to add variables by list selection or to remove invalid variables. Invalid variables are variables that are not contained in the set variable list.

  5. Preview: On button click, shows the selector and name of the ToolGroupItem that would be selected based on the current values of the GInOutVariables. In the picture the value of the variable ‘InTypeName’=’VGS2’. Therefore the selector with the name ‘VGS2’ is also effective and the ToolGroupItem ‘02_CheckPart’ is selected. If no matching selector is found, the field red appears with an error message.

  6. + -: Add/remove an entry in the List of VPP selectors (9).

  7. Refresh: Update list of VPP selectors.

  8. Select by condition: Specifies whether the decision to select a selector is based on a logical condition:

    • Off: The ToolGroupItem is selected based on the selector names. The text values of the individual variables are seamlessly appended to each other. If the text value of the variable corresponds to the name of the selector, the corresponding ToolGroupItem is selected.

    • On: The ToolGroupItem is selected based on the Condition of the selectors. The numeric values of the variables are inserted into the condition equation equation. The list of equations, or conditions, is processed from top to bottom. If the result of a condition is True (not equal to ‘0.0’), the corresponding ToolGroupItem is selected.

  9. List of VPP Selectors:

  • Selector: Unique name of the selector.

  • Condition: Logical equation for the selection condition. It must be specified exactly if Select by condition is active. It may contain the names of the selected variables, decimal numbers, comparison operators, parentheses and logical operators.

  • Value: Name of the ToolGroupItem that is selected when the selector matches.

Example for Select by condition:

../../_images/job-editor-select-tgitem-by-selector-cond.png

If Select by condition (1) is selected, the values of the variables (2) are inserted into the equations (3). If the result of the equation is not 0.0, the corresponding ToolGroupItem is selected. In the following example, the value of the variable ‘InType’=’27’:

  • TEST : (27 > 0 ) AND (27 < 10) : NO

  • VGS1 : (27 >= 10 ) AND (27 < 20) : NO

  • VGS2 : (27 >= 20 ) AND (27 < 30) : YES

  • VGS3 : (27 >= 30 ) AND (27 < 40) : NO

Since selector3 has the first condition met, it becomes active and the ToolgroupItem is set accordingly.

Hint

Multiple overlapping selector conditions should be avoided, but are allowed. For image source selection, the first matching selector in the list is used.

Image sources

Each job has its own Image Source Lists which can be edited here. The list can be used instead of individual lists in the ToolgroupItems or image sources can be defined as reference targets for Reference image sources.

../../_images/job-editor-image-sources.png

The interface shows the default editor for Image Source Lists.

UI designer

Here a custom interface can be configured for each toolgroup item via UI-Designer. The BV-settings show this interface to the currently selected toolgroup item.

Global parameters

Global parameters are used if default values of a BV type are required in several ToolGroup items. The default values then only have to be adjusted in one place. Before executing a BV job, the output terminals of GlobalVisionParams tool blocks are set to the values of the global parameters. The names of the terminals correspond to the names of the global parameters.

../../_images/job-editor-global-params.png

Global parameters in the job editor

After selecting the ToolGroup item (1), new global parameters are created, existing ones are linked or links are removed (2). When the first parameter is created, a GlobalVisionParams toolblock is automatically inserted at the beginning of the ToolGroup.

Then a new or existing parameter can be assigned to a terminal:

../../_images/job-editor-global-params-add-parameter.png

The name of the terminal corresponds to the name of the parameter. The terminal is created again if required.

With All Globals -> Terminals (5) all available global parameters can be created and linked at once. The Terminals -> All Globals button, on the other hand, is helpful if a ToolBlock is subsequently renamed to a GlobalVisionParams ToolBlock, since all compatible output terminals defined in the ToolBlock are then adopted as global parameters.

The button Globals (6) opens the dialog for setting all global parameters. This includes parameters that are not used in the selected ToolGroup item.

The global parameters can also be divided into categories. The parameters of each category are displayed in a separate tab (7). The associated GlobalVisionParams tool blocks are appended with the name of the category after an underscore (e.g. “GlobalVisionParams_WMX”). To create multiple GlobalVisionParams tool blocks of the same category on the same level, a suffix must be added to the name before the category (e.g. suffix=”2” category=”WMX” => “GlobalVisionParams2_WMX”).

With ‘Toolblock Name | +TB | -TB(8) renames, adds or removes a GlobalVisionParams toolblock. If ‘Show usage(9) is selected, the path to the toolblock terminal (“Terminal Path”) is also displayed in the parameter list.

Existing parameters can be copied from one category to another via ‘Copy/Paste(3) from one category to another.

Via the button ‘Refresh(4) all Global Parameter Toolblock terminals of the ToolGroup item are re-read and the List (7) is updated.

Note

Currently only parameters of type double, int, bool and string are supported.

BV parameters

../../_images/job-editor-parameters.png

Parameters in the Job Editor

The BV Parameter list contains all output terminals of InputBlock-Toolblocks of the ToolGroup item (1) selected on the left. The parameter value can be changed in the Value column (2). The mapping editor (4) can be used to customize the display name in the Name column and the description in (3).

The BV parameters are also adjustable via the BV Settings (Operator view). They can also be used in the UI Designer.

Mappings

../../_images/job-editor-parameter-mappings.png

Mapping Editor

For BV parameters (1) and analysis values (2), the display name and description can be adjusted in the mapping editor. For numeric BV parameters, it is also possible to specify a min and max value.

Note

The Min and Max values are only used when entering via the BV parameters, but not when the value is changed directly in the ToolBlock.

Analysis (limit value test)

All checks in the job are summarized in the Analysis tab. Double-clicking on an entry opens a dialog in which the limits can be changed or deactivated.

../../_images/stats02-dataanalysis.png

Shortcuts

See also

Settings

This tab contains various settings of the job.

../../_images/job-editor-settings.png
  • Main:

    • GetImgsParallel: Specifies whether parallel (True) or sequential (False) imageacquisition should occur for multiple image sources.

    • LightOffAfterJob: If True, the last light situation after imageacquisition will be disabled again. Can be disabled to optimize runtime, but then the global settings should be used to ensure that the lighting is turned off when not used for a long time.

    • TimeoutLockLight: Maximum waiting time for accessing the lighting channels during imageacquisition.

    • TimeoutWaitForImages: Maximum time within which the imageacquisition must be completed.

    • TimeoutWaitForJobFree: Maximum waiting time for the start of a execution, within which the job must be released. For example, if the job was started both via the interface and via an external trigger.

    • UnlockLightSituationOnExposureEnd: Specifies whether to unlock the light situation on image-acquisition as soon as the cameras ExposureEnd signal is received (Yes), or only after the image has been successfully transferred (No). If Default, the value from the global-settings is used. Only works if LightOFfAfterJob is set to True.

  • OperatorView:

  • SaveImages:

    • RunErrorIfSaveImageFails: Specifies whether an error when saving the input images should result in an incorrect evaluation.

    • UseGlobalSaveImgFlags: The other parameters only take effect if false is entered here. - ImageCompression: Compression level when saving images, if a compressible image format was selected. - ImageFormat: Storage format for input images. - ImagePath: Base path for input images. - SaveImageFlags: Selection of ratings for which images should be saved. - StoreDataOptions: Configuration of save options for extension image sources, e.g. from the halcon plugin.

Documentation

The online documentation of the job and all ToolGroup items is displayed here. Under Edit the documentation of the job can be adjusted.

../../_images/job-editor-doc.png

The structure of the documentation sections follows the structure of the job: The main heading with the job name is followed by a section with the Job Documentation. After this, the individual Toolgroup Item documentations are attached as subsections.

The job documentation is created in the Edit tab of the Job Editor. Text formatting is done using Markdown syntax. An overview of this can be found in the Edit->Markdown Cheatsheet tab.