Custom faults

More
11 Mar 2023 15:47 #266410 by Dbsharp
Custom faults was created by Dbsharp
I have used the axis faults and spindle faults successfully, and I'm trying to find the best way to handle something similar.  I am trying to make a custom M Code to drive a hydraulic part off slide, and want it to fault if certain conditions are not met.  I can make a signal for the alarm, but am not sure what is the best way to tie it into linuxcnc like the axis faults are.  

I also want to do this for a number of other things on this machine.
Tool Change- I am using classic ladder but still need to work on fault handling. 
collet closer- It has a pressure switch input to indicate if it is closed. 
 

Please Log in or Create an account to join the conversation.

More
12 Mar 2023 02:14 #266461 by cmorley
Replied by cmorley on topic Custom faults
What kind of fault do you want? Just a message, abort, estop?
I don't think there is a really nice easy straight forward way to do this but there are ways to do it. mostly depends on what you want the fault to do.
The following user(s) said Thank You: Dbsharp

Please Log in or Create an account to join the conversation.

More
12 Mar 2023 21:57 #266519 by Dbsharp
Replied by Dbsharp on topic Custom faults
I think at least stop any running program and show fault name. The way it works for spindle or drive faults would be perfect, but really anything that will stop the program and let me look into what has failed and why.

Please Log in or Create an account to join the conversation.

More
14 Mar 2023 01:36 #266627 by cmorley
Replied by cmorley on topic Custom faults
I'd make a python program that sends an abort command and an error message.
You could signal it with a HAL pin, or incorporate it in the screen directly, depending on what screen you use.

Look here at 'abort()' and 'error_msg()' commands.
linuxcnc.org/docs/2.9/html/config/python...command_code_methods
The following user(s) said Thank You: Dbsharp

Please Log in or Create an account to join the conversation.

More
14 Mar 2023 23:09 #266711 by andypugh
Replied by andypugh on topic Custom faults
If you are using a G-code routine then there is the (ABORT, ......) magic comment.

linuxcnc.org/docs/stable/html/remap/rema...d_code_ngc_procedure

(This is hidden in the remap docs and should probably be added to the G-code section here too: linuxcnc.org/docs/stable/html/gcode/over....html#gcode:messages )
The following user(s) said Thank You: Dbsharp

Please Log in or Create an account to join the conversation.

More
23 Sep 2023 17:51 #281493 by Dbsharp
Replied by Dbsharp on topic Custom faults
So abort would be useful if running the G code tool change remap. I'm not sure that would provide a solution when running g code and using classic ladder to do tool changes.

Please Log in or Create an account to join the conversation.

More
23 Sep 2023 19:19 #281499 by andypugh
Replied by andypugh on topic Custom faults
I think you need the G-code abort simply to halt the tool change process. There are other ways, but G-code abort should be cleanest, and should also run the ON_ABORT routine defined in the INI.

You can also look at setting HAL pins from other code and linking them to the "message" HAL component.

Please Log in or Create an account to join the conversation.

Time to create page: 0.133 seconds
Powered by Kunena Forum