Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikvoronin/tc2_git
Git for TwinCAT 2 (CoDeSys)
https://github.com/nikvoronin/tc2_git
beckhoff beckhoff-twincat-plc codesys git industrial-automation plc plc-programming source-control twincat twincat2 windows
Last synced: 3 months ago
JSON representation
Git for TwinCAT 2 (CoDeSys)
- Host: GitHub
- URL: https://github.com/nikvoronin/tc2_git
- Owner: nikvoronin
- License: mit
- Created: 2019-10-10T16:58:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-15T14:03:36.000Z (about 1 year ago)
- Last Synced: 2024-01-15T18:16:37.450Z (about 1 year ago)
- Topics: beckhoff, beckhoff-twincat-plc, codesys, git, industrial-automation, plc, plc-programming, source-control, twincat, twincat2, windows
- Language: Batchfile
- Size: 10.7 KB
- Stars: 10
- Watchers: 1
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git for TwinCAT 2 (CoDeSys)
`GoTwinCAT`: [Git Macro for CoDeSys or TwinCAT 2](https://gotwincat.blogspot.com/2019/10/git-twincat2-codesys-project-macro-export-import.html). _// Oct 2019_
## How To...
> It is a good idea to close `PLC Control` before using `+commit.cmd`
* [+commit.cmd](https://github.com/nikvoronin/Tc2_Git/blob/master/%2Bcommit.cmd) does:
1. looking for the .pro files inside `%ProjectDir%`
2. exports several `.exp` files from the one `.pro` file to the `~%ProjectName%` folder
3. git add * (all)
4. git commit -m _with-current-date-n-time_> From command line, execute `git branch` or `git checkout` before running `+restore.cmd`
* [+restore.cmd](https://github.com/nikvoronin/Tc2_Git/blob/master/%2Brestore.cmd) does:
1. looking for .pro files inside `%ProjectDir%`
1. import from the .exp files to the .pro one## Project Structure
```
.
├─ .git
│ └─ ...
├─ .gitignore
├─ +commit.cmd
├─ +restore.cmd
├─ Git.mac
├─ README.md
└─ src
├─ foo.pro
├─ bar.pro
├─ bar.tpy
├─ ~foo
│ ├─ FILE111.EXP
│ ├─ FILE222.EXP
│ └─ ...
└─ ~bar
├─ FILE111.EXP
├─ FILE222.EXP
└─ ...
```## Macro
Open options menu in the `PLC Control` then add [Git.mac](https://github.com/nikvoronin/Tc2_Git/blob/master/Git.mac) as a macrolibrary to the working project: `Project → Options → Macros → Macrolibrary... → Include...`

After that, you can find it under the `Edit → Macros → Git → Commit` menu items

## PLC-Control Command Line
"When TwinCAT PLC Control is started, you can add commands in the command line which will be asserted during execution of the program." Read the rest at the infosys' topic: [Command Line/Command File Commands](https://infosys.beckhoff.com/content/1033/tcplccontrol/html/tcplcctrl_addcommandline.htm)
## Understanding Git Series
* [Data Model](https://medium.com/hackernoon/https-medium-com-zspajich-understanding-git-data-model-95eb16cc99f5)
* [Branching](https://medium.com/hackernoon/understanding-git-branching-2662f5882f9)
* [Index](https://medium.com/hackernoon/understanding-git-index-4821a0765cf)
* [Git Reset 101](https://medium.com/hackernoon/reset-101-ba05d9e3f2c7)