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?
The following user(s) said Thank You: COFHAL

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

More
1 year 3 months ago - 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
Last edit: 1 year 3 months ago by PCW.
The following user(s) said Thank You: bladekel, COFHAL

Please Log in or Create an account 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
The following user(s) said Thank You: bladekel, COFHAL

Please Log in or Create an account 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?
The following user(s) said Thank You: COFHAL

Please Log in or Create an account 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.
The following user(s) said Thank You: bladekel

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

More
1 year 3 months ago - 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?
Last edit: 1 year 3 months ago by bladekel.

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

Time to create page: 0.340 seconds
Powered by Kunena Forum