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.
- Launch In-Sight Explorer.
- 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.
- Load a new job file.
- Select cell A2.
- On the Insert Menu, click Function.
- Scroll down the list and select the Event function. Click OK.
- For the Trigger parameter, select Soft 5. Click OK.
- Select cell A4.
- On the Insert Menu, click Function.
- Scroll down the list and select the Count function. Click OK.
- On the Count property sheet, click Insert > Absolute Reference.
- Double-click cell A2.
- Click OK to close the property sheet.
- Right-click cell A4 and choose Insert Symbolic Tag.
- In the Symbolic Tag Editor dialog:
- Change the Tag Name to Counter.
- Select the Use OPC checkbox.
- Click OK.
- 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.
- Switch over to the In-Sight OPC Classic Server. Open the Configuration Editor and select your sensor/emulator from the Available Sensors pane.
- In the Available Tags pane, select both the Counter and TriggerEvent tags.
- On the Menu Bar, click Available Tags > Add Selected.
- Click File > Save and Exit.
- From the Server Runtime dialog, start the OPC Classic Server by clicking Server > Run on the Menu Bar.
- From your OPC client, bring the Counter and TriggerEvent tags into view.
- 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.