Anchor |
---|
| usingthedriver |
---|
| usingthedriver |
---|
|
Click here for Using the Opto 22 SNAP PAC Driver Module troubleshooting tips.
The Opto 22 SNAP PAC Driver module can scan specific tags. This method offers the best performance but requires setup in PAC Control.
To scan all tags, see Opto 22 SNAP PAC Driver Module Configuration.
- In the PAC Control strategy:
- Create the stPublicListOfStrategyTags table.
- Immediately after Block 0 in the Powerup chart, add an OptoScript block.
- In the OptoScript block, populate the table according to the OptoScript Syntax and tag naming standard.
- Save, download, and run the strategy.
- In Ignition:
- Restart the SNAP PAC Driver to refresh the tag list.
- Browse the Opto 22 tags and use them in your project.
For help using PAC Control, see the PAC Control User's Guide (available from the Opto 22 website).
Anchor |
---|
| createtagstable |
---|
| createtagstable |
---|
|
- In PAC Control, open your strategy in Configure mode.
![](/download/attachments/4588393/Image7.jpg?version=1&modificationDate=1507567375000&api=v2)
In the Strategy tree window, right-click the String Tables folder, and then click Add. The Add Variable dialog box opens. Complete the fields.
![](/download/attachments/4588393/Image8.jpg?version=1&modificationDate=1507567524000&api=v2)
Name: Enter the table name: stPublicListOfStrategyTags. The name is case-sensitive.
Description: Optional.
Type: Leave the default (String Table).
Initialization: Select Persistent
Initial Value: Leave the default (blank).
Table Length: Enter a number equal to or greater than the number of tags to import. For example, to import 10 floats and 6 tables, enter a Table Length of 16 or more. (A table variable counts as one tag, despite the number of elements it has.) Note: Ignition Edge has a limit of 500 tags. Ignition Enterprise does not limit the number of tags you can use
String Width: Enter a value of 100.
- Click OK to close the dialog box and save your changes.
Anchor |
---|
| optoscriptblock |
---|
| optoscriptblock |
---|
|
- Open the Powerup chart.
![](/download/attachments/4588393/Image9.jpg?version=1&modificationDate=1507567833000&api=v2)
- Immediately after Block 0, connect an OptoScript block to the flow.
![](/download/attachments/4588393/Image10.jpg?version=1&modificationDate=1507567856000&api=v2)
Anchor |
---|
| populatetagstable |
---|
| populatetagstable |
---|
|
- Double-click the OptoScript block to open it.
![](/download/attachments/4588393/Image11.jpg?version=1&modificationDate=1507567932000&api=v2)
For each tag to be scanned, create a string element following the OptoScript Syntax and tag naming standard.
IMPORTANT: Index number 0 (zero) must be the last item initialized in the OptoScript block
...
- Reference each tag as a string element of the stPublicListOfStrategyTags table (see OptoScript Syntax).
- Modify each PAC Control tag name according to pre-defined naming standards so the scanner can identify the tag (see Naming Standard).
OptoScript Syntax
Anchor |
---|
| optoscriptsyntax |
---|
| optoscriptsyntax |
---|
|
stPublicListOfStrategyTags[<index number>] = "<modified tag name>";
...
To construct the tag name, see Naming Standard.
- Index number 0 (zero) must be the last item initialized in the OptoScript block.
- Index numbers must be unique.
- Syntax is case-sensitive.
Anchor |
---|
| namingstandard |
---|
| namingstandard |
---|
|
In the OptoScript block, you reference PAC Control tags using a pre-defined naming standard that consists of the tag's:
...
- Click Save to close the OptoScript block and save the changes.
![](/download/attachments/4588393/Image12.jpg?version=1&modificationDate=1507569349000&api=v2)
- Go into Debug Mode.
- Save, download, and then run the strategy.
![](/download/attachments/4588393/Image13.jpg?version=1&modificationDate=1507569422000&api=v2)
- To refresh the tag list, go to Ignition's Configure tab, and select System > Modules. In the Cirrus Link Solutions section, restart the Opto 22 SNAP PAC Driver module. When prompted, click Confirm.
Note: The tag names displayed in Ignition will be different but easily recognizable. - To browse tag values:
From Ignition's Configure tab: Select OPC Connections > Quick Client, and then expand the folders to find the tags from the Opto 22 device's tags.
From Ignition Designer's Design Mode: In the menu bar, click View > Panels, and then select OPC Browser. In the OPC Browser panel, expand the folders to find the Opto 22 device's tags.
![](/download/attachments/4588393/Image15.jpg?version=1&modificationDate=1507569624000&api=v2)
Anchor |
---|
| troubleshooting |
---|
| troubleshooting |
---|
|
TIP: If you can't find a tag, check the following:
* The strategy is running in PAC Control.
* You correctly entered the tag name in the stPublicListOfStrategyTags table.
* After making changes to the table, you restarted the Driver module in Ignition and waited for its status to change to Connected.
For more information, see the Ignition Gateway’s Logs (Status tab > Diagnostics > Logs).