On this page
IEC 103 master
Select IEC 103 master for a standard unbalanced IEC103 slave. Serial and transparent TCP byte transports are supported; the device’s network framing must match the selected transport. See Collection configuration for common channel, device and permission settings.
Compatible devices and models
| Device series / model examples | Connection requirements |
|---|---|
| Protection relays and control units supporting IEC 60870-5-103 | Use serial or transparent TCP with matching link/common addresses, function types and information numbers. Private extensions must match the data types used by this plugin. |
Derive addresses from the protection-device point list
Check the IEC103 interface, serial settings, link address, application address and FUN/INF list in the device engineering or maintenance software. Match RS-485 polarity and termination. A serial server must forward transparent bytes without IEC104 conversion or private headers.
- Configure the serial or TCP client channel, then the device link address. The variable CA is a separate application address.
- For CA
7, measurands type9, FUN160, INF144, first element, use7/9/160/144/0/Value, Float or Double. Index0is within the information object, not a register offset. - To preserve quality and device time, create an Object variable at
7/9/160/144/0/Record, array length1. - Wait for link initialization and interrogation, then compare with the device monitor. Apply engineering scaling from the point list; a Float type does not establish amperes or volts.
Timing and disturbance storage
Read/write timeout covers line responses; application timeout covers the complete application transaction. Link retries default to 2; avoid another collection-layer retry loop. Poll batch size limits repeated fetches per round, not the point count.
The disturbance directory is on the gateway backend and expands {DeviceId}. Grant its service account file access. Method .json paths are relative to this directory, not browser-computer paths. Disturbance samples retain raw values and separate channel scaling.
Connection and collection
- Create a serial or TCP Client channel and enter the device’s serial settings or network endpoint.
- Add an IEC 103 master device. Set its link address, link timeout and application timeout. The link address is independent of each variable’s application address.
- Create variables from the device point list, save, and enable the channel and device.
- Each new connection initializes the link and interrogates the application addresses in its collection plan. Later cycles prefer class 1 data and then poll class 2. Variables sharing an address consume the same received data.
The serial example uses 9600 baud and 8E1. Match the protection device’s actual interface settings, including parity.
| Parameter | Description |
|---|---|
| Link address | Default1, range0–254; 255 cannot identify this device |
| Link retries | Default 2, range 0–10. Retransmits the original frame with the same link counter after a link timeout. This does not authorize replaying an application command; keep collection-level retries at 0. |
| Read/write timeout | Default 3000 ms. Wait for one link response, allowing for baud rate, frame length and device response time. A short value causes retransmissions; a long value holds the bus longer for an unavailable device. |
| Application timeout | Default 10000 ms, range 1–3600000. Covers the complete command or generic transaction, including polling and segmented reception, rather than one frame only. |
| Poll batch limit | Default32, range1–512, limiting class 1 work per collection cycle |
| Publish device events | Forward timed events, relative-time records and fault measurands to the gateway plugin event path |
| SOE event storage | Disabled by default; configure a database to store accepted events and query them through the device’s special method |
SOE storage and disturbance files
SOE event storage records accepted protocol events separately from disturbance waveform .json files. Leave it off for live collection only. Enable it for historical queries and configure a database accessible to the gateway service.
| Storage field | Value and purpose |
|---|---|
Name / Enable | Name defaults to IEC103 and identifies this storage configuration. Enable defaults to false; disabled storage does not open an event database connection. |
DbType | Default Sqlite; supports MySql, SqlServer, Sqlite and PostgreSql. Match the actual database and connection string. |
BigTextConnectStr | Default Data Source=IEC103_SOE.db;Pooling=False. The SQLite file belongs to the gateway service environment. For other databases enter their address, database and credentials; the service needs table-creation and write access. |
TableName | Default iec103SoeEventLog, required. Do not reuse a table with another protocol’s row structure. |
SplitTable | Default None; alternatives are Day, Week, Month, Quarter and Year. Select for event volume and query periods; custom periods are unsupported. |
SaveDays | Default 3650 days; 0 disables automatic cleanup. Reducing it removes events older than the chosen retention period. |
TimeZoneId | Default +08:00; empty writes UTC. Use the corresponding query timezone. It does not invent a date for a device timestamp that has none. |
CacheEnable | Default false. Enables the gateway CacheDB outbound cache when writes to the target database fail. Cached rows are forwarded after recovery. |
QueueMaxCount | Default 100000 rows, minimum 1. Buffers event bursts in memory; increasing it uses more memory and does not limit historical table size. |
CacheFileMaxLength | Default 262144 rows, minimum 1. Limits outbound cached rows independently of database retention days. |
SplitSize | Default 2000 rows, range 1–4096. Sets database batch size; reducing it can ease database load and does not change device polling batches. |
Disturbance directory defaults to ProtocolFiles/IEC103/Devices/{DeviceId}, with the device ID substituted. Maximum disturbance file bytes defaults to 16777216 (16 MiB), range 1024–67108864 bytes. It limits the complete serialized JSON file, not the sample count. Give the gateway service read/write access and pass a relative .json filename to file methods.
Variable addresses
Use CA/TYPE/FUN/INF/INDEX/VIEW, for example 7/9/160/144/0/Value.
Select Edit fields beside the address. Enter the application address, type, FUN, INF and element index from the device point list, then select the value view. Confirm and fill updates the address; OK in the variable dialog saves it.
| Field | Description |
|---|---|
| CA | Application address configured on the device |
| TYPE | Decimal supported standard ASDU type number |
| FUN, INF | Function type and information number from the device point list; adjacent addresses are not inferred |
| INDEX | Element index within the same information object, starting at0, maximum126 |
| VIEW | Value selects the value; Record retains protocol identity, quality, original device time and reception time |
Double points in types1 and2 accept Boolean or Byte. Normalized measurands in types3 and9 accept Float or Double. Use Object with array length1 for Record and other complex elements. A four-byte device timestamp has no date; its date fields remain null.
A command variable uses type20, index0, Value and write-only access. Boolean false/true means off/on; Byte uses1/2. Enable the device’s and variable’s current write permissions. Permissions revoked while waiting are checked again before the actual send.
Generic data and special methods
Generic interrogation completes with an empty COT10 termination. Spontaneous generic data still reaches the event path and is excluded from the interrogation result. General interrogation, clock synchronization and process reset use FUN255; generic services use FUN254.
Device special methods provide interrogation, commands, clock synchronization, generic entry reads, directory or generic interrogation reads, single-frame and batch generic writes, and SOE queries.
For the directory or generic interrogation method, provide the application address, information number and request entries. Each entry contains Identifier.Group, Identifier.Entry and Description (KOD).
| Information number | Request entries |
|---|---|
| 240 Headings | Empty array; the peer returns group descriptions with entry0 and KOD10 |
| 241 Group read | Nonzero group, entry0 and a nonzero requested KOD; multiple groups or KODs may be requested |
| 243 Entry directory | Exactly one GIN with KOD0, returning that entry’s descriptions |
| 245 Generic interrogation | Empty array; completion requires a separate termination frame |
To read actual values in group2 at application address7, select information number241 and enter:
[{"Identifier":{"Group":2,"Entry":0},"Description":1}]Results retain GIN, KOD, type, slot width and the complete logical array. Unfinished segments do not return partial success. Device rejections report GRC; a correctly matched explicit rejection preserves the connection. Invalid data or identity, timeout, and budget violations fail the transaction.
Generic writes currently execute one complete actual value for one GIN in a single frame. Success requires the matching application confirmation. An uncertain result is not automatically replayed. Clock synchronization takes the device’s local calendar time and does not modify the gateway operating-system clock.
The batch generic write method accepts an application address, write entries and an operation. Each entry uses a unique nonzero group/entry GIN, KOD1 and a complete value; large arrays are split automatically. For example:
[{"Identifier":{"Group":2,"Entry":7},"Description":1,"Data":{"Type":"Real32","Size":4,"MoreFollows":false,"Values":[{"Kind":"Real32","Value":1.5}]}}]| Operation | Behavior |
|---|---|
Execute | Stage preceding segments with INF248; execute the final segment with INF250 |
ConfirmAndExecute | Stage each segment with INF249 and verify its COT44 echo; then execute with INF250 |
ConfirmAndAbort | Verify the echoes, then abort with INF251 without changing source values |
One call shares the RII, total deadline and current authorization across all stages. It does not leave a transaction open between RPC calls. An echo confirms staged bytes; only the matching application acknowledgement completes execution or abort. An explicit device rejection reports GRC. A failure during source execution may leave some entries applied; there is no promised batch rollback or automatic replay. Timeout, cancellation, malformed responses and identity conflicts end the connection.
Dedicated debug tools
Open Development Configuration → Collection Configuration, select IEC 103 master and open Protocol Debug. Generic data and Disturbance records require special-method execution permission and enabled device method calls.
In Generic data, enter the application address, GIN group/entry and KOD to read actual values. Directory services distinguish 240 (all groups), 241 (selected group descriptions), 243 (selected entry descriptions), and 245 (generic interrogation). Service 241 uses the entered group and KOD; 243 uses the entered GIN.
For writes, choose the type and width, then add values individually. Integers and Fixed raw numerators use exact decimal text; Text uses raw Base64 and Bitstring uses 0/1. Width is in bits for Bitstring and bytes otherwise. Confirmation shows the target and complete parameters. Width and single-frame capacity errors are rejected before sending. Complex timestamps, nested arrays and multi-GIN transactions remain available through the complete structure editor in Special methods.
In Disturbance records, enter the application address and function, read the directory and use a fault number. Reading a complete disturbance displays the record only. Save disturbance to gateway also requires a relative backend .json path and confirmation. Read saved disturbance reads the record at that path. Paths belong to the device backend, not the browser filesystem; saving succeeds only after a complete record is atomically published.
Disturbance records and files
Use the device’s disturbance directory method with the application address and function type to find fault numbers and occurrence times. The complete disturbance method additionally takes a fault number. It returns only after tags, all channels, sample blocks, item endings and the final acknowledgement complete. Configure it as a periodic Object value to preserve signed raw samples, channel ratios and device timestamps without converting them to engineering values.
The disturbance download method saves the complete result as JSON. Supply a relative path such as faults/19.json within the device directory. It returns that relative path, the actual byte length and a SHA-256 digest. The stored disturbance method reads a complete record from its relative path and can also feed an Object variable for forwarding. File methods do not expose absolute server paths.
| Setting | Description |
|---|---|
| Disturbance directory | Defaults to ProtocolFiles/IEC103/Devices/{DeviceId} under the backend data directory; the placeholder uses the current device ID |
| Disturbance file byte limit | Defaults to 16MiB, range 1KiB–64MiB; limits actual published and read file sizes |
Complete reads share the application deadline and allow at most 4MiB of incoming ASDU data, 16384 frames and 262144 logical values. Channel counts, sample positions, fault identity, timestamps and ratios must remain consistent. Missing, repeated or aborted data cannot become partial success. Cancellation or communication failure ends the connection; the next call initializes a new session.
Files are written to a temporary file in the destination directory. Complete-record validation, file length and current authorization are checked before atomic replacement. Failure preserves an existing published file and removes the temporary file. The file byte limit is checked after serialization and before publication. Absolute paths, traversal, alternate streams and non-JSON files are rejected. Reads check file length before loading and current device/method authorization again before returning.
Configure GIN, FUN/INF and network framing from the matching device model and software version.



