Quick start: install the gateway, open http://localhost:5000, set the password, add your Modbus device on Devices, map its values on Mappings, and connect your SCADA master to port 2404 with CA 1 (chapter 16). Every change applies immediately.

Download as PDF (PDF, 5.8 MB)

1. Introduction

Max IEC Gateway is a protocol converter. It reads values from Modbus devices and gives them to a SCADA system that speaks IEC 60870-5-104 (over TCP/IP) or IEC 60870-5-101 (over a serial line). Commands from the SCADA system go back to the Modbus devices.

The gateway runs as a service on a Windows or Linux computer. There is no desktop program: you configure everything in a web browser, in the dashboard.

What the gateway can do

  • Read Modbus TCP, Modbus RTU (RS-485/RS-232) and Modbus RTU over TCP devices. Several devices can share one serial line.
  • Serve the data as an IEC 60870-5-104 server (several masters at the same time) and/or an IEC 60870-5-101 outstation.
  • Single and double points (also from bits inside a register), step positions, 32-bit bitstrings, measured values (normalized, scaled, float) and energy counters (integrated totals), with or without CP56 time tags.
  • Commands: single, double, set-points (normalized, scaled, float) and bitstrings, written back to coils or holding registers. Select-before-operate or direct execute.
  • Deadbands, cyclic transmission, event buffering while no master is connected, clock synchronization.
  • 9 device templates, CSV import/export, a traffic monitor, trends and a historian.
  • Every change applies immediately. You never need to restart the service to apply a setting.

Words used in this manual

The glossary at the end explains every term. The most important ones:

TermMeaning
Master (controlling station)The SCADA system or test tool that asks for data and sends commands.
IOAInformation object address: the number of one data point in IEC 60870-5.
CACommon address (ASDU address): the number of the station. Most systems use CA 1.
Type IDThe IEC data type of a point, for example M_ME_NC_1 = measured value, float.
MappingOne line in the gateway that links a Modbus address to an IEC point.

Back to top

2. Requirements

ItemRequirement
Operating systemWindows 10 or 11 (64-bit), or Linux x64 with systemd
Hardware1 GHz CPU, 512 MB RAM, 100 MB disk plus history data
RuntimeIncluded. You do not need to install .NET.
BrowserChrome, Edge or Firefox, on the gateway computer or on another computer in the network
Serial portOnly for Modbus RTU devices or IEC 101: a COM port (Windows) or /dev/tty… port (Linux), for example a USB-to-RS-485 adapter
InternetOnly for license activation, the online license check and the update check (HTTPS to iec.maxenergic.com)

Network ports

PortDirectionUsed for
2404/TCPInIEC 60870-5-104 masters (you can change the port)
5000/TCPInWeb dashboard (you can change the port)
502/TCP (or the device's port)OutModbus TCP and RTU-over-TCP devices
443/TCPOutLicense and update check (iec.maxenergic.com)

Back to top

3. Installation

Windows: installer (recommended)

  1. Download MaxIECGateway_Setup_1.1.1.exe from the download page.
  2. Run the file. Windows asks for administrator rights: click Yes.
  3. Follow the wizard. On the Select Additional Tasks page you can choose:
    • Allow the web dashboard (TCP 5000) from the local network: tick it if you want to open the dashboard from other computers. Without it, the dashboard works only on the gateway computer.
    • Allow IEC 60870-5-104 (TCP 2404) from the network: tick it so SCADA masters on other computers can connect.
    • Create a desktop shortcut (web dashboard): optional.
  4. Click Install. The installer creates and starts the Windows service Max IEC Gateway (service name MaxIECGateway).
  5. At the end, leave Open the web dashboard ticked and click Finish. Continue with First start.

Note: The service starts automatically with Windows (delayed start) and restarts itself after a crash. You find it in Services (services.msc) as Max IEC Gateway. The Start menu has shortcuts to the dashboard and to the Gateway data folder.

Important: If the installer reports that the service could not be created or started, it shows an error code. Run the installer again as administrator, or send the code to support@maxenergic.com.

Windows: portable ZIP

  1. Download MaxIECGateway_Portable_1.1.1.zip and unzip it to a folder, for example C:\MaxIECGateway.
  2. Double-click MaxIEC.Gateway.exe. A console window opens and shows the log.
  3. Open http://localhost:5000. The gateway runs as long as the window is open.

Important: The portable version does not install a service and does not open firewall ports. Do not run it on a computer where the installed service is running: both use ports 5000 and 2404.

Linux (x64, systemd)

  1. Download maxiec-gateway_1.1.1_linux-x64.tar.gz to the Linux computer.
  2. Unpack it and run the installer as root:
    tar -xzf maxiec-gateway_1.1.1_linux-x64.tar.gz
    cd maxiec-gateway-1.1.1
    sudo ./install-linux.sh
  3. The script installs the program to /opt/maxiec-gateway, creates the service user maxiec, gives it access to serial ports (group dialout or uucp) and starts the systemd service maxiec-gateway.
  4. Open http://<linux-host>:5000 in a browser. From another computer you need the setup code: sudo cat /var/lib/maxiec-gateway/setup-token.txt.
sudo systemctl status maxiec-gateway     # is it running?
sudo systemctl restart maxiec-gateway    # restart
sudo journalctl -u maxiec-gateway -f     # live log

Upgrading from version 1.0

  • Run the new installer over the old version. You do not need to uninstall first.
  • The gateway now runs as a Windows service. The old autostart at logon is removed.
  • Your database, license key and trial record are copied to the new data folder C:\ProgramData\MaxIECGateway (Linux: /var/lib/maxiec-gateway). The original files are not deleted.
  • The dashboard now needs a password. Set it on the first visit (see First start).
  • Your license key keeps working.

Uninstalling

Windows: Settings → Apps → Max IEC Gateway → Uninstall. The service and the program files are removed. Your data folder C:\ProgramData\MaxIECGateway (database, license, trial record, password) is kept, so a later installation continues with the same configuration and license. Delete the folder by hand if you want to remove everything.

Linux: stop and disable the service (sudo systemctl disable --now maxiec-gateway), then delete /opt/maxiec-gateway and /etc/systemd/system/maxiec-gateway.service. The data in /var/lib/maxiec-gateway stays until you delete it.

Back to top

4. First start: set the password

The dashboard is protected by a password for the user admin. On the first visit you choose this password.

  1. On the gateway computer, open http://localhost:5000 in your browser.
  2. The page Set the dashboard password opens.
  3. Type a password with at least 10 characters in both fields.
  4. Click Set password and log in. The dashboard opens.
First start: choose the dashboard password.
  1. 1. New password (at least 10 characters).
  2. 2. Repeat the password.
  3. 3. Set the password and log in.

Setting up from another computer

If you open the dashboard from another computer for the first time, the page also asks for a Setup code. This protects a new gateway on the network. The code is in the file setup-token.txt in the data folder (Windows: C:\ProgramData\MaxIECGateway, Linux: /var/lib/maxiec-gateway) and in the gateway log. Or simply open http://localhost:5000 on the gateway itself.

Logging in

The login page.
  1. 1. User name: always admin.
  2. 2. Your password.
  3. 3. Log in.
  • A login stays valid for 60 minutes without activity. Then you must log in again.
  • After 5 wrong passwords within 15 minutes, logins from that address are blocked for 15 minutes.

Changing the password

Click Change password at the top right of any page. Enter the current password and the new one twice. Other browsers that are logged in are signed out.

Change the dashboard password.

Forgot the password?

  1. On the gateway computer, stop the service (Windows: Services → Max IEC Gateway → Stop; Linux: sudo systemctl stop maxiec-gateway).
  2. Delete the file admin.json from the data folder.
  3. Start the service again and set a new password on the first-start page.

Tip: Deleting admin.json only resets the password. Devices, mappings and the license are not changed.

Back to top

5. Dashboard tour

After login you see the Dashboard. It shows the state of the IEC servers, the Modbus devices and every data point.

The Dashboard page.
  1. 1. Menu: Dashboard, Devices, Mappings, Traffic, Trends, Settings, License.
  2. 2. Status bar: license state and whether the gateway is bridging (shown on every page).
  3. 3. Change password and Log out.
  4. 4. IEC 104 and IEC 101 server state, and a summary of devices and data points.
  5. 5. Device Connections: each enabled device, its address, Connected/Disconnected and the last communication. Disable/Enable switches polling off and on.
  6. 6. Live Data Points: every mapped point with its Modbus address, IEC type, IOA, raw value, scaled value, quality and age.

The status bar

Colour and textMeaning
Bridging (green)Licensed. The gateway reads Modbus and serves IEC without a time limit.
Trial · Bridging stops in mm:ss (amber)Trial. Data flows until the 15-minute session ends. See License.
Bridging stopped (red)Trial session over, trial expired or license not valid. The IEC servers and Modbus polling are stopped. The dashboard still works.
⚠ IEC server problemAn IEC server could not start, for example because its port is already in use.

Quality column

QualityMeaning
GoodThe last read was successful.
InvalidThe device does not answer (or was never read). The master receives the point with the IV (invalid) bit.
OverflowThe value did not fit the IEC type (for example a scaled value above 32767). The master receives the OV bit.
Live data points (part of the dashboard).

Back to top

6. Modbus devices

A device is one Modbus slave (one unit ID) that the gateway polls. Open the Devices page.

The Devices page.
  1. 1. Add from template: create a device with all its points from a ready-made template.
  2. 2. Add Device: create an empty device.
  3. 3. Per device: Edit, Mappings (opens its point list) and Delete (also deletes its mappings).

Add a Modbus TCP device

  1. Click Add Device.
  2. Enter a Name, for example Energy meter feeder 2.
  3. Keep Transport = Modbus TCP.
  4. Enter the IP address / host name and the TCP port (normally 502).
  5. Enter the Unit ID (slave address) of the device.
  6. Check poll interval, timeout and retries (see the table below).
  7. Click Save. Polling starts at once.
Add Device: Modbus TCP.
  1. 1. Name of the device (shown everywhere in the dashboard).
  2. 2. Transport: Modbus TCP, Modbus RTU over TCP or Modbus RTU (serial).
  3. 3. IP address or host name.
  4. 4. TCP port (default 502).
  5. 5. Unit ID (slave address).
  6. 6. Poll interval in milliseconds.
  7. 7. Timeout for one request.
  8. 8. Retries before the device counts as not answering.
  9. 9. Enabled: untick to stop polling this device.
FieldDefaultAllowedExplanation
Unit ID10-247, 255The Modbus slave address. Many Modbus TCP devices use 1 or 255.
Poll interval (ms)1000100 and moreHow often all points of the device are read.
Timeout (ms)3000100-60000How long to wait for an answer.
Retries30-10How many times a failed read is repeated. Writes are never repeated.
Inter-frame delay (ms)00-1000Serial only. Extra pause between frames; 0 = automatic (3.5 characters).

Add a Modbus RTU (serial) device

  1. Click Add Device and choose Transport = Modbus RTU (serial).
  2. Choose the Serial port from the list or type it, for example COM3 or /dev/ttyUSB0.
  3. Set Baud rate, Parity, Data bits and Stop bits exactly as on the device.
  4. Enter the device's Unit ID and click Save.
Add Device: Modbus RTU on a serial port.
  1. 1. Transport: Modbus RTU (serial).
  2. 2. Serial port (COM3, /dev/ttyUSB0 …).
  3. 3. Baud rate.
  4. 4. Parity: None, Odd or Even.
  5. 5. Stop bits: 1 or 2.
  6. 6. Unit ID: must be different for every device on the same port.
  7. 7. Inter-frame delay: 0 = automatic.

Note: Several devices on one RS-485 line: add one device per unit ID with the same serial port. The gateway sends one request at a time on the line. All devices on one port share its line settings: if you change the baud rate, parity or stop bits of one device, they change for every device on that port. Two devices on the same port cannot have the same unit ID.

Add a Modbus RTU over TCP device

Use this for a serial device server (Ethernet-to-RS-485 converter) that passes raw RTU frames over TCP. Choose Transport = Modbus RTU over TCP and enter the converter's IP address and port. Devices with the same address and port share one connection, and requests are sent one at a time.

Add Device: Modbus RTU over TCP (serial device server).
  1. 1. Transport: Modbus RTU over TCP.
  2. 2. IP address of the serial device server.
  3. 3. Its TCP port (often 4001 or 502).
  4. 4. Hint: devices behind the same converter share one connection.

Tip: If your converter translates Modbus TCP to RTU itself (a "Modbus gateway"), use Modbus TCP instead. Ask the converter's manual which mode it uses.

Add a device from a template

A template creates the device and all its mappings in one step. Templates included:

TemplatePointsFactory communication setting
Eastron SDM120-Modbus14RTU 2400 8N1, unit 1
Eastron SDM630-Modbus36RTU 9600 8N1, unit 1
Carlo Gavazzi EM24 (DIN / Ethernet)31RTU 9600 8N1, unit 1 (or Modbus TCP)
Schneider Electric PowerLogic PM5000 series24RTU 19200 8E1 or Modbus TCP, unit 1
Schneider Electric Altivar (ATV3xx / ATV6xx)9RTU 19200 8E1, address 1
ABB ACS580 drive (ABB Drives profile)13RTU 19200 8E1, node address 1
SMA Sunny Boy / Sunny Tripower10Modbus TCP port 502, unit 3
SunSpec Common Model (Model 1)4Modbus TCP port 502
Growatt PV inverter (protocol V1.20)17RTU 9600 8N1, unit 1
  1. Click Add from template.
  2. Choose the Device type. Read the yellow notes: they tell you the factory settings and what to check.
  3. Enter the device name, transport and address, and the unit ID.
  4. Check Common address and First IOA. The points get consecutive IOAs starting at the first IOA. The gateway suggests the next free IOA.
  5. Click Create device.
Add device from template.
  1. 1. Device type (template).
  2. 2. Notes: factory settings and what to verify.
  3. 3. Transport.
  4. 4. Address of the device.
  5. 5. Common address of the points.
  6. 6. First IOA: the points are numbered from here.
  7. 7. Create the device with all mappings.

Important: Templates are a starting point. Check every address, data type, scaling and byte order against the manual of your device and its firmware version.

Back to top

7. Point mappings

A mapping connects one Modbus value to one IEC point. Open Mappings. Choose a device at the top to see only its points.

The Mappings page.
  1. 1. Device filter.
  2. 2. Add Mapping.
  3. 3. Export CSV: download the mappings as a CSV file.
  4. 4. Import CSV: import many mappings at once (chapter CSV import and export).
  5. 5. Report: the deadband (±) and the cyclic time of the point.
  6. 6. Per mapping: Edit and Delete.

Note: In the Address column, a bit point shows as 40.0 (register 40, bit 0), a double point from two bits as 20.0/1.

The mapping dialog

Click Add Mapping (or Edit). The dialog has four parts: Modbus, IEC 60870, Scaling and Reporting.

Edit Mapping: a float measured value with an absolute deadband.
  1. 1. Device the value is read from.
  2. 2. Description (shown in the dashboard and the traffic monitor).
  3. 3. Modbus Data Type: Coil, DiscreteInput, InputRegister or HoldingRegister.
  4. 4. Modbus Address, 0-based (see below).
  5. 5. Register Type: how the register(s) are decoded.
  6. 6. Byte Order for 32- and 64-bit values.
  7. 7. IEC Type ID.
  8. 8. IOA of the point.
  9. 9. Common Address (CA).
  10. 10. Scale Factor (and Offset).
  11. 11. Deadband mode.
  12. 12. Deadband Size.
  13. 13. Cyclic every (s).

Modbus data type and address

Data TypeFunction codeRead/writeTypical use
CoilFC01 read, FC05 writeRead and writeBreaker or relay outputs, commands
DiscreteInputFC02Read onlyContacts, alarms
InputRegisterFC04Read onlyMeasurements
HoldingRegisterFC03 read, FC06/FC16 writeRead and writeMeasurements, set-points, status words

Important: Addresses are 0-based protocol addresses. If the device manual says register 30001 or 40001, enter address 0; 40101 is address 100. If a value looks wrong, try the address one lower or one higher.

Register type and byte order

Register TypeRegistersRange / use
UInt1610 to 65535
Int161-32768 to 32767
UInt3220 to 4,294,967,295
Int322±2,147,483,647
Float322IEEE 754 single precision
Float644IEEE 754 double precision
Int644Signed 64-bit, e.g. energy counters
UInt644Unsigned 64-bit

The Register Count is set automatically to what the register type needs. The Signed box is only for old 1.0 mappings: for new ones choose Int16 instead.

A 32-bit value uses two registers with 4 bytes, called A B C D from the most significant byte. Devices send them in different orders:

Byte OrderRegisters in address orderCommon name
ABCDAB, CDBig-endian (Modbus standard). Most meters.
CDABCD, ABWord swap ("little-endian word order"). Many PLCs.
BADCBA, DCByte swap inside each register.
DCBADC, BALittle-endian.

For 64-bit values the same rule applies to all four registers (CDAB reverses the register order). 16-bit values ignore the byte order. If a float shows nonsense like 1.4E-41 or -2.6E+38, try CDAB. More help: Modbus float byte order guide.

Which IEC Type ID for what?

You haveUse Type IDNotes
On/off status (coil, discrete input, register bit)M_SP_NA_1 (1), or M_SP_TB_1 (30) with time tagAny value other than 0 is ON.
Position with two contacts (breaker, disconnector)M_DP_NA_1 (3) or M_DP_TB_1 (31)Two register bits: ON bit and OFF bit. See below.
Tap position −64…63M_ST_NA_1 (5) or M_ST_TB_1 (32)Larger values are limited and get the OV bit.
Status word (16 or 32 bits)M_BO_NA_1 (7) or M_BO_TB_1 (33)Sent unscaled as 32 bits.
Measurement, best accuracyM_ME_NC_1 (13) or M_ME_TF_1 (36)Short float. Recommended for most analog values.
Measurement as integerM_ME_NB_1 (11) or M_ME_TE_1 (35)Scaled value −32768…32767 after scaling.
Measurement as fraction of full scaleM_ME_NA_1 (9) or M_ME_TD_1 (34)Normalized: sent value = (raw × scale + offset) ÷ 32767, range −1…+1.
Energy counter (kWh, pulses)M_IT_NA_1 (15) or M_IT_TB_1 (37)Read by counter interrogation. See Energy counters.

Tip: Types with time tag CP56 (30-37) are the usual choice for IEC 104. M_SP_TA_1 (2) and M_DP_TA_1 (4) use the short CP24 time tag, which is only allowed in IEC 101.

IOA must be unique within a common address. Its maximum depends on the IOA size in Settings (3 bytes: 1-16,777,215). The Common Address is normally 1 (1-65534 with a 2-byte CA).

Scaling

The gateway calculates: value sent = raw value × Scale Factor + Offset. For commands it calculates the other way round.

ExampleRaw valueScale FactorOffsetSent value
Voltage in 0.1 V23050.10230.5
Current in mA, shown in A125000.001012.5
Temperature with offset (raw 0 = −40 °C)6500.1−4025.0

Points from register bits

Many devices pack alarms and states into one status register. Use Bit (ON) and Bit (OFF) (0 = least significant bit, −1 = not used):

A single point from bit 0 of a holding register.
  1. 1. Data Type: HoldingRegister or InputRegister (bits are only possible from registers).
  2. 2. Register Type: UInt16 (bits 0-15) or a 32/64-bit type (bits 0-31 / 0-63).
  3. 3. Bit (ON): the bit number. Bit (OFF) stays −1.
  4. 4. Type ID: a single point (M_SP_*).
A double point from two bits of a register.
  1. 1. Bit (ON): the bit that means ON (closed).
  2. 2. Bit (OFF): the bit that means OFF (open).
  3. 3. Type ID: a double point (M_DP_*).
ON bitOFF bitDouble point state
10ON
01OFF
00Intermediate (moving)
11Faulty (indeterminate)

Interrogation group

Interr. Group 0 means the point is sent only in a station interrogation (QOI 20). With 1-16 the point is also sent when the master asks for that group (QOI 21-36). For energy counters, groups 1-4 are the counter groups.

Deadband and cyclic transmission

Measured values (M_ME_*) are sent spontaneously (cause 3) when they change. The deadband reduces traffic for values that change all the time:

DeadbandWhen is a change sent?
None (every change)Every change of the value.
Absolute (engineering units)When the value differs from the last sent value by more than Size. Example: Size 0.5 for a voltage = only changes larger than 0.5 V.
Percent of last reported valueWhen it differs by more than Size % of the last sent value (0-100). Near zero, the gateway uses at least 10 % of the largest value sent so far, so a value around 0 is not sent on every tiny change.
  • A general interrogation always returns the current value, whatever the deadband.
  • Cyclic every (s): also send the point every n seconds with cause 1 (periodic). 0 = off. Allowed: 0-86400.

Note: Changes on the Mappings page apply immediately. Only the device whose mappings changed restarts its polling; other devices and the IEC connections keep running.

Back to top

8. Commands from SCADA

A command point lets the SCADA master write to a coil or holding register. To create one, make a mapping and tick Command.

A command point: float set-point to a holding register.
  1. 1. Data Type: Coil or HoldingRegister (inputs are read-only).
  2. 2. Register Type and byte order of the target register.
  3. 3. Type ID that matches the command (see table).
  4. 4. The IOA the master sends the command to.
  5. 5. Command ticked.
Master sendsMap the command point asWrites to Modbus
C_SC_NA_1 (45) single commandM_SP_NA_1, Coil (or HoldingRegister)ON = 1, OFF = 0
C_DC_NA_1 (46) double commandM_DP_NA_1, Coil (or HoldingRegister)ON (state 2) = 1, OFF (state 1) = 0. States 0 and 3 are rejected.
C_SE_NA_1 (48) set-point, normalizedM_ME_NA_1, HoldingRegistervalue × 32767, then reverse scaling
C_SE_NB_1 (49) set-point, scaledM_ME_NB_1, HoldingRegistervalue, then reverse scaling: (value − offset) ÷ scale
C_SE_NC_1 (50) set-point, floatM_ME_NC_1, HoldingRegistervalue, then reverse scaling
C_BO_NA_1 (51) bitstringM_BO_NA_1, HoldingRegister32 bits unscaled (a 16-bit register takes values up to 0xFFFF)
  • The time-tagged versions (C_SC_TA_1 … C_BO_TA_1, types 58-64) are accepted and handled like the plain ones.
  • A command point is also read and reported like a normal point, so the master sees the current value.
  • Set-points that do not fit the register type are rejected, never cut off.
  • Regulating step commands (C_RC_NA_1) are not supported and are rejected.

Select-before-operate and direct execute

Choose the command mode in Settings → Command Options:

Command ModeHow the master must send a command
Direct ExecuteOne execute (S/E = 0) operates the output.
Select Before ExecuteFirst a select (S/E = 1), then an execute (S/E = 0) with the same value, from the same connection, within the Select timeout. An execute without select is rejected.

The Select timeout (s) is 10 s by default (1-60 s). A deactivation (cause 8) cancels a pending select. Bitstring commands have no select bit and always execute directly.

Settings: Command Options.
  1. 1. Command Mode: Direct Execute or Select Before Execute.
  2. 2. CMD Act. Termination: send ACT_TERM after single/double commands.
  3. 3. CSE Act. Termination: send ACT_TERM after set-points.
  4. 4. Select timeout (s).

What the master sees

StepMaster sendsGateway answers
SelectCommand, COT 6 (activation), S/E = 1COT 7 activation confirmation (positive). Nothing is written yet.
ExecuteSame command, COT 6, S/E = 0Writes to Modbus, then COT 7 (positive) and COT 10 activation termination
CancelSame command, COT 8 (deactivation)COT 9 deactivation confirmation; the select is cancelled

Why was my command rejected?

A rejected command gets a negative confirmation (P/N bit set). The Traffic page shows the reason.

Reason in the traffic monitorCause / fix
execute … without select (select-before-operate)Send a select first, or switch to Direct Execute.
select for IOA … expiredThe execute came after the select timeout. Send it faster or raise the timeout.
execute … does not match its selectValue or type of the execute differs from the select.
IOA … is not a command pointTick Command on that mapping.
unknown IOA (COT 47) / unknown common address (COT 46)No mapping with that CA and IOA. Check the numbers.
unsupported type (COT 44)The master sent a type the gateway does not know.
regulating step commands are not supportedC_RC_NA_1 is not supported. Use a single or double command, or a set-point.
double command state 0/3 not permittedUse state 1 (OFF) or 2 (ON).
Command FAILED (negative ACT_CON)The Modbus write failed: device offline, exception from the device, or the value does not fit the register.

Back to top

9. IEC 104 settings

Open Settings. All settings apply as soon as you click Save Configuration. A change that makes connected masters reconnect (for example a new port) asks you first.

Settings: IEC 60870-5-104.
  1. 1. Enabled: switch the IEC 104 server on or off.
  2. 2. TCP Port (default 2404).
  3. 3. Max Connections: masters at the same time (1-64, default 10).
  4. 4. Allowed masters: IP addresses or networks that may connect.
  • Allowed masters: for example 10.0.0.5, 192.168.1.0/24. Empty = any address. It applies at once: connected masters that are no longer allowed are disconnected. This computer (localhost) is always allowed.
  • Several masters can be connected at the same time. Each gets all data and can send commands.
Settings: ASDU parameters (shared by IEC 104 and 101).
FieldIEC 104 standardExplanation
COT Size2 bytesCause of transmission field. 2 bytes includes the originator address.
ASDU Addr Size2 bytesSize of the common address (CA).
IOA Size3 bytesSize of the information object address.
Originator Addr0Originator address the gateway puts in its messages (0-255).

Important: For IEC 104 keep 2/2/3 bytes. Your master must use the same sizes, otherwise it cannot read the messages.

Timers and windows (APCI)

Settings: IEC 104 timers.
ParameterDefaultAllowedWhat it does (simply)
t0 – Connect10 s1-255Time allowed to open a TCP connection.
t1 – Send15 s1-255If the master does not confirm sent data within t1, the connection is closed.
t2 – Ack10 s1-255, less than t1The gateway confirms received data at the latest after t2.
t3 – Test idle20 s1-172800If nothing is sent for t3, a test frame checks the link.
k – Max I-frames121-32767Messages the gateway may send before it must wait for a confirmation.
w – Ack after81-32767, not more than kThe gateway confirms after w received messages.

Tip: Keep the defaults unless your SCADA specification asks for other values. k, w and t0-t3 apply to open connections without a restart. More help: IEC 104 timers guide.

Back to top

10. IEC 101 settings

IEC 60870-5-101 uses a serial line (RS-232 or RS-485). Tick Enabled in the IEC 101 card and set the line exactly like the master.

Settings: IEC 60870-5-101.
  1. 1. COM Port, e.g. COM1 or /dev/ttyS0.
  2. 2. Baud Rate (default 9600).
  3. 3. Link Address of the gateway.
  4. 4. Link Mode: Unbalanced (master polls) or Balanced (both sides may send).
  5. 5. Link Addr Size: 0, 1 or 2 bytes.
  6. 6. Master link address (balanced mode only).
  7. 7. Parity: Even is the FT 1.2 standard.
FieldDefaultExplanation
Link ModeUnbalancedUnbalanced: the master polls the gateway (most common, also for several outstations on one line). Balanced: point-to-point, the gateway may send by itself.
Link Address1Address of the gateway on the line (0-255 with 1 byte).
Link Addr Size1 byteMust match the master.
Parity / Stop bitsEven / 1FT 1.2 standard: 8 data bits, even parity, 1 stop bit.
  • The ASDU sizes (COT, CA, IOA) from the ASDU card are used for IEC 101 too. Many IEC 101 systems use COT 1 byte, CA 1 byte, IOA 2 bytes: check your master.
  • The Event buffer size applies to IEC 101 too; changing it restarts only the IEC 101 link.
  • Changing the port or any line setting restarts only the IEC 101 link. IEC 104 keeps running.

Note: IEC 101 and IEC 104 can run at the same time with the same points.

Back to top

11. Time tags and clock synchronization

Settings: time tags and clock synchronization.
  1. 1. Time tags in local time (the SU bit is set in summer time). Off = UTC (default).
  2. 2. Mark time tags invalid (IV) until a master has synchronized the clock.
  3. 3. What a clock synchronization command (C_CS_NA_1) does.
Clock synchronizationEffect
Confirm and log the offset (default)The gateway confirms the command and writes the time difference to the log. The computer clock is not changed.
Also set this computer's clockThe gateway also sets the Windows/Linux clock. Needs administrator rights (Windows service: yes) or CAP_SYS_TIME on Linux.

Tip: If the computer uses NTP (internet time or a time server), keep the default. Two time sources fighting each other give jumping time stamps.

Back to top

12. Energy counters and counter interrogation

Energy registers (kWh, kvarh, pulse counts) are mapped as integrated totals: Type ID M_IT_NA_1 (15) or M_IT_TB_1 (37).

An energy counter (integrated total) from a 32-bit holding register.
  1. 1. Register Type of the counter, e.g. UInt32, Int64 or Float32.
  2. 2. Type ID M_IT_NA_1 or M_IT_TB_1.
  3. 3. Interr. Group: counter group 1-4 (0 = general only).
  • Counters are not sent in a general interrogation and not on every change. The master reads them with a counter interrogation (C_CI_NA_1, type 101).
  • The value sent is a 32-bit integer (−2,147,483,648 … 2,147,483,647) after scaling. Choose the scale factor so the value fits, e.g. Wh → kWh with scale 0.001.
  • Each reading carries a sequence number, a carry bit (the counter went backwards, e.g. after a rollover), an adjusted bit and an invalid bit.
Counter interrogation (QCC)Effect
Read (FRZ 0)Sends the frozen values (the current values if never frozen), cause 37 (general) or 38-41 (group 1-4).
Freeze (FRZ 1)Stores the current values. Read them with a following Read.
Freeze and reset (FRZ 2)Stores the values and starts counting from 0 again.
Reset (FRZ 3)Counting starts from 0 again.

Note: Reset happens inside the gateway: it remembers the value at the reset and sends the difference. The counter in the Modbus device is not changed.

Settings: event buffer and periodic counter report.
  1. 1. Event buffer: events kept while no master is connected (10-100000, default 1000). When it is full, the oldest are dropped.
  2. 2. Periodic counter report (s): freeze and send all counters every n seconds (0 = only on counter interrogation).

Back to top

13. CSV import and export

With CSV files you can prepare hundreds of points in Excel and import them in one step.

  1. On Mappings, click Export CSV to get a file in the right format (or start from the example below).
  2. Edit the file in Excel or a text editor. Comma or semicolon separated; a decimal comma is accepted.
  3. Click Import CSV and choose the file.
  4. Optional: choose one device (all rows go to it) and/or tick Replace the devices' mappings.
  5. Click Check file. The gateway checks every row and shows a preview. Nothing is saved yet.
  6. If there are errors, fix them in the file and check again. When the file is valid, click Import.
Import mappings from CSV: the checked preview.
  1. 1. Choose the CSV file.
  2. 2. Target: the devices named in the file, or one device.
  3. 3. Replace: delete the devices' current mappings first.
  4. 4. Check file: validate and preview.
  5. 5. Result of the check.
  6. 6. Import: saves all rows (only active when the file is valid).

Tip: The import is all-or-nothing: if one row is wrong, nothing is imported.

Columns

ColumnRequiredValues
deviceIf no device is chosen in the dialogDevice name exactly as on the Devices page
descriptionNoFree text, up to 200 characters
modbusTypeYesCoil, DiscreteInput, InputRegister, HoldingRegister (also: CO/0x/FC01, DI/1x/FC02, IR/3x/FC04, HR/4x/FC03)
addressYes0-65535, 0-based
registerCountNoSet automatically from registerType
registerTypeNo (UInt16)UInt16, Int16, UInt32, Int32, Float32, Float64, Int64, UInt64
byteOrderNo (ABCD)ABCD, CDAB, BADC, DCBA
bit, bit2No (−1)Bit numbers for single/double points from register bits
iecTypeYesName or number, e.g. M_ME_NC_1 or 13
ioaYesInformation object address
caNo (1)Common address
scale, offsetNo (1, 0)Numbers
signed, commandNo (false)true/false, yes/no, 1/0, x
groupNo (0)Interrogation group 0-16
deadbandModeNo (None)None, Absolute, Percent (also Abs, %)
deadbandNo (0)Number
cycleSecondsNo (0)0-86400

Example file

device,description,modbusType,address,registerType,byteOrder,iecType,ioa,ca,scale,deadbandMode,deadband
Meter feeder 2,Feeder 2 current [A],InputRegister,10,Float32,ABCD,M_ME_NC_1,120,1,1,Absolute,0.5
Meter feeder 2,Feeder 2 voltage [V],InputRegister,12,Float32,ABCD,M_ME_NC_1,121,1,1,Percent,1
Meter feeder 2,Feeder 2 breaker,Coil,8,UInt16,ABCD,M_SP_TB_1,122,1,1,None,0
Meter feeder 2,Feeder 2 energy [kWh],HoldingRegister,80,UInt32,ABCD,M_IT_NA_1,123,1,1,None,0

Note: Export CSV protects text cells against Excel formula injection. A complete backup of devices, mappings and settings is the JSON export in Settings (chapter Backup and restore).

Back to top

14. Traffic monitor, trends and history

Traffic monitor

The Traffic page shows what happens on both sides of the gateway. It is the first place to look when something does not work.

Traffic monitor: commands with select, execute, a deactivation and a rejected command.
  1. 1. Tabs: Commands, Connections, Modbus, IEC; the badge shows the number of entries.
  2. 2. Auto-refresh every 3 s (switch off to read calmly).
  3. 3. Clear the list.
TabShows
CommandsEvery command received (IN) and the answer (OUT): select confirmed, command OK, rejected with the reason.
ConnectionsIEC masters connecting and disconnecting, with their IP address.
ModbusThe last Modbus requests and results per device.
IECThe last IEC messages sent and received.
Traffic monitor: the Connections tab.

Note: The lists keep the latest 200 entries each. They are cleared when the service restarts.

Trends: three voltages over the last hour.
  1. 1. Choose one or more data points (hold Ctrl to select several).
  2. 2. Time range: 1 h, 6 h, 24 h or 7 days.
  3. 3. Load Chart.
  4. 4. Export CSV: the history of all selected points for the chosen time range, in one file (one row per stored value, with columns for time, IOA, device, point, value and quality).

Historian settings

Settings: historian.
  • Historian Enabled: record the values of all points.
  • Recording Interval: 1 s to 1 h (default 2 s). Values are stored when they change, and at least every 5 minutes.
  • Retention Period (hours): 1-8760 (default 72 h = 3 days). Older data is deleted.

Back to top

15. Live changes: what restarts what

You never need to restart the gateway to apply a change. Only the part that is affected restarts:

You changeWhat happens
A device or its mappingsOnly that device restarts its polling. Unchanged points keep their value and quality.
Add from template, CSV import, deleteSame: only the affected devices restart.
Command mode, select timeout, time options, clock sync mode, counter report periodApplied at once, nothing restarts.
IEC 104 allowed mastersApplied at once. Masters that are no longer allowed are disconnected.
IEC 104 k, w, t0-t3, max connections, event bufferApplied to the running server and its open connections.
IEC 104 enabled, port, COT/CA/IOA sizes, originator addressOnly the IEC 104 server restarts. Masters reconnect. You are asked first.
Any IEC 101 setting, or the event buffer sizeOnly the IEC 101 link restarts.
Dashboard port, HTTPS, allowed networksThe web server moves inside the running service. Your browser is sent to the new address.
License activationBridging starts at once.
Save Configuration applies the settings; Reset reloads the saved values.

Tip: If a restarted server cannot start (for example the new port is used by another program), the gateway goes back to the previous settings and shows the reason.

Back to top

16. Connecting a SCADA master or test tool

Any IEC 60870-5-104 master can connect: a SCADA system, an RTU, or a test tool. Use these settings in the master:

Setting in the masterValue
ProtocolIEC 60870-5-104 (T104). Not T101 over TCP.
IP address / portIP address of the gateway computer, port 2404 (or the port in Settings)
Common address (CASDU / ASDU address)1 (or what you used in the mappings)
CASDU / ASDU address size2 bytes
IOA size3 bytes
COT size2 bytes ("COT with originator")
k / w / t0 / t1 / t2 / t312 / 8 / 10 s / 15 s / 10 s / 20 s
  1. Make sure the gateway shows IEC 60870-5-104 Running on the Dashboard and the status bar is not red.
  2. On a different computer, the Windows firewall must allow port 2404 (installer option) and the master's IP address must be allowed in Allowed masters (or the list must be empty).
  3. Connect the master. It sends STARTDT; the gateway confirms.
  4. Send a general interrogation (C_IC_NA_1, CA 1, QOI 20). You receive all points, then the activation termination.
  5. Watch the Traffic page: the Connections tab shows the master's IP address.

Important: If the connection opens and closes again at once, the master probably uses T101 frames over TCP instead of T104 (in the master's log you see short frames such as 10 49 01 4A 16). Switch the master to IEC 104 / T104.

Example: switching IOA 201 with select-before-operate

Assume IOA 201 is a command point on a coil (M_SP_NA_1 + Command) and the command mode is Select Before Execute.

Step 1: SelectStep 2: Execute (within 10 s)
Type ID45 (C_SC_NA_1)45 (C_SC_NA_1)
COT6 (activation)6 (activation)
CA11
IOA201201
SCS (state)1 = ON1 = ON
S/E1 = select0 = execute
QU00
Gateway answersCOT 7 positiveCOT 7 positive, then COT 10

If your tool asks for raw ASDU bytes (type, VSQ, COT 2 bytes, CA 2 bytes, IOA 3 bytes, SCO):

Select ON:   2D 01 06 00 01 00 C9 00 00 81
Execute ON:  2D 01 06 00 01 00 C9 00 00 01
Select OFF:  2D 01 06 00 01 00 C9 00 00 80
Execute OFF: 2D 01 06 00 01 00 C9 00 00 00

(201 = C9 00 00; the last byte is the SCO: bit 7 = S/E, bit 0 = state.)

Testing without hardware

Use the slave simulator of ModbusBB as a Modbus device and any IEC 104 test tool as the master. This is how the screenshots in this manual were made.

Back to top

17. License

The License page during the trial (device name and machine ID replaced).
  1. 1. License Status: trial or licensed, licensed to, device name, machine ID, last online check, and the trial days and session time.
  2. 2. Enter the license key (XXXXX-XXXXX-XXXXX-XXXXX).
  3. 3. Activate License (needs internet).
  4. 4. Check Now: check the license online now.

Trial

  • The trial has every feature for 30 days, without registration.
  • During the trial, the gateway bridges data in sessions of 15 minutes. When a session ends, the IEC servers and Modbus polling stop; the dashboard keeps working.
  • A new session starts only when the service restarts: Windows Restart-Service MaxIECGateway (administrator PowerShell) or Services → Max IEC Gateway → Restart; Linux sudo systemctl restart maxiec-gateway. Saving settings does not start a new session.
  • When the 30 days are over, bridging stays stopped until you enter a license key.

Buying and activating

  1. Buy a license on the pricing page ($150 one-time, lifetime license, lifetime free updates). The key arrives by e-mail.
  2. Open License in the dashboard, type the key, optionally a device name, and click Activate License.
  3. The status bar turns green: Bridging. No restart is needed.
  • A license is for one computer. Activating on a second computer gives: This license is already active on another computer.
  • The gateway checks the license online about once a day. Without internet it keeps working for up to 30 days after the last successful check; the License page shows the last online check.
  • If the license server says the key is invalid, revoked or used elsewhere, the key is removed and the gateway returns to trial mode.

Moving the license to another computer

  1. On the old gateway, open License and click Deactivate License (shown when a license is active). This frees the license on the license server; bridging stops on that computer.
  2. On the new computer, activate the key as above.

If the old computer no longer works, release it in the license portal with your key and purchase e-mail (up to 5 times in 30 days), or write to support@maxenergic.com. Lost the key? Request it again on the resend page.

Back to top

18. Updates

Settings: About and Check for Updates.
  • The Dashboard shows a blue banner Update Available! when a new version exists. Or click Check for Updates in Settings → About.
  • Download the new installer from the download page (the page lists SHA-256 checksums) and run it over the installed version. Configuration, license and password are kept.
  • Linux: unpack the new tar.gz and run sudo ./install-linux.sh again.
  • Updates are free for life for licensed customers.

Back to top

19. Security

The gateway is often installed in an operational network. Use these protections:

ProtectionWhereRecommendation
Dashboard passwordChange password (top right)At least 10 characters; do not reuse other passwords.
Allowed networks for the dashboardSettings → Dashboard addressEnter the engineering network, e.g. 192.168.10.0/24. Localhost is always allowed.
HTTPSSettings → Dashboard addressUse a certificate (.pfx) when the dashboard is opened over the network.
IEC 104 allowed mastersSettings → IEC 104List only the SCADA masters' IP addresses.
Windows FirewallInstaller optionsOpen 5000 (local subnet) and 2404 only if needed.
Select-before-operateSettings → Command OptionsRecommended for switching commands.
Settings: dashboard address, HTTPS and allowed networks.
  1. 1. HTTP port (default 5000).
  2. 2. HTTP only from this computer: other computers must use HTTPS.
  3. 3. HTTPS on/off.
  4. 4. Certificate file (.pfx) on the gateway computer, and its password.
  5. 5. Allowed networks for the dashboard.

Important: Click Save dashboard address. The change applies without a restart and your browser is sent to the new address. If you lock yourself out, open the dashboard on the gateway computer itself (http://localhost:5000): localhost is always allowed.

Back to top

20. Backup and restore

Settings: configuration import and export.
  1. 1. Export Configuration: downloads gateway_config_<date>.json with all devices, mappings and the gateway settings.
  2. 2. Choose an exported file to import.
  3. 3. Clear existing devices & mappings before import (otherwise the file is added).
  4. 4. Also import the IEC/gateway settings from the file.
  5. 5. Import Configuration.
  • The import checks the whole file first and then applies it in one step: all or nothing.
  • Export files of version 1.0 can be imported.
  • The dashboard password and the license are not part of the export.

The data folder

FileContent
gateway.dbDevices, mappings, settings and history (SQLite)
logs\gateway-<date>.logLog files, 7 days
license.key, .activation_cache, .trialLicense and trial state
admin.jsonDashboard password (hashed)
web-settings.jsonDashboard address, HTTPS and allowed networks
setup-token.txtOne-time setup code (first start only)

Windows: C:\ProgramData\MaxIECGateway (Start menu: Gateway data folder). Linux: /var/lib/maxiec-gateway. To make a full copy, stop the service and copy the whole folder.

Back to top

21. Troubleshooting

ProblemPossible causeWhat to do
Dashboard does not openService not running; wrong port; firewall; address not in Allowed networksOpen http://localhost:5000 on the gateway computer. Check the service. Check the firewall option and Settings → Dashboard address.
Service is missing or does not startInstallation was not run as administrator; port 5000 or 2404 used by another programRun the installer again as administrator. Look at the log in the data folder. Stop the portable version if it is running.
IEC master connects and disconnects at onceMaster uses T101 frames over TCP; wrong ASDU sizes; master not in Allowed mastersSet the master to IEC 104 (T104), CA 2 bytes, IOA 3 bytes, COT 2 bytes. Check the Connections tab.
Master gets no data / status bar is redTrial session ended or license not validRestart the service (new trial session) or activate a license.
All points of a device are InvalidDevice offline, wrong IP/port/unit ID, wrong serial settings, cableCheck the Device Connections table and the Modbus tab of the Traffic page. Test the device with ModbusBB.
Some points Invalid, others GoodAddress does not exist in the device (Modbus exception)Check the addresses: 0-based, try ±1.
Values are wrong (very large or tiny)Wrong register type, byte order or addressTry CDAB for floats; check Int vs UInt; check scaling.
Value changes are not sentDeadband too largeReduce the deadband or set it to None.
Command rejectedNo select, select expired, not a command point, wrong IOASee Why was my command rejected?
Command confirmed but nothing changesDevice ignores the write; wrong addressCheck the Modbus tab and the device manual (write function, address).
Serial port busy / cannot open COM portAnother program uses the port; Linux user not in dialout groupClose the other program. On Linux run the installer again or add the user maxiec to dialout.
IEC server problem: port in useAnother program listens on 2404Change the IEC 104 port or stop the other program.
"This license is already active on another computer"The license is used on another computerDeactivate it there, or release it in the license portal.
License stays "pending"No internet access to iec.maxenergic.com (HTTPS)Allow outgoing HTTPS, then click Check Now.

The log file is in the logs folder of the data folder (Linux: sudo journalctl -u maxiec-gateway). Send it with your question to support@maxenergic.com.

Back to top

22. Frequently asked questions

Do I need to restart the gateway after changing a setting?

No. Every change applies immediately. Only the part that is affected restarts, see chapter 15.

Can several SCADA masters connect at the same time?

Yes, up to the Max Connections setting (default 10). Each master receives all data and can send commands.

Can IEC 104 and IEC 101 run at the same time?

Yes. Both serve the same points.

Does it support Modbus RTU?

Yes: Modbus RTU on a serial port (several devices per line) and Modbus RTU over TCP.

Are Modbus addresses 0-based or 1-based?

0-based. Register 40001 is address 0 with data type HoldingRegister.

Why do I get no energy counters in a general interrogation?

That is correct per IEC 60870-5: integrated totals are read with a counter interrogation (C_CI_NA_1).

Is select-before-operate supported?

Yes. Choose Select Before Execute in Settings → Command Options and set the select timeout (1-60 s).

Does the gateway change the computer clock?

Only if you choose "Also set this computer's clock". By default it only confirms and logs the offset.

What happens when the trial session ends?

The IEC servers and Modbus polling stop. Restart the service for a new 15-minute session, or activate a license.

How many computers can use one license?

One. You can move it to another computer at any time.

Back to top

Appendix A. Supported ASDU types

Monitor direction (gateway → master):

TypeNameDescription
1M_SP_NA_1Single point
2M_SP_TA_1Single point, CP24 time (IEC 101)
3M_DP_NA_1Double point
4M_DP_TA_1Double point, CP24 time (IEC 101)
5M_ST_NA_1Step position
7M_BO_NA_1Bitstring of 32 bits
9M_ME_NA_1Measured value, normalized
11M_ME_NB_1Measured value, scaled
13M_ME_NC_1Measured value, short float
15M_IT_NA_1Integrated totals
30M_SP_TB_1Single point, CP56 time
31M_DP_TB_1Double point, CP56 time
32M_ST_TB_1Step position, CP56 time
33M_BO_TB_1Bitstring, CP56 time
34M_ME_TD_1Normalized, CP56 time
35M_ME_TE_1Scaled, CP56 time
36M_ME_TF_1Short float, CP56 time
37M_IT_TB_1Integrated totals, CP56 time

Control direction (master → gateway):

TypeNameDescription
45 / 58C_SC_NA_1 / C_SC_TA_1Single command
46 / 59C_DC_NA_1 / C_DC_TA_1Double command
48 / 61C_SE_NA_1 / C_SE_TA_1Set-point, normalized
49 / 62C_SE_NB_1 / C_SE_TB_1Set-point, scaled
50 / 63C_SE_NC_1 / C_SE_TC_1Set-point, short float
51 / 64C_BO_NA_1 / C_BO_TA_1Bitstring command (always direct)
100C_IC_NA_1General and group interrogation
101C_CI_NA_1Counter interrogation
102C_RD_NA_1Read command
103C_CS_NA_1Clock synchronization
104 / 107C_TS_NA_1 / C_TS_TA_1Test command

Not supported: the regulating step command C_RC_NA_1 (47) and the reset process command C_RP_NA_1 (105) get a negative confirmation. Parameter (P_*), file transfer and protection-equipment types are answered with COT 44 (unknown type).

Back to top

Appendix B. Cause of transmission (COT) codes

COTNameUsed for
1Periodic / cyclicCyclic transmission of a point
3SpontaneousValue changes
5RequestedAnswer to a read command
6ActivationCommands and interrogations from the master
7Activation confirmationPositive or negative answer to an activation
8DeactivationCancel a select
9Deactivation confirmationAnswer to a deactivation
10Activation terminationCommand or interrogation finished
20Interrogated by stationData in a general interrogation
21-36Interrogated by group 1-16Data in a group interrogation
37Requested by general counter requestCounters in a counter interrogation
38-41Requested by counter group 1-4Counters of one group
44Unknown type identificationType not supported
45Unknown cause of transmissionCOT not allowed for this type
46Unknown common addressNo points with this CA
47Unknown information object addressNo point with this IOA

Back to top

Appendix C. appsettings.json reference

Most settings are made in the dashboard. A few start-up options are in appsettings.json in the program folder (Windows: C:\Program Files\Max IEC Gateway, Linux: /opt/maxiec-gateway). Edit it with administrator rights and restart the service. The installer keeps your file on updates.

KeyDefaultMeaning
Gateway:DataDirectory(not set)Other data folder. Default: C:\ProgramData\MaxIECGateway or /var/lib/maxiec-gateway.
Gateway:DatabasePathgateway.dbDatabase file, relative to the data folder.
Gateway:SeedSampleDevicetrueCreate a disabled example device in a new database.
Gateway:Iec104:BindAddress(all addresses)Listen for IEC 104 on one network card only, e.g. 192.168.10.5.
Gateway:Web:AllowedNetworks[]Addresses allowed to open the dashboard (also editable in Settings).
Gateway:Web:SessionTimeoutMinutes60Minutes of inactivity before a login expires.
Kestrel:Endpoints:Http:Urlhttp://0.0.0.0:5000Dashboard address. An Https endpoint with a .pfx certificate can be added.
Serilog:MinimumLevel:DefaultInformationLog detail: Debug, Information, Warning, Error.

Note: The environment variable MAXIEC_DATA_DIR overrides the data folder.

Back to top

Appendix D. Service and command-line reference

TaskWindows (administrator PowerShell)Linux
StatusGet-Service MaxIECGatewaysudo systemctl status maxiec-gateway
StartStart-Service MaxIECGatewaysudo systemctl start maxiec-gateway
StopStop-Service MaxIECGatewaysudo systemctl stop maxiec-gateway
Restart (new trial session)Restart-Service MaxIECGatewaysudo systemctl restart maxiec-gateway
Live logOpen the newest file in C:\ProgramData\MaxIECGateway\logssudo journalctl -u maxiec-gateway -f
Setup codetype C:\ProgramData\MaxIECGateway\setup-token.txtsudo cat /var/lib/maxiec-gateway/setup-token.txt
Open the dashboardhttp://localhost:5000http://<host>:5000

Back to top

Appendix E. Glossary

ACT_CON / ACT_TERM
Activation confirmation (COT 7) and activation termination (COT 10): the outstation's answers to a command.
APCI
The IEC 104 frame header with sequence numbers; controlled by k, w and t0-t3.
ASDU
Application service data unit: one IEC message with type, cause, common address and objects.
Byte order
The order of the bytes of a 32/64-bit value in Modbus registers (ABCD, CDAB, BADC, DCBA).
CA (common address)
Station address in an ASDU; usually 1.
COT
Cause of transmission: why a message is sent (spontaneous, interrogation, activation …).
CP56Time2a
7-byte time tag with date and time to the millisecond (types 30-37).
Deadband
Minimum change before a measured value is sent again.
Double point
A position with two bits: OFF, ON, intermediate or faulty.
General interrogation (GI)
Request from the master for all current values (C_IC_NA_1, QOI 20).
Integrated totals
Counters such as energy (M_IT_*), read by counter interrogation.
IOA
Information object address: number of a data point.
IV / OV
Quality bits: invalid, overflow.
Master / outstation
The SCADA side (controlling station) and the gateway (controlled station).
Modbus RTU / TCP
Modbus on a serial line (RTU) or over Ethernet (TCP).
Select-before-operate (SBO)
Two-step command: select, then execute within the select timeout.
STARTDT / STOPDT
IEC 104 messages that start and stop data transfer on a connection.
Unit ID
Modbus slave address.

Back to top