PDA

View Full Version : Setting up a remote pushbutton as an input to Mach3


Gerald_D
Fri 04 May 2007, 13:52
Mach3 sends and receives all its signals via the parallel port where there is a connector with 25 pins - learn to use the terms ports and pins.

In more complex systems, a second port may be added, meaning a second printer cable and a second break out board (BOB). But, for starters, let us accept we only have one BOB and one (parallel) port with 25 pins.

So, we must connect the push-button across two of those pins and then we must tell Mach3:
a. Which two pins have been used, and
b. What to do if it receives a signal on those pins

a. Let's first pick some pins:
Mach3 allows you to use pin numbers 10, 11, 12, 13 & 15 as inputs. The pushbutton goes from one of these pins to ground. When you push the button, the connected pin gets grounded - goes to zero volt. Where is the ground pin of that port? Well, there is a bit of confusion about this, but mostly all the pins 18 to 25 are ground. However, don't worry about the confusion, because this is where the BOB builders help us out - the BOB's have connections clearly marked as Ground (GND). On our MechMate we have put a pushbutton from pin 12 to ground for the "Feedhold" or "Pause" function. On the PMDX-122, the 2 wires from the pushbutton go to connector block J5

http://www.mechmate.com/Forum/messages/832/15129.gif

(The pin numbers on the board layout might make more sense now http://www.mechmate.com/Forum/clipart/happy.gif)

c. Now we must tell Mach3 what to do when pin 12 is connected to ground - ie. when an input is received on pin 12. We will use a two facilities in Mach3: "OEM Triggers" and "System Hotkeys" I don't know exactly what the names mean (check the Mach3 site for that), but I do know how to get them to work. What follows are from Mach3 V1.84 that is still the current "lock-down" version.

1. Config > Ports & Pins |tab: Input Signals
http://www.mechmate.com/Forum/messages/832/15131.gif
Scroll down till you see which function you want to achieve with the push-button (or limit switch, or probe, etc) that has been connected between pin 12 and ground. In this case we do not see a Pause or FeedHold, so we pick OEM Trigger #1 on the left
Click "Enable" for a green tick
Enter port number1
Enter pin number 12
Press OK to close screen


2. Config > System Hotkeys:
http://www.mechmate.com/Forum/messages/832/15130.gif
Enter the number 1001 next to OEM Trigger #1
(to find the appropriate "Hotkey number" for a particular keyboard funtion is a bit of a schlep - a separate thread by itself. Just believe me for now that Pause/Feedhold = 1001, CycleStart/Resume=1000. I used this list (http://www.artsoftcontrols.com/MachCustomizeWiki/index.php?title=OEM_Buttons) for reference.)
Press OK to close that screen.

And now your pushbutton should make the "Feedhold" work! :)

One of the frustrating things with Mach is the speed of the software development, and the documentation which lags behind. As an example, on the screen the button is marked Feed Hold, in that last listed document there is a Pause, which to me appears to do exactly the same thing. If you ask at the Mach forum if they are the same, you might get a couple of conflicting, confusing replies. In all of this Mach stuff I am really very much in the dark, the best I can do is to tell you what works for me - I am learning along with the rest of you.

Robert Masson
Fri 04 May 2007, 18:12
Thanks Gerald for the well explained steps.

I'm not there yet as you know, but this will be worth gold when time comes.
It will help me and I'm sure some other too.

Robert M

Doug_Ford
Tue 25 September 2007, 19:13
Gerald, I read in another post that the pause and resume buttons are normally open switches. I was about to order them today from Factorymation but I didn't know if they should be the type that you have to press again to release or if they should be momentary switches. I'm guessing momentary but I didn't want to make an incorrect assumption. Can you tell me? Thanks.

Gerald D
Tue 25 September 2007, 21:09
Momentary is correct.

Doug_Ford
Sun 13 January 2008, 13:26
Gerald,

I'm trying to configure Mach 3 and a question came up. The answer seems obvious but I just want to check because it hasn't been covered on this forum and I've been surprised before. In Ports and Pins->Mill Options, the bottom right box is titled "General Options" and contains a square that can be checked if "homed true when no home switches." The manual says to check it if you don't have home switches. Did you check that box on your Mechmate? If not, why?

Gerald D
Sun 13 January 2008, 21:44
Doug this is the very first time I looked at "Mill Options" - this is what I saw:
745

I am rather useless for advice on optimising Mach3 - once it worked, I left it alone.

Doug_Ford
Mon 14 January 2008, 06:45
Thanks Gerald. According to the manual, it says that if the block is checked, the LEDs will light up saying the machine is homed. If that's all, then it's no big deal in my opinion either way but as you pointed out in an earlier email, the documentation isn't that great. I thought there might be more to it so I asked just in case.

I appreciate the response.

smreish
Mon 18 February 2008, 22:34
This post originally made in another forum:

Gerald,
For the life of me I can find in the Mach 3 menus on where to map the input pins to functions. IE, I am trying to set Input #2, pin 12 to be feed pause and #3, pin 13 to Resume. I must be blind, because I can't find reference to it in the Mach Manual. Anyone have the quick answer?

Gerald D
Mon 18 February 2008, 22:47
Sean, try this thread:
http://www.mechmate.com/forums/showthread.php?t=281 this one

smreish
Tue 19 February 2008, 09:04
Gerald,
That was really easy. Thanks for pointing me in the right direction. Also, that reference page of OEM codes is WONDERFUL information.
All working just as it is supposed to be now.
Thanks.
Sean

javeria
Fri 29 August 2008, 12:24
Hi Gerald, have you used wires directly from the BOB to the machine - or have used any sort of high voltage (like 24V) to run these switches.

RGDS
Irfan

Gerald D
Fri 29 August 2008, 13:11
Direct

kaartman
Mon 08 September 2008, 09:31
Hi gerald
question from post #3 above
Do we need to press a "resume" button to start the work again after a "pause" button was pressed if a PMDX 122 is used?
Regards

Gerald D
Mon 08 September 2008, 10:35
Hi Koning, that is the way that ours is set up, but there may be other ways of doing it. Why do you ask?

smreish
Mon 08 September 2008, 12:54
Mine is configured so the "start" button is also the "resume" after a feedhold "pause".

javeria
Tue 09 September 2008, 05:47
Sean how did ya do that

Gerald D
Tue 09 September 2008, 07:39
Irfan, it just happens like that....start and resume mean the same thing, they are both Hotkey number 1000.

javeria
Tue 09 September 2008, 17:37
Ah OK, thats nice to know that I can start machining on pressing a switch at the machine it self. :)

kaartman
Wed 10 September 2008, 00:31
Morning Gerald
When I push a the normally open switch to engage pause the contacts close and the pull-up resistor create a logic low for as long as keep on pressing the switch and the signal to the controllers are paused, when I take my finger away from the switch connection is open and we have a logic +5 high and operation continue, this is how I understand it, if I want to pause the cutting to go to the bathroom then why don’t we use a toggle switch, :confused:

Gerald D
Wed 10 September 2008, 01:48
We use the operating switches like your keyboard "switches"......none of them "latch". Stop & Go on machine tools are typically two buttons (red & green) and we stay with that convention - this is a workshop tool.

However, Mach can be configured in lots of different ways. You might be able to configure it to work with a toggle switch, but somehow I doubt that. The programming guys will need to tell us if things like "interrupts" will work if an input is persistent?

kaartman
Thu 11 September 2008, 00:08
Good morning
I do understand thank you.

DMS
Sun 12 October 2008, 11:56
There is no OEM code for z zero routine.
How to relate Z zero (touch plate) script with push button to start z zero routine remotely?
There is a OEMTrigger runs the macro in SetTriggerMacro 301. Can this be used and how? I think I should trigger the OEM via script to activate z zero routine, but donot know how?
Has anyone done that?

DMS
Mon 13 October 2008, 06:09
Ok I think I found my answer in this post http://www.mechmate.com/forums/showthread.php?p=9737&postcount=38
I've also gone through Greg's post in CNCzone this http://www.cnczone.com/forums/showthread.php?t=36099
Thanks Greg for this wonderful post, what I was missing I found in this great forum.
Have to digest it.:)

martin77pl
Wed 21 October 2009, 14:48
Is it possible to operate pause and resume function of the remote push buttons if they are NC and not NO? I just realised I got it wrong. I used three NO push buttons for pause and resume wired in series and they should be wired each seperately.

Richards
Wed 21 October 2009, 20:57
Normally Closed switches are wired in SERIES to signal ground. When inactive, they hold the input line LOW. When any switch is opened, the input line goes HIGH.

Normally Open switches are wired in PARALLEL to ground. The input signal is pulled HIGH through a pull-up resistor. When inactive, the pull-up resistor holds the signal input line HIGH When any switch is closed, the signal input line goes LOW.

Gerald D
Wed 21 October 2009, 21:02
Martin, Mach3 does allow you to use NC in series. You must do the Mach3 setup on those functions for "Active High" instead of "Active Low"

martin77pl
Thu 22 October 2009, 08:38
Thank you Gerald and Richard, I had the feeling it could be done.

Tom Ayres
Sat 22 March 2014, 11:37
Just an update for those who are using the PMDX-126 bob in EXPANDED INPUT Mode, Single parallel port. This may or may not work for your set up but if like mine I know it does.

Here's my suggestion using my configuration:

--PMDX-126 bob set up in EXPANDED INPUT mode (see manual for dip sw settings and jumpers)
--PMDX-107 (spindle control) no changes made to existing set-up
--Start (green) and Pause (yellow) momentary buttons (NO) at control points on machine, wired parallel, one wire connected to J11 pins "E" and "F" respectively and other to its ground respectively
--Configure Inputs, go to Config, ports and pins, Input, go to OEM Triggers #1 and #2, Set BOTH ports for #8 (pseudo port) Set Pins to "11" and "12" (11 is "E" and 12 is "F") Enable both, active High (red X in the active low column) and click apply
--Set up Hotkeys, go to config, Hotkey set-up, set OEM triggers 1 & 2 for 1001 Pause and 1000 Start (you choose based on your set-up)
--Mach3 Plug-in found on PMDX website under downloads, be sure to get the manual and follow install directions exactly, close and restart mach, go into config, plug-in config, choose PMDX125/126, enable, click on config(in yellow) Mark Expanded Input Mode, Here you will also be able to verify the setup you have made, Click OK

Test your set up, set your machine as if its going to run a job, g-code and all, press the Start button, job should start, press Pause button, job should pause, CAUTION**It Does Not Stop the Spindle From Spinning** only pauses further advancement of the program so you can clear debris or tighten a loose clamp or whatever you need to do. Press Start button again to resume program.

Hopefully I've not forgotten anything, but worse case scenario is you get real close and have to ask questions.

I've not tried the expanded output mode but I'm sure its similar. Good luck.