Adapter Configuration
RDBMS configuration:
Tables involved:
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.
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.
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.
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.
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.
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).
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.
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.
The syntax rules for the rti.dat file are:
Keywords (they must match EXACTLY):
SCADA_Name: RTAdapter
Digital: status (Switch Position or "Status")
Analog: Amps_A
Analog: Amps_B
Analog: Amps_C
Analog: Volts_A
Analog: Volts_B
Analog: Volts_C
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.
scada_states : RTAdapter string to integer mapping.
scada_synonyms : RTAdapter scada data attribute/synonym value mapping.
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:
ISQL.ces ces_schema_scada.sql
ISQL.ces ces_retain_scada.sql
ISQL.ces OPAL_scada.sql
Example:
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).
4.cd ~/scada/tst
5.cp BR2413_open ..
6.cp BR2413_close ..
7.Follow other examples for conditions and quality codes.
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:
Example sql statement:
INSERT into scada_digital_in (
alias,
phases
operation,
operation_date,
quality
source,
status
) VALUES (
‘ 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 */
SYSDATE,
'0', /* Quality bitmask - value >2047 and <2^32 - others ignored */
'SCADA',
'N'
);
COMMIT WORK;