Machine Automation Forum
A forum addressing machine automation solutions for the complete machine lifecycle. Including offers like Machine Advisor, Modicon PLC/PacDrive, Lexium or Preventa. Discuss and share knowledge on offers relating to cloud-based service platforms, machine localization and monitoring, industrial operations control, motion products as well as safety function!
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-06-30 06:13 PM
I am helping a client who is getting started with Machine Expert for programming PLCs and factory automation. I am a bit of an outsider when it comes to these specific tools, but have plenty of experience with general software development for embedded applications and web applications. I am hoping some of the best practices will translate here.
Is it possible to use "git" to keep track of source code files in EcoStruxure Machine Expert?
Is your application code stored in binary files? Are some files "source code" and other files derivative or "objects"? Perhaps someone who has done this before has a ".gitignore" file that tells (us and) git which files to track and which ones to ignore.
Ideally, I would want to commit all of the NECESSARY files into version control, so that a second developer could check out the same code and then work on the same application. I understand the merging will be difficult, if binary files are involved. I also imagine that comparing versions would be almost impossible. But it DOES at least offer the chance to "step back in time" and look at previous versions of a running application.
Thoughts? Advice?
Alan Porter
sentosa.us
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-07-01 02:09 AM
Hi @aporter ,
I am not 100% sure if it is the same but in EcoStruxure Machine Expert you can use SVN to track the changes in the application (Supervision):
In my laptop I use tortoiseSVN:
https://www.perforce.com/blog/vcs/git-vs-svn-what-difference
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-07-01 03:58 AM
It would be great to have this addon in Ecostruxure HVAC as well ! Maybe some of the good stuff in 1.5.0 ?🤔
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-07-01 04:42 AM
Ah, this is excellent. Subversion and git are pretty close in terms of basic check-in and check-out. The main differences are (1) in how they handle branching and (2) in the naturally distributed nature of git. But for simple uses, they're roughly the same.
I'll take a look and see if I can work with my client to make some "snapshots" to save work.
Alan
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-07-01 04:46 AM
I think one of the key points of my question was to identify which files were necessary to save in version control, and which ones were derivative. Once we know the answer to that, then it does not matter whether there is a built-into-the-IDE option for source code control. You can easily use a command prompt to check in the files you need. IDE integration is nice, but there's no reason to wait on $SOMEONE_ELSE to release $NEXT_VERSION before you can use these tools.
Thanks for your help in educating me about these tools. There is definitely a lot to learn!
Alan Porter
sentosa
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-07-01 06:22 AM . Last Modified: 2022-07-01 06:24 AM
Actually I am not a Machine Expert user but Ecostruxure Machine Expert HVAC instead so I will tell you my own personal experience. This is the folder structure for a typical project:
Besides the pdf, which is there to have a quick access to the electrical diagram, the rest of the files are in a binary format.
You may notice a PreviousVersions folder there. This is what is in this folder:
These are (as far as I understand) zipped snapshots of the project created (i would assume) before each new compile or some other time based schedule I am not aware of.
I would usually not commit this "PreviousVersions" subfolder. Also there are some files which are created on the fly with the simulator. In HVAC you assign a name to the simulation and you may have different simulations saved and these files keep the information related to that particular simulation. There is no need to keep these files in the repo (but they are quite small anyway so I would usually just uncheck the whole folder and commit the rest. I attach a picture of the simulation files and a typicall Tortoise commit.
But this is as far as you can go (unless I am missing something) in terms of SVN not being properly built-in into the IDE. Basically besides the fact that I can put some comments on each commit, having to go back into some point-in-time version of a project for comparison is a real pain. You need to create a different folder and either revert to a previous revision or create a branch from a previous one, but comparing the proiects is something you must do on your own. Usually having two monitors is a good thing if you need to do it.
Again, I do not have a clue what SVN integration into Machine expert is capable of doing besides what you can do with TortoiseSVN, but if it does not include a Diff tool you can simply not use it at all if you want to.
But Diff might be easily achievable only for structured text functions and programs. Comparing ladder or FB I would say is a completely different challenge.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-06-02 09:32 PM
I haven't tried it yet...but it looks like you could use the Export and Import project files(XML format) with "GITHUB". Sort of a "low-tech" type of version management.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-06-02 09:42 PM
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-06-05 12:08 PM
I was looking for a related topic and came across this post. For transparency, I work for Copia Automation, and we can provide git-based version control for Machine Expert, with even rendering of the Ladder Logic during commits. We are working on expansion of our ME and CODESYS support this year, so you can expect to see more language and other features.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.