Skip to content

MAJ — Motion Axis Jog

Category
Motion
Type
Output
Availability
Stepper and DC axes (Explorer ▸ Axes); not for a servo axis

MAJ instruction block: a block labelled MAJ with rows Axis: Feed, Speed: 20 and Dir: fwd


MAJ (Motion Axis Jog) runs an axis at a constant speed in one direction for as long as its rung is true, and stops it the moment the rung goes false. It is the hold-to-run instruction: put it behind a jog pushbutton. On a stepper axis the speed is in axis units per second; on a DC axis it is a percentage of full speed. There is no target and no DN; EN and IP are 1 while the jog runs. Use MAJ for manual positioning, for finding a home sensor, and for continuous feeds. Do not use MAJ for a move to a known position; that is MAM. Do not use it on a servo axis, which cannot jog.


Operand Type Format Valid Range Required Description
Axis Axis Axis name Any stepper or DC axis with a driver Yes The axis to jog.
Speed REAL Literal or tag Stepper: > 0, axis units per second. DC: 0 to 100, percent of full duty Yes Jog speed. A tag lets the speed change while jogging.
Direction Choice fwd or rev — Yes fwd counts up, rev counts down.
Accel REAL Literal or tag > 0 No Accepted by the dialog but not applied to a jog in this release: a jog starts and stops at Speed with no ramp. Keep Speed modest on a loaded axis.

Nothing.

If a jog was running it stops at once. EN and IP clear. DN and PC stay 0. If no jog was running, nothing.

Every scan the rung is true the jog command is re-issued: speed and direction are taken from the operands, EN = 1, and DN and PC are cleared. The axis service steps the motor at that speed and sets IP and InMotion. ActualPos and Counts follow the motion.

Nothing.

Condition EN IP DN / PC Axis
Rung false 0 0 Unchanged Stopped
Rung true, drive on 1 1 0 Runs at Speed in Direction
Rung true, drive off 1 1 0 Counter runs, motor does not turn (see Notes)

Motion status lives on the axis, not on a per-instruction tag.

Member Data type Set by Cleared by Description
EN BOOL MAJ while its rung is true, MAM, MAG Rung false, MAS, MSF A motion command is engaged.
IP BOOL Axis service while steps are being produced Motion stops Motion in process.
DN BOOL MAM reaching its target, MSR MAJ start, next MAM Instruction done. A jog never sets it.
PC BOOL Same as DN Same as DN Process complete.
Dir BOOL Axis service Axis service 1 = forward: follows Direction.
InMotion BOOL Axis service Axis service Steps produced this scan.
DriverOn BOOL MSO MSF The drive is enabled.
Error BOOL Watchdog mismatch, TMC2130 driver fault MAFR Axis fault.
ActualPos REAL Axis service every scan — Position in axis units; changes at Speed while jogging.
CmdPos REAL MAM, MAG, MSR — Not written by MAJ.
Counts DINT Axis service every scan MSR, ResetCounts Raw step counts.
RedefinePos REAL MSR — Value of the last MSR.
ResetCounts BOOL Your logic (write 1) Firmware, after zeroing Zero the counts without an MSR.
Watchdog INT (ms) Axis properties; your logic may overwrite — Mismatch tolerance before Error sets.

Scenario: A jog-forward pushbutton advances the Feed carriage at 20 mm/s while held.

Tags:

  • Jog_Fwd — Jog forward, BOOL
  • Feed — stepper axis, 80 counts per mm, drive enabled by MSO

Rung 1:

—|XIC Jog_Fwd|———[MAJ Feed Speed 20 Dir fwd]———

Scan 1 — Jog_Fwd = 0. The axis is at rest; Feed.IP = 0.

Figure 1 — MAJ rung false: Jog_Fwd off, wire dark

Scan 2 — Jog_Fwd = 1. The axis runs forward at 20 mm/s: Feed.EN = 1, Feed.IP = 1, Feed.Dir = 1, Feed.ActualPos rising 20 per second.

Figure 2 — MAJ rung true: Jog_Fwd on, the wire lit through the block

Values before and after: held for one second from 150 mm, Feed.ActualPos reads about 170 when the button is released, and the axis holds there.


  • MAS — Motion Axis Stop
  • MAM — Motion Axis Move (move to a position)
  • MSO — Motion Servo On (enable the drive first)
  • Motion Instructions — Category index

Interlock with the drive. A jog commanded while DriverOn is 0 still counts steps; the motor does not turn and ActualPos drifts from reality. Use XIC Jog_Fwd → XIC Feed.DriverOn → MAJ Feed.

Two jogs, one axis. Forward and reverse jog rungs are normal. If both are true the later rung wins on each scan; interlock the buttons.

MAS does not end a held jog. MAJ re-issues its command every scan, so a stop instruction only interrupts it for a scan. The jog ends when its rung goes false.

DC axis. Speed is 0 to 100 percent duty; direction reverses the bridge. When the rung drops the duty goes to 0 and the motor coasts.

Servo axis. A servo cannot jog. MAJ on a servo axis moves nothing; use MAM to set an angle.

Watchdog. A jog whose motor is stalled still counts steps, so the watchdog does not see a mismatch on a plain step/dir driver. Only a TMC2130 reports a stalled or shorted driver.

Applies to LadderIDE >=1.2.2 · Last reviewed 2026-09-11 · Screenshots verified 2026-09-11