•
|
digital_measurements
: standard SCADA runtime table for digital measurements. Persistent storage for digital measurement specific quality codes and/or manually entered values.
|
•
|
analog_measurements
: standard SCADA runtime table for analog_measurements. Persistent storage for analog measurement specific quality codes and/or manually entered values.
|
•
|
scada_measurements_st: SCADA configuration staging table.
|
Note: The scada_measurements_st staging table can be populated via the scadapop process or by a project specific population mechanism. This table can be truncated and repopulated at will while DDService is active (running). The
UpdateDDS -recacheMeasures command will send a message to DDService to merge updates from the scada_measurements_st staging table into the analog_measurements and/or digital_measurements runtime SCADA tables - preserving any existing quality codes and/or stored data values.
•
|
scada_ids
: RTAdapter/scadapop SCADA definition table - required for both.
|
•
|
scada_states
: RTAdapter string state to integer mapping - required.
|
•
|
scada_synonyms
: RTAdapter scada data attribute value mapping - required.
|
•
|
scada_analog_in: RTAdapter polling table can be used to queue incoming analog SCADA updates - optional.
|
Note: The RTAdapter process does not require any population into the scada_analog_in table. The use of scada_digital_in is entirely optional but is generally used in conjunction with scada_analog_in.
•
|
scada_digital_in: RTAdapter polling table can be used to queue incoming digital SCADA updates - optional.
|
Note: The RTAdapter process does not require any population into the scada_digital_in table. The use of scada_digital_in is entirely optional but is generally used in conjunction with scada_analog_in.
•
|
scada_points : optional scadapop staging table - to help populate scada_measurements_st.
|
Note: The RTAdapter process does not require any population into the scada_points table. The use of scada_points as a staging table is merely one solution for the ultimate problem of configuring the required SCADA measurements staging table (scada_measurements_st). The use of scadapop is entirely optional.
•
|
srs_rules: RTAdapter has the ability to convert one incoming analog measurement into "another."
|
Note: This is for optional functionality that was initially done to support NMS Fault Location Isolation and Restore (FLISR) functionality. In effect there is only one transform currently available and it transforms one analog measurement to another as long as the absolute value of the incoming measurement exceeds a rule defined threshold. This allows RTAdapter to - in effect - capture "pre-trip" analog measurements as post trip analog values generally tend to 0. The threshold is provided to allow for some noise level from field transducers reporting analog values. These rules are generally configured and documented in the Configuration Assistant and are not discussed in further detail here.
To configure the standard SCADA measurement staging table (scada_measurements_st) using scadapop, you might follow steps similar to the following:
Specify which devices have SCADA (via scada_points table and using the scadapop executable):
1.
The scada_points table can be populated via standard attribute population during model build construction/update or it can be populated after the model is built/updated by a custom (project specific) process.
2.
Populate
scada_points RDBMS table via model build device attribute configuration.
|
To set up the scada_points table as a standard Network Management System attribute table generally involves the following RDBMS tables:
|
•
|
device_attributes : generic model build attribute configuration.
|
•
|
scada_points : SCADA specific attribute table.
|
|
This option involves populating two attributes in the scada_points attribute table:
|
scada_name: the name of the SCADA, as defined in scada_ids.scada_name (for example, RTAdapter)
rtu_alias: SCADA unique identifier for reporting field device.
The rtu_alias must only be unique within a particular SCADA (scada_name).
|
Once the scada_points table is populated, the scadapop program can be used to expand the information in the scada_points attribute table to fully populate the more generic scada_measurements_st staging table (see notes below for how to use scadapop).
|
Note: a given field device corresponds to a given scada_points.rtu_alias and would typically be a breaker of some kind often reporting both digital status, for example, and multiple analog values. It could also be a transformer reporting analog values with or without status.
|
Below are two example device_attributes table SQL statements supporting population of the scada_points table via standard model build attribute population. For more information on this process, please consult the Network Management System Model Build process documentation. These are examples only.
|
|
INSERT INTO device_attributes (
|
|
143, 'Rtu_Id', 'scada_points', 'rtu_alias', 3, 32, 'N', 'Y');
|
|
INSERT INTO device_attributes
|
|
143, 'Rtu_Desc', 'scada_points', 'scada_name', 3, 32, 'N', 'Y');
|
Example device_attribute model attribute table - data field explanation:
143 Class of device which may report SCADA data - project specific
scada_pointsModel attribute table to populate.
Rtu_IdAttribute id as appears in *.mb file for device - project specific.
rtu_alias Table scada_points column to populate with Rtu_Id value.
Rtu_DescAttribute id as appears in *.mb file for device - project specific.
scada_namescada_points column to populate with Rtu_Desc value.
3 Data type of string (ASCII field) always 3 for a string.
32Maximum length of this attribute string (bytes).
'N' Required attribute - project specific generally ‘N’ (no).
'Y'Set to Y for model builder maintenance. Set this to ‘Y’ if you want the Model Builder to maintain this table via the incremental model build process.
|
Once the scada_points table is populated the scadapop program can be used to expand this information to fully populate the scada_measurements_st staging tables.
|
|
Run scadapop -h to get command line options. In general:
|
•
|
scadapop [-debug [n]] -partition <n> -initFile <file> -nonUniq -scada
|
•
|
debug <n> - Turns debug on <to level n>
|
•
|
partition n - Populate partition n (0 = all partitions)
|
•
|
initFile <configuration - file> - rti.dat configuration file (see below)
|
•
|
-nonUniq - Do not generate unique rti_alias values.
|
•
|
-scada <scada> - Specific SCADA to process (scada_ids.scada_name).
|
|
The rti.dat file is the configuration file used by the scadapop program. Based on data in this file, and entries in the scada_points table, scadapop populates the scada_measurements_st staging table.
|
|
The scada_points table contains a single record (row) for each device in the Network Management System model that has SCADA information associated with it. Each record has a "scada_name" column which, in order to populate the scada_measurements_st staging table, must match a "SCADA_Name" keyword in the configuration file specified via the scadapop -initFile<configuration file> option.
|
The syntax rules for the rti.dat file are:
•
|
Lines with a leading # are treated as comments (ignored).
|
•
|
Leading blank space is ignored.
|
•
|
Only the first two non-blank tokens on a line are recognized.The remaining tokens are treated as comments (ignored).
|
•
|
Attributes are associated to last defined SCADA_Name.
|
Keywords (they must match EXACTLY):
|
Note: The colon ":" character is a keyword delimiter. The colon must appear as the first character after the keyword in order for the keyword to be recognized.
|
Digital: status (Switch Position or "Status")
Example scadapop command line execution:
scadapop -partition 0 -initFile ${CES_DATA_FILES}/OPAL_rti.dat -scada RTAdapter
To populate the scada_measurements_st for all partitions for the SCADA named RTAdapter in scada_ids.scada_name.
scadapop -partition 3111 -initFile rti.dat -debug -scada mySCADA
To populate the scada_measurements_st for partitions 3111 plus debug for scada named mySCADA..
Other RTAdapter-specific RDBMS Population
The tables below are configuration tables that generally need to be populated via project specific sql scripts. Example configuration for these tables is provided for the Oracle (OPAL) model in
$NMS_HOME/sql/OPAL_scada.sql.
scada_ids : RTAdapter SCADA name to unique integer value mapping.
•
|
Generally used to map SCADA name to a unique integer id.
|
scada_states : RTAdapter string to integer mapping.
•
|
Generally used to map topology state and/or quality code information
|
scada_synonyms : RTAdapter scada data attribute/synonym value mapping.
•
|
Generally used to map SCADA reported attributes to Network Management System attributes.
|
Sample RTAdapter Configuration/Execution Sequence - File Based
To get RTAdapter up and running, the following general steps should suffice.
Start from the home directory for RTAdapter:
1.
|
Login to Network Management System admin account with standard OPAL model configured and running.
|
2.
|
Create RTAdapter specific RDBMS tables:
|
ISQL.ces ces_schema_scada.sql
•
|
creates scada_states table
|
•
|
creates scada_synonyms table
|
ISQL.ces ces_retain_scada.sql
•
|
creates scada_points table
|
•
|
creates scada_analog_in table (only used with "-dir RDBMS" option)
|
•
|
creates scada_digital_in table (only used with "-dir RDBMS" option)
|
•
|
creates scada_controls table
|
3.
|
The OPAL_scada.sql file contains sample population data for the scada_ids, scada_points, scada_synonyms and controls table for the OPAL model. You must modify and rename this file for your project. The example below is for the OPAL model using file based updates (not RDBMS polling).
|
4.
|
Run "scadapop -partition 0 -initFile $CES_DATA_FILES/OPAL_rti.dat -scada RTAdapter"
|
•
|
This should populate scada_measurements_st staging table - confirm that you have entries in this table before moving to the next step.
|
5.
|
Validate the RTAdapter is in the $NMS_HOME/etc/system.dat file (see directions above).
|
•
|
Recommend using -watch and possibly the -debug option to start; helps to identify configuration issues.
|
6.
|
If the system.dat file is using the $NMS_SCADA_SCAN_FILE_DIR environment variable to specify the SCADA scan file directory, make sure this environment variable points to a directory that the RTAdapter process can both read and write. Generally, this means a directory owned by the id that is executing RTAdapter. For example, mkdir ~/scada. At the same time, suggest creating a test data holding directory (for example, mkdir ~/scada/tst).
|
7.
|
Stop and restart Oracle Utilities Network Management System services (sms_start.ces).
|
•
|
Make sure RTAdapter is running.
|
8.
|
The $NMS_HOME/templates/rtiadapter.dat.template file contains sample RTAdapter incoming data blocks. You can use the example data blocks in this file to validate basic RTAdapter functionality.
|
Copy example data blocks from the rtiadapter.dat.template to individual test files under ~/scada/tst (using the example configuration above); cut the following out of rtiadapter.dat.template SCADA data file to "live" RTAdapter scan file directory to test. Note by convention the scadapop program will place the numeric value for the scada measurement attribute as a dash separated suffix for the name of the measurement. For example, attribute 0 is topological status (opened/closed) and thus the status attribute for BR2414 would be populated (by scadapop) as BR2414-0 - unless the -nonUniq option is used in which case the combination of rti_alias and attribute must be unique. This is generally desirable as it allows scada attribute names to be unique and thus it is not necessary to specify attributes on input - mostly used with the "-dir RDBMS" option.
1.
Copy the following lines into a file - say BR2413_open
2.
Copy the following lines into a file - say BR2413_close
3.
Copy BR2413_open and BR2413_close to ~/scada/tst (following example above).
|
This should cause the BR2413 file to be read and processed by RTAdapter - you should see the BR2413 device open in the standard OPAL model.
|
|
This should cause the BR2413 file to be read and processed by RTAdapter - you should see the BR2413 device close in the standard OPAP model.
|
7.
Follow other examples for conditions and quality codes.
|
Turn debug on RTAdapter to see what is going on. You should be able to send RTAdapter debug messages on the fly:
|
|
Action any.RTAdapter debug on
|
8.
Validate that devices are changing state in the Network Management System viewer as you execute steps 5 and 6 above ("cp BR2413_open .." followed by "cp BR2413_close ..") sequence over and over.
Sample RTAdapter Configuration/Execution Sequence - RDBMS Table Polling Based
To get
RTAdapter to use the RDBMS queue table mechanism (rather than the earlier file based polling), the following general steps should suffice.
Start from the home directory for
RTAdapter:
1.
|
Follow steps (1-5) as noted above for the file based polling example above.
|
2.
|
In the ~/etc/system.dat configuration file verify the RTAdapter option -dir RDBMS. If the -dir option is set to a directory (rather than the keyword RDBMS),. RDBMS polling will NOT be enabled
|
3.
|
Recommend using -watch and, possibly, the -debug option to help identify configuration issues.
|
4.
|
Stop and restart Oracle Utilities Network Management System services (sms_start.ces).
|
5.
|
Make sure RTAdapter is running.
|
6.
|
Insert row into SCADA_DIGITAL_IN table either using alias or h_cls and h_idx with status = ‘N’. The primary key on the scada_digital_in table is the id column - which is generally populated by a trigger on the scada_digital_in table that fires on insert and populates the id column with the next value in a sequence.
|
INSERT into scada_digital_in (
‘ BR2414-0',
/* Unique attribute measurement name from scada_measurements_st */
'7',
/* Phase bitmask - 7=ABC, 1=A, 2=B, 4=C, etc */
'0', /
* Defined in scada_synonyms - 0=open, 1=close */
'0',
/* Quality bitmask - value >2047 and <2^32 - others ignored */