For a supported Modicon motion application, the Lexium drive family and the Motion Function Blocks (MFB) library provide drive control. Commands such as MC_Power, MC_Home, MC_MoveAbsolute enable the axis, establish a reference and request a position. Check the controller, drive and library combination before applying the example to a machine.
A Lexium 32 servo on a 400 mm pusher rail is the model used here, with CANopen as the illustrated drive interface. The controls demonstrate the required sequence: MC_Power enables the axis (Disabled → Standstill), MC_Home establishes its reference, and MC_MoveAbsolute requests the absolute target. Skip a required condition to see the simulation reject the command rather than begin the move.
pwr (Axis := Lexium_1, Enable := TRUE); (* Disabled → Standstill *) home(Axis := Lexium_1, Execute := doHome); (* establish reference *) IF pwr.Status AND home.Done THEN mv(Axis := Lexium_1, Execute := go, (* rising edge! *) Position := 280.0, Velocity := 200.0); END_IF;
Absolute positioning needs a relationship between the encoder position and the machine coordinate system. In this example, MC_Home establishes the reference that gives position 280 its meaning. An absolute encoder may retain a valid reference through a power cycle, but that depends on the axis configuration and commissioning. Check the reference status before relying on an absolute command.
🏭 Process PACs (M340/M580 + Control Expert). Motion via the MFB library on supported controller and drive combinations. The example uses Lexium over CANopen for a positioning axis, such as a pusher or positioner on a process skid. Verify the required interface and library support for the selected hardware.
🤖 Machine line (M262 + Machine Expert). Supported models and configurations provide machine-oriented motion capabilities, including camming, gearing and coordinated axes over Sercos III. Use EcoStruxure Machine Expert with the motion functions supported by the chosen controller. Select the controller and drive interface before choosing the function blocks.
🔁 Rising-edge Execute. For an Execute-triggered motion command, the job starts on the rising edge of Execute, raises Busy, then Done or Error + ErrorId. To request another job, return Execute to its inactive state before raising it again. Not every motion block uses this triggering model.
🧭 Check the axis state before a command. Disabled → Standstill → Discrete Motion → back to Standstill; ErrorStop on a fault until MC_Reset. A command valid in one state may be refused in another. Compare the state and returned status with the PLCopen motion model introduced in the cross-brand Motion track (D7), then follow the selected block's documented preconditions.
The axis is powered: pwr.Status is TRUE, AxisState is Standstill, the Lexium reports no fault. Yet MC_MoveAbsolute immediately reports Error. Which missing axis condition does this example ask you to check?