Clearpath HLFB

More
07 Feb 2021 17:44 - 07 Feb 2021 17:46 #197941 by kawphi
Clearpath HLFB was created by kawphi
This is my first post on the LinuxCNC forum and I am coming to ask for some help in understand what I am not doing correctly.

I have built a CNC router and everything is working quite nicely except HLFB from my clearpath motors. I want to use the in-range function of HLFB, but I am not experienced enough in LinuxCNC to properly implement this function.

I would like to use the in-range condition.
"The HLFB output asserts (conducts) when the motor is enabled, not shutdown, and the measured position is In-Range"

So the problem is I cannot enable the motors to begin with to allow them to exit not in range condition because one of those conditions is the motor being enabled. If I use MSP to override the inputs and enable the drive, LinuxCNC works correctly. For obvious reasons this is less than ideal.

My setup is a simple input-X-not => servo-X-fault for each drive.

So it would seem I need to delay this error loop condition in LinuxCNC only on machine enable.
Ideally I would like to see the machine delay the reporting of any errors for a few MS to allow the drives to report back they are in fact enabled. This delay should only be present when the machine is entering the machine-on state.

I have looked at every post I can for this topic, but I am just not picking up what is being put down in terms of how to accomplish adding this seemingly simple timer into the machine-enable condition.


Thanks in advance for your responses, I know time is valuable and any help is greatly appreciated.
Last edit: 07 Feb 2021 17:46 by kawphi.

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

More
07 Feb 2021 18:21 #197942 by scotth

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

More
07 Feb 2021 19:54 #197948 by kawphi
Replied by kawphi on topic Clearpath HLFB

scotth wrote: Look at

forum.linuxcnc.org/10-advanced-configura...fb-mesa-7i76e#112518

This should help.


Thank you for replying scotth

I did read this post along with the other clear path posts on this forum. I may be missing something, but I don’t see how mapping a charge pump output to an input fault would prevent the issue of not being able to put the servos in enable mode because it starts in a faulted state.

Am I just looking at this from the wrong direction?

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

More
08 Feb 2021 06:08 #197975 by kawphi
Replied by kawphi on topic Clearpath HLFB

kawphi wrote:

scotth wrote: Look at

forum.linuxcnc.org/10-advanced-configura...fb-mesa-7i76e#112518

This should help.


Thank you for replying scotth

I did read this post along with the other clear path posts on this forum. I may be missing something, but I don’t see how mapping a charge pump output to an input fault would prevent the issue of not being able to put the servos in enable mode because it starts in a faulted state.

Am I just looking at this from the wrong direction?


Here is what I came up with. I don't really want to have a timedelay, but 0.1 is as low as I can get it and still have this work the way I would like to.
# Include your custom HAL commands here
# This file will not be overwritten when you run PNCconf again

loadrt and2 count=4
loadrt timedelay count=4

addf and2.0 servo-thread
addf and2.1 servo-thread
addf and2.2 servo-thread
addf and2.3 servo-thread

addf timedelay.0 servo-thread
addf timedelay.1 servo-thread
addf timedelay.2 servo-thread
addf timedelay.3 servo-thread

setp timedelay.0.on-delay 0.1
setp timedelay.0.off-delay 0
setp timedelay.1.on-delay 0.1
setp timedelay.1.off-delay 0
setp timedelay.2.on-delay 0.1
setp timedelay.2.off-delay 0
setp timedelay.3.on-delay 0.1
setp timedelay.3.off-delay 0

alias pin hm2_5i25.0.7i76.0.0.input-17-not x-servo-hlfb
alias pin hm2_5i25.0.7i76.0.0.input-18-not y-servo-hlfb
alias pin hm2_5i25.0.7i76.0.0.input-19-not y2-servo-hlfb
alias pin hm2_5i25.0.7i76.0.0.input-20-not z-servo-hlfb

net x-servo-fault x-servo-hlfb and2.0.in0
net machine-is-enabled and2.0.in1
net x-servo-fault-out and2.0.out 
net x-servo-fault-out timedelay.0.in
net x-servo-fault-delay timedelay.0.out => joint.0.amp-fault-in

net y-servo-fault y-servo-hlfb and2.1.in0
net machine-is-enabled and2.1.in1
net y-servo-fault-out and2.1.out 
net y-servo-fault-out timedelay.1.in
net y-servo-fault-delay timedelay.1.out => joint.1.amp-fault-in

net y2-servo-fault y2-servo-hlfb and2.2.in0
net machine-is-enabled and2.2.in1
net y2-servo-fault-out and2.2.out 
net y2-servo-fault-out timedelay.2.in
net y2-servo-fault-delay timedelay.2.out => joint.2.amp-fault-in

net z-servo-fault z-servo-hlfb and2.3.in0
net machine-is-enabled and2.3.in1
net z-servo-fault-out and2.3.out 
net z-servo-fault-out timedelay.3.in
net z-servo-fault-delay timedelay.3.out => joint.3.amp-fault-in

File Attachment:

File Name: custom.hal
File Size:2 KB
Attachments:

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

More
09 Feb 2021 18:52 #198179 by andypugh
Replied by andypugh on topic Clearpath HLFB
I think that you could make is _slightly_ simpler by delaying machine-is-enabled before passing it to the set of and2 components.
So, there would be only one timedelay but everything else would look much the same.
I don't think that it is enough neater to be worth changing what you have, though.

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

More
10 Feb 2021 03:04 #198239 by kawphi
Replied by kawphi on topic Clearpath HLFB
Thank you for your response Andy. Would it be too much to ask to explain why delaying machine-is-enabled would work? I am pretty new to LinuxCNC and I really am just guessing with what I wrote.

I did just run a 8 hour job and nothing broke - but that doesn't mean that its right or good.

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

More
10 Feb 2021 05:34 #198245 by rodw
Replied by rodw on topic Clearpath HLFB

kawphi wrote:
I did just run a 8 hour job and nothing broke - but that doesn't mean that its right or good.


Well, to me that seems it is right AND good!

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

More
10 Feb 2021 11:08 #198263 by andypugh
Replied by andypugh on topic Clearpath HLFB

kawphi wrote: Thank you for your response Andy. Would it be too much to ask to explain why delaying machine-is-enabled would work?


Currently you are delaying acting on the fault output, giving it a chance to go away on startup.

What I propose is delaying the input to the and2. So at startup the fault _input_ is ignored for short period.

Apart from the saving of a couple of timedelay elements, this means that the response to the fault is not delayed. So you can make the delay longer (to be sure that the drives are properly started up before starting to look at their status) without delaying the response to a genuine fault.

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

More
10 Feb 2021 12:23 #198268 by kawphi
Replied by kawphi on topic Clearpath HLFB
I see, so what you are saying is that the fault input is delayed only at startup (machine-is-enabled).

I will give it a whirl and share what I come up with.

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

Time to create page: 0.307 seconds
Powered by Kunena Forum