# Machine-Centric Robotics – Motion ST Programming

**URL:** <https://community.br-automation.com/t/machine-centric-robotics-motion-st-programming/9347>\
**Category:** How-To & Wikis\
**Tags:** machine-centric-robotics\
**Created:** [December 11, 2025, 11:42am UTC](https://community.br-automation.com/t/machine-centric-robotics-motion-st-programming/9347 "2025-12-11T11:42:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kovarj](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/kovarj/32/537_2.png) [@kovarj](https://community.br-automation.com/u/kovarj)\
**Post date:** [December 11, 2025, 11:42am UTC](https://community.br-automation.com/t/machine-centric-robotics-motion-st-programming/9347/1 "2025-12-11T11:42:57Z")

</div>

# **Machine-Centric Robotics – Motion ST Programming**

* * *

## **Introduction**

Machine-Centric Robotics (MCR) with Motion ST Programming provides a structured and flexible approach to robot motion control within B&R Automation Studio. This article explains the differences between ST application and robot programs, demonstrates a minimalistic demo project, introduces robotic path planning concepts, and provides detailed examples of ST commands and diagnostic tools.

* * *

## **Agenda**

- ST Application Program vs. ST Robot Program
- Demo Project
- Robotic Path Planning Basics
- Examples and Diagnosis

* * *

## **1. ST Application Program vs. ST Robot Program**

#### **ST Application Program**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/7/77279f85cbaa6d9639b08baca22b0a0c417808c1.png)

- Used to **operate the robot**.
- Inserted via toolbox into Automation Studio logical view.
- Assigned to a CPU task class → runs in **cyclic context**.
- Structure:
  - **Type file** : variable definitions, function blocks, parameter types, user-defined structures.
  - **Init program** : executed at PLC startup for initialization.
  - **Cyclic part** : typically contains a **state machine** (e.g., powering, homing, waiting, moving).
  - Stored in Logical View and compiled into binary with the Automation Studio project.

#### **ST Robot Program**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/3/3100a9b0c7703bcd0d61ed69410135e54fd8b4c3.png)

- Contains **motion instructions** the robot shall perform.
- Inserted via toolbox; executed by **Interpreter module** of Motion Chain.
- Can include variable declarations (constants, PLC variables).
- Main part executed by interpreter.
- Stored on a **file device** (e.g., `CNC_PrgDir`) and can be updated **during runtime**.
- Executed via:
  - Function blocks (e.g., `MC_BR_MoveProgram`)

  - mapp Cockpit.

**Comparison Table**

| **ST Application Program** | **ST Robot Program** |
| --- | --- |
| Contains the application logic e.g., used to operate a robot | Contains the (motion) instructions the robot shall perform |
| Cyclic execution | Function block or mapp Cockpit |
| Init/cyclic/exit parts | Interpreter-based |
| Logical View storage | File device storage(CNC\_PrgDir) |
| Compiled with AS project | Runtime updates possible |

* * *

## **2. Demo Project**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/c/c70e2c1f8af7b6e7e8c51023b3a94c7d3fee5407.jpeg)

A minimalistic Automation Studio project was created for demonstration:

- **Hardware** : APC3100 PLC with Powerlink interface.
- **Robot** : Codian D4 1100 inserted via MCR template.
- Required ACOPOS hardware.
- Auto-generated Scene Viewer visualization.
- Two file devices:
  - `Visualization`
  - `CNC_PrgDir` for motion programs.

### **Scene Viewer**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/6/6777bbd8478f6400f15d89cf8a0aef0d4ee9445f.jpeg)

- Standalone Windows application shipped with Automation Studio.
- Connects via **OPC UA** to ArSim or hardware.
- Visualizes robot motion.
- Added manually:
  - **Path Tracker** : shows TCP trajectory.
  - **Positioner** : displays TCP position (and optionally orientation).

### **Frames**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/b/bae46401b10130be6f37b93c89cf82b5c4f3914e.jpeg)

- Object hierarchy and frame hierarchy define coordinate systems.
- For this training: robot programmed in **base frame coordinates**.

### **Executing ST Robot Program**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/1/1bcb3d8d2cee2d3c04a70ed1773113397cfee5ef.jpeg)

- Specialized function blocks:
  - `MC_BR_MoveProgram`
  - `MC_BR_GroupPower`
  - `MC_BR_GroupHome`

- Program name is referenced from the file device.

* * *

## **3. Robotic Path Planning**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/3/3d579cb05912c343a81f9c269be9c2818cfdf661.jpeg)

### **Motion Chain Basics**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/2/279afb679480732a13cf72f438600151ab653e4b.jpeg)

The motion chain consists of:

- **Interpreter** : Reads ST program, generates motion commands.

- **Geometric Path Planning** : Calculates TCP path.

- **Dynamic Path Planning** : Applies speed profiles and axis limits.

- **Set Value Sampler** : Generates cyclic setpoints for axes.

**Execution Context** :

- Set Value Sampler → cyclic task.

- Other modules → background tasks.

### **Buffer Time**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/1/10928167518940c47c6090d49a8c6f0878507dc5.png)

* * *

- Buffer compensates for CPU load variations.
- Robot starts moving when buffer reaches minimum fill level.
- Dynamic planning maintains lookahead.
- If CPU load is high, buffer may drop → possible motion slowdown.

## **4. ST Commands – Overview and Examples**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/7/7e5a4681379ca6bb07323b5ac1caa89aacc7dfd6.jpeg)

Available ST commands are documented in Automation Studio Help under:  
**Motion Control → mapp Motion → mapp Robotics/CNC → Programming → G-code and ST overview**.

* * *

### **Example 1: Absolute Positioning and Circular Interpolation**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/a/a6643bfe56f2f987a23963380b7f808a02efbac7.png)

![Video1](https://europe1.discourse-cdn.com/brcommunity/original/2X/0/08302da1efeedb63b62b7343f29eaae24fac4ef2.gif)

* * *

### **Example 2: Relative Positioning**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/3/3a4267a5272c7e6809811060d981a30e16b63ac2.png)

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/4/4b8206528d86a999f8a8e2e27334b870661ef6d3.jpeg)

* * *

### **Example 3: Joint Space Motion**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/b/bcb7abd517c7cff848b7d8aec9b2d5ba678ea727.png)

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/3/35f132d705cbee39e9b3b6a303bd880f8623302a.png)

* * *

### **Example 4: Feedrate and Rapid Motion**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/7/718b40f6010cff52f89511957be9cbec500fb9c4.png)

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/7/7c552ad28441baa4c2f72eded324cbf3add3aee5.png)

* * *

### **Example 5: Rounding Edges**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/6/6e92eff617bf75f776489aeab448582d063f71c6.png)

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/7/7439cf66b7c898563e1fc6ed5093a3d2410f6c9b.png)

* * *

### **Timing and Synchronization Commands**

- Wait time

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/c/ca4b66793489730974d4c436e29b9f8b6a729a00.png)

- wait end move

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/3/3265d13ec6a738da4dfac9a5b792962cf313ee02.png)

- wait ALAP

- wait until

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/5/5a2d1b136f999a46b6dfe5eb9bab95df2637990d.png)

- wait until flash

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/b/bb50a94f7fdf8f82b2020b23669e6cd03ce13a06.png)

- do path synch

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/d/db97381425216d7e5fad42bd0785bd7c1e61be4c.png)

* * *

## **5. Diagnosis Tools**

- **Scene Viewer** : Visualize robot motion.
- **Logger** : Check for errors or unexpected behavior.
- **Block Monitor** : Shows which program part is currently sampled.
- **Interpreter Monitor** : Indicates which part was processed.
- **Override** : Execute program slowly for debugging.

* * *

## **Summary**

Motion ST Programming provides a structured approach to robot control in Automation Studio:

- ST Application Programs handle robot operation logic.
- ST Robot Programs define motion sequences and can be updated at runtime.
- Robotic path planning uses a motion chain with buffering for smooth execution.
- A wide range of ST commands enables precise control of motion and timing.
- Diagnostic tools simplify troubleshooting and commissioning.

---

<div class="post-metadata">

**Author:** ![kovarj](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/kovarj/32/537_2.png) [@kovarj](https://community.br-automation.com/u/kovarj)\
**Post date:** [December 11, 2025, 11:43am UTC](https://community.br-automation.com/t/machine-centric-robotics-motion-st-programming/9347/2 "2025-12-11T11:43:02Z")

</div>

Unlisted on December 11, 2025, 11:43am UTC



---

<div class="post-metadata">

**Author:** ![kovarj](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/kovarj/32/537_2.png) [@kovarj](https://community.br-automation.com/u/kovarj)\
**Post date:** [December 11, 2025, 12:28pm UTC](https://community.br-automation.com/t/machine-centric-robotics-motion-st-programming/9347/3 "2025-12-11T12:28:06Z")

</div>

Listed on December 11, 2025, 12:28pm UTC


