Controling Stepper Brake with Linuxcnc

More
1 year 9 months ago #319533 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 to join the conversation.

More
1 year 9 months ago #319538 by rodw
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 to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum