Skip to end of metadata
Go to start of metadata

Click here for troubleshooting tips.

The Opto 22 groov EPIC and 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 groov EPIC and SNAP PAC Driver Module Configuration.

Basic Steps

  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 groov EPIC and 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

  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 elements of a table, enter a Table Length of 16 or more. 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

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

Populate the stPublicListOfStrategyTags table

  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

EXAMPLE
/*
NOTES:
- All tags are readable. Use the .rw attribute to write to a tag. 
- Important! Initialize the element at Index 0 LAST. This indicates
  to the driver that all elements in stPublicListOfStrategyTags 
  have been initialized.
- If the tag begins with a ' or a /, the tag is ignored.
*/
stPublicListOfStrategyTags[0] = "";
stPublicListOfStrategyTags[1] = "f32.MyFloat.rw";
stPublicListOfStrategyTags[2] = "i32.MyInt32.rw";
stPublicListOfStrategyTags[3] = "i64.MyInt64.rw";
stPublicListOfStrategyTags[4] = "s.MyString.rw";
/* Use "t" for up and down timers. Timers are read-only.*/
stPublicListOfStrategyTags[5] = "t.MyUpOrDownTimer";
stPublicListOfStrategyTags[6] = "i32b.MyInt32UsedAsBoolean.rw";
/* For tables, enter the element's index or an index range in brackets. 
For example, "i32t.MyInt32Table[0].rw" or "i32t.MyInt32Table[0-0].rw" */
stPublicListOfStrategyTags[7] = "i32t.MyInt32Table[0-9].rw";
stPublicListOfStrategyTags[8] = "i64t.MyInt64Table[0-20].rw";
stPublicListOfStrategyTags[9] = "f32t.MyFloatTable[10-19].rw";
stPublicListOfStrategyTags[10] = "st.MyStringTable[0-9].rw";
stPublicListOfStrategyTags[11] = "dio.MyDiscretePoint";
stPublicListOfStrategyTags[12] = "aio.MyAnalogPoint.rw";
/* Use single-element table tags (i32te, i64te, f32te, stte) only with a
single index. For a range, use table element tags (i32t, i64t, f32t, st). */
stPublicListOfStrategyTags[13] = "i32te.MyInt32TableElement[5].rw";
stPublicListOfStrategyTags[14] = "i32tebp.MyInt32TableElementBitPick[9].2.rw";
stPublicListOfStrategyTags[15] = "i64tebp.MyInt64TableElementBitPick[5].8.rw";
stPublicListOfStrategyTags[16] = "i32bp.MyInt32BitPick.1.rw";
// Remember, initialize index 0 last!
stPublicListOfStrategyTags[0] = "dio.MyDiscretePointWrite.rw";


In the OptoScript block, you:

  • 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

stPublicListOfStrategyTags[<index number>] = "<modified tag name>";
EXAMPLE
stPublicListOfStrategyTags[1] = "s.MyStringVariable";

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

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

  • Data type code
  • PAC Control tag name
  • Index number (Table elements only)
  • Bit location (Bit-picks only; 0 is the first bit)
  • Writeable attribute (Writeable tags only)

Notes

  • Strong-typed OPC tables are not supported.
  • Tag names are case-sensitive.
  • To comment out a tag (for example, to disable a tag without having to modify the entire string table), prepend a / (slash) or ' (single straight quote mark) to the OptoScript tag name. Then, restart the Driver module in Ignition Gateway.
    EXAMPLES
    stPublicListOfStrategyTags[3] = "/i32.MyIntVariable.rw";
    stPublicListOfStrategyTags[4] = " 's.MyStringVariable";

Naming standard:  <OptoScript data type code>.<PAC Control tag name>[<index number or range>].<bit location>.< writeable attribute>

Examples:

Data type description

Ignition data type

Data type code

Example tag name for OptoScript block

Example tag name for OptoScript block (writeable tag)

Notes

32-bit integer

Int4

i32

i32.MyIntVariable

i32.MyIntVariable.rw

 

64-bit integer

Int8

i64

i64.MyLongVariable

i64.MyLongVariable.rw

 

32-bit float

Float4

f32

f32.MyFloatVariable

f32.MyFloatVariable.rw

 

32-bit integer as a SCADA Boolean

Boolean

i32b

i32b.MyIntVariable

i32b.MyIntVariable.rw

 

String

String

s

s.MyStringVariable

s.MyStringVariable.rw

PAC Controllers support only 7-bit ASCII

Up or Down timer

Float4

t

t.MyUpOrDownTimer

Not applicable

Timers are only read-only

32-bit integer table element as a SCADA int4

Int4

i32te

i32te.My32BitIntegerTable[3]

i32te.My32BitIntegerTable[3].rw

 Used only with a single index. Synonymous with i32t.

32-bit integer table

See i32te.

i32t

i32t.My32BitIntegerTable[0-9]

i32t.My32BitIntegerTable[0-9].rw

To get individual table elements, use the stPublicListOfStrategyTags table to scan for specific tags.

i32tMyInteger[11-9] (backward index range)
i32MyInteger[3-3] (same index)"

64-bit integer table element as a SCADA int8

Int8

i64te

i64te.My64BitIntegerTable[302]

i64te.My64BitIntegerTable[302].rw

 Used only with a single index. Synonymous with i64t.

64-bit integer table

See i64te.

i64t

i64t.My64BitIntegerTable[0-35]

i64t.My64BitIntegerTable[0-35].rw

To get individual table elements, use the stPublicListOfStrategyTags table to scan for specific tags.

32-bit float table element as a SCADA float4

Float4

f32te

f32te.My32BitFloatTable[11]

f32te.My32BitFloatTable[11].rw

 Used only with a single index. Synonymous with f32t.

32-bit float table

See f32te.

f32t

f32.MyFloatTable[0-20]

f32.MyFloatTable[0-20].rw

To get individual table elements, use the stPublicListOfStrategyTags table to scan for specific tags.

String table

See stte.

st

st.MyStringTable[0-32]

st.MyStringTable[0-32].rw

PAC Controllers support only 7-bit ASCII

To get individual table elements, use the stPublicListOfStrategyTags table to scan for specific tags.

String table element as a SCADA string

String

stte

stte.MyStringTable[6]

stte.MyStringTable[6].rw

PAC Controllers support only 7-bit ASCII. Used only with a single index. Synonymous with st.

Analog input or output state

Float4

aio

aio.MyAnalogPoint

aio.MyAnalogPoint.rw

 

Discrete input or output state

Boolean

dio

dio.MyDiscretePoint

dio.MyDiscretePoint.rw

 

Bit-pick of a 32-bit integer variable

Boolean

i32bp

i32bp.My32BitIntegerVariable.31

i32bp.My32BitIntegerVariable.31.rw

 

Bit-pick of a 64-bit integer variable

Boolean

i64bp

i64bp.MyLongVariable.0

i64bp.MyLongVariable.0.rw

 

Bit-pick of a 32-bit integer table element

Boolean

i32tebp

i32tebp.My32BitIntegerTable[3].2

i32tebp.My32BitIntegerTable[3].2.rw

 

Bit-pick of a 64-bit integer table element

Boolean

i64tebp

i64tebp.My64BitIntegerTable[302].6

i64tebp.My64BitIntegerTable[302].6.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. Go into Debug Mode.
  2. Save, download, and then run the strategy. 

Refresh Tag List and Browse Tag Values

  1. To refresh the tag list, go to the Ignition Gateway Configure tab and select System > Modules. In the Cirrus Link Solutions section, restart the Opto 22 groov EPIC and 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 the Ignition Gateway 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 RAMand restart the Driver module. (Otherwise, the stPublicListOfStrategyTags table will remain in the controller's memory, even if you delete it from the strategy.)

  1. In PAC Control Config mode, modify the stPublicListOfStrategyTags table (Configure > Variables > String Tables > Modify):
    1. Change the table's name.
    2. Change the table's Initialization setting from "Persistent" to "Initialize on strategy download."
  2. Start PAC Control Debug mode (Mode > Debug) and clear the controller's RAM (Control Engine > Clear RAM). WARNING: Clearing the controller's RAM will remove all persistent values in the controller's memory. If the strategy has other persistent variables, you may want to archive it (File > Archive Strategy) before continuing. At the prompts, click:
    1. "Yes" to continue.
    2. "OK" to acknowledge the number of bytes.
    3. "Yes" to download the strategy.
  3. Then, run the strategy (Debug > Run).
  4. In Ignition Gateway:
    1. Restart the Driver module (Configure tab > System > Modules).
    2. Use OPC Quick Client or Ignition Designer to view and get the tags.

For details, see OSP: Configuration.

Troubleshooting

TIP: If you can't find a tag, check the following:

For more information, see the Ignition Gateway’s Logs (Status tab > Diagnostics > Logs).

If your device's status doesn't change to "Connected" after you've restarted it in Ignition Gateway (Configure tab > System > Modules), make sure:

  • Element 0 in the stPublicListOfStrategyTags table is not blank (or empty).
  • The network configuration of both the OPC-UA device and the Opto 22 device are valid.
  • The Opto 22 device is powered up, connected to the network, and the host task is assigned to TCP/IP port 22001.
  • Your Windows PC is connected to the network and operating normally.
  • No labels