Change Default Behavior After Following Error - Stop Rapid After Following Error

More
15 Dec 2022 17:32 #259567 by tightmopedman9
When a joint has a following error, it seems the default behavior is to move opposite the direction of the motion which caused the following error at, or near, maximum speed. If this ever happens near the limit of the machine, then the joint will hit the limit switch and I'll have to turn off the machine and manually jog the joint off the limit switch. Is there any way to disable this rapid after a following error? Ideally, after a following error I'd like the machine to just turn off output to the joint. It seems like this should be the default behavior. 

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

More
15 Dec 2022 17:44 #259568 by PCW
A following error should disable the drives. This is a hardware setup issue,
not anything specific to LinuxCNC.

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

More
17 Dec 2022 23:08 #259776 by andypugh
To back up what PCW said, this really isn't default LinuxCNC behaviour. If you hit the f-error limit it shuts down, stopse sending position command updates and turns off the amp-enable HAL pins.

If your system does crazy things, then it is a problem in the config.

Do you have PID controllers? Those should probably be disabled with amp-enable, as should the drives.

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

More
22 Dec 2022 20:19 - 22 Dec 2022 20:37 #260103 by tightmopedman9
It makes sense that this wouldn't be the default behavior, but I am unsure of what sort of configuration problem, on my end, would cause this. 

I have the enable pin on my 3 servo drives tied to an opto-isolated relay, connected to a general purpose output pin on my 7i77. This output is connected to a fairly long chain of components, but is basically driven by the pid.xxx.enable, or pid.xxx.output for the spindle.  I had trouble getting the 7i77's built in servo drive enables to trigger the opto-isolated relay - I think because of a isolated ground plane, but I can't remember now. 

Should I add an OR component to add joint.x.amp-enable-out to be another source that can trigger the output to my servo drive enable pin? I assumed that the pid.pos.enable pin for the spindle would be triggered at the same time as the amp-enable-out. Should I OR all of the amp-enable-outs, or do they all get triggered at the same time?

Attached is a copy of my HAL. The servo drive enable pins are tied to hm2_5i25.0.7i77.0.0.output-03 on line 330.
 

File Attachment:

File Name: PNCCONF.txt
File Size:15 KB


EDIT: I was looking at an old backup version of my HAL file. The servo drive enable pins are actually connected to spindle.0.on and pid.s.enable. I'm not sure that this is much different than stated above, but worth mentioning I thought.

I added an OR component of spindle.0.on, pid.s.enable and joint1.amp-enable-out to be the switch sources for the servo drive enable pins. I'll see if that fixes the problem. 
Attachments:
Last edit: 22 Dec 2022 20:37 by tightmopedman9.

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
22 Dec 2022 22:38 #260119 by tommylight
From a quick glance at the hal file, to many stuff going back and forth with no obvious need.
For drive enable, use this
net x-enable => hm2_5i25.0.7i77.0.1.analogena
The above is already there, and that is ok, so adding
net x-enable => hm2_5i25.0.7i77.0.0.output-NN
will take care of stopping drives in case of errors, and X can be Y or Z it does not matter as all those are turned on and off at the same time.
Not sure what the issue with using analogena for drive enable is, but for me it always works, with many, many types of drives.
Also from a quick glance, there is no output controlling drive enables directly, so that is never good.
And, since i am on a roll :) , the spindle should be wired to analogout 5, not on 3 as is in your case, it has a separate enable for the spindle drive.
Axis drive enable must be controlled by X-enable (Y or Z can also be used), or machine-is-enabled, so LinuxCNC can have control over them and stop them when needed, like in case of following errors.

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

More
23 Dec 2022 01:34 #260131 by tightmopedman9
I was totally wrong with the previous post. I was looking at the logic for the spindle drive enable, which is totally seperate from the servo drive enable. I was also wrong about using analogena, it is wired up to control the drive axis enable pins. I think at some point in time I was having trouble making analogena work, but it was due to a misunderstading in how the two pins should have been connected.

As you can see, hm2_5i25.0.7i77.0.1.analogena is tied to pid.x.enable, so the servo drives should turn off as soon as a following error occurs. 

Any idea on what the problem could be?

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
23 Dec 2022 01:56 #260133 by tommylight
Are you sure the drive enable is wired to drive enable on the mesa and the other side from Mesa is wired to ... what?
Does the drive require active low or active high to enable?
If you are sure those are correct, the only probability is that the enable output on the mesa board is wired "backwards",.
Switching wires on the Mesa ena+ and ena- pins should fix this.

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

More
23 Dec 2022 03:02 #260137 by tightmopedman9
ENA0+ is connected to VFIELD
ENA0- is connected to the trigger pin of an opto-isolated relay
The opto-isolated relay connects GND to INHIBIT-IN on my servo drives (AMC 30A8) when enabled.

There are status LEDs on the servo drives and since day one, I've seen that the drives are inhibited when they should be.

The error seems to be unique to my Z axis and now that I think about it, it may be related to drive tuning. All the axes have the same model servo, but I have a much higher P value for the Z axis since it has almost no mass.

The .ini params for the servo are:
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.005
MAX_VELOCITY = 2.5
MAX_ACCELERATION = 16
P = 1900
I = 1
D = 2.5
FF0 = 0
FF1 = 0.25
FF2 = 0.0325
BIAS = 0
DEADBAND = 0.000075
MAX_OUTPUT = 0
ENCODER_SCALE = -40000
OUTPUT_SCALE = -3
OUTPUT_MIN_LIMIT = -10
OUTPUT_MAX_LIMIT = 10
MIN_LIMIT = -5.03
MAX_LIMIT = .005

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
24 Dec 2022 12:23 #260233 by tommylight

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

Time to create page: 0.067 seconds
Powered by Kunena Forum