Brake activation with MpAxisBasic.BrakeReleased

Merhaba
Servo motorun frenini MpAxisBasic ile etkinleştirmek veya devre dışı bırakmak istiyorum. Bunun için BrakeReleased kullanıyorum ama şöyle bir hata alıyorum: 1138. Contant olduğu için şu şekilde yaptım:
BOOL FREN;

FREN:=MpAxisBasic.BrakeReleased ;

Bu şekilde herhangi bir hata almıyorum ama FREN true olarak ayarladığımda FREN kendini sıfırlayıp açılmıyor. Nasıl bir yol izlemem lazım

Hi Merhaba,

Please check the documentation of MpAxisBasic function block.

MpAxisBasic - B&R Online Help
MpAxisBasic Description - B&R Online Help

ReleaseBrake

A positive edge releases the holding brake and a negative edge engages the holding brake.
If the command is issued while the brake is already open (i.e. the axis is switched on), the command has no effect.

Output “BrakeReleased” does not reflect the physical status of the holding brake. It is only the response from the command.

For additional information, see MC_BR_BrakeOperation.

As the documentation says MpAxisBasic ReleaseBrake command only closes the brake, if you want to open and close it you can use MC_BR_BrakeOperation.

1 Like

I tried to do it with this command but it didn’t work.
I did it this way.
FEREN:=MC_BR_BrakeOperation;

BRAKE.Axis:=ADR(gAxis_6);
BRAKE.Execute:=VALVE_1;
FREN.Command:=mcBRAKE_OPEN;

VALVE_1:=TRUE;

Hello @eem.ferhat ,

your example is neither a partial example nor does it show anything of relevance since nobody can guess what the code around does.
(and even the parts you posted are apparently wrong, as it’ s “FEREN” and then “FREN” and also “BRAKE” - assuming all of that is supposedly the same FUB - who knows)

For code, attaching the full task would enable people to /maybe/ spot the mistake easier than in a made up example that’s not reflecting your actual code.
Also, please use code formatting

like this

The error number 1138 you mentioned above does not seem to be correct either - since StatusID are usually a lot larger than that.

And last but not least I would like to repeat the request by my colleague, since that would surely help a lot in understanding a lot of the things you seem to struggle recently

1 Like

Dear administrator, I just want to check the brake of the servo motor. Opening where needed, closing where needed

Yes and the information you provided is not sufficient to help you. Source code can be faulty, wiring can be faulty, basically anything. Plus the FUB will likely let you know, why it doesn’t open the brake (as observable on various outputs of the FUB, most likely the StatusID)

Your post is ignoring basically anything I have said. Please take your time to read and process every reply you get and then act accordingly - for example by providing the requested information.

I requested:

  • real code
  • the actual error number you get
1 Like

Dear Administrator, I do not receive any errors, neither error nor errorid show anything.
BreakStatus returns mcBRAKE_STATUS_NOT_PROVIDED

the code is as follows:

PROGRAM _INIT
MpAxisBasic_2.Enable:= TRUE;

END_PROGRAM

PROGRAM _CYCLIC

MpAxisBasic_2.MpLink:= ADR(gAxis_6);
MpAxisBasic_2.Parameters := ADR(MpAxisBasicParType_2);

Brake.Axis:=ADR(gAxis_6);
Brake.Execute:=Break_open;// DESIGNED AS BOOL
Brake.Command:=mcBRAKE_OPEN;


	MpAxisBasic_2();

END_PROGRAM

PROGRAM _EXIT

END_PROGRAM

You said you received error 1138

Bunun için BrakeReleased kullanıyorum ama şöyle bir hata alıyorum: 1138. Contant olduğu için şu şekilde yaptım:

now you receive no error?

Also, Your MpAxisBasic will not show you the status if you operate the brake using another FUB.
Plus, your code does not show any call of your FUB “Brake”, so even if yo uset the Execute input, it’s simply not called (Brake(); somewhere?)

Thanks for your help. break(); I forgot to put it. I saw it thanks to you