Hello Guest it is September 28, 2021, 12:57:19 AM

Author Topic: Start Cycle with a Push Button in Mach4  (Read 344 times)

0 Members and 1 Guest are viewing this topic.

Start Cycle with a Push Button in Mach4
« on: January 28, 2021, 09:48:49 AM »
Hi!
I want to Start Cycle with a Push Button instead clicking with the mouse in the yellow label on the screen of Mach4.
Where I must connect the two wires coming from the Push Button
Ferdi
Re: Start Cycle with a Push Button in Mach4
« Reply #1 on: January 29, 2021, 08:09:53 AM »
You can set it up as an input. Check in the logging that it is working. After that you will need to edit the Signal script table in the screen load script (this is done in edit mode of the screen). You will see an example of the code you need in the script  with it rem'd out.  Sounds hard but it will be simple to walk you through it.
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Start Cycle with a Push Button in Mach4
« Reply #2 on: August 22, 2021, 01:04:09 PM »
I am looking at the same thing here and have followed what you have said. I tried editing the file to associate input 0 with a cycle start. I edit the example but i get an error and I am unable to save the file. Access denied.

Sorry if this is a dumb question but this is my first week with Mach4

PS I do have the button press show up on the diagnostic screen so I believe this is the last step?

Offline smurph

*
  • *
  •  1,465 1,465
  • "That there... that's an RV."
    • View Profile
Re: Start Cycle with a Push Button in Mach4
« Reply #3 on: August 24, 2021, 06:56:02 PM »
The PMC is a GRAND tool to use to accomplish this task.

A one rung ladder consisting of a contact(mapped to an input of your coosing) to a one shot rising to a core action coil (cycle start).

Steve
Re: Start Cycle with a Push Button in Mach4
« Reply #4 on: August 26, 2021, 01:42:26 PM »
I used this code to use an external button to cycle start. I also have one for cycle stop and feed hold.
Code below:

-------------------------------Cycle Start-------------------------------

[mc.ISIG_INPUT16] = function (state)      --If you are not using INPUT16 for Cycle Start change it.
    InputCycleStart()
    end,

---------------------------------------------------------------
-- The Input Signal for a Cycle Start Occurred.
---------------------------------------------------------------

function InputCycleStart()
    CycleStart()
    mc.mcCntlSetLastError(inst, "Cycle Start")
end
Re: Start Cycle with a Push Button in Mach4
« Reply #5 on: August 26, 2021, 03:44:24 PM »
PMC only ,after some years with mach not few machines ,believe me PMC its only option for external button