MechMate CNC Router Forum

Go Back   MechMate CNC Router Forum > Electrical & Electronic > 70. Control Systems
Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old Fri 04 May 2007, 14:52
Gerald_D
Just call me:
 
Setting up a remote pushbutton as an input to Mach3

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



(The pin numbers on the board layout might make more sense now )

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
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:
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 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.
Reply With Quote
  #2  
Old Fri 04 May 2007, 19:12
Robert Masson
Just call me:
 
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
Reply With Quote
  #3  
Old Tue 25 September 2007, 20:13
Doug_Ford
Just call me: Doug #3
 
Conway (Arkansas)
United States of America
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.
Reply With Quote
  #4  
Old Tue 25 September 2007, 22:09
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
Momentary is correct.
Reply With Quote
  #5  
Old Sun 13 January 2008, 14:26
Doug_Ford
Just call me: Doug #3
 
Conway (Arkansas)
United States of America
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?
Reply With Quote
  #6  
Old Sun 13 January 2008, 22:44
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
Doug this is the very first time I looked at "Mill Options" - this is what I saw:
Clipboard01.gif

I am rather useless for advice on optimising Mach3 - once it worked, I left it alone.
Reply With Quote
  #7  
Old Mon 14 January 2008, 07:45
Doug_Ford
Just call me: Doug #3
 
Conway (Arkansas)
United States of America
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.
Reply With Quote
  #8  
Old Mon 18 February 2008, 23:34
smreish
Just call me: Sean - #5, 28, 58 and others
 
Orlando, Florida
United States of America
Mach 3 pin mapping?

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?
Reply With Quote
  #9  
Old Mon 18 February 2008, 23:47
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
Sean, try this thread:
http://www.mechmate.com/forums/showthread.php?t=281 this one
Reply With Quote
  #10  
Old Tue 19 February 2008, 10:04
smreish
Just call me: Sean - #5, 28, 58 and others
 
Orlando, Florida
United States of America
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
Reply With Quote
  #11  
Old Fri 29 August 2008, 13:24
javeria
Just call me: Irfan #33
 
Bangalore
India
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
Reply With Quote
  #12  
Old Fri 29 August 2008, 14:11
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
Direct
Reply With Quote
  #13  
Old Mon 08 September 2008, 10:31
kaartman
Just call me: Koning #20
 
Abu Dhabi
United Arab Emirates
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
Reply With Quote
  #14  
Old Mon 08 September 2008, 11:35
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
Hi Koning, that is the way that ours is set up, but there may be other ways of doing it. Why do you ask?
Reply With Quote
  #15  
Old Mon 08 September 2008, 13:54
smreish
Just call me: Sean - #5, 28, 58 and others
 
Orlando, Florida
United States of America
Mine is configured so the "start" button is also the "resume" after a feedhold "pause".
Reply With Quote
  #16  
Old Tue 09 September 2008, 06:47
javeria
Just call me: Irfan #33
 
Bangalore
India
Sean how did ya do that
Reply With Quote
  #17  
Old Tue 09 September 2008, 08:39
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
Irfan, it just happens like that....start and resume mean the same thing, they are both Hotkey number 1000.
Reply With Quote
  #18  
Old Tue 09 September 2008, 18:37
javeria
Just call me: Irfan #33
 
Bangalore
India
Ah OK, thats nice to know that I can start machining on pressing a switch at the machine it self.
Reply With Quote
  #19  
Old Wed 10 September 2008, 01:31
kaartman
Just call me: Koning #20
 
Abu Dhabi
United Arab Emirates
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,
Reply With Quote
  #20  
Old Wed 10 September 2008, 02:48
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
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?
Reply With Quote
  #21  
Old Thu 11 September 2008, 01:08
kaartman
Just call me: Koning #20
 
Abu Dhabi
United Arab Emirates
Good morning
I do understand thank you.
Reply With Quote
  #22  
Old Sun 12 October 2008, 12:56
DMS
Just call me: Sharma #9 India
 
Rajasthan
India
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?
Reply With Quote
  #23  
Old Mon 13 October 2008, 07:09
DMS
Just call me: Sharma #9 India
 
Rajasthan
India
Ok I think I found my answer in this post http://www.mechmate.com/forums/showt...7&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.
Reply With Quote
  #24  
Old Wed 21 October 2009, 15:48
martin77pl
Just call me: Martin #39
 
Wroclaw
Poland
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.
Reply With Quote
  #25  
Old Wed 21 October 2009, 21:57
Richards
Just call me: Mike
 
South Jordan, UT
United States of America
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.
Reply With Quote
  #26  
Old Wed 21 October 2009, 22:02
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
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"
Reply With Quote
  #27  
Old Thu 22 October 2009, 09:38
martin77pl
Just call me: Martin #39
 
Wroclaw
Poland
Thank you Gerald and Richard, I had the feeling it could be done.
Reply With Quote
  #28  
Old Sat 22 March 2014, 12:37
Tom Ayres
Just call me: Tom #117
 
Bassett (VA)
United States of America
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.
Reply With Quote
Reply

Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 17:00.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.