How to control brake before moving ?

More
1 year 3 months ago #332198 by bladekel
I have an axis that I use with a stepper motor with brake. Before this axis starts moving, I have to disable the brake, wait for the mechanical delay and then move it. And when the movement is finished, I have to activate the brake immediately. I used the following commands to do this.
Code:
loadrt ddt count=1 loadrt abs count=1 loadrt comp count=1 loadrt timedelay count=1 loadrt not count=1 addf ddt.0 servo-thread addf abs.0 servo-thread addf comp.0 servo-thread addf timedelay.0 servo-thread addf not.0 servo-thread # Joint 3 movement detection net joint3-pos-cmd joint.3.pos-cmd => ddt.0.in net joint3-velocity ddt.0.out => abs.0.in net joint3-vel-abs abs.0.out => comp.0.in0 setp comp.0.in1 0.001   setp timedelay.0.on-delay 0    setp timedelay.0.off-delay 1  net joint3-moving comp.0.out parport.0.pin-14-out timedelay.0.in net dontMove timedelay.0.out => not.0.in net canMove not.0.out => stepgen.3.enable
I can do what I want in manual movement with these commands. But when I use it with mdi commands, it gives “joint 3 following error” error.

How can I solve this?

Please Log in to join the conversation.

More
1 year 3 months ago #332204 by PCW
net canMove not.0.out => stepgen.3.enable

My guess is that this causes the following error
when motion starts and this is still false.
That is, the commanded position is changing but
the stepgen is disabled so cannot follow ( so the
stepgen feedback is static) so you get a
following error.

Edit:

If linuxCNC is allowed to start motion before the brake is released,
Expanding the following error limits seem like the easiest solution.
However now this joint will lag the others so coordinated motion would
not be possible.

Is there some way to use digital inputs and outputs in the
gcode to manage the brake? That is, use a digital output
to enable the brake and a digital input to signal when the brake was
full applied and fully released. You would do this using M62,M63 and
M66 in the gcode and the hal digital input and output pins.

www.linuxcnc.org/docs/devel/html/gcode/m...e.html#mcode:m62-m65

Please Log in to join the conversation.

More
1 year 3 months ago #332212 by Aciera
Maybe have a look at the 'joint.N.unlock' pins:
linuxcnc.org/docs/html/man/man9/motion.9...OINT%20unlock%20pins

Please Log in to join the conversation.

More
1 year 3 months ago #332216 by bladekel

Maybe have a look at the 'joint.N.unlock' pins:
linuxcnc.org/docs/html/man/man9/motion.9...OINT%20unlock%20pins
 
It seems to work for me.
Is there any example for unlocking an axis?

Please Log in to join the conversation.

More
1 year 3 months ago #332226 by Aciera
The intended use is for indexing rotaries as described in this section:
linuxcnc.org/docs/stable/html/config/ini...:ini:sec:axis-letter

If you need more than just G0 moves then you would likely need to make something up in HAL.

Please Log in to join the conversation.

More
1 year 3 months ago #332227 by bladekel

The intended use is for indexing rotaries as described in this section:
linuxcnc.org/docs/stable/html/config/ini...:ini:sec:axis-letter

If you need more than just G0 moves then you would likely need to make something up in HAL.

 
I can only control the brake with G0 moves.
here is the way;
Code:
[EMCMOT] EMCMOT = motmod unlock_joints_mask=0x08 ... [AXIS_A] ... LOCKING_INDEXER_JOINT = 3 [JOINT_3] .... LOCKING_INDEXER = 1

I have to control the brake for G0,G1,G2,G3 and manuel movements. Because that axis' motor has mechanical brake.
In any type of movement, brake is have to be deactivated and after the movement it has to be activated again.

Do you have any opinion else ? What else I have to try?

Please Log in to join the conversation.

More
1 year 3 months ago #332228 by PCW
The gcode (M62,M63,M66) method with digital I/O will work for any motion but you need to change the gcode.

 

Please Log in to join the conversation.

More
1 year 3 months ago #332237 by Aciera
The usual reason for brakes on non-indexing axes is to avoid unwanted motion when a driver is disabled. So, my first question would be as to why the motors on your machine need to have the brake applied while the motor drive is enabled.

Please Log in to join the conversation.

More
1 year 3 months ago #332243 by pippin88
Why do you need to control the brake like this?

Stepper motors have full torque at 0rpm. If the stepper is powered you should not need the brake. Brake should be turned off when the CNC is powered on, then brake should reactivate when CNC is powered down.

Or is this a brake for 4th axis machining?

Brakes integrated into steppers or servos are not designed to be used for machining, they are jus to hold axis position when the motor is off. Usually to stop Z axis falling under gravity.

Please Log in to join the conversation.

Time to create page: 0.102 seconds
Powered by Kunena Forum