Hello Guest it is May 24, 2025, 10:31:49 PM

Author Topic: Editing the Spindle button  (Read 5848 times)

0 Members and 1 Guest are viewing this topic.

Editing the Spindle button
« on: August 05, 2024, 08:52:53 PM »
This might have been previously answered but I cannot find it. I am setting up Mach3 for a friend of mine. I would like to edit the "Spindle CW F5" button script to include an output when that button is selected. I have tried using the MachScreen editor but that only seems to allow me to move and resize the images. I cannot see how to edit the button script in that editor.

I already know how to do that for the M3 macro. But that only works when I type in M3 in the MDI or within the Gcode.

Any help would be greatly appreciated.

Thank you,

Randy

Offline TPS

*
  •  2,578 2,578
Re: Editing the Spindle button
« Reply #1 on: August 07, 2024, 01:17:11 AM »
in standard screen the is no button script in "Spindle CW F5".
you have to change OEMCode (i am using machScreen as well)
from 110 to 34, the select standard code -> excecute basic script.
now you can place the basic script code, same as in M3.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Editing the Spindle button
« Reply #2 on: August 07, 2024, 03:07:23 AM »
in standard screen the is no button script in "Spindle CW F5".
you have to change OEMCode (i am using machScreen as well)
from 110 to 34, the select standard code -> excecute basic script.
now you can place the basic script code, same as in M3.

Thank you very much. I was able change that button so that I could edit the script. What I'm trying to do is when I click on that button the spindle starts + an output turns on. I was able to get it to do that. The way that button worked before was that a click would turn the spindle on then another click would turn it off. Now the first click does what I want it to do but the 2nd click has no effect. The spindle and the output stay on. That makes sense as there is nothing in the script turning those off. I'm assuming that I am either going to have to add that to the script or make another button that implements the M5 command as well as deactivating the output. Could you tell me if I'm correct? Again, thank you very much.

Offline TPS

*
  •  2,578 2,578
Re: Editing the Spindle button
« Reply #3 on: August 07, 2024, 08:49:43 AM »
you can check wether spindle is running in your script.
something like this:

Code: [Select]
  'check spindle is running
  If GetOEMLed(11) Then
    'put code if spindle is ON here
     MsgBox("spindle is ON")
  Else
    'put code if spindle is OFF here   
     MsgBox("spindle is OFF")
  End If 
  'toggle spindle ON/OFF
  DoOEMButton(110)
 
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Editing the Spindle button
« Reply #4 on: August 08, 2024, 07:28:13 AM »
Thank you very much for your help,

Randy