{"id":18382430,"url":"https://github.com/ntd/ethercatest","last_synced_at":"2025-08-22T07:44:10.088Z","repository":{"id":50529330,"uuid":"341946224","full_name":"ntd/ethercatest","owner":"ntd","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-29T20:53:56.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T22:54:58.667Z","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":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ntd.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":"2021-02-24T15:33:11.000Z","updated_at":"2022-07-29T08:31:25.000Z","dependencies_parsed_at":"2022-09-22T15:40:56.044Z","dependency_job_id":null,"html_url":"https://github.com/ntd/ethercatest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ntd/ethercatest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntd%2Fethercatest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntd%2Fethercatest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntd%2Fethercatest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntd%2Fethercatest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ntd","download_url":"https://codeload.github.com/ntd/ethercatest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntd%2Fethercatest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271606312,"owners_count":24788970,"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-08-22T02:00:08.480Z","response_time":65,"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-06T01:05:38.669Z","updated_at":"2025-08-22T07:44:10.050Z","avatar_url":"https://github.com/ntd.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is basically a rewrite of the `simple_test` program included in\nthe SOEM project, meant to highlight the differences between\n[SOEM](https://github.com/OpenEtherCATSociety/SOEM) and\n[IgH-EtherCAT](https://etherlab.org/en/ethercat/).\n\nMajor differences from `simple_test`:\n* this is a self contained project;\n* the threaded code has been removed;\n* the SOEM version uses the new APIs intead of the legacy ones;\n* by default it updates (every 5000 us, customizable in the arguments)\n  a binary counter on the first 8 digital outputs; if you explicitely\n  set the period to `0`, it measures the roundtrip performances.\n\nTwo implementations are provided: `ethercatest-soem`, based on SOEM,\nand `ethercatest-igh`, based on the IgH-EtherCAT software stack.\n\n# Performances\n\nThe two projects are really different.\n\nSOEM is basically a userspace library. It is really easy use: you\njust need to link your application to it (statically, by default)\nand you are ready to go. Thr program tries to guess the Ethernet\ndevice to use but you can override its logic by passing it as\nfirst argument. To be able to access the raw Ethernet device, the\nSOEM program must be run as root.\n\nThe IgH EtherCAT stack instead is much more complex. A couple of\nkernel modules must be configured and loaded before: `ec_master`\nand an EtherCAT device. In these tests, the generic EtherCAT device\n(`ec_generic`) was used. Furthermore, the application must be linked\nto a userspace library. The user running the program must be able\nto access the EtherCAT device created by the IgH modules, typically\n`/dev/EtherCAT0`. This is usually owned by root but, by leveraging\nthe `udev` infrastructure, you can change ownership and mode to be\nable to access it from a normal user.\n\nThe master hardware is a consumer PC with an i7-7700T CPU at 2.90 GHz.\nThe NIC interface is an e1000e Intel-based one operating at 100 MBit/s.\nA quite recent linux kernel (5.11.2) was used.\n\nThe PC is connected with a 2 m category 5 UTP cable to a Beckhoff node\nwith three slaves: one EK1100, one EL1809 and one EL2808.\n\n## SOEM results\n\nThese are the results of `ethercatest-soem 0` on an idle system:\n\n    Roundtrip time (usec): min 104  max 599\n\nOutput on the same system while building a project in another console:\n\n    Roundtrip time (usec): min 76  max 7372\n\n    # Using `sudo nice -n20 ethercatest-soem 0`\n    Roundtrip time (usec): min 77  max 39758\n\n    # Using `sudo nice -n-20 ethercatest-soem 0`\n    Roundtrip time (usec): min 76  max 3031\n\nThe performances are not stable, meaning that subsequent calls can\ngive quite different results, e.g.:\n\n    Roundtrip time (usec): min 101  max 661\n    Roundtrip time (usec): min 97  max 680\n    Roundtrip time (usec): min 93  max 698\n    Roundtrip time (usec): min 78  max 729\n    Roundtrip time (usec): min 190  max 731\n    Roundtrip time (usec): min 169  max 590\n\n## igh-ethercat results\n\nThese are the results of `ethercatest-igh 0` on an idle system:\n\n    Roundtrip time (usec): min 190  max 350\n\nOutput on the same system while building a project in another console:\n\n    Roundtrip time (usec): min 127  max 398\n    Roundtrip time (usec): min 122  max 405\n    Roundtrip time (usec): min 148  max 353\n    Roundtrip time (usec): min 121  max 382\n\nIn this case the performances are **much** more consistent and stable.\nBy using a dedicated driver instead of `ec_generic` the results would\nlikely be lower. The problem is the dedicated drivers must be kept in\nsync with the kernel, and this could become a maintenance nightmare.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntd%2Fethercatest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntd%2Fethercatest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntd%2Fethercatest/lists"}