Collapse
CollapsingX
  • - or -

Controlling when data is sent to the operator view


Changes made to the values, images, and annotations are only published to operator views at user-defined points called update points. Annotations of Display elements are cleared at user-defined points called clearing points. Cleared annotations will be removed from the operator view the next time the Display element is published.

Operator view elements are members of publishing groups, each of which has its own update points and clearing points. By default, each operator view has one publishing group that includes all of its operator view elements. This default publishing group has a single update point at Inspection End, and a single clearing point at Inspection Start.

Your project might have more than one operator view. Each operator view has its own operator view elements, publishing groups, update points, and clearing points. For more information, see the Multiple operator views subsection of this section.

If a Camera step times out and does not grab an image, the update points for publishing groups with Display elements that link to the Camera step's Image or CorrectedImage output will be skipped. You can ensure that other operator view elements (such as Value elements) are still published in the case of a timeout by putting them in a seperate publishing group from your Display elements.

Update points occur at an event, and optionally only if a condition is true (such as status.result=fail). There are 2 types of update points:

  • StartEvent and EndEvent update points, which publish immediately before or after a specified step, loop, or inspection has run.

  • A ChangedEvent update point, which publishes immediately after a specified variable is written to.

All configuration of publishing groups, update points, and clearing points is done in the Operator View Publishing Synchronization dialog, accessible from the Operator Views Synchronize publishing... menu item.

Maximum update rate

You can specify the Maximum update rate for each publishing group, which is the maximum number of times the publishing group will be published each second. This value is used to establish the minimum amount of time between updates. After the publishing group is published, your project will skip update points until an appropriate amount of time has elapsed. The default value is 20, and it can be set to any non-zero number between 0 and 40 (including decimals, such as 0.3).

When to change the defaults

In most cases, you will not need to change the default publishing settings. The following are some common scenarios in which you might need to change these settings:

  • When you need to improve performance of your project by publishing some operator view elements infrequently.

    In this case, you can use the Maximum update rate to limit the frequency of publishing for a particular publishing group. For example, you can put operator view elements that do not need to be published for every inspection in a publishing group with a low maximum update rate (such as 0.5).

  • When you need to restrict publishing to a particular operator view element.

    In this case, you can use conditions to specify that an operator view element should only be updated under certain circumstances. For example, to show the last failed image in a Display element, put that Display element in a publishing group with an update point that has the condition Status.Result=Fail. This is done in the Label Checker example project, available from the Quick Start tab.

  • When you need to display the result of a step in an embedded (inner) loop before the end of the main (outer) loop.

    In this case, you can use additional update points to publish information from embedded loops before the end of the main loop. For example, if your project contains a loop that generates annotations but takes several seconds to execute each iteration, you can add an additional update point within the loop to display the new annotations.

  • When you need a message to appear in the operator view as soon as it is relevant, instead of waiting until the end of inspection (for example, a status or debug message).

    In this case, you can use the ChangedEvent of a variable as an update point to publish immediately when the variable is changed, regardless of your project's current position in the flowchart. For example, to display a warning as soon as a potential problem is detected, you can link a Value element to a string variable called CurrentWarning and put that Value element in a publishing group with an update point at CurrentWarning.ChangedEvent. You can then immediately add or remove a warning message from anywhere in your flowchart using a Store step that modifies the value of CurrentWarning.

Publishing groups

You manage publishing groups from the Operator View Publishing Synchronization dialog, accessible from the Operator Views Synchronize publishing... menu item. From this dialog, use the following procedure to create and configure a publishing group:

  1. Use the Operator view(s) dropdown list to select the operator view containing the elements that will be members of this publishing group.

  2. Create a new publishing group by clicking on the Add button in the Publishing group(s) section.

  3. Give the new publishing group a meaningful name by selecting it and clicking the Rename button.

  4. Add one or more operator view elements to the new publishing group by highlighting each element and specifying a publishing group using the Group dropdown list.

  5. Add update points and clearing points to the new publishing group.

    Note that new publishing groups always have the default update point and clearing point. You can only add clearing points to publishing groups which contain at least one Display element.

  6. Optionally, specify a Maximum update rate for the new publishing group. The publishing group will not publish more than this number of times per second. Note that frequently updating images can have a large impact on the overall speed of your project.

Managing update points

You can add, edit, and remove the update points of a publishing group using the Operator View Publishing Synchronization dialog, accessible from the Operator Views Synchronize publishing... menu item. From this dialog, use the following procedure to create and configure an update point:

  1. Select the operator view containing the publishing group that you want to modify from the Operator view(s) dropdown list.

  2. Select the publishing group that you want to modify from the Publishing group(s) section.

  3. Create a new update point by clicking on the Add button in the Update point(s) section.

  4. In the New Update Point dialog, choose the event upon which you want this update point to occur.

  5. Optionally, specify a condition. When the update point is reached, it will only be executed if this condition is met.

  6. Click on the Ok button.

Updating and clearing display annotations

The procedure for adding and configuring clearing points is the same as the procedure for adding and configuring update points, except that it is done using the Displays annotations clearing points section of the Operator View Publishing Synchronization dialog. You cannot specify conditions for clearing points.

While all elements in a publishing group are published at the same time, there are some special considerations for annotations on Display elements. Each Display element is linked to an image and has a set of annotations that are non-destructively drawn on top of the image. When a Display element is updated, both the image and annotations are sent to the operator view. However, old annotations are not removed from the Display element until after the next clearing point. Clearing of annotations will be reflected next time the Display element is published.

Annotations that are not cleared can consume a significant amount of memory, potentially causing your project to encounter out-of-memory errors. This is true even for Display elements that are not currently being shown. For this reason, you might need to create clearing points in addition to, or instead of, the default clearing point at Inspection End.

User-defined annotations are drawn less often than annotations that are generated automatically by steps. The following table describes when each type of annotation is drawn:

Step result annotation

Annotations are drawn after the step is executed.

User-defined annotation

Annotations are drawn at the first update point for the Display element.

Multiple operator views

By default, your project will save system resources by only publishing data to operator views currently being displayed. You can disable this feature for a publishing group by deselecting the Suspend publishing when page is not viewed check box.

Suspend publishing when page is not viewed is disabled by default for publishing groups in your main operator view.