Author Topic: Industrial DevOps, Project View, and TortoiseGIT  (Read 45 times)

Online JAMS-IRTC

  • PLUS+1 Novice
  • *
  • Posts: 2
  • Karma: +0/-0
Industrial DevOps, Project View, and TortoiseGIT
« on: March 31, 2025, 07:16:01 PM »
So, I have volunteered (against my better judgement  8) ) to help set up a DevOps workflow for our Plus+1 Guide Code. Now here is the real difficulty, I am very new to Plus+ Guide, so I know essentially nothing about the files and which ones are the most important. I figured starting a thread here might help us all join forces to figure out some best practices.

With that here are some questions
  • Do any of you guys have any experience working with Git (TortoiseGIT) and Plus+1 Guide?
  • What files do I need to source control?
  • How do I best manage the output files needed to download to the controllers?
  • Is it even possible to do merges with Plus+1 Guide files?
Any thoughts on or advice would be super helpful!




Offline Neil

  • PLUS+1 Expert
  • ****
  • Posts: 97
  • Karma: +2/-0
Re: Industrial DevOps, Project View, and TortoiseGIT
« Reply #1 on: March 31, 2025, 09:53:07 PM »
Hello.

I have used GIThub desktop for years for my PLUS+1 projects without any issues with files pushes or pulls from the repository.
I always leave the projects unpacked when I push to the repository.

My Main branch includes a compiled base blank template, as you build in the applications create a a new branch on a compiled branch which as been merged onto the main branch/ development branch or release branch ( depending how you want to setup)
For visualization of the project build I use visual studio code GIT graph.

If you haven't used it before I recommend a trail with a non critical project.

PS. I also used tortoise but GIT hub desktop is preferred.

Offline Tor

  • Administrator
  • PLUS+1 Guru
  • *
  • Posts: 312
  • Karma: +28/-1
Re: Industrial DevOps, Project View, and TortoiseGIT
« Reply #2 on: April 01, 2025, 07:32:35 AM »
Hello,

Here is my input:

1. Does any of you have any experience working with Git (tortoisegit) and plus+1 guide?
No experience with Git, but used SVN for a long time.

2. What files do I need to source control?
If you use Project View in Plus+1 Guide then "Project Files" is all files necessary to open the project in GUIDE and compile. These files needs to be saved. And as Neil pointed out, keep the project unpacked when saving.
Read more about Project View in Plus+1 Guide User Manual (Help> User Manual), search for "Project View".
From the Project View it should be possible to use your version control software like in the windows explorer.

3. How do I handle the best output files needed to download to the control units?
The Downloadable File, The .lhx File, is visible in the "Output Files" in the project view. These are not necessary for the project, you can always create a new one by compiling it, but a good idea to store if you need to send different versions to customer.

4. Is it even possible to make mergers with plus+1 guide files?
Yes, but there is a file that cannot be merged, the .scs file. This is the graphic part of the project and must be manually updated. If you are one developer, this will not be a problem. If you are several and working on the same project, it can be more difficult. Here you need to work out a process that works for you. Like locking files you work on so no one changes anything by mistake.
This experience is from SVN and I do not know how it is with Git.


I hope this helped a bit, and I think the Project View can be a big help.


Have a nice day.
Best regards,
Tor
PLUS+1® SW PAE Team

Offline Matt_Eng

  • PLUS+1 Developer
  • ***
  • Posts: 24
  • Karma: +10/-0
Re: Industrial DevOps, Project View, and TortoiseGIT
« Reply #3 on: April 01, 2025, 05:02:39 PM »
Hi,

I'll chime in as well with how I've used it.
1. I primarily use SVN although I've been using Git with Tortoise recently for several projects and my workflow for an application is slightly different compared to when I used SVN.

2. I don't really use the project view Tor mentioned unless I need to commit while the project is open. My primary method is to use the settings in Project Open/Close with the following settings checked.
"Close the project and delete temporary files in the project folder" I then have the search database, Test/debug folder delete options checked.
I would recommend having the backup file deletion on, and adding them to your .gitignore file.
I also add *.ddt and *.sdb to my .gitignore
Then when I need to commit I just close the project and the files I care about are good to go.

3. If you setup a devops pipeline, you could set up automated builds to generate the lhx, I still make them manually. During that build you could also setup regression testing with something like the GUIDE Test Tool. Making those pipelines does take some time though, so fair warning.

4. The trickiest part is the SCS file. I keep the main develop branch clean and require a PR to make changes, so all work is done in individual Branches. This forces the developers to make the merges manually. Compare SCS and the Module Viewer is basically mandatory for that part. This can be made a little easier by saving parts of the application as SCS files. Example: A block that contains a set of logic for controlling the motor, then you could give that block a version and some history for the developer to keep track of changes.
If you look at the Application Software Template you can see how using that type of approach could be achieved.
Having multiple developers in the same application is tricky, so taking the time to create a structured process and a structured application will set you up for success.

-Matt_Eng

Online JAMS-IRTC

  • PLUS+1 Novice
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Industrial DevOps, Project View, and TortoiseGIT
« Reply #4 on: April 01, 2025, 10:46:30 PM »
Hey all! Thanks so much for the responses! They have been helpful and enlightening!

I should say I am currently using git (and git tortoise) mostly because I have experience with git and github desktop.
I don't have any experience with SVN but from what I can tell it relies more on a hard check in/check out that keeps people from working on the same program file at the same time? (at least that is how I understood it. Up until a few months ago, I thought git was the only source control software). And I am using TortoiseGIT because it is mentioned in some of the Danfoss literature.

I have a very simple (and perhaps stupid) question:
What is the difference between the .scs file and the .p1x? I understand that one is the Plus+1 Guide SCS File and one is the Plus+1 Guide Project File, so I guess the real question is why are the different and what purpose does each one serve? Like when you change your code only the .scs file changes (according to git), what causes changes in the .p1x file?

to Matt_Eng specifically can I ask why you have added .ddt and .sdb files to the .gitignore?

Offline Tor

  • Administrator
  • PLUS+1 Guru
  • *
  • Posts: 312
  • Karma: +28/-1
Re: Industrial DevOps, Project View, and TortoiseGIT
« Reply #5 on: Today at 08:51:08 AM »
Hi,

The .scs file is the graphical part, the code you have created in the drawing area in PLUS+1 GUIDE. And as you mentioned, this is more or less always changing.
The .p1x is the actual open project, if it's packed it will be a .p1p file.  The .p1x file contains information about the tool you are using. For example, if you compile the project in a different version of PLUS+1 GUIDE the .p1x changes.
Best regards,
Tor
PLUS+1® SW PAE Team

Offline Matt_Eng

  • PLUS+1 Developer
  • ***
  • Posts: 24
  • Karma: +10/-0
Re: Industrial DevOps, Project View, and TortoiseGIT
« Reply #6 on: Today at 09:54:38 PM »
Hi,
The .sdb is a search database file that gets generated when you use the search feature. The reason I ignore it, is that when I do a search across projects, sdb files are generated at each project location, and they aren't removed at all those locations with the cleanup option.
The .ddt is a temporary file generated during compilation, some older GUIDE versions didn't always clean it up, so I just ignore it since it is a pretty small file.

-Matt_Eng