{"id":26208664,"url":"https://github.com/seg6/slmp","last_synced_at":"2025-04-15T12:01:29.233Z","repository":{"id":55072045,"uuid":"520075155","full_name":"seg6/SLMP","owner":"seg6","description":"SLMP Client Library for C#","archived":false,"fork":false,"pushed_at":"2024-10-03T23:23:24.000Z","size":18,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T11:03:26.868Z","etag":null,"topics":["got","hmi","mitsubishi","plc","slmp"],"latest_commit_sha":null,"homepage":"","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/seg6.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-01T11:05:15.000Z","updated_at":"2025-03-18T03:03:13.000Z","dependencies_parsed_at":"2024-11-11T22:31:35.902Z","dependency_job_id":"07e024bf-bb9d-45de-8f00-c22498ecd0d5","html_url":"https://github.com/seg6/SLMP","commit_stats":null,"previous_names":["nullptropy/slmp","heaptr/slmp","seg6/slmp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seg6%2FSLMP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seg6%2FSLMP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seg6%2FSLMP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seg6%2FSLMP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seg6","download_url":"https://codeload.github.com/seg6/SLMP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249067779,"owners_count":21207395,"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":["got","hmi","mitsubishi","plc","slmp"],"created_at":"2025-03-12T06:29:33.882Z","updated_at":"2025-04-15T12:01:29.209Z","avatar_url":"https://github.com/seg6.png","language":"C#","funding_links":["https://www.buymeacoffee.com/brkp"],"categories":[],"sub_categories":[],"readme":"# SLMP\nSLMP is a protocol used for access from an external device to an SLMP-compatible device through the Ethernet. SLMP communications are available among devices that can transfer messages by SLMP. (personal computers, human machine interface and others.)\n\nThis project implements a client library that supports a subset of the functionality described in the [SLMP reference manual](https://www.allied-automation.com/wp-content/uploads/2015/02/MITSUBISHI_manual_plc_iq-r_slmp.pdf), mainly regarding reading from and writing to `Device`s.\n\n# Examples\n\nCurrently supported devices:\n- D, W, R, Z, ZR, SD\n- X, Y, M, L, F, V, B, SM \n\nKeep in mind that some of these devices might not be available for use on your targeted SLMP-compatible device.\n\n### Connecting to and Disconnecting from an SLMP Server\n```C#\nSlmpConfig cfg = new SlmpConfig(\"192.168.3.39\", 6000) {\n    ConnTimeout = 1000,\n    RecvTimeout = 1000,\n    SendTimeout = 1000,\n};\nSlmpClient plc = new SlmpClient(cfg);\n\nplc.Connect();\nplc.Disconnect();\n```\n\n### Reading from/writing into device registers\nThere are a couple of ways to describe a read/write operation, you can either describe the target device with a string, e.g, `\"D200\", \"M200\", \"SD0\"` or directly with the `Device` enum. See the method prototypes below to get an idea of how the API operates.\n\n```C#\nbool ReadBitDevice(string addr)\nbool ReadBitDevice(Device device, ushort addr)\nbool[] ReadBitDevice(string addr, ushort count)\nbool[] ReadBitDevice(Device device, ushort addr, ushort count)\n\nushort ReadWordDevice(string addr)\nushort ReadWordDevice(Device device, ushort addr)\nushort[] ReadWordDevice(string addr, ushort count)\nushort[] ReadWordDevice(Device device, ushort addr, ushort count)\n\nstring ReadString(string addr, ushort len)\nstring ReadString(Device device, ushort addr, ushort len)\n\nvoid WriteBitDevice(string addr, bool data)\nvoid WriteBitDevice(string addr, bool[] data)\nvoid WriteBitDevice(Device device, ushort addr, bool data)\nvoid WriteBitDevice(Device device, ushort addr, bool[] data)\n\nvoid WriteWordDevice(string addr, ushort data)\nvoid WriteWordDevice(string addr, ushort[] data)\nvoid WriteWordDevice(Device device, ushort addr, ushort data)\nvoid WriteWordDevice(Device device, ushort addr, ushort[] data)\n\nvoid WriteString(string addr, string text)\nvoid WriteString(Device device, ushort addr, string text)\n```\n\n### Reading structures\n```C#\npublic struct ExampleStruct {\n    public bool boolean_word;              // 2 bytes, 1 word\n    public int signed_double_word;         // 4 bytes, 2 words\n    public uint unsigned_double_word;      // 4 bytes, 2 words\n    public short short_signed_word;        // 2 bytes, 1 word\n    public ushort ushort_unsigned_word;    // 2 bytes, 1 word\n    [SlmpString(length = 6)]\n    public string even_length_string;      // 6 bytes, 3 words (there's an extra 0x0000 right after the string in the plc memory)\n    [SlmpString(length = 5)]\n    public string odd_length_string;       // 5 bytes, 3 words (upper byte of the 3rd word is 0x00)\n}\n\nplc.ReadStruct\u003cExampleStruct\u003e(\"D200\");\n// or\nplc.ReadStruct\u003cExampleStruct\u003e(Device.D, 200);\n```\n\n## Funding\nIf you like this project and/or it's in any way useful to you, and you'd like to buy me a coffee, you can do it so from the link below!  \n\n\u003ca href=\"https://www.buymeacoffee.com/brkp\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-green.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseg6%2Fslmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseg6%2Fslmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseg6%2Fslmp/lists"}