Estop plus Stepper Disable
- re_relentlessly
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 4
07 Feb 2022 23:34 #234308
by re_relentlessly
Estop plus Stepper Disable was created by re_relentlessly
Hello,
I am currently building a new cnc router, based on the indymill ( IndyMill – DIY Open Source Metal CNC Machine – Indystry.cc ) design. I am using a raspberry pi 4 (linuxcnc 2.8.1) and an mesa 7i76e ethernet board. I have nema 34 steppers with SFU1605 ball screws (x and y) and a 5mm pitch trapezoidal leadscrew via a 1:1 belt drive on Z. Using cheap t6600 based stepper drivers. I am using pncconf to configure the machine.
i am using the 5th stepper output to control the stepper drive enable signal (based on advice from Peter Wallace at mesa)
I am trying to have the stepper drivers enable/disable (for these drivers the enable signal is actually a disable, if the 5v is present the drive disables) linked to my estop. So that when the machine goes into estop the drives disable.
I have google lots but have not found my exact answer, and am not experiences enough with linuxcnc and hal configuration to interpret some of the other answers i found online.
I was hoping that i could configure the linux cnc hal to link the ext-estop signal to the various axis enable signals. But if i understand correctly the Hal only links pins to signals, and cannot link signals to signals?
my attempt at using an and to control the drive enable
Is there any way in software to have the estop signal control the stepper enable (enable disable the 5 stepper output)? would it be better if I took 4 mesa field outputs (and some how convert them to 5v)?
Or should i just add a 5v power supply and a relay/contactor. Then use the estop to control the relay that would turn the 5v from the power supply on and off to the stepper drives?
I am currently building a new cnc router, based on the indymill ( IndyMill – DIY Open Source Metal CNC Machine – Indystry.cc ) design. I am using a raspberry pi 4 (linuxcnc 2.8.1) and an mesa 7i76e ethernet board. I have nema 34 steppers with SFU1605 ball screws (x and y) and a 5mm pitch trapezoidal leadscrew via a 1:1 belt drive on Z. Using cheap t6600 based stepper drivers. I am using pncconf to configure the machine.
i am using the 5th stepper output to control the stepper drive enable signal (based on advice from Peter Wallace at mesa)
I am trying to have the stepper drivers enable/disable (for these drivers the enable signal is actually a disable, if the 5v is present the drive disables) linked to my estop. So that when the machine goes into estop the drives disable.
I have google lots but have not found my exact answer, and am not experiences enough with linuxcnc and hal configuration to interpret some of the other answers i found online.
I was hoping that i could configure the linux cnc hal to link the ext-estop signal to the various axis enable signals. But if i understand correctly the Hal only links pins to signals, and cannot link signals to signals?
my attempt at using an and to control the drive enable
net my-sigin1 and2.0.in0 <= estop-ext
net my-sigin2 and2.0.in1 <= hm2_7i76e.0.stepgen.00.enable
net x-enable and2.0.out
Is there any way in software to have the estop signal control the stepper enable (enable disable the 5 stepper output)? would it be better if I took 4 mesa field outputs (and some how convert them to 5v)?
Or should i just add a 5v power supply and a relay/contactor. Then use the estop to control the relay that would turn the 5v from the power supply on and off to the stepper drives?
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19479
- Thank you received: 6532
08 Feb 2022 01:08 #234312
by tommylight
Replied by tommylight on topic Estop plus Stepper Disable
Drive enable should be connected to machine-is-enabled in hal so joint following errors can disable drives.
E-stop is exactly that = emergency stop and should cut power to drives that is very important for DC servo systems, not much important on stepper and AC servo drives.
At any rate, here is one example of using the same hal pin for input and output:Or have a look at e-stop latch if you have more than one button.
E-stop is exactly that = emergency stop and should cut power to drives that is very important for DC servo systems, not much important on stepper and AC servo drives.
At any rate, here is one example of using the same hal pin for input and output:
# --- E-STOP ---
net estop-ext hm2_5i25.0.7i77.0.0.input-12
net estop-ext hm2_5i25.0.7i77.0.0.output-04
Please Log in or Create an account to join the conversation.
- re_relentlessly
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 4
08 Feb 2022 22:11 #234357
by re_relentlessly
Replied by re_relentlessly on topic Estop plus Stepper Disable
Thank you for the response.
I tried out your solutions and there is something I am not understanding.
While watching the signals and pins in halshow (after implementing your suggestion) I can see the hm2_7i76e.0.stepgen.00.enable pin changing and the estop signal changing. But the stepper drives are not enabling/disabling. And after checking the pins on the Mesa 7i76e with a multimeter none of the pins are actually changing. So either i am connecting it wrong in the HAL. Or I don't understand what pin i should be connecting it to.
The following is what i tried.
Thank you
Jason
I tried out your solutions and there is something I am not understanding.
While watching the signals and pins in halshow (after implementing your suggestion) I can see the hm2_7i76e.0.stepgen.00.enable pin changing and the estop signal changing. But the stepper drives are not enabling/disabling. And after checking the pins on the Mesa 7i76e with a multimeter none of the pins are actually changing. So either i am connecting it wrong in the HAL. Or I don't understand what pin i should be connecting it to.
The following is what i tried.
but it seems to me that the .enable is not actually connect to a physical pin on the mesa board. The +5v and GND connection that are pins 1 and 6 on each step gen connection do not toggle as per a pervious email from Peter Wallace. Hence why I have all the stepper enables connected to the pins on the 5th stepgen. but those pins also don't appear to toggle. Are there pins on the mesa that I can actually toggle in the Hal with the estop state? did I just pick the wrong signal in my attempt above?net estop-ext hm2_7i76e.0.stepgen.00.enable
net estop-ext hm2_7i76e.0.stepgen.01.enable
net estop-ext hm2_7i76e.0.stepgen.02.enable
net estop-ext hm2_7i76e.0.stepgen.03.enable
net estop-ext hm2_7i76e.0.stepgen.04.enable
Thank you
Jason
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19479
- Thank you received: 6532
08 Feb 2022 22:24 #234359
by tommylight
Replied by tommylight on topic Estop plus Stepper Disable
hm2_7i76e.0.stepgen.00.enable
Is for enabling and disabling stepgens in hal, not drives, although i am sure it can be used for that also.
You need to wire e-stop or machine-is-enabled to a physical pin that the actual wire going to drive enables is wired to.
something like:
net estop-ext hm2_7i76e.output-04
not sure how the outputs are mapped in your case.
Is for enabling and disabling stepgens in hal, not drives, although i am sure it can be used for that also.
You need to wire e-stop or machine-is-enabled to a physical pin that the actual wire going to drive enables is wired to.
something like:
net estop-ext hm2_7i76e.output-04
not sure how the outputs are mapped in your case.
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
Less
More
- Posts: 17967
- Thank you received: 4826
08 Feb 2022 22:53 - 08 Feb 2022 23:25 #234362
by PCW
Replied by PCW on topic Estop plus Stepper Disable
To use stepgen 04 pins as general purpose outputs you must first
limit the number of stepgens to 4 (num_stepgens=4 in the config string)
Then you must set the correct GPIO pins to output mode:
setp hm2_7i76e.0.gpio.008.is_output true # dir 04 pin
setp hm2_7i76e.0.gpio.009.is_output true # step 04 pin
Then to actually use them, they need to be connected to the appropriate LinuxCNC signal:
net estop-ext hm2_7i76e.0.gpio.008.out
net estop-ext hm2_7i76e.0.gpio.009.out
limit the number of stepgens to 4 (num_stepgens=4 in the config string)
Then you must set the correct GPIO pins to output mode:
setp hm2_7i76e.0.gpio.008.is_output true # dir 04 pin
setp hm2_7i76e.0.gpio.009.is_output true # step 04 pin
Then to actually use them, they need to be connected to the appropriate LinuxCNC signal:
net estop-ext hm2_7i76e.0.gpio.008.out
net estop-ext hm2_7i76e.0.gpio.009.out
Last edit: 08 Feb 2022 23:25 by PCW. Reason: step/dir gpio swapped
Please Log in or Create an account to join the conversation.
- re_relentlessly
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 4
09 Feb 2022 01:56 #234370
by re_relentlessly
Replied by re_relentlessly on topic Estop plus Stepper Disable
Thank you very much to both of you (@PCW and @tommylight) with your help I was able to successfully get it working.
disabling the 5th stepgen, and then setting the pins to gpio plus then connecting them to the appropriate signal was key.
even though there is only 008 and 009 (2 pins), because I have wired all 4 stepper drives to the 5th stepgen, all the drivers enable and disable as i wanted.
and I even was able to do most of it from within pnpconf.
Thank again
disabling the 5th stepgen, and then setting the pins to gpio plus then connecting them to the appropriate signal was key.
even though there is only 008 and 009 (2 pins), because I have wired all 4 stepper drives to the 5th stepgen, all the drivers enable and disable as i wanted.
and I even was able to do most of it from within pnpconf.
Thank again
The following user(s) said Thank You: tommylight, Clive S
Please Log in or Create an account to join the conversation.
Time to create page: 0.142 seconds