Machsupport Forum

Mach Discussion => Brains Development => Topic started by: boutje on November 07, 2012, 01:02:04 PM

Title: Trigger an output when axis is moving
Post by: boutje on November 07, 2012, 01:02:04 PM
I have the following problem.

On a wood milling machine i have a A axis with the spindle mounted on.
The A axis has an air break controlled by a solenoid.

So when i move the A axis the break has to release.
How can i make that possible?

Vb script or brain?

Title: Re: Trigger an output when axis is moving
Post by: BR549 on November 07, 2012, 02:25:45 PM
There is no direct way that will allow for a slight dwell to allow for the brake to release before movement.

THE CLOSEST you can get directly is to use the IF AaxisVel >0 then release brake BUT that will not allow for a dwell in motion while the release occurs. You just have to hope that the brake is quick enough to not make the motor miss steps.
The best way would be to modify your CAM post to allow for the brake release before moving the A axis.
G0A360   (A ismoving)
M11P1B0  (apply brake)
---
---
---
M10P1B0  (release Brake)
G4P.25     (apply the dwell)
G1 A1.000  (resume A motion)

Just a thought, (;-) TP
Title: Re: Trigger an output when axis is moving
Post by: boutje on November 10, 2012, 04:58:10 AM
I will give it a try.

The steppermotor on the a axis is 50 Nm and when you let the a axis move with the break on there are no loss of steps.