Hey guys, doing my best at this VB programming thing but still quite new to it. I'm using my C-axis as a fluid dispenser which is mounted on a linear actuator to move it in and out of the work area. Currently, I have it set up as M802 to extend the actuator (output 2 in Mach) and M902 to retract it. On the retract command, M902, I want to add a few lines to incrementally step the dispenser back a set amount. Here is what my current script looks like:
'M902
'raises dispenser actuator
DeActivateSignal(Output2)
code("G91")
code(G01 C-.005 F50")
code("G90")
This script does work in testing, but I'm worried that the G91 command is going to affect the g-code I am running by switching it momentarily to incremental mode and then back to absolute. Is there a way to make the g91 only affect the c-axis, or a way to momentarily inhibit movement on the other 5 axes? It seems like there should be a really obvious solution here but I can't figure it out for the life of me!