twincat-virtualagv

Simulating an Automatic Guided Vehicle (AGV) with Handshake Communication Protocol Using TwinCAT PLC Programming 🚗

https://github.com/dalageo/twincat-virtualagv

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • ✓
    CITATION.cff file
    Found CITATION.cff file
  • ✓
    codemeta.json file
    Found codemeta.json file
  • ✓
    .zenodo.json file
    Found .zenodo.json file
  • â—‹
    DOI references
  • â—‹
    Academic publication links
  • â—‹
    Committers with academic emails
  • â—‹
    Institutional organization owner
  • â—‹
    JOSS paper metadata
  • â—‹
    Scientific vocabulary similarity
    Low similarity (8.9%) to scientific vocabulary

Keywords

automation iec61131-3 industrial-automation plc-programming simulation twincat twincat3 virtual-agv
Last synced: 6 months ago · JSON representation ·

Repository

Simulating an Automatic Guided Vehicle (AGV) with Handshake Communication Protocol Using TwinCAT PLC Programming 🚗

Basic Info
  • Host: GitHub
  • Owner: Dalageo
  • License: other
  • Default Branch: main
  • Homepage:
  • Size: 34 MB
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
automation iec61131-3 industrial-automation plc-programming simulation twincat twincat3 virtual-agv
Created over 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

Bechoff TwinCat
TwinCAT 3.1.4024.55 License: CC BY-NC-SA 4.0 GitHub stars

Simulating an Automatic Guided Vehicle (AGV) with Handshake Communication Protocol Using TwinCAT PLC Programming

This repository contains a simulation project for an Automatic Guided Vehicle (AGV), developed within the TwinCAT environment as part of a master's course assignment University West. The assignment involves developing a Human-Machine Interface (HMI) that controls the operation of the AGV by following the specified handshake protocol between the PLC and the AGV. In this project, AGVSimulator.TcVIS visualization, AGV.TcPOU Function Block, and Process.TcPOU were provided by the university. The designed Virtual AGV includes the following functionalities:

  • Target Selection and Start: The target location is selected from a drop-down menu on the HMI (PosA, PosB, PosC, PosD, and HOME), and movement is initiated by pressing the Start button. During AGV movement, the target selection is locked and the Start button is disabled to prevent changes or reinitiations.
  • Indicator Lamps: The Ready Lamp lights up when the AGV is ready for its next movement, the Stop Lamp lights up when the AGV is stopped, and the Moving Lamp blinks during AGV movement.
  • Position Display: The AGV's current position is shown on the HMI while it is stationary at a target location, whereas the display is invisible when the AGV is moving.
  • Stop and Reset Functionality: The AGV's movement can be stopped by pressing the Stop button on the HMI. To resume operation after a stop, the Reset button must be pressed, which will return the AGV to its HOME position.

| AGV | HMI | |-----|-----| | AGV | HMI |

AGV Communication Protocol

The AGV movement is enabled by a specific handshake protocol between the PLC and the AGV, as shown in the following diagram:

HandshakeProtocol

  1. Order Sending: The PLC sets the target position and raises the PLC strobe signal to send an order to the AGV.
  2. Order Received: The AGV reads the order and acknowledges receipt by raising the AGV strobe signal and setting the answer to 0.
  3. Send Ready Signal: The PLC lowers the PLC strobe signal, indicating that it is ready for the AGV to proceed.
  4. AGV Movement Initiation: The AGV lowers the AGV strobe signal (acknowledge strobe) and starts moving to the target position.
  5. Answer Ready: Once the AGV reaches the target position, it raises the AGV strobe signal again and sets the answer to indicate its current position.
  6. Answer Received: The PLC acknowledges receipt of the answer by raising the PLC strobe signal and setting the order to 0.
  7. Order Completion: The AGV completes the handshake by lowering the AGV strobe signal (answer end) and waits for the next order.

Setup Instructions

  1. Download and Install: TwinCAT 3 download | eXtended Automation Engineering (XAE)

  2. Clone the repository: ```sh git clone https://github.com/Dalageo/TwinCAT-VirtualAGV.git

  3. Navigate to the cloned directory and execute the TwinCAT Virtual AGV.sln solution file.

  4. Navigate to TwinCAT directory and execute Start.bat: ```sh C:/TwinCAT/3.1/Runtimes/UmRT_Default/Start.bat

  5. Change the Target System in TwinCAT to UmRT_Default.

  6. Visualization Image Pool Setup:

    • In the Solution Explorer of TwinCAT Virtual AGV.sln, navigate to PLCStudent's VISUs and click on the Display.TcIPO Image Pool.
    • Set the correct file path for the image ID by navigating to the cloned directory: TwinCAT-VirtualAGV/Image Pool/Display.png.
  7. Activate Configuration.

  8. Login and Start both 'PLCSim' and 'PLCStudent'.

Contributions

This project was part of a master course assignment at University West, which provided the AGVSimulator.TcVIS visualization, AGV.TcPOU Function Block, and Process.TcPOU. Special thanks to the professors at University West who contributed to its development.

License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. It was chosen to prevent commercial use and to promote free access and open collaboration, ensuring any adaptations remain freely available to everyone.

CC BY-NC-SA 4.0

Citation

```bibtex @software{DalageorgosTwinCAT-VirtualAGV2024, author = {Dalageorgos, Konstantinos}, license = {CC-BY-NC-SA-4.0}, month = jun, title = {{TwinCAT-VirtualAGV}}, url = {https://github.com/Dalageo/TwinCAT-VirtualAGV}, version = {1.0.0}, year = {2024} }

Owner

  • Login: Dalageo
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If this project was helpful, please cite it as below."
title: "TwinCAT-VirtualAGV"
authors:
  - family-names: "Dalageorgos"
    given-names: "Konstantinos"
version: "1.0.0" 
date-released: "2024-06-30"
repository-code: "https://github.com/Dalageo/TwinCAT-VirtualAGV"
license: "CC-BY-NC-SA-4.0"

GitHub Events

Total
  • Watch event: 5
  • Push event: 1
Last Year
  • Watch event: 5
  • Push event: 1

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 3
  • Total Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Konstantinos Dalageorgos k****s@g****m 3

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels