{"id":15011658,"url":"https://github.com/corsinvest/cv4ab-api-dotnet","last_synced_at":"2025-04-12T03:31:02.484Z","repository":{"id":53791289,"uuid":"149090686","full_name":"Corsinvest/cv4ab-api-dotnet","owner":"Corsinvest","description":"API for accessing Allen-Bradley PLC data over Ethernet Windows/Linux .NET Core","archived":false,"fork":false,"pushed_at":"2021-10-19T06:36:27.000Z","size":714,"stargazers_count":46,"open_issues_count":8,"forks_count":24,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-25T23:23:41.457Z","etag":null,"topics":["accessing-plcs","allen-bradley","c-sharp","dotnet-core","dotnetcore","ethernet","libplctag","library","libtagplc","libtagplc-library","linux","nuget-package","plc","plc-access","protocol","rockwell","tag","windows"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Corsinvest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-17T08:07:46.000Z","updated_at":"2024-12-09T06:42:41.000Z","dependencies_parsed_at":"2022-09-16T16:13:33.320Z","dependency_job_id":null,"html_url":"https://github.com/Corsinvest/cv4ab-api-dotnet","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Corsinvest%2Fcv4ab-api-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Corsinvest%2Fcv4ab-api-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Corsinvest%2Fcv4ab-api-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Corsinvest%2Fcv4ab-api-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Corsinvest","download_url":"https://codeload.github.com/Corsinvest/cv4ab-api-dotnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248512501,"owners_count":21116614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["accessing-plcs","allen-bradley","c-sharp","dotnet-core","dotnetcore","ethernet","libplctag","library","libtagplc","libtagplc-library","linux","nuget-package","plc","plc-access","protocol","rockwell","tag","windows"],"created_at":"2024-09-24T19:41:24.334Z","updated_at":"2025-04-12T03:31:01.707Z","avatar_url":"https://github.com/Corsinvest.png","language":"C#","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=PPM9JHLQLRV2S\u0026item_name=Open+Source+Project\u0026currency_code=EUR\u0026source=url"],"categories":[],"sub_categories":[],"readme":"# Corsinvest.AllenBradley.PLC.Api\n\n[![License](https://img.shields.io/github/license/Corsinvest/cv4ab-api-dotnet.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) ![Nuget](https://img.shields.io/nuget/v/Corsinvest.AllenBradley.PLC.Api.svg) [![AppVeyor branch](https://img.shields.io/appveyor/ci/franklupo/cv4ab-api-dotnet/master.svg)](https://ci.appveyor.com/project/franklupo/cv4ab-api-dotnet) [![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=PPM9JHLQLRV2S\u0026item_name=Open+Source+Project\u0026currency_code=EUR\u0026source=url)\n\nComunication for Allen-Bradley Rockwell PLC in .NET Core\n\n[LibPLCTag library C++ Api](https://github.com/kyle-github/libplctag)\n\n[Based on libplctag-csharp](https://github.com/mesta1/libplctag-csharp)\n\n[Nuget](https://www.nuget.org/packages/Corsinvest.AllenBradley.PLC.Api)\n\n[Special thanks for testing Mavert](https://www.mavert.it)\n\nSpecial thanks to Mario Averoldi for technical support \u003cmario.averoldi@mavert.it\u003e.\n\n[Corsinvest Srl](https://www.corsinvest.it)\n\n```text\n   ______                _                      __\n  / ____/___  __________(_)___ _   _____  _____/ /_\n / /   / __ \\/ ___/ ___/ / __ \\ | / / _ \\/ ___/ __/\n/ /___/ /_/ / /  (__  ) / / / / |/ /  __(__  ) /_\n\\____/\\____/_/  /____/_/_/ /_/|___/\\___/____/\\__/\n\nClient Api Allen-Bradley PLC          (Made in Italy)\n```\n\n## WARNING - DISCLAIMER\n\nNote: *PLCs control many kinds of equipment and loss of property, production\nor even life can happen if mistakes in programming or access are\nmade.  Always use caution when accessing or programming PLCs!*\n\nWe make no claims or warrants about the suitability of this code for\nany purpose.\n\nBe careful!\n\n## General\n\nThe client is wrapper of [LibPLCTag](https://github.com/kyle-github/libplctag) library.\n\n## Main features\n\n- Open source\n- Controller implementation\n- Native Tag type INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT32, FLOAT64, STRING\n- Custom class definition structure\n- Manipulation local value variable\n- Read and Write with advanced result\n  - Time execution\n  - Status code\n  - Timestamp\n  - Tag\n- Value property decode value natively\n- Lock/Unlock for thread operation\n- Decode Error **StatusCodeOperation.DecodeError()**\n- Group interval read/write\n- Event result Tag and TagGroup with result changed value\n- Enable \"Fail Operation Raise Exception\" (default: false)\n- Value Manager directly modify\n- Bit manipulation\n- Debug level\n- Auto Read/Write when using value (default: false)\n- Native support 32/64 bit for Windows/Linux\n\n## Usage\n\n```CSharp\n[Serializable]\npublic class Test12\n{\n    public int AA1 { get; set; }\n    public int AA2 { get; set; }\n    public int AA3 { get; set; }\n    public int AA4 { get; set; }\n    public int AA5 { get; set; }\n    public int AA6 { get; set; }\n    public int AA7 { get; set; }\n    public int AA8 { get; set; }\n}\n\npublic static void Main(string[] args)\n{\n    //initialize controller\n    using (var controller = new Controller(\"10.155.128.192\", \"1, 0\", CPUType.LGX))\n    {\n        //ping controller\n        Console.Out.WriteLine(\"Ping \" + controller.Ping(true));\n\n        //create group tag\n        var grp = controller.CreateGroup();\n\n        //add tag\n        var tag = grp.CreateTagType\u003cstring[]\u003e(\"Track\", TagSize.STRING, 300);\n        tag.Changed += TagChanged;\n        var value = tag.Read();\n\n        //add tag from Class\n        var tag1 = grp.CreateTagType\u003cTest12\u003e(\"Test\");\n        tag.Changed += TagChanged;\n\n        var tag2 = grp.CreateTagFloat32(\"Fl32\");\n\n        grp.Changed += GroupChanged;\n        grp.Read();\n\n    }\n}\n\nprivate static void PrintChange(string @event, ResultOperation result)\n{\n  Console.Out.WriteLine($\"{@event} {result.Timestamp} Changed: {result.Tag.Name}\");\n}\n\nstatic void TagChanged(ResultOperation result)\n{\n  PrintChange(\"TagChanged\", result);\n}\n\nstatic void GroupChanged(IEnumerable\u003cResultOperation\u003e results)\n{\n  foreach (var result in results) PrintChange(\"GroupTagChanged\", result);\n}\n```\n\n## Create Tag\n\nIt is possible to create a tag of any type:\n\n- CreateTagInt64\n- CreateTagUInt64\n- CreateTagInt32\n- CreateTagUInt32\n- CreateTagInt16\n- CreateTagUInt16\n- CreateTagInt8\n- CreateTagUInt8\n- CreateTagString\n- CreateTagFloat32\n- CreateTagFloat64\n- CreateTagType specify type and name only, and automatically calculated size from property or array\n- CreateTagType specify name,size,length for array\n- CreateTagArray\n\nSizes are specified in [TagSize](https://github.com/Corsinvest/cv4ab-api-dotnet/blob/master/src/Corsinvest.AllenBradley.PLC.Api/TagSize.cs).\n\nFor arrays specify the size in the definition.\n\nExample:\n\n```CSharp\npublic class TestArray\n{\n  public int InTest { get; set; }\n  public int[] InTestArray { get; set; } = new int[5];\n  public string[] StringTestArray { get; set; } = new string[300];\n}\n```\n\nCustom types are classes. The properties are read sequentially.\n\n[![paypal](https://www.paypalobjects.com/en_US/IT/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=PPM9JHLQLRV2S\u0026item_name=Open+Source+Project\u0026currency_code=EUR\u0026source=url)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorsinvest%2Fcv4ab-api-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorsinvest%2Fcv4ab-api-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorsinvest%2Fcv4ab-api-dotnet/lists"}