Controling Stepper Brake with Linuxcnc

  • SertanATL
  • SertanATL's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
21 Jan 2025 09:31 #319533 by SertanATL
Controling Stepper Brake with Linuxcnc was created by SertanATL
I am using a stepper motor with a brake on the Z-axis to prevent the spindle from dropping due to gravity during a power outage or when the machine is powered off. The brake is designed to activate when power to the stepper motor is cut, but there is a delay of one or two seconds before it engages. This delay allows the spindle to drop significantly before the brake takes effect.Is it possible to control the brake directly using LinuxCNC to eliminate this delay?

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

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
21 Jan 2025 10:41 #319538 by rodw
Replied by rodw on topic Controling Stepper Brake with Linuxcnc
There does not seem to be a current velocity pin for a specific joint.
I would probably write a small component in C that saves the last position and compares it with this period and enable the brake if they are the same (eg has not moved)  This is the pin you need to monitor 
joint.N.motor-pos-fb

Rough code:

static float old_pos = 0;
if (current_pos == old_pos)
  brake_pin = 1;
else
 brake_pin = 0;
old_pos = current_pos;

 

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

Time to create page: 0.047 seconds
Powered by Kunena Forum