Join us today!
SCM Environment - TwinCat
Hei there huys.
I will open this topic in this "sub"forum because i think it suits here, but the admin could move it if this is not the right place :-).
So, like i said yesterday, i'm encharged to built a Source Control Environment for our Beckhoff PLCs and some other (german) brand. In this topic i'll try to mention my progress everytime i can, but for now i will tell what i have done in this past 2 weeks...for now.
Like i said, i'm new to the PLC world, but it's software :-), so, it should be easier adaptation since i have the previous (backend C#, Java, Python, JavaScript, bla bla...) knowledge.
Short resume for the environment requirements:
* Version Control;
* CI/CD;
* Pipelines;
* Unit tests;
* I/O tests;
* Safety tests;
* Metrics;
* Analytics;
At the moment my tests are laid down to GitHub, GitLab, Jenkins and Azure. Tests are beeing made in a VMachine and sometimes without VM. Already played a little bit with VersionDog and i'm still waiting for a 2nd meeting with the guys from Copia. All of these technologies are trial software, so as you can imagine it's a painfull task to test/experiment/use and abuse of these tools to achieve the best for the company interests.
Following the blog from the great Jakob Sagatowski - https://alltwincat.com/author/jakob/, i could say it was a really good start.
I successfully achieve the task of run TcUnit - Runner framework to make the Unit Tests (with GitHub Actions and Jenkins also, Azure haven't got the time yet), but this is only the first step, there's still a long path. Of course i have play with all of the options available by Jakob regarding Jenkins slave and solving some issues regarding to comunications between these technologies and some other problems that hate my last few hairs :-(, but hey, this is why it is called engineering right :-)?!
This week i started to connect to the physical hardware to reproduce the same tests, because the first contact/tests were made without PLC connected. But i'm having some problems about router connections with the VMare machine. Since i'm still waiting for my admin account permissions (Windows account), as you guys can imagine it's quite frustrating to be able to work like this (every single configuration ask admin privileges....bahahhhhh)...
=> So, at the moment i need advice on how to connect my PLC to the VMare machine? I tryied bridge connection but i lost Internet connection that i need to commit to GitHub. I added a new virtual network and put it to NAT and the other bridged and i could connect last Wednesday, now i can't comunicate no more. Outside the VMare machine i have no problems at all, to stablish the router communication.
Suggestions?
@raoliveira Thank you for sharing your progress so far! It's the right sub forum 🙂 I am sure it will be great for everyone to learn more about your journey.
You can use the Bridged network to connect to the IPC and you can buy an affordable Wifi adapter to give your VM internet access. When you connect the Wifi adapter to your computer, select the virtual machine option, not host.
In case you want to say thank you !)
We'd be very grateful if you could share this community with your colleagues and friends. You can also buy us a coffee to keep us fueled 😊 This is the best way to say thank you to this project and support your community.
twinControls - https://twincontrols.com/
@beckhoffsupport, thank you for your suggestion, i'll give it a try next monday 👍 . But i also can say that i have tried with VMnet08(host), and after a broadcast search i saw the ethernet PLC connection, but it gaves me AdsError 1796 if i remember.
After a quick research, i read arround that the cause could be a previous connection with the "raw" PC operating system, so i removed that connection and tried again, but same error, couldn't connect the VMachine to the CX5240 PLC.
Now i'm at home and have to study Danish language hehe, and after that will play a little more with TwinCat configurations (physical hardware stays at work).
I'll keep you guys updated.
Hey there guys.
Anyone uses GitLab to build some pipelines? If so, i need a little help on how the WTF i can call batch files?
At the moment i'm calling like this:
UPDATE
just needed to add the batch file to the repo and call it directly
script:
- call LaunchTcUnit.bat
At least the file it's called...but lets see the result...
Yeah, it works 😀 😎
Just need to add the AmsNetId for machine with TwinCat to run:
UPDATE
Next week i'll start setting up the environment so the team can work and do some testings with the technologies i've been playing around.
I'll use GitHub and Azure for now, and will integrate Jenkins by the middle so, stay tuned for new updates.
P.S: Does anyone have an ideia on what is the best way to test the I/O and Safety for the PLC 🙄 ?!
@raoliveira maybe my article on creating a digital twin can help you out here?
My blog: https://cookncode.com/twincat
My code: https://github.com/roald87
- 17 Forums
- 267 Topics
- 924 Posts
- 0 Online
- 737 Members