Skip to content
Tutorials Center
My learning

Topics

Lesson 24 of 37 ยท HMI and SCADA

SCADA Architecture, Tags and Polling

Understand SCADA systems: servers, clients, drivers, tag databases, polling versus subscription, historians and redundancy, with a runnable C polling model.

A single HMI panel is fine for one machine. A water treatment works, a pipeline or a bottling plant has hundreds of machines, dozens of PLCs and a control room full of operators. SCADA (Supervisory Control and Data Acquisition) is the software layer that collects data from all those controllers, shows it, stores its history, raises alarms and lets supervisors send commands.

SCADA platforms (Ignition, WinCC, FactoryTalk, Wonderware and others) are not available on this site, so this lesson describes architecture in diagrams and read-only configuration, and the programs you can run are C stand-ins for polling and tag logic.

SCADA versus HMI

The boundary is blurry, but a useful rule is:

HMI SCADA
Scope One machine or line Whole plant or many sites
Location On the machine Control room, servers, remote sites
Data Live values Live values plus long-term history
Typical extras Local alarms Historian, reports, redundancy, remote access

Control stays in the PLCs. SCADA does supervisory work: it looks, records, notifies and sets high-level targets such as setpoints and recipes.

Typical architecture

flowchart TB
    subgraph Field
        P1["PLC 1"]
        P2["PLC 2"]
        R["RTU at remote site"]
    end
    subgraph "Control center"
        D["Drivers (Modbus, OPC UA, ...)"]
        S["SCADA server<br/>tag database + alarms"]
        H["Historian database"]
        C1["Client 1"]
        C2["Client 2"]
    end
    P1 --> D
    P2 --> D
    R --> D
    D --> S
    S --> H
    S --> C1
    S --> C2

Drivers speak the PLC protocols. The server keeps the tag database, alarms and history. Clients are the operator screens.

The main parts:

  • Drivers / connectors translate a protocol such as Modbus or OPC UA into tag values.
  • Tag database is the list of every point: name, data type, source address, scaling, alarm limits.
  • Alarm engine evaluates limits and keeps alarm states (see alarms, trends and logging).
  • Historian stores timestamped values for trends and reports.
  • Clients are desktop, web or mobile screens that connect to the server.
  • Redundancy: critical sites run two servers, so if the primary fails the standby takes over.

Tags in SCADA

A SCADA tag is richer than a plain PLC variable. It carries a value, a quality (good, bad, uncertain), a timestamp, and configuration such as engineering units and alarm limits. Quality matters: if the cable to a PLC is cut, the last value is not "the truth". The tag should switch to bad quality and the screen should show it.

Tags are often organized in folders that mirror the plant: Plant/Line2/Filler/MotorSpeed. UDTs (user-defined types) group related members, so one Motor type holds Run, Fault, Speed and Current and can be reused for hundreds of motors.

Polling and subscription

How does the server get values?

  • Polling. The driver asks for a block of registers every N milliseconds, whether or not anything changed. Simple, but wasteful when most values are stable and slow when you ask for too many.
  • Report by exception / subscription. The server tells the device "send me this when it changes by more than X". OPC UA and MQTT do this, which saves bandwidth.

A polling model in C shows the trade-off: a device with a few registers, a fixed poll interval, and a count of requests.

C C stand-in: polling versus change-only reporting

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

Both approaches see the same process, but the second one moves far fewer messages. The deadband is the minimum change that counts as news.

Quality and stale data

A SCADA server must notice when data stops arriving. A common technique is a heartbeat: the PLC increments a counter every second, and the server flags the connection as lost if the counter freezes.

C C stand-in: heartbeat watchdog and tag quality

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

Security and design notes

  • Do not expose a SCADA server directly to the internet. Use a firewall, a VPN, and separate networks for plant and office; see safety and cybersecurity basics.
  • Use role-based access and an audit trail of setpoint changes.
  • Plan naming conventions early; renaming 10,000 tags later is painful.
  • Test failover: a redundant server nobody has tried to switch over to is an assumption, not a feature.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which of these best describes SCADA's role?

    Control logic stays in the PLCs; SCADA supervises, records and presents.
  2. 2. What does the quality attribute of a SCADA tag tell you?

    Quality marks stale or invalid data, such as after a communication failure.
  3. 3. What is the benefit of report-by-exception compared with fixed polling?

    Reporting on change by more than a deadband avoids sending unchanged values repeatedly.
  4. 4. How can a SCADA server detect that a PLC has stopped communicating even though the last values look normal?

    A frozen heartbeat means no fresh data, so the server marks the tags as bad quality.

Summary

  • SCADA supervises many PLCs: drivers, tag database, alarms, historian and clients.
  • Tags carry value, quality and timestamp; UDTs and folder structure keep large projects tidy.
  • Polling asks on a timer; subscription and deadbands send only meaningful changes.
  • Heartbeats and quality flags prevent trusting stale data.
  • The C programs are stand-ins; the real SCADA software is not available here.

Next: Alarms, Trends and Data Logging