Hello B&R team,
I am currently working on my motion test system using the same setup — the HMI, the ACOPOSmicro, but this time with a B&R servo motor, which I have been able to move successfully.
My question arises at the point where I try to add an Axis Feature in order to use jerk in my program. I am getting errors of the following type:
Error 2025-06-27 02:46:35,197000 -1067186166 B&R gAxis_1
Error during request of a broadcast data point within POWERLINK broadcast channel (McAcpBroadcast)
Motion EventId 100 2058 Online 29451 115964146443 Valid loggers@$motion@29450 Valid loggers@$motion@29451
I have made sure that the McProfGen runtime is enabled and that the cycle times of the main task match the POWERLINK cycle times on both the panel (PLC) and the ACOPOSmicro.
What would be the best way forward in order to use jerk in my program?
I am attaching screenshots showing how I currently have the project configured.
I would also like to emphasise that if I do not load the Axis Feature, I am able to move the axis without any issues using the program I developed .
Thank you very much for your valuable support, as always.:
unsigned long bur_heap_size = 0xFFFF;
// ← NUEVO: Variable para controlar la inicialización del perfil (SIN declarar aquí, se declara en la lista de variables)
void _INIT ProgramInit(void)
{
// Set Axis Basic Parameters
MpAxisBasic_0.Enable = 1;
AxisParameters.Position = 0.0;
AxisParameters.Velocity = 50.0;
AxisParameters.Acceleration = 25.0;
AxisParameters.Deceleration = 25.0;
AxisParameters.Jerk = 500.0; // Jerk activado
// Initialize sequence variables
SequenceActive = 0;
MoveTo38 = 1;
MoveCommanded = 0;
InPosition_Old = 0;
// Initialize edge detection variables
Sensor1_Old = 0;
Sensor2_Old = 0;
// Initialize profile flag
InitProfileDone = 0; // <-- AHORA USA LA VARIABLE DECLARADA EN LA LISTA
}
void _CYCLIC ProgramCyclic(void)
{
// Set Up Variable Pointers
MpAxisBasic_0.MpLink = &gAxis_1;
MpAxisBasic_0.Parameters = &AxisParameters;
```
// Edge detection for momentary buttons
Sensor1_Edge = Sensor1 && !Sensor1_Old;
Sensor2_Edge = Sensor2 && !Sensor2_Old;
Sensor1_Old = Sensor1;
Sensor2_Old = Sensor2;
// Edge detection for InPosition (rising edge)
InPosition_Edge = MpAxisBasic_0.InPosition && !InPosition_Old;
InPosition_Old = MpAxisBasic_0.InPosition;
// Main Code
switch (StateMotion) {
case 0: // Power Axis On
if (MpAxisBasic_0.Enable == 1 && MpAxisBasic_0.Error == 0 &&
MpAxisBasic_0.CommandBusy == 0 && MpAxisBasic_0.Active == 1) {
MpAxisBasic_0.Power = 1;
StateMotion = 5;
}
break;
case 5: // Check For Power
if (MpAxisBasic_0.PowerOn == 1) {
StateMotion = 10;
}
break;
case 10: // Home Axis
MpAxisBasic_0.Home = 1;
StateMotion = 15;
break;
case 15: // Check if Homed
if (MpAxisBasic_0.IsHomed == 1) {
StateMotion = 20;
MpAxisBasic_0.Home = 0;
}
break;
case 20: // Initialize Jerk Profile (solo con Update)
if (!InitProfileDone) {
// Forzar la actualización de parámetros (suficiente para activar el ProfGen)
MpAxisBasic_0.Update = 1;
// Esperar a que la actualización se complete
if (MpAxisBasic_0.UpdateDone) {
MpAxisBasic_0.Update = 0;
InitProfileDone = 1;
StateMotion = 25; // Pasar al control de secuencia
}
} else {
StateMotion = 25; // Si ya está inicializado, pasar directamente
}
break;
case 25: // Sequence Control
// Sensor1: Start/Restart sequence
if (Sensor1_Edge == 1) {
SequenceActive = 1;
MoveTo38 = 1;
MoveCommanded = 0;
MpAxisBasic_0.MoveAbsolute = 0;
}
// Sensor2: Graceful stop
if (Sensor2_Edge == 1) {
SequenceActive = 0;
}
// Launch new movement (only if sequence active)
if (SequenceActive == 1) {
if (MpAxisBasic_0.MoveActive == 0 &&
MpAxisBasic_0.CommandBusy == 0 &&
MoveCommanded == 0) {
if (MoveTo38 == 1) {
AxisParameters.Position = 20.0;
} else {
AxisParameters.Position = 0.0;
}
MpAxisBasic_0.MoveAbsolute = 1;
MoveCommanded = 1;
}
}
// Movement completion
if (InPosition_Edge == 1 && MoveCommanded == 1) {
MpAxisBasic_0.MoveAbsolute = 0;
MoveCommanded = 0;
if (SequenceActive == 1) {
MoveTo38 = !MoveTo38;
}
}
break;
}
// Call axis function block
MpAxisBasic(&MpAxisBasic_0);
}
void _EXIT ProgramExit(void)
{
}





