{"id":27101325,"url":"https://github.com/masesgroup/plconnet","last_synced_at":"2026-05-09T05:03:38.114Z","repository":{"id":280044897,"uuid":"940612371","full_name":"masesgroup/PLCOnNet","owner":"masesgroup","description":".NET suite for Apache PLC4X™: full Apache PLC4X™ API access from .NET — connect to industrial PLCs (S7, Modbus, ADS, and more) directly from C#/VB.NET","archived":false,"fork":false,"pushed_at":"2026-04-28T01:49:39.000Z","size":15090,"stargazers_count":4,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-07T18:49:37.729Z","etag":null,"topics":["dotnet","iot","jvm","plc","plc4x"],"latest_commit_sha":null,"homepage":"http://plconnet.masesgroup.com/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/masesgroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"masesgroup","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2025-02-28T13:39:35.000Z","updated_at":"2026-04-17T14:20:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3b32af8-8d4e-4ab0-b1ea-86133a068dd8","html_url":"https://github.com/masesgroup/PLCOnNet","commit_stats":null,"previous_names":["masesgroup/plc4net","masesgroup/plconnet"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/masesgroup/PLCOnNet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masesgroup%2FPLCOnNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masesgroup%2FPLCOnNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masesgroup%2FPLCOnNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masesgroup%2FPLCOnNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masesgroup","download_url":"https://codeload.github.com/masesgroup/PLCOnNet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masesgroup%2FPLCOnNet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","iot","jvm","plc","plc4x"],"created_at":"2025-04-06T14:18:26.344Z","updated_at":"2026-05-09T05:03:38.095Z","avatar_url":"https://github.com/masesgroup.png","language":"C#","funding_links":["https://github.com/sponsors/masesgroup"],"categories":[],"sub_categories":[],"readme":"# PLCOnNet: .NET suite for [PLC4X™](https://plc4x.apache.org)\n\nPLCOnNet is a comprehensive suite of libraries and tools to use [PLC4X™](https://plc4x.apache.org) and .NET side-by-side.\n\n### Libraries and Tools\n\n|PLCOnNet | PLCOnNet.Templates | PLCOnNetCLI | PLCOnNetPS |\n|:---:\t|:---:\t|:---:\t|:---:\t|\n|[![PLCOnNet nuget](https://img.shields.io/nuget/v/MASES.PLCOnNet)](https://www.nuget.org/packages/MASES.PLCOnNet)\u003cbr/\u003e[![downloads](https://img.shields.io/nuget/dt/MASES.PLCOnNet)](https://www.nuget.org/packages/MASES.PLCOnNet) | [![PLCOnNet.Templates nuget](https://img.shields.io/nuget/v/MASES.PLCOnNet.Templates)](https://www.nuget.org/packages/MASES.PLCOnNet.Templates)\u003cbr/\u003e[![downloads](https://img.shields.io/nuget/dt/MASES.PLCOnNet.Templates)](https://www.nuget.org/packages/MASES.PLCOnNet.Templates)| [![PLCOnNetCLI nuget](https://img.shields.io/nuget/v/MASES.PLCOnNetCLI)](https://www.nuget.org/packages/MASES.PLCOnNetCLI)\u003cbr/\u003e[![downloads](https://img.shields.io/nuget/dt/MASES.PLCOnNetCLI)](https://www.nuget.org/packages/MASES.PLCOnNetCLI)|[![PLCOnNetPS](https://img.shields.io/powershellgallery/v/MASES.PLCOnNetPS.svg?style=flat-square\u0026label=MASES.PLCOnNetPS)](https://www.powershellgallery.com/packages/MASES.PLCOnNetPS/)|\n\n### Pipelines\n\n[![CI_BUILD](https://github.com/masesgroup/PLCOnNet/actions/workflows/build.yaml/badge.svg)](https://github.com/masesgroup/PLCOnNet/actions/workflows/build.yaml) \n[![CodeQL](https://github.com/masesgroup/PLCOnNet/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/masesgroup/PLCOnNet/actions/workflows/codeql-analysis.yml)\n[![CI_RELEASE](https://github.com/masesgroup/PLCOnNet/actions/workflows/release.yaml/badge.svg)](https://github.com/masesgroup/PLCOnNet/actions/workflows/release.yaml) \n\n### Project disclaimer\n\nPLCOnNet is a suite for Apache PLC4X™, maintained by MASES Group and open to community contributions.\nIts primary scope is to support other MASES Group projects — both open-source and commercial — though it is freely available for any use. Dedicated community and commercial subscription plans are available.\nThe repository and releases may contain bugs. The release cycle depends on critical issues discovered and/or enhancement requests from this or other dependent projects.\n\nLooking for expertise in PLC and industrial automation applications? MASES Group can help you design, build, deploy, and manage applications based on PLC communication. [Find out more.](src/documentation/articles/support.md)\n\n---\n\n## Scope of the project\n\nThis project aims to create a set of libraries and tools to direct access, from .NET, all the features available in the [PLC4X™](https://plc4x.apache.org) since, as stated in [PLC4X™ GitHub repository](https://github.com/apache/plc4x), the support for C# was abandoned.\nAnd, still in [PLC4X™ protocols page](https://plc4x.apache.org/plc4x/latest/users/protocols/index.html), the main supported languages are Java and Go.\nThis project mutuated the name of the PLC4X™ support for .NET and implements almost all Java classes in .NET giving to a developer the same programming experience of Java. \nThe following snippets demonstrate the comparison between the [Java code](https://plc4x.apache.org/plc4x/latest/users/getting-started/plc4j.html) and the C# counterpart offered from this project.\n\n### Initialization\n\n**Try-with-resource** statement:\n\n```java\nString cString = \"s7://10.10.64.20\";\nPlcConnection plcConnection = null;\ntry (plcConnection = PlcDriverManager.getDefault()\n                                     .getConnectionManager()\n                                     .getConnection(cString))\n{\n  ... do something with the connection here ...\n}\n```\n\nbecomes a `using` clause:\n\n```C#\nconst string cString = \"s7://10.10.64.20\";\n\nusing (var plcConnection = PlcDriverManager.Default\n                                           .ConnectionManager\n                                           .GetConnection(cString))\n{\n  ... do something with the connection here ...\n}\n```\n\n### Check supported feature\n\nThe following Java snippet:\n\n```java\n// Check if this connection support reading of data.\nif (!plcConnection.getMetadata().isReadSupported()) {\n  logger.error(\"This connection doesn't support reading.\");\n  return;\n}\n```\n\nbecomes in C#:\n\n```C#\nif (!plcConnection.Metadata.IsReadSupported())\n{\n    Console.WriteLine(\"This connection doesn't support reading.\");\n    return;\n}\n```\n\n### Prepare request\n\nThe following Java snippet:\n\n```java\n// Create a new read request:\n// - Give the single item requested an alias name\nPlcReadRequest.Builder builder = plcConnection.readRequestBuilder();\nbuilder.addTagAddress(\"value-1\", \"%Q0.4:BOOL\");\nbuilder.addTagAddress(\"value-2\", \"%Q0:BYTE\");\nbuilder.addTagAddress(\"value-3\", \"%I0.2:BOOL\");\nbuilder.addTagAddress(\"value-4\", \"%DB.DB1.4:INT\");\nPlcReadRequest readRequest = builder.build();\n\nPlcReadResponse response = readRequest.execute().get(5000, TimeUnit.MILLISECONDS);\n```\nbecomes in C#:\n\n```C#\n// Create a new read request:\n// - Give the single item requested an alias name\nPlcReadRequest.Builder builder = plcConnection.ReadRequestBuilder();\nbuilder.AddTagAddress(\"value-1\", \"%Q0.4:BOOL\");\nbuilder.AddTagAddress(\"value-2\", \"%Q0:BYTE\");\nbuilder.AddTagAddress(\"value-3\", \"%I0.2:BOOL\");\nbuilder.AddTagAddress(\"value-4\", \"%DB.DB1.4:INT\");\nPlcRequest readRequest = builder.Build();\n\nvar cf = readRequest.Execute\u003cPlcReadResponse\u003e();\nvar response = cf.Get();\n```\n\n\n### Analyze returned information\n\nThe following Java snippet:\n\n```java\nfor (String tagName : response.getTagNames()) {\n    if(response.getResponseCode(tagName) == PlcResponseCode.OK) {\n        int numValues = response.getNumberOfValues(tagName);\n        // If it's just one element, output just one single line.\n        if(numValues == 1) {\n            logger.info(\"Value[\" + tagName + \"]: \" \n                        + response.getObject(tagName));\n        }\n        // If it's more than one element, output each in a single row.\n        else {\n            logger.info(\"Value[\" + tagName + \"]:\");\n            for(int i = 0; i \u003c numValues; i++) {\n                logger.info(\" - \" + response.getObject(tagName, i));\n            }\n        }\n    }\n    // Something went wrong, to output an error message instead.\n    else {\n        logger.error(\"Error[\" + tagName + \"]: \" \n                     + response.getResponseCode(tagName).name());\n    }\n}\n```\nbecomes in C#:\n\n```C#\nforeach (Java.Lang.String tagName in response.TagNames)\n{\n    if (response.GetResponseCode(tagName) == PlcResponseCode.OK)\n    {\n        int numValues = response.GetNumberOfValues(tagName);\n        // If it's just one element, output just one single line.\n        if (numValues == 1)\n        {\n            Console.WriteLine($\"Value[{tagName}]: {response.GetObject(tagName)}\");\n        }\n        // If it's more than one element, output each in a single row.\n        else\n        {\n            Console.WriteLine($\"Value[{tagName}]:\");\n            for (int i = 0; i \u003c numValues; i++)\n            {\n                Console.WriteLine($\" - {response.GetObject(tagName, i)}\");\n            }\n        }\n    }\n    // Something went wrong, to output an error message instead.\n    else\n    {\n        Console.WriteLine($\"Error[{tagName}]: {response.GetResponseCode(tagName).Name()}\");\n    }\n}\n```\n\nSee [PLCOnNet usage](src/documentation/articles/usage.md) for other examples.\n\n### Community and Contribution\n\nIf you find PLCOnNet useful:\n\n* Leave a ⭐ on the repository\n* Open [issues](https://github.com/masesgroup/PLCOnNet/issues) to report bugs 🐛 or request features\n* Submit Pull Requests to improve the project\n\nThis project adheres to the Contributor [Covenant code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to coc_reporting@masesgroup.com.\n\n## Summary\n\n* [Roadmap](src/documentation/articles/roadmap.md)\n* [Current state](src/documentation/articles/currentstate.md)\n* [Usage](src/documentation/articles/usage.md)\n* [Performance tips](https://jnet.masesgroup.com/articles/performancetips.html)\n* [APIs extensibility](https://jnet.masesgroup.com/articles/API_extensibility.html)\n* [JVM™ callbacks](https://jnet.masesgroup.com/articles/jvm_callbacks.html)\n* [PLCOnNet CLI usage](src/documentation/articles/usageCLI.md)\n* [PLCOnNet Docker usage](src/documentation/articles/docker.md)\n* [PLCOnNet PowerShell usage](src/documentation/articles/usagePS.md)\n* [PLCOnNet Command-line switches](src/documentation/articles/commandlineswitch.md)\n\n### Recent changes\n\n* V0.13.0+: Version based on [PLC4X™](https://plc4x.apache.org) 0.13.*\n* V0.12.0+: First version based on [PLC4X™](https://plc4x.apache.org) 0.12.0\n\n---\n\n## Runtime engine\n\nPLCOnNet uses [JNet](https://github.com/masesgroup/JNet), and indeed [JCOBridge](https://www.jcobridge.com/) with its [features](https://www.jcobridge.com/features/), to obtain many benefits:\n* **Cyber-security**: \n  * [JVM™](https://en.wikipedia.org/wiki/Java_virtual_machine) and [CLR, or CoreCLR,](https://en.wikipedia.org/wiki/Common_Language_Runtime) runs in the same process, but are insulated from each other;\n  * JCOBridge does not make any code injection into JVM™;\n  * JCOBridge does not use any other communication mechanism than JNI;\n  * .NET (CLR) inherently inherits the cyber-security levels of running JVM™; \n* **Direct access the JVM™ from any .NET application**: \n  * Any Java/Scala/Kotlin/... class can be directly managed;\n  * No need to learn new APIs: we try to expose the same APIs in C# style;\n  * No extra validation cycle on protocol and functionality: bug fix, improvements, new features are immediately available;\n  * Documentation is shared;\n* **Dynamic code**: it helps to write a Java/Scala/Kotlin/etc seamless language code directly inside a standard .NET application written in C#/VB.NET: look at this [simple example](https://www.jcobridge.com/net-examples/dotnet-examples/) and [APIs extensibility](https://jnet.masesgroup.com/articles/API_extensibility.html).\n\n\u003e [!NOTE]\n\u003e [JCOBridge 2.6.\\*](https://www.jcobridge.com) can be used for free without any obligations. A commercial license must be purchased — or the software uninstalled — if you derive direct or indirect income from its usage.\n\n### JCOBridge resources\n\nHave a look at the following JCOBridge resources:\n\n|JCOBridge | 2.5.* series | 2.6.* series |\n|:---:\t|:---:\t|:---:\t|\n|PLCOnNet | \u003e 0.12.* series | 0.12.3 and \u003e 0.13.* series |\n|Release notes|[Link](https://www.jcobridge.com/release-notes/)| [Link](https://www.jcobridge.com/release-notes/)|\n|Community Edition|[Conditions](https://www.jcobridge.com/pricing-25/)|[Conditions](https://www.jcobridge.com/pricing-26/)|\n|Commercial Edition|[Information](https://www.jcobridge.com/pricing-25/)|[Information](https://www.jcobridge.com/pricing-26/)|\n\nLatest release: [![JCOBridge nuget](https://img.shields.io/nuget/v/MASES.JCOBridge)](https://www.nuget.org/packages/MASES.JCOBridge)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasesgroup%2Fplconnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasesgroup%2Fplconnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasesgroup%2Fplconnet/lists"}