ATSCADA Hospital Temperature and Humidity Monitoring Alarm System Project

Requirements: The system includes three monitoring areas: the pharmacy, inpatient warehouse, and cold storage, following a structured project deployment guide for multi-zone monitoring systems.. Each area is equipped with three temperature and humidity meters, totaling nine devices. An ATSCADA hospital monitoring solution is required to collect data from all nine meters into a centralized desktop application. The system should feature real-time trend charts, high/low data logging, alarm notifications when thresholds are exceeded, and comprehensive environmental monitoring for all storage areas.

Prepare the TagFile and Plan the System

Step 1

Open ATDriverServer and create Channels named after the three monitoring areas. For demonstration purposes, the selected driver is InternalMemory.dll to store simulated values for the ATSCADA hospital monitoring system.

ATDriver Server channel configuration for Pharmacy Area, Inpatient Department, and Cold Room using InternalMemory driver.

Pharmacy_Area: Pharmacy monitoring area
Inpatient_Department: Inpatient storage area
Cold_Room: Cold storage area
Threshold: Channel used to store High and Low values for each area in the ATSCADA hospital monitoring system.

Step 2

Create Devices. Since each area has three temperature and humidity meters, create three Devices corresponding to each Channel (*TMS is the meter name).

ATSCADA tag tree structure showing temperature sensors TMS1 TMS2 TMS3 for three hospital monitoring zones.

Step 3

Create TagNames representing the register addresses of the clock. Specifically, in this demo, each device will have two tags: Temp (temperature) and Humi (humidity).

Real-time tag values display for temperature and humidity sensors in Pharmacy Area and Cold Room.

Do the same for the remaining 8 devices.

Step 4

Register TagFile with iTagBuilder
ATSCADA Tag Builder import data file interface for creating sensor tag database.
Driver selection window showing ATDriverClient DLL for ATSCADA communication setup.
ATSCADA Tag Builder import menu for loading group files and creating cloud tag files.
Register all newly created TagFiles.
Imported ATSCADA tags list displaying threshold and temperature sensor values in real time.
After importing all the created tag names, select File => Project Register to complete the registration.
TagFile
ATSCADA Tag Builder project menu for adding new tags and deleting duplicate tags.

Create a Desktop App with Visual Studio

Step 1

Create a new project in Visual Studio, name it GS_NDDA, and select .NET Framework 4.5. with support for custom Windows Forms components.
Configure new Windows Forms App project in Visual Studio using .NET Framework 4.5 for GS_NDDA solution.

Step 2

Proceed to create the Form Layouts
Add new Windows Form item in Visual Studio project with MainForm.cs creation window.
MainForm is the main outer layout, containing the header, footer, left menu, main layout, and other elements.
MainForm design view in Visual Studio with properties panel for Windows Forms application layout editing.
First, we need to drag the Panels (located in the Toolbox) to divide the layout for the MainForm.
Toolbox panel in Visual Studio showing Panel control inserted into MainForm design workspace.
It consists of four main parts: Header, Menu, Main, and Footer.
Windows Forms dashboard structure with header sidebar main content area and footer 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 navigation interface with Layout Alarm and Report menu buttons in desktop application.
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.
Windows Forms application header panel with ATSCADA logo system title and control buttons.
In the pnlFooter section, we also add labels to display information.
Footer panel design showing copyright 2026 and ATSCADA LAB branding text.
In summary, after adding the basic toolboxes, we get the following MainForm:
Complete Windows Forms dashboard interface with header sidebar content area and footer layout.
Create three additional forms: Layout, Alarm, and Report, to be displayed in pnlMain.
Visual Studio Solution Explorer displaying GS_NDDA project files and form components.

Step 3

Create Events in Winforms Applications
We switch to the Code Behind interface within Winforms by right-clicking on the form name and selecting View Code
Visual Studio context menu showing View Code option for MainForm.cs source editing.

First, we create Click Events assigned to the Buttons in the Header and Menu sections to redirect the main page to the center:

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;

                                 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 Event_Click functions such as btnReport_Click, BtnAlarms_Click, and btnDashboard_Click, users can switch the main content area between forms such as frmAlarms and frmReports, which were created earlier for the ATSCADA hospital monitoring system.

Step 4

Create the Layout for frmLayout

This is the main form where all meter readings such as temperature, humidity, and real-time charts will be displayed.

Drag a Toolbox TabControl into frmLayout and rename the two tabs as Home and Settings as shown in the design layout.

Windows Forms layout interface with Home and Settings tabs and a large blank content panel inside frmLayout window

On the Home tab, we divide the layout into two parts: one side is used to directly display the values ​​read from the ATDriverServer tagname, and the other side is for iRealTimeTrend charts to visualize the data using graphs.

Windows Forms dashboard layout with Home and Settings tabs, data label panel, and multiple real-time trend display areas with warehouse temperature tabs

In the iLabel data display area, drag the iLabel Toolboxes from the ATSCADA iTools suite that we added earlier.

ATSCADA warehouse monitoring panel showing pharmacy warehouse, inpatient warehouse, and cold warehouse temperature and humidity values with digital displays

The iLabel component is used to simulate an LED display panel in the ATSCADA hospital monitoring system. Configure the Properties as follows:

  • BackColor: Black
  • ForeColor: Red
  • Font Size: 12pt
  • TextAlign: Middle Center

After completing the interface setup, assign the correct TagName values to each corresponding monitoring area. Before assigning TagNames, it is required to drag the iDriver component into the form so the predefined TagNames from ATDriverServer can be used.

Visual Studio Toolbox panel showing iDriver .NET component from ATSCADA Lab under General category

Proceed to set up the Properties for iLabel as follows: Driver: Select iDriver1
TagName: Assign the correct TagName as declared in ATDriverServer

ATSCADA Settings panel with iDriver TagName selector showing tag search and pharmacy area temperature tag list

Example: In the pharmacy warehouse, position L1 corresponds to Device TMS1 and TagName
Temp name
After successful declaration, proceed with testing.

ATSCADA System layout dashboard with sidebar menu, warehouse temperature and humidity panels, and real-time monitoring tab sections

Try changing the values ​​of some TagNames in the ATDriverServer software to check if the TagNames are assigned correctly.

ATSCADA warehouse monitoring dashboard with translated English labels and ATDriver Server tag management interface showing temperature and humidity values

Next, we will set up the real-time charts using the iRealTimeTrend component included in the iTools installation package of ATSCADA.

Visual Studio Toolbox panel displaying iRealtimeTrend .NET component from ATSCADA Lab under ATSCADA_iTools category

We will drag them into the Tabcontrol on the right-hand layout as we set up earlier. For each tab in the Tabcontrol, we will drag an iRealtimeTrend representing that area.

atscada-realtime-trend-chart-warehouse-temperature-humidity-tabs.png

Configure iRealtimeTrend Properties for the ATSCADA hospital monitoring system:

  • Driver: Select iDriver1
  • Title: Rename according to each monitoring area
  • Collection: Select the Device values of that specific area from ATDriverServer

Tips for Professional SCADA Real-Time Charts:

  • High and Low threshold values should use red lines with a thicker Line Width for clear alarm visibility.
  • Temperature and Humidity values should use cool contrasting colors to stand out against the red High/Low alarm lines, making the chart easier to monitor.

iRealtimeTrend settings window showing trend tag configuration, alias names, line colors, fill colors, and selected monitoring tags for ATSCADA

Set up similarly for the remaining areas. Proceed with testing.ATSCADA System dashboard with real-time warehouse temperature and humidity values, trend charts, sidebar navigation, and translated English interface labels

The layout setup is now complete for displaying sensor readings such as temperature and humidity, along with real-time data visualization using iRealtimeTrend in the ATSCADA hospital monitoring system.

Move to the Settings tab on the TabControl

T create a layout that allows users to write High and Low threshold values to ATDriverServer.

To perform this function, use the iButton component from the ATSCADA iTools toolkit.

 Visual Studio Toolbox panel displaying iButton and iButtonWrite components under ATSCADA_iTools category

ATSCADA settings interface with warehouse temperature and humidity high threshold and low threshold configuration panels

Set the iButton Properties as follows

Driver: select iDriver1
TagName: assign the correct TagName you want to write the value to in ATDriverServer
Proceed with testing

ATDriver Server interface with warehouse threshold settings, temperature and humidity configuration tables, and live tag data monitoring panel

 

ATSCADA warehouse threshold configuration panel with high and low settings for temperature and humidity in pharmacy, inpatient, and cold warehouses

 

ATDriver Server screen with warehouse threshold settings panel and live tag table showing temperature and humidity values for multiple warehouse areas

The Buttons have now been successfully configured, allowing users to quickly and conveniently write High and Low values to ATDriverServer within the ATSCADA hospital monitoring system.

Move to the Alarm tab to configure all settings related 

To alarm notifications when faults occur or when monitored values exceed the defined High/Low thresholds.

To set up Email alarm notifications for over-limit events, use the iAlarmLoggerSettings component included in the ATSCADA iTools toolkit.

Visual Studio Toolbox showing ATSCADA iAlarmLoggerSettings component with alarm tag email notification configuration panel

And another component, iAlarmViewer, is added to view the alarms that have occurred and are saved to the database.

Visual Studio Toolbox panel displaying iAlarmViewer component under ATSCADA_iTools alarm control library

 

ATSCADA alarm viewer interface with empty alarm list panel and ACK acknowledgment button

The overall interface of the Alarm form is as follows:

ATSCADA alarm logger settings interface with alarm tag selection, email recipient configuration, tracking table, status panel, and ACK button

Configure the Properties for iAlarmLoggerSettings
ATSCADA Database settings panel showing MySQL connection properties including database name, port, server name, table name, and user ID

This configuration will automatically create a database with the corresponding name in DatabaseName, using the MySQL UserID and Password you have set up.
After successful setup, proceed to test.
Switch to the Alarm tab to view the frmAlarms interface you just set up.

ATSCADA System alarm dashboard with alarm tag configuration, email notification settings, tracking table, and alarm status monitoring panel

Go into MySQL and log in

With the username root and password 100100, the same as in the setup step.
Check if the ATSCADA_DemoGSNDDA database has been created.

 

Database list interface with selected ATSCADA demo database named atscada_demogsndda

Clicking to view will reveal two tables: AlarmLog and AlarmSettings.

Database explorer showing ATSCADA demo database tables including alarmlog and alarmsettings with views and stored procedures folders

At this point, the initial Properties setup for iAlarmLoggerSettings is complete.
In the Alarm interface, we proceed to assign values ​​to set the alarm thresholds.

ATSCADA System alarm interface with High Level tag dropdown list, alarm configuration panel, and status monitoring table

HighLevel: Corresponds to the HighTemp TagName of each monitoring area in the ATSCADA hospital monitoring system.

Tracking: Corresponds to the TagName of the actual value used for comparison.

Alias: Corresponds to the column name to be stored in the database.

LowLevel: Corresponds to the LowTemp TagName of each monitoring area.

Example: Configuration for the Pharmacy Storage Area.

Alarm Logger Settings window with pharmacy warehouse tracking tag, high and low threshold selection, alias field, email recipients, and configuration table

After adding the tag, click OK to save the TagName to the database.
Check the AlarmSettings table in the database to see the tag you just assigned.

SQL editor displaying SELECT query for ATSCADA alarmsettings table with alarm tag, alias, high level, and low level result data

If you see this, then you have successfully set up AlarmSettings. Now, try changing the TMS1.Temp value beyond the threshold to see if it logs to the database.

ATSCADA System alarm dashboard with ATDriver Server popup showing live tag values and active high alarm event log table

As shown, when values exceed the defined thresholds, the data is automatically stored in the database and instantly displayed on the previously configured iAlarmViewer in the ATSCADA hospital monitoring system.

Move to the final tab, Report

To help users export reports and review all operational data during system runtime.

In the Report tab, use the iDataReporter component to support report generation and data export.

Visual Studio Toolbox panel showing iDataReporter component under ATSCADA_iTools with DataGridView and DataSet controls

To generate report data, the system must use iDataLogger to log operational values into the database for the ATSCADA hospital monitoring system.

Return to the original Layout tab and drag iDataLogger components into the form to enable data logging. Use three iDataLogger components, one for each monitoring area.

Windows Forms design surface showing iDriver1, iDataLogger1, iDataLogger2, and iDataLogger3 components in the component tray

Set up properties for each iDataLogger Driver: Select iDriver1

Data Logger Settings window with selected pharmacy tags, alias mapping list, trigger option, and add update controls

LoggingTimerRate: To continuously store real-time data every 1 minute, enter the value 60000. This value is in milliseconds (60000 ms = 60 seconds = 1 minute) for the ATSCADA hospital monitoring system.

UpdateType: Timer

Collection: Select the required TagName values such as Temp and Humi for each monitoring area.

ATSCADA Settings panel showing Data Logger database configuration with MySQL connection details, collection tags, logging timer rate, and update type

Then click OK to save the settings.

SQL query result for ATSCADA datalog table showing date time records with temperature and humidity values from multiple sensors

Run a test and check the database.

ATSCADA System report dashboard with pharmacy, inpatient, and cold warehouse report sections, date time filters, and Excel export buttons

After the data has been logged to the database, we proceed to set up the properties of iDataReporter to export it to Excel.

👉 Learn More about ATSCADA 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

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 Power Management System

Requirements: There are 3 areas that require power management, including a factory, a residential zone, [...]

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, [...]

ATSCADA AI Predictor Application for Time Series Data Forecasting

Introduction ATSCADA AI Predictor is an artificial intelligence application used for forecasting time series data [...]

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