TriggerEvent Example

TriggerEvent is a Sensor Tag that is predefined on all sensors and emulators. Writing an integer value of 0 through 7 to the TriggerEvent tag will fire the corresponding "Soft n" trigger event in the spreadsheet, where n is the integer value written to the tag. Writing a value of 8 to the TriggerEvent tag will fire a Manual Acquisition.

Using the TriggerEvent Tag

In this example, we will link the TriggerEvent tag to a Soft Trigger in the In-Sight spreadsheet to increment a counter.

  1. Launch In-Sight Explorer.
  2. Connect to an In-Sight vision system (3400, 5000 or Micro-series) that is running version 3.1.0 firmware or later. The In-Sight emulator will also work for the purposes of this example.
  3. Load a new job file.
  4. Select cell A2.
  5. On the Insert Menu, click Function.
  6. Scroll down the list and select the Event function. Click OK.
  7. For the Trigger parameter, select Soft 5. Click OK.
  8. Select cell A4.
  9. On the Insert Menu, click Function.
  10. Scroll down the list and select the Count function. Click OK.
  11. On the Count property sheet, click Insert > Absolute Reference.
  12. Double-click cell A2.
  13. Click OK to close the property sheet.
  14. Right-click cell A4 and choose Insert Symbolic Tag.
  15. In the Symbolic Tag Editor dialog:
    1. Change the Tag Name to Counter.
    2. Select the Use OPC checkbox.
    3. Click OK.
  16. On the Sensor Menu, click Online to place the sensor into Online mode. This step is required in order to successfully write the TriggerEvent tag.
  17. Switch over to the In-Sight OPC Classic Server. Open the Configuration Editor and select your sensor/emulator from the Available Sensors pane.
  18. In the Available Tags pane, select both the Counter and TriggerEvent tags.
  19. On the Menu Bar, click Available Tags > Add Selected.
  20. Click File > Save and Exit.
  21. From the Server Runtime dialog, start the OPC Classic Server by clicking Server > Run on the Menu Bar.
  22. From your OPC client, bring the Counter and TriggerEvent tags into view.
  23. Write a value of 5 to the TriggerEvent tag. Observe the Counter value increment as you repeatedly write a 5 into the TriggerEvent tag. Note that this 5 corresponds to the Soft 5 we assigned to the Trigger parameter of the Event function in the spreadsheet.

Related Topics

For more information on using In-Sight Explorer, refer to the In-Sight Explorer Help which is available by pressing F1 from within In-Sight Explorer.