{"id":16573441,"url":"https://github.com/roald87/tcerror","last_synced_at":"2026-03-09T13:36:24.612Z","repository":{"id":41288140,"uuid":"508956079","full_name":"Roald87/TcError","owner":"Roald87","description":"Translate TwinCAT error codes","archived":false,"fork":false,"pushed_at":"2024-07-16T10:04:33.000Z","size":2872,"stargazers_count":28,"open_issues_count":3,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-16T03:50:25.274Z","etag":null,"topics":["beckhoff","beckhoff-twincat","beckhoff-twincat-plc","industrial-automation","twincat","twincat-ads","twincat3"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/Roald87.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"roald87","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-06-30T06:13:23.000Z","updated_at":"2024-10-28T23:55:45.000Z","dependencies_parsed_at":"2024-07-16T10:56:12.621Z","dependency_job_id":"c5131859-d0b3-4a65-8b40-e14f3e989b38","html_url":"https://github.com/Roald87/TcError","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roald87%2FTcError","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roald87%2FTcError/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roald87%2FTcError/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roald87%2FTcError/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Roald87","download_url":"https://codeload.github.com/Roald87/TcError/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242049057,"owners_count":20063503,"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":["beckhoff","beckhoff-twincat","beckhoff-twincat-plc","industrial-automation","twincat","twincat-ads","twincat3"],"created_at":"2024-10-11T21:42:11.712Z","updated_at":"2026-03-09T13:36:24.509Z","avatar_url":"https://github.com/Roald87.png","language":"HTML","funding_links":["https://ko-fi.com/roald87"],"categories":[],"sub_categories":[],"readme":"# TcError\n\nFunctions and datatypes which describe TwinCAT errors.\n\n## Installation\n\n[Download](https://github.com/Roald87/TcError/releases) from the releases page, or install via [📦 Twinpack](https://github.com/Zeugwerk/Twinpack).\n\n## Example\n\nCan be used to wrap existing TwinCAT Function Blocks to add clear error codes and messages.\n\n![](example.png)\n\n### Code\n\n```\nFUNCTION_BLOCK FB_CoeReaderEx EXTENDS FB_EcCoESdoReadEx\nVAR_OUTPUT\n    eAdsError : TcError.AdsErrorCodes;\nEND_VAR\nVAR\n    errorDescription : Tc2_System.T_MaxString;\nEND_VAR\n\nSUPER^();\neAdsError := TcError.ToAdsErrorCode(SUPER^.nErrId);\nerrorDescription := TcError.AdsErrorCodeDescription(eAdsError);\n```\n\n## Manual\n\n### ADS errors\n\n- `TYPE AdsErrorCodes` : Enum containing all ADS error codes.\n- `FUNCTION ToAdsErrorCode`: Convert an ADS error code of type `UDINT` to the `AdsErrorCodes` datatype.\n- `FUNCTION AdsErrorCodeDescription`: Returns an description of the error from the `AdsErrorCodes` datatype.\n\n#### Example\n\n```\nPROGRAM MAIN\nVAR\n\tadsErrorId : UDINT := 1802;\n\tadsErrorCode : AdsErrorCodes;\n\terrorDescription : T_MaxString;\nEND_VAR\n\nadsErrorCode := TcError.ToAdsErrorCode(adsErrorId); // ADSERR_DEVICE_NOMEMORY;\nerrorDescription := TcError.AdsErrorCodeDescription(adsErrorCode); // 'Insufficient memory.'\n```\n\n### Win32 errors\n\n- `TYPE Win32ErrorCodes` : Enum containing all Win32 error codes.\n- `FUNCTION ToWin32ErrorCode`: Convert an Win32 error code of type `UDINT` to the `Win32ErrorCodes` datatype.\n- `FUNCTION Win32ErrorCodeDescription`: Returns an description of the error from the `Win32ErrorCodes` datatype.\n\n#### Example\n\n```\nPROGRAM MAIN\nVAR\n\twin32ErrorId : UDINT := 82;\n\twin32ErrorCode : Win32ErrorCodes;\n\terrorDescription : T_MaxString;\nEND_VAR\n\nwin32ErrorCode := TcError.ToWin32ErrorCode(win32ErrorId); // ERROR_CANNOT_MAKE;\nerrorDescription := TcError.Win32ErrorCodeDescription(win32ErrorCode); // 'The directory or file cannot be created.'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froald87%2Ftcerror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froald87%2Ftcerror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froald87%2Ftcerror/lists"}