Using Siemens Version Control Interface (VCI) in TIA Portal

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey welcome my name's liz and i'm co-founder of outlier automation a control systems integrator today i'm going to take a look at siemens version control interface or vci in tia portal i'll start by talking about what version control means for software development and then i'll dive into how you can apply it to your siemens tia portal development workflow so let's get started at a high level version control is how we track software development on both our local pcs and on an external server which is typically the cloud now usually people think of version control as tracking text-based programming languages where their development files can be opened and read by a text editor like notepad that gets a bit tricky for us plc programmers who use graphical programming languages but i'll go into more detail on that later let's start by looking at a simple example version control allows me to place or commit my file in a cloud storage area called a repository other people working on my project can view and clone the repository to edit the files on their own pcs if another developer has a change to make to the files they can then push to the repository with their updated file in the latest version of the file becomes the second commit anyone looking at the repository can see what the changes were between the first and second commits all pcs can then pull the latest commit and continue developing from the updated file so what are some of the advantages of using version control well first it protects our code base to ensure that we don't lose any of our changes as we're working the development files are stored both in the cloud repository and on the development pcs it also tracks changes so if we find a mistake in the code we can just go back to a previous version the second major advantage is that it allows multiple developers to create and merge their changes into master files through a simple coordinated workflow and last but not least it allows us to track development progress there are many version control tools that integrate project management that way we can make sure that the code is developed on time and with minimal bugs let's go into some of the tools associated with version control by and large the most popular version control tool is git in its simplest form git allows you to manage and view your repositories through a command line environment called git bash on windows git communicates with an external server to sync with repositories at outlier we use our own ec2 instance on amazon web services which contains an open source flavor of git called git lab and stores all of our repositories in aws s3 buckets git lab gives us a customizable web interface for viewing and tracking repos and there are also many project management tools that can help track our overall projects now to use git to track plc project files you need a way to convert the graphical programming files to a text-based file and then transfer it to git this is where siemens tia portal version control interface comes in just like it sounds vci is tia portal's interface to get it can export or import program blocks which allows us to do backups archiving rollbacks and share code between team members it's important to note that vci cannot sync an entire project to get it only syncs the code and tags within blocks like function blocks functions data blocks and plc tags it cannot sync instance memory library types or hardware configurations when using vci it's useful to think about developing code with a modular approach that makes it a lot easier to track and test changes a useful feature of vci is that it gives you a change log so you can see what changed between the different commits but as i mentioned before the files are stored in git in xml format so siemens has released the automation compare tool to make it easy to visually see the differences between ladder code and data blocks that have been exported to xml now that we've reviewed the tools we're going to use i'll have my teammate nick join us to walk you through exactly how to do all of this hey this is nick and now i'll guide us through some implementation let's start by taking a quick look at the demo project we'll be using here's our project tree we've got some dbs some obs some tag tables here's our main and in plc tags we have some safety tags here that we'll come back to later we'll be using a number of automation tools that siemens developed in this demo but let's start off with the simatic automation compare tool so we're going to download that first by searching the term simatic automation compare tool clicking the link and then the link to the download is just down here so now that we've downloaded and unzipped the file off the website we can just double click to run the installer looks good so we've got an executable now to run the tool from our desktop but we can actually totally integrate this automation with portal so we'll go to options settings at the bottom we have version control interface compare and here we're just going to point portal to the executable file for the automation compare tool so that should be in this pc c drive program files siemens automation and here it is and it's added so let's move on to our next add-in which is going to be git so open up chrome search siemens vci get add-in should be this link down here if i scroll down here's the download link the vci git connector that's a quick download so we'll just extract the zip file and the method of installing add-ins in the portal is really quite simple we're just going to take this add in file and add it at portals executable folder so let's find that in the c drive program files siemens automation portal v17 and then the add-ins folder so we just take that dot add-in and drag it right over so by default add-ins are going to start out disabled in portal so we'll just have to come over here and enable it using the add-ins tab drop this down there it is so for status instead of x we'll choose activate now here it's just going to show us some of the different permissions we're giving add-in because it is kind of a third-party thing even though it's from siemens we accept all those so now it's good to go so before we go any further let's just go ahead and clone our repo we'll be using the built-in get gui that comes when you download git and we'll need an ssh key so we'll grab that and then we're using git lab for our get management i'll just go to preferences ssh keys and drop mine and here to generate it and obviously this process could be different depending on what service you use for get so this is not too critical okay now i'll hit clone and clone with ssh so it gives me a url i can use in the gui i'll clone an existing repo at that url and then i'll just put the target to test repo on my desktop there it is looks like it's cloned it successfully all right we got everything now let's get going with vci so i'll open up portal version control interface but to add a new workspace workspace one so we've got all our blocks and objects on the left we can see our workspace is not configured so click here the workspace path is just our repo so on the local machine and then we can select get here as our version control add-in since we added that earlier on now i'll just go ahead and grab and drag plc1 over looks like we got an error let's see boileralarm.xml okay how about the log file oops okay so cannot be exported block is a type instance export is not possible right so that brings up a good point a type object is already managed in version control through siemens libraries so it actually wouldn't make sense for us to try to use vci for it here we can right click here to use get and add our plc to our version control and then we'll do it again except this time we'll commit and that's going to put all of our xml blocks committed to our local repository i'll put a comment looks good okay now i can right click get and push to the remote repository that looks good too let's check it out on gitlab there it is that's my comment and this is the data hey it's liz here again i'm working on the project with nick but on my own pc now that nick's done i'm gonna go and make a few changes i have here the latest version of the project i'm gonna go into safety tags and create a new tag called estop not activated and i'll go into my program block and assign it to this output i'm also going to change this upper limit to seventeen hundred now to commit my changes i'll go to vci in the project tree you can see that the vci workspace has detected changes to our local project i'll export my changes to the workspace and synchronize first i'll need to compile then it will prompt me to write a description of what i've changed and i'll push the workspace to get if i go back and open git i can see that my commit was posted next nick is going to pull this commit and look at my changes as you can see they're not totally clear aside from the description i gave so nick is going to use siemens automation compare tool so i'll right click on plc one get pull that's going to pull the changes from the remote repo to my local one okay so now we can see there's a difference between what i have in portal and what i just pulled so here are my options for how i can deal with that i can either import or export or discard the actions but first i want to see what changed so i can right click and here's where we can use the automation compare tool so that loads up and we can see [Music] there's the difference on the left was the original block looks like we have 1500 for the high limit and in that last commit it was changed to 1700 how about the safety routine let's see here's the change okay seems like there was nothing on that output before and now we added a new tag we can also use the act with plc tags so here's our safety tags okay and we can see that a new boolean tag was added to this tag table so i'll decide to import all those changes and synchronize that's going to pull the changes in from get into this project so i can verify that pretty easily now everything is green if i go to my main ob1 yep that 1500 is now 1700. and that's all for today thanks for watching if you have any questions send us a message at info outlierautomation.com and you can check out the other resources on the blog section of our website
Info
Channel: Outlier Automation
Views: 16,101
Rating: undefined out of 5
Keywords: siemens, automation, versioncontrolinterface, vci, tiaportal, plc, programmablelogiccontroller
Id: gmTNIA9MhJk
Channel Id: undefined
Length: 17min 29sec (1049 seconds)
Published: Thu Aug 19 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.