Delaying motion enable after machine-on
- Sparky961
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 210
- Thank you received: 14
04 Jun 2018 12:44 #111598
by Sparky961
Delaying motion enable after machine-on was created by Sparky961
The machine I've been working with requires some time (about 6 seconds) for self-sensing commutation before any user control is accepted. I'm trying to figure out how to account for this between the UI (Axis currently, custom UI later) and HAL.
The sequence I'd like to have is as follows:
1. E-stop is reset (External signal connected to physical switch, also connected to UI)
2. Machine control is powered on (UI button or external switch), BUT a message like "Wait for initialization" is displayed and NO MOTION is possible until external signals from the drives meet certain criteria (commutation complete, no fault, etc)
3. Message is cleared and homing can then be performed. When complete the machine is ready to use
Is what I'm trying to do possible? It's like I need the "power on" UI button to go into an intermediate state while initializing then be completely active when done.
I mentioned that eventually this should have a custom UI so I'm not set on having it work with Axis if it's too much trouble.
The sequence I'd like to have is as follows:
1. E-stop is reset (External signal connected to physical switch, also connected to UI)
2. Machine control is powered on (UI button or external switch), BUT a message like "Wait for initialization" is displayed and NO MOTION is possible until external signals from the drives meet certain criteria (commutation complete, no fault, etc)
3. Message is cleared and homing can then be performed. When complete the machine is ready to use
Is what I'm trying to do possible? It's like I need the "power on" UI button to go into an intermediate state while initializing then be completely active when done.
I mentioned that eventually this should have a custom UI so I'm not set on having it work with Axis if it's too much trouble.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4866
04 Jun 2018 21:09 - 04 Jun 2018 21:10 #111622
by andypugh
Replied by andypugh on topic Delaying motion enable after machine-on
I would suggest a
timedelay
hal block between the
axis.N.amp-enable-out
and
motion.feed-inhibit
(Or maybe motion.enable)
If you use the feed-inhibit then you will also need a not hal block to reverse the logic.
If you use the feed-inhibit then you will also need a not hal block to reverse the logic.
Last edit: 04 Jun 2018 21:10 by andypugh.
The following user(s) said Thank You: BigJohnT
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
Less
More
- Posts: 7000
- Thank you received: 1172
04 Jun 2018 23:14 #111634
by BigJohnT
Replied by BigJohnT on topic Delaying motion enable after machine-on
Interesting, I need to do something similar on my BP knee mill. It takes a few seconds before the drives are up to power, I've been waiting for the Z axis to hum but a delay would be nice.
JT
JT
Please Log in or Create an account to join the conversation.
- Sparky961
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 210
- Thank you received: 14
05 Jun 2018 01:19 #111638
by Sparky961
Replied by Sparky961 on topic Delaying motion enable after machine-on
I gave Andy's suggestion a try with the following:
Testing it in AXIS sim, it correctly prevents jogging via the UI for 7 seconds. It does _not_ prevent homing.
I'm not satisfied with the message output facility either. It lumps them all down in the bottom right corner with the rest of the error messages. Maybe if there was a way to clear them it would be acceptable.
I'm going to rethink this. It's close but not quite what I'm going for.
loadrt message names=commutationwait,commutationcomplete messages="Initializing. Please Wait.,Done Initializing."
loadrt timedelay
loadrt not
addf commutationwait servo-thread
addf commutationcomplete servo-thread
addf timedelay.0 servo-thread
addf not.0 servo-thread
setp timedelay.0.on-delay 7
net machine-on-delay-start <= timedelay.0.in => halui.machine.is-on => commutationwait.trigger
net init-motion-inhibit-not <= timedelay.0.out => not.0.in => commutationcomplete.trigger
net init-motion-inhibit <= not.0.out => motion.feed-inhibit
Testing it in AXIS sim, it correctly prevents jogging via the UI for 7 seconds. It does _not_ prevent homing.
I'm not satisfied with the message output facility either. It lumps them all down in the bottom right corner with the rest of the error messages. Maybe if there was a way to clear them it would be acceptable.
I'm going to rethink this. It's close but not quite what I'm going for.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4866
05 Jun 2018 11:26 #111666
by andypugh
Replied by andypugh on topic Delaying motion enable after machine-on
what happens if you link the (not inverted) output to motion.enable?
I suspect it will prevent you turning the machine on, but it is probably worth a try.
Also look at the halui pins
linuxcnc.org/docs/2.7/html/man/man1/iocontrol.1.html
Enabling the amps when e-stop is released might be an option, though it isn't the most attractive of ideas.
I suspect it will prevent you turning the machine on, but it is probably worth a try.
Also look at the halui pins
linuxcnc.org/docs/2.7/html/man/man1/iocontrol.1.html
Enabling the amps when e-stop is released might be an option, though it isn't the most attractive of ideas.
Please Log in or Create an account to join the conversation.
- Sparky961
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 210
- Thank you received: 14
05 Jun 2018 16:48 #111684
by Sparky961
Replied by Sparky961 on topic Delaying motion enable after machine-on
Actually, enabling the amps with e-stop release could work. I'm going to think about safety implications, but so far nothing obvious springs to mind.
I'll try your other suggestion this evening, and play around with some other ideas.
Thanks.
I'll try your other suggestion this evening, and play around with some other ideas.
Thanks.
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
Less
More
- Posts: 10841
- Thank you received: 3579
06 Jun 2018 21:17 #111790
by rodw
Replied by rodw on topic Delaying motion enable after machine-on
Just a thought. If you added a screen text value, I think you would be able to change its contents (or just hide it) in the screen handler. I'm not sure how axis does it but i've done similar stuff in gmoccappy's python screen handler. Create a pin in the handler and send the value of interest to it and use it to change the screen.
Please Log in or Create an account to join the conversation.
- Sparky961
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 210
- Thank you received: 14
07 Jun 2018 01:21 #111809
by Sparky961
Replied by Sparky961 on topic Delaying motion enable after machine-on
What happens internally when you click the UI "machine on" button in Axis? Can it be intercepted?
Please Log in or Create an account to join the conversation.
- Sparky961
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 210
- Thank you received: 14
07 Jun 2018 01:22 #111810
by Sparky961
Replied by Sparky961 on topic Delaying motion enable after machine-on
That sounds like it has some merit. I'm not quite to the UI point yet so I'll tuck this tidbit away.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4866
07 Jun 2018 08:53 #111825
by andypugh
I think it turns on the machine (sets the amp-enables, amongst other things) and sets the halui.0.machine.is-on pin.
linuxcnc.org/docs/2.7/html/man/man1/halui.1.html
But I don't think that there is a loop for machine-on like there is for iocontrol.0.user-enable-out to iocontrol.0.emc-enable-in
linuxcnc.org/docs/2.7/html/man/man1/iocontrol.1.html
Replied by andypugh on topic Delaying motion enable after machine-on
What happens internally when you click the UI "machine on" button in Axis? Can it be intercepted?
I think it turns on the machine (sets the amp-enables, amongst other things) and sets the halui.0.machine.is-on pin.
linuxcnc.org/docs/2.7/html/man/man1/halui.1.html
But I don't think that there is a loop for machine-on like there is for iocontrol.0.user-enable-out to iocontrol.0.emc-enable-in
linuxcnc.org/docs/2.7/html/man/man1/iocontrol.1.html
Please Log in or Create an account to join the conversation.
Time to create page: 0.069 seconds