Closed loop stepper error input hal question
- 109jb
- Away
- Premium Member
-
Less
More
- Posts: 89
- Thank you received: 11
26 Feb 2025 23:23 - 27 Feb 2025 01:55 #322760
by 109jb
Closed loop stepper error input hal question was created by 109jb
Hi all. I am trying to figure out the last step of configuring my machine. For background, I am using a Raspberry Pi 4b with the current LinuxCNC image from the downloads section. The RPi is connected to a Byte2Bot parallel hat which is in turn connected to a parallel port breakout board. I have managed to figure out all of the step, direction, and limit switch stuff and now have a machine that moves, homes, etc.
The final thing I want to do is define an input to LinuxCNC to stop motion if one of my closed loop stepper motors throws a fault. Essentially like hitting the E-stop. The stepper drivers each have a fault output pin and all of these fault outputs from the drives are wired to parallel port pin 10 of the BOB. This should be GPIO 25 (GPIO connector pin 22). For everything else I have done I have used templates and just been able to change pin numbers. I believe the hal entries would look something like this:
net driver-fault <= hal_gpio.GPIO25-in
net driver-fault => iocontrol.0.emc-enable-in
I believe this would result in a stepper driver fault essentially tripping the emergency stop. I don't have a way to test this right at the moment and was wondering if someone could take a look and see if my thinking is correct?
Thanks,
John B
The final thing I want to do is define an input to LinuxCNC to stop motion if one of my closed loop stepper motors throws a fault. Essentially like hitting the E-stop. The stepper drivers each have a fault output pin and all of these fault outputs from the drives are wired to parallel port pin 10 of the BOB. This should be GPIO 25 (GPIO connector pin 22). For everything else I have done I have used templates and just been able to change pin numbers. I believe the hal entries would look something like this:
net driver-fault <= hal_gpio.GPIO25-in
net driver-fault => iocontrol.0.emc-enable-in
I believe this would result in a stepper driver fault essentially tripping the emergency stop. I don't have a way to test this right at the moment and was wondering if someone could take a look and see if my thinking is correct?
Thanks,
John B
Last edit: 27 Feb 2025 01:55 by 109jb.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 10995
- Thank you received: 3652
26 Feb 2025 23:33 #322762
by rodw
Replied by rodw on topic Closed loop stepper error input hal question
joint.N.amp-fault-in IN BITShould be driven TRUE if an external fault is detected with the amplifier for this joint.
Please Log in or Create an account to join the conversation.
- 109jb
- Away
- Premium Member
-
Less
More
- Posts: 89
- Thank you received: 11
27 Feb 2025 02:11 - 27 Feb 2025 02:11 #322766
by 109jb
Replied by 109jb on topic Closed loop stepper error input hal question
Thanks for that. I had a little formatting issue with my post that I corrected.
However, since I don't have enough inputs with the parallel port type setup to put the fault line from each driver to its own input, all three will be going to a single input. This will be corrected once I get a Mesa 7C81 if they ever go back into stock.
So, for my current setup I could do this:
net driver-fault <= hal_gpio.GPIO25-in
net driver-fault =>joint.0.amp-fault-in
Which would trigger a x-axis driver fault no matter which driver actually had a fault and stop all motion. Is this correct?
Incidentally, for my own education is this line the same as the above two lines except just on a single line?
net driver-fault => joint.0.amp-fault-in <= hal_gpio.GPIO25-in
Thanks.
However, since I don't have enough inputs with the parallel port type setup to put the fault line from each driver to its own input, all three will be going to a single input. This will be corrected once I get a Mesa 7C81 if they ever go back into stock.
So, for my current setup I could do this:
net driver-fault <= hal_gpio.GPIO25-in
net driver-fault =>joint.0.amp-fault-in
Which would trigger a x-axis driver fault no matter which driver actually had a fault and stop all motion. Is this correct?
Incidentally, for my own education is this line the same as the above two lines except just on a single line?
net driver-fault => joint.0.amp-fault-in <= hal_gpio.GPIO25-in
Thanks.
Last edit: 27 Feb 2025 02:11 by 109jb.
Please Log in or Create an account to join the conversation.
Time to create page: 0.050 seconds