Resolving MC_MoveVelocity ErrorID 8040 on SIMOTICS 1FK7 with S7

David Krause17 min read
Motion ControlSiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Definition: MC_MoveVelocity ErrorID 8040

When a PLCopen MC_MoveVelocity function block is issued from a SIMATIC S7-300T (Technology CPU) against a SIMOTICS S-1FK7 servo motor paired with a SINAMICS S120 / S210 drive, the function block returns ErrorID 8040 if the axis technology object is not in the correct state. The official description from the S7-300T / S7-1500T SIMATIC AX library reads:

"The axis / external encoder are disabled, or the wrong mode is set. The enable signal required for a motion command is missing. Eliminate and acknowledge all queued errors and then enable the relevant axis mode (for example position-controlled)."

This is a state-machine error, not a hardware fault. The motion command is being delivered to the technology object (TO) before the axis has been transitioned from Disabled through Standstill into a mode in which the velocity block is permitted to operate. The same error family and diagnostic logic apply to all PLCopen MC_* motion blocks; the canonical behavior of MC_MoveVelocity is documented in the SIMATIC AX reference at Siemens SIMATIC AX – MC_MoveVelocity: Move axis with velocity/speed setpoint. Although the S7-300T is the older Technology CPU generation, the PLCopen error IDs, axis state model, and required enable sequence are consistent with the S7-1500T Motion Control documentation.

Affected Hardware and Software

Component Part Number / Designation Role
Servo motor 1 (low inertia) 1FK7034-5AF21-1DH0 Approx. 3 Nm continuous / 6 Nm peak, integrated holding brake, multi-pole resolver / EnDat encoder depending on variant
Servo motor 2 (high inertia) 1FK7063-5AH71-1DH5-Z Approx. 7.5 Nm continuous, integrated holding brake, "-Z" = customer-specific option (e.g., vibration grade, connector, special balancing)
Drive SINAMICS S120 (line + motor module) or SINAMICS S210 Commutates the 1FK7, controls the integrated brake, exposes the safety enable chain (STO / SS1)
Controller SIMATIC S7-300T CPU 315T-2 DP / CPU 317T-2 DP Runs MC_Power, MC_Reset, MC_Home, MC_MoveVelocity PLCopen blocks against the technology object
Engineering STEP 7 V5.5+ with S7-Technology / T-Config option Configures the TO axis, links MC blocks, monitors T-DB status bits
Technology library SIMATIC AX for S7-300T – MC_Power, MC_Reset, MC_Home, MC_MoveRelative, MC_MoveVelocity PLCopen motion function block set
Drive commissioning tool STARTER (S120) or Startdrive (S210) Configures drive parameters, downloads the parameter set, provides online diagnostics
The MLFB suffix "1DH0" and "1DH5" in the 1FK7 designation identifies the encoder system and the presence of an integrated holding brake. The trailing "-Z" is a customer add-on (Z-options) and does not change the motion FB behavior, but it can affect mechanical vibration limits and brake wiring variants – always confirm the actual motor nameplate against the configured drive motor data.

Root Cause Analysis

ErrorID 8040 is a symptom, not a fault. Three conditions can produce it on a T-CPU axis:

  1. Axis not enabled – MC_Power.Enable is FALSE, the axis is in the Disabled state, or the power-up sequence has not completed. The technology object never reaches Standstill, so any subsequent MC_Home, MC_MoveRelative, or MC_MoveVelocity is rejected.
  2. Enable chain not closed at the drive – The SINAMICS terminal enables (EP terminals, STO, OFF1/OFF2/OFF3, drive-specific pulse enable) are missing, so the drive never reports Operation enable and the T-CPU cannot transition the axis into a powered state. The canonical check is the T-DB status word bit 40.0 (DriveEnabled); if it stays 0, the drive is not ready.
  3. Wrong axis mode requested – MC_MoveVelocity requires the axis to be in Position-controlled operation by default. If the TO is configured as a pure speed-controlled axis, you must set the PositionControl input of the velocity block to FALSE; otherwise the FB rejects the command with 8040 (or a state-mismatch error depending on firmware revision).

Cross-vendor confirmation: Schneider Electric's EcoStruxure Machine Expert V1.1 PLCO documentation describes the same family of "axis-disabled / wrong mode" errors for its MC_MoveVelocity implementation, listing AccelerationOutOfRange, VelocityOutOfRange, AxisDisabled, and AxisNotReady as the primary causes (see EcoStruxure Machine Expert – MC_MoveVelocity). Rockwell Automation's Micro800 MC_MoveVelocity KB 1156818 maps the same conditions – drive not ready, not in position, axis disabled – to that platform's error class (see Micro800 MC_MoveVelocity ErrorID list). The T-CPU implements the same PLCopen state machine and therefore follows the same diagnostic logic.

Prerequisites

  • STEP 7 V5.5 SP4 or later, with the S7-Technology / T-Config option installed and a licensed S7-300T axis object (in the S7-300T licensing model, the TO axis consumes one of the technology object licenses on the CPU's license key).
  • Configured TO axis as a positioning axis or synchronous axis (not a pure speed axis) if you intend to use MC_MoveVelocity with the default PLCopen semantics where PositionControl = TRUE.
  • PROFIBUS-DP or PROFINET IRT link between the T-CPU and the SINAMICS, fully cyclic, with a configured Siemens standard telegram (typical choices: telegram 105 for a SINAMICS S120 servo with one encoder, or telegram 102 / 103 for S210 PROFINET servo).
  • STARTER or Startdrive project loaded, all drive parameters downloaded, and a successful first commissioning on the SINAMICS side – no active F-class faults in the drive fault buffer.
  • 1FK7 motor in the SINAMICS motor list with the holding brake configured (e.g., p1215 on S120) and the brake control parameter set matched to the actual brake opening and closing times on the motor nameplate.
  • All safety / STO wiring verified: the STO inputs on the SINAMICS Control Unit (X122 / X132 EP terminals on S120 CU320-2, or the PROFIsafe slot on S210) must be energized with 24 V on both channels, or a F-fault will latch and the drive will not release the pulses.

Step-by-Step Diagnostic Procedure

  1. Verify the TO type. Open the S7-Technology / T-Config project, select the technology object for axis 1 (and repeat for axis 2), and confirm the type is Positioning axis or Synchronous axis / positioning. A pure Speed-controlled axis is the most common cause of 8040 when PositionControl is left at its default TRUE. If you really want a pure speed axis, change the TO type to Speed axis and set PositionControl = FALSE on the velocity block; in that case only MC_Power, MC_Reset, MC_Stop, MC_Halt, and MC_MoveVelocity can be used on the TO.
  2. Open the axis online diagnostics view. In T-Config, right-click the TO and select Axis – Diagnostics. The status word lives in the T-DB at the offsets defined for the SIMATIC AX layout. Confirm the critical bits:
    • Bit 40.0 DriveEnabled = 1 → SINAMICS reports Operation enable and the 24 V / STO chain is closed.
    • Bit 40.1 AxisError = 0 → no TO-level error latched.
    • Bit 40.2 AxisWarning = 0 (or accepted) → no warning blocking the state transition.
    • Bit 40.7 ControlPanelActive = 0 → the T-CPU control panel is not holding the axis; otherwise the MC blocks cannot move the axis.
  3. Issue MC_Power with Mode = 0. The block accepts a boolean Enable, an integer Mode (0 = absolute power enable, no advanced qualifiers), a StopMode (0 = standard profile; 1 = emergency stop with maximum dynamic values; 2 = immediate voltage removal / coast), and exposes Status (axis is powered), Busy, Error, and ErrorID. Keep Enable TRUE continuously while debugging. Watch the Status output:
    • Status FALSE after 2-3 s → drive not ready, go to step 4.
    • Status TRUE → go directly to step 5.
    MC_Power
      Enable   := TRUE
      Mode     := 0    // Absolute enable, no advanced mode
      StopMode := 0    // Standard stop profile
      Axis     := Axis_DB1
      Status   => DB1_PowerStatus
      Busy     => DB1_PowerBusy
      Error    => DB1_PowerError
      ErrorID  => DB1_PowerErrorID
  4. Issue MC_Reset if Status does not come up. PLCopen reset clears latched axis errors and the cam-disk busy state. Edge-triggered Execute is correct for the first call; in production code, keep Execute TRUE with a watchdog or follow the rising edge of an error signal so a re-triggered fault is also cleared automatically.
    MC_Reset
      Execute := TRUE
      Axis    := Axis_DB1
      Done    => DB1_ResetDone
      Busy    => DB1_ResetBusy
      Error   => DB1_ResetError
      ErrorID => DB1_ResetErrorID
  5. Re-check Status. If still FALSE, the problem is on the drive side. Switch to STARTER / Startdrive, open the drive project, and go to Diagnostics – Control Unit. Inspect the drive state word (r0002 / r0046 / r0054 depending on firmware). The drive must report OFF1 = enable, OFF2 = enable, OFF3 = enable, pulses enabled, and ramp-function generator enabled. If the equivalent T-DB bit 40.0 remains 0, the SINAMICS is not ready and the axis can never reach Standstill; no amount of MC-block re-issuing will help.
  6. Close the SINAMICS terminal enable chain. On a SINAMICS S120 with CU320-2, the typical safe-torque-off (STO) wiring uses terminals X122.1, X122.2, X132.1, X132.2 (EP) plus a 24 V jumper or two-channel safety output. On a SINAMICS S210, the STO is taken from the PROFIsafe slot; a missing PROFIsafe slot or wrong F-destination address will keep the drive in STO active. Verify the following on every commissioning:
    • STO inputs energized (24 V on both STO channels).
    • No active F-faults (F1611 STO input defective, F1612, F30611, F30885, F08501, F07936 brake ramp, etc.) in the SINAMICS fault buffer.
    • OFF1, OFF2, OFF3 all permissive in the control word (mirror in T-DB). On a Siemens standard telegram 105, the control word 1 bit layout is: 0 = ON/OFF1, 1 = OFF2, 2 = OFF3, 3 = enable pulse, 4 = enable ramp-function generator, 5 = unfreeze ramp, 6 = enable setpoint, 7 = acknowledge fault.
  7. Confirm the control word to the drive. From the T-DB layout, locate the control-word mirror (drive telegram offset in the same T-DB). Compare the bits to the SINAMICS state diagram. The canonical sequence is 0x4F7E (ready to switch on) → 0x477E (operation enabled). If you see 0x4740 or 0x4742, the drive is waiting for an enable that the T-CPU is not providing. If you see 0x4F40, OFF2 is missing. If you see 0x4F7C, the setpoint enable (bit 6) is missing – commonly a cam or position-control dependency that has not been satisfied.
  8. Issue MC_Home with Mode = 3 (Direct homing, taking the current absolute encoder position as the home position). This is valid for an absolute encoder variant; for an incremental encoder, use Mode = 2 (passive homing using a homing mark) or Mode = 6 (absolute encoder homing only on first power-up). Confirm Done returns TRUE before any move FB is issued. On a T-CPU, MC_Home is a state-changing command; without a successful Done, the axis is not in Standstill and any MC_MoveVelocity will be rejected.
  9. Issue MC_MoveVelocity. For a positioning TO, leave PositionControl = TRUE (the default). For a speed-controlled TO, set PositionControl = FALSE. Set Execute = TRUE (latched) and the Velocity input to a non-zero value within the axis dynamic limits. The block then issues a constant setpoint velocity that you can stop with MC_Stop or MC_Halt.
    MC_MoveVelocity
      Execute         := TRUE
      Velocity        := 100.0   // [user units / s] – e.g., mm/s or rev/min
      Acceleration    := 50.0
      Deceleration    := 50.0
      Jerk            := 0.0
      PositionControl := TRUE    // FALSE only for speed-controlled TO
      Axis            := Axis_DB1
      InVelocity      => DB1_VelInVel
      Busy            => DB1_VelBusy
      Error           => DB1_VelError
      ErrorID         => DB1_VelErrorID
Keep MC_Power.Enable TRUE continuously in production. A common mistake is to drop Enable to FALSE between motion commands, which forces the axis back to Disabled and immediately invalidates any in-flight MC_MoveVelocity command, surfacing as 8040 on the next rising edge of Execute.

Interpreting the 8048 Sub-Fault: "Cam Disk in Use"

After MC_Reset is triggered while the SINAMICS is not yet ready, the T-CPU may surface a different error: ErrorID 8048 with the text "Unable to restart. Restart is only permitted when the axis is disabled. The cam disk is in use by another application and can thus not be reset." This is a latch-conflict error inside the T-CPU technology database, not a SINAMICS drive fault.

Procedure to clear it:

  1. Bring the axis fully down: set MC_Power.Enable := FALSE and wait for Status to fall. If the axis was in a cam / synchronization operation, drop the cam first (execute MC_CamIn with Execute := FALSE, or call MC_CamOut on the cam TO).
  2. Verify the cam disk resource is released. In T-Config, open the cam technology object (or the cam slot of the positioning TO) and confirm no other FB instance, HMI, or background task has a hold on the cam. The status word of the cam TO carries a CamActive bit; it must read 0.
  3. Re-trigger MC_Reset. With the axis Disabled and the cam slot free, 8048 will clear and the error latch will be removed.
  4. Re-raise the enable chain: STO → drive enable → MC_Power.Enable := TRUE. Confirm Status = TRUE, then reissue MC_Home, then the velocity command.
The 8048 message combines two failure modes (axis not disabled, cam busy) in one error because the T-CPU first checks the axis state, then the cam resource. If your application does not use the cam feature at all, the second clause can still be reported if a previous engineering session left a default cam object enabled. Open the TO's Cam tab and disable or delete the default cam so the resource is truly free.

1FK7 Integrated Holding Brake: Required Handling

Both motor MLFBs in the original case include an integrated holding brake (the 1DH0 / 1DH5 tail). The 1FK7 holding brake is a 24 V DC, spring-engaged, electrically released brake. If the brake is open-loop controlled from the SINAMICS but the brake-test / brake-control parameters are not fully commissioned, the drive will refuse to release the axis. Typical fault: F07936 "Drive: parking brake ramp not achieved". This in turn keeps T-DB bit 40.0 low and the axis never enters Standstill, so 8040 persists no matter how many times MC_Reset is called.

Parameter SINAMICS S120 typical value Meaning
p1215 1 (or 3 for safe brake control via PROFIsafe) Enable holding brake control
p1216 100 ms (open) / 100 ms (close) – match motor nameplate Brake opening and closing time
p1217 1.0 s Time between pulse enable and brake release
p1226 Threshold for standstill detection, e.g., 5 % of rated speed Speed threshold for "static state" before brake closes
p1227 1.0 s Delay time before brake closes after standstill
p1278 Brake diagnostics threshold Detect brake wear / broken brake

If you call MC_Power while the SINAMICS holds the brake closed (e.g., because the brake test was aborted or the brake feedback wire is missing), the axis appears "stuck" in T-Config: the PositionActualValue does not update and any motion command returns 8040. Always commission the brake first, then enable the axis.

MC_MoveVelocity Parameter Reference (S7-300T / SIMATIC AX)

Input / Output Direction Data type Meaning / Range
Execute IN BOOL Edge-triggered start; keep TRUE to allow continuous latched run
Velocity IN REAL Setpoint velocity in configured user units / s. Must be ≠ 0 to move.
Acceleration IN REAL Positive acceleration ramp. ≤ 0 → error AccelerationOutOfRange.
Deceleration IN REAL Deceleration ramp. Must be > 0 to enable controlled stop.
Jerk IN REAL Jerk limit; 0 disables jerk-limited profile (pure linear ramp).
PositionControl IN BOOL TRUE = position-controlled TO. FALSE = speed-controlled TO only.
Axis IN/OUT AXIS_REF T-DB reference of the technology object.
InVelocity OUT BOOL Setpoint reached within tolerance band.
Busy / Active OUT BOOL Command in progress.
CommandAborted OUT BOOL Replaced by another command or MC_Stop.
Error / ErrorID OUT BOOL / WORD PLCopen standard error class and ID.

Axis State Diagram (PLCopen)

The T-CPU technology object implements the canonical PLCopen motion state machine. The transitions relevant to this error are:

Disabled Standstill Position-Controlled Homing Discrete Motion ErrorStop MC_Power.Enable=TRUE + drive ready MC_MoveVelocity MC_Home MC_MoveAbsolute any error → 8040 / 8048 MC_Reset + MC_Power

Common T-DB Status Bits to Monitor

Offset Bit Symbol Required for MC_MoveVelocity
DB axis base + 40 0 DriveEnabled 1
DB axis base + 40 1 AxisError 0
DB axis base + 40 2 AxisWarning 0 (or accepted)
DB axis base + 40 3 Homed 1 (if your TO type requires homing before motion)
DB axis base + 40 7 ControlPanelActive 0
DB axis base + 42 0-7 AxisState (U8) 2 (Standstill) or 4 (ContinuousMotion) at the time of the move
The exact bit offsets depend on the SIMATIC AX version and the CPU firmware release. Always confirm against the S7-Technology help (F1) for the TO; right-click the axis symbol → Cross-references shows the T-DB layout for the CPU firmware installed.

Troubleshooting Matrix

Symptom First check Likely cause Fix
MC_Power.Status stays FALSE, no ErrorID T-DB bit 40.0 (DriveEnabled) SINAMICS terminal enable missing Energize STO / EP terminals, check OFF1/OFF2/OFF3, acknowledge drive faults
MC_Power.Status stays FALSE, ErrorID 8040 STO input wiring, F-faults in SINAMICS Drive in safe-torque-off or pulses disabled Clear F-faults via STARTER; correct PROFIsafe slot for S210
MC_Reset.Execute rises, ErrorID 8048 Axis state + cam object Reset attempted while axis still enabled, or cam object busy Drop MC_Power.Enable, release cam, then reset
MC_MoveVelocity ErrorID 8040 after MC_Home PositionControl input value TO type is speed axis, not positioning Change TO type to positioning axis, or set PositionControl = FALSE
Axis moves then stops, ErrorID 8040 MC_Power.Enable pattern Enable was dropped between blocks Keep MC_Power.Enable TRUE continuously
Axis never moves, no error reported MC_MoveVelocity.Execute pattern Execute pulsed and dropped Hold Execute TRUE, read InVelocity for confirmation
Drive faults F07936 immediately on MC_Power p1215, p1216, brake feedback Brake control parameters not commissioned Set p1215 = 1, set p1216 to motor nameplate values, brake test

Verification Checklist

  • With the T-CPU online, open the TO diagnostics view and confirm: status word bit 40.0 = 1, no error, no warning, control panel not active.
  • Issue MC_Power.Enable = TRUE and verify Status = TRUE within 2-3 s. If not, the drive side is the bottleneck – do not continue with MC_Home.
  • Issue MC_Home with the appropriate mode (3 for direct homing on absolute encoder, 2 for passive homing, 6 for absolute encoder on first power-up). Confirm Done = TRUE and the position actual value matches the expected home coordinate.
  • Issue MC_MoveVelocity with a small positive velocity, Execute held TRUE, and PositionControl matching the TO type. Confirm InVelocity rises to TRUE within the configured dynamic limits, and the position actual value advances in the expected direction.
  • Issue MC_Halt to ramp down; confirm Done = TRUE and the axis returns to Standstill.
  • Repeat for axis 2 (1FK7063-5AH71-1DH5-Z). The same procedure applies; only the motor data block in the SINAMICS differs.

When to Escalate to a Higher-Level Issue

If after completing the verification checklist the axis still reports 8040, the problem is no longer at the MC block level. Open the SINAMICS fault buffer (STARTER → Diagnostics – Fault buffer) and look for F-class faults. Typical candidates on a fresh 1FK7 / S120 install:

  • F07015 – Drive: encoder fault. Check the DRIVE-CLiQ / EnDat cable between the 1FK7 and the Sensor Module.
  • F07936 – Drive: parking brake ramp not achieved. Brake mechanical issue or p1216 mismatch.
  • F30885 – Sensor Module encoder fault. Encoder cable or SM Module replacement.
  • F08501 – PROFINET / PROFIBUS communication failure. Check telegram, bus address, slot mapping.

Resolve any F-fault, perform POWER ON of the SINAMICS, and re-run the MC enable sequence.

FAQ

What does ErrorID 8040 mean on a SIMATIC S7-300T MC_MoveVelocity block?

It means the axis technology object is not in the correct state for a motion command – either it is still in Disabled, the SINAMICS drive has not raised Operation enable, or the TO type is speed-controlled while the PositionControl input is TRUE. Clear any axis error with MC_Reset, confirm T-DB bit 40.0 = 1, and match the PositionControl input to the TO type.

How do I confirm the SINAMICS is ready from the T-CPU?

Open the TO axis online diagnostics in T-Config and read status word bit 40.0 DriveEnabled. If it is 0, the SINAMICS has not closed its enable chain – check STO/EP terminals, F-faults, and the drive control word in the same T-DB. A value of 1 means the drive is ready and MC_Power can raise the axis to Standstill.

What is the difference between ErrorID 8040 and 8048 on a T-CPU axis?

8040 is "axis disabled or wrong mode" – the axis cannot accept any motion command in its current state. 8048 is "unable to restart / cam disk in use" – it appears when MC_Reset is triggered while the axis is still enabled or while a cam object is held by another consumer. To clear 8048, drop MC_Power.Enable, release the cam object, and re-trigger MC_Reset.

Do I have to set PositionControl to FALSE on a speed-controlled TO?

Yes. If the TO is configured as a pure speed axis, calling MC_MoveVelocity with the default PositionControl = TRUE is rejected with 8040. For a speed TO, set PositionControl := FALSE; in that mode you can use only MC_Power, MC_Reset, MC_Stop, MC_Halt, and MC_MoveVelocity on the axis.

Why does my 1FK7 axis not move even after MC_Power.Status = TRUE?

Most commonly the integrated holding brake is not releasing. Check SINAMICS parameter p1215 = 1, p1216 matched to the motor nameplate opening/closing times, and look for F07936 in the drive fault buffer. If the brake is open and the axis still does not move, confirm the position actual value updates in the TO diagnostics – if it stays at 0 mm, the encoder (EnDat / DRIVE-CLiQ) link is missing or the 1FK7 motor data is not loaded into the drive.

Back to blog