Planet CNC currently offers customizable OnStart OnEnd and OnStop scripts. I was wondering if there is a similar option for the E-Stop event.
Best Regards,
Klaus
Planet CNC currently offers customizable OnStart OnEnd and OnStop scripts. I was wondering if there is a similar option for the E-Stop event.
Best Regards,
Klaus
Problem is that in E-Stop controller can not execute any commands. Therefore it can not execute scripts.
What do you want to do in this event?
I'm currently implementing a tool spindle runtime routine. basically staving the timestamp a the spindle was startet with a tool (in M3 and M4) and calculating the difference when the spindle gets stopped with M5. This works fine for me. However if the Spindle gets stop due to a E-Stop this time would be missed.
Its not a big deal as it should not happen on a regular basis, however it got me thinking if there is some way that is not mentioned in the documentation.
OnEStop will be available in Expr.txt in next version.
sounds great.
Thanks.
Hi PlanetCNC,
I also would be very happy to use an OnEStop Script. Is this meanwhile available?
I would like to reset all PWM outputs with estop, which is not the case with my current version from Feb.2023.
Using Estop script I would be able to realize this. Or is there any other solution?
Best regards Armin
...found it be myself:
https://planet-cnc.com/cnc-machine-s...pr-txt-part-4/
Amazing what functions PlanetCNC/TNG offers, but difficult to get all the necessary documentations!
BR Sailnsea
Additional info:
https://cnc.zone/expr/expr
https://cnc.zone/expr/events/events
https://cnc.zone/expr/events/event-onestop
For any future info, project or user manual requests, I recommend that you visit our page cnc.zone:
https://cnc.zone/home
Thanks for this links! Very helpful to solve some ideas on my machine.
But still one problem open: How could I reset PWM-outputs after a EStop-Event. Problem is that the TNG-dutycycle-parameters for PWM-outputs are R-only and cannot be changed for example in the expr.txt Event-handling.
I need to reset them, same behaviour as for the normal outputs after an EStop. They keep in off-state after restart and must be set again. PWM keeps working.
Thankyou for any advice to this. BR SailnSea
Thankyou PlanetCNC!
I testet the event-handling of func-outpwm() in expr.txt:
Result: It does not switsch off the PWM-output when using in #OnEstop
Expr.txt see below. The print-commands in #OnEStop are working, I got the info on the output window, but PWM-out still keeps in on-state. no reaction there.
To be sure that I use the correct output number, I also tested outpwm() in event #OnJog.
There it works as expected.
Hope of any hint????
Other idea to solve the problem: Is it possible to make somehow a controller reset in #OnEStop. Because making this manually will reset the PWM-outputs.
contents of my expr.txt:
#OnEStop
print('EXPRtxt PWMout Channel2');
outpwm(1, 0);
print('EXPRtxt PWMoutoff');
#OnStop
print('EXPRtxt OnStop');
#OnEnd
print('EXPRtxt OnEnd');
#OnJog
print('EXPRtxt OnJog');
;outpwm(1, 0);
Hi PlanetCNC,
the func outpwm() does not work in event handlerexpr.txt on #OnEstop???
(See commet above)
I want/must swich off the PWM-Output in case of an EStop.
Any suggestion how to reach this would be very helpful?
BR SailnSea
With Estop activated, any "live" output, either digital output pin or output pin with PWM functionality, will be automatically set to 0
Thanks for response!
Yes, any "live" output is set to 0 with Estop, that works fine, but my problem: after cancelling an Estop, the PWM-functionalloty still works as before the Estop, where as any digital output remains 0 (those must be set again).
In my application, the PWM-signal feeds an additional spindle axis which starts moving after cancelling an Estop and that might become dangerous. I would be happy to reset PWM totally with Estop and after Estop.
Any suggestion to solve this by software would be helpfull.
BR Ssailnsea
New version will have option to turn off PWM pins on e-Stop
Hi Planet-CNC,
thank you!
This looks great!
Best machine control and support I know :-)
BR SailnSea
Hei there, how can I switch off on E-Stop the ext-out ports? I have spindle coolant pump and mist on that board and they stay on when I press the E-stop button...
Ok, I found a way: create expr.txt under default profile folder and put
#OnEStop
extout1(X, 0)