{"id":48923450,"url":"https://github.com/simatic-ax/ae-counter-tiax","last_synced_at":"2026-04-17T05:35:00.151Z","repository":{"id":346168172,"uuid":"926681034","full_name":"simatic-ax/ae-counter-tiax","owner":"simatic-ax","description":"Application Example: Simple counter library utilizing \"TIAX library\"","archived":false,"fork":false,"pushed_at":"2026-03-22T15:31:49.000Z","size":446,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-23T06:42:37.202Z","etag":null,"topics":["application-example","iec-st","siemens","simatic-ax"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simatic-ax.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":"CODEOWNERS","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":"2025-02-03T17:22:27.000Z","updated_at":"2026-03-04T09:39:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/simatic-ax/ae-counter-tiax","commit_stats":null,"previous_names":["simatic-ax/ae-counter-tiax"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/simatic-ax/ae-counter-tiax","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simatic-ax%2Fae-counter-tiax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simatic-ax%2Fae-counter-tiax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simatic-ax%2Fae-counter-tiax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simatic-ax%2Fae-counter-tiax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simatic-ax","download_url":"https://codeload.github.com/simatic-ax/ae-counter-tiax/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simatic-ax%2Fae-counter-tiax/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31917099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","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":["application-example","iec-st","siemens","simatic-ax"],"created_at":"2026-04-17T05:34:59.097Z","updated_at":"2026-04-17T05:35:00.131Z","avatar_url":"https://github.com/simatic-ax.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example Library for Demonstrating the \"TIAX - Library\" Use Case\n\n## Description\n\nThis simple sample library provides functionalities to determine the parking space occupancy of a car park. The project is specifically designed for a use case in TIA Portal, leveraging the \"TIAX\" workflow.\n\n![CarPark](docs/img/CarPark.png)\n\n## Understanding the \"TIAX - Library\" Workflow\n\nThe \"TIAX - library\" use case involves creating a library (of type \"lib\") within SIMATIC AX and then exporting its contents to a TIA Portal Global Library. This allows for later reuse within TIA Portal. The TIA Portal Global Library will retain the \"typed\" nature of your FCs, FBs, Classes, and so on, enabling you to utilize all TIA Portal's library features, including central updates across your projects.\n\n## Creating Your Project from This Template\n\nPlease use a CLI terminal for the following steps:\n\n1.  Log in to SIMATIC AX:\n\n    ```sh\n    apax login\n    ```\n\n2.  Log in to GitHub:\n\n    ```sh\n    apax login --registry \"https://npm.pkg.github.com/\" --password YOUR-GH-ACCESS-TOKEN\n    ```\n    `YOUR-GH-ACCESS-TOKEN` can be created in your GitHub account settings.\n\n3.  Navigate to your desired project path\n\n4.  Create a new project based on this application-example template.\n\n    ```sh\n    apax create @simatic-ax/ae-counter-tiax --registry https://npm.pkg.github.com ae-counter-tiax\n    ```\n\n## Software Blocks\n\n### Counter\n\nA generic `Counter` class designed for counting both upwards and downwards.\n\n### ParkingCounter\n\nThe `ParkingCounter` class calculates the filling level (occupancy) of the car park based on a sequence of sensor signals.\n\nThis class utilizes two input sensors:\n*   `BSensorInside`\n*   `BSensorOutside`\n\nThe counter value will be incremented or decremented depending on the order in which these signals are activated.\n\nExample for entering the car park:\nIf `SensorOutside` is activated first, followed by `SensorInside`, the counter will be increased by one.\n\n### ParkingCounterFB\n\nA TIA Portal compatible `ParkingCounterFB` that acts as a wrapper function block. It internally uses the `ParkingCounter` class.\n\n## Steps to Create the TIA Portal Global Library\n\n1.  Open the project in AX-Code.\n\n2.  Install project dependencies.\n    \n    Use the AX Code CLI terminal.\n\n    ```sh\n    apax install\n    ```\n\n3.  Adjust the TIA Portal install path\n\n    Modify the `TIA_INSTALL_PATH` variable within your `apax.yml` file to match your TIA Portal installation and version.\n\n    ```yaml\n    TIA_INSTALL_PATH: \"C:\\\\Program Files\\\\Siemens\\\\Automation\\\\Portal V20\"\n    ```\n\n4.  Create the TIA Portal Library:\n\n    ```sh\n    apax create-tialib\n    ```\n\n    The Global Library will be saved in the `./TIAPortalLibrary` directory.\n\n5.  Create or open an existing TIA Portal project.\n\n6.  Open the Global Library in TIA Portal.\n\n7.  Call the `ParkingCounterWrapper` block in your application.\n\n    ![TIA](docs/img/TiapUsage.png)\n\n## Contribution\n\nThank you for your interest in contributing! We welcome your feedback. Please feel free to report bugs, suggest improvements, clarify documentation, and highlight any other issues regarding this repository in the \"Issues\" section. Even better, we encourage you to propose changes to this repository using \"Merge Requests.\" Our designated CODEOWNERS will review and address them.\n\nHappy coding!\n\n🐱‍💻 BEEP, BOOP, BEEP, BEEP, BOOP 🐱‍🏍","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimatic-ax%2Fae-counter-tiax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimatic-ax%2Fae-counter-tiax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimatic-ax%2Fae-counter-tiax/lists"}