Versions Compared

Key

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

...

To scan all tags, see Opto 22 SNAP PAC Driver Module Configuration.

...


Basic Steps

  1. In the PAC Control 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).

Instructions

Create the stPublicListOfStrategyTags table
Anchor
createtagstable
createtagstable

...

Code Block
titleEXAMPLE
/*
If the tag begins with ana ' or a /, the tag is ignored.
Important! Initialize the first table element (at Index 0) last (because 
a blank string in Index 0 tells the driver that the
string table has not yet been initialized).
*/
stPublicListOfStrategyTags[0] = "";
stPublicListOfStrategyTags[1] = "f32.MyFloat.rw";
stPublicListOfStrategyTags[2] = "i64.MyInt64.rw";
stPublicListOfStrategyTags[3] = "s.MyString.rw";
stPublicListOfStrategyTags[4] = "t.MyTimer.rw";
stPublicListOfStrategyTags[5] = "i32b.MyBool.rw";
stPublicListOfStrategyTags[6] = "i32t.MyInt32Table[0-9].rw";
stPublicListOfStrategyTags[7] = "i64t. MyInt64Table [0-20].rw";
stPublicListOfStrategyTags[8] = "f32t.MyFloatTable[10-19].rw";
stPublicListOfStrategyTags[9] = "st. MyStringTable [0-9].rw";
stPublicListOfStrategyTags[10] = "dio.MyDiscreetPoint";
stPublicListOfStrategyTags[11] = "aio. MyAnalogPoint.rw";
stPublicListOfStrategyTags[12] = "i32te.MyInt32TableElement[5].rw";
stPublicListOfStrategyTags[13] = "i32tebp.MyInt32TableElementBitPick [9].2.rw";
stPublicListOfStrategyTags[14] = "i64tebp. MyInt64TableElementBitPick [5].8.rw";
stPublicListOfStrategyTags[16] = "i32bp.MyInt32BitPick.1.rw";
// Remember, initialize index 0 last!
stPublicListOfStrategyTags[0] = "i32.Int32.rw";

...

3. Click Save to close the OptoScript block and save the changes.

  • To add more tags or change the set of tags to scan, simply edit the elements in the OptoScript block.
  • To stop scanning a tag, comment out the element by preceding the element with a ' or a /.
    For example, the scanner will ignore these two tags:
    • 'stPublicListOfStrategyTags[1] = "f32.MyFloat.rw";
    • /stPublicListOfStrategyTags[2] = "i64.MyInt64.rw";

Save, download, and run the strategy

...

  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.

To get all tags

To stop scanning for specific tags and start scanning all tags, you must clear the controller's RAM, and then download and start the strategy.

Note that deleting the stPublicListOfStrategyTags table or changing its name will not remove the table from the controller, because persistent tables stay in the controller's RAM (even if they don't appear in the strategy).

To clear the controller's RAM and restart the strategy:

  1. In PAC Control, make sure the strategy is running in Debug mode.
  2. In the PAC Control menu bar, click Control Engine > Clear RAM.
  3. At the prompts, click:
    1. Yes (to continue).
    2. Yes (to acknowledge the number of bytes).
    3. Yes (to download the strategy).
  4. Then, click Run Strategy.
  5. Finally, use OPC Quick Client or Ignition Designer to get all tags. For details, see OSP: Configuration

Troubleshooting
Anchor
troubleshooting
troubleshooting

...