Rapid SCADA provides creation of automated systems of the following types:
Rapid SCADA is a software that automatically collects data communicating with controllers, processes data and provides information to a dispatcher. Rapid SCADA supports commonly used communication standards such as Modbus protocol and OPC that allow using a huge amount of various devices. The list of supported devices can be extended by developing additional drivers.
Rapid SCADA consists of the set of application and libraries. The software is a platform which allows flexible system configuration to meet the customer needs. Rapid SCADA is open source software, its internal data formats and communication protocols are documented. This approach simplifies integration of Rapid SCADA with other applications to create complex enterprise-wide solutions. Functionality of Rapid SCADA can be enhanced by adding custom modules which implement required features.
Access to information and control functions in Rapid SCADA is restricted according to user rights. The ability to use Active Directory for user authentication significantly increases the safety of storing passwords. User rights management using Active Directory eliminates the system administrator from manual input user logins and passwords.
The following table contains the main characteristics of the software.
Characteristic | Value |
---|---|
Supported OS families | Windows, Linux |
Maximum number of input channels | 65535 |
Maximum number of output channels | 65535 |
Maximum number of communication lines | 65535 |
Maximum number of devices | 65535 |
Minimum current data writing period | 1 second |
Minimum archive data writing period | 30 seconds |
Maximum archive data storing period | 10 years |
Automatic archive data backup | Yes |
Active Directory authentication option | Yes |
Communication protocol between the applications | TCP |
Writing application and user actions to log files | Yes |
Disable telecontrol commands option | Yes |
Extensible functionality | Yes |
The software is open source | Yes |
The architecture of Rapid SCADA is multi-tier and distributed (see Figure 1). Applications can run on a single server or multiple computers across a network. Controllers can use communication channels of different types for connecting to a system. Major factors that determine the system configuration are number of equipment locations, distance between them, estimation of end-user activity, restrictions of external systems.
Figure 1. Software architecture
Rapid SCADA includes the following main applications:
Providing data access using web technology significantly simplifies the deployment and maintenance of the system, which is especially important for a large number of users.
Commonly used devices controlled by a system are electricity meters, heat meters, fire and security alarms, access controllers and other equipment.
Server manages the data archives, performs mathematical calculations and provides information to the client applications. Server writes data to the main archive and makes the backup copy simultaneously.
Figure 1. Graphical shell for Server configuring
Server works as a service. It does not have a user interface. Server operates continuously in the background regardless of user login and logout. The graphical shell for Server configuring is built into the Administrator application (see Figure 1).
The application monitors user connections and checks user rights while processing requests and passing commands. Information about the application state and performed actions is stored in textual log files. Server is designed for non-stop running.
Additional server modules allow extending the functionality of Server according to customer requirements.
Communicator interacts with controllers and transmits data to the Server application. Communication with controllers connected to a system is executed in parallel across multiple lines. Communicator receives current data, archive data, events from controllers and sends commands to controllers. The application helps troubleshooting issues with communication lines and devices.
Figure 1. Graphical shell for Communicator configuring
Communicator works as a service. The graphical shell for Communicator configuring is built into the Administrator application (see Figure 1). Information about the application, communication lines and each connected device is stored in log files. Communicator is designed for non-stop running.
Developers are able to implement their own device drivers to interact with a variety of controllers.
Webstation is a web application that displays information to a dispatcher via browser in different forms (tabular, schematic, diagrams, reports, etc.) and provides sending commands. Reports are generated in commonly used HTML and Microsoft Excel formats.
Figure 1. Webstation application. Scheme view
Figure 2. Webstation application. Table view
User is able to choose a view (table or scheme) and a date to access archive data. To show a diagram of an input channel, click an item icon in a table or an appropriate element in a scheme.
Webstation is available from any computer or tablet connected to an organization network without any software installation. Access is managed by a system administrator who defines user rights.
The functionality of Webstation can be extended by additional plugins. For example, Chart Pro Plugin extends the capabilities of Rapid SCADA charts: adds scaling, displaying of multiple charts, export to PNG and PDF. Elastic Report Plugin allows to generate reports according to a custom configuration. Using this plugin, you can build almost any desired report. Developers can download Rapid SCADA source code and the documentation to learn how to implement plugins.
Agent transfers configuration between Rapid SCADA instance and the Administrator application. In addition, Agent provides log files for displaying in Administrator. Agent runs as a service on a server where Rapid SCADA instance, controlled by Agent, is installed. An instance of Rapid SCADA includes the Server, Communicator and Webstation applications, all or some of these applications.
Agent communicates with Administrator via TCP. Therefore, Administrator can be installed on the same computer as Agent, or on another computer that is accessible over the network. By default, Agent uses TPC port 10002. In case of remote access, incoming connections on this port must be allowed by the server firewall.
Agent has no user interface. To check its operation, use the log files which default location is C:\SCADA\ScadaAgent\Log
The Administrator application (see Figure 1) is intended for developing Rapid SCADA projects and monitoring the state of the automated system. The Administrator is an integrated development environment provides editing the configuration database, configuring the main Rapid SCADA applications, Server modules and device drivers.
Figure 1. Administrator application
The Administrator tools to speed up the configuration process:
A project contains a set of configuration files, mainly using the XML format. This approach makes it easy to copy projects from one computer to another. To control project versions and collaboration, Git is the best choice.
The Table Editor application is designed to create table views which are displayed on operator's workstation. Table Editor is used by engineers during Rapid SCADA configuration.
Figure 1. Table Editor application
Choose the channels from the configuration database in the left pane of the window, and add them to the table view. The contents of the table view is displayed in the right pane. Hidden items of a table view are not displayed in the Webstation application, however they make sense when filtering events by view.
Table Editor is usually started from the Administrator application by double-clicking on a table view node in the project explorer. The status bar of the editor displays the configuration database path of the project in which contains the table being edited.
The Scheme Editor application is designed to create schemes which are displayed on operator's workstation. Scheme Editor is used by engineers during Rapid SCADA configuration.
Figure 1. Scheme Editor application
A scheme consists of textual and graphical elements which have a set of properties define their appearance and behavior. Static elements display unchanging content. Dynamic elements are bound to the channels of the configuration database that allows to display current measured values and states, draw charts and send commands by user click.
Main Features | |
---|---|
Unified development environment of Rapid SCADA projects | Completed |
The Agent application for interacting with remote servers | Completed |
Application for automatic generation and sending of reports | Completed |
Schemes | |
Binding any properties of scheme components to input channels | Not included in plan |
New scheme components | Community help is appreciated |
New images for schemes | Community help is appreciated |
Communicator Drivers | |
Modbus Slave Driver | Completed |
IEC-61850 Driver | Community help is appreciated |
BACnet Driver | Community help is appreciated |
Any new drivers | Community help is appreciated |
Server Modules | |
Voice Module | Community help is appreciated |
Any new modules | Community help is appreciated |
Webstation Plugins | |
Update Chart Pro Plugin according to feedback from users | Completed |
Improvement of Dashboard Plugin | Not included in plan |
Development of a plugin for downloading and uploading archives | Not included in plan |
Any new plugins | Community help is appreciated |
Hardware configuration of a server depends on the scale of the automated system. The minimum configuration is determined by the operating system requirements. To estimate the required hard disk space, first configure Rapid SCADA, then measure the daily increment of archive data size and multiply it by the archive data storing period.
Rapid SCADA contains its own built-in DBMS, so no additional charge for third-party DBMS is needed. The software can work either on physical or virtual environment.
Rapid SCADA requires certain Windows components to be installed. Go to Control Panel > Programs > Turn Windows features on or off. The required compontns of Microsoft .NET Framework are shown in Figures 1 and 3. Pay attention that Windows Communication Foundation child components of Microsoft .NET Framework 3.5 must be turned off.
The Webstation application requires Internet Information Services (IIS) that is a one of Windows features. Webstation would be inoperable unless the set of certain IIS features were turned on. Figures 2 and 4 show what features have to be installed. During the web application setup the availability of these features is checked by the installer.
Figure 1. Windows 7 .NET components
Figure 2. Windows 7 IIS components
Figure 3. Windows 10 .NET components
Figure 4. Windows 10 IIS components
Run ScadaSetup.exe from the installation package to start Rapid SCADA installation. The installer is shown in Figure 5. Installation must be performed using an administrator account. Rapid SCADA requires the up to date version of Microsoft .NET Framework installed. The installer checks if the framework is presented, and suggests to download and install it if necessary.
Figure 5. Rapid SCADA installer
Before the installation starts, user is asked for choosing the applications and the installation directory (see Figures 5 and 6). This directory specifies the location of the entire software. The installer creates subdirectories required for the chosen applications. The default directory C:\SCADA is recommended due to simplifying configuring the applications.
Figure 6. Choosing the installation directory
The web application installation options (see Figure 7) are agreed with a system administrator. If there are no specific requirements for the web application, you should use the default values.
Figure 7. Web application installation options
When installation is completed, it is recommended to check that the Scada web application uses an application pool having .NET 4.0 runtime version and integrated pipeline mode. IIS management console path is Control Panel > System and Security > Administrative Tools > Internet Information Services (IIS) Manager.
Manual Rapid SCADA setup provides full control over the process of the software installation, update and uninstallation.
The manual installation sequence:
The manual uninstallation sequence:
Rapid SCADA supports additional modules which extend the software functionality. This section contains a description of the common installation sequence that is typical for most modules.
The sequence of installing a new or updating an existing module of the Server application:
The sequence of installing a new or updating an existing driver of the Communicator application:
Additional modules for the Webstation application are called plugins. The installation sequence for a new plugin:
After installing Rapid SCADA, it is recommended to restart the computer so that the Server, Communicator and Agent services start automatically. After the reboot is complete, run one of the following browsers: Google Chrome, Mozilla Firefox or Microsoft Edge. In the address bar, type http://localhost/scada/. The login page should open (see Figure 1). Enter admin and 12345 in the login and password fields and click the Login button.
Figure 1. Login web form
To start the Administrator application, use the shortcut located in the menu Start > Programs > SCADA . If the shortcut is missing for any reason, Administrator can be run from the executable file C:\SCADA\ScadaAdmin\ScadaAdmin.exe
The Administrator application includes the tools for managing other Rapid SCADA applications.
The Server, Communicator and Agent applications work as services. In case of working on Windows, use the services.msc snap-in to manage services. It can be run from the command line or by Control Panel > System and Security > Administrative Tools > Services. Service names: ScadaServerService, ScadaCommService and ScadaAgentService.
In addition, there are the svc_start.bat and svc_stop.bat files in the directories of the corresponding applications, which allow to start and stop the services. These batch files must be run as administrator.
The Administrator application also ables to start and stop Server and Communicator. To manage the services in Administrator, open a project and then open the instance status form (see Figure 2) using the button.
Figure. 2. Instance status in Administrator
The default startup type of the Server, Communicator and Agent services is Automatic, i.e. the services start when an operating system starts, and the services stop when the OS stops. If auto start is not necessary, Manual startup type could be set (see Figure 3).
Figure 3. Setting Windows service startup type
To open the web application named Webstation, in the browser address bar, enter http://compname/scada/ where compname is the host name or IP address of the computer with the installed web application, scada is the virtual directory specified during the installation. If Webstation is opened on the same computer on which it is installed, it is possible to use http://localhost/scada/ or http://127.0.0.1/scada/
The default username: admin
The default password: 12345
The typical tasks when Rapid SCADA migration to another server is needed:
The steps to migrate a configuration are:
Updating Rapid SCADA to new versions has to be performed on the test environment first. Carefully read the list of changes were made in the new version. If the configuration database structure is changed or the archive or configuration files formats are changed, special utility is required to convert data.
Installation on the production server is allowed only being sure that the new version of Rapid SCADA operates properly on the test environment.
The steps for updating Rapid SCADA:
Updating Rapid SCADA by directly copying files of a new version is technically possible. However, this operation requires a deep understanding of Rapid SCADA and can cause errors in the software.
If Rapid SCADA is used in a corporate environment, restrict access of domain users to the Rapid SCADA installation directory, by default C:\SCADA\. To do this, open the properties of the directory which contains the Rapid SCADA applications, choose the Security tab and configure access rights.
Configure a web server to enable HTTPS protocol for the Webstation application. Using HTTPS, all traffic between a browser and the web server, including passwords, is encrypted.
Use VPN to provide access for external users. If possible, avoid open access to Webstation from outside.
Change the default passwords. Open the project using the Administrator application, enter the new passwords in the Users table, and update the passwords for connecting to Server specified in the application settings. To create strong passwords, use a password generator. If a company uses Active Directory, setting up authentication in Rapid SCADA based on Active Directory enhances system security.
Configuration of Rapid SCADA is performed on a project basys. A project is a set of files in various formats that are stored in the project directory. To create and edit projects, use the Administrator application. When Administrator starts, the Start page opens, which contains the buttons to create a new or open an existing project (see Figure 1).
Figure 1. Start page
Figure 2. Project creation form
Pay attention to the Template field of the project creation form (see Figure 2). The template defines the initial configuration that is added to the project. Another existing project can be used as a template.
Rapid SCADA configuration is displayed in the project explorer, which is located in the left part of the main Administrator window. The project consists of the following main parts (Fig. 3):
Figure 3. Project structure
An instance is a computer on which Rapid SCADA is deployed. A single project can include multiple instances of Rapid SCADA that exchange data. The Administrator application can connect to remote servers for downloading and uploading configuration, therefore, Rapid SCADA can be configured using one workstation.
Starting to work with Rapid SCADA, it is recommended to follow the general configuration sequence described below. Having obtained some experience, better understanding the dependencies between the applications, the sequence can be varied to increase efficiency.
The configuration database is a structured description of the entire automated system. The applications included in Rapid SCADA use the information from the configuration database in conjunction with their settings.
The configuration database is edited using the Administrator application as part of a project. The edited instance of the configuration database is in XML file format. When a project is uploaded to a server for execution, the configuration database is converted into a special DAT format.
The configuration database consists of tables, which in turn are composed of columns and rows. Each table belongs to one of the following groups:
The following table describes the configuration database tables.
Table Name | Description |
---|---|
System Group | |
Objects | Contains logical objects that are used to structure information in the system. Objects can be interpreted as locations |
Communication lines | Describes communication lines which are used to exchange data with devices |
Devices | Contains real or virtual devices |
Input channels | Defines data received from the devices and calculated data |
Output channels | Specifies commands executed by the system |
Roles | Contains roles. Each role defines a set of functions available to a user |
Users | Contains a list of users of the system and their roles |
Interface | Contains descriptions of interface objects (views, reports and data windows) |
Rights | Defines rights to interface objects by roles |
Dictionaries Group | |
Channel types | Dictionary of input channel types |
Command types | Dictionary of command types used by output channels |
Event types | Dictionary of system event types and statuses of input channels in the archive |
Device types | Dictionary of device types that can be connected to the system |
Quantities | Dictionary of measured quantities |
Units | Dictionary of units of input channel values and enumerable values of input channels |
Command values | Dictionary of enumerable command values which are transmitted by output channels |
Number formats | Dictionary of formats which are used to display input channel values |
Formulas | Dictionary of formulas used in calculation of input channel data and command values of output channels |
The configuration database tables have relations with each other, that is, a cell of one table can refer to a record of another table. For example, each device refers to the communication line to which it is connected. Therefore, it is efficient to edit tables in a certain sequence. For tables from the System group, enter data in order starting with the Objects table and ending by the Rights table.
To add communication lines and devices, it is suggested to use the wizards that are opened using the and
buttons. Using the wizard allows to add an entry to the configuration database table, and also to create the corresponding entity in the Communicator settings. To create input and output channels, use the wizard opened by the
button. However, automatic channel creation must be supported by the device drivers selected, otherwise channels should be entered manually.
If the button is displayed on the table toolbar, the table can be edited using the form view. Forms for editing channel properties are shown in Figure 1 and 2.
Figure 1. Input channel properties
Figure 2. Output channel properties
Creating a configuration database can be significantly accelerated by using the existing works. To exchange information between different databases, the Administrator application supports the Import table and Export table features (see Figure 3 and 4), which are accessible in the File menu. Tables can be are exported to DAT, XML and CSV files. Then information can be imported from DAT and XML files into the same or a different project. Limit the range of exported and imported data by specifying the starting and ending identifiers. If the new destination identifier for the import operation is set, data is imported with an offset of identifiers.
Figure 3. Import table
Figure 4. Export table
A cloning tool is available for input and output channels (see Figure 5). In the Clone Channels form fill the source and destination channel numbers. If needed, select a new object and device for the cloned channels. The function of updating channel numbers in formulas applies if a channel number is used as an argument in the following functions: N(), Val(), Stat(), SetVal(), SetStat() and SetData().
Figure 5. Channel cloning
Copy (Ctrl + C) and paste (Ctrl + V) are available for table cells. Click a column header to sort the table rows by the values of that column. The search and replace feature (Ctrl + F) also speeds up editing.
Formulas are used for calculating values and statuses of input channels and calculating values of commands. Formulas processing is performed by the Server application.
Formulas are enterd in the Formula column of the Input channels and Output channels tables of the configuration database. To enable the formula, tick the checkbox in the Formula used column. The Formulas table contains additional functions and data structures which can be used in formulas for input and output channels.
The general rules of writing and using formulas:
The rules for calculating input channel formulas:
The rules for calculating output channel formulas:
The variables accessible in formulas:
Variable | Value Type | Description |
---|---|---|
CnlVal, Cnl | double | The input channel value transmitted to Server before calculation |
CnlStat | int | The input channel status transmitted to Server before calculation |
CmdVal, Cmd | double | The command value transmitted to Server before calculation |
CmdData | byte[] | The command data transmitted to Server before 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 |
---|---|---|
N(n) | int | Returns the specified channel number for updating numbers on cloning |
Val() | double | Gets the current value of the formula channel |
Val(n) | double | Gets the current value of the channel n |
SetVal(n, val) | double | Sets 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 |
SetStat(n, stat) | int | Sets the current status of the channel n |
SetData(n, val, stat) | double | Sets the current value and 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 |
Additional formulas, including formulas for calculating averages, are available on GitHub.
If you develop custom formulas, check their syntax and validate whether they work correctly. If the Server service fails to compile the formulas at startup, information about the error is written in the Server log file, and the source code of the formulas that Server tries to compile is available in CalcEngine.cs, which is located in the Server log directory, by default C:\SCADA\ScadaServer\Log\
To develop complex formulas, it is recommended to use Microsoft Visual Studio Community Edition. Add a refererence to the FormulaTester.dll assembly in the project. As an example, use the project mentioned above, which contains formulas.
Rapid SCADA supports three methods of user authentication:
To perform authentication, a client application, for example, Communicator or Webstation, sends to the Server application a request to validate user name and password. 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 all information, sending commands |
3 | Guest | Viewing all information |
4 | Application | Interacting with the Server application |
To restrict user access to interface objects (table views, schemes, etc.), create new user roles in Roles table in the configuration database. Then specify access rights in the Rights table.
If Rapid SCADA operates in a network that managed by Active Directory, it is recommended to use the 2nd and the 3rd authentication methods because of security reasons. The details of these methods are described below.
To allow the Server service interact with Active Directory, specify domain controller path and tick the nearby checkbox on the Common Parameters page of the application, and activate ModActiveDirectory.dll on the Modules page.
The 2nd authentication method is used if the standard roles are enough to manage user rights. The benefit of this method is that rights management is performed using usual Active Directory tools without editing the configuration database and restarting the Server service.
To use the 2nd method, it is required to create the security groups in Active Directory. The groups correspond to the user roles:
If a user is a member of a group listed above, or he is a member of a group which, in turn, is a member of the above groups, the user is granted the corresponding rights in Rapid SCADA.
The 3rd method combines the capabilities of the 1st and the 2nd methods. Validation of user credentials is performed using Active Directory, and a user role is defined by the Users table of the configuration database. In this case, user names and user roles are specified in the Users table, but user passwords are kept blank in the table.
Simultaneous use of all the above authentication methods is allowed.
Interaction with real or virtual devices is performed by the Communicator application, which acting as a master or a slave, polls data and sends commands to devices. All the devices are bound to communication lines. Communication lines are independent of each other and work in parallel.
The user interface of Communicator, designed for configuration, is built into the Administrator application. Communicator is configured as part of a project.
Figure 1 shows an example of the main 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 by a device driver, communication channel should be undefined (e.g., the OPC driver).
If sending commands to devices is not required, it is recommended to untick the Commands enabled checkbox due to safety reasons.
Figure 1. Main communication line parameters
Figure 2. Request sequence
Communication order and request parameters are set on the Request Sequence page (see Figure 2).
If the Active checkbox on the Main Parameters page is unset, the corresponding communication line is disabled, and no requests are performed. If the Active checkbox in the Selected Device group box is unset, communication with that device is disabled.
The Bound to Server checkbox on the Main Parameters page allows to switch on or off sending the communication line data to Server. The Bound to Server checkbox in the Selected Device group box has the similar purpose, but applied only for the device. If the Interact with Server checkbox on the Common Parameters page of the Communicator settings is unset, any interaction between Communicator and Server is disabled. These options are useful for testing new devices being connected to the system.
If the Time and Period parameters of a device are equal to zero, the device is requested cyclically. If the Time parameter is greater than zero and Period is zero, the device is requested once a day in the specified time. If Period is greater than zero, the device is requested periodically starting at the specified time. The Timeout field defines how long to wait an answer from the device after a request. The Delay field defines a delay after each request to the device. Command line may contain additional parameters described in documentation of a device driver.
To reset request parameters of the selected device to the default values, click the Reset button. To open the device properties form, if it is supported by a driver of the selected device, click the Properties button or use a popup menu of the project explorer. To set global properties for a device type, choose the Drivers page, select the device driver and click the Properties button if the button is enabled.
To import communication lines and devices from the configuration database to the Communicator settings, right-click the Communication Lines node or a node of a specific communication line in the project explorer and select the Import item in the context menu. The import form is shown in Figure 3.
Figure 3. Import Communicator settings
The settings synchronization feature (see Figure 4) is also run using the communication line context menu. Synchronization allows to update the parameters of existing communication lines and devices according to the configuration database, however, the parameters entered manually may be lost.
Figure 4. Sync Communicator settings
View is a form of data representation in the Webstation application. There are 2 types of views supported by default: table views and schemes. Support for other types of views can be added by installing additional plugins.
Table Editor and Scheme Editor are designed to create views. Views are saved to files that must be located in the interface directory of a project. At run time, views are located in the interface directory specified in the Server application settings, or in its subdirectories, by default C:\SCADA\Interface\
Examples of view files:
Interface\Servers\ServerRoom.sch - scheme,
Interface\Servers\ServerRoom.tbl - table view.
To open a dialog for creating a view, select the New file context menu item (see Figure 1 and 2). Then in the dialog form, select the type of view, specify the file name and click the OK button. The created file will be displayed in the project explorer. By double-clicking on the corresponding tree node, the view is opened by the editor.
Figure 1. Menu to create a view
Figure 2. View creation dialog
After view files are created, they must be specified in the Interface table of the configuration database, as shown in Figure 3. View identifiers must be unique. The view path is relative to the interface directory. The text specified in the Title column is displayed as a node text in the explorer tree of Webstation, and identifiers determine the sorting of the views. If view files are located in the subdirectories of the interface directory, these subdirectories must also be specified in the Interface table.
Figure 3. Editing the Interface table
Schemes support the template mode. A template is a regular scheme created using Scheme Editor, which can be bound to arbitrary input and output channels.
To use a scheme in the template mode, specify the appropriate arguments in the Interface table. Two options are available (see Figure 3):
Figure 4. Scheme template in the Interface table
Description of the arguments:
inCnlOffset - input channel number offset;
ctrlCnlOffset - output channel number offset;
titleCompID - title component identifier;
bindingFileName - file name of the bindings relative to the Webstation configuration directory.
The title text of a scheme working in the template mode is taken from the Title field of the Interface table. When creating a scheme template using Scheme Editor, it is recommended to leave the scheme title property blank.
Binding files must be located inside the Webstation configuration directory, by default C:\SCADA\ScadaWeb\config\. Binding file example:
<?xml version="1.0" encoding="utf-8" ?>
<TemplateBindings>
<TemplateFileName>MyScheme.sch</TemplateFileName>
<TitleCompID>3</TitleCompID>
<Binding compID="1" inCnlNum="101" ctrlCnlNum="101" />
<Binding compID="2" inCnlNum="102" />
</TemplateBindings>
The database import driver is designed to receive current data from a third-party database, as well as write information to a third-party database using telecontrol commands. This driver is included in the Rapid SCADA installation package and does not require separate installation. The driver library file is KpDbImport.dll.
Each device that uses the database import driver contains one request for receiving data and a set of commands for changing data. There can be one or more devices importing data on a one communication line.
Configuring the database import driver is performed using the device properties form. To open this form, find the corresponding device in the Communicator settings, right-click on the device node and choose the Properties menu item.
The Database page allows to specify the database type and the parameters of the database connection. If non-standard connection parameters are needed, it is possbile to edit the connection string directly.
The Data Retrieval page specifies the SQL query to retrieve current data from the database. The driver automatically creates device tags based on the list of requested table columns. If a request has a complex syntax, enter the number of tags manually.
The telecontrol commands supported by the device are defined on the Commands page. Commands provide information transfer from Rapid SCADA to the database. SQL query of a command may include the variables cmdVal and cmdNum which contain the value and number of the command. For most DBMS variables in the query need the prefix @, whereas : (colon) is usually used for Oracle.
A command having the number 0 is a default command. If the number of the command sent is not found in the list of the device commands, the default command is executed.
The driver supports the standard Modbus communication protocol and works as a slave. Using the driver, the Communicator waits for incoming requests and commands from a third-party device or application that works as a master. The following communication channels are supported: serial port, TCP server, and UDP. The driver can work in Modbus RTU or Modbus TCP mode.
Modbus Slave Driver features:
Modbus Slave Driver is installed in accordance with the general sequence of installing Communicator drivers. The driver library file is KpModbusSlave.dll.
First of all, create a new communication line and a new device in the configuration database, as well as in the Communicator settings. For this purpose, it is suggested to use wizards that are opened by the and
buttons. The device address matters, because this is the unit ID that the Communicator validates to respond. Then open the main parameters of the communication line, select the communication channel type and configure its properties. Examples of communication channel properties are shown below.
After creating a device in Communicator, open the the device properties form and configure the device.
Input data validity period allows to automatically set the undefined status of the device input tags, if no new data has been received from the device within a specified time.
Device template defines the Modbus register map. Device templates of the KpModbus.dll and KpModbusSlave.dll drivers are fully compatible.
Data source device is set to non-zero to transmit the input channels values received from another device into a third-party system. If the driver is used to interact with a real device, this parameter should be 0.
The following figure shows the Modbus template editor:
Modbus Slave Driver requires registration. After completing the settings, upload the project to the server using the button. Then open the Drivers page in the Administrator application, select the KpModbusSlave.dll driver, open the driver properties and register it. After registration, upload the project to the server again.
Telegram Driver is designed to send notifications using the popular Telegram messenger. The advantages of using Telegram is quickness of receiving notifications, no fee for the service and easy management of notification groups.
Telegram Driver is installed in accordance with the general sequence of installing Communicator drivers. The driver library file is KpTelegram.dll.
First you need to create a Telegram bot. To do this:
Configuring of notifications is performed using the Administrator application as part of a project. The configuring steps are:
If the settings are correct, your bot will respond to messenger commands, for example, the /help command. It is necessary to specify the subscriptions (chats) in the driver settings.
To get the ID and the name of the subscription, send the /info command using the messenger. Then add the received values using the device configuration form.
Obsolete method: to add or remove subscriptions, use the /start and /stop commands with the previously generated password. However, by default, subscription changes are blocked. To unlock it, send a standard command number 2 with a value of 1 by Communicator. Then you can add or remove subscriptions.
To send a message from Rapid SCADA to a Telegram group, you need send a binary command number 1 containing the group name (or identifier) and the message text. For example:
RapidScadaDemo; Test message.
Automatic sending of notifications in case of specific conditions and events are performed by Automatic Control Module.
Automatic Control Module automatically sends commands depending on certain conditions. Unless you register the module, it works in the demo mode. The duration of a full functional demo is limited to 10 minutes after restart. The module operates under control of the Server application. The form shown below is designed to configure the module.
Conditions required for sending commands specified as triggers of several types:
Each trigger contains a set of commands which are sent if the trigger fires. The information about firing of the triggers is accessible on the Log page or directly from the ModAutoControl.log file. This file is located in the Server logs directory C:\SCADA\ScadaServer\Log
Automatic Control Module is installed in accordance with the general sequence of installing Server modules. The module library file is ModAutoControl.dll. By adding the module, perform the following additional actions:
String data of telecontrol command, which are send on trigger firing, can contain variables. Variables are written in braces.
The following variables are supported:
Variable | Description |
---|---|
{n} | The current value of the input channel n with a unit, where n is a channel number, n = 0 is the channel specified in the data trigger |
{Now} | The current date and time on the server |
{CnlNum}, {CnlName} | Parameters of the data trigger: input channel number and name |
{CnlVal}, {CnlStat} | Value and status of the input channel those caused the trigger firing |
{EvNum}, {EvTime}, {EvObj}, {EvDev}, {EvCnl}, {EvText} | Parameters of the event that caused the trigger firing: number, date and time, object, device, channel and description |
{CtrlCnlNum}, {CtrlCnlName} | Parameters of the command trigger: output channel number and name |
{CmdVal}, {CmdDataStr}, {CmdDataHex} | Parameters of the command that caused the trigger firing: value, data as a string, data in hexadecimal representation |
The module provides real-time export data, which received from devices, in the popular databases. The supported DBMS are Microsoft SQL Server, Oracle, PostgreSQL and MySQL. This module is included in the Rapid SCADA installation package and does not require separate installation. The module library file is ModDBExport.dll.
In a project go to the Modules page, activate the ModDBExport.dll module and open its properties. The module supports export in several different databases in parallel. To add a database, click the button. The Connection page contains the parameters for connecting to the database. Specify the SQL queries on the Current Data, Archive Data and Events pages. These queries are executed by the module when new data is received by Server. The database, which is an export target, must be created and contain appropriate tables for storing data.
If some data was not timely exported, for example, if a database is unavailable, the data can be transferred in manual mode. The manual export form is opened by the button. To make manaul export possible, create the corresponding output channels in the configuration database and specify them on the form.
-- Delete channel data table if it exists
IF OBJECT_ID('CnlData', 'U') IS NOT NULL
DROP TABLE CnlData;
-- Create channel data table
CREATE TABLE CnlData (
DateTime datetime2 NOT NULL,
CnlNum int NOT NULL,
Val float NOT NULL,
Stat int NOT NULL,
PRIMARY KEY (DateTime, CnlNum)
);
CREATE INDEX idx_CnlData_CnlNum ON CnlData (CnlNum);
-- Delete events table if it exists
IF OBJECT_ID('Events', 'U') IS NOT NULL
DROP TABLE Events;
-- Create events table
CREATE TABLE Events (
DateTime datetime2 NOT NULL,
ObjNum int NOT NULL,
KPNum int NOT NULL,
ParamID int NOT NULL,
CnlNum int NOT NULL,
OldCnlVal float NOT NULL,
OldCnlStat int NOT NULL,
NewCnlVal float NOT NULL,
NewCnlStat int NOT NULL,
Checked bit NOT NULL,
UserID int NOT NULL,
Descr char(100),
Data char(50)
);
CREATE INDEX idx_Events_DateTime ON Events (DateTime);
CREATE INDEX idx_Events_ObjNum ON Events (ObjNum);
CREATE INDEX idx_Events_KPNum ON Events (KPNum);
CREATE INDEX idx_Events_CnlNum ON Events (CnlNum);
-- Insert current data
INSERT INTO CnlData (DateTime, CnlNum, Val, Stat)
VALUES (@dateTime, @cnlNum, @val, @stat)
-- Insert or update existing archive data
MERGE CnlData AS target
USING (SELECT @dateTime, @cnlNum) AS source (DateTime, CnlNum)
ON (target.DateTime = source.DateTime AND target.CnlNum = source.CnlNum)
WHEN MATCHED THEN
UPDATE SET Val = @val, Stat = @stat
WHEN NOT MATCHED THEN
INSERT (DateTime, CnlNum, Val, Stat)
VALUES (@dateTime, @cnlNum, @val, @stat);
-- Insert event
INSERT INTO Events (DateTime, ObjNum, KPNum, ParamID, CnlNum, OldCnlVal, OldCnlStat, NewCnlVal, NewCnlStat, Checked, UserID, Descr, Data)
VALUES (@dateTime, @objNum, @kpNum, @paramID, @cnlNum, @oldCnlVal, @oldCnlStat, @newCnlVal, @newCnlStat, @checked, @userID, @descr, @data)
-- Delete channel data table if it exists
BEGIN
EXECUTE IMMEDIATE 'DROP TABLE cnldata';
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE != -942 THEN
RAISE;
END IF;
END;
-- Create channel data table
CREATE TABLE cnldata (
datetime TIMESTAMP NOT NULL,
cnlnum INTEGER NOT NULL,
val FLOAT NOT NULL,
stat INTEGER NOT NULL,
PRIMARY KEY (datetime, cnlnum)
);
CREATE INDEX idx_cnldata_cnlnum ON cnldata (cnlnum);
-- Delete events table if it exists
BEGIN
EXECUTE IMMEDIATE 'DROP TABLE events';
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE != -942 THEN
RAISE;
END IF;
END;
-- Create events table
CREATE TABLE events (
datetime TIMESTAMP NOT NULL,
objnum INTEGER NOT NULL,
kpnum INTEGER NOT NULL,
paramid INTEGER NOT NULL,
cnlnum INTEGER NOT NULL,
oldcnlval FLOAT NOT NULL,
oldcnlstat INTEGER NOT NULL,
newcnlval FLOAT NOT NULL,
newcnlstat INTEGER NOT NULL,
checked INTEGER NOT NULL,
userid INTEGER NOT NULL,
descr CHAR(100),
data CHAR(50)
);
CREATE INDEX idx_events_datetime ON events (datetime);
CREATE INDEX idx_events_objnum ON events (objnum);
CREATE INDEX idx_events_kpnum ON events (kpnum);
CREATE INDEX idx_events_cnlnum ON events (cnlnum);
-- Insert current data
INSERT INTO cnldata (datetime, cnlnum, val, stat)
VALUES (:dateTime, :cnlNum, @val, :stat)
-- Insert or update existing archive data
MERGE INTO cnldata
USING dual ON (datetime = :dateTime AND cnlnum = :cnlnum)
WHEN MATCHED THEN
UPDATE SET val = :val, stat = :stat
WHEN NOT MATCHED THEN
INSERT (datetime, cnlnum, val, stat)
VALUES (:dateTime, :cnlNum, :val, :stat)
-- Insert event
INSERT INTO events (datetime, objnum, kpnum, paramid, cnlnum, oldcnlval, oldcnlstat, newcnlval, newcnlstat, checked, userid, descr, data)
VALUES (:dateTime, :objNum, :kpNum, :paramID, :cnlNum, :oldCnlVal, :oldCnlStat, :newCnlVal, :newCnlStat, :checked, :userID, :descr, :data)
-- Delete channel data table if it exists
DROP TABLE IF EXISTS cnldata;
-- Create channel data table
CREATE TABLE cnldata (
datetime timestamp NOT NULL,
cnlnum integer NOT NULL,
val double precision NOT NULL,
stat integer NOT NULL,
PRIMARY KEY (datetime, cnlnum)
);
CREATE INDEX ON cnldata (cnlnum);
-- Delete events table if it exists
DROP TABLE IF EXISTS events;
-- Create events table
CREATE TABLE events (
datetime timestamp NOT NULL,
objnum integer NOT NULL,
kpnum integer NOT NULL,
paramid integer NOT NULL,
cnlnum integer NOT NULL,
oldcnlval double precision NOT NULL,
oldcnlstat integer NOT NULL,
newcnlval double precision NOT NULL,
newcnlstat integer NOT NULL,
checked boolean NOT NULL,
userid integer NOT NULL,
descr char(100),
data char(50)
);
CREATE INDEX ON events (datetime);
CREATE INDEX ON events (objnum);
CREATE INDEX ON events (kpnum);
CREATE INDEX ON events (cnlnum);
-- Insert current data
INSERT INTO cnldata (datetime, cnlnum, val, stat)
VALUES (@dateTime, @cnlNum, @val, @stat)
-- Insert or update existing archive data
WITH upsert AS (UPDATE cnldata SET val = @val, stat = @stat
WHERE datetime = @datetime AND cnlnum = @cnlNum RETURNING *)
INSERT INTO cnldata (datetime, cnlnum, val, stat)
SELECT @dateTime, @cnlNum, @val, @stat
WHERE NOT EXISTS (SELECT * FROM upsert)
-- Insert event
INSERT INTO events (datetime, objnum, kpnum, paramid, cnlnum, oldcnlval, oldcnlstat, newcnlval, newcnlstat, checked, userid, descr, data)
VALUES (@dateTime, @objNum, @kpNum, @paramID, @cnlNum, @oldCnlVal, @oldCnlStat, @newCnlVal, @newCnlStat, @checked, @userID, @descr, @data)
-- Delete channel data table if it exists
DROP TABLE IF EXISTS cnldata;
-- Create channel data table
CREATE TABLE cnldata (
datetime DATETIME NOT NULL,
cnlnum INT NOT NULL,
val DOUBLE NOT NULL,
stat SMALLINT UNSIGNED NOT NULL,
PRIMARY KEY (datetime, cnlnum)
) ENGINE=InnoDB;
CREATE INDEX idx_cnldata_cnlnum ON cnldata (cnlnum);
-- Delete events table if it exists
DROP TABLE IF EXISTS events;
-- Create events table
CREATE TABLE events (
datetime DATETIME NOT NULL,
objnum INT NOT NULL,
kpnum INT NOT NULL,
paramid INT NOT NULL,
cnlnum INT NOT NULL,
oldcnlval DOUBLE NOT NULL,
oldcnlstat SMALLINT UNSIGNED NOT NULL,
newcnlval DOUBLE NOT NULL,
newcnlstat SMALLINT UNSIGNED NOT NULL,
checked TINYINT UNSIGNED NOT NULL,
userid INT NOT NULL,
descr CHAR(100),
data CHAR(50)
) ENGINE=InnoDB;
CREATE INDEX idx_events_datetime ON events (datetime);
CREATE INDEX idx_events_objnum ON events (objnum);
CREATE INDEX idx_events_kpnum ON events (kpnum);
CREATE INDEX idx_events_cnlnum ON events (cnlnum);
-- Insert current data
INSERT INTO cnldata (datetime, cnlnum, val, stat)
VALUES (@dateTime, @cnlNum, @val, @stat)
-- Insert or update existing archive data
INSERT INTO cnldata (datetime, cnlnum, val, stat)
VALUES (@dateTime, @cnlNum, @val, @stat)
ON DUPLICATE KEY UPDATE val = @val, stat = @stat
-- Insert event
INSERT INTO events (datetime, objnum, kpnum, paramid, cnlnum, oldcnlval, oldcnlstat, newcnlval, newcnlstat, checked, userid, descr, data)
VALUES (@dateTime, @objNum, @kpNum, @paramID, @cnlNum, @oldCnlVal, @oldCnlStat, @newCnlVal, @newCnlStat, @checked, @userID, @descr, @data)
Rapid Gate Module is designed to synchronize data between different Rapid SCADA instances. The module allows to setup a backup server, as well as provides data transfer from SCADA installed on remote locations to the primary SCADA. The module supports an arbitrary number of independent gateways for exchanging information with several Rapid SCADA servers.
Rapid Gate Module is installed in accordance with the general sequence of installing Server modules. The module library file is ModRapidGate.dll. After adding the module, perform several additional actions are needed:
To cofigure Rapid Gate Module, edit the project file ScadaServer\Config\ModRapidGate.xml with a text editor. Note that you usually need to configure the firewall on the target server to allow incoming connections to TCP port 10000.
Briefly consider the contents of the configuration file:
XML Tag | Description |
---|---|
Gate | Gateway section. The file can contain several such sections |
GeneralOptions | General gateway options |
ConnectionOptions | Remote server connection options. Password must be encrypted using the EncryptPassword.exe utility |
MappingOptions | Defines matching of channel, objects and device numbers between this server and the remote server |
TransferOptions | Options for transferring data to a remote server |
CurDataTransferOptions | Current data transfer options |
ArcDataTransferOptions | Archive data transfer options |
EventTransferOptions | Event transfer options |
InCmdTransferOptions | Options that determine receiving telecontrol commands from a remote server |
OutCmdTransferOptions | Options that determine transferring telecontrol commands to a remote server |
ArcUploadOptions | Options that determine uploading archives to a remote server |
The upload state of archives is saved during the operation of the module and is restored when the Server service is restarted. The state file is written to the Storage directory. Uploading archives is performed automatically. However, an operator can manually send a command to upload archives for a certain period. The command of the binary type must be sent using the output channel specified in the module configuration.
Command example:
cmd=ArcUpload minDT=2020-02-18 10:00:00 maxDT=2020-02-18 10:15:00
Chart Pro Plugin is the additional plugin for the Webstation application extends the capabilities of Rapid SCADA charts: adds scaling, displaying of multiple charts, export to PNG and PDF.
First you need to perform the general sequence of installing plugins, and then perform several additional actions:
Chart Pro Plugin is configured by default. Plugin settings are saved in the PlgChartPro.xml file, which is located in the project in the Webstation configuration directory. If necessary, the system administrator can change the settings by editing the existing file or creating a new settings file.
In addition to the configuration file, chart displaying is determined by the query string. The query string has the following form:
http://localhost/Scada/plugins/ChartPro/ChartPro.aspx?cnlNums=101&viewIDs=2&year=2020&month=3&day=31&mode=fixed&period=1&title=Test&config=PlgChartPro.xml
The query string parameters are as follows.
Parameter | Values | Description |
---|---|---|
cnlNums | Comma separated integers | Input channel numbers displayed on the chart |
viewIDs | Comma separated integers | View IDs for each input channel |
year, month, day | Integers | Start date of the displayed data. If not specified, the current date is used |
mode | fixed | rolling | Chart mode: fixed or rolling |
period | Integer. It can be positive or negative | Period of the chart relative to the start date. In days for fixed mode and in minutes for rolling mode |
title | String. Can be empty | Chart title |
config | String. Can be empty | Chart configuration file name relative to the web application configuration directory |
In the fixed mode, the plugin displays a chart for a selected period of time. The chart data is automatically updated by adding new values to the right side of the chart.
In the rolling mode, the plugin displays a graph from the current moment to the specified depth. The chart data is automatically updated, while the chart shifts from right to left.
The following figure helps to understand the layout of the chart in order to change the plugin configuration.
Dashboard Plugin displays useful widgets on dashboards: charts, current data and arbitrary frames, for example, CCTV camera stream. Settings of each dashboard allow to specify column count and widget aspect ratio.
First you need to perform the general sequence of installing plugins, and then perform several additional actions:
Configuration of each dashboard is stored in a separate XML file. The dashboard example, DashboardExample1.xml, is included in the plugin installation package. Dashboard files can be located in the interface directory, or in the Webstation storage directory. The 1st option is preferred.
In order to display the dashboard links in the explorer tree of Webstation, perform the following settings in the project:
The @DashboardView path suffix indicates the type of view. The access rights to dashboards are configured using the Rights table of the configuration databse. It is similar to editing the rights to table views and schemes.
In addition, dashboard files can be located in the storage directory of Webstation. In this case, click the Dashboards item of the Webstation main menu to display the list of available dashboards. Examples of the dashboard locations in the storage:
ScadaWeb\storage\allusers\Dashboard\ - dashboards available to all users;
ScadaWeb\storage\myuser\Dashboard\ - dashboards available to MyUser.
Consider the contents of a dashboard configuration file:
<?xml version="1.0" encoding="utf-8" ?>
<DashboardConfig>
<DashboardOptions>
<Name>Dashboard Example 1</Name>
<ColumnCount>2</ColumnCount>
<AspectRatio>1.33</AspectRatio>
</DashboardOptions>
<Widgets>
<Widget type="Chart" cnlNums="101,102" viewIDs="2,2" period="2" />
<Widget type="Chart" cnlNums="101,103" viewIDs="2,2" mode="fixed" period="2" title="Sample Chart" config="PlgChartPro.xml" />
<Widget type="CurData" cnlNums="101,102,103,104,105,106,107,115" viewIDs="2,2,2,2,2,2,2,2" title="Sample Data" />
<Widget type="View" viewID="2" />
<Widget type="CustomUrl" url="https://www.youtube.com/embed/EEIk7gwjgIM" />
</Widgets>
</DashboardConfig>
The DashboardOptions section contains common dashboard parameters:
Name - dashboard name,
ColumnCount - number of columns from 1 to 4 (widgets are shown in a single column anyway on small screens of mobiles),
AspectRatio - ratio of widget width to its height.
The Widgets section contains a list of widgets that are displayed on a dashboard. Number of widgets is arbitrary. However, too many widgets on the same dashboard can reduce the performance of the web application.
Widgets of the following types are supported:
Chart - a chart of the specified input channels,
CurData - a table contains current data of the specified input channels,
View - a view having the specified ID,
CustomUrl - custom web page.
Configuration of widgets of the Chart and CurData types must define input channel numbers and also identifiers of the views that include these input channels. View IDs are required for user access rights validation.
Elastic Report Plugin allows to generate reports according to a custom configuration. Using this plugin, you can build almost any desired report. A user simply selects the period and clicks the generate report button. An administrator creates report configurations which define a set of different report sections and bind report columns and rows to the system data.
First you need to perform the general sequence of installing plugins, and then perform several additional actions:
A report consists of a set of sections, which are listed in the output document, one by one. Each section has its own type, parameters, and data binding. In addition, the report has the general parameters that affect all sections. The same report can be generated in a variety of formats. Currently supported Excel, PDF and HTML formats. The appearance of the same report, generated in different formats may slightly differ.
The configuration file specifies the report format and defines the binding of the report data to the input channels. There must be a separate configuration file for each of the reporting form. The configuration file is in XML format. It must be saved in the interface directory or in its subdirectory within a project.
The plugin distributive contains the example of the report configuration file SCADA\Interface\ElasticReport\ElasticRepExample.xml. This example includes the detailed description of the settings and demonstrates the generation of the report sections of all possible types.
Configuration files may be edited using any text editor. For example, the free text editor Notepad++ supports comfortable work with XML files by the special plugin.
It is possible to customize the report styles: fonts, colors, cell sizes, etc.
The file SCADA\ScadaWeb\plugins\ElasticReport\templates\ElasticRepExcel.xml specifies the styles of the reports in Excel format.
To create custom styles, open this file in Excel and go to the Custom Styles page where the additional styles are located. Use the styles from the Default Styles page as an example.
Custom styles for PDF format are specified in the file
SCADA\ScadaWeb\plugins\ElasticReport\templates\ElasticRepPdfCustom.xml
XML file, which defines PDF styles, is edited manually using any text editor. Use the default styles located in ElasticRepPdfDefault.xml as an example.
The report styles for HTML output are configured in the file
SCADA\ScadaWeb\plugins\ElasticReport\css\customstyles.css according to the rules of Cascade Style Sheets.
To make the report visible in the list of available reports, it is necessary to specify it in the Interface table using the Administrator application. Specify the path to the report configuration file related to the interface directory, specify the ElasticRep report type and enter the report title (see the Figure). After the project is uploaded to the server, the report is available on the Main Menu > Reports page.
Map Plugin displays the status and parameters of locations on OpenStreetMap interactive maps. The plugin allows to monitor geographically distributed systems and navigate to the details page of a location.
First you need to perform the general sequence of installing plugins, and then perform several additional actions:
Map is a view in terms of Rapid SCADA. Creating and editing of maps is similar to work with scheme and table views.
Display options and map locations are stored in a file with the map extension. A map file must be placed in the interface directory or its subdirectory within a project.
The plugin installation package contains an example of the map file SCADA\Interface\Map\MapExample.map. To edit map files, use any familiar text editor, for example, Notepad++. To create your own map, create a copy the example file with a new name and edit it. The name of the map file is arbitrary, the file extension is map.
The Tiling section contains parameters for connecting to a tile server. Tiles are used for composing a map background. There are tile servers from different vendors, both paid and free.
<Tiling>
<UrlTemplate>https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png</UrlTemplate>
</Tiling>
The InitialView section specifies the initial coordinates and scale of the map. A scale is an integer from 0 to 18.
<InitialView>
<Lat>48.861111</Lat>
<Lon>2.336389</Lon>
<Zoom>13</Zoom>
</InitialView>
The Locations section describes a set of locations that are displayed on the map. Let's consider an example:
<Locations>
<Location>
<Lat>48.858222</Lat>
<Lon>2.2945</Lon>
<Name>Eiffel Tower</Name>
<Descr>Avenue Anatole France, Paris, France</Descr>
<StatusCnlNum>0</StatusCnlNum>
<Data>
<DataItem cnlNum="101" />
<DataItem cnlNum="115">Avg. temp</DataItem>
</Data>
<Link viewID="2" />
</Location>
...
Lat и Lon - latitude and longitude of a map location,
Name - location name,
Descr - additional description,
StatusCnlNum - number of an input channel which means the status of this location; 0 - channel not specified; positive channel value means the location is normal, otherwise the location needs attention,
DataItem - displayed data item associated with an input channel,
Link - reference to a view that contains detailed information about the location.
To make the map visible in the tree of views, it is necessary to register it in the Interface table using the Administrator application. Specify the path to the map file relative to the interface directory and enter the title which is the text of the tree node (see the figure).
To display the changes in the the Web Station application, upload the project to the server and re-login the web application. The result is:
Notification Plugin helps an operator to pay attention to the most important events. The plugin generates notifications based on events according to specified rules and displays them in the notification panel that appears on the right side of the web page. In addition, the plugin turns on an audible alert depending on the notification type.
First you need to perform the general sequence of installing plugins, and then perform several additional actions:
If the plugin is installed correctly, there is a bell in the top right corner of the web page.
Configuration of the Notification plugin is stored in the PlgNotification.xml file. This file must be included into the project and locate in the configuration folder of Webstation. On runtime the plugin configuration file locates in C:\SCADA\ScadaWeb\config\
Consider the contents of the configuration file:
XML Tag | Description |
---|---|
GeneralOptions | Section of general options |
EvPeriod | Period (in days) of taking events to create notifications |
DispNotifCnt | Number of displayed notifications |
NotifOptions | Section containing the options determine how to generate notifications |
InfoCondition WarningCondition ErrorCondition |
Specify the conditions of generating notifications of the information, warning and error types |
Statuses | Input channel statuses that cause a new notification |
ParamIDs | Quantity IDs of an input channel allowed to notification |
Tips | Section that specifies the notification tips |
Tip | Section determines a one tip |
TipCondition | Condition of the tip |
Link | If defined, specifies link to navigate by the tip |
Html | Tip markup instead of link |
The Auto Report application is designed to automatically generate various reports, save them to disk and send by email. The schedule for generating reports is set using Automatic Control Module. Sending reports by email is provided by the corresponding KpEmail.dll driver, which is included in the standard Rapid SCADA installation.
The following types of reports are supported:
Auto Report works as a service. It connects to the Server application and is permanently ready to receive commands. Automatic Control Module, which operates as part of Server, sends commands to execute tasks for generating reports at specified time. Due to a command, a set of reports is generated and saved to disk in a format of office files or archive. If the corresponding option is set, the Auto Report application passes a command to Server to send the generated reports by email.
The configuration of Auto Report is stored in the file C:\SCADA\ScadaAutoReport\Config\ScadaAutoReportConfig.xml. To edit the configuration, the ScadaAutoReportConfig.exe application is intended. Its user interface is shown in the following figures:
To make Auto Report work, it is necessary to perform certain settings in the project:
Actions 1, 2, and 3 are shown in the following figures:
The settings of Automatic Control Module (item 4) are shown below:
An example of Communicator settings for sending emails (item 5) is contained in the DemoProject.en-GB.rsproj project. The following figure shows the device properties:
After completing the configuration or changing the existing configuration, restart the Auto Report service. To do this, run the file ScadaAutoReport\svc_restart.bat as administrator or use the Windows management console. The service name is ScadaAutoReportService.
To perform a check, run a task of generating report by the Administrator application. Open the Generator form and send a standard command, specifying the control channel that is responsible for generating reports. In this example, the output channel number is 201. Use the task ID as the command value. Then check the log files located in the directory C:\SCADA\ScadaAutoReport\Log\
If the application works well, generated reports are saved in the directory specified in the general options, by default C:\SCADA\Reports\
This article describes how to configure communication with devices using Modbus protocol. Simple and robust, Modbus has since become a de facto standard communication protocol, and it is now a commonly available means of connecting industrial electronic devices (see Wikipedia). Rapid SCADA supports Modbus RTU, ASCII and TCP modes.
The general sequence of configuring:
The following is a step by step guide to setup a new Modbus device.
Run Administrator and click the New Project button. Enter a project name in the dialog and click the OK button. The setup process fully consistent with the article if the empty project named EmptyProject.en-GB is selected as a template.
Fugire 1. Creating a project
Expand the Configuration Database node, open the Objects table and add a new row for the object 2 "Test object" (see Figure 2). Click the toolbar button to open the communication line wizard. Using the wizard, add the line 1 "Test line" (see Figure 3). After that click the
button and add the device 1 "Test device" (see Figure 4).
Fugire 2. Adding an object
Fugire 3. Adding a communication line
Fugire 4. Adding a device
Pay attention to the following fields when adding a device:
Device type: | Modbus |
Address: | Modbus address of your device, for example, 1 |
Call number: | IP address, if the device is connected via Ethernet. Otherwise, leave blank |
Communication line: | "Test line", which was recently created |
Open the Communication lines and Devices tables to check that the communication line and device were successfully added to the tables. Make sure that the corresponding communication line and device were created in the Communicator settings.
In the project explorer, go to the Communicator settings, expand the node of the just created communication line and double click the Line Parameters node. Configure the communication channel which settings are presented on the Main Parameters page (see Figure 5). In case of Modbus communication, the most common channel types are TCP client and Serial Port.
Figure 5. The main parameters of the communication line
If communication is performed via a serial port, the typical serial port parameters, depending on the Modbus type, are listed in the table below. In the RTU and ASCII modes, the baud rate specified in the Communicator settings and set on the devices must match. All devices connected to a one communication line must operate using the same Modbus type and with the same baud rate.
Modbus RTU | Modbus ASCII | Modbus TCP |
---|---|---|
8 data bits, Even parity, 1 stop bit |
7 data bits, Even parity, 1 stop bit |
- |
8 data bits, No parity, 2 stop bits |
7 data bits, No parity, 2 stop bits |
- |
Go to the Request Sequence page and select the "Test device" row (see Figure 6). If device polling time and period are not specified, the devices are polled cyclically. Commands are sent immediately after a poll is completed.
Figure 6. Device request sequence
Click the Properties button to open the device properties form (see Figure 7). In the form choose the Modbus type, which have to be specified in the device manual. In our case, Modbus TCP.
Figure 7. Device properties
Press the button to select an existing device template, or click
to create a new template. When the create button
or the edit button
is clicked, the Device Template Editor is shown (see Figure 8). This article uses the existing template KpModbus_Adam6015.xml, which was previously copied to the project directory C:\SCADA\Projects\ModbusTest\Instances\Default\ScadaComm\Config\
Figure 8. Device template editor
Device template reflects the structure of Modbus packages. Requested data are combined into groups of elements. Each group has its name, data table, start address and element count. Each element is a tag of a device. Rapid SCADA identifies a tag by its signal number. A command is described by its name, data table and address. A command number identifies the command within Rapid SCADA.
Names of groups, elements and commands are arbitrary. The available data tables and element addresses are usually described in device manual. Depending on the manufacturer, addressing of elements can be zero-based or one-based, specified as decimal or hexadecimal numbers. By default, addresses start with 1 and represented as decimals. To switch template addressing, click the button. Template settings dialog is opened (see Figure 9).
Figure 9. Template settings
When editing the device properties (see Figure 7) is completed, click OK. The Command line field of the device parameters contains the template file name KpModbus_Adam6015.xml. Upload the project to the server by the button.
Double click the device node in the project explorer to check device status and data availability (see Figure 10). Data for this example was provided by Modbus Simulator.
Figure 10. Device data
In case of losing communication with the device, use a communication line log to realize the problem cause. To open the log, double click the Line Stats tree node and go to the Line Log page. Data packages can be decoded by Online Modbus Parser.
After communication with the device is established, create input channels and output channels in the configuration database. The most fast way to create channels is the wizard called by the button. If several devices of the same type are added to the system, configuring can be accelerated by the channel cloning tool.
Perform the wizard steps (see Figures 11-13), selecting the communication line, device and object created earlier from the drop-down lists. To check the available channel numbers, use the channel map in step 3.
Figure 11. Creating channels. Step 1
Figure 12. Creating channels. Step 2
Figure 13. Creating channels. Step 3
Clicking the Create button creates channels. The channels are created automatically based on the device template that has been created and assigned to the device in the previous section of this article. To view created channels, open the Input channels > Test device table and the Output channels > Test device table. It is recommended to manually fill in the Quantity and Unit fields of the input channels and the Command values field of the output channels. However, in the case of the first experiment it is unnecessary. Useful to understand that the input channels are bound to the device tags using the Signal field. The output channels are bound to device commands in accordance with the Command number field.
After editing the configuration database is complete, upload the project to the server by the button. Open the device data page in the Communicator settings and make sure that the input channels are bound to the device tags. The Channel column must contain numbers of the created input channels (see Figure 14).
Figure 14. Device data bound to channels
As a result of above actions, data should be collected from the device and stored in the archive. It remains to customize user interface for an operator.
Consider creating a table view for the Webstation application. If it is necessary to display data on a scheme, the steps to create a view are similar.
Right click the Interface node of the project explorer. First, select New Folder in the context menu and create the ModbusTest folder. Then in the context menu of the created folder, select New File (see Figure 15). In the opened window, set the table view type, specify the filename ModbusDevice.tbl and click the OK button (see Figure 16).
Figure 15. Menu for creating a view
Figure 16. The view creation dialog
The created view file appears in the project explorer. Double clicking the file opens Table Editor. Enter a title and fill in the view items, as shown in Figure 17. Save the changes and close the editor.
Figure 17. Editing a view
After the view file is created, specify the parent directory and the file in the Interface table of the configuration database (see Figure 18).
Figure 18. Adding a view in the Interface table
Upload the project to the server by the button. Now start your browser and enter the address http://localhost/scada/. On the login form use admin / 12345 (see Figure 19). If the configuration carried out correctly, after logging in, you will see a table with the data obtained from the device, similar to Figure 20.
Figure 19. Login form
Figure 20. The Webstation application
Received element values may need a conversion. A device template allows choosing a number of bytes used by an element and order of bytes. These settings define an initial conversion. An additional conversion, if needed, is performed by SCADA-Server based on formulas of input channels in the configuration database.
The simplest conversion is a proportional which is described by the following formula:
X * (B - A) / 2N + A, where A and B are the bounds of the element values range, N – number of bits in value, X – received value.
Another commonly used conversion is two’s complement. See Wikipedia for the details. Formulas can be defined inline in input channel rows of the configuration database or separately by using the Formulas table. Using of formulas is described in this section.
This article describes how to configure communication with devices using OPC standard. OPC is designed to provide a common bridge for the software and process control devices from different manufacturers (see Wikipedia). Rapid SCADA supports the following OPC specifications:
Rapid SCADA implementation of OPC client is provided by the Communicator application, to be exact, by KpOpc.dll driver. The goal of this article is learning about the details of Communicator configuring for using OPC.
The general configuration sequence:
The details of the above steps, excluding the step #4, are described in the Software Configuration section. It is recommended to see the project DemoProject.en-GB, which is installed together with Rapid SCADA. Device 21 "OPC Demo" is an example of using OPC. The device tags are displayed by the table view OpcDemo.tbl. This example requires MatrikonOPC Simulation Server, which provides data.
Create a separate communication line for each OPC server that is used. This is the most efficient approach because it allows communicating with the OPC servers in parallel. Set Undefined communication channel type for the created communication lines in Communicator. Then add devices to the communication lines.
Go to the Communicator settings and open the device properties. The configuration form, shown in Figure 1, allows to select which OPC tags are received from OPC server.
Figure 1. Selecting OPC tags
OPC servers installed on the local computer are available to Communicator. If data from an OPC server, installed on another computer within a network, are required, deploy an extra instance of Communicator on that computer and properly configure it to connect to the Server application.
There are two ways how to bind OPC tags to input channels of the configuration database:
Select the way that is more suitable in a particular configuration of an automated system.
When the configuration is completed, upload the project to the server by the button. Check OPC communication state and received data using Communicator logs (see Figure 2). If the data in Communicator seem to be true, open a browser and look for the same data in the Webstation application.
Figure 2. Values of OPC tags
Known issue of using OPC: unable to receive data from OPC server while OPC tag properties are available in the device configuration form, no error messages are raised.
Possible reason is that the Communicator service operates as system user but OPC server forbids interacting with system user.
Solution 1. Specify a user account that is used to run OPC server. To open DCOM configuration (see Figure 3), follow the path Control Panel\System and Security\Administrative Tools\Component Services or just run comexp.msc
Figure 3. DCOM configuration
Solution 2. Specify a user account that is used to run the Communicator service. Go to Control Panel\System and Security\Administrative Tools\Services or run services.msc, find ScadaCommService and open the service properties. Then enter user account and password on the Log On page as shown in Figure 4. The specified user must be a computer administrator.
Figure 4. Service properties