Machine axes brakes control <AXESBRAKE>


Use <AXESBRAKE> command to turn on and off axes brakes if there are axes brakes on the machine. Most commonly this command is used to turn on/off spindle brake (Axis C) on the lathe-milling machines when switching from lathe to milling and vice versa. When performing lathe machining the spindle rotates at high speed, and when milling the spindle is fixed by the brake at specific angle. Using brakes helps to increase the spindle load and reduces the spindle precision positioning mechanisms wear. Also brakes are used on milling machines rotating axes to perform indexed machining.

Command:

AXESBRAKE COUNT N, Axis1Pos(n1) State1, Axis2Pos(n2) State2, ...,

AxisNPos(nN) StateN

Parameters:


Parameter

CLD array

Description

N

CLD[1]

Number of axes affected by this command.

n1

CLD[2]

Index of axis named Axis1Pos in the coordinates list.

State1

CLD[3]

New state of Axis1Pos axis:

ON(71) - brake is on,

OFF(72) - brake is off.

n2

CLD[4]

Index of Axis2Pos axis in the coordinates list.

State2

CLD[5]

New state of Axis2Pos axis:

ON(71) - brake is on,

OFF(72) - brake is off.

nN

CLD[2*N]

Index of AxisNPos axis in the coordinates list.

StateN

CLD[2*N+1]

New state of AxisNPos axis:

ON(71) - brake is on,

OFF(72) - brake is off.


Parameters available through the Cmd operator


TCLDAxesBrake: ComplexType

The command to switch the states of axes brake.

Axes: Array, Key="AxisID"

Cmd.Ptr["Axes"] - An array of structures such as AxisBrake . Thus, one command can change the brake state for several axes .

AxisBrake: ComplexType

Cmd.Ptr["Axes"].Item[Index] or Cmd.Ptr["Axes(<AxisName>)"] - Separate element of the Axes array . Contains the state of one machine axis brake . Access to the array elements can either by index or by key field . Here <AxisName> - the key field value, which must match the AxisID field value .

AxisID: String

Cmd.Str["Axes(<AxisName>).AxisID"] - The machine axis identifier, for which is given a new brake state . Determined by the machine schema .

BrakeState: Integer

Cmd.Int["Axes(<AxisName>).BrakeState"] - the new state of the machine axis brake:

0 - Off,

1 - On.


Command syntax allows changing states of multiple axes brakes at once. List of coordinates, which names appear in this command are defined by the SprutCAM machine scheme.

Here are two simple examples of programs handlers for this command.

program AxesBrake

Index: Integer ! Loop counter

AxisNumber: Integer ! Index of an axis in the list of machine axes

BrakeState: Integer ! New state of the axis brake

Index = 1

while Index<=CLD[1] do begin

AxisNumber = CLD[2*Index]

BrakeState = CLD[2*Index+1]

case AxisNumber of

4: begin ! AxisAPos(A) index in the list of machine axes

if BrakeState=71 then Output "M680" ! Turn axis A brake on

else Output "M690" ! Turn axis A brake off

end

6: begin ! AxisAPos(A) index in the list of machine axes

if BrakeState=71 then Output "M68" ! Turn axis C brake on

else Output "M69" ! Turn axis C brake off

end

end

Index = Index + 1

end

end

Another example with Cmd operator using.

program AxesBrake

if Cmd.Ptr["Axes(AxisAPos)"]<>0 then begin ! Axis A is present in this command

if Cmd.Int["Axes(AxisAPos).BrakeState"]=1 then Output "M680" ! Turn axis A brake on

else Output "M690" ! Turn axis A brake off

end

if Cmd.Ptr["Axes(AxisCPos)"]<>0 then begin ! Axis C is present in this command

if Cmd.Int["Axes(AxisCPos).BrakeState"]=1 then Output "M68" ! Turn axis C brake on

else Output "M69" ! Turn axis C brake off

end

end

See also:

Technology commands description

<GMA> array