Adapting a B&R-provided AxCon cyclic current reference structure to Automation Studio 6.3+

Hi Valerio,

I have resolved the issue and successfully commissioned the system.

Here is a summary of the Stewart Platform cyclic current reference migration and the solution to the technical challenges encountered.

Stewart Platform Cyclic Current Reference Migration (AS 6.3+)

1. Project Background & Objective

We have migrated the 6-DOF Stewart Platform from the AS4/Legacy ACP10 architecture to AS6 with mapp Motion (mapp 6.x). Our custom controller, running at 2500 Hz (400 µs), calculates direct motor current references in Amperes. By feeding these references directly into the drive’s additive current channel (ICTRL_ADD_SET_PARID), we aim to bypass the drive’s internal cascade speed/position loops and minimize phase lag.

2. Architecture & Data Flow

  • Dynamic Mapping: We allocate a dynamic function block on the drive via ParID 777 (FUNCTION_BLOCK_CREATE) to map ICTRL_ADD_SET_PARID (ParID 325) to the user REAL register VAR_R4_0 (ParID 4128).

  • Cyclic Injection: The calculated current reference (refCurrent) is written cyclically to VAR_R4_0 using MC_BR_CyclicProcessParID_AcpAx within Task Class 1 (400 µs), with POWERLINK OutputJustInTime enabled.

3. Challenges Encountered & Solutions

  • Challenge 1 (Write-Only Parameter Error - ParID 777): The FUNCTION_BLOCK_CREATE parameter is write-only, causing errors when we attempted to read its status. Solution: We redesigned the initialization state machine to perform sequential, write-only (SET) commands.

  • Challenge 2 (Platform Sagging): The platform dropped during the brake release/buzzer phase. Solution: We updated cyclicWrite.Enable to activate as soon as the drive is energized (module.Power && sptInitState == Ready), ensuring the gravity compensation holding current is applied before the brakes disengage.

  • Challenge 3 (The Critical Bug: Edge-Triggered Reset Race Condition): MC_BR_ProcessParID_AcpAx is edge-triggered. Because our state machine transitioned between commands within a single PLC cycle, the function block never registered the required falling edge of the Execute input, causing subsequent commands to be skipped.

4. The Breakthrough: Dedicated Reset State

We implemented a dedicated Reset State (Case 2) in our C initialization logic to guarantee a clean reset:

  • Case 1: Writes 4096 to ParID 777. Transitions to Case 2.

  • Case 2 (Reset State): The state machine idles for exactly one cycle with Execute = FALSE, allowing the function block to reset its internal state.

  • Case 3: Configures ParID 325 to point to 4128, sets Execute = TRUE, and transitions to the completion state.

Summary & Current Status

Physical testing confirms that the current reference (refCurrent) reaches the drive successfully; the motors hold the platform stable during the brake release phase, and the Stewart Platform is now operating with high stability. The additional 400 µs (one-time startup cycle) has 0% impact on the active motion control loop performance, as the cyclic streaming during motion remains fully deterministic.

The system is currently running at full capacity. Let me know if you would like to review the specific code blocks.

I wish, but in 2 weeks I’m on vacation and as always I’m behind my schedule…:slight_smile:
After yes, we don’t have so many applications that required advanced setting on the axis control so thanks so much for your post, with your post we see how flexible is our axis control.

we are migrating a 6-DOF Stewart Platform from AS4 + Legacy ACP10 to **AS6 + mapp Motion

** The system is currently running at full capacity.

This is great feedback, I’ll share that when sometimes our customers are scary about the migration.

Ciao
Valerio

Hi @omer.alumur ,
I got a feedback from R&D:

In principle the additive point is still there but it also disturbs the torque control FB from mapp Motion which e.g. also limits the maximum speed. This limitation would be overruled by this additional summation point, furthermore the reference torque will always be wrong by this additional torque.
Hence, it is strongly recommended not to use this ParID together with the mapp Motion torque control FB.

Ciao
Valerio

Hi Valerio,

Thank you for the detailed feedback from R&D. The explanation regarding how the additive current point (ICTRL_ADD_SET_PARID / ParID 325) bypasses the mapp Motion speed limiting and torque-monitoring features makes complete sense.

In our specific application (6-DOF Stewart Platform), we run a custom Disturbance Observer (DOB) and Terminal Sliding Mode controller in C-code on the PLC at 2500 Hz (400 µs). Because we implement all high-level control loops (position, velocity, and active damping) on the PLC, we intentionally handle speed and current/torque saturation limits on the PLC side before sending the setpoints. This is why the overspeed bypass has not caused issues in our testing, as the PLC controller monitors and restricts the platform dynamics deterministically.

However, we understand that bypassing the drive-level safety limits is a safety risk (e.g., in case of a communication breakdown or PLC crash, though POWERLINK fault reactions normally engage brakes immediately).

To align with B&R recommendations for AS6 / mapp Motion:

  1. Is there an officially supported way to inject a cyclic current reference that does NOT bypass the speed/torque limiters on the drive?
  2. If we must migrate to a torque-based interface to keep the speed limits active, is there a way to bypass the nonlinear torque-to-current ($k_T$) interpolation inside the drive, or is using the motor nameplate’s nominal $k_T$ on the PLC side the only option?

Thank you again for your support throughout this migration process!

Best regards,
Omer

Hi @omer.alumur ,
I’ll back to you when I’ll get the answer from R&D.

Ciao
Valerio

Hi @omer.alumur ,
I have a very interesting feedback from R&D, BUT you know I can’t verify any side effect so be careful…:slight_smile:

unfortunately there is no real good additive current point that does not bypass the speed limiting features. Nevertheless the ParId is still there and will not be removed in a mapp Motion V5 or V6 version. So if the application works fine, the ParID can still be used.

There is a second possibility to add an additional quadrature current which is the loop filter “Compensation” (mode = 6) (Function).

An alternative would be to add the current already on the PLC side, then as mentioned in the response of the customer there need to be a current to torque calculation which is done in the drive as documented in (Synchronous motor TCTRANS_MODE = 0 (default)). Maybe this is the better solution.

Ciao
Valerio