Skip to content

Platform Architecture

inSCADA is a SCADA platform designed to collect, process, visualize, and automate data from field devices. It runs as a single application — all components are bundled in a single file.

All data in inSCADA is organized in the following hierarchical structure:

Space
├── [Space-Level Components]
│ ├── Custom Menu
│ ├── Dashboard
│ ├── Expression (Shared Formulas)
│ └── Symbol (SVG Symbol Library)
└── Project
├── [Communication]
│ └── Connection
│ └── Device
│ └── Frame (Data Frame)
│ └── Variable
├── [Monitoring & Alarm]
│ ├── Alarm Group
│ │ └── Alarm Definition
│ └── Trend (Trend Chart)
│ └── Trend Tag
├── [Automation]
│ ├── Script (Automation Script)
│ └── Data Transfer
├── [Visualization]
│ ├── Animation (SVG Screen)
│ └── Faceplate (Reusable Component)
└── [Reporting]
└── Report

Space is the top-level isolation unit. Each space has its own set of projects, users, and configurations. Different spaces are completely independent of each other.

Use cases:

  • Customer isolation — a separate space for each customer
  • Environment separation — development, testing, production
  • Department separation — energy, water, building automation

A project represents a facility, site, or logical unit. There can be multiple projects under a space. All components within a project (connections, alarms, scripts, screens, etc.) operate within the project scope.

Example projects:

  • “Ankara Factory” — a manufacturing facility
  • “SPP-01” — a solar power plant
  • “Building-A HVAC” — a building’s HVAC system

Each project can optionally have latitude/longitude coordinates and can be visualized on the map screen.

A connection is the communication channel to a field device or system. Each connection uses a protocol.

Supported protocols:

GroupProtocols
IndustrialMODBUS TCP/UDP/RTU, S7, EtherNet/IP, Fatek
EnergyDNP3, IEC 60870-5-104, IEC 61850
Open StandardOPC UA, OPC DA, OPC XML, MQTT
LocalLOCAL (simulation / internal calculation)

Each connection can be started and stopped independently, and its status can be monitored (Connected, Disconnected, Error).

A device represents a physical or logical unit on a connection. For example, there can be multiple slave devices on a single MODBUS connection.

A frame is a data block read from a device. Each frame defines a specific address range and read period.

ParameterDescription
Start AddressThe first address to read
QuantityNumber of registers/points to read
PeriodRead frequency (ms)

A variable is the most fundamental data unit in the platform. A temperature measurement, a motor status, a counter value — each one is a variable.

Key properties of each variable:

PropertyDescription
NameUnique name (within the project)
TypeFloat, Integer, Boolean, String
UnitEngineering unit (°C, kW, bar, V, A…)
ScalingRaw → Engineering conversion (engZeroScale, engFullScale)
LoggingHistorical data recording type and period
ExpressionCustom value calculation formula

The raw value is linearly converted to the engineering value:

Engineering = engZeroScale + (raw - rawZeroScale) ×
(engFullScale - engZeroScale) / (rawFullScale - rawZeroScale)

Example: 4-20mA sensor → 0-100°C scaling:

  • Raw: 4mA → 0°C, 20mA → 100°C
  • engZeroScale=0, engFullScale=100, rawZeroScale=4, rawFullScale=20
TypeDescription
PeriodicallyRecords at fixed intervals (logPeriod seconds)
When ChangedRecords when the value changes
NoneNo recording

A custom calculation formula can be assigned to a variable. This formula runs on every read cycle, and its result becomes the variable’s value:

// Example: Sine wave simulation
var t = new Date().getTime() / 1000;
return (Math.sin(t / 60) * 150 + 450).toFixed(2) * 1;

Alarms are organized in groups. Each alarm group belongs to a project and can be enabled/disabled as a whole.

Project
└── Alarm Group (e.g., "Temperature Alarms")
├── Alarm: Temperature_C > 60°C (High Temperature)
├── Alarm: Temperature_C > 80°C (Critical Temperature)
└── Alarm: Temperature_C < 10°C (Low Temperature)
TypeDescriptionParameters
AnalogNumeric value threshold checkHigh, High-High, Low, Low-Low
DigitalBoolean state checkON → Alarm, OFF → Normal
CustomScript-based custom conditionJavaScript expression
Normal → Fired → Acknowledged → Off

Every alarm event is recorded historically: fire time, off time, acknowledging user, duration.


Scripts are the platform’s automation engine. They run server-side and can access all platform data.

AreaDescriptionExample
Scheduled taskPeriodic or timed executionEnergy calculation every 10 seconds
Variable formulaValue transformationDeriving a third variable from two others
Alarm conditionCustom alarm logicCondition dependent on multiple variables
Data integrationREST API callFetching data from a weather API
ReportingAutomated reportSending a PDF report by email every morning
NotificationEvent-based notificationSending an SMS when an alarm fires
TypeUsage
PeriodicRuns every X milliseconds
DailyRuns at a specific time every day
OnceRuns once and stops
NoneTriggered only manually or via API

Details: Script Engine →


SVG Animation — Energy Monitoring Dashboard

SVG-based interactive SCADA screens. Variable values are displayed in real time on the screen: color changes, motion, numeric display, on/off controls.

Reusable SVG components. Frequently used visual elements such as motors, valves, and pumps can be defined as faceplates and used across multiple animation screens.

Symbol (SVG Symbol Library) — Space Level

Section titled “Symbol (SVG Symbol Library) — Space Level”

SVG symbol library shared across the space. Animations and faceplates in all projects can use these symbols.

Used to combine data from different projects into a single dashboard. Since it is defined at the space level, cross-project data comparison is possible.

Charts showing the change of variables over time. Multiple variables can be shown on the same chart (Trend Tag). Used for historical data review and comparison.

Used to create custom menu structures for users. Defined at the space level — different menus can be assigned to different roles. An operator sees only monitoring screens, a manager sees reports, and an engineer sees configuration pages.

The reporting system produces output in PDF and Excel formats. Reports can be scheduled, sent by email, or saved to file.

Expression (Shared Formula) — Space Level

Section titled “Expression (Shared Formula) — Space Level”

Calculation formulas shared across the space. Can be used by multiple variables or alarms. Enables centralized management of repeated formulas.

Project Map

Displays the geographic locations of projects on a GIS map. At each project point, real-time values, alarm status, and connection status are shown as a popup.


inSCADA uses three different database layers. Each is optimized for a different data type:

Project definitions, variable settings, users, roles, alarm definitions, script code — all platform configuration data is stored here.

This data rarely changes, has a relational structure, and consistency is the priority.

Variable historical values, alarm history, event logs, login attempts — all time-stamped data is stored here.

This data is continuously written, rarely updated, and queried by time range. Old data can be automatically cleaned up with retention policies.

Data TypeDefault Retention
Variable values365 days
Alarm history365 days
Event logs14 days
Login attempts365 days

The latest current values of all variables are kept in memory (cache). When a value is read via ins.getVariableValue() or the REST API, it returns from the cache — no database query is needed.

This provides:

  • Real-time value read < 1ms
  • Thousands of variables can be read simultaneously
  • Web interface and scripts access the same up-to-date data

The path data follows from a field device to the web screen:

┌─────────┐ ┌──────────┐ ┌─────────┐ ┌────────┐ ┌────────┐
│ Field │───▶│Connection│───▶│ Frame │───▶│ Raw │───▶│Scaling │
│ Device │ │(Protocol)│ │ (Read) │ │ Value │ │ │
└─────────┘ └──────────┘ └─────────┘ └────────┘ └───┬────┘
┌───────────────────────────────────────────┘
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Cache │───▶│ Logging │ │ Alarm │
│(Real-time)│ │(History) │ │ Check │
└────┬─────┘ └──────────┘ └──────────┘
┌────────┼────────┐
▼ ▼ ▼
┌────────┐┌────────┐┌────────┐
│ Web ││ Script ││ REST │
│ UI ││ Engine ││ API │
└────────┘└────────┘└────────┘
  1. Field Device — PLC, RTU, sensor, meter, etc.
  2. Connection — Connects to the device using the specified protocol
  3. Frame Read — Reads the address block at the defined period
  4. Raw Value — Raw data received from the device
  5. Scaling — Raw → Engineering conversion (if applicable)
  6. Cache — Current value is written to the in-memory cache
  7. Logging — Records to the time series database based on logging type
  8. Alarm Check — Threshold check based on alarm definitions
  9. Consumption — Web UI (WebSocket), Script Engine, REST API all read from the same cache
UI / Script / API → Cache Update → Connection → Protocol Write → Field Device

When a value is written via ins.setVariableValue() or the UI, the command is sent to the field device through the connection.


inSCADA Instance
├── Space: "energy"
│ ├── Project: "SPP-01"
│ ├── Project: "SPP-02"
│ └── Project: "WPP-01"
├── Space: "building"
│ ├── Project: "Head Office"
│ └── Project: "Warehouse"
└── Space: "water"
├── Project: "Treatment Plant"
└── Project: "Pump Stations"

Each space has:

  • Its own set of projects
  • Its own user permissions
  • Data independent from other spaces

Users can access multiple spaces and switch between spaces during a session.


PortUsage
8081HTTP — Web interface and REST API
8082HTTPS — Web interface and REST API (encrypted)

The web interface is accessible from any modern browser. It also works responsively on mobile devices (tablets, phones). No additional client software installation is required.

Configuration details: Configuration →