Page 1 of 1
External Button Set-Up
Posted: Mon Aug 30, 2021 2:53 pm
by cemoa9
Hello Tom,
Another simple lovely topic which I couldn't solve by myself :/
I have external buttons connected and physically working (checked in Kmotion IO) and I try to make them operate the machine, I followed the instructions here (
archive/attachments/Adding%20External%20Buttons.pdf) as much as I could but without success.
Compiler does not give any error but when clicking init the DRO gets yellow and stay yellow.
Please help !
Cordially
Francois
Re: External Button Set-Up
Posted: Mon Aug 30, 2021 4:00 pm
by TomKerekes
Hi Francois,
You should be able to debug things like this yourself. My guess would be ESTOP is being triggered. Add printfs to determine what is happening.
Re: External Button Set-Up
Posted: Tue Aug 31, 2021 7:42 am
by cemoa9
Morning Tom,
Crap you were right for both...
Modified the code, now works properly, thank you Tom !
Re: External Button Set-Up
Posted: Sun Aug 06, 2023 4:31 am
by Ibzan
Hello Tom.
I am trying to add an E-stop (emergency) button, as indicated in this document.
Do I assign it to the M code (Stop) as shown in the figure below. Is that correct?
Another question, when I press the Estop button, it executes the C code and disables the axes, if for some reason the communication between the PC and Kflop were to be lost, this method would not work.
Is there a way to make the E-stop button work in Hardware?
Thank you very much, regards.
Re: External Button Set-Up
Posted: Sun Aug 06, 2023 5:37 pm
by TomKerekes
Hi Ibzan,
Do I assign it to the M code (Stop) as shown in the figure below. Is that correct?
No. Add it at he end of your Init C Program.
Is there a way to make the E-stop button work in Hardware?
Yes. Add C Code to do whatever you want EStop to do. ie disable axes or turn off contactor relay.
Re: External Button Set-Up
Posted: Mon Aug 07, 2023 8:23 pm
by Ibzan
TomKerekes wrote: ↑Sun Aug 06, 2023 5:37 pm
Hi Tom,
It already loads the code to my INIT program. I hope this is the correct way
If I understood correctly, would I have to add code in c to activate or deactivate relays in this part of the code?
Re: External Button Set-Up
Posted: Mon Aug 07, 2023 9:14 pm
by TomKerekes
Yes within the 'if' condition.