Smart Filter
Last updated
Was this helpful?
Last updated
Was this helpful?
One challenge when comparing backups of a certain Project is managing project items whose values change for in every backup or that aren't necessary to track changes for across backups.
For example, tag values such as timer accumulators and counters may change every backup, but these changes aren't significant enough to warrant a backup being counted as Modified. The Ignore Tag Value Changes toggle in the backup View Options allows for you to hide all tags that only have value changes, but is only applied in the backup viewer after the backup has completed.
With Copia's Smart Filter feature, you can apply various rules to your project to refine your backups to only keep track of changes that are relevant to you. Currently this feature is limited to Rockwell projects only.
Rockwell RSLogix 500 Smart Filter continues to build off of the current implementation of Rockwell Studio 5000 Smart Filter. Some key features to highlight are:
The configuration file will be set up at .copia/smart-filter.yaml
in the Project repository
Due to the structure of RSLogix 500 Library Files, a new inclusion/exclusion query approach is necessary. Some key notes on query logic:
When inclusion and exclusion rules conflict, the more specific rule (as defined below) will be implemented
If an inclusion and exclusion rule are of the same specificity level, then the exclusion rule takes precedence
The Smart Filter configuration file is located at .copia/smart-filter.yaml
in your Source Control repository. To access the configuration file for a specific project, you can click Manage Smart Filter in the popup menu. Please note this is currently only available for Rockwell projects:
Before enabling the Smart Filter, you'll first need to declare your configurations. Choose the Add Config to Enable Smart Filter link.
This will take you either to the existing Smart Filter configuration file for this project or prompt you to create a new one depending on if there's already a configuration in the repo associated with your project.
The Smart Filter configuration file is a YAML file that applies a set of rules to the entire repo. It must live in the default branch of your repo (this is usually master or main). An example configuration file is as follows:
In the above example, the three rules are applied as follows:
/DATA/C*:*.ACC
is the most specific rule. All accumulators on counters will be excluded from change detection
/DATA/C
is the next most specific rule. All changes on counters will be included except for accumulators
/DATA/N7:2-4
is of a similar specificity. All changes to N7:2, N7:3 and N7:4 will be included in change detection
/DATA
is the least specific rule. All tag data values other than those included by the counter logic will be excluded
For each project, there is a type
field which specifies what kind of project this configuration will be applied to. Currently, only acd
and rss
for Rockwell projects are supported.
The query syntax for RSLogix 500 Smart Filter is different from that of Studio 5000's Smart Filter due to differences in their file structure. This section contains the query language definition and will provide you with the information needed to include and/or ignore other parts of your project file that aren't in the default Smart Filter configuration file.
Data Files are the primary focus of the RSLogix 500 Smart Filter. Here are some key details relating to including/excluding Data Files in Smart Filter:
Copia allows word or element level filter for all data (structure and integer) files (including inputs and outputs)
Copia does not currently enable bit level filtering for structure or integer files
Some tag values (as opposed to references) may be found in Ladder and Debug routines. These tag values will be excluded based on the corresponding DATA exclusions
Wildcards (*
) may only be used as specified below
Ranges are allowed in place of element or word numbers (i.e. N7:2-4
)
0
DATA
DATA
DATA
DATA
1
DATA/I
DATA/S
DATA/N
DATA/C
2
DATA/I:3
DATA/S:3
DATA/S:3-5
DATA/N7
DATA/C5
3
DATA/I:*.1
DATA/N*:2
DATA/N*:2-4
DATA/C*:2
4
DATA/I:3.1, DATA/I:3.1-4
DATA/N7:2
DATA/C5:2
DATA/C5:2-6
5
DATA/C*:*.ACC
6
DATA/C5:*.ACC
7
DATA/C*:2.ACC
8
DATA/C5:2.ACC
0
FUNCTION
1
FUNCTION/<Function File Key>
BHI
CS
DAT
EII
ES
HSC
IOS
LCD
MMI
PTO
PTOX
PWM
PWMX
RTC
STI
TPI
0
LADDER
0
DEBUG
1
LADDER/<Routine Number>
1
DEBUG/<Routine Number>
I/O Configuration
IO_CONFIG
Controller Properties
PROPERTIES
Force Files
FORCE
Data Logging
LOGGING
Standard rules apply
The version
field specifies which version of the Smart Filter config you are using (currently, it should always be version: 1
).
The projects
field is a map of file globs—expressed relative to the repository root—to a set of Smart Filter rules. You can refer to for a detailed understanding of glob syntax. If the glob matches the path to your project in the repository, the corresponding Smart Filter rules will be applied during a backup. In cases where multiple project globs correspond to your file, the project rule appearing last in the Smart Filter configuration file will take precedence.
Copia project globs also support recursive patterns using the `**` operator. For instance, the pattern my_directory/**/*.rss
will match any .rss file in my_directory
or any of its subdirectories. The pattern my_directory/*.rss
restricts the search to .rss files specifically within my_directory
itself.
Smart Filter for RSLogix 500 does not yet have the capability to filter changes from instruction Setup Screen configuration values, such as the MSG
instruction. Please if you have a request for an instruction type that you'd like to added to Smart Filter's ignore capabilities.
Copia’s understanding of data value references follows the Rockwell guides