Frozen if absolute encoder cable detached?

More
9 years 11 months ago #82774 by terkaa
I am running 2.8 on our mill. It has absolute encoders with SSI interface(Mesa 7i74). Today we noticed that if we detach absolute encoder cable while control is powered(it was an accident not intentional unplugging) LinuxCNC got "frozen" Estop did not react, none of buttons on user interface reacted. We got an error stating that configuration of limits is incorrect. Maybe it is a bug?


Tero

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

More
9 years 11 months ago #82777 by andypugh
Anything in dmesg?

Did motion stop? (You would rather hope that it would)

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

More
9 years 11 months ago - 9 years 11 months ago #82778 by PCW
You should get a following error and that should at the least at the minimum disable all drives
( not sure what the GUI/HAL file dependencies are but with my sample files and Axis, this
requires restoring "machine power (F2) before continuing )

The configuration limits error may be something in LinuxCNC that does not deal with large position errors properly
( It may not be possible to get this error with quadrature encoders so its not well tested )

This also brings up an issue I've discovered with the absolute encoder module: the module currently
always assumes that absolute encoders can wrap, This is required for single turn absolute encoders to extend the count
to multiple revolutions but can cause problems with multi-turn and linear absolute encoders. The problem is this: if you are using a multi-turn or linear absolute encoder and you get transient bad data (say by unplugging the encoder)
this can cause the wrap detection logic to add/subtract what it thinks is a full turn ( 24 bits for a 24 bit encoder! )
and even when the data is correct, ( encoder re-plugged ) the absolute encoder value is still wrong

This should never happen on a multi-turn or linear absolute encoder so Andy Pugh has modified
the absolute encoder code to include a multi-turn option that disables the wrap logic

In addition, I think because of the possibility of transient errors on non error checked protocols like
SSI, I think there should be some minimal sanity checking in the absolute encoder driver
perhaps an acceleration limit that discards obviously bogus data and sets a bad data flag
Last edit: 9 years 11 months ago by PCW.

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

More
9 years 11 months ago #82782 by terkaa
I got an error report after forcing quit for LinuxCNC. Machine was at sill when this happened but I noticed Z-axis slowly moving while UI was frozen. So drives were enabled... I will check if I still can find crash log somewhere tomorrow. But it was a bit hasty situation, And I was totally amazed of "What is going on".


Tero

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

More
9 years 11 months ago #82787 by PCW
That's rather scary, with crazy SSI data and HAL servo thread running I dont see how you cannot get a
following error and instantly lose drive enables.

(and if the servo thread quit running you should get a watchdog time-out on both the FPGA and the sserial remotes)

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

More
9 years 11 months ago #82802 by PCW
I cannot duplicate this with either 2.7.8 or master (The freeze may be a GUI issue)
If I set a crazy feedback value as you would get with a unplugged SSI encoder, ( I used 2e9 ) I get

joint 0 following error
Exceeded positive soft limit on joint 0

on 2.7.8

and

joint 0 following error
emc/task/taskintf.cc 943: Error on joint 0, command number 1776
On Soft Limit
Identity kinematics are MISCONFIGURED
Exceeded POSITIVE soft limit (500.00000) on joint 0

Stop, fix joints and axis LIMITS, then Restart

On master

In ether case the amp enable is set false

in your hal file you have

net x-enable joint.0.amp-enable-out
net x-enable hm2_5i25.0.7i83.0.1.analogena0

This should disable your drive _IF_ your drive is enabled via the 7I83s ENA pins

You can duplicate this kind of fault easily by unlinking the feedback pin and setting it to a crazy number:

halcmd unlinkp joint.0.motor-pos-fb
halcmd setp joint.0.motor-pos-fb 2000000000

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

Time to create page: 0.068 seconds
Powered by Kunena Forum