{"id":34142751,"url":"https://github.com/danomagnum/gologix","last_synced_at":"2026-05-22T06:03:55.380Z","repository":{"id":64824118,"uuid":"564938645","full_name":"danomagnum/gologix","owner":"danomagnum","description":"Ethernet/IP client library for Go inspired by pylogix that aims to be easy to use.  Supports being a client and a class 3 / class 1 server.","archived":false,"fork":false,"pushed_at":"2026-03-21T04:04:12.000Z","size":8656,"stargazers_count":64,"open_issues_count":3,"forks_count":26,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-03-21T20:00:26.746Z","etag":null,"topics":["allen-bradley","automation","cip","commonindustrialprotocol","compactlogix","controllogix","ethernet-ip","ethernetindustrialprotocol","go","golang","plc","rockwell","rockwell-automation"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danomagnum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.MD","code_of_conduct":null,"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}},"created_at":"2022-11-11T21:37:09.000Z","updated_at":"2026-03-21T04:03:09.000Z","dependencies_parsed_at":"2023-10-25T18:44:23.225Z","dependency_job_id":"14a76c91-6370-4b5f-87e4-a94795c76266","html_url":"https://github.com/danomagnum/gologix","commit_stats":{"total_commits":281,"total_committers":3,"mean_commits":93.66666666666667,"dds":0.395017793594306,"last_synced_commit":"4e70da924cbe58369b56a223119533b95a5618df"},"previous_names":[],"tags_count":58,"template":false,"template_full_name":null,"purl":"pkg:github/danomagnum/gologix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danomagnum%2Fgologix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danomagnum%2Fgologix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danomagnum%2Fgologix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danomagnum%2Fgologix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danomagnum","download_url":"https://codeload.github.com/danomagnum/gologix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danomagnum%2Fgologix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31308732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["allen-bradley","automation","cip","commonindustrialprotocol","compactlogix","controllogix","ethernet-ip","ethernetindustrialprotocol","go","golang","plc","rockwell","rockwell-automation"],"created_at":"2025-12-15T03:09:03.132Z","updated_at":"2026-04-02T15:12:30.765Z","avatar_url":"https://github.com/danomagnum.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gologix\n\ngologix is a communication driver written in native Go that lets you easily read/write values from tags in Rockwell Automation ControlLogix and CompactLogix PLCs over Ethernet/IP using Go. PLCs that use CIP over Ethernet/IP are supported (ControlLogix, CompactLogix, Micro820). Models like PLC5, SLC, and MicroLogix that use PCCC instead of CIP are *not* supported.\n\nIt is modeled after pylogix with changes to make it usable in Go with a goal of being similar in usage patterns to modules of the go standard library.\n\n### Client\n\nThe `client` lets you read and write tag data to a logix PLC.  \n\nYou can read/write single tags (atomic or UDT) with `Read` by providing a pointer to the equivalent go type and it will populate the data similar to the json library. You can also read multiple tags at once with `ReadMulti`, `ReadList`, and `ReadMap`.  You can likewise write with `Write`, `WritMulti`, and `WriteMap`.  If you don't know what tag you want, you can list all the tags in a controller with `ListAllTags` or programs with `ListAllPrograms`.  To do a custom message you can use `GenericCIPMessage`.  There are also a couple other features for advanced use.\n\nThere are examples for all these methods in the `examples`, `tests`, and `canned` folders. Here is an abridged version of the `/examples/SimpleRead` example. See the actual example for a more thorough description of what is going on.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"github.com/danomagnum/gologix\"\n)\n\nfunc main() {\n\tclient := gologix.NewClient(\"192.168.2.241\")\n\terr := client.Connect()\n\tif err != nil {\n\t\tlog.Printf(\"Error opening client: %v\", err)\n\t\treturn\n\t}\n\tdefer client.Disconnect()\n\n\tvar tag1 int16\n\terr = client.Read(\"testint\", \u0026tag1)\n\tif err != nil {\n\t\tlog.Printf(\"Error reading testint: %v\", err)\n\t\treturn\n\t}\n\tlog.Printf(\"tag1 has value %d\", tag1)\n}\n```\n\n### Server\n\nThe `Server` type lets you receive MSG instructions from the controller. or behave as an IO adapter.\n\nThere are a few examples in the `examples` folder. Here is an abridged version of the `/examples/Server_Class3` example. See the actual example(s) for a more thorough description of what is going on. Basically, it listens to incoming MSG instructions doing CIP Data Table Writes and CIP Data Table Reads and maps the data to/from an internal Go map. You can then access the data through that map as long as you acquire the lock on it.\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\t\"time\"\n\t\"github.com/danomagnum/gologix\"\n)\n\nfunc main() {\n\tr := gologix.PathRouter{}\n\n\tp1 := gologix.MapTagProvider{}\n\tpath1, err := gologix.ParsePath(\"1,0\")\n\tif err != nil {\n\t\tlog.Printf(\"Problem parsing path: %v\", err)\n\t\tos.Exit(1)\n\t}\n\tr.AddHandler(path1.Bytes(), \u0026p1)\n\n\ts := gologix.NewServer(\u0026r)\n\tgo s.Serve()\n\n\tt := time.NewTicker(time.Second * 5)\n\tfor {\n\t\t\u003c-t.C\n\t\tp1.Mutex.Lock()\n\t\tlog.Printf(\"Data 1: %v\", p1.Data)\n\t\tp1.Mutex.Unlock()\n\t}\n}\n```\n\n### Canned Functions\n\nThere is a `canned` package that can be used for common features such as reading controller fault codes or the status of forces. Look at the `/examples/Canned` directory to see how to use these. You can also use the code in `/canned/` as good examples of how to do particular things. Pull requests for extensions to the `canned` package are welcome (as are all pull requests).\n\n### L5X File Support\n\nThe `l5x` package provides support for working with RSLogix5000 L5X export files. This allows you to parse project files exported from Studio 5000 to extract tag information, UDT definitions, and program structure without needing a live connection to the PLC.\n\n\n## License\n\nThis project is licensed under the MIT license.\n\n## Acknowledgements\n\n- pylogix\n- go-ethernet-ip\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanomagnum%2Fgologix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanomagnum%2Fgologix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanomagnum%2Fgologix/lists"}