Hello Guest it is January 22, 2020, 08:20:37 PM

Author Topic: Adding external push buttons  (Read 8456 times)

0 Members and 1 Guest are viewing this topic.

Offline dah79

*
  •  35 35
    • View Profile
Adding external push buttons
« on: January 22, 2016, 09:39:48 AM »
Hello. 

I am looking at retrofitting an outdated mill using a MachMotion controller.  I would like to be able to use the spare inputs on their Apollo III controller to connect external push buttons or possibly a joystick used for jogging remotely.  I have no experience with Mach4, so am looking for a way how to do this...or if it is easily done.

I have read many posts here and I am pretty sure that it is possible, just need some direction as to the easiest way.  If possible, I would like to have 4 buttons for Continuous jog of X/Y + & - and then have 2 more buttons for Incremental jog of Z.

I know there are other options for jogging using the software, keyboard or MPG, but I am looking for a remote option.

Thank you

Offline ger21

*
  • *
  •  6,291 6,291
    • View Profile
    • The CNC Woodworker
Re: Adding external push buttons
« Reply #1 on: January 22, 2016, 10:00:22 AM »
From what I've read here, the Machmotion people probably know more about Mach4 than anyone outside of Artsoft. Have you asked them?
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline dah79

*
  •  35 35
    • View Profile
Re: Adding external push buttons
« Reply #2 on: January 22, 2016, 10:10:12 AM »
Yes, I have asked them and was told that they weren't sure.  Looking at 'Brains', it looks like it could be done there??

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Adding external push buttons
« Reply #3 on: January 22, 2016, 08:50:53 PM »
you can do it with a script just find Daz and ask him

Offline dah79

*
  •  35 35
    • View Profile
Re: Adding external push buttons
« Reply #4 on: January 23, 2016, 08:51:16 AM »
Looks like possibly using an OEMtrigger would work as well, can anyone verify?

Re: Adding external push buttons
« Reply #5 on: January 23, 2016, 10:21:10 AM »
OEMtriggers are called Signal Scripts in Mach4.

See section 3.2.4 of the Mach4 Scripting Manual.

See:  http://www.pmdx.com/Downloads_Mach4/Mach4_Documentation/Mach4%20Scripting%20Manual.pdf

or: http://www.machsupport.com/wp-content/uploads/2014/05/Mach4%20Scripting%20Manual.pdf

This section of the manual gives an example of a physical Cycle Start button implementation.

« Last Edit: January 23, 2016, 10:25:51 AM by Steve Stallings »
Steve Stallings
www.PMDX.com
For PMDX product support, please use PMDX forum or direct email for quickest response. We do not use this forum as our primary product support site.

Offline Pedio

*
  •  200 200
    • View Profile
Re: Adding external push buttons
« Reply #6 on: January 23, 2016, 10:21:40 AM »
I added a manual pause button and go button to mine. There was a good post on this issue. You should be able to find it with a little looking on this forum.

That was before they got the shuttlePro plug in working. Now life is nirvana for me! Just remember the wheeles in the middle of the shuttle pro use the current jog increment as a basis for their movement. You also may have to play with the jog rate and Jog rate % to get it really working.

It was worth every penny!

Offline DazTheGas

*
  •  752 752
  • DazTheGas
    • View Profile
Re: Adding external push buttons
« Reply #7 on: January 24, 2016, 06:53:26 AM »
As steve says the signal scripts are the way to make anything work you can think of within mach4

if you go into the screen editor and look at the startup script there are a few examples there.

For example if you were wanting to use your extra inputs you have left as jogging then you would need a signal for each axis you wanted to jog, so for xyz that would be 3 inputs altogether + any other buttons like jog mode.

Code: [Select]
[mc.ISIG_INPUT10] = function (state) -- assign input 10 to X++
    if (state == 1) then   
       mc.mcJogVelocityStart(inst,0,1);
    else
       mc.mcJogVelocityStop(inst,0);
    end

end,

Although the code above is straight forward you would have to add in extra stuff to your code to check if you are in 'cont' mode or 'inc' mode, because this signal is in a constant loop mach4 will also need a condition for this signal in the case you were using the keyboard jog or external control otherwise the mcJogVelocityStop or mcJogIncStop etc would overide other devices with jogging support rendering them useless.

DazTheGas
Theres always time for a choccy biccy
Re: Adding external push buttons
« Reply #8 on: January 24, 2016, 06:41:02 PM »
   I'm watching this also , I have a control panel with 33 Push buttons id like to incorporate into my Retrofit.
I spoke with Machmotion and they wouldn't help me either .  I don't have the codeing knowledge to use the examples to write my own scripts.

Offline dah79

*
  •  35 35
    • View Profile
Re: Adding external push buttons
« Reply #9 on: January 24, 2016, 08:09:08 PM »
Thanks for the replies.  I too do not have the programming knowledge at the moment as I am just looking into Mach.  From what I have read, though, it looks like 'Brains' would be a simpler programming method IF it would work.  I come from a PLC programming background and it is easier to understand.

So, if there is anyone out there that can answer this, I am still interested.