{"id":19610463,"url":"https://github.com/valiot/abex","last_synced_at":"2025-10-11T00:41:46.919Z","repository":{"id":41812380,"uuid":"216967966","full_name":"valiot/abex","owner":"valiot","description":"An Elixir wrapper of libplctag library for accessing Allen-Bradley PLC data over Ethernet. ","archived":false,"fork":false,"pushed_at":"2023-04-07T02:21:57.000Z","size":61,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-27T01:24:11.198Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/valiot.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":"2019-10-23T04:29:35.000Z","updated_at":"2025-04-06T20:09:47.000Z","dependencies_parsed_at":"2022-07-14T16:48:01.030Z","dependency_job_id":null,"html_url":"https://github.com/valiot/abex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/valiot/abex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiot%2Fabex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiot%2Fabex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiot%2Fabex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiot%2Fabex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valiot","download_url":"https://codeload.github.com/valiot/abex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiot%2Fabex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005650,"owners_count":26083942,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"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":[],"created_at":"2024-11-11T10:29:27.950Z","updated_at":"2025-10-11T00:41:46.881Z","avatar_url":"https://github.com/valiot.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/valiot/abex/master/assets/images/abex-logo.png\" alt=\"abex Logo\" width=\"512\" height=\"151\" /\u003e\n\u003c/div\u003e\n\n***\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/valiot/abex/master/assets/images/valiot-logo-blue.png\" alt=\"Valiot Logo\" width=\"384\" height=\"80\" /\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n## Usage\n\nABex is a GenServer-based implementation to expose tags and can be summarized by:\n\n1. Start a Tag process use `start_link/1`.\n\n    The following options are available:\n    - `ip` - IP PLC address (string).\n    - `path` - The path to the device containing the named data (string).\n    - `cpu` - AB CPU models (string): plc,plc5,slc,slc500,micrologix,mlgx,compactlogix,clgx,lgx,controllogix,contrologix,flexlogix,flgx.\n\n1. Send requests `get_all_tags/1`, `read/2`, `write/2`.\n\n### Get Tags paths.\n\nTo get all available tags use `get_all_tags/1`.\n\n```elixir\niex\u003e {:ok, tag_pid} = ABex.Tag.start_link(ip: \"20.0.0.70\", cpu: \"lgx\", path: \"1,0\")\niex\u003e {:ok, tag_list} = ABex.Tag.get_all_tags(tag_pid)\n```\n\n### Read tag data\n\nUse `read/2`. The following options are available:\n    - `data_type` - Expected data type (string).\n    - `elem_size` - Expected data type size in bytes (integer).\n    - `elem_count` - Number of items to request (integer).\n    - `name` - Tag's name (string).\n\n```elixir\niex\u003e {:ok, tag_pid} = ABex.Tag.start_link(ip: \"20.0.0.70\", cpu: \"lgx\", path: \"1,0\")\niex\u003e {:ok, values} = ABex.Tag.read(tag_pid, name: \"Some_tag\", elem_size: 8, elem_count: 1, data_type: \"uint8\")\n```\n\n### Write a value to a tag\n\nUse `write/2`. The following options are available:\n    - `data_type` - Expected data type (string).\n    - `elem_size` - Expected data type size in bytes (integer).\n    - `elem_count` - Number of items to request (integer).\n    - `name` - Tag's name (string).\n    - `value` - Value to be written on the tag.\n\n```elixir\niex\u003e {:ok, tag_pid} = ABex.Tag.start_link(ip: \"20.0.0.70\", cpu: \"lgx\", path: \"1,0\")\niex\u003e :ok = ABex.Tag.read(tag_pid, name: \"Some_tag\", elem_size: 8, elem_count: 1, data_type: \"uint8\", value: 103)\n```\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `abex` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:abex, \"~\u003e 0.1.1\"},\n    # the current elixir-cmake (0.1.0) hex package is not compatible.\n    {:elixir_cmake, github: \"valiot/elixir-cmake\", override: true}\n  ]\nend\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at [https://hexdocs.pm/abex](https://hexdocs.pm/abex).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaliot%2Fabex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaliot%2Fabex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaliot%2Fabex/lists"}