Adding error sources to LinuxCNC

More
10 Sep 2014 15:35 - 10 Sep 2014 15:36 #51000 by DaBit
I am wondering if I can add 'fatal error sources' to LinuxCNC?

For example: I have two Y joints (gantry mill) that both receive the same motor position command. If these get out of sync more than 0,2mm I currently throw a joint 1 servo fault by setting axis.1.amp-fault-in to true. This works, but then I have to start halshow to figure out what really caused the error.

A message saying 'Y joints out of sync' and the same behaviour as a normal amplifier fault would be much nicer. And I do have more critical error sources that I would like to give their own message. Spindle VFD communication failure, spindle temperature too high, spindle overtorque, incoming power supply phase loss, etcetera.
And then I have less critical error sources such as 'mist cooler fluid reservoir empty' which I might want to handle with a program pause and temporary spindle shutdown or so. Of course I can manipulate HAL pins to do so, but I would like to have an error message displayed.

Is it possible to add error sources to LinuxCNC?

I am using LinuxCNC 2.7~pre and gmoccapy as the UI, if that matters.
Last edit: 10 Sep 2014 15:36 by DaBit.

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

More
10 Sep 2014 16:39 #51002 by ArcEye
Hi

I would write a component to take the inputs and monitor them.

Then you can report a fault with rtapi_print_msg(RTAPI_MSG_ERR, "Error state in gantry Y axis joints"); or whatever
which will display in Axis and presumably in gmoccapy as well.

If you create other pins in the component, you can make program pause toggle on the state of that pin, halt spindle etc

An alternative HAL solution, could be to use the multi-label widget in pyvcp, which I wrote to display up to 6 legends.
Depending which pin is high it will display different pre-defined text

regards

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

More
10 Sep 2014 17:13 #51008 by DaBit
A Glade/PyVCP panel is not preferred; that would need screen real estate which I don't have (gmoccapy running on a 1024x768 monitor uses up all available screen real estate), and even if I did it would be a waste of space that could be put to better use.

Writing a component works for me; 'comp' makes this easy. Do I have to include header files to use rtapi_print_msg?
If I detect a fatal error and have printed the error, how do I put LinuxCNC in the error state? I could foce an E-stop through HAL, but I suppose there exists something like 'rtapi_send_message (YIKES)' or similar?

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

More
10 Sep 2014 18:39 #51015 by ArcEye

Do I have to include header files to use rtapi_print_msg?


Not if you are using comp

If I detect a fatal error and have printed the error, how do I put LinuxCNC in the error state?


There is no such thing in absolute terms.
You need to decide what you want to disable, until the error is cleared.

Connecting one of your output pins to halui.abort will stop everything in the same way as pressing Esc
halui.program.pause will just pause.

You have quite a wide choice just in halui, enable pins, estop, flood off etc etc

regards

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

More
10 Sep 2014 19:04 #51019 by DaBit
OK. I thought there would be a fairly easy way for a component to halt the system just like an Estop or servo fault does in case a critical error occurs. Exporting a pin and routing it externally to and2/or2 components and finally to estop increases the complexity of the HAL logic without any benefits.

For those 'there is something that needs attention but not critical enough to abort all operations, shutdown the servo drives, etcetera' HAL/halui is the way to go indeed.

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

More
10 Sep 2014 19:18 - 10 Sep 2014 19:32 #51021 by ArcEye

Exporting a pin and routing it externally to and2/or2 components and finally to estop increases the complexity of the HAL logic without any benefits.


There is no complexity, the other connections in the hal file work on the iocontrol pins.

You just need
net sig1 mycomponent.progstop-out => halui.abort to stop a program

But that is not the same as estop, depends how complex your logic chain is, as to whether you want to go that way

regards
Last edit: 10 Sep 2014 19:32 by ArcEye.

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

More
10 Sep 2014 19:28 #51024 by DaBit
I know. It is just that I am a nerd who sometimes suffers from the 'why do things not work the way I want them to work?'-syndrome :laugh:

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

More
10 Sep 2014 19:35 #51025 by ArcEye
I know the feeling, if I could re-programme my satellite receiver, I would have done so long ago.
Its stupidity drives me nuts. :laugh:

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

Time to create page: 0.095 seconds
Powered by Kunena Forum