Versions Compared

Key

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


...

Expand
titleElecsys Product and Support Information
Include Page
RediGate Title Page Boilerplate
RediGate Title Page Boilerplate

Table of Contents

Table of Contents
excludeTable of Contents

...

About the ACE Configuration Management Utility

The ACE Configuration Management Utility is a tool for managing XML configurations for the Director or RediGate products that are created in the Elecsys ACE Editor software.

...

This example queries for an object of a certain "Enabled=Yes" attribute and gets its grandchildren that have a certain "Name" attribute.

Column Header: ModChans[0]

This lists them all in one column. Use [##] for a set number, or omit [0] for only the first Master Channel.

Select Query: //Node[ @Enabled='Yes' && Node/Node[ (@Type='FieldUnitModbus32' || @Type='FieldUnitABDF1MFieldUnitModbusTCP32')] ] /@Name

Select all enabled nodes whose grandchild has a Modbus FieldUnit type, and list the parent node's name(s).

...

Mod Type, Source Data/File, Source Query: (blank)

Modify Results (single column): {Omni Channel 01}{PLC Channel 05}

Output is in braces {} because the Column Header ends with [0] and more than one node was queried.

2. Disable all but the first two Modbus or Allen Bradley Field Units under channel 1

This can be done with two Modify queries

...

the first disables all

...

units, and the second enables the first two.

Column Header: DisableAll[0]

Select Query: //Node[ Properties/Instance = 1] /Node/Node[ (@Type='FieldUnitModbus32' || @Type='FieldUnitModbusTCP32' || @Type='FieldUnitABDF1M')] /@Enabled

This query gets the Enabled property of all Modbus grandchild nodes under Master Channel with Instance=1.

Mod Type: Modify

Source Data/File: No

All ACE objects have an "Enabled" attribute that is either "Yes" or "No".

Modify Results (one column): modified 5x

This tells the number of source nodes that were modified.

(Note, Excel's XPath support doesn't seem to include "position()", which would make this simpler. This could also be done using a Select Query including instance numbers > 2, if the object instance numbers correspond to the correct objects to disable.)

Column Header: Enable[2]

Select Query: //Node[ Properties/Instance = 1] /Node/Node[ (@Type='FieldUnitModbus32' || @Type='FieldUnitModbusTCP32' || @Type='FieldUnitABDF1M')] /@Enabled

Mod Type: Modify

Source Data/File: Yes

Modify Results (two columns): Enable(1), Enable(2). Both say "modified 1x"

In this case, each of the two Select Query nodes requested in the query are given their own column of result data.

3. Add Automated Processing section under Clients, using a dedicated XML text file.

This example will add the entire contents of a file, which has been copied out of an existing configuration and includes only the Automated Processing section of XML text.

Column Header: ADD_AutoProc

Select Query: //Node[@Type='Clients']

Select the Networks parent where Automated Processing will be added.

Mod Type: AddFromFile

Source Data/File: autoProcSource.XML

autoProcSource.XML contains the entire XML of the Automated Processing node, with all its child objects needed in a configuration.

Source Query: (blank)

Modify Results (one column): added 1x

Note that in this example, we could obtain the source data from an existing configuration using a Source Query, such as:

Source Data/File: GoldenACEConfiguration.XML

GoldenACEConfiguration.XML contains a fully configured Automated Processing, to be copied into one or more other configurations.

Source Query: //Node [@Type="Automated_Processing"]

4. Remove existing table rows in the Automated Processing table that was imported.

This clears the table and allows it to be set up specifically for the ACE objects configured in each configuration

...

.

Column Header: REM_Omni[0]

Select Query: //Node[ @Type='Omni-Modbus-Archives'] /Fields//TR

This removes all TR grandchildren (table rows) of the Omni-Modbus-Archives table, because the Column Header uses [0].

Mod Type: Remove

Source Data/File and Source Query: (blank in this example)

...

Modify Results: removed 4x

5. Count number of Modbus Field Units in the current configuration.

(For purpose of this example, these are assumed to be Omni flow computers.)

...

This example illustrates the use of the SaveToVAR action. The saved value will be used in the next two examples.

Column Header: VAR00 (#Mod)

Select Query: //Node[ @Enabled='Yes' && (@Type='FieldUnitModbus32' || @Type='FieldUnitModbusTCP32') ] ~~~ ..[@Enabled='Yes'] /..[@Enabled='Yes'] /count()

This selects nodes of Modbus type that are enabled, which have both a parent Circuit and Master Channel that are also enabled. Note the use of the two XPath queries chained with "~~~", and the ".." indicates backing up to the parent of the node(s) selected in the first query. The "count()" at the end yields the number of such nodes with the above characteristics.

Mod Type: SaveToVAR

Source Data/File: 0

This setting will store the count of nodes into variable ${VAR00}.

Modify Results: The results page will display the value that was stored in the variable, such as "2".

6. Add two table rows to a table for every Modbus Field Unit.

This example uses a separate file containing a <TR> section with all its <TD> child rows rows which are the new Poll Table entries.

Column Header: ADD_OmniTimeSync

Select Query: //Node[ @Type='Time-Syncs'] /Fields/Field[@Name='Data Process Table']/TABLE

Select the intended object type, then select the <TABLE> grandchild which is the *parent* where new XML will be inserted.

Mod Type: AddFromFile[${VAR0}]

In the previous example, we used a SaveToVAR action to count the number of Modbus field units. Now we are using the phrase "${VAR0}" to substitute in the Mod Type for the number of iterations that we wish to insert the file contents. The Mod Type is translated to (for instance) "AddFromFile[5]" before being acted upon.

Source Data/File: TimeSyncTable-ModbusRow.XML

Source Query: blank

(But note that we could have pointed to an XML configuration file with the <TR> table rows we needed, and used a Source Query to request those rows as the items to be inserted.)

Modify Results: added 2x

7. Modify channel number in table based on Master Channel of every Modbus Field Unit.

This example queries all the Modbus units (assumed for this example to be Omni flow computers), gets the Master Channel number, and modifies the first column of the table rows inserted in the previous example.

Column Header: OmniTSChan[0]

Select Query: //Node[ @Type='Omni-Modbus-Archives'] /Fields/Field[@Name='Data Process Table'] /TABLE/TR [TD[4] = '8'] /TD[0]

This selects the first <TD> column in the table (Channel number), where the 5th <TD> column is a value of "8" (Omni Batch).

...

(Note, this query only modifies half of the newly inserted rows in the table in this example. Another query would be needed to modify the rows where the 5th column is "9", Omni Hourly.)

Mod Type: ModifyFromFile

Source Data/File: self

This option queries this configuration for data to use for modification.

Source Query: //Node[ @Enabled='Yes' && Node[ @Enabled='Yes'] && Node/Node[ @Enabled='Yes' && (@Type='FieldUnitModbus32' || @Type='FieldUnitModbusTCP32')] ] /Properties/Instance/text()

This query selects an enabled channel, enabled circuit, enabled Modbus unit, and gets the Instance number (Master Channel number).

Modify Results: modified 2x

Note that the Select Query selects two rows in the table to be modified, and the Source Query selects potentially all of the Master Channel numbers, if they are different

...

if there had been more than one Channel, then the nodes would have been modified one for one. In reality, however, in this example all the Modbus field units are under the same channel, so the query actually on returns one node: the Master Channel <Instance> that is the parent of all the Modbus units. Therefore, the Modify query has a single node that is the source, so ALL of the Select Query nodes are modified, no matter how many (one to many).

...

Using TestXPath Sheet

The TestXPath sheet can be used for testing XPath query definitions (either Select Query, or any document used in a Source Query).

The first seven columns in this sheet are the same as in the Modify (or Query) sheets, except the second column is a filename of an XML document (full path, or relative to the Configuration Path).

Enter data for Column Header, Mod Type, Source Data/File, and/or Source Query, and click the "> Test XPATH <" button. The basic rules for these columns are followed, as described in the section "Modify Sheet". The main differences are:1)

  1. When clicking the "> Test XPATH <" button, the query and action are performed ONLY on the same row as the currently-selected cell.

...

  1. The Number of Child Nodes column (H) gives the count of nodes requested by the Select Query, regardless of whether the query ends with "/count()".

...

  1. The Select Query XML column (I) contains all queried nodes, separated by braces {}, as if the Column Header ended with [0].

...

  1. The Modify Results column (J) contains the results of any Modify action, separated by braces {}, as they would appear in multiple columns of the Modify Results sheet.