RAPID SCADA Administrator s Guide Part 3. Software Configuration Contents General Configuration Sequence... 2 Tune up Configuration Database... 2 Using Formulas... 6 User Authentication Configuration... 7 Communication with Devices Configuration... 8 Creating Views... 11 Rapid SCADA 4.5
General Configuration Sequence Starting to work with Rapid SCADA, it is recommended to follow the general configuration sequence described below. Having obtained some working experience, better understanding the dependencies between the applications, the sequence can be varied for improving efficiency. 1. Create objects, communication lines and devices in the configuration database using SCADA- Administrator application. 2. Pass the configuration database to SCADA-Server by pressing button located in SCADA- Administrator toolbar. Restart SCADA-Server service. 3. Import communication lines and devices from the configuration database into SCADA- Communicator. The import feature is accessible in a communication lines popup menu by pressing button. 4. Configure communication with devices in SCADA-Communicator. 5. Accomplish tuning up the configuration database using SCADA-Administrator. 6. Create views (tables or schemes) using SCADA-Table Editor or SCADA-Scheme Editor applications. 7. Register the created views by SCADA-Web Configurator utility in order that they appear in SCADA-Web application. Tune up Configuration Database The configuration database is a structured description of the entire automated system. The application included in Rapid SCADA use the information from the configuration database in conjunction with their settings. The configuration database is edited using SCADA-Administrator. The edited instance of the configuration database is in SDF file format of Microsoft SQL Server Compact Edition. After completing the necessary changes the database is converted by an administrator in a specially designed DAT format which is used by the other applications. This approach allows modifying the configuration database while the software is running. The configuration database consists of tables, which in turn are composed of columns and rows. Each table belongs to one of the following groups: 1. System. This group contains the tables which define a configuration of a particular automated system. 2. Dictionaries. This group contains the auxiliary tables. In most cases changing of these tables is not needed and can cause incorrect operation of the software. The following is a list of the configuration database tables with descriptions. Table Name System Group Objects Communication lines Devices Input channels Output channels Roles Users Description Contains logical objects which input data and commands are related to Describes communication lines which are used to exchange data with devices Contains real or virtual devices Defines data received from the devices and data calculated on their base Specifies the commands executed by the system Contains roles. Each role defines a set of functions available to users Contains a list of users of the system and their roles 2
Table Name Interface Rights Dictionaries Group Channel types Command types Event types Device types Quantities Units Command values Number formats Formulas Description Contains the names of the interface objects which requires access restrictions Defines relationships between the roles and the interface objects Dictionary of input channel types Dictionary of command types used by output channels Dictionary of system event types which correspond to the input channel statuses Dictionary of device types that can be connected to the system Dictionary of measures quantities Dictionary of units of input channel values and enumerable values of input channels Dictionary of enumerable command values which are transmitted by output channels Dictionary of formats which are used to display input channel values Dictionary of formulas used in calculation of input channel data and command values of output channels The following list is a sequence of working with the configuration database in SCADA- Administrator application: 1. Create the backup copy of the existing database by pressing button. 2. If the sample data are not needed, clear the tables of System group. According to relations between the tables clearing begins from Rights table and continues till Objects table. In Roles table do not delete rows with identifiers from 0 to 4. 3. Enter data in the tables of System group. Use the opposite order starting from Objects table and finishing by Rights table. There are Create channels and Clone channels features designed for fast automatic filling Input channels and Output channels tables. 4. Pass the configuration database to SCADA-Server using button. It is possible to significantly speed up a process of system configuration by using the past works. Export and Import features allow exchanging data between different databases. These features are accessible in Database menu. Data tables are exported to DAT format files then the information can be imported from these files into the same or another configuration database. A range of exported and imported data can be restricted by specifying the start and the final identifiers (see Figure 1). In addition, if a new start identifier is specified, identifiers of the imported data are shifted. Figure 1. Import into the configuration database 3
Create channels feature (see Figure 2) which is accessible in Service menu allows automatic filling Input channels and Output channels tables using information about existing objects and devices. Rules for creating channels are defined in device libraries (drivers) of SCADA-Communicator. The device libraries are located in C:\SCADA\ScadaComm\KP\ by default. If a DLL file, specified in Device types table, does not exist, the creation of channels corresponding to that device type is impossible. Channels are created according to the settings SCADA-communicator. To create input and output channels tick the appropriate devices, choose or keep undefined the object for the each device, click Calculate channel numbers button, check the calculated numbers, then click Create button. Figure 2. Create channels feature Clone channels feature (see Figure 3) is also designed to make the process of creating input and output channels faster. The objects and the devices of the cloned channels can be replaced by the specified values during cloning. 4
Figure 3. Clone channels feature Editing of input channels may be done in the table directly or by using the form that is shown in Figure 4. Right click the input channel table to show popup menu and click the menu item to open this form. Figure 4. Editing input channel properties Compact database feature decreases the size of the configuration database file. Use this feature when the database editing has been completed. To execute the feature go to Database Compact main menu item. 5
Using Formulas Formulas are used for calculating values and statuses of input channels and calculating values of commands. Formulas processing is performed by SCADA-Server. Formulas are contained by Input channels and Output channels tables of the configuration database. To enable the formula tick the appropriate checkbox in Formula used column. Formulas table stores additional functions and data structures which can be used in formulas for input and output channels. The general rules for the use of formulas: 1. Formulas use the expressions syntax of C# language. Many of Microsoft.NET classes are accessible, for example, Math and DateTime classes. 2. New constants, fields, properties and methods can be added and used in formulas. 3. If at least one formula contains an error, SCADA-Server operation is impossible. Information about errors in formulas is written in SCADA-Server application log. The rules for the use of formulas for input channels: 1. For channels of types Discrete and Real a calculation starts when the channels data are received by SCADA-Server. Use these channel types if formula does not refer to data of other channels. 2. For calculated channels and switching counters calculations are performed permanent and ordered by channel numbers. A formula of a calculated channel usually refers to data of other channels. 3. For minute and hourly channels a calculation starts periodically once per minute or once per hour. Use these channel types to create accumulated values, for example, energy consumption, operating time. 4. For channels of types Discrete and Real the statuses of the channels after calculating are equal to the statuses of these channels received by SCADA-Server if status calculation does not specified explicitly. 5. For channels of the other types the statuses do not change after calculating if status calculation does not specified explicitly. 6. An input channel formula that does not contain ; (semicolon) symbol calculates the input channel value only. 7. If an input channel formula contains ;, the formula calculates the input channel value and status. The first part before semicolon is a formula for value calculation and the second part after semicolon calculates status. The rules for the use of formulas for output channels: 1. Formulas are processed for output channels having Standard and Binary command types. 2. A formula of an output channel defines command value calculation for a standard command and defines command data calculation for a binary command. The variables accessible in formulas: Variable Value Type Description CnlVal, Cnl double The input channel value transmitted to the server before the calculation CnlStat int The input channel status transmitted to the server before 6
Variable Value Type Description the calculation CmdVal, Cmd double The command value transmitted to the server before the calculation CmdData byte[] The command data transmitted to the server before the calculation CnlNum int The channel number for which the formula is calculated E double The natural logarithmic base, specified by the constant, e PI double The ratio of the circumference of a circle to its diameter, specified by the constant, π The functions accessible in formulas: Fucntion Value Type Description Val() double Gets the current value of the formula channel Val(n) double Gets the current value of the channel n Stat() int Gets the current status of the formula channel Stat(n) int Gets the current status of the channel n Abs(x) double Calculates the absolute value of a number Sin(x) double Calculates the sine of the specified angle Cos(x) double Calculates the cosine of the specified angle Tan(x) double Calculates the tangent of the specified angle Exp(x) double Calculates e raised to the specified power Ln(x), Log(x) double Calculates the natural (base e) logarithm of a specified number Sqr(x) double Calculates the square of a specified number Sqrt(x) double Calculates the square root of a specified number User Authentication Configuration Rapid SCADA supports three methods of user authentication: 1. Based on usernames and passwords stored in the configuration database. 2. Based on Active Directory. 3. Combined method. To perform authentication a client application, for example, SCADA-Communicator or SCADA-Web, sends to SCADA-Server a request to validate user name and password. SCADA-Server checks user credentials and returns the user role to the client application. The standard user roles and their capabilities are listed in the following table. ID Role Name Description 0 Disabled Access to the system is denied 1 Administrator Full access 2 Dispatcher Viewing information, sending commands 3 Guest Viewing information 4 Application Interacting with the server To restrict user access to interface objects (tables, schemes, etc.) create user roles in Roles table in the configuration database. Then fill Interface and Rights tables. If Rapid SCADA operates in a network that managed by Active Directory, it is recommended to use the 2 nd and the 3 rd authentication methods because of security reasons. The details of these methods are described below. 7
To allow SCADA-Server interact with Active Directory specify domain controller path and tick the nearby checkbox on Common Parameters page of the application. The 2 nd authentication method is used if the standard roles are enough to manage user rights. The benefits of this method are that rights management performed using usual Active Directory tools without editing the configuration database and restarting SCADA- Server. To use the 2 nd method it is required to create the security groups in Active Directory. The groups correspond to the user roles: ScadaDisabled Disabled role; ScadaAdmin Administrator role; ScadaDispatcher Dispatcher role; ScadaGuest Guest role; ScadaApp Application role. If a user is a member of the listed groups or he is a member of a group that is a member of the listed groups, the user is granted the appropriate rights in Rapid SCADA. The 3 rd method combines the capabilities of the 1 st and the 2 nd methods. User credentials check performed by using Active Directory and a user role is defined by Users table of the configuration database. In this case, user names and user roles are defined in Users table, but user passwords are not entered in the table. The simultaneous use of all the above authentication methods is allowed. Communication with Devices Configuration Interaction with real or virtual devices is performed by SCADA-Communicator which acting as a master or a slave, requests data and sends commands to devices. All the devices are bound to communication lines. Communication lines are independent on each other and are used simultaneously. Figure 5 shows an example of communication line parameters. A communication channel determines physical interface or network protocol which is used for data exchange with devices. The following communication channels are supported: Serial port, TCP client, TCP server and UDP. In some cases, if the interaction with devices is implemented in a device library, communication channel should be undefined (e.g., OPC implementation). If sending commands to devices is required, it is necessary to tick Commands enabled. By default, this checkbox is disabled due to safety reasons. Communication order and request parameters are set on Request Sequence page (see Figure 6). 8
Figure 5. Communication line parameters Figure 6. Request sequence 9
If Active checkbox on Communication Line Parameters page is unset, the appropriate communication line is disabled, and no requests are performed. If Active checkbox in Selected device group box is unset, communication with the appropriate device is disabled. Bound to server checkbox on Communication Line Parameters page allows to switch on or switch off sending the communication line data to SCADA-Server. Bound checkbox in Selected device group box has the similar purpose, but only for the device. If Use SCADA- Server checkbox on Common Parameters page is unset, any interaction between SCADA- Communicator and SCADA-Server is switched off. These options are useful for testing new devices connecting to the system. If Time and Period request parameters of a device are equal zero, the device is requested cyclically. If Time greater than zero and Period is zero, the device is requested once a day in the specified time. If Period greater than zero, the device is requested periodically starting at the specified time. Timeout field defines how long to wait an answer from the device after a request. Delay field defines a delay after each request to the device. Command line may contain additional parameters described in documentation of a device library. To reset request parameters of the selected device to the default values click button. To open the device properties form, if it is supported by a device library of the selected device, click button or use popup menu of the tree. To set global properties for a device type choose Device Libraries page, select the device library and click Properties button if the button is enabled. Import feature significantly speeds up configuring SCADA-Communicator (see Figure 7). This feature is allowable if Use SCADA-Server checkbox on Common Parameters page is set and SCADA-Server service is running. To start import click button. Such button is located on Request Sequence page and in a popup menu of the tree. Import feature adds communication lines and devices to SCADA-Communicator configuration using the information of the configuration database. Click to update SCADA-Communicator settings according to the configuration database. Names of communication lines, names, DLLs, addresses and call numbers of devices are affected. Be careful not to lose settings made manually. Figure 7. Import devices 10
Creating Views View is a form of data representation in SCADA-Web application. The supported view types are described in the following table. View Type Table Scheme Faces Web page Description Displays data in tabular form by hours Displays data in schemes Displays photos of the staff passing through checkpoints of access control system Displays data in a custom web page SCADA-Table Editor is designed for creating and editing table views. The application is shown in Figure 8. Figure 8. SCADA-Table Editor application In the left side of the window the configuration database information is displayed. The edited table view is in the right side. 11
There are two options how to bind output channels to items of a view: 1. Specify the output channel numbers explicitly by using SCADA-Table Editor. 2. Specify the output channel numbers in the configuration database in relation to the input channels. Specify the appropriate input channel numbers in SCADA- Table Editor. Hidden items of table view are not displayed but they affect the event filtering by view in SCADA-Web. SCADA-Scheme Editor is designed for creating and editing schemes (see Figure 9). Figure 9. SCADA-Scheme Editor application. Schemes consist of textual and graphic elements which can be static or dynamic. Dynamic elements are bound to input channels and displaying of these elements depends on current data the channels. All the views are stored in the interface directory defined in SCADA-Server settings. The default interface directory is C:\SCADA\Interface\ To enable using a view in SCADA-Web the view has to be listed in SCADA-Web configuration. For this purpose use SCADA-Web Configurator shown in Figure 10. 12
Figure 10. Adding views using SCADA-Web Configurator 13