Motion Axis Jog (MAJ)
CompactLogix
5380, CompactLogix
5480, ControlLogix
5580, Compact GuardLogix
5380, and GuardLogix
5580 controllersUse the Motion Axis Jog (MAJ) instruction to move an axis at a constant speed until you tell it to stop.
Architecture | Standard | Safety |
---|---|---|
CompactLogix 5370, ControlLogix 5570, Compact GuardLogix 5370, and GuardLogix 5570 controllers | Yes | No |
Compact GuardLogix 5380, CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix 5580 controllers | Yes | No |
Available Languages
Ladder Diagram
Function Block
This instruction is not available in function block.
Structured Text
MAJ(Axis,MotionControl, Direction,Speed, SpeedUnits, AccelRate, AccelUnits, DecelRate, DecelUnits, Profile,
AccelJerk, DecelJerk, JerkUnits, Merge, MergeSpeed LockPosition, LockDirection);
Operands
Operand | Type Tip: AXIS_CONSUMED is supported by Compact GuardLogix 5580, CompactLogix 5380, and CompactLogix 5480 controllers only. | Type Tip: AXIS_GENERIC is supported by the ControlLogix 5570 and the GuardLogix 5570 controllers only. | Format | Description | |
---|---|---|---|---|---|
Axis | AXIS_CIP_DRIVE AXIS_VIRTUAL
| AXIS_CIP_DRIVE AXIS_VIRTUAL
AXIS_GENERIC_DRIVE
AXIS_SERVO
AXIS_SERVO_DRIVE | Tag | Name of the axis to jog. For controllers that support the REF_TO motion data types, the supported axis operand type can be replaced by an equivalent REF_TO type. | |
Motion Control | MOTION_INSTRUCTION | MOTION_INSTRUCTION | Tag | Control tag for the instruction. | |
Direction | DINT | DINT | Immediate | For This Jog Direction | Enter |
Forward | 0 | ||||
Reverse | 1 | ||||
Speed | REAL | REAL | Immediate or Tag | Speed to move the axis in Speed Units. | |
Speed Units | DINT | DINT | Immediate | Which units do you want to use for the Speed?
| |
Accel Rate | REAL | REAL | Immediate or Tag | Acceleration rate of the axis in Accel Units. | |
Accel Units | DINT | DINT | Immediate | Which units do you want to use for the Accel Rate?
| |
Decel Rate | REAL | REAL | Immediate or Tag | Deceleration rate to the axis in Deceleration Units. | |
Decel Units | DINT | DINT | Immediate | Which units do you want to use for the Decel Rate?
| |
Profile | DINT | DINT | Immediate | Select the velocity profile to run the jog:
| |
Accel Jerk | REAL | REAL | Immediate or Tag | You must always enter values for the Accel and Decel Jerk operands. This instruction only uses the values if the Profile is configured as S-curve.
Use these values to get started.
Enter the jerk rates in these Jerk Units. 0 = Units per sec 3 1 = % of Maximum 2 = % of Time (use this value to get started) 4 = Units per MasterUnit 3 6 = % of Time-Master Driven | |
Decel Jerk | REAL | REAL | Immediate or Tag | ||
Jerk Units | DINT | DINT | Immediate | ||
Merge | DINT | DINT | Immediate | Do you want to turn all current axis motion into a pure jog governed by this instruction regardless of the motion instructions currently in process?
| |
Merge Speed | DINT | DINT | Immediate | If Merge is Enabled, which speed do you want to jog at?
| |
Lock Position | REAL | REAL | Immediate or Tag | Position on the Master Axis where a Slave should start following the master after the move has been initiated on the Slave Axis. See the Structure section below for more information. | |
Lock Direction | UINT32 | UINT32 | Immediate or Tag | Specifies the conditions when the Lock Position should be used. See the Structure section below for more information. |
Structured Text
This Operand | Has These Options Which You | |
---|---|---|
Enter as Text | Or Enter as a Number | |
Axis | No enumeration | Tag |
MotionControl | No enumeration | Tag |
Direction | No enumeration | Immediate |
Speed | No enumeration | Immediate or Tag |
SpeedUnits | units per sec % of maximum
unitspermasterunit | 0 1
4 |
AccelRate | ||
AccelUnits | units per sec 2
% of maximum
unitspermasterunit 2 | 0 1
4 |
DecelRate | ||
DecelUnits | units per sec 2 % of maximum
unitspermasterunit 2 | 0 1
4 |
Profile | Trapezoidal S-curve | 0 1 |
AccelJerk | No enumeration | Immediate or Tag You must always enter a value for the Accel and Decel Jerk operands. This instruction only uses the values if the Profile is configured as
S-curve. Use these values to get started.
|
DecelJerk | No enumeration | |
Jerk Units | units per sec 3 %ofmaximum
%oftime
seconds
unitspermasterunit 3 %oftimemasterdriven
masterunits | 0 1 2 (use this value to get started)
3
4
5
6 |
Merge | disabled enabled | 0 1 |
Merge Speed | programmed current | 0 1 |
Lock Position | No enumeration | Immediate or Tag |
Lock Direction | none
immediateforwardonly
immediatereverseonly
positionforward
positionreverse | 0
1
2
3
4 |
See Structured Text Syntax for more information on the syntax of expressions within structured text.
MOTION_INSTRUCTION Structure
To See If | Check To See If This Bit Is Set To | Data Type | Notes |
---|---|---|---|
A false-to-true transition caused the instruction to execute. | EN | BOOL | The EN bit stays set until the process is complete and the rung goes false. |
The jog was successfully initiated. | DN | BOOL | |
An error happened. | ER | BOOL | |
The axis is jogging. | IP | BOOL | Any of these actions stop this jog and clear the IP bit:
|
Description
Use the MAJ instruction to move an axis at a constant speed without regard to position.
Programming Guidelines
IMPORTANT:
If you change move parameters dynamically by any method, that is by changing move dynamics [Motion Change Dynamics (MCD) instruction or Motion Coordinated Change Dynamics (MCCD)] or by starting a new instruction before the last one has completed, be aware of the risk of velocity or end position overshoot.
A Trapezoidal velocity profile can overshoot if maximum deceleration is decreased while the move is decelerating or is close to the deceleration point.
An S-curve velocity profile can overshoot if:
- Maximum deceleration is decreased while the move is decelerating or close to the deceleration point; or
- Maximum acceleration jerk is decreased and the axis is accelerating. Keep in mind, however, that jerk can be changed indirectly if it is specified in % of time.
For more information, see Troubleshooting Axis Motion.
Guidelines | Details | ||
---|---|---|---|
In ladder diagram, toggle the rung condition each time you want to execute the instruction. | This is a transitional instruction: In ladder diagram, toggle the rung-condition-in from cleared to set each time you want to execute the instruction. | ||
In structured text, condition the instruction so that it only executes on a transition. | In structured text, instructions execute each time they are scanned. Condition the instruction so that it only executes on a transition. Use either of these methods:
For more information, see Structured Text Syntax. | ||
Use the jerk operands for S-curve profiles. | Use the jerk operands when the instruction uses an S-curve profile. You must fill in the jerk operands regardless of the profile. | ||
Use % of Time for the easiest programming and tuning of jerk. | For an easy way to program and tune jerk, enter it as a % of the acceleration or deceleration time. For more information, see Tune an S-curve Profile. | ||
Use Merge to cancel the motion of other instructions. | How you want to handle any motion that’s already in process? | ||
If You Want To | And You Want To | Then Set | |
Add the jog to any motion already in process | Merge = Disabled Merge Speed = Programmed The instruction ignores Merge Speed but you must fill it in anyway. | ||
End the motion from other instructions and just jog | Jog at the speed that you set in this instruction | Merge = Enabled Merge Speed = Programmed | |
Jog at the speed that the axis is already moving | Merge = Enabled Merge Speed = Current The instruction ignores the value that you put in the Speed operand. | ||
Be careful if you start another jog while the axis is already jogging. | If you start a new MAJ instruction while one is already in process, you can cause:
This happens if the MAJ instructions use an S-curve profile. The new MAJ instruction cancels the old MAJ instruction. The axis uses the speed, acceleration, deceleration, and jerk of the new instruction. For more information, see Troubleshoot Axis Motion. | ||
Use an MAS instruction to stop the jog. | |||
Use an MCD instruction to change the speed while jogging. |
When MAJ (Merge = Enabled) is used on any axis associated with a coordinate system and a coordinated motion instruction is running on it, Coordinate system’s maximum deceleration is used to stop remaining axes. If the coordinate system contains orientation axes, Coordinate system’s Orientation maximum deceleration is used for stopping remaining Rx, Ry or Rz axes.
Structure
See Input and Output Parameters Structure for Single Axis Motion Instructions for the input and output parameters that are available for the MAJ instruction via the Master Driven Speed Control (MDSC) function. Before any of these parameters is active, you must execute an MDAC instruction and it must be active (IP bit is set).
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. A major fault can occur if an uninitialized reference or a reference of incorrect type is passed to the Axis Operand. See Common Attributes for operand-related faults.
Execution
Ladder Diagram
Condition/State | Action Taken |
---|---|
Prescan | The .EN, .DN, .ER, and .IP bits are cleared to false. |
Rung-condition-in is false | The .EN bit is cleared to false if either the .DN or .ER bit is true. |
Rung-condition-in is true | The .EN bit is set to true and the instruction executes. |
Postscan | N/A |
Structured Text
Condition/State | Action Taken |
---|---|
Prescan | See Prescan in the Ladder Diagram table |
Normal execution | See Rung-condition-in is false, followed by Rung-condition-in is true in the Ladder Diagram table. |
Postscan | See Postscan in the Ladder Diagram table. |
Error Codes
See Motion Error Codes (.ERR) for Motion Instructions.
Runtime Error Condition
The slave move must start at rest if Speed Units = Seconds or Master Units. This condition may occur when the MAJ with Speed = Seconds or Master Units is started while another MAJ is in progress (merging or replacement mode).
Extended Error Codes
Use Extended Error Codes (EXERR) for more instruction about an error.
If ERR is | And EXERR is | Then | ||
---|---|---|---|---|
Cause | Corrective Action | |||
13 | Varies | An operand is outside its range. | The EXERR is the number of the operand that is out of range. The first operand is 0. For example, if EXERR = 3, then check the Speed. | |
EXERR | MAS Operand | |||
0 | Axis | |||
1 | Motion Control | |||
2 | Direction | |||
3 | Speed | |||
5 | Accel Rate | |||
7 | Decel Rate | |||
15 | -1 | The coordinated system has a Maximum Deceleration of 0. | Go to the Properties for the coordinate system axis and set a Maximum Deceleration. | |
0 or more | An axis in the coordinate system has a Maximum Deceleration of 0. |
|
Changes to Status Bits
Motion Instruction Predefined Data Type Status Bits
See Status Bits for Motion Instructions (MAM, MATC, MAJ) When MDAC Is Active.
MAJ Changes to Instruction Status Bits
Bit Name | Meaning | |
---|---|---|
MotionStatus | The motion status bit for your axis. | |
Bit Number | Meaning | |
AccelStatus | 0 | The axis is not accelerating (FALSE state). |
DecelStatus | 1 | The axis is not decelerating (FALSE state). |
MoveStatus | 2 | The axis is not moving (FALSE state). |
JogStatus | 3 | The axis is not jogging (FALSE state). |
GearingStatus | 4 | The axis is not gearing (FALSE state). |
HomingStatus | 5 | The axis is not homing (FALSE state). |
StoppingStatus | 6 | The axis is stopping (TRUE state). |
AxisHomedStatus | 7 | The axis is not homed (FALSE state). |
PositionCamStatus | 8 | The axis is not position camming (FALSE state). |
TimeCamStatus | 9 | The axis is not time camming (FALSE state). |
PositionCamPendingStatus | 10 | The axis does not have a Position Cam Pending (FALSE state). |
TimeCamPendingStatus | 11 | The axis does not have a Time Cam Pending (FALSE state). |
GearingLockStatus | 12 | The axis is not in a Gear Locked condition (FALSE state). |
PositionCamLockStatus | 13 | The axis is not in a Position Cam Locked condition (FALSE state). |
TimeCamLockStatus | 14 | The axis is not in a Time Cam Locked condition (FALSE state). |
MasterOffsetMoveStatus | 15 | The axis is offset (TRUE state). |
CoordinatedMotionStatus | 16 | Sets when the MDAC instruction executes (TRUE state). Clears when the instruction completes (FALSE state). |
TransformStateStatus | 17 | The axis is part of an active transform (TRUE state). |
ControlledByTransformStatus | 18 | The axis is moving because of a transform (TRUE state). |
DirectVelocityControlStatus | 19 | The axis is not under Direct Velocity Control (FALSE state). |
DirectTorqueControlStatus | 20 | The axis is not under Direct Torque Control (FALSE state). |
JogLockStatus | 24 | MAJ is Locked to Master in MDSC Mode (TRUE state). The bit is cleared when a MGS, MGSD, MAS, or MASD is executed. If either the Slave or Master axis (or both) is paused by changing its speed to 0, then the JogLockStatus bit stays set. Master Driven Mode The bit is set when the Lock Direction request is satisfied. The bit is not used when the enumeration is NONE. For the enumerations Immediate Forward Only and Immediate Reverse Only, the JogLockStatus bit is set immediately when the MAJ is initiated. For the enumeration Position Forward Only and Position Reverse Only, the bit is set when the Master Axis crosses the Master Lock Position in the specified direction. The JogLockStatus bit is cleared when the Master Axis reverses direction and the Slave Axis stops following the Master Axis. The JogLockStatus bit is set again when the Slave Axis resumes following the Master Axis. Time Driven Mode The bit is not used when the enumeration is NONE. |
MasterOffsetMoveLockStatus | 26 | Master offset Move is Locked to master in MDSC Mode (TRUE state). |
MaximumSpeedExceeded | 27 | Sets when the maximum axis speed that is specified in the axis configuration is exceeded during a move (TRUE state). Clears when the velocity is reduced below the limit (FALSE state). |
MAJ Changes to Single Axis Status Bits
If Merge Is | Then the Instruction Changes These Bits | ||
---|---|---|---|
Bit Name | State | Meaning | |
Disabled | JogStatus | TRUE | Axis is Jogging. |
Enabled | JogStatus | TRUE | Axis is Jogging. |
MoveStatus | FALSE | Axis is no longer Moving. | |
GearingStatus | FALSE | Axis is no longer Gearing. |
Master Driven Speed Control (MDSC) and Motion Direct Command Support
The Motion Direct commands are not available in the instruction tree for the MDAC or MDCC instruction. You must program an MDAC in one of the supported programming languages before you execute an MAJ in Time Driven Mode. A runtime error will occur if an MDAC is not previously executed in an MAM or MAJ in Master Driven Mode.
The Motion Direct Command supports the MDSC enumerations speed, acceleration, deceleration, and Jerk for MAJ.
Note that Event Distance and Calculated Data are not supported parameters for the MAJ and Motion Direct Command.
Master Driven Speed Control (MDSC) and CIP Axis Manual Tune and Motion Generator
Event Distance and Calculated Data parameters are not supported for MAJ.
Examples
Ladder Diagram
Provide Feedback