Your code, to me, looks fine. When I set up MPGs I usually put something in the PLC script that way I know it is going to read my switches. Sometimes,
I've noticed having switches in one position, I need to "update" the signal, like you have had to, so I put the function in the PLC script to always update.
You could do the same here, since you set up two functions to switch the Axis and Increment. Just take out your messages, otherwise it will put the message into the log thousands and thousands of times, and then put your two functions right into the PLC script.
No more code than you have, you won't notice any difference in the speed of the PLC run.
------------------------
--Mark 4-12-18
--MPG Settings
AxisSelect()
IncSelect()
------------------------