11
Mach4 General Discussion / Re: Mach 4 question
« on: August 24, 2021, 10:52:02 AM »Hi,
lets imagine for a moment that you wish to go the hardwired MPG route, and I have given some thought to doing so myself.
Every once in a while my USB connected pendant loses communication and the machine needs to be power cycled to bring it back,
a PITA....doesn't happen often but when it does that's when I think a hardwired pendant has advantages.
An MPG requires four wires, A+,A-,B+ and B-, unless you create a logic board that would reduce those four wires down to two,
namely Step/Direction, and that neglects the common return, so three wires in truth.
Lets say you had two three position rotary switches, each switch would require three wires (one common and the other two binary coded
for the three positions). Assuming the common return could be shared by the two rotary switches then you would require five wires for
the two switches.
Totaling the wires for this arrangement:
4 wires-MPG
4 wires-binary coded switch position (two switches)
1 wire-common return
This would require 8 spare inputs on your BoB/controller combination. Do you have 8 spare inputs?
If you want or need to economise on the inputs you could do it this way:
2 wires-Step/Dir derived from logic circuit of the MPG
2 wires-one for each of two buttons
1 wire-common return
This arrangement requires a small logic circuit be built into your pendant and that you write some Lua code to cycle through the axes
in the case of the ActiveAxis button and the jog increment in the case of the JogIncremnt button. This would reduce the number of spare inputs
required to four. Do you have four to spare?
Craig
Hi Craig,
Thanks for the useful information. I have a spare CNCdrive UC400ETH lying around with the breakout board that goes with it. I have it setup and running in Mach4. I used the script which will be below this post. I am able to use a series of switches to enable either the x y or z axis and also either x1 x10 x100 these all work. The only thing i cannot get to work is the MPG. I have assigned Pin A and Pin B in the plugin and mapped UC400EETH/Encoder 1 to MPG#1. I can see the LED indicators on the board change when I move the jog wheel. But it just doesnt jog the axis is there something wrong in the gcode?