Skip to main content

HMI and SCADA

What are SCADA and HMI?​

SCADA (supervisory control and data acquisition) is a system that gathers readings from sensors and controllers across a plant or a wide area, shows them to operators, stores their history and raises alarms, and lets operators send commands back. An HMI (human-machine interface) is the screen through which a person watches and operates a machine or process.

An HMI trend display on a dark navy background: four process tags (tank level, inlet flow, discharge pressure and temperature) on four stacked lanes over ten minutes, each with dashed high and low alarm limit lines, and an alarm list on the right with times, tags and alarm messages

A SCADA trend display of a simulated pumping station: four tags in stacked lanes, their alarm limits as dashed lines and the alarm list on the right. Try the interactive version, drag the limits and switch to the grey high-performance style.

Key takeaways
  • SCADA is the whole system: field devices, PLCs and RTUs, communications, servers, the historian and the HMI screens.
  • The HMI is the part people see. A single machine can have an HMI without SCADA.
  • Control loops run in the PLCs and RTUs on site; SCADA supervises them, so the plant keeps running if a link drops.
  • Trend charts are the main tool on an HMI for seeing what a process is doing and has done.
  • Good HMIs are grey and calm, so colour stands out when something is wrong (the high-performance HMI style), and alarms use limits with deadbands so they don't chatter (ISA-18.2).

What does SCADA stand for?​

SCADA stands for supervisory control and data acquisition. Each part of the name is a job the system does:

  • Supervisory: it sits above the controllers that run the process. It doesn't open a valve every time a level changes; a PLC (programmable logic controller) or RTU (remote terminal unit) on site does that. SCADA watches those controllers and changes their setpoints, modes and schedules.
  • Control: operators, or SCADA's own logic, send commands: start a pump, close a breaker, raise a setpoint.
  • Data acquisition: it polls or receives readings, called tags or points, from hundreds to millions of sensors and stores them with a timestamp.

The word is used for the software (a "SCADA package"), for the whole installation (a "SCADA system") and, loosely, for any industrial monitoring screen. NIST describes SCADA as a computerised system that gathers and processes data and applies controls across assets spread over long distances, such as power grids, pipelines and water systems.

What is an HMI?​

An HMI is anything that lets a person see the state of a machine and act on it. In industry, the term usually means one of three things:

Kind of HMIWhat it isTypical use
Panel HMIA touch screen mounted on a machine or cabinet, wired to one PLCStarting, stopping and adjusting a single machine, such as a packaging line or compressor
PC or server-based HMIHMI software on an industrial PC, showing several machines or a whole areaA control room for one plant area
SCADA HMI clientsScreens served by the SCADA system to operator stations, web browsers and mobile devicesSupervising a whole plant or a network of remote sites

"HMI software" is the program used to draw those screens and link each graphic to a tag. A "PLC HMI" pairing is the simplest system: the PLC runs the control logic and the panel shows its values and buttons. Outside industry, HMI also describes car dashboards, medical device screens and cockpit displays.

HMI vs SCADA: how they fit together​

HMI and SCADA are often written together ("HMI/SCADA") because the HMI is the visible part of a SCADA system. They differ mainly in scope.

HMISCADA
What it isA display and its controlsA system of devices, networks, servers and displays
ScopeOne machine, or the screens of a larger systemA whole plant, or sites spread over hundreds of kilometres
Stores historyLittle or none on a panel HMIYes, in a historian, often for years
AlarmsShows themDetects, logs, prioritises and routes them
Can exist aloneYes: a panel HMI on one machineNo: it always has HMIs

How a SCADA system works​

A SCADA system is built in layers. Readings travel up from the field to the screens, and commands travel down.

The layers of a SCADA system, from bottom to top: field devices such as level, flow, pressure and temperature transmitters, pumps, motors, valves and breakers; controllers (PLCs in plants and RTUs at remote sites); the communications network with protocols such as Modbus, DNP3, OPC UA and IEC 61850; the SCADA server with its tag database, historian and alarm server; and the HMI clients: operator stations, web and mobile screens and the engineering station. An arrow on the right shows measurements and alarms going up and commands and setpoints going down

  1. Field devices measure and act. Transmitters turn level, flow, pressure and temperature into electrical signals; pumps, motors, valves and circuit breakers are the outputs.
  2. Controllers run the local logic. A PLC is a rugged computer that scans its inputs and updates its outputs many times a second. An RTU does the same at a remote site, such as a pumping station or substation, and is built for low power and patchy communications.
  3. The communications network carries data between sites and the control centre over Ethernet, fibre, licensed radio, cellular or satellite links. Common protocols are Modbus (simple and very widespread), DNP3 (utilities, with timestamped events), IEC 61850 (electrical substations) and OPC UA (a vendor-neutral way to exchange data between software).
  4. The SCADA server polls the controllers, or receives changes they report, and keeps the latest value of every tag. The historian stores the values over time for trends and reports, and the alarm server compares values with their limits.
  5. HMI clients show it all to people: operators in the control room, engineers on an engineering station, and managers in a browser.

Because the PLCs and RTUs keep controlling on their own, a SCADA system tolerates a slow or broken link: the site carries on, and the server fills in the history when the link returns. Connecting these layers to business networks and the internet brings cyber risk; NIST SP 800-82 is the standard guide to securing them.

SCADA vs DCS vs PLC​

The three overlap, and modern products blur the line, but they started with different jobs.

PLCSCADADCS (distributed control system)
Main jobControl one machine or process unitSupervise many controllers, often far apartControl a whole continuous plant
WhereOne cabinetA water network, pipeline, power grid or factoryA refinery, chemical plant or power station
Control loopsRuns themLeaves them to the PLCs and RTUsRuns them in its own controllers, tightly linked
NetworkLocalWide-area, can be slow or unreliableFast, redundant plant network
Typical screensA panel HMIOverviews, trends and alarms across sitesOperator consoles with built-in trends and faceplates
Choose it whenA machine needs logic and I/OAssets are spread out or come from several vendorsOne large process needs coordinated control and high availability

What is on an HMI screen?​

Most HMI screens are built from a handful of elements:

  • Process graphics: a simplified drawing of the plant (tanks, pipes, pumps, valves) with live values beside each item. Older screens drew 3-D tanks and spinning pumps; modern guidance prefers flat, simple shapes.
  • Faceplates: a small panel for one tag or device, with its value, units, setpoint, mode (auto or manual) and a bar or gauge showing where the value sits between its limits. Clicking a pump or valve usually opens its faceplate.
  • Trend charts: the value of one or more tags over time. They are the subject of the next section.
  • Alarm summary: a list of active and recent alarms, with time, tag, message and priority, where operators acknowledge alarms.
  • X-Y plots and phasor views: one value against another, such as a pump's head against its flow (its curve), or, in power systems, the voltage and current phasors from substation measurements.
  • Navigation: the hierarchy of screens. ISA-101 describes four levels, from a level 1 overview of the whole operation, through level 2 unit screens and level 3 detail screens, to level 4 diagnostics.

To see how those charts are built, read our guides to the gauge chart used on faceplates and the strip chart that trend displays grew from.

How to read a SCADA trend chart​

A trend chart, or "trend", plots tags against time. It's the screen operators turn to when they need to know whether a value is rising or falling, how fast, and what happened before an alarm.

A ten-minute trend of reactor temperature TI-101 on a grey background, with a dashed HI limit at 80, a shaded 5-degree deadband just below it and a LO limit at 20. The temperature rises through 80, where the alarm is raised and the line turns red; dips to 79 and 77 inside the deadband, where the alarm stays on; and falls below 75, where it returns to normal. A cursor reads 88.0 degrees at 08:44:23

  1. Find the tag and its units. Each line is a pen, named after its tag (TI-101 is a temperature indicator) with its engineering units. Check which axis each pen uses.
  2. Check the time span and where "now" is. A live trend scrolls, with the newest value at the right. A 10-minute trend and a 10-hour trend can look alike, so read the time axis.
  3. Read the value against its limits. Dashed lines often show the setpoint and the alarm limits (HI and LO, sometimes HIHI and LOLO beyond them). How close a value runs to a limit matters as much as the value.
  4. Look at the shape: a steady line, a slow drift, a step, a cycle (often a control loop that's tuned too hard), or a flat line, which can mean a failed sensor rather than a steady process.
  5. Line up pens in time. When pressure jumps and flow drops at the same moment, they are probably linked. A vertical cursor shows every pen's value at one time.
  6. Zoom and pan into history. Pausing the trend, then zooming into the minutes before an alarm, is the usual first step in finding its cause.
Real-time trendHistorical trend
Data fromThe SCADA server's live values, buffered for a short windowThe historian
Time spanSeconds to a few hoursHours to years
UpdatesContinuously, scrollingOnly when asked, then fixed
Used forWatching a process while operating itFinding the cause of an event, reports, comparing batches

Most SCADA trends do both: they scroll live, and pausing or panning left loads older values from the historian. Long spans hold far more readings than the screen has pixels, so the historian or the chart reduces them first. Our downsampling guide shows why the method matters: a plain average can hide the spike that caused the alarm.

A trend can show its pens on one shared axis, on several axes side by side, or in stacked axes, with one lane per pen down the chart, as on a paper chart recorder. Shared axes suit tags with the same units and range, such as several temperatures in one vessel. Stacked lanes suit mixed units, because each pen keeps its own fixed scale and lines don't cross.

Setpoints, alarm limits and deadbands​

An alarm limit is the value at which the SCADA system tells the operator something needs attention. A deadband stops a noisy value from raising and clearing an alarm many times while it hovers at the limit, which alarm engineers call chattering. With a HI limit of 80 and a deadband of 5, the alarm is raised above 80 and clears only once the value falls below 75 (the diagram above). The 5-degree deadband in the diagram is wider than usual so that it shows clearly. Alarm-management guides start from a few percent of a tag's range, larger for noisy signals such as flow and smaller for slow ones such as temperature, where about 1% is common, then tune it to the signal's noise; ISA-TR18.2.3 covers deadbands and delays in detail. Some systems add an on-delay too: the value must stay beyond the limit for some seconds before the alarm is raised.

Alarms and high-performance HMI design​

Two standards shape how modern HMIs look and alarm:

  • ANSI/ISA-18.2, its international counterpart IEC 62682:2022, and the EEMUA 191 guide cover alarm management: every alarm must need an operator response, have a priority and a documented cause and action. ISA-18.2 treats about one alarm every 10 minutes per operator as very likely to be acceptable in normal running, and uses more than 10 alarms in 10 minutes as the usual measure of an alarm flood, when operators can no longer respond to each alarm.
  • ANSI/ISA-101.01 covers HMI design: the HMI life cycle, the display hierarchy and consistent use of colour. It doesn't prescribe a colour scheme, but it is consistent with the high-performance HMI style set out in The High Performance HMI Handbook (Hollifield and others, 2008). That style uses grey backgrounds and muted colours for normal operation and keeps bright colour, red and amber especially, for abnormal states and alarms. It favours analogue indicators that show a value against its normal range, and embeds small trends in overview screens, so operators can see a problem developing before an alarm.

Try both styles in the live example. In both, a pen turns red where it crosses a limit and the part beyond the limit is shaded. On the colourful trend that red competes with four other bright pens; on the grey trend it's the only strong colour.

Examples of HMI and SCADA screens​

Every industry that runs a remote or continuous process uses HMI and SCADA screens, and each one trends the few values its operators watch most.

IndustryWhat the screens showTrend and chart examples
Power plant and substationsGenerator output, breakers and transformers on a one-line diagramMegawatts, frequency and voltage over the last hour; voltage and current phasors from phasor measurement units; transformer temperature against its limit
Water and wastewater treatmentReservoir levels, pumps, filters, chemical dosingReservoir level over 24 hours against pump starts; chlorine residual and turbidity with alarm limits; flow at each pumping station
Oil and gas pipelineCompressor and pumping stations, valves and meters along hundreds of kilometres, often over radio or satelliteInlet and outlet pressure at each station; flow balance between stations to detect leaks; compressor vibration
Manufacturing lineMachine states, counts and rejects for each stationCycle time and temperature by station; oven or mould temperatures against a recipe; downtime by cause

SciChart's HMI and SCADA page describes how its charts are used on these screens, and the instrumentation page covers test and measurement displays.

Common HMI and SCADA trend chart mistakes​

Most trend chart mistakes on HMIs either hide a developing problem or bury it under nuisance alarms and colour.

  • Autoscaling the value axis. A live axis that rescales to fit the data makes a 1% wobble look like a crash, and the trace jumps about. Give each tag a fixed range that covers its normal values and its limits.
  • No deadband on alarms. A tag hovering at its limit produces dozens of alarm and return-to-normal events, which buries real alarms. Set a deadband, and an on-delay for very noisy tags.
  • Colour everywhere. When every pen, tank and pipe is brightly coloured, an alarm colour no longer stands out. Keep normal states grey and save strong colours for abnormal ones.
  • Too many pens on one axis. Eight lines with different units on one scale can't be read. Use stacked lanes, or split them over several trends.
  • Averaging away the event. Long historical trends drawn from averaged data hide short spikes and dips. Use min-max downsampling, or draw the raw data.
  • No way to stop and look. A trend that keeps scrolling while an operator studies it is hard to use. Provide pause, zoom, pan and a cursor that reads every pen at one time.
  • Unclear time. Mixing local time and UTC, or hiding the date on long spans, causes mistakes when trends are compared with logs and other sites.

How to build an HMI trend chart in JavaScript, React or Angular​

The example below trends four tags of a simulated pumping station in stacked lanes on one time axis: a tank (LT-101) filled by an inlet flow (FT-102) and emptied by a pump that starts and stops on level, its discharge pressure (PT-103) and a temperature (TT-104). It loads an hour of history, 3,600 readings per tag, then adds a reading per tag every simulated second, running ten times faster than real time, with occasional upsets that raise alarms.

Drag any dashed HI or LO line to move that limit, and watch the alarm list on the right. The draggable limits only illustrate the display: in a real plant, alarm limits come from alarm rationalisation under ISA-18.2, and changing one goes through change control. Set the Deadband to None to see alarms chatter. Each pen turns red exactly where it crosses a limit, and the part beyond the limit is shaded. Switch the Style to high-performance (grey) to compare how much that stands out. Change the Time span to see 2, 10 or 60 minutes, and use Pause to stop the scrolling; scroll to zoom in time, drag to pan, double-click to see all the history, and hover to read every pen.

Here is the code for this chart. The process simulation and the alarm logic are plain JavaScript; SciChart.js draws the stacked trend, the limit lines, the colour change at each limit and the shading.

// An HMI trend display with SciChart.js: four process tags on stacked axes, streaming live,
// with draggable HI and LO alarm limits, a deadband, an alarm list and a grey high-performance style.
// Each pen changes colour exactly where it crosses a limit, and the part beyond the limit is shaded.
const {
SciChartSurface,
DateTimeNumericAxis,
NumericAxis,
NumberRange,
EAutoRange,
EAxisAlignment,
EXyDirection,
ELabelPlacement,
EStrokePaletteMode,
FastLineRenderableSeries,
FastBandRenderableSeries,
XyDataSeries,
XyyDataSeries,
XyBaseRenderDataTransform,
XyyBaseRenderDataTransform,
HorizontalLineAnnotation,
LeftAlignedOuterVerticallyStackedAxisLayoutStrategy,
parseColorToUIntArgb,
SciChartJsNavyTheme,
CursorModifier,
MouseWheelZoomModifier,
ZoomPanModifier,
ZoomExtentsModifier
} = SciChart;
// or, for npm, import { SciChartSurface, ... } from "scichart"

const START = Date.UTC(2026, 0, 12, 7, 0, 0) / 1000; // the trend's clock, in seconds (shown as UTC)
const HISTORY = 3600; // seconds of history loaded before the live data starts
const CAPACITY = 7200; // readings kept per tag (two hours at one per second)
const ALARM_RED = "#E53935"; // the colour of a pen beyond its limit
const ALARM_FILL = "#E5393566"; // the translucent shading between the pen and the limit it crossed

// One pen per process tag, each with its own axis range and alarm limits (engineering units)
const pens = [
{ tag: "LT-101", name: "Tank level", unit: "%", min: 0, max: 100, lo: 20, hi: 75, color: "#50C7E0" },
{ tag: "FT-102", name: "Inlet flow", unit: "m³/h", min: 0, max: 250, lo: 60, hi: 175, color: "#3BD16F" },
{ tag: "PT-103", name: "Discharge pressure", unit: "bar", min: 0, max: 10, lo: 0.5, hi: 7.5, color: "#F6E05E" },
{ tag: "TT-104", name: "Temperature", unit: "°C", min: 0, max: 100, lo: 30, hi: 72, color: "#C3B4F0" }
].map((pen, index) => ({
...pen,
axisId: `pen${index}`,
inAlarm: "", // "", "HI" or "LO"
axis: null, // filled in below: its y-axis, data series, line and limit lines
data: null,
line: null,
fillData: null,
fill: null,
hiLine: null,
loLine: null
}));

const theme = new SciChartJsNavyTheme();
const { wasmContext, sciChartSurface } = await SciChartSurface.create(ui.chartDiv, { theme });

const xAxis = new DateTimeNumericAxis(wasmContext, { autoRange: EAutoRange.Never });
sciChartSurface.xAxes.add(xAxis);

// Stack the y-axes top to bottom, so each tag gets its own lane, like the pens of a strip chart recorder
sciChartSurface.layoutManager.leftOuterAxesLayoutStrategy = new LeftAlignedOuterVerticallyStackedAxisLayoutStrategy();

// --- Splitting each pen at its limits, with the Render Data Transforms API ---
// A line segment that crosses a limit is drawn in one colour from end to end. To change colour exactly at
// the limit, the transforms below add a point wherever a segment crosses LO or HI, just before drawing.
// The data series isn't changed, so tooltips and the alarm logic still see the real readings.
function splitAtLimits(pointSeries, from, to, lo, hi, add) {
const xs = pointSeries.xValues;
const ys = pointSeries.yValues;
let lastX = xs.get(from);
let lastY = ys.get(from);
add(lastX, lastY, from);
for (let i = from + 1; i <= to; i++) {
const x = xs.get(i);
const y = ys.get(i);
const crossings = [];
for (const limit of [lo, hi]) {
if ((lastY - limit) * (y - limit) < 0) crossings.push({ f: (limit - lastY) / (y - lastY), limit });
}
crossings.sort((a, b) => a.f - b.f); // a steep segment can cross both limits
for (const { f, limit } of crossings) add(lastX + (x - lastX) * f, limit, i);
add(x, y, i);
lastX = x;
lastY = y;
}
}
const indexRangeOf = (renderPassData) => {
const input = renderPassData.pointSeries;
return input.resampled
? { from: 0, to: input.xValues.size() - 1 }
: { from: renderPassData.indexRange.min, to: renderPassData.indexRange.max };
};

// For the line: the readings plus the crossing points
class LimitSplitTransform extends XyBaseRenderDataTransform {
pen;
constructor(series, context, pen) {
super(series, context, [series.drawingProviders[0]]); // the line only
this.pen = pen;
}
runTransformInternal(renderPassData) {
const { xValues, yValues, indexes } = this.pointSeries;
xValues.clear();
yValues.clear();
indexes.clear();
const { from, to } = indexRangeOf(renderPassData);
if (to >= from) {
splitAtLimits(renderPassData.pointSeries, from, to, this.pen.lo, this.pen.hi, (x, y, i) => {
xValues.push_back(x);
yValues.push_back(y);
indexes.push_back(i);
});
}
return this.pointSeries;
}
}

// For the shading: a band from each reading (y) to the same reading held inside the limits (y1).
// The two are equal while the value is normal, so the band only has area beyond a limit.
class LimitFillTransform extends XyyBaseRenderDataTransform {
pen;
constructor(series, context, pen) {
super(series, context, series.drawingProviders);
this.pen = pen;
}
runTransformInternal(renderPassData) {
const { xValues, yValues, y1Values, indexes } = this.pointSeries;
xValues.clear();
yValues.clear();
y1Values.clear();
indexes.clear();
const { lo, hi } = this.pen;
const { from, to } = indexRangeOf(renderPassData);
if (to >= from) {
splitAtLimits(renderPassData.pointSeries, from, to, lo, hi, (x, y, i) => {
xValues.push_back(x);
yValues.push_back(y);
y1Values.push_back(Math.min(Math.max(y, lo), hi));
indexes.push_back(i);
});
}
return this.pointSeries;
}
}

// A palette provider colours each line segment. The transform has split the line at the limits, so a
// segment is beyond a limit exactly when its midpoint is. (A segment's colour is set at its end point.)
const alarmArgb = parseColorToUIntArgb(ALARM_RED);
function makeAlarmPalette(pen) {
let lastY = NaN;
return {
strokePaletteMode: EStrokePaletteMode.SOLID,
onAttached: () => {},
onDetached: () => {},
shouldUpdatePalette: () => true, // the limits can move, so re-check on every draw
overrideStrokeArgb: (x, y) => {
const middle = (y + lastY) / 2;
lastY = y;
return middle > pen.hi || middle < pen.lo ? alarmArgb : undefined; // undefined = the pen's colour
}
};
}

pens.forEach((pen) => {
pen.axis = new NumericAxis(wasmContext, {
id: pen.axisId,
axisAlignment: EAxisAlignment.Left,
axisTitle: `${pen.tag} (${pen.unit})`,
axisTitleStyle: { fontSize: 13 },
autoRange: EAutoRange.Never, // fixed ranges: a trend that rescales itself hides how big a change is
visibleRange: new NumberRange(pen.min, pen.max),
maxAutoTicks: 3,
drawMinorGridLines: false
});
sciChartSurface.yAxes.add(pen.axis);

// fifoCapacity keeps the newest readings and discards the oldest
pen.data = new XyDataSeries(wasmContext, {
dataSeriesName: `${pen.tag} ${pen.name}`,
fifoCapacity: CAPACITY,
isSorted: true,
containsNaN: false
});
// The band series needs x, y and y1 values; the transform replaces y1, so y1 is just a placeholder
pen.fillData = new XyyDataSeries(wasmContext, { fifoCapacity: CAPACITY, isSorted: true, containsNaN: false });

// The shading, drawn first so it sits behind the line: fill where y > y1 (above HI), fillY1 where y < y1 (below LO)
pen.fill = new FastBandRenderableSeries(wasmContext, {
dataSeries: pen.fillData,
yAxisId: pen.axisId,
fill: ALARM_FILL,
fillY1: ALARM_FILL,
stroke: "#00000000",
strokeY1: "#00000000",
strokeThickness: 0
});
pen.fill.renderDataTransform = new LimitFillTransform(pen.fill, wasmContext, pen);

pen.line = new FastLineRenderableSeries(wasmContext, {
dataSeries: pen.data,
yAxisId: pen.axisId,
stroke: pen.color,
strokeThickness: 2,
paletteProvider: makeAlarmPalette(pen)
});
pen.line.renderDataTransform = new LimitSplitTransform(pen.line, wasmContext, pen);
sciChartSurface.renderableSeries.add(pen.fill, pen.line);

// Draggable HI and LO limit lines. Dragging one changes the alarm limit straight away.
const makeLimit = (which) =>
new HorizontalLineAnnotation({
yAxisId: pen.axisId,
y1: pen[which],
isEditable: true,
stroke: which === "hi" ? "#EF5350" : "#F48420",
strokeThickness: 2,
strokeDashArray: [6, 4],
showLabel: true,
labelPlacement: which === "hi" ? ELabelPlacement.TopLeft : ELabelPlacement.BottomLeft,
labelValue: `${which.toUpperCase()} ${pen[which]}`,
onDrag: () => setLimit(pen, which)
});
pen.hiLine = makeLimit("hi");
pen.loLine = makeLimit("lo");
sciChartSurface.annotations.add(pen.hiLine, pen.loLine);
});

// Keep HI above LO and inside the axis range, then show the new value on the line's label
function setLimit(pen, which) {
const line = which === "hi" ? pen.hiLine : pen.loLine;
const span = pen.max - pen.min;
const gap = span * 0.05;
let value = line.y1;
value = which === "hi" ? Math.min(pen.max, Math.max(pen.lo + gap, value)) : Math.max(pen.min, Math.min(pen.hi - gap, value));
value = Number(value.toFixed(span > 20 ? 0 : 1));
pen[which] = value;
line.y1 = value;
line.labelValue = `${which.toUpperCase()} ${value}`;
// The transforms depend on the limits as well as the data, so ask them to run again
pen.line.renderDataTransform.requiresTransform = true;
pen.fill.renderDataTransform.requiresTransform = true;
}

// --- Alarms: raise when a value crosses a limit; clear only when it is back inside by the deadband ---
const alarmLog = []; // newest first
function checkAlarms(pen, time, value) {
const deadband = Number(ui.deadbandSelect.value) * (pen.max - pen.min);
let state = pen.inAlarm;
if (value > pen.hi) state = "HI";
else if (value < pen.lo) state = "LO";
else if (state === "HI" && value < pen.hi - deadband) state = "";
else if (state === "LO" && value > pen.lo + deadband) state = "";
if (state === pen.inAlarm) return;
const unit = pen.unit === "%" ? "%" : " " + pen.unit;
const text = state
? `${state} alarm: ${value.toFixed(1)}${unit} (limit ${pen[state.toLowerCase()]})`
: `Back to normal: ${value.toFixed(1)}${unit}`;
alarmLog.unshift({ time, tag: pen.tag, text, active: !!state });
alarmLog.length = Math.min(alarmLog.length, 60);
pen.inAlarm = state;
}

// --- The trend's clock and data ---
const nextReading = createProcess();
let now = START;
function addReading() {
now += 1;
const values = nextReading();
pens.forEach((pen, i) => {
pen.data.append(now, values[i]);
pen.fillData.append(now, values[i], values[i]);
checkAlarms(pen, now, values[i]);
});
}
for (let i = 0; i < HISTORY; i++) addReading(); // an hour of history, as a historian would supply

// Live mode: the time window follows the newest reading. Zooming or panning pauses it.
let isPaused = false;
let movingWindow = false;
function showLatest() {
const span = Number(ui.spanSelect.value);
movingWindow = true;
xAxis.visibleRange = new NumberRange(now - span, now);
movingWindow = false;
}
xAxis.visibleRangeChanged.subscribe(() => {
if (!movingWindow && !isPaused) setPaused(true); // the user zoomed or panned
});
function setPaused(paused) {
isPaused = paused;
ui.pauseButton.textContent = paused ? "Resume live" : "Pause";
if (!paused) showLatest();
}

// The simulation runs ten times faster than real time: one reading per tag every 100 ms
const timer = setInterval(() => {
addReading();
if (!isPaused) showLatest();
renderAlarms();
}, 100);
sciChartSurface.addDeletable({ delete: () => clearInterval(timer) });

// --- Styles: colourful, or grey with colour kept for alarms (high-performance HMI) ---
function applyStyle(style) {
const grey = style === "grey";
sciChartSurface.background = grey ? "#D3D6DA" : theme.sciChartBackground;
const text = grey ? "#2B3240" : theme.tickTextBrush;
for (const axis of [xAxis, ...pens.map((pen) => pen.axis)]) {
axis.labelStyle = { ...axis.labelStyle, color: text };
axis.axisTitleStyle = { ...axis.axisTitleStyle, color: grey ? text : theme.axisTitleColor };
axis.majorGridLineStyle = { ...axis.majorGridLineStyle, color: grey ? "#C0C4CA" : theme.majorGridLineBrush };
axis.minorGridLineStyle = { ...axis.minorGridLineStyle, color: grey ? "#CACDD2" : theme.minorGridLineBrush };
axis.drawMajorBands = !grey;
}
pens.forEach((pen) => {
pen.line.stroke = grey ? "#3B4350" : pen.color;
pen.hiLine.stroke = pen.hiLine.axisLabelFill = grey ? "#4A5361" : "#EF5350"; // line and label colour
pen.loLine.stroke = pen.loLine.axisLabelFill = grey ? "#4A5361" : "#F48420";
});
ui.panel.style.background = grey ? "#C7CBD0" : "#1C2C4A";
ui.panel.style.color = grey ? "#1B2433" : "#ffffff";
renderAlarms();
}

// The alarm list: active alarms first in red, then the history of alarms and returns to normal
let shown = "";
function renderAlarms() {
const grey = ui.styleSelect.value === "grey";
const active = pens.filter((pen) => pen.inAlarm).length;
const key = `${alarmLog.length}|${alarmLog[0]?.time}|${active}|${grey}`;
if (key === shown) return;
shown = key;
ui.heading.textContent = `Alarms · ${active} active`;
const clock = (seconds) => new Date(seconds * 1000).toISOString().slice(11, 19);
ui.alarmList.innerHTML = alarmLog
.map((entry) => {
const color = entry.active ? (grey ? "#B71C1C" : "#FF8A80") : grey ? "#3B4350" : "#C8D3E8";
return (
`<li style="padding:3px 0; border-bottom:1px solid ${grey ? "#B5BAC1" : "#2E4572"}; color:${color}">` +
`${clock(entry.time)} <b>${entry.tag}</b><br>${entry.text}</li>`
);
})
.join("");
}

ui.styleSelect.addEventListener("change", () => applyStyle(ui.styleSelect.value));
ui.spanSelect.addEventListener("change", () => setPaused(false));
ui.pauseButton.addEventListener("click", () => setPaused(!isPaused));

// Hover for values. Scroll to zoom in time, drag to pan, double-click to see all the history.
sciChartSurface.chartModifiers.add(
new CursorModifier({
showTooltip: true,
showYLine: false,
// One line per pen (the shading bands are left out)
tooltipDataTemplate: (seriesInfos) =>
seriesInfos
.filter((info) => info.renderableSeries instanceof FastLineRenderableSeries)
.map((info) => `${info.seriesName}: ${info.formattedYValue}`)
}),
new MouseWheelZoomModifier({ xyDirection: EXyDirection.XDirection }),
new ZoomPanModifier({ xyDirection: EXyDirection.XDirection }),
new ZoomExtentsModifier({ xyDirection: EXyDirection.XDirection })
);

applyStyle("colour");
showLatest();

Key points:

  • LeftAlignedOuterVerticallyStackedAxisLayoutStrategy stacks the left-hand y-axes into lanes, and each FastLineRenderableSeries is tied to its lane by yAxisId. Fixed visibleRanges with autoRange: EAutoRange.Never keep each scale still.
  • XyDataSeries with fifoCapacity keeps the newest readings (two hours here) and drops the oldest, so memory stays flat however long the trend runs. Moving the DateTimeNumericAxis's visibleRange makes it scroll; when the user zooms or pans, visibleRangeChanged pauses it.
  • Each alarm limit is a HorizontalLineAnnotation with isEditable: true, so it can be dragged; its onDrag callback updates the limit the alarm logic uses.
  • A line segment has one colour, so a render data transform (XyBaseRenderDataTransform) adds a point wherever a segment crosses a limit, just before drawing. The data series isn't changed, so tooltips still show the real readings. Setting requiresTransform to true reruns it when a limit is dragged.
  • A palette provider then colours each split segment: overrideStrokeArgb returns red when the segment's midpoint is beyond a limit.
  • The shading is a band series (FastBandRenderableSeries) whose transform sets y1 to the reading held inside the limits. The band has area only where the reading is beyond a limit: fill above HI, fillY1 below LO.

See it in the demo app: JavaScript chart with vertically stacked axes · React chart with vertically stacked axes · Angular chart with vertically stacked axes. For draggable limits, see the React chart with a draggable threshold and the React line chart with threshold colouring; for faceplate bars, the React linear gauges; and for a full industrial screen, the React oil and gas dashboard.

Go deeper: SciChart.js line chart documentation, vertically stacked axis layout, horizontal line annotation, palette provider, render data transforms, band series and real-time updates. For where SciChart is used in industry, see the HMI and SCADA page, and our guide to big data visualisation for long histories. For electrical networks, see power quality and harmonics.

Frequently asked questions​

What does SCADA stand for?​

SCADA stands for supervisory control and data acquisition. Data acquisition is collecting readings from sensors and controllers; supervisory control is people, or higher-level software, giving those controllers new setpoints and commands. The control loops themselves run in PLCs and RTUs on site, not in the SCADA software.

What is the difference between HMI and SCADA?​

An HMI is the screen a person uses to watch and operate a machine or process. SCADA is the whole system behind it: the communications to many PLCs and RTUs, the database of live values, the historian, the alarm server and the HMI screens. A small machine can have an HMI with no SCADA; every SCADA system has HMIs.

What is the difference between a PLC and SCADA?​

A PLC (programmable logic controller) is a rugged computer that reads sensors and drives outputs such as pumps and valves, running its control logic many times a second. SCADA is software and servers that collect data from many PLCs, show it to operators, store it and raise alarms. The PLC keeps controlling if the SCADA link is lost.

What is an HMI screen?​

An HMI screen is a display that shows a machine or process to its operator and accepts their commands. It usually combines a simplified drawing of the plant, faceplates showing each value with its setpoint and limits, trend charts of recent and historical values, and an alarm list. It can be a touch panel on a machine or a page in SCADA software.

What is the difference between SCADA and DCS?​

A DCS (distributed control system) controls one plant, such as a refinery or power station, with controllers, network and operator stations designed as one system and tightly linked loops. SCADA supervises equipment spread over a wide area, such as a pipeline or water network, over slower and less reliable links, and leaves the closed-loop control to PLCs and RTUs at each site.

What is a deadband in SCADA alarms?​

A deadband is a margin a value must move back inside an alarm limit before the alarm clears. With a high limit of 80 and a deadband of 5, the alarm is raised above 80 but clears only below 75. Without it, a noisy value hovering at the limit raises and clears the alarm over and over, which is called chattering.

How do I make an HMI trend chart in JavaScript?​

Use a charting library that handles real-time data. In SciChart.js, give each process tag its own y-axis with a fixed range, stack the axes with a vertically stacked axis layout, append readings to XyDataSeries with fifoCapacity set, and move the time axis's visible range to follow the newest reading. Add HorizontalLineAnnotation lines for the alarm limits; with isEditable they can be dragged.

Sources​