Delaying motion enable after machine-on
- Sparky961
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 210
- Thank you received: 14
09 Jun 2018 00:07 #112032
by Sparky961
I suspect you're correct, if I've recreated this correctly.
I have a stripped-down test config that doesn't rely on hardware and doesn't have anything complicated. The section of interest is as follows:
I've attached the config files if anyone wants to give it a shot on their own - or if you just want a simple bare-bones loadable config to play with.
Part of the message is hidden for the guests. Please log in or register to see it.
Replied by Sparky961 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.
I suspect you're correct, if I've recreated this correctly.
I have a stripped-down test config that doesn't rely on hardware and doesn't have anything complicated. The section of interest is as follows:
loadrt stepgen step_type=0,0,0
loadrt timedelay
addf timedelay.0 servo-thread
setp timedelay.0.on-delay 2
setp timedelay.0.off-delay 0
loadrt not
addf not.0 servo-thread
net motion-disabled motion.enable <= not.0.out
net machine-enabled timedelay.0.in <= motion.motion-enabled => not.0.in
net delayed-drive-enable <= timedelay.0.out => stepgen.0.enable => stepgen.1.enable => stepgen.2.enable
I've attached the config files if anyone wants to give it a shot on their own - or if you just want a simple bare-bones loadable config to play with.
Part of the message is hidden for the guests. Please log in or register to see it.
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
09 Jun 2018 00:26 #112033
by Sparky961
Replied by Sparky961 on topic Delaying motion enable after machine-on
Quoting from: linuxcnc.org/docs/html/man/man9/motion.9.html
motion.feed−inhibit IN BIT
When this pin is TRUE, machine motion is inhibited (this includes jogs, programmed feeds, and programmed rapids, aka traverse moves).
(snip)
Motion resumes when this pin goes FALSE.
There is no mention of preventing motion from homing, but is this perhaps an innocent omission that should be rectified? it seems to me that homing constitutes "motion" and it is reasonable to expect that it would be inhibited by this pin.
motion.feed−inhibit IN BIT
When this pin is TRUE, machine motion is inhibited (this includes jogs, programmed feeds, and programmed rapids, aka traverse moves).
(snip)
Motion resumes when this pin goes FALSE.
There is no mention of preventing motion from homing, but is this perhaps an innocent omission that should be rectified? it seems to me that homing constitutes "motion" and it is reasonable to expect that it would be inhibited by this pin.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4866
09 Jun 2018 01:59 #112041
by andypugh
Replied by andypugh on topic Delaying motion enable after machine-on
Dewey has pointed out (on the developers mailing list) that the next version of LinuxCNC will have a pin for this.
github.com/LinuxCNC/linuxcnc/commit/845bb7528
github.com/LinuxCNC/linuxcnc/commit/845bb7528
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
09 Jun 2018 02:17 - 09 Jun 2018 02:18 #112045
by Sparky961
Replied by Sparky961 on topic Delaying motion enable after machine-on
This is bittersweet. It means that a solution is available, but to implement it without building myself would mean waiting until this is in a release. It also means that since there's a "fix" it's less likely that anyone will be interested in solving this in a more immediate way. I guess one of these days I'm going to have to take the leap and try building it.
And I still hold that the existing pin should prevent motion, including homing. Homing is motion.
And I still hold that the existing pin should prevent motion, including homing. Homing is motion.
Last edit: 09 Jun 2018 02:18 by Sparky961.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4866
09 Jun 2018 02:20 #112047
by andypugh
You can actually get pre-built packages of the development branch. Have a look at buildbot.linuxcnc.org
Replied by andypugh on topic Delaying motion enable after machine-on
This is bittersweet. It means that a solution is available, but to implement it without building myself would mean waiting until this is in a release.
You can actually get pre-built packages of the development branch. Have a look at buildbot.linuxcnc.org
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
09 Jun 2018 02:29 #112049
by Sparky961
Replied by Sparky961 on topic Delaying motion enable after machine-on
Does that not greatly increase the chance of having other problems though? Bugs that haven't yet been worked out?
I was thinking to include only the changes that I'm interested in to preserve what stability I have.
I was thinking to include only the changes that I'm interested in to preserve what stability I have.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4866
09 Jun 2018 08:50 #112062
by andypugh
Possibly, and it requires significant config changes too.
Replied by andypugh on topic Delaying motion enable after machine-on
Does that not greatly increase the chance of having other problems though? Bugs that haven't yet been worked out?
Possibly, and it requires significant config changes too.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4866
09 Jun 2018 09:03 #112063
by andypugh
Replied by andypugh on topic Delaying motion enable after machine-on
Perhaps the answer lies in the HAL layer.
If you delay the enable of the PID components there will be no motion.
(Though if you press the home button with the PID disabled you will get an F-error)
So maybe enable the amplifiers with e-stop-reset and enable the PID with machine-on / motion.amp-enable.
If you delay the enable of the PID components there will be no motion.
(Though if you press the home button with the PID disabled you will get an F-error)
So maybe enable the amplifiers with e-stop-reset and enable the PID with machine-on / motion.amp-enable.
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
10 Jun 2018 00:06 - 10 Jun 2018 00:08 #112106
by Sparky961
Replied by Sparky961 on topic Delaying motion enable after machine-on
The "Toggle Machine Power" button still remains something of a mystery to me. I can cause it to be activated but can't prevent it from being deactivated.
I'm close to a solution simulating three external buttons I'd have on the system anyway. Here are my expectations and observationis:
* AXIS starts up and shows e-stop button state relative to external e-stop
--> Works as expected
* Pressing external "Enable" or "Disable" do nothing while e-stop is active
--> Works as expected
* User cannot press "Toggle Machine Power" button
--> Working, but not quite how I'd like. It displays message "can't enable motion, enable input is false". I'd prefer no message or something like "Use button on control panel to enable machine".
* User presses external "Enable" button and there's a delay (signaled by flashing indicator) before enabling motion. During this time no user-initiated motion is allowed.
--> Also seems to be working. Homing buttons and menu options are greyed out, arrow keys do not cause motion, also program run/step/stop controls are all greyed out
* Pressing "Enable" again does nothing when already enabled
--> Works as expected
* Pressing external e-stop disables machine, setting UI buttons to correct state
--> Works, but I'd rather not have the cryptic message "motion stopped by enable input" appear at bottom-right of screen
* UI e-stop should be a slave to external e-stop
--> e-stop cannot be cleared through UI but it can be set. This is acceptable, but custom delayed enable is broken by this action until "Disable" is pressed
* "Toggle Machine Power" should not do anything, being a slave to the custom "Enabled" state
--> Pressing "Toggle Machine Power" results in similar undesirable behaviour to pressing the UI e-stop
See attached config. It should work without custom hardware.
I'm close to a solution simulating three external buttons I'd have on the system anyway. Here are my expectations and observationis:
* AXIS starts up and shows e-stop button state relative to external e-stop
--> Works as expected
* Pressing external "Enable" or "Disable" do nothing while e-stop is active
--> Works as expected
* User cannot press "Toggle Machine Power" button
--> Working, but not quite how I'd like. It displays message "can't enable motion, enable input is false". I'd prefer no message or something like "Use button on control panel to enable machine".
* User presses external "Enable" button and there's a delay (signaled by flashing indicator) before enabling motion. During this time no user-initiated motion is allowed.
--> Also seems to be working. Homing buttons and menu options are greyed out, arrow keys do not cause motion, also program run/step/stop controls are all greyed out
* Pressing "Enable" again does nothing when already enabled
--> Works as expected
* Pressing external e-stop disables machine, setting UI buttons to correct state
--> Works, but I'd rather not have the cryptic message "motion stopped by enable input" appear at bottom-right of screen
* UI e-stop should be a slave to external e-stop
--> e-stop cannot be cleared through UI but it can be set. This is acceptable, but custom delayed enable is broken by this action until "Disable" is pressed
* "Toggle Machine Power" should not do anything, being a slave to the custom "Enabled" state
--> Pressing "Toggle Machine Power" results in similar undesirable behaviour to pressing the UI e-stop
See attached config. It should work without custom hardware.
Last edit: 10 Jun 2018 00:08 by Sparky961. Reason: Added config files
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
10 Jun 2018 00:14 #112108
by Sparky961
Replied by Sparky961 on topic Delaying motion enable after machine-on
Please Log in or Create an account to join the conversation.
Time to create page: 0.165 seconds