# IEC 60870-5-104

Substation telemetry over IEC 60870-5-104 right in the chat

Телемеханика подстанций и КП по МЭК 60870-5-104 через назначенный шлюз, только чтение

## How the agent works with IEC 60870-5-104

Data is collected on site by the gateway: a service on a computer in the site network that sends data out over an outgoing connection only. The connection takes the station address, such as tcp://10.0.12.5:2404, and the signal list: path, common address and object address, signal kind (sp, dp, me or it). The connection is assigned to a gateway on the Gateways tab.

The gateway acts as the controlling station: it keeps the connection open, runs a general interrogation after STARTDT and then takes the spontaneous changes the station sends on its own. The general interrogation repeats every 15 minutes and after a station restart, and the counter interrogation is turned on separately. The connection counts as live only once the station has confirmed STARTDT and answers within the standard's t1 and t3 timers.

The connection only reads. The gateway sends the station exactly two kinds of request: the general interrogation and the counter interrogation without freeze. It frames no control commands, setpoints, clock synchronisation, counter freezes or resets, so the agent can neither switch a breaker nor move the register that metering reads.

Quality flags pass into the value: IV makes it bad, while NT, SB, BL and overflow make it uncertain. CP56Time2a time tags are read in the zone set in the connection, and a value without a time tag gets the gateway's time. If the station refuses the general interrogation, its signals without a value are marked bad with the refusal cause.

## Integration scenarios

### Breaker positions
The agent reads the position of breakers and disconnectors from double points, and shows an intermediate or indeterminate position as bad.

### Measured values
The agent shows current power, currents and voltages from the station's signal list with the units set in the connection.

### Energy counters
The agent reads integrated totals and works out consumption per shift or day from their history, without freezing the counters at the station.

### Invalid signals
The agent finds signals flagged IV, NT, SB or BL: invalid, not topical, substituted by an operator and blocked.

### Switching history
The agent pulls when a breaker changed position over a period, by the time tags the station itself sets.

### Threshold task
The agent sets up an event task: for example, a feeder's power above a threshold for more than five minutes. The task fires when the condition starts and when it clears.

## How to connect

**Before you connect**

- A station, RTU or data concentrator with IEC 60870-5-104 over TCP
- A separate master connection on the station for the gateway
- A computer in the site network with the gateway service and TCP 2404 access
- The station's signal list: common address, object address and signal kind

### Give the gateway its own connection
On the outstation or the data concentrator, set up a master connection for the gateway. Do not take the SCADA's one: a STARTDT on it takes events away from dispatch.

### Open TCP 2404 to the station
The gateway connects to the station over TCP, port 2404 by default. If the station accepts masters only from known addresses, add the gateway computer's address.

### Get the station's signal list
Each signal's common ASDU address, object address and kind come from the list the integrator wrote: the protocol offers no catalog of signals.

### Check the time zone of the station's clock
IEC 104 time tags carry no time zone. Find out whether the station stamps in UTC or local time, and enter it in the connection.

### For several masters: originator address
If the station serves several masters and routes answers by originator address, find out the address set aside for the gateway, from 0 to 255.

## FAQ

### How do I connect IEC 60870-5-104?
Install the gateway service on a computer in the site network and add it on the Gateways tab. In the connection enter the station address, for example tcp://10.0.12.5:2404, and the signal list with one line per signal: path, common address:object address and kind, for example 1:4001 me. Assign the connection to the gateway.

### What does the agent see in IEC 60870-5-104?
Single and double points, measured values (normalized, scaled and floating point) and integrated totals from your list, with quality flags, the station's time tags and the value history.

### Can the agent switch a breaker?
No. The gateway frames no control, setpoint or clock synchronisation commands: it sends the station only the general interrogation and the counter interrogation without freeze, which change nothing at the station.

### Time tags are off by a few hours. What is wrong?
A CP56Time2a time tag carries no time zone, and stations differ: some stamp in UTC, some in local time. Enter utc or a fixed offset, for example +03:00, matching how your station stamps its times.
