Ok Allen, I finally got off my ass and fired up the machine.
Here is the brain info:
In the screen shot of the brain (my X axis jog brain), you will see the OEM LEDs in the left hand column. 1125 is the positive jog direction switch and 1126 is the negative jog direction switch. LED 1122 is lit when the axis selector switch is selecting axis X.
I used a modbus device to update the status of those LEDs. Basically, there is another brain I used to do that. But you could use the Galil inputs just as easily. You would map the Galil inputs to some spare OEMTRIGGERs in ports and pins and use those instead of LEDs. Or, if you have extended IO on your controller, you could map those inputs to LEDs. What ever you choose will be in the left column as the brain lobe inputs.
So to go over the logic a bit... if the axis selector switch is in the X position, my LED 1122 is set to ON. If I then press the jog + button on my panel, then LED 1125 is also set to on. I then take the logical and of these two brain inputs to drive a pulse timer that "pushes" the Mach JogX-Right button. So IF 1125 is on AND 1122 is on, push jog right.
Same thing for the left or negative jog. Just a different LED that gets lit up when the jog - button is pressed on the panel.
The last action the brain does is test see if the direction buttons have been let off. And it presses the Jog off X button if so.
It is important to note that to jog an axis in Mach with the brains, you have to provide the button down event to start the jog and then provide the button up event to stop the jog. If the third action were not there, the axis would start jogging when you pressed a direction button and it would continue to jog until it hit a limit or the end of the table travel!
Also, the brains only perform an action once per state change. So when you let off a direction button, it only runs the third action one time. You can see this in action if you "view" the brain file in the brain control dialog. (Operator->Brain Control).
I have three brain files. One for each axis. They are different only by which LEDs are processed and by which mach "buttons" are pressed. X for X actions, Y for Y actions, etc... The separate brain files are purely a matter of being able to see what you are doing in the brain editor. A large brain file gets hard to read. The brain editor leaves a lot to be desired, unfortunately. But it does work.
I also have a brain that reads my analog Jog Feed Rate pot on the panel. So I can adjust the jog rate without having to use the tab screen. (See the attached pic of my panel.)
It was all a bit of a pain to setup and get working. But... it was well worth it. I don't have to use the keyboard for any jog ops. I have a button on the screen that selects the jog mode (cont, incr, or MPG) and a button that toggles the jog increment. If I had more real estate on my panel, I could have put buttons on it for those as well. But my screen is a touch screen, so it is almost like having a button anyway. It is a large panel, but I put a large monitor in it. Which is nice because I can't see the way I used to!
But it did make the area for "real" buttons a bit tight. All of the buttons got recycled from the original Yasnac controller. I quite like the feel of the jog buttons and I wanted to keep them. The Cycle Start and Feed Hold buttons were retained, as well as the analog spindle RPM and load gauges. And I love having the original tool changer controls on the panel as well. I think it turned out to be a nice combination of the "new" and the "old".
Steve