Logic that finally moves. Omron's NJ/NX controllers drive servos with the PLCopen function blocks — MC_Power, MC_MoveAbsolute and friends. Power an axis up and send it somewhere.
You can't move a dead axis. First MC_Power to enable it (watch Status go true), then MC_MoveAbsolute to a target position. Try moving before powering — it's rejected.
pwr(Axis := Axis1, Enable := TRUE); IF pwr.Status THEN mv(Axis := Axis1, Execute := go, Position := 75.0, Velocity := 200.0); END_IF; // mv.Done flags arrival
🔁 Rising-edge Execute. Every motion FB fires on a rising edge of Execute — set it false, then true, to launch a new move. The block raises Busy, then Done (or Error).
📐 Absolute vs relative. MC_MoveAbsolute goes to a coordinate; MC_MoveRelative moves a distance from where it is. Same axis, two ways to think about the target.
You call MC_MoveAbsolute but the axis hasn't been powered. What happens?