sgcIndustrial Modbus, OPC UA and serial ports. Native in Delphi and .NET.

Six components connect your applications to PLCs, SCADA servers, energy meters, drives and serial devices. TsgcModbusTCPClient and TsgcModbusRTUClient read and write coils and registers. TsgcModbusTCPServer and TsgcModbusRTUServer turn your application into a Modbus device. TsgcOPCUAClient reads, writes and subscribes over signed and encrypted connections, and TsgcSerialPort drives RS-232 and RS-485. Standalone, the sgcWebSockets Core runtime is included.

  • Modbus TCP
  • Modbus RTU
  • OPC UA client
  • RS-232 and RS-485
  • Delphi 7 to 13
  • C++Builder
  • .NET
  • Full source code
YOUR APPLICATION Delphi, C++Builder, .NET TsgcModbusTCPClient TsgcModbusRTUClient TsgcOPCUAClient TsgcSerialPort TsgcModbusTCPServer TsgcModbusRTUServer PLC 192.168.1.50:502 OPC UA SERVER opc.tcp, port 4840 METER, DRIVE RS-232 or RS-485 MODBUS TCP ReadHoldingRegisters(0, 10) OPC UA Basic256Sha256, SignAndEncrypt MODBUS RTU CRC, timeouts, retries TsgcModbusDataModel coils and registers, thread-safe OnReadRequest SCADA, HMI any Modbus client
  • 6Components on the SGC Industrial palette page, with the same names in .NET
  • 2Modbus transports, TCP over TCP/IP and RTU over a serial line
  • 6OPC UA security policies, up to Aes256_Sha256_RsaPss
  • 3Languages, Delphi, C++Builder and .NET, with the same API
  • 100%Source code included with every license
What is in the pack

Six components for the field level.

The protocols that PLCs, meters and drives speak, as non-visual components you drop on a form or create in code. Every Modbus request is a blocking call that returns the values or raises a clear exception, so reading a PLC looks like reading a local variable. The .NET classes carry the same names.

RS-232 and RS-485 serial ports

TsgcSerialPort opens RS-232 and RS-485 ports on Windows, Linux and macOS, writes data and receives it in an event or with blocking reads. ListPorts lists the ports of the machine, and RtsControl set to srcToggle switches the direction for adapters that use RTS. It is also the transport of the Modbus RTU components.

View the serial port →

Read and write a PLC in a few lines

TsgcModbusTCPClient and TsgcModbusRTUClient read and write coils and registers over TCP/IP or a serial line, with function codes 01 to 08, 15, 16, 22, 23 and 43/14. The components handle framing, transaction ids, CRC checks, timeouts and retries for you, and the requests can be called from any thread.

View the Modbus client →

Typed values, gateways and clear errors

ReadInt32, ReadUInt32, ReadFloat32 and ReadString have write twins, and WordOrder selects ABCD, DCBA, BADC or CDAB to match the device. An overload with a leading unit id reaches every device behind a Modbus TCP to RTU gateway. A device exception raises EsgcModbusException, and no answer raises EsgcModbusTimeout.

Typed values →

Your application as a Modbus device

TsgcModbusTCPServer and TsgcModbusRTUServer answer from a thread-safe TsgcModbusDataModel with coils, discrete inputs, holding registers and input registers. OnReadRequest fires before a read to load live values, and OnWriteRequest fires before a write to change the values or reject the request with a Modbus exception code.

View the Modbus server →

OPC UA, signed and encrypted

TsgcOPCUAClient speaks the OPC UA binary protocol over opc.tcp, with Basic256Sha256, Aes128_Sha256_RsaOaep and Aes256_Sha256_RsaPss in Sign or SignAndEncrypt mode. Users log in as Anonymous, with a user name and password, or with an X.509 certificate, and OnValidateServerCertificate decides which server certificates you trust.

View the OPC UA client →

Browse, read, write and call

GetEndpoints, Browse and BrowseNext follow continuation points for you. TranslateBrowsePath, Read and Write of any attribute and Call for methods cover the rest. ReadValue and WriteValue take a node id string and use the data type of the node.

OPC UA services →

Subscriptions that survive a network drop

Data change items with sampling interval, queue size and deadband, and event items with select and where clauses, are pushed by the server without polling. With WatchDog enabled, the client reconnects on its own and restores your subscriptions, and OnReconnect tells you which path was taken. Automatic reconnect is available in Delphi and .NET.

Subscriptions →

Delphi, C++Builder and .NET

Delphi 7 to 13 and C++Builder on Windows Win32 and Win64, and Linux64. .NET 8, .NET 9, .NET 10 and .NET Standard 2.0, in the NuGet package esegece.sgcIndustrial. Serial ports work on Windows, Linux and macOS. Both run in desktop applications, console tools and services.

Platforms →

Reference pages for each component:

The code

Read a PLC, read a server.

The clients follow one shape: set the address, connect, call a method. Each call blocks until the device or the server answers, so the values are there on the next line.

uses
  sgcIndustrial;

procedure TForm1.ReadPLC;
var
  vRegisters: TsgcModbusRegisters;
begin
  FClient := TsgcModbusTCPClient.Create(Self);
  FClient.Host := '192.168.1.50';
  FClient.Port := 502;
  FClient.UnitId := 1;
  FClient.OnError := OnModbusError;
  FClient.Active := True;
  if FClient.Active then
  begin
    // holding registers 0..9 (40001..40010 in many device manuals)
    vRegisters := FClient.ReadHoldingRegisters(0, 10);
    Memo1.Lines.Add(Format('Register 0 = %d', [vRegisters[0]]));
    FClient.WriteSingleRegister(100, 1234);
  end;
end;

procedure TForm1.OnModbusError(Sender: TObject; const aError: string);
begin
  Memo1.Lines.Add('Error: ' + aError);
end;
uses
  sgcIndustrial;

procedure TForm1.ConnectAndRead;
begin
  FClient := TsgcOPCUAClient.Create(Self);
  FClient.EndpointUrl := 'opc.tcp://192.168.1.60:4840';
  FClient.SecurityPolicy := opcspNone;
  FClient.SecurityMode := opcsmNone;
  FClient.OnError := OnOPCUAError;
  FClient.Connect;
  // read the Value attribute of a variable
  Memo1.Lines.Add('Temperature: ' + VarToStr(FClient.ReadValue('ns=2;s=Line1.Temperature')));
  // the data type of the node is read first and used for the written value
  FClient.WriteValue('ns=2;s=Line1.Setpoint', 75.5);
end;

procedure TForm1.OnOPCUAError(Sender: TObject; aStatusCode: Cardinal; const aError: string);
begin
  Memo1.Lines.Add('Error: ' + aError);
end;
using System;
using esegece.sgcWebSockets;

class PlcReader
{
    TsgcModbusTCPClient FClient = new TsgcModbusTCPClient();

    public void ReadPLC()
    {
        FClient.Host = "192.168.1.50";
        FClient.Port = 502;
        FClient.UnitId = 1;
        FClient.OnError += OnModbusError;
        FClient.Active = true;
        if (FClient.Active)
        {
            // holding registers 0..9 (40001..40010 in many device manuals)
            ushort[] vRegisters = FClient.ReadHoldingRegisters(0, 10);
            Console.WriteLine("Register 0 = " + vRegisters[0]);
            FClient.WriteSingleRegister(100, 1234);
        }
    }

    void OnModbusError(object Sender, string aError)
    {
        Console.WriteLine("Error: " + aError);
    }
}

The same Modbus code works against any Modbus TCP device or gateway, and the C++ Builder version of every sample is on the component pages. The industrial components overview →

  1. Drop a component on a formThe six components sit on the SGC Industrial palette page, or create them in code in a console tool or a service.
  2. Set the addressHost, Port and UnitId for Modbus TCP, a serial port for Modbus RTU, and EndpointUrl with the security policy and mode for OPC UA.
  3. Call one methodReadHoldingRegisters and WriteSingleRegister for Modbus, ReadValue, WriteValue and CreateSubscription for OPC UA.
  4. Or serve it yourselfTsgcModbusTCPServer and TsgcModbusRTUServer answer from TsgcModbusDataModel, with events to check every read and write.
Interoperability

Tested against implementations we did not write.

A protocol stack is only as good as its interoperability, so sgcIndustrial was tested against other implementations of both protocols, and the Delphi and .NET versions against each other.

OPC UA

The OPC Foundation reference server, Eclipse Milo, node-opcua, open62541 and asyncua, with every security policy and mode each server offers, Anonymous, UserName and Certificate authentication, subscriptions, events and reconnect.

Modbus

modpoll, diagslave, libmodbus, modbus_tk and pymodbus, as clients and as servers, over TCP and over RTU serial lines.

Delphi and .NET

The Delphi and .NET components were tested against each other, 35 of 35 cross tests passing.

Before you buy

Four things worth knowing first.

What sgcIndustrial includes, whether you already own these components, how the .NET version is sold, and how to start. The answers are short, and they are on this page rather than in the small print.

component            protocol         role
TsgcSerialPort       RS-232, RS-485   serial port
TsgcModbusTCPClient  Modbus TCP       client
TsgcModbusRTUClient  Modbus RTU       client
TsgcModbusTCPServer  Modbus TCP       server, data model
TsgcModbusRTUServer  Modbus RTU       server, data model
TsgcOPCUAClient      OPC UA, opc.tcp  client

OPC UA security policies
None, Basic128Rsa15, Basic256
Basic256Sha256, Aes128_Sha256_RsaOaep
Aes256_Sha256_RsaPss
modes      None, Sign, SignAndEncrypt
logins     Anonymous, UserName, Certificate
  1. sgcIndustrial is self-containedStandalone, the sgcWebSockets Core runtime is included, so there is nothing else to buy. Full source code ships with every license, so the protocol code steps through in your own debugger.
  2. Already in your sgcWebSockets edition?All six industrial components ship inside sgcWebSockets Enterprise, for Delphi and for .NET, and All-Access includes everything.
  3. .NET is a separate packagesgcIndustrial .NET ships as one zip from My Account, with the NuGet packages esegece.sgcWebSockets.Core, esegece.sgcIndustrial and esegece.sgcCrypto and their full source code.
  4. Start with the demosThe Delphi demos are in Demos\Delphi\Industrial and the C++ Builder demos in Demos\CBuilder\Industrial. The Modbus TCP server demo lets you test a client and a server on one machine.

Framing, security, sessions and subscriptions are all handled by the components, and full source code means nothing in between is a black box. Every component and code sample →

Part of sgcWebSockets

Licensed on its own, or already in your edition.

sgcIndustrial is one package of the sgcWebSockets family. Buy it standalone from €249, with the Core runtime bundled in, or get all six components with sgcWebSockets Enterprise or All-Access.

sgcIndustrial

The serial port, the Modbus TCP and RTU clients and servers and the OPC UA client, standalone for Delphi and C++ Builder, with the sgcWebSockets Core runtime included.

€249 / single license
Team €399 Site €649
  • Serial port for RS-232 and RS-485
  • Modbus TCP and RTU clients
  • Modbus TCP and RTU servers with a data model
  • OPC UA client over opc.tcp
  • Full source code and 1 year of updates
sgcIndustrial pricing →

sgcIndustrial .NET

The same six components for .NET, sold separately, with the NuGet packages and their full source code.

€249 / single license
Team €399 Site €649
  • .NET 8, .NET 9, .NET 10 and .NET Standard 2.0
  • The NuGet package esegece.sgcIndustrial
  • Packages, compiled demos and samples for every .NET target
Compare licenses →

sgcWebSockets

The full library: WebSocket clients and servers, HTTP/2, IoT, P2P and AI components. Its Enterprise edition includes the industrial components too.

€699 / Enterprise
  • All six industrial components in Enterprise and All-Access
  • For Delphi and for .NET
  • This is where the Core runtime lives
Explore sgcWebSockets →

If you own sgcWebSockets Enterprise or All-Access you already have all six components. sgcIndustrial is for Modbus, OPC UA and serial ports without licensing a full sgcWebSockets edition.

View pricing and licenses
Testimonials

What Developers Say

Trusted by Delphi, C++ Builder, Lazarus and .NET developers around the world.

Your sgcWebSockets library is very useful and easy to setup. Keep up the good work!
Simone Moretti Delphi Developer
sgcWebSockets is amazing and your support is the best!
Christian Meyer Founder & CTO
Thanks so much for your help and support, I love your components.
Mark Steinfeld CTO

Bring plant data into your application.

Modbus, OPC UA and serial ports from native Delphi, C++ Builder and .NET code, with the runtime bundled in and full source code in the box.

The ecosystem

Other Products by eSeGeCe

sgcIndustrial is one of the eSeGeCe component libraries for Delphi, C++ Builder and .NET. They share conventions, they ship with full source, and they deploy royalty-free.

sgcWebSockets

WebSocket, HTTP/2, MQTT, AMQP, WebRTC, AI and 30+ API integrations for Delphi, C++ Builder, Lazarus and .NET. This is where the Core runtime lives.

sgcMQ

MQTT, AMQP 0.9.1 and 1.0, Apache Kafka and STOMP client components for Delphi and C++ Builder. Standalone, with the sgcWebSockets Core runtime bundled in.

sgcSSH

SSH, SFTP and SCP clients plus SSH and SFTP servers, with post-quantum key exchange.

sgcCrypto

Symmetric and asymmetric ciphers, hashing and post-quantum algorithms such as ML-KEM and ML-DSA. Ships free from sgcWebSockets Standard up.

sgcAuth

OAuth2 and JWT clients, WebAuthn passkey sign-in, TOTP, LDAP, SAML and OpenID Connect. Standalone, with the sgcWebSockets Core runtime bundled in.

sgcHTTP

HTTP server, HTTP/2 client, gRPC client and Google Cloud Pub/Sub, Calendar and FCM clients for Delphi and C++ Builder. Standalone, with the sgcWebSockets Core runtime bundled in.

sgcREST

REST server, OpenAPI server and OpenAPI client components for Delphi and C++ Builder. Standalone, with the sgcWebSockets Core runtime bundled in.

sgcAI

AI, LLM and MCP components for Delphi and C++ Builder. Seven LLM providers behind one component, plus MCP, embeddings and speech. Standalone, with the sgcWebSockets Core runtime bundled in.

sgcSocial

Telegram and WhatsApp Business client components for Delphi and C++ Builder. Standalone, with the sgcWebSockets Core runtime bundled in.

sgcHTML

Server-side HTML and UI components on Bootstrap 5 and htmx, for web applications written in Delphi.

sgcSign

XAdES, PAdES, CAdES and ASiC for documents, Authenticode, ClickOnce, NuGet and VSIX for code.

Packs, add-ons and more

Latest from the blog

View all posts →

You are seeing the sgcIndustrial view of eSeGeCe.

Show me another angle →
30-Day Money-Back GuaranteeNot satisfied? Request a full refund within 30 days of purchase. See refund policy