Hello Guest it is June 25, 2019, 04:52:57 PM

Author Topic: Button Reprogramming...  (Read 4063 times)

0 Members and 1 Guest are viewing this topic.

Offline Davek0974

*
  •  2,545 2,545
    • View Profile
    • DD Metal Products Ltd
Button Reprogramming...
« on: April 02, 2014, 05:07:56 AM »
I have a "Origin" button on my plasma screen, it sets all the work DRO's to zero from my pendant.

Is there a way to have this button also press the "Regen Toolpath" button after it does its reset??

This would stop getting soft limit errors when using the pendant to start a job.
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline mbele

*
  •  58 58
    • View Profile
Re: Button Reprogramming...
« Reply #1 on: April 02, 2014, 05:57:42 AM »
- edit button script from mach via menu, or modify screenset with machscreen app
- regen toolpath with:
DoOEMButton(160)
at the end of the button script (160 is OEM button code of regen toolpath button)
- if you need to wait for machine to stop moving, put this before regen toolpath:
while isMoving()
sleep(100)
wend

I haven't tested it, but that should be the concept. There is lot of useful info in
http://www.machsupport.com/wp-content/uploads/2013/02/Mach3_V3.x_Macro_Prog_Ref.pdf
if you're interested.


Offline Davek0974

*
  •  2,545 2,545
    • View Profile
    • DD Metal Products Ltd
Re: Button Reprogramming...
« Reply #2 on: April 02, 2014, 06:04:15 AM »
Brilliant i will give it a go later on.


Thanks

Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline Davek0974

*
  •  2,545 2,545
    • View Profile
    • DD Metal Products Ltd
Re: Button Reprogramming...
« Reply #3 on: April 03, 2014, 03:59:42 AM »
Hmm, if I try to edit button script, the only buttons that flash are "ref all home" and "display mode", I can't edit the "Origin" button, Is there another easy way in??
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline mbele

*
  •  58 58
    • View Profile
Re: Button Reprogramming...
« Reply #4 on: April 03, 2014, 04:47:17 AM »
Probably there's no script attached to that button, and the button just executes one preprogramed function.
Check
http://www.kd-dietz.com/klausphp/pages/eng/machscreen/description/ms_description.html
Make backup of your mach instalation, and open screenset file with machscreen. When you select "origin" button, properties edit window will be populated with button properties. Note which function code it executes, then edit the script and execute same function via script, then add your custom code after that. Again that's the concept, but if your pendant is executing mach function, rather then emulating button press, it will not work. In that case, you'll have to find out how mach interprets pendant signals, and change the behavior(mach response) there - sorry, I know nothing about pendants.
Good luck

Offline Davek0974

*
  •  2,545 2,545
    • View Profile
    • DD Metal Products Ltd
Re: Button Reprogramming...
« Reply #5 on: April 03, 2014, 05:17:35 AM »
Well I've downloaded and got machscreen running but its way over my head i think.

All i could gather was the the Origin button has a short-cut of Ctrl-O, calls function 1007 and that's about it.

Is there a way I can add this simple command ?
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline Hood

*
  •  25,847 25,847
  • Carnoustie, Scotland
    • View Profile
Re: Button Reprogramming...
« Reply #6 on: April 03, 2014, 07:20:16 AM »
1007 is the OEM code for "ZeroAll", if you open the screenset in the screen designer then you can double click the button and change it to a VB button. When you then open in Mach it will be a VB button and you can add the code you wish.
Hood

Offline Davek0974

*
  •  2,545 2,545
    • View Profile
    • DD Metal Products Ltd
Re: Button Reprogramming...
« Reply #7 on: April 03, 2014, 08:05:33 AM »
Any idea how i do that. I'm not seeing any "convert to VB" features mentioned????
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline mbele

*
  •  58 58
    • View Profile
Re: Button Reprogramming...
« Reply #8 on: April 03, 2014, 08:16:29 AM »
:)
...or click exec code in property editor (in second column), click basic script, and put your code there:
DoOEMButton(1007)
DoOEMButton(160)

Offline Hood

*
  •  25,847 25,847
  • Carnoustie, Scotland
    • View Profile
Re: Button Reprogramming...
« Reply #9 on: April 03, 2014, 08:33:55 AM »
I dont use MachScreen so not sure how you do it there, in Screen4 the option is there.
As mbele has pointed out you could use the Code function to do it as long as it allows multiple line code.
Hood