{"id":23726475,"url":"https://github.com/Dalageo/twincat-virtual-tram","last_synced_at":"2026-02-16T06:30:16.557Z","repository":{"id":267487460,"uuid":"822218185","full_name":"Dalageo/TwinCAT-VirtualTram","owner":"Dalageo","description":"Designing and Simulating an Automated Tram Control System Using TwinCAT PLC Programming 🚝","archived":false,"fork":false,"pushed_at":"2024-12-10T15:37:57.000Z","size":28323,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-31T00:33:11.436Z","etag":null,"topics":["automation","iec61131-3","plc-programming","simulation","transportation","twincat","twincat3","virtual-tram"],"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/Dalageo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-30T15:59:02.000Z","updated_at":"2024-12-19T15:42:13.000Z","dependencies_parsed_at":"2024-12-10T17:32:51.826Z","dependency_job_id":null,"html_url":"https://github.com/Dalageo/TwinCAT-VirtualTram","commit_stats":null,"previous_names":["dalageo/twincat-virtualtram"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dalageo%2FTwinCAT-VirtualTram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dalageo%2FTwinCAT-VirtualTram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dalageo%2FTwinCAT-VirtualTram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dalageo%2FTwinCAT-VirtualTram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dalageo","download_url":"https://codeload.github.com/Dalageo/TwinCAT-VirtualTram/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239824980,"owners_count":19703199,"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":["automation","iec61131-3","plc-programming","simulation","transportation","twincat","twincat3","virtual-tram"],"created_at":"2024-12-31T00:31:30.270Z","updated_at":"2026-02-16T06:30:16.499Z","avatar_url":"https://github.com/Dalageo.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"left\"\u003e\n  \u003cimg src=\"https://github.com/Dalageo/TwinCAT-VirtualAGV/assets/153513781/498163f4-35a1-45b9-a442-9889c5e9966e\" alt=\"Bechoff TwinCat\" width=\"700\"/\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"left\"\u003e\n  \u003ca href=\"https://www.beckhoff.com/en-en/products/automation/twincat/\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/TwinCAT-3.1.4024.55-blue\" alt=\"TwinCAT 3.1.4024.55\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Dalageo/TwinCAT-VirtualTram/blob/main/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey\" alt=\"License: CC BY-NC-SA 4.0\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/Dalageo/TwinCAT-VirtualTram?style=social\" alt=\"GitHub stars\"\u003e\n\u003c/div\u003e\n\n# Designing and Simulating an Automated Tram Control System Using TwinCAT PLC Programming 🚝\n\nThis repository contains a simulation project for an Automated Tram System, developed within the \u003ca href=\"https://www.beckhoff.com/en-en/products/automation/twincat/\"\u003e TwinCAT \u003c/a\u003e environment as part of a master's course assignment \u003ca href=\"https://www.hv.se/en/\"\u003eUniversity West\u003c/a\u003e. The assignment involves developing a Human-Machine Interface (HMI) and a virtual process with visualization to control a tram navigating between two stations along a predefined track.\nThe designed system allows for both manual and automatic operation of the tram, ensuring it can handle passenger boarding and alighting with safety and efficiency. It includes the following functionalities:\n\n- **Manual Mode Activation**: The tram can be driven manually in any direction without restrictions by the driver using the HMI.\n- **Automatic Mode Activation**: Automatic driving is enabled when the tram is stationary at the home station, allowing it to shuttle continuously between the two stations.\n- **Immediate Stop**: The tram can be immediately stopped by the driver regardless of the current mode. Once stopped, it will remain stationary until manually operated back to the home station.\n- **Mode Transition Control**: To switch from automatic to manual mode, the tram must first be stopped at the home station before changing modes.\n- **Tram Position and Status Monitoring**: Sensors confirm the tram's presence at stations by turning green, while the HMI provides real-time updates on tram status, including location, movement, and emergency stop.\n\n| Tram | HMI |\n|------|-----|\n| \u003cimg src=\"https://github.com/Dalageo/TwinCAT-VirtualTram/assets/153513781/fc165a58-38da-4509-9efa-9b0c05afccc7\" alt=\"Tram\" width=\"520\"/\u003e | \u003cimg src=\"https://github.com/Dalageo/TwinCAT-VirtualTram/assets/153513781/79a958f4-410f-430c-aef5-23a8f577fa44\" alt=\"HMI\" width=\"250\"/\u003e |\n\n## Setup Instructions\n\n1. **Download and Install:**\n   [TwinCAT 3 download | eXtended Automation Engineering (XAE)](https://www.beckhoff.com/en-en/support/download-finder/search-result/?download_group=97028248\u0026download_item=650023470)\n   \n2. **Clone the repository:**\n   ```sh\n   git clone https://github.com/Dalageo/TwinCAT-VirtualTram.git\n   \n3. **Navigate to the cloned directory and execute the `TwinCAT Virtual Tram.sln` solution file.**\n\n4. **Navigate to TwinCAT directory and execute Start.bat**:\n   ```sh\n   C:/TwinCAT/3.1/Runtimes/UmRT_Default/Start.bat\n\n5. **Change the Target System in TwinCAT to UmRT_Default.**\n   \n6. **Visualization Image Pool Setup**:\n    - In the Solution Explorer of `TwinCAT Virtual Tram.sln`, navigate to PLCSim's VISUs and click on the `ImagePool.TcIPO`.\n    - Set the correct file path for each image by navigating to the cloned directory TwinCAT-VirtualTram/Image Pool, where you'll find `Background.png`, `Sensor.png`, `Station.png`, and `Tram.png`.\n  \n7. **Activate Configuration.**\n   \n8. **Login and Start both 'PLCSim' and 'PLCStudent'.**\n  \n## Contributions\n\nThis project was part of a master course assignment at [University West](https://www.hv.se/en/), with special thanks to the professors for assigning it.\n\n## License\n\nThis work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/). It was chosen to prevent commercial use and to promote free access and open collaboration, ensuring any adaptations remain freely available to everyone.\n\n[![CC BY-NC-SA 4.0][cc-by-nc-sa-image]][cc-by-nc-sa]\n\n[cc-by-nc-sa]: http://creativecommons.org/licenses/by-nc-sa/4.0/\n[cc-by-nc-sa-image]: https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png\n[cc-by-nc-sa-shield]: https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg\n\n## Citation\n\n```bibtex\n@software{Dalageorgos_TwinCAT-VirtualTram_2024,\nauthor = {Dalageorgos, Konstantinos},\nlicense = {CC-BY-NC-SA-4.0},\nmonth = jul,\ntitle = {{TwinCAT-VirtualTram}},\nurl = {https://github.com/Dalageo/TwinCAT-VirtualTram},\nversion = {1.0.0},\nyear = {2024}\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDalageo%2Ftwincat-virtual-tram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDalageo%2Ftwincat-virtual-tram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDalageo%2Ftwincat-virtual-tram/lists"}