ATSCADA Power Management System

Requirements: There are 3 areas that require power management, including a factory, a residential zone, and households. Each area has 2 power meters. It is necessary to build a monitoring system that can view the parameters of all meters and display the electrical diagram of the 3 areas on the Web for easy monitoring and operation. The system must calculate electricity costs according to the 3 time-of-use tariff periods regulated by the government. ATSCADA Power Management System

Prepare the TagFile and plan the system structure 

Step 1

Create the ATDriverServer file:

• Enter the Channel name:

Add Channel window in ATSCADA showing Channel Name, Driver selection, and Update Rate settings

Select the driver, then enter the port and IP address of the server while following common troubleshooting guide steps if connection issues occur.

ATSCADA driver selection window displaying available communication driver DLL files in Drivers folder

Here’s the demo where I chose InternalMemory. You can choose depending on your device’s communication settings.

ATSCADA channel tree panel showing configured channels KV1, KV2, KV3 and history groups

Create Tags:

This demo is designed for the ATSCADA Power Management System with 3 areas and 6 power meters, where each area has 2 meters. For each meter, the values that need to be monitored include:

  • Voltage value
  • Current value
  • Power value
  • Frequency value
  • Energy consumption value

ATSCADA device tag configuration screen showing Voltage, Current, Power, and Energy realtime values

For each watch, we will create a tag to store its value history.

ATSCADA multi device configuration panel showing DH1 to DH6 devices with tag address mapping

Create tags to record the total energy consumption in 3 areas and the overall consumption of all 3 areas.

ATSCADA analog input tag monitoring screen showing realtime electrical values and status

In the Money channel, create drivers to store the monthly electricity bill amounts for each household and each area.

ATSCADA driver list window for EMC driver with driver type, address, and retry settings

The TagName Hyperlink stores the links of the pages, and Driver CB stores the status of each circuit breaker for every meter, supporting feature design for FastWeb in the ATSCADA Power Management System.

Step 2

Register the TagFile with iTagBuilder, create the project, and add the Driver.

ATSCADA Select Driver dialog showing OPCClient and ATDriverClient DLL files

Select ATDriverClient

ATSCADA Driver Address setup window with localhost server IP and reconnect settings

Use localhost if you’re using your computer’s IP address; otherwise, enter the address of the server running ATDriverServer.

ATSCADA Driver Address redundant server configuration window with add remove and priority controls

After creating the project, we will add the tags created in ATDriverServer by:
Clicking on Tools->Import All-> selecting Server-> OK. After successful addition.

ATSCADA project tag browser showing multiple areas, meters, and realtime data table

Finally, select File => Project Register to complete TagFile registration.

ATSCADA Tag Builder software interface showing project tree, menu options, and tag values

Create the Desktop Application with Visual Studio for the ATSCADA Power Management System

ATSCADA energy monitoring system dashboard showing three areas with kWh totals, power factor meters, voltage, and current gauges

Step 1

Create a new project in Visual Studio, name it EMS, and select .NET Framework 4.5.

Visual Studio create new project window for EMS Windows Forms App .NET Framework configuration

Step 2

Proceed to create the Form LayoutsVisual Studio Add New Item dialog showing Windows Form creation for MainForm.cs

MainForm is the main outer layout, containing the header, footer, left menu, main layout, and other elements.

Visual Studio Windows Forms designer with blank MainForm and Properties panel

First, we need to drag the Panels (located in the Toolbox) to divide the layout for the MainForm.

Visual Studio Toolbox showing Panel control added to MainForm design surface

It consists of four main parts: Header, Menu, Main, and Footer.

Windows Forms layout example with pnlHeader, pnlMenu, pnlMain, and pnlFooter panels

In the pnlMenu section, we add Toolbox Buttons to facilitate Form navigation in Winforms Applications.
Change the text and image of the Button to match the image shown.

Sidebar menu interface showing Layout, Alarm, and Report navigation buttons

In the pnlHeader section, we similarly add toolboxes such as Label, Button, and PictureBox to make the header more visually appealing. Change the properties of each toolbox to achieve the result shown in the image.

ATSCADA desktop header bar with logo, system title, layout page label, and window controls

In the pnlFooter section, we also add labels to display information.

Footer panel showing Copyright 2026 and ATSCADA LAB branding

In summary, after adding the basic toolboxes, we get the following MainForm:

Completed ATSCADA desktop application interface with header, sidebar menu, main workspace, and footer

Create three additional forms: Layout, Alarm, and Report, to be displayed in pnlMain.

Visual Studio Solution Explorer showing EMS project files, forms, images, and settings resources

Step 3

Create Events in the WinForms Application for the ATSCADA Power Management System.

Switch to the Code Behind interface inside WinForms by right-clicking the form name and selecting View Code.

First, create Click Events assigned to the Buttons in the Header and Menu sections to navigate the main page content in the center area:

using System;

using System.Drawing;

using System.Windows.Forms;

 

namespace GS_NDDA

{

  public partial class MainForm : Form

  {

           private Button activeButton;

 

           private frmLayout frmLayout;

 

           private frmReport frmReport;

 

           private frmAlarm frmAlarm;

           public MainForm()

           {

                 InitializeComponent();

 

                 btnLayout.Click += btnDashboard_Click;

                 btnAlarm.Click += BtnAlarms_Click;

                 btnReport.Click += btnReport_Click;

                 btnMinimize.Click += btnMinimize_Click;

                 btnClose.Click += btnClose_Click;

 

                 Init();

           }

 

           private void Init()

           {

                 activeButton = btnLayout;

                 btnMenu.Click += BtnMenu_Click;

                 this.pnlMain.Paint += PnlMain_Paint;

                 btnLayout.FlatAppearance.MouseOverBackColor = btnLayout.BackColor;

                 btnLayout.BackColorChanged += (s, e) =>

                 {

                      btnLayout.FlatAppearance.MouseOverBackColor = btnLayout.BackColor;

                 };

 

                 btnAlarm.FlatAppearance.MouseOverBackColor = btnAlarm.BackColor;

                 btnAlarm.BackColorChanged += (s, e) =>

                 {

                      btnAlarm.FlatAppearance.MouseOverBackColor = btnAlarm.BackColor;

                 };

 

                 btnReport.FlatAppearance.MouseOverBackColor = btnReport.BackColor;

                 btnReport.BackColorChanged += (s, e) =>

                 {

                      btnReport.FlatAppearance.MouseOverBackColor = btnReport.BackColor;

                 };

 

                 foreach (Control control in this.pnlMain.Controls)

                      control.Click += (sender, e) =>

                      {

                            if (this.InvokeRequired)

                            {

                                 this.Invoke((Action)(() =>

                                 {

                                       this.pnlMenu.Width = 43;

                                       this.isHide = true;

 

                                       return;

                                 }));

 

                                 return;

                            }

 

                            this.pnlMenu.Width = 43;

                            this.isHide = true;

                      };

 

           }

           private void PnlMain_Paint(object sender, PaintEventArgs e)

           {

                 NavigateToLayout();

           }

 

           private void BtnMenu_Click(object sender, EventArgs e)

           {

                 if (isHide)

                 {

                      if (this.InvokeRequired)

                      {

                            this.Invoke((Action)(() =>

                            {

                                 this.pnlMenu.Width = 129;

                                 this.isHide = false;

 

                                 return;

                            }));

 

                            return;

                      }

this.pnlMenu.Width = 129;

this.isHide = false;

}

else

{

if (this.InvokeRequired)

{

this.Invoke((Action)(() =>

{

this.pnlMenu.Width = 43;

this.isHide = true;

 

                                 return;

                            }));

 

                            return;

                      }

 

                      this.pnlMenu.Width = 43;

                      this.isHide = true;

                 }

           }

 

           bool isHide = true;

 

           private void btnDashboard_Click(object sender, EventArgs e)

           {

                 if (this.activeButton == btnLayout) return;

 

                 if (this.InvokeRequired)

                 {

                      this.Invoke((Action)(() =>

                      {

                            NavigateToLayout();

                            return;

                      }));

 

                      return;

                 }

 

                 NavigateToLayout();

           }

 

 

           private void BtnAlarms_Click(object sender, EventArgs e)

           {

                 if (this.activeButton == btnAlarm) return;

 

                 if (this.InvokeRequired)

                 {

                      this.Invoke((Action)(() =>

                      {

                            NavigateToAlarm();

                            return;

                      }));

 

                      return;

                 }

 

                 NavigateToAlarm();

           }

 

           private void btnReport_Click(object sender, EventArgs e)

           {

                 if (this.activeButton == btnReport) return;

 

                 if (this.InvokeRequired)

                 {

                      this.Invoke((Action)(() =>

                      {

                            NavigateToReport();

                            return;

                      }));

 

                      return;

                 }

 

                 NavigateToReport();

           }

 

 

           private void NavigateToLayout()

           {

                 this.activeButton = btnLayout;

                 this.lblNavigate.Text = "Layout";

 

                 btnLayout.BackColor = Color.FromArgb(73, 78, 83);

 

                 btnAlarm.BackColor = Color.Transparent;

                 btnReport.BackColor = Color.Transparent;

                 if (this.frmLayout is null)

                 {

                      this.frmLayout = new frmLayout() { Dock = DockStyle.Fill, TopLevel = false, TopMost = true };

                      this.frmLayout.Show();

                      this.pnlMain.Controls.Add(this.frmLayout);

                 }

 

                 this.frmLayout?.BringToFront();

this.frmReport?.SendToBack()

this.frmAlarm?.SendToBack();

  }

private void NavigateToAlarm()

{

this.activeButton = btnAlarm;

this.lblNavigate.Text = "Alarm";

btnAlarm.BackColor = Color.FromArgb(73, 78, 83);

btnLayout.BackColor = Color.Transparent;

btnReport.BackColor = Color.Transparent;

if (this.frmAlarm is null)

{

this.frmAlarm = new frmAlarm() { Dock = DockStyle.Fill, TopLevel = false, TopMost = true };

this.frmAlarm.Show();

this.pnlMain.Controls.Add(this.frmAlarm);

}

this.frmAlarm?.BringToFront();

this.frmLayout?.SendToBack();

this.frmReport?.SendToBack();

}

private void NavigateToReport()

{

this.activeButton = btnReport;

this.lblNavigate.Text = "Report";

btnReport.BackColor = Color.FromArgb(73, 78, 83);

btnLayout.BackColor = Color.Transparent

btnAlarm.BackColor = Color.Transparent;

if (this.frmReport is null)

{

this.frmReport = new frmReport() { Dock = DockStyle.Fill, TopLevel = false, TopMost = true };

this.frmReport.Show();

this.pnlMain.Controls.Add(this.frmReport);

}

this.frmReport?.BringToFront();

this.frmLayout?.SendToBack();

this.frmAlarm?.SendToBack();

}

private void btnMinimize_Click(object sender, EventArgs e)

{

this.WindowState = FormWindowState.Minimized;

}

private void btnClose_Click(object sender, EventArgs e)

{

DialogResult result = MessageBox.Show("Are you sure you want to exit?",

"Exit?",

MessageBoxButtons.YesNo,

MessageBoxIcon.Question);

if (result == DialogResult.Yes) this.Close();

}

           private void lblATSCADA_Click(object sender, EventArgs e)

           {

                 System.Diagnostics.Process.Start("https://atscada.com/");

           }

  }

}

With the Event_Click functions such as btnReport_Click, BtnAlarms_Click, and btnDashboard_Click, users can switch the Main section to display the content of forms such as frmAlarms and frmReports that were created earlier in the ATSCADA Power Management System.

Step 4

Create content for the frmLayout file.

This is the main form where values read from the meters will be displayed, such as temperature, humidity, or real-time charts, etc.

Drag a Toolbox TabControl into frmLayout and name the two tabs Home and Settings as shown in the image.

• Use the Panel tool to divide the layout sections as shown. In Properties, you can customize panel attributes such as 3D style or colors for the ATSCADA Power Management System.

Visual Studio Properties panel showing BackColor set to DarkBlue for Windows Forms control

Visual Studio BorderStyle property dropdown showing FixedSingle selected for form border

• Use the Label tool to write the text.

Visual Studio Toolbox showing Label controls and ATSCADA_iTools custom components

Enter text in the text box to change the font.

Properties panel showing label Text value set to ENERGY MONITORING SYSTEM

Change font size and font type.

Visual Studio Font properties showing Garamond 24pt bold style configuration

Change the color of the text.

Visual Studio Properties panel showing ForeColor set to DarkBlue

• Use the iDriver tool to link the tags registered on iTagBuilder with WinForm.

ATSCADA_iTools toolbox section displaying iDriver custom component

• Use the iWebServer tool to link the tags to the website.

ATSCADA_iTools toolbox showing iWebPort and iWebService components

Select the driver, then enter the port and IP address of the server.

Properties panel for iWebService component showing port 8010 and localhost server settings

• Use the iLedSegment tool in iGraphicTools to create meters that display energy consumption.

ATSCADA_iGraphicTools toolbox displaying iLed7Segment custom control

To display it, you need to set some parameters as follows:
Select the driver for the tool.

Properties panel for iDriver component showing WaitingTime set to 3000 milliseconds

Select the tag you want to display.

Data source selector showing EnergyTotalTotal.KV1 tag name mapping list

Adjust the colors of the LED display.

Properties panel showing LED display color settings with blue light configuration

Enter the number of LEDs on the LED display; if you enter 4, it will display 4 digits.

Seven segment LED display showing Energy Total kWh realtime numeric value

• Use the iGauge tool to create analog meters that display Voltage and Current.

ATSCADA_iGraphicTools toolbox displaying iGauge custom gauge control

Steps to set parameters:
Adjust the clock color

Properties panel showing gauge BodyColor set to Blue

The color of the needle.

Visual Studio Properties panel showing gauge NeedleColor set to Yellow

Adjust the color of the numbers on the clock.

Visual Studio Properties panel showing gauge ScaleColor set to White

Adjust the markings, and the meter will display 6 main values ​​with 10 smaller markings between them.

ATSCADA circular gauge preview with blue dial, yellow needle, and white scale markings

Several tools are used to calculate electricity consumption and log it to a database.

Visual Studio tabs displaying multiple UserControl files for energy monitoring dashboard project

The TotalKVx tools are used to sum the energy values of the meters within the same area in the ATSCADA Power Management System, with the following configuration steps:

o First, select the same Driver as the two tools above.
o Next, click Collection and choose the values that need to be added together.

Adder Settings window showing selected tags HistoryKV1DH1.Current and KV1DH2.Energy with scale options

Finally, select Tag to save the values ​​after addition.

Tag selector panel showing EnergyTotalTotal.KV1 data source mapping list

The iThreeRatePriceLogger tools support electricity cost calculation based on power consumption with 3 pricing levels according to government regulations and log data into the database for the ATSCADA Power Management System.

Configuration steps:

o First, select the Driver.
o Next, configure the Datalog settings.

DatabaseLog settings panel showing EMS database connection and Money.DH1 table configuration

Enter the three price values ​​for the time slots; these can be entered directly or via an intermediate tag declared in ATDriverServer.

Properties panel showing electricity price rate mappings for off peak, peak, and standard hour rates

Select the input power for the calculation.

Tag selector panel showing PowerTagName linked to KV1DH1.Power realtime tag

Configure PowerSetting. Capacity is the sampling threshold value of Power; if the value is higher, it will not be collected.

Select the measurement units the same as the values read from the meter. TimeUnit is the calculation interval. For example, if set to Minute, the accumulated power will be calculated after 1 minute in the ATSCADA Power Management System.

PowerSettings properties panel showing capacity, kWh unit, watt unit, and 5000 ms sampling time

Create the Web Application with FastWeb Designer of the ATSCADA Power Management System

Use Inkscape software to create a homepage interface image for your website as an SVG file.

Smart grid energy monitoring diagram connecting factories, houses, buildings, substations, and power station with realtime kW and kWh data

Model of the power grid diagram from the power plant to 3 areas: Industrial park – High-rise building – Residential area
Use FastWebDesigner software to create web components.
To create a project, click File -> New.

ATSCADA application File menu showing New, Open, Save, Quick, Register, and Exit options

Enter the project name and other information.

App Editor Base and Extend tabs showing EMC project information, brand, author, and dark mode option

Connect to the database storing web account and password information.

App Editor Authentication tab showing database connection, useraccount table, and requires login option

Set the IP address and port the same as in the iWebServer tool to link with the tags in Winform.

App Editor Service tab showing localhost address and port 8010 configuration

After creating the project, we begin designing by adding each view (each view is a page with a different URL).

ATSCADA web application component list showing SVG, Report, Settings, and Feature_DH modules

Each page is laid out in rows and columns.

ATSCADAWebApplication tree view showing SVG component with NewRow and NewColumn layout structure

On the SVG page, we add the iSVG component, which supports linking with the iSVG editor software to associate tags with SVG images.

Add Component window showing available ATSCADA web components including iSVG, iChart, iSlider, and iSwitch

Enter the page name

SVG Editor base tab showing Home page name and SVG ATSCADA Web Component description

SVG Editor extend tab showing SVG file path, background color picker, and open editor button

Click on “Open iSVG Editor” to open the software.

iSVG Editor interface with empty workspace and tag property configuration panel

Add the SVG file to the software.

iSVG Editor toolbar showing Open SVG File shortcut and editing tools

Now, we will link the tags that need to be displayed to the SVG images.

iSVG Editor tag binding panel showing multiple tspan IDs linked to power and energy tags

Step 1

Click on the component you want to link.

Factory SVG widget preview displaying realtime kW and kWh values with bound tspan element

Step 2

Set the parameters

iSVG Editor property panel showing KV1DH1.Power tag mapped to Value property

Select the Tag you want to link to the Component

iSVG Editor properties dropdown showing Value, Status, and Animation options

In the Properties section, select Value to display the Tag value on the Web for the selected component in the ATSCADA Power Management System.

Select Status to display the connection status of the Tag. In Type, there are 2 options: choose Color to display colors, or Text to display custom text as configured.

iSVG Editor type dropdown showing Color and Text attribute options

Animation color settings window showing bad color red and good color green selection

Next, we will link the hyperlinks declared in ATDriverServer to the component in the SVG image.
First, select the Component, then add the tag to store the hyperlink.
iSVG Editor hyperlink mapping panel showing path1904 linked to HyperLinkLink.DH1 and DH2 to DH6 tags
Next, create the web pages to link to.
>Step 1: Create the views as shown above.
ATSCADA web application tree showing Feature_DH1 to Feature_DH6 pages with Feature_DH6 selected
Step 2: Create columns and rows.
ATSCADA page structure tree showing Feature_DH1 to Feature_DH6 with NewRow and NewColumn layout nodes
Step 3: Create the components.
ATSCADA dark theme web dashboard showing summary cards, power chart, and history data table

As shown in the interface above, the ATSCADA Power Management System includes meter parameters such as U, I, and Frequency, a chart displaying Power values, and a Report showing electricity costs calculated based on power consumption, with options for secure industrial data management.

The following are the steps to create the web page above:

Create the iCard Component.

Add Component window showing Card ATSCADA Web Component selected from component list
Enter the name and description.
Card Editor base tab showing Voltage card name and description settings

Content: Display name shown on the Web in the ATSCADA Power Management System.

Tag Name: The Tag value that needs to be displayed. Color is used to select the Card color.

Icon: Enter the selected Icon code (codes can be taken from websites).

GridColumn: The number represents the width of the Card (the full page has 12 columns). As shown below, the Card is occupying 4 columns.

Card Editor extend tab configuring Voltage V content, KV1DH1.Voltage tag, teal color, and grid size

Create the chart.

Power line chart dashboard showing realtime Power_DH1 trend over time

Create the iChart selection component.

Add Component window showing iChart selected from ATSCADA Web Component list

Next, enter the name and description similar to iCard in the ATSCADA Power Management System. The parameters include:

Content: The Chart name displayed on the Web.

Type: Select the chart type. In this example, a line chart is used, so choose Line.

Sample Num: Number of samples.

X Label, Y Label: Names of the X and Y axes in the chart.

Grid column: Chart width measured in cells

Chart Editor settings showing Power W line chart with 250px height and Time Value axes
Finally, we come to the Report.
ATSCADA history table dashboard showing date filter, export buttons, and meter records

Create the component, then select iDataReporter.

The "Add Component" interface in ATSCADA Web Component software, showing a selection list including iDataReporter, iAlarmViewer, and iChart.

Next, enter the name and description similar to iCard in the ATSCADA Power Management System. Configuration parameters include:

Content: Name of the report table.

Connection: Enter the Database name to be connected for reporting.

Table Name: Name of the table to be reported in the database.

Timeout (ms): Report refresh time for each cycle.

Grid Column: Width of the table based on grid columns.

The "Extend" tab of the DataReporter Editor showing configuration fields for Content, Connection (ems), Table Name (money_dh6), and Timeout settings.
Enter the columns you want to display in the database (Note: column names must match those in the database).
The DataReporter Item Editor interface used for mapping data fields like Time_Start and Money with specific aliases and color codes.
👉 Learn More about SCADA Software
view atscada demo & download
Advice via WhatsApp Chat

ATPro việt nam

ATSCADA - Smart SCADA Software with AI Predictor & Blockchain. ATSCADA is an advanced SCADA software platform for real-time monitoring, intelligent control, and efficient data acquisition. It is ideal for Industrial IoT (IIoT), smart cities, integrated automation systems, and Agriculture 4.0. With a built-in AI Predictor, ATSCADA enables predictive analytics to detect issues early, optimize performance, and reduce downtime. The integration of Blockchain technology ensures secure, transparent, and tamper-proof data management. Highly scalable and easy to integrate, ATSCADA is trusted by businesses to enhance productivity, strengthen cybersecurity, and accelerate digital transformation.

Bài viết liên quan

ATSCADA CookBook: Complete Guide to System Architecture, Tools, Installation & Troubleshooting

The ATSCADA Training book is an essential navigation structure that helps users access all major [...]

Common ATSCADA Errors and How to Fix Them – FAQ for ATSCADA Tools and Systems

Issues Related to ATDriverServer & iTagBuilder Software Why Does ATDriverServer Not Open? There are two [...]

ATSCADA Hospital Temperature and Humidity Monitoring Alarm System Project

Requirements: The system includes three monitoring areas: the pharmacy, inpatient warehouse, and cold storage, following [...]

ATSCADA Project Deployment Guide: Create and Run Projects on Another Computer

ATSCADA Project Deployment is an essential process for transferring a completed SCADA project from the [...]

How to Create a New Custom Component for Windows Forms Applications

Purpose of the Component This ATSCADA Custom Component is designed to automatically accumulate values from [...]

ATSCADA Blockchain Toolkit – Secure Industrial Data Management with Smart Technology

Introduction Real-world issues in industrial SCADA systems SCADA data is the lifeblood of smart factories, [...]

T.Vấn Zalo(t.Việt)
ATSCADA Profile.
WhatsApp ( Eng.)
Map (chỉ đường.)