hexagon logo

Have you tried GIT with PcDmis?

Some of you already know that I left the CMM world ~1 year ago and have moved into a Controls Engineer role. Git has become a common task in my daily work life and have grown to appreciate it. Each time I'm in use of it I can't help to think about all the times Git would've been useful with PcDmis...

Recently, I've began helping out a shop write programs on my spare time. Time to test Git and PcDmis and find out how well they work together.

Thus far... .PRG files are binaries and therefore kills the usefulness of GIT a little bit BUT not totally. I am able to create branches and travel back and forth thru time. Would I still use Git and PcDmis even though Git doesn't display details as far as what changed exactly changed from a last edit... YES!!!

Let me know if you're interested in learning more and I'll type up a simple thread on my adventures with Git and PcDmis... whenever I find the spare time Smiley
  • Hi Kp61dude!

    We are at the beginning of the discussion how we can better versionize ​our measurement routines.
    One idea was the use of a special tool to achieve this.

    As far as I understand GIT is such a tool but mainly used for computer code.

    I never used GIT so I have a few questions regarding this.

    How does the interaction occur between GIT and PC-DMIS occur?
    Does GIT monitor a certain folder?
    Does it automatically safe changed routines?
    What happens when I go back a version? Will it automatically update the content of a folder?

    Thank you for sharing your experience with it when you find the time!
  • Hello Aaron Baldauf

    1. GIT doesn't know PcDmis exists and PcDmis doesn't know GIT exists. They don't interact with each other. PcDmis creates files and GIT interacts with files/folders.

    2. Git does monitor a folder of your choice. I monitor each part and that part may have setup images, multiple part routines (op1, op2, etc.)

    3. It does not do anything automatically out of the box. You can automate it if you desire. When using PcDmis you can go over to GIT and commit changes (PcDmis file has to be saved in order to write to disk and GIT recognize those changes). A commit is like a snapshot of the current files, folders, all of its contents.

    4. When you back a version (or commit) your files automatically change to that commits snapshot of everything in that folder (I'm still learning exactly what this step does with PcDmis, its all looking like normal GIT operations). You may travel to any commit in history and go back to current and bring files with you.

    5. You have control as to what contents get updated with .gitignore file, everything that you would like to be ignored in the repository (main folder) goes in this folder.

    GIT is a very powerful tool. I highly recommend experimenting with it and learn as much as possible when using it... and it's free!

    I've created a repo that I'm thinking of making "open source" for us all to contribute. Thus far I have built a library of simple sub programs to create folders and report headers (text style). Let me know if ya'll are interested in taking a peek at it.
  • Very interesting!

    Regarding point 3 and 4, so in theory it could be set up to automatically make commits every time I save during programming?
    In GIT I will then see all made saves as commits (with date time info) and if I wish I can comment on them?

    Do you have experiences with huge amount of programs saved in folders and sub folders?
    How does GIT handle that? :scream;

    Btw.. the link does not work for me.
  • Aaron Baldauf I removed access the public access temporarily and intended to edit this comment in the interim but I am not sure how to edit posts on this forum anymore?

    For 3 and 4: I would look into creating a script on PcDmis' end to call a batch script that commits existing and writes a useful commit message. The custom optional input comment would be handled on the same end.

    Folders: I would stay on the side of maximum control so making each part folder a repo would be a personal choice of mine. In the folder I typically keep an operations folder (eg. op1, op2, etc.) and setup pictures to name a few CMM output would be located somewhere different. I would be against making my top level programs folder as the repo... it'll just be hard to handle version differences.

    I'll fix the link here soon and look forward to people's input.. maybe even a surprise "pull request"!