I work for a small machine shop that has several machines converted to use LinuxCNC. The problem is that we have other machine that are not converted. Each machine has a different program interrupter so a program on a Haas will not directly load on a Fadal or LinuxCNC based control machine. How do I can I create a filter program that will while loading a program in to the control to correct some of these know issues? For instance Fadal uses a tool offset "E01" and the LinuxCNC control doesn't see it that way. I know from working with the programming department that I can replace "E01" with "G54" which is something that LinuxCNC can use.
Will this work?
size_t index = 0;while (true) {index = str.find("E01", index);if (index == string::npos) break;str.replace(index, 1, "G54");index += 1;}