Hello Guest it is March 28, 2024, 04:21:53 PM

Author Topic: External RESET buton, HOME button  (Read 4252 times)

0 Members and 1 Guest are viewing this topic.

External RESET buton, HOME button
« on: November 15, 2015, 01:21:36 PM »
Hi to all of you.  I am a newbe to CNC and have so far made my own mill using 80-20 and Mach3.

I would like to add an external button at the machine to RESET Mach3 from the machine.  Additionally would also like to add an external HOME button.

Have looked at screen builder, and OEM buttons, but have no idea how to implement any of these.

Any direction to papers or information to describe how to use the tools would be greatly appreciated.

Thanks for any help.

Best,
Al McPherson, P.E.
Re: External RESET buton, HOME button
« Reply #1 on: November 17, 2015, 01:30:51 PM »
How are you controlling your milling machine?

Parrallel port or external motion controller?

Do you have any spare (2 number required) input pins that these switches / buttons could be wired to?

Alternatively... you could install a second printer port ..... or you could build / install a second keyboard (or a keyboard emulator) which you then would program (very easily) to emulate the keyboard hotkeys.

I need to understand your setup a little.

Rob U.E.  (sorry... sarcasm... unpaid engineer) ;)

seriously I can walk you through what you'll need to do an learn a little a long the way (you don't need screenbuilder [yet])

Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”
Re: External RESET buton, HOME button
« Reply #2 on: December 04, 2015, 11:48:36 AM »
Hi Robert, I have built a keyboard emulator using the Arduino Leonardo. I thought it would be simple to just plug it in and away I go, but no... I can get it to work on ever graphics program I have except Mach3. I am trying to use a joystick to jog and also would like to zero DRO at a specific point and then run.  stop would also be useful. Could you point me to a step by step guide, if the is one on how to do this.  Thanks in advance
Re: External RESET buton, HOME button
« Reply #3 on: December 04, 2015, 12:40:34 PM »
Hi Colin,

I've got a few Arduino Micro's knocking about (same ATMega32u4 as the leonardo), I'll breadboard a keyboard emulator a little later this weekend.

Presume you just used the STD arduino keyboard library? https://www.arduino.cc/en/Reference/MouseKeyboard

How have you setup the joystick?  Is it a mouse emulator (using analogue inputs) or are you using it with digital inputs.

Can I have a look at your sketch? (either attach it or email it (link on the LHS))

Rob
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”
Re: External RESET buton, HOME button
« Reply #4 on: December 05, 2015, 04:03:11 AM »
Colin,

what keys did you select for your corresponding arduino inputs?

what screenset are you using?

The reason why I ask is the keyboard shortcuts are programmed into the screenset (you can change them with a screen editor (I use MachScreen)).
http://www.kd-dietz.com/klausphp/pages/eng/machscreen/description/ms_description.html

So If you take my setup (plasma), I can fire my torch with the "F5" key, or the engraver with the "F6" key.  Some of the other standard ones are:
Stop = Alt +S
Cycle Start = Alt + R
etc

So basically you will need to ensure that you have programmed the arduino to emulate those keyboard commands (or any others you setup in the screenset)

The joystick, may take a little more thought....(not sure what you intend)
If you move the joystick one direction:
do you want the machine to jog faster in that direction as you move it?
Or do you just want it to move in that direction? (easiest to do)
or do you want a two setting type operation (move it a bit and it moves at one speed, move it all the way over and it moves at a faster speed)   (more difficult but not as difficult as the first choice).

Mach likes digital signals, analogue signals can add complexity and then its the plugin route I'd suggest.

Rob


Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”
Re: External RESET buton, HOME button
« Reply #5 on: December 06, 2015, 12:06:49 PM »
Thanks for the Reply Rob,  I am away this weekend but will get all the details to you soonest.  The only thing ive done is connect several switches to leonardo and have been using, keyboard.print, keyboard.line and mouse etc. usng extended keys for control keys.  I havent changed anything in Mach3 as I really didnt know what to change. I was going to implement the XBOX add on to see what that would do.

Colin
Re: External RESET buton, HOME button
« Reply #6 on: December 06, 2015, 12:09:55 PM »
I have written a small progam which will add shift key after ten ups, downs, lefts or rights.  I also have keys for page up and page down with the same shift key addittion.

Colin