Hello all,
I’m writing this to ask you about programming methods / version control methods.
First of all a small introduction:
I’m developing software for machines (see my web site if you are curious) this software development has two big sides:
a) HMI (visual C++ applications)
b) Control software (PLC like programs that control the inputs, outputs, movements… of the machine).
In the PLC applications (b) I’m developing using an OOP environment that allows me to do really cool things. In that environment is where I have the question.
Note that typically after finishing with a machine the code remains unchanged.
Let's go to the question itself:
In my case I program for example a class to control the movement of a drive, let’s say I can make as many instances of that class as I need (number of instances == number of drives).
Nowadays I have a folder where I’ve stored all the classes and I copy those classes to each machine project.
This gives me the problem that each time I update a class, I have different versions of that class in different projects. I will have to update it into as many projects it was working (only if it is needed).
This gives me the advantage that when I’ve finished the machine I have a complete copy of the final state of the machine and therefore I’m sure that I have the code that was installed on the machine.
In the other hand imagine that the class that controls the drive XXX has to be changed due to a change in the specs from the XXX drive manufacturer, then I won’t be interested in applying automatically those changes into the old machines (with the old XXX drive model).
What probably would be interesting is to have only a folder with the classes there, making different versions of those classes when different equipment versions appear and link to those classes from the different applications without copying them.
The only thing that worries me is that an innocent change would affect old machines behaviors…
How do you cope with that?
I can see advantages in both sides…
PS: till today the software that I’m using to program did not allowed me to develop using a centralized set of files so there has not been the need to ask, but now the new version is here and (even I’m not sure this is something allowed) probably it will and the doubt has appeared.
Thank you in advance for your comments.