0% found this document useful (0 votes)
116 views92 pages

Manual RapidScada

Rapid SCADA is an open-source software platform designed for creating automated systems in various domains such as industrial and home automation, energy accounting, and security systems. It supports multiple communication protocols, allows for extensive customization through additional drivers and modules, and features a multi-tier architecture with applications for data management, user interface, and configuration. The software ensures secure access through user rights management and Active Directory integration, making it suitable for complex enterprise solutions.

Uploaded by

melin2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views92 pages

Manual RapidScada

Rapid SCADA is an open-source software platform designed for creating automated systems in various domains such as industrial and home automation, energy accounting, and security systems. It supports multiple communication protocols, allows for extensive customization through additional drivers and modules, and features a multi-tier architecture with applications for data management, user interface, and configuration. The software ensures secure access through user rights management and Active Directory integration, making it suitable for complex enterprise solutions.

Uploaded by

melin2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 92

Software Purpose and

Characteristics
Rapid SCADA provides creation of automated systems of the following types:

 Industrial automation systems.


 Home automation systems.
 Energy accounting systems.
 Security and fire alarm systems.
 Access control systems.
 Any systems that contain controllers, sensors and relays.

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 TCP


applications

Writing application and user actions to log files Yes

Disable telecontrol commands option Yes

Extensible functionality Yes

The software is open source Yes


Software Architecture
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:

1. Webstation is a web application that displays information to a dispatcher via browser in


different forms (tabular, schematic, diagrams, reports) and provides sending commands.
2. Server manages the archive database, performs mathematical calculations and provides
information to the client applications.
3. Communicator interacts with controllers, transmits data to Server application.

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.
Description of Applications

Server Application
Server manages the archive database, 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. Server application

Server consists of a Windows service and a graphical shell. The shell is shown in Figure 1.
The service does not have user interface. It operates continuously in the background
regardless of user login and logout.
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 text log files. Server is designed for non-stop running.

Additional server modules allow extending the functionality of Server according to customer
requirements.

Communicator Application
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. Communicator application


Communicator consists of a Windows service and a graphical shell. The shell is shown in
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 libraries (drivers) to interact with a
variety of controllers.

Webstation Application
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.

Administrator Application
Administrator is designed to manage the configuration of the system (see Figure 1).
Configuring is a process of editing the configuration database, which is a structured
description of the entire automated system.
Figure 1. Administrator application

The key features of Administrator designed for fast creating and comfortable modifying the
configuration database are listed below:

1. Import and export between different configuration databases allows reusing developments.
2. Channels clone function minimizes manual input.
3. Automated creation of channels based on the available devices.
4. Backup the configuration database.

Table Editor Application


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.

There are two options how to bind output channels to items of a view:

1. Specify output channel numbers explicitly using Table Editor.


2. Run the Administrator application, open the Input channels table and fill the Output
channel field of an input channel. Then add the input channel to a view by Table Editor.

Hidden items of a table view are not displayed but they affect event filtering by view in
the Webstation application.

Scheme Editor Application


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.

Installation and Run


System Requirements
Windows Server Software
Requirements
 Operating system: Microsoft Windows Server 2008 or later, Microsoft Windows 7 or later.
 Microsoft .NET Framework 4.
 Microsoft IIS is required to deploy the web application.

Linux Server Software Requirements


 Operating system: Ubuntu, Debian and derivatives.
 Mono .NET Framework 3.2.8 or higher.
 XSP4 web server.

Server Hardware Requirements


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.

Workstation or Tablet Requirements


 Modern browser: Chrome, Firefox, Safari or Edge.
 Microsoft Silverlight is required by Scheme Editor.
 Microsoft Office 2003 or later is required to view reports.

Software Installation
Before Installation
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

Installation
Execute ScadaSetup.exe to start installation. A user account that has administrative rights
should be used. The installer is shown in Figure 5.

Microsoft .NET Framework 4.0 is required to run Rapid SCADA. It will be installed
automatically during the installation process if necessary. In case of using outdated
operating system such as Windows XP or Windows Server 2003, Microsoft .NET
Framework 3.5 SP1 has to be downloaded and installed first.

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 Installation
Manual Rapid SCADA setup provides full control over the process of the software
installation and uninstallation. Manual installation could be used when installing Rapid
SCADA on obsolete operating systems, such as Windows XP and Windows Server 2003
that are not officially supported.

The manual installation sequence:

1. Install Microsoft Internet Information Services (IIS) by selecting the appropriate Windows
features. If Windows 7 is used, open Control Panel > Programs > Turn Windows features
on or off.
2. Install Microsoft .NET Framework 4+ (install IIS before the framework).
3. Unzip files from the Arc folder of the installation pachage to the SCADA installation
directory. Recommended destination is C:\SCADA
4. Open IIS management console: Control Panel > System and Security > Administrative
Tools > Internet Information Services (IIS) Manager.
5. Add a web application to the site tree. Right click the appropriate site, Default Web Site in
most cases, then choose the Add Application menu item.
6. Enter the application alias: Scada. Check that the selected application pool uses .NET 4.0
runtime version and integrated pipeline mode. Specify the physical path to the web
application files: C:\SCADA\ScadaWeb. Then click OK.
7. Register ScadaServerService by executing ScadaServer\svc_install.bat as administrator.
8. Register ScadaCommService by executing ScadaComm\svc_install.bat as administrator.
9. Create shortcuts for the applications on the desktop if necessary.
10. Install Microsoft Silverlight required for the Scheme Editor application.
11. Run the applications.

The manual uninstallation sequence:


1. Delete Scada web application using IIS Manager.
2. Stop ScadaServerService and ScadaCommService services, close all the applications of
Rapid SCADA.
3. Unregister ScadaServerService by executing ScadaServer\svc_uninstall.bat as
administrator.
4. Unregister ScadaCommService by executing ScadaComm\svc_uninstall.bat as
administrator.
5. Delete SCADA folder from the hard disk and delete the shortcuts from the desktop.

Installation of Additional
Modules
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.

Installation of Server Modules


The sequence of installing a new or updating an existing module of the Server application:

1. Stop the Server service using the button, and close the Server graphical shell.
2. Unzip the module installation package.
3. Copy all the files from the SCADA folder of the module installation package to the Rapid
SCADA installation directory, the default is C:\SCADA, with the hierarchy of directories
retained.
4. In case of using Windows 8 or higher, find C:\SCADA\ScadaServer\Mod\Mod*.dll, open the
file properties and unblock the file.
5. Run the Server graphical shell and go to the Modules page.
6. Click the button, then use the file dialog to select the module library and apply the
changes with the button.
7. Start the Server service using the button.
8. Perform the configuration of the module specified in the module documentation.

Installation of Communicator Drivers


The sequence of installing a new or updating an existing driver of the Communicator
application:

1. Stop the Communicator service using the button, and close the Communicator graphical
shell.
2. Unzip the driver installation package.
3. Copy all the files from the SCADA folder of the driver installation package to the Rapid
SCADA installation directory, the default is C:\SCADA, with the hierarchy of directories
retained.
4. In case of using Windows 8 or higher, find C:\SCADA\ScadaComm\KP\Kp*.dll, open the file
properties and unblock the file.
5. Run the Communicator graphical shell, then start the Communicator service using the
button.
6. The driver is ready to use.

Installation of Webstation Plugins


Additional modules for the Webstation application are called plugins. The installation
sequence for a new plugin:

1. Unzip the plugin installation package.


2. Copy all the files from the SCADA folder of the plugin installation package to the Rapid
SCADA installation directory, the default is C:\SCADA, with the hierarchy of directories
retained.
3. In case of using Windows 8 or higher, find C:\SCADA\ScadaWeb\bin\Plg*.dll, open the file
properties and unblock the file.
4. Login the web application as administrator and go to Main Menu > Plugins > Installed.
5. Find the new plugin on the page and click the Activate link.
6. Perform the configuration of the plugin specified in the plugin documentation.

Run Applications
The applications of Rapid SCADA can be started using the shortcuts that located in Start >
Programs > SCADA or using executable files directly.

The Server and Communicator applications consist of two main parts:

1. A Windows service which runs in the background.


2. A graphical shell designed for configuration and control the service.

The default startup type of the Server and Communicator services is Automatic, i.e. the
services start when an operating system starts, and services stop when the OS stops. If
auto start is not necessary, Manual startup type could be set (see Figure 1). To open a
service properties follow Control Panel > System and Security > Administrative Tools >
Services. The services names are ScadaCommService and ScadaServerService.
Figure 1. Setting Windows service startup type

Webstation is a web application which is accessible via a browser such as Chrome, Mozilla
Firefox or Microsoft Edge. The address looks like 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

If the selected installation directory differs from the recommended directory C:\SCADA, the
directory settings of the applications should be checked and adjusted at the first using if
necessary.

Migrate Configuration to New


Server
The typical tasks when Rapid SCADA migration to another server is needed:
 The software deployment on a production server when the configuration has been done
using a developer workstation.
 Server replacement.

Configuration migration sequence:

1. Ensure that connections between the server and the devices are properly configured: the
required serial ports exist, industrial controllers available via the network, etc.
2. Install Rapid SCADA on the new server, but do not start Server and Communicator
services.
3. Stop Server and Communicator services on the obsolete server. Set Manual startup type of
these services.
4. Copy the content of the directories listed below from the obsolete server to the new server
(default directories are shown):
C:\SCADA\BaseDAT
C:\SCADA\BaseSDF
C:\SCADA\Interface
C:\SCADA\ScadaComm\Config
C:\SCADA\ScadaServer\Config
C:\SCADA\ScadaWeb\config
5. Copy the data archive located in the following directories from the obsolete server to the
new server:
C:\SCADA\ArchiveDAT
C:\SCADA\ArchiveDATCopy
6. Start Server and Communicator services on the new server.
7. Check logs.

Software Update
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.

Only being sure that the new version of Rapid SCADA is operates properly on the test
environment, installation on the production server is allowed.

Updating software sequence:

1. Make a backup copy of the all files of Rapid SCADA which located in C:\SCADA directory
by default.
2. Uninstall Rapid SCADA using the installer application ScadaSetup.exe.
3. Install a new version of Rapid SCADA and migrate the configuration from the backup copy.
4. Clear the browser cache or refresh the web application pages by pressing Shift + F5.
Software Configuration
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
Administrator application.
2. Pass the configuration database to Server by pressing button located in Administrator
toolbar. Restart the Server service.
3. Import communication lines and devices from the configuration database into
Communicator. The import feature is accessible in the communication lines popup menu by
pressing button.
4. Configure communication with devices in Communicator.
5. Accomplish tuning up the configuration database using Administrator.
6. Create views (tables or schemes) using Table Editor or Scheme Editor applications.
7. Define the created views in the configuration database in order that they appear in the
Webstation 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 the Administrator application. The edited
instance of the configuration database is in SDF file format of Microsoft SQL Server
Compact Edition. After completing the necessary changes an administrator clicks button
to convert the database in a specially designed DAT format which is used by the other
applications. Such 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 table describes the configuration database tables.

Table Name Description

System Group

Objects Contains logical objects which input data and commands are
related to

Communication Describes communication lines which are used to exchange data


lines with devices

Devices Contains real or virtual devices

Input channels Defines data received from the devices and data calculated on their
base

Output channels Specifies commands executed by the system

Roles Contains roles. Each role defines a set of functions available to


users

Users Contains a list of users of the system and their roles

Interface Contains descriptions of interface objects (views, reports and data


windows) which require different access rights
Rights Defines relationships between the roles and the interface objects

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 which correspond to the input
channel statuses

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 following list is a sequence of working with the configuration database in the
Administrator application:

1. Create a backup copy of the existing database by pressing button. In addition, the
Administrator application automatically saves a copy of the database before passing it to
Server.
2. If the sample data are not needed, clear the tables of the System group. According to
relations between the tables, start clearing from the Rights table and continue till
the Objects table. Do not delete rows with identifiers from 0 to 4 of the Roles table.
3. Enter data in the tables of the System group. Use the opposite order starting from
the Objects table and finishing by Rights table. There are Create channels and Clone
channels features designed for fast automatic filling the Input channels and Output
channels tables.
4. Pass the configuration database to Server using button.

It is possible to significantly speed up a process of system configuration by using the past


works. The 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

The Create channels feature (see Figure 2), which is accessible in Service menu, allows
automatic filling the Input channels and Output channels tables using information about
existing objects and devices. Rules for creating channels are defined in device libraries
(drivers) of Communicator. The device libraries are located in C:\SCADA\ScadaComm\KP\
by default. If a DLL file, specified in the Device types table, does not exist, the creation of
channels corresponding to that device type is impossible. Channels are created according
to the settings of Communicator.
To create input and output channels, tick the appropriate devices, choose or keep
undefined the object for the each device, click the Calculate channel numbersbutton, check
the calculated numbers, then click the Create button.

Figure 2. Create channels feature

The 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.
Figure 3. Clone channels feature

Editing of input channels may be done either directly in a table or by using the form that is
shown in Figure 4. Right click an input channel row to show popup menu and click the
menu item to open this form.
Figure 4. Editing input channel properties

The 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 click
the Database > Compact main menu item.

Using Formulas
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 contained by the Input channels and Output channels tables of the
configuration database. To enable the formula, tick the appropriate checkbox in
the Formula used column. The Formulas table stores additional functions and data
structures which can be used in formulas for input and output channels.

The general rules of using 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, Server operation is impossible. Information about
errors in formulas is written in the Server application log.

The rules of using formulas for input channels:

1. For channels of types Discrete and Real calculation starts when the channels data are
received by Server. Use these channel types if formula does not refer to data of other
channels.
2. For channels of types Calculated * and Switching counter calculations are performed
permanent and ordered by channel numbers. A formula of a calculated channel usually
refers to data of other channels.
3. For channels of types Minute * and Hourly * calculation starts periodically once per minute
or once per hour. Use these channel types to create accumulated values, for example,
energy consumption or operating time.
4. For channels of types Discrete and Real statuses of the channels after calculating are
equal to the statuses of these channels received by Server if status calculation does not
specified explicitly.
5. For channels of the other types the statuses set to Defined 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 of using 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 Description


Type

CnlVal, Cnl double The input channel value transmitted to Server before
calculation
CnlStat int The input channel status transmitted to Server before
calculation

CmdVal, double The command value transmitted to Server before calculation


Cmd

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 Description


Type

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, double Sets the current value and status of the channel n
stat)

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, 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 Administrato Full access


r

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 application interact with Active Directory, specify domain controller path
and tick the nearby checkbox on Common Parameters page of the application.

The 2nd authentication method is used if the standard roles are enough to manage user
rights. The benefits of this method are that rights management is performed using usual
Active Directory tools without editing the configuration database and restarting the Server
application.

To use the 2nd 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 3rd method combines the capabilities of the 1st and the 2nd methods. User credentials
check is performed by 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 defined in
the Users table, but user passwords are kept blank in the table.

Simultaneous use of all the above authentication methods is allowed.

Communication with Devices


Configuration
Interaction with real or virtual devices is performed by the Communicator application 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 1 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 the Request Sequence page (see
Figure 2).

Figure 1. Communication line parameters


Figure 2. Request sequence

If the Active checkbox on the Communication Line Parameters page is unset, the
appropriate communication line is disabled, and no requests are performed. If
the Active checkbox in the Selected device group box is unset, communication with the
appropriate device is disabled.

The Bound to server checkbox on the Communication Line Parameters page allows to
switch on or switch off sending the communication line data to Server.
The Bound checkbox in the Selected device group box has the similar purpose, but only for
the device. If the Use SCADA-Server checkbox on the Common Parameters page is unset,
any interaction between Communicator and Server is switched off. These options are
useful for testing new devices connecting to the system.

If the Time and Period request parameters of a device are equal to 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. The Timeoutfield 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 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 a popup menu of the tree. To set global properties for a
device type choose the Device Libraries page, select the device library and click
the Properties button if the button is enabled.

The import feature significantly speeds up configuring Communicator (see Figure 3). This
feature is allowable if the Use SCADA-Server checkbox on the Common Parameters page
is set and the Server service is running. To start import, click button. Such button is
located on the Request Sequence page and in a popup menu of the tree. The import
feature adds communication lines and devices to the Communicator configuration using the
information of the configuration database.

Click to update the Communicator settings according to the configuration database.


Names of the communication lines and properties of the devices are affected. Be careful
not to lose settings made manually.

Figure 3. Import devices

Creating Views
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 other types of views can be
added by installing additional plugins.
Special editors are designed to create views: Table Editor and Scheme editor. Views are
stored in files which must be located in the interface directory (or its subdirectory) that is
specified in the settings of the Server application. The default interface directory is C:\
SCADA\Interface\

Examples of view files:


C:\SCADA\Interface\Servers\ServerRoom.sch - scheme,
C:\SCADA\Interface\Servers\ServerRoom.tbl - table view.

When view files are created, they must be defined in the Interface table of the configuration
database by the Administrator application as shown in Figure 1. View ID is an arbitrary
unique number. View path is relative to the interface directory. View title is shown in the
explorer tree of Webstation.

Figure 1. Editing the Interface table

To apply the changes, send the database to Server by the button, restart the Server
service by the button, then logout and login again the web application.

Modules
Telegram Driver
Overview
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 notification group management.

Installation
Telegram Driver is installed in accordance with the general sequence of installing
Communicator drivers. The driver library file is KpTelegram.dll.

Configuring
Creating Telegram Bot
First you need to create a Telegram bot. To do this:

1. Install the application and register Telegram.


2. Add the bot named BotFather to the contact list.

3. In the dialog with BotFather, run the command /newbot and follow the instructions from
BotFather.
4. Click the menu icon and create a new group to receive notifications.

5. Add the bot you created to the new group.


6. Add contacts to the new group. These contacts will receive notifications.

Driver Settings
Configure notifications in the following sequence:

1. Using the Administrator application, open the Device types table and check that the device
type "224 Telegram" exists. If the specified record is missing, enter it manually.
2. Using Administrator, create a separate communication line and a single device of the
Telegram type that belongs to this communication line.
3. Import the created communication line and the device to Communicator. Enable sending
commands for the communication line.
4. Using Communicator, open the device properties, enter the bot token obtained when
creating the bot, and generate a bot password that is needed to manage subscriptions.

5. Go to the Registration page and register the driver using the hyperlinks on the form.

6. Save the driver configuration.


7. Restart the Communicator service by clicking .
Manage Subscriptions
If the settings are correct, your bot will respond to commands, for example, the /help
command.

To add or remove subscriptions to the group, 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. Now
you can add or remove subscriptions.
Sending Messages
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: RapidScadaBotTestGroup; Test message.

Automatic sending of notifications in case of specific conditions and events are performed
by Automatic Control Module.

Automatic Control Module


Overview
Automatic Control Module allows to automatically send 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 works 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:

 Channel data trigger. The trigger fires if value or status of the input channel satisfies the
condition.
 Event trigger. The trigger fires if an event satisfies the condition occurs.
 Time trigger. The trigger fires on the specified dates and times.
 Command trigger. The trigger fires if the Server application receives the specified
command.
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 Server logs directory C:\SCADA\
ScadaServer\Log

Installation
Automatic Control Module is installed in accordance with the general sequence of installing
Server modules. The module library file is ModAutoControl.dll. After adding the module,
you need to perform several additional actions:

1. Click the Properties button to open the module configuration form


2. Go to the Registration page and register the module using the hyperlinks on the form.
3. Configure the module by creating triggers and commands.
4. Save the module configuration.
5. Restart the Server service by clicking .

Variables of Telecontrol Commands


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}, Parameters of the event that caused the trigger firing:
{EvDev}, {EvCnl}, {EvText} number, date and time, object, device, channel and
description

{CtrlCnlNum}, {CtrlCnlName} Parameters of the command trigger: output channel


number and name

{CmdVal}, {CmdDataStr}, Parameters of the command that caused the trigger


{CmdDataHex} firing: value, data as a string, data in hexadecimal
representation

Export to Database Module


Overview
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. To use the module, first create database tables for storing the information. The
module settings must contain database connection parameters and SQL scripts, which are
executed by the Server application when new data received.

Examples of Tables and SQL Queries


Microsoft SQL Server
-- 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)

Oracle
-- 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, :oldCnlSta
t, :newCnlVal, :newCnlStat, :checked, :userID, :descr, :data)

PostgreSQL
-- 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)

MySQL
-- 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


Overview
Rapid Gate Module is designed to synchronize data between several 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.

Installation
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, you
need to perform several additional actions:

1. Open the module log C:\SCADA\ScadaServer\Log\ModRapidGate.log in a text editor and


copy a computer code.
2. Register the module by contacting the developers or using the trial key generator. A
register key must be stored in C:\SCADA\ScadaServer\Config\ModRapidGate_Reg.xml
between RegKey tags.
3. Configure the module (see the section below).
4. Restart the Server service by clicking .

Configuring
To cofigure Rapid Gate Module, edit C:\SCADA\ScadaServer\Config\ModRapidGate.xml
using a text editor. The settings contains the connection parameters for the SCADA server
(target server) to which data are transferred and from which commands are received.

Note that you usually need to configure the firewall on the target server to allow
connections with it over the network.
Algorithm
The algorithm of Rapid Gate Module has the following features:

1. The module transmits only the data that are received from Communicator. The values of
the calculated input channels are not transmitted.
2. The data is transmitted to the same input channel numbers to which they are received.
3. The transmitted values are already calculated by the formulas of the input channels, which
can result in double applying of the formulas on the target server. Therefore, when using
the module, it is recommended that calculations be performed in separate input channels of
the calculated type.
4. The module has a data transfer queue, which allows restoring data in case of a short-term
connection failure with a target server.

Chart Pro Plugin


Overview
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.

Installation
First you need to perform the general sequence of installing plugins, and then perform
several additional actions:

1. Go to Main Menu > Registration > Chart Pro.


2. Register the plugin using the hyperlinks on the page.
3. Go to Main Menu > Configuration > Web application.
4. Find the Chart plugin parameter, select the Chart Pro plugin from the dropdown list and
click the Save Configuration button.

Dashboard Plugin
Overview
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.

Installation
First you need to perform the general sequence of installing plugins, and then perform
several additional actions:

1. Go to Main Menu > Registration > Dashboard.


2. Register the plugin using the hyperlinks on the page.

Configuring
A configuration of each dashboard stored in a separate XML file. The plugin installation
package contains a dashboard example which installs into:

C:\SCADA\ScadaWeb\storage\AllUsers\Dashboard\DashboardExample1.xml

To create a custom dashboard, copy the example configuration file with a new name, and
then edit it using any text editor. Configuration file name may be arbitrary, file extension
must be XML. The locations of dashboard configuration files:

C:\SCADA\ScadaWeb\storage\allusers\Dashboard\ - dashboards available to all users;


C:\SCADA\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="CurData" cnlNums="101,102,103,104,105,106,107,115"
viewIDs="2,2,2,2,2,2,2,2" />
<Widget type="CustomUrl"
url="https://www.youtube.com/embed/xs8Tqkr-Gn4" />
</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 - chart of the specified input channels,
CurData - table contains current data of the specified input channels,
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


Overview
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.

Installation
First you need to perform the general sequence of installing plugins, and then perform
several additional actions:

1. Go to Main Menu > Registration > Elastic Report.


2. Register the plugin using the hyperlinks on the page.
Report Configuring
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.

Report Configuration File


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, C:\
SCADA\Interface by default, or in its subdirectory.

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.

Report Styling
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 Stylespage 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.
Add Report in Configuration Database
To make the report visible in the list of available reports, it is necessary to register 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).

Then pass the configuration database to the Server application by clicking the button.
To apply the changes, logout the Webstation web application and login again. The report is
available on the Main Menu > Reports page.

Use Cases
Connecting Devices Using
Modbus Protocol
Written by Rapid SCADA on January 5, 2015
Updated on October 16, 2017

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:

1. Create an object, a communication line and devices in the configuration database using
Administrator.
2. Configure communication between Communicator and the devices.
3. Create input channels in the configuration database according to the tags of the devices.
Create output channels according to the commands.
4. Create views (tables or schemes) to display data in the Webstation application. Define the
views in the configuration database.

The following is a step by step guide to setup a new Modbus device. To ensure that the
process of adding the device completely coincides with the text of the article, you have to
install Rapid SCADA with the default configuration.

Preliminary Database Configuration


Editing the configuration database is performed using the Administrator application.

Run Administrator. Open the Objects table and add a new line for the object 2 "Test object"
(see Figure 1). Then open the Communication lines table and add the line 11 "Test line"
(see Figure 2). After that open the Devices table and add the device 101 "Test device" (see
Figure 3).

Fill the following fields for the device (see Figure 3):

Device type: Modbus

Address: Modbus address of your device, for example, 1

Call number: IP address, if the device is connected via Ethernet. Otherwise,


blank

Communication "Test line", which was recently created


line:
Figure 1. Adding an object

Figure 2. Adding a communication line

Figure 3. Adding a device

When editing the configuration database is completed, it is necessary to pass it to Server


by clicking the button . To apply the changes, restart the Server service with the
button .
Configuring Communication with
Devices
Run Communicator (exact its graphical shell). At this time the Server service must be
running.

Right-click on the Communication Lines tree node and choose the Import communication
lines and devices item of the context menu (see Figure 4). In the window that appears, tick
the created line and device, and then click the Import button (see Figure 5). Communication
line and device appear in Communicator.

Figure 4. Communication lines context menu

Figure 5. Choosing devices for import


Click the Line 4 "Test line" tree node to open the Communication Line Parameters page,
set up a communication channel, such as a serial port. Tick the Commands
enabled checkbox if sending commands to the device is required (see Figure 6).

Figure 6. Communication line properties

The following table contains typical serial port parameters depending on the protocol type.

Modbus Modbus ASCII Modbus TCP


RTU

8 data bits, 7 data bits, -


Even parity, Even parity,
1 stop bit 1 stop bit
8 data bits, 7 data bits, -
No parity, No parity,
2 stop bits 2 stop bits

In RTU and ASCII modes a baud rate of all the devices of a communication line has to be
the same. Specify this baud rate in the serial port properties. Using different Modbus types
within a one line is not allowed.

Go to the Request Sequence page and select "Test device" row in the table (see Figure 7).
If device polling time and period are not specified, the devices are polled cyclically.
Commands are sent immediately after a poll is completed.

Figure 7. Device request sequence

Click the button to open device properties form (see Figure 8). In the form choose the
type of Modbus protocol, which have to be specified in the device manual.
Figure 8. 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, Device Template
Editor is shown (see Figure 9). This article uses the existing template
KpModbus_Adam6015.xml.
Figure 9. 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 10).
Figure 10. Template settings

To save Communicator settings click the button. Now it is recommended to start the
Communicator service with the button and check communication with the device.

Click Device 101 "Test device" tree node to check the device state and the availability of
data (see Figure 11). The data is not available immediately after start, retrieved values are
shown when the first polling complete.
Figure 11. Device data

In case of losing communication with the device, use a communication line log to analyze
the problem cause. To open the log, click the Communication Line Stats tree node and go
to the Communication Line Log page. Data packages can be decoded by Online Modbus
Parser.

Final Database Configuration


After communication with the device is established, create input channels and output
channels in the configuration database. To do this, open Administrator again.

The automatic channel creation service helps to save a time. Click Service > Create
Channels in the main menu of the application.

On the form, which is shown in Figure 12, choose "Test line" in the drop down list, then tick
the "Test device" row and choose "Test object" in the cell of the Object column. Set the
channel numbering parameters to create channels having convenient numbers. Firstly
press the Calculate channel numbers button, then press Create.
Figure 12. Creation of 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, click the Input channels > Test device tree node and the Output channels > Test
device node. 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, press the button to pass the
changes to Server, and then restart Server and Communicator by and buttons.

Open the Device Data page in Communicator 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 13).
Figure 13. Device data bound to channels

As a result of described actions, data should be collected from the device and stored in the
archive. It remains to customize user interface for an operator.

Customizing User Interface for


Operator
Consider creating a table view for the Webstation application. To do this, the Table Editor
application is needed. If displaying data in a graphical view is required, use Scheme Editor
instead of Table editor.

Open Table Editor and fill in the table view as shown in Figure 14. Add a channel in the
table (from the left side of the window to the right) by clicking the button, double-clicking
the channel row or by pressing Enter.

Save created table view in the TestTable.tbl file in the C:\SCADA\Interface\Test folder.
Please note that folder names and file names of views must contain only Latin characters.
Figure 14. Table editor

To display a table view in Webstation, define it in the Interface table of the configuration
database by the Administrator application as shown in Figure 15.

Figure 15. Adding a view in the Interface table

To apply the changes, send the database to Server by the button and restart the Server
service by the button.
Now start your browser and enter the address http://localhost/scada/. On the login form
use admin / 12345 (see Figure 16). If the configuration carried out correctly, after logging
in, you will see a table with the data obtained from the device, similar to Figure 17.

Figure 16. Login form

Figure 17. The Webstation application

Modbus Tags Conversion


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.

Connecting Devices Using OPC


Standard
Written by Rapid SCADA on January 5, 2015
Updated on January 25, 2017

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:

 OPC DA (Data Access) to read and write current device data.


 OPC AE (Alarms & Events) to receive event notifications.

Rapid SCADA implementation of OPC is provided by the Communicator application, to be


exact, by KpOpc.dll device library. To learn about the details of SCADA-Communicator
configuring for using OPC is the goal of this article.

The general configuration sequence:

1. Download and install OPC Core Components. These components can be found
at opcfoundation.org and rapidscada.org.
2. Create an object, a communication line and devices in the configuration database using the
Administrator application.
3. Configure communication between Communicator and OPC servers as described in this
article.
4. Create input channels in the configuration database according to the tags of the devices.
Create output channels according to the commands.
5. Create views (tables or schemes) to display data in the Webstation application. Define the
views in the configuration database.
The details of the 2nd, the 4th and the 5th steps are described in the Software
Configuration section. Device 21 "OPC Demo" of the default Rapid SCADA configuration is
an example of using OPC. Find "OPC demo" view in Webstation to examine the received
data. This example requires MatrikonOPC Explorer which includes an OPC simulation
server.

Create a separate communication line for each OPC server that is used. It is the most
efficient approach because it allows communicating with the OPC servers in parallel. Add
devices to the communication lines. Set Undefined communication channel type for the
created communication lines in Communicator.

Open device configuration form to select which OPC tags to receive from OPC server. Click
the button located in the device popup menu or the Request Sequence page to open
the form that is shown in Figure 1.

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 Server.

There are two ways how to bind OPC tags to input channels of the configuration database:
1. Using the Signal field of device tags and input channels to identify tags.
2. Setting input channel numbers directly in the configuration form shown in Figure 1.

Select the way that is more suitable in a particular configuration of an automated system.

When the configuration is completed, restart the Server and Communicator services.
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
http://doc.rapidscada.net/content/en/use-cases/modbus-protocol.html

Conexión de dispositivos
usando el protocolo Modbus
Escrito por Rapid SCADA el 5 de enero de 2015
Actualizado el 16 de octubre de 2017

Este artículo describe cómo configurar la comunicación con dispositivos usando el


protocolo Modbus. Simple y robusto, Modbus se ha convertido desde entonces en un
protocolo de comunicación estándar de facto, y ahora es un medio comúnmente disponible
para conectar dispositivos electrónicos industriales (ver Wikipedia ). Rapid SCADA admite
los modos Modbus RTU, ASCII y TCP.

La secuencia general de configuración:

1. Cree un objeto, una línea de comunicación y dispositivos en la base de datos de


configuración usando el Administrador.
2. Configure la comunicación entre Communicator y los dispositivos.
3. Cree canales de entrada en la base de datos de configuración de acuerdo con las
etiquetas de los dispositivos. Crea canales de salida según los comandos.
4. Cree vistas (tablas o esquemas) para visualizar datos en la aplicación de la estación
web. Defina las vistas en la base de datos de configuración.

La siguiente es una guía paso a paso para configurar un nuevo dispositivo Modbus. Para
garantizar que el proceso de agregar el dispositivo coincida completamente con el texto del
artículo, debe instalar Rapid SCADA con la configuración predeterminada.

Configuración preliminar de la base


de datos
La edición de la base de datos de configuración se realiza utilizando la aplicación de
administrador.

Ejecutar administrador. Abra la tabla de Objetos y agregue una nueva línea para el objeto
2 "Objeto de prueba" (vea la Figura 1). A continuación, abra la tabla Líneas de
comunicación y agregue la línea 11 "Línea de prueba" (consulte la Figura 2). Después de
eso, abra la tabla Dispositivos y agregue el dispositivo 101 "Dispositivo de prueba" (vea la
Figura 3).
Complete los siguientes campos para el dispositivo (vea la Figura 3):

Tipo de dispositivo: Modbus

Dirección: Dirección Modbus de su dispositivo, por ejemplo, 1

Número de llamada: Dirección IP, si el dispositivo está conectado a través de


Ethernet. De lo contrario, en blanco

Línea de "Línea de prueba", que fue creada recientemente


comunicación:

Figura 1. Agregar un objeto

Figura 2. Agregar una línea de comunicación


Figura 3. Agregar un dispositivo

Cuando se completa la edición de la base de datos de configuración, es necesario pasarla


al servidor haciendo clic en el botón . Para aplicar los cambios, reinicie el servicio
Servidor con el botón .

Configurar la comunicación con


dispositivos
Ejecute Communicator (exacto su caparazón gráfico). En este momento, el servicio del
servidor debe estar ejecutándose.

Haga clic con el botón derecho en el nodo del árbol Líneas de comunicación y elija la
opción Importar líneas y dispositivos de comunicación del menú contextual (consulte la
Figura 4). En la ventana que aparece, marque la línea y el dispositivo creados, y luego
haga clic en el botón Importar (consulte la Figura 5). La línea de comunicación y el
dispositivo aparecen en Communicator.

Figura 4. Menú contextual de líneas de comunicación


Figura 5. Elección de dispositivos para importación

Haga clic en el nodo del árbol Línea de prueba "Línea 4" para abrir la página Parámetros
de la línea de comunicación , configure un canal de comunicación, como un puerto en
serie. Marque la habilitado Comandos casilla de verificación si se requiere el envío de
comandos al dispositivo (véase la Figura 6).
Figura 6. Propiedades de línea de comunicación

La siguiente tabla contiene los parámetros típicos del puerto serie dependiendo del tipo de
protocolo.

Modbus RTU Modbus ASCII Modbus TCP

8 bits de datos, 7 bits de datos, -


paridad par, Paridad par,
1 bit de parada 1 bit de parada

8 bits de datos, 7 bits de datos, -


sin paridad, sin paridad,
2 bits de 2 bits de parada
parada
En los modos RTU y ASCII, la velocidad en baudios de todos los dispositivos de una línea
de comunicación debe ser la misma. Especifique esta velocidad en baudios en las
propiedades del puerto serie. No se permite el uso de diferentes tipos de Modbus dentro
de una línea.

Vaya a la página Solicitud de secuencia y seleccione la fila "Probar dispositivo" en la tabla


(consulte la Figura 7). Si no se especifica el período y el período de sondeo del dispositivo,
los dispositivos se sondean cíclicamente. Los comandos se envían inmediatamente
después de completar una encuesta.

Figura 7. Secuencia de solicitud del dispositivo

Haga clic en el botón para abrir el formulario de propiedades del dispositivo (consulte la
Figura 8). En la forma, elija el tipo de protocolo Modbus, que debe especificarse en el
manual del dispositivo.
Figura 8. Propiedades del dispositivo

Presione el botón para seleccionar una plantilla de dispositivo existente, o haga clic
para crear una nueva plantilla. Cuando se hace clic en el botón Crear o en el botón
Editar , se muestra el Editor de plantillas del dispositivo (consulte la Figura 9). Este
artículo utiliza la plantilla existente KpModbus_Adam6015.xml.
Figura 9. Editor de plantilla de dispositivo

La plantilla del dispositivo refleja la estructura de los paquetes de Modbus. Los datos
solicitados se combinan en grupos de elementos. Cada grupo tiene su nombre, tabla de
datos, dirección de inicio y recuento de elementos. Cada elemento es una etiqueta de un
dispositivo. Rapid SCADA identifica una etiqueta por su número de señal. Un comando se
describe por su nombre, tabla de datos y dirección. Un número de comando identifica el
comando dentro de Rapid SCADA.

Los nombres de grupos, elementos y comandos son arbitrarios. Las tablas de datos
disponibles y las direcciones de los elementos se describen generalmente en el manual del
dispositivo. Dependiendo del fabricante, el direccionamiento de los elementos puede
basarse en cero o en uno, especificados como números decimales o hexadecimales. Por
defecto, las direcciones comienzan con 1 y se representan como decimales. Para cambiar
el direccionamiento de la plantilla, haga clic en el botón. El diálogo de configuración de
plantillas está abierto (ver Figura 10).
Figura 10. Configuración de plantilla

Para guardar la configuración de Communicator, haga clic en el botón. Ahora se


recomienda iniciar el servicio de Communicator con el botón y verificar la comunicación
con el dispositivo.

Haga clic en el nodo del árbol "Dispositivo de prueba" del Dispositivo 101 para verificar el
estado del dispositivo y la disponibilidad de los datos (consulte la Figura 11). Los datos no
están disponibles inmediatamente después del inicio, los valores recuperados se muestran
cuando se completa el primer sondeo.
Figura 11. Datos del dispositivo

En caso de perder la comunicación con el dispositivo, use un registro de línea de


comunicación para analizar la causa del problema. Para abrir el registro, haga clic en
el nodo del árbol Estadísticas de la línea de comunicación y vaya a la página Registro de
la línea de comunicación . Los paquetes de datos pueden decodificarse con Online
Modbus Parser .

Configuración de base de datos final


Después de establecer la comunicación con el dispositivo, cree canales de entrada y
canales de salida en la base de datos de configuración. Para hacer esto, abra el
Administrador nuevamente.

El servicio de creación automática de canales ayuda a ahorrar tiempo. Haga clic


en Servicio> Crear canales en el menú principal de la aplicación.

En el formulario, que se muestra en la Figura 12, elija "Línea de prueba" en la lista


desplegable, luego marque la fila "Probar dispositivo" y elija "Probar objeto" en la celda de
la columna Objeto . Establezca los parámetros de numeración de canales para crear
canales que tengan números convenientes. Primero presione el botón Calcular números
de canal , luego presione Crear .

Figura 12. Creación de canales

Los canales se crean automáticamente en función de la plantilla del dispositivo que se ha


creado y asignado al dispositivo en la sección anterior de este artículo. Para ver los
canales creados, haga clic en el nodo Input tree > Test device tree y en Output channels>
Test device node. Se recomienda completar manualmente
los campos Cantidad y Unidad de los canales de entrada y el campo Valores de
comando de los canales de salida. Sin embargo, en el caso del primer experimento, no es
necesario.

Es útil para comprender que los canales de entrada están vinculados a las etiquetas del
dispositivo usando el campo Señal . Los canales de salida están vinculados a los
comandos del dispositivo de acuerdo con el campo Número de comando .
Después de editar la configuración de la base de datos se completa, presione el botón
para pasar los cambios al Servidor, y luego reinicie el Servidor y el Comunicador con
los botones y .

Abra la página Datos del dispositivo en Communicator y asegúrese de que los canales de
entrada estén vinculados a las etiquetas del dispositivo: la columna Canal debe contener
los números de los canales de entrada creados (consulte la Figura 13).

Figura 13. Datos del dispositivo vinculados a canales

Como resultado de las acciones descritas, los datos deben recopilarse del dispositivo y
almacenarse en el archivo. Queda por personalizar la interfaz de usuario para un operador.

Personalizar la interfaz de usuario


para el operador
Considere crear una vista de tabla para la aplicación de la estación web. Para hacer esto,
se necesita la aplicación Table Editor. Si se requieren mostrar datos en una vista gráfica,
use Scheme Editor en lugar de Table editor.
Abra Table Editor y complete la vista de tabla como se muestra en la Figura 14. Agregue
un canal en la tabla (desde el lado izquierdo de la ventana a la derecha) haciendo clic en
el botón, haciendo doble clic en la fila del canal o presionando Enter.

Guarde la vista de tabla creada en el archivo TestTable.tbl en la carpeta C: \ SCADA \


Interface \ Test. Tenga en cuenta que los nombres de las carpetas y los nombres de
archivo de las vistas deben contener solo caracteres latinos.

Figura 14. Editor de tablas

Para mostrar una vista de tabla en la estación web, defínala en la tabla de interfaz de la
base de datos de configuración mediante la aplicación de administrador como se muestra
en la Figura 15.
Figura 15. Agregar una vista en la tabla de Interfaz

Para aplicar los cambios, envíe la base de datos al servidor por el botón y reinicie el
servicio del servidor con el botón.

Ahora inicie su navegador e ingrese la dirección http: // localhost / scada / . En el formulario


de inicio de sesión use admin / 12345 (vea la Figura 16). Si la configuración se llevó a
cabo correctamente, después de iniciar sesión, verá una tabla con los datos obtenidos del
dispositivo, similar a la Figura 17.

Figura 16. Formulario de inicio de sesión


Figura 17. La aplicación de la estación web

Conversión de etiquetas Modbus


Los valores de elementos recibidos pueden necesitar una conversión. Una plantilla de
dispositivo permite elegir una cantidad de bytes utilizados por un elemento y orden de
bytes. Estas configuraciones definen una conversión inicial. Si es necesario, el servidor
SCADA realiza una conversión adicional en función de las fórmulas de los canales de
entrada en la base de datos de configuración.

La conversión más simple es una proporcional que se describe con la siguiente fórmula:

X * (B - A) / 2 N + A, donde A y B son los límites del rango de valores de los elementos, N -


número de bits en el valor, X - el valor recibido.
Otra conversión comúnmente utilizada es complemento de dos. Ver Wikipedia para los
detalles. Las fórmulas se pueden definir en línea en las filas del canal de entrada de la
base de datos de configuración o por separado mediante el uso de la tabla de fórmulas . El
uso de fórmulas se describe en esta sección .

You might also like