Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
usingthedriver
usingthedriver

Click here for Using the Opto 22 SNAP PAC Driver Module tips.

...

...

  1. In the PAC Control strategy:
    1. Create the stPublicListOfStrategyTags table.
    2. Immediately after Block 0 in the Powerup chart, add an OptoScript block.
    3. In the OptoScript block, populate the table according to the OptoScript Syntax and tag naming standard
    4. Save, download, and run the strategy.
  2. In Ignition:
    1. Restart the SNAP PAC Driver to refresh the tag list. 
    2. 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).

Create the stPublicListOfStrategyTags table
Anchor
createtagstable
createtagstable

  1. In PAC Control, open your strategy in Configure mode.
  2. In the Strategy tree window, right-click the String Tables folder, and then click Add. The Add Variable dialog box opens. Complete the fields.

    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.

  3. Click OK to close the dialog box and save your changes.

Add an OptoScript block for the tag list
Anchor
optoscriptblock
optoscriptblock

  1. Open the Powerup chart.
  2. Immediately after Block 0, connect an OptoScript block to the flow.

Populate the stPublicListOfStrategyTags table
Anchor
populatetagstable
populatetagstable

  1. Double-click the OptoScript block to open it.
  2. 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.

Naming standard
Anchor
namingstandard
namingstandard

In the OptoScript block, you reference PAC Control tags using a pre-defined naming standard that consists of the tagís:

...

  1. Go into Debug Mode.
  2. Save, download, and then run the strategy. 

Refresh Tag List and Browse Tag Values
Anchor
refresh
refresh

  1. 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.
  2. 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.

...