Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: curtisturner on August 21, 2007, 10:48:40 AM

Title: Joging an axes with inputs
Post by: curtisturner on August 21, 2007, 10:48:40 AM
Is there any way to jog one of the axis with a closed circuit.
If not what kind of input needs to be appiled to the input pins on the parrallel port.

Thanks
Curtis
Title: Re: Joging an axes with inputs
Post by: jimpinder on August 21, 2007, 02:31:41 PM
I do not understand the question. The parallel printer port is connected to your stepper motor driver boards, perhaps via a breakout board. On my stepper driver boards there are two inputs for each axis. One is for direction, the other makes the motor take a step each time a Negative pulse is applied to the board from the appropriate pin on the parallel port ( as per your pin outs). There is no other drive to the motor. Jogging is just a longer , faster series of pulses applied to the same input as any other G0 G1 G2 etc movement.

If you are asking why you cannot Jog when on some of the program pages, I understand Art cut it off on those pages for safety, and so that you could not inadvertantly interfere with the positioning of the machine, whilst it was running a program.
Title: Re: Joging an axes with inputs
Post by: Chaoticone on August 21, 2007, 02:36:36 PM
Hey Curtis,
    Are you asking if you can wire a button to jog? If this is the question, then yes. I have had joystick switches to move mine about before. It is very simple to do. You can even use a game pad. If this is what you want, let me know.

Brett
Title: Re: Joging an axes with inputs
Post by: curtisturner on August 21, 2007, 05:08:45 PM
Yes, joging with a push button. (external joging)
Can it be done with the Parallel port or serial  (I do not have a game port)


Thanks
Curtis
Title: Re: Joging an axes with inputs
Post by: Chaoticone on August 21, 2007, 05:50:35 PM
My game pad is a usb, that is all you need for it. You don't onstall the drivers for the gamepad either, just plug it in and set it up in keygrabber.

OK here is wht you do to set a button up as jog. In config, ports and pins, inputs, oem triggers, these are the pins you will use. Go to config, system hot keys and assign the button you wired the OEM codes you want. I have attached a few screen shots to help.

Brett
Title: Re: Joging an axes with inputs
Post by: poppabear on August 21, 2007, 06:11:30 PM
yes you can,

to move an axis you will need 2 buttons per axis, and 2 inputs per axis, (you may need to goto a second bi-directional Break out board, so you can have 10 inputs).

for example on the X axis: Lets say INPUT1 represents Jog X++, and INPUT2 represents Jog X--, lets say that on 2cd Parrallel port, pins 2 and 3

Now you will need to hit your tab button, and set up your jog type, i.e. continous or step(and amount).

Now put this in the macropump:

'Macropump.m1s

If IsActive(INPUT1) Then              'your pushing the X+ jog, it will move continous until you let go, if jog is in continous state
SetUserLED(1200,1)                     'this is to set an interlock
DoOEMButton(307)                      'jogs your x +
End If

If Not(IsActive(INPUT1)) And GetUserLED(1200) Then   'When you let go of the button, this stops it from keeping going.
SetUserLED(1200,0)                                                  'resets interlock for next jog
DoOEMButton(1003)                                                  'stop
End If

If IsActive(INPUT2) Then                          'X-jog input
SetUserLED(1201,1)
DoOEMButton(308)
End If

If Not(IsActive(INPUT2)) And GetUserLED(1201) Then
SetUserLED(1201,0)
DoOEMButton(1003)
End If

'you will need to do these four If-Thens per axis, (2 inputs per axis), after saving your macro pump, remember to set on macro pump in general, and restart mach.

'Scott


Title: Re: Joging an axes with inputs
Post by: olf20 on August 21, 2007, 07:22:40 PM
Chaoticone, what game pad are you using??
Do I understand you correctly that all you do is plug in the game pad to any USB port set up KeyGrabber and define the key movements relative to x +- and so on?
Did you extend your USB cable, and have you had any problems with noise.
Thanks for any help!
olf20
Title: Re: Joging an axes with inputs
Post by: Chaoticone on August 21, 2007, 07:40:28 PM
That is correct. I have had no trouble with noise. It came with a 6 foot retractable cord, didn't need any more than that. Check out this thread.

http://www.artsoftcontrols.com/forum/index.php?topic=1391.0

Brett
Title: Re: Joging an axes with inputs
Post by: curtisturner on August 21, 2007, 09:21:30 PM
poppabear (Scott)

How do hook up a switch to the parallel port (pin2 and pin25)