The robot runs at the wrong speed in KUKA Sim 3.1, and the speed appears editable only while teaching a point. Treat the motion-statement setting, Python servo control, and generated KRL as three separate control paths. First decide whether the required speed belongs to an existing simulated program move, a Python-driven simulation, or the program exported for the controller.
Speed-control path selection
- Select an existing motion statement. Click the required PTP or linear statement in the Programming tab. If its properties expose the intended speed setting, edit that value and confirm that the statement retains it after selection changes. Continue with statement-level configuration.
- Identify Python-driven motion. If a Python script directly commands a servo or its joints, the statement editor is not the active control path. Continue with servo scripting and obtain the valid property names from the installed scripting interface.
-
Identify exported controller code. If the required result is a KRL program containing
BAS(#VEL_CP,2.0)orBAS(#VEL_PTP,100), configure the simulated motion first, then use a post processor that maps the simulation data into KRL. Python syntax does not replace those KRL instructions directly.
Before anything else, confirm which artifact must change: the selected statement, the live simulation behavior, or the exported KRL file. A speed change in one path does not automatically prove that either of the other two changed.
Existing PTP and linear statements
Creating or reteaching a point is unnecessary when only the move speed must change. The point defines a destination; the motion statement defines how the robot travels to that destination. Select the existing statement and edit its speed through the Programming tab.
| Reading or observation | Meaning | Next check |
|---|---|---|
| The selected PTP statement exposes a speed value | The speed belongs to that programmed PTP move | Change it, replay the move, and compare its duration |
| The selected linear statement exposes a speed value | The speed belongs to that programmed linear move | Change it, replay the segment, and inspect path behavior |
| No editable speed appears | The wrong object, point, or program item may be selected | Return to the Programming tab and select the PTP or linear statement itself |
| The editor value changes but motion does not | Another execution path or runtime control may be commanding the robot | Check whether a Python servo script is active |
- Open the robot program in the Programming tab.
- Select the exact PTP or linear statement whose execution speed must change.
- Edit the statement's available speed value without creating a replacement point.
- Save or apply the edited statement, then reselect it and confirm that the new value remains displayed.
- Run only the affected portion where practical. Do not move on until the robot completes the same geometric move with a measurably different execution time.
KRL command interpretation
The commands BAS(#VEL_CP,2.0) and BAS(#VEL_PTP,100) are KRL, not Python. They express two different speed concepts and must remain associated with the appropriate motion type.
| KRL instruction | Motion category | Diagnostic use |
|---|---|---|
BAS(#VEL_CP,2.0) |
Continuous-path motion, including linear motion | Check whether the generated KRL places it before the intended continuous-path move |
BAS(#VEL_PTP,100) |
Point-to-point motion | Check whether the generated KRL places it before the intended PTP move |
The values 2.0 and 100 are not interchangeable simply because both affect speed. Continuous-path and PTP motion use different speed representations. Read the units or scaling shown by the motion editor and the target KRL environment before transferring a value between them.
If manual KRL edits work in KUKA Sim 4.0 but the same editing route is absent in KUKA Sim 3.1, use the interfaces actually exposed by version 3.1: statement properties for programmed moves or Python servo control for scripted simulation. Use post-processing for the KRL deliverable.
Python servo-control branch
Use Python only when the simulation must drive the robot through component scripting rather than execute an ordinary PTP or linear program statement. The relevant mechanism is servo and joint control. A script supplies motion commands to the simulated servo; it does not become KRL merely because the simulated robot moves correctly.
- Open the component-scripting environment associated with the robot or servo behavior.
- Identify the servo or joint interface used by the installed KUKA Sim 3.1 component.
- Read the exposed speed-related property or command from that interface. Property names are component- and interface-specific, so use the names displayed by the installed scripting API rather than inventing a Python equivalent of
#VEL_CPor#VEL_PTP. - Command a deliberately distinct test speed within the model's configured limits.
- Run a short, repeatable move and record its start-to-finish simulation time.
- Change only the scripted speed input and repeat the same move. Do not move on until the elapsed time changes while the destination remains unchanged.
If the statement editor still controls the move, adding a servo script creates competing control paths. Stop the program-statement execution during the servo test, or disable the script while validating statement-level speed.
Post-processor translation
A post processor bridges the simulation program and controller-language output. It reads motion and speed information represented in the simulation and emits target KRL. This is the resolving branch when the simulation must produce commands such as BAS(#VEL_CP,2.0) and BAS(#VEL_PTP,100).
- Set the speed on each required PTP or linear statement, or establish the speed data used by the scripted workflow.
- Select a post processor that produces KRL for the target robot program.
- Generate the output into a reviewable file.
- Inspect each affected motion block. Confirm that the continuous-path setting precedes the intended linear motion and that the PTP setting precedes the intended PTP motion.
- If the KRL lacks the speed command, inspect the post processor's mapping of simulation speed data. Changing Python execution alone does not require the exporter to emit a corresponding KRL instruction.
- Regenerate after correcting the mapping; do not rely on a one-off manual edit if the file will be exported again.
Resolving-branch verification
| Verification point | Pass condition | Failure branch |
|---|---|---|
| Statement persistence | The selected PTP or linear statement displays the edited speed after reselection | Repeat the statement-property procedure |
| Simulation response | The same path and destination execute with a changed elapsed time | Check for active Python servo control or the wrong selected statement |
| Motion-type mapping | PTP and continuous-path speeds remain assigned to their respective move types | Correct the motion configuration or post-processor mapping |
| Generated KRL | The required BAS instruction appears before the move it governs |
Correct and rerun the post processor |
| Repeatability | A fresh export preserves the intended commands without manual repair | Remove the manual-only workaround and fix the export mapping |
- Record the original elapsed time for one repeatable PTP move and one repeatable linear move.
- Change each speed through its chosen control path while leaving the destinations unchanged.
- Replay both moves and confirm that each elapsed time changes in the expected direction.
- Generate KRL and inspect the placement of
BAS(#VEL_PTP,100)andBAS(#VEL_CP,2.0)where those exact configured values are required. - Generate the program a second time and verify that the same speed commands and motion associations remain present.
Frequently asked questions
What happens if I change a point instead of its PTP or linear statement?
You may alter or reteach the destination without solving the speed problem. Select the existing PTP or linear statement in the Programming tab and edit its speed property.
What happens if I write BAS(#VEL_CP,2.0) in Python?
BAS(#VEL_CP,2.0) is KRL syntax, so it is not a Python servo command. Use the speed interface exposed by the installed servo component, then use a KRL post processor when controller code is required.
What happens if the speed value changes but the robot does not?
Confirm that the edited statement is the one executing and check whether a Python servo script is commanding the same robot. Time the identical move before and after changing only the speed input.
What happens if the generated KRL has no BAS speed command?
Inspect the post processor's mapping of simulation speed data to KRL. Correct the mapping and regenerate the file instead of repairing every export manually.
What happens if PTP speed is applied to a linear move?
The setting targets the wrong motion category. Associate #VEL_PTP with PTP moves and #VEL_CP with continuous-path moves, then verify their placement in the generated KRL.