Relative Positioning: Move Relative
Original instructions
Description
This function is used to manage a complete movement of the axis from the current position to a specified target position.
The target position is directly specified by its distance, in pulses, from the current position of the axis at the time of execution.
The velocity of the axis will follow a trapezoidal profile:
NOTE: If a move relative command is sent while the axis is not referenced, the command is accepted and the position is first set to 0 before executing the command. However, the axis remains unreferenced.
Physical Inputs/Output
Input/Output
Description
Drive_Ready&Emergency input (optional)
The pulse output is generated as long as a current goes through Drive_Ready&Emergency input.
Proximity&LimitSwitch input (optional)
Used as a LimitSwitch.
Counter_in_Position input (optional)
Only for information.
Input from the drive goes high when positioning movement is completed (the drive’s error counter is empty).
Enable_Drive output:
To be connected to the corresponding input of the drive.
Enables the drive when active.
This output is directly controlled by the user through an implicit command object (%Qr.m.c.0).
Configuration Parameters
Parameter
Valid Values
PTO Output Mode
Value 0: Pulse + Direction (Default)
Value 1: CW/CCW
Value 2: A/B Phases
Value 3: Pulse + Direction – Reverse
Value 4: CW/CCW – Reverse
Value 5: A/B Phases – Reverse
Acceleration / Deceleration Unit
ms or Hz/2ms
Default is ms
Representation in FBD
Representation:
Representation in LD
Representation:
WARNING
UNINTENDED APPLICATION BEHAVIOR-COMMAND SENT ON EACH PLC CYCLE
Commands will be sent on every PLC cycle if EN is set to 1.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Representation in IL
Representation:
MOVERELATIVE (CH := (*ANY_IODDT*), TARGET_DISTANCE := (*DINT*), TARGET_VELOCITY := (*DINT*), BUFFERMODE := (*BYTE*)) 
ST (*BYTE*)
Representation in ST
Representation:
(*BYTE*) := MOVERELATIVE (CH := (*ANY_IODDT*), TARGET_DISTANCE := (*DINT*), TARGET_VELOCITY := (*DINT*), BUFFERMODE := (*BYTE*));
Command example using the WRITE_CMD command mechanism in ST representation:
if (ChangePos = True) then  %CH0.1.0.CMD_CODE := 4;  %CH0.1.0.TGT_VELOCITY := 5000; %CH0.1.0.TGT_POSITION := 50000; %CH0.1.0.BUFFER_MODE :=1; WRITE_CMD(%CH0.1.0); ChangePos := False; end_if;
Command Specific Parameters
Parameter
Valid Values
Target Distance (in pulses)
- 2,147,483,648 to 2,147,483,647
Must be enclosed between SW Low Limit and SW High Limit
Target Velocity (in Hz)
1 Hz to 200 kHz
Absolute value limited by Max Frequency
Buffer mode
Value 0: Abort
Value 1: Buffered
Value 2: BlendingPrevious
Adjustment Parameters
Parameter
Valid Values
Hysteresis (Slack)
0 to 255 pulses, default is 0
For A/B Phase output mode only (Normal or Reverse)
Start Frequency (in Hz)
0 Hz to 65,535 Hz
Default is 0Hz, limited by Max Frequency
Stop Frequency (in Hz)
0 Hz to 65,535 Hz
default is 0Hz, limited by Max Frequency
Acceleration Rate
10 to 32,500
Default is 100, limited by Max Acceleration
Deceleration Rate
10 to 32,500
Default is 100, limited by Max Deceleration
Emergency Deceleration Rate
10 to 32,500
Default is 100, limited by Max Deceleration
Software High Limit (in pulses)
-2,147,483,647 to 2,147,483,647
Default is 2,147,483,647
Must be between SW Low Limit and SW Max High Limit
Software Low Limit (in pulses)
-2,147,483,648 to 2,147,483,646
Default is - 2,147,483,648
Must be enclosed between SW Min Low Limit and SW High Limit
Overall Parameters
This table describes all the functional parameters associated to the function.
Explicit Command Parameters
Setting Parameters
Adjustment Parameters
Address
Parameter
Address
Parameter
Address
Parameter
%MWr.m.c.6 (byte 0)
Command Code (=4)
%KWr.m.c.1 (byte 0)
Output Mode
%MWr.m.c.18
Start Frequency
%MWr.m.c.7 (byte 0)
Buffer Mode
%KWr.m.c.1 (byte 12)
Acc/Dec Unit
%MWr.m.c.19
Stop Frequency
%MDr.m.c.8
Target Distance
%KWr.m.c.4
Acc Max
%MWr.m.c.20
Acceleration Rate
%MDr.m.c.10
Target Velocity
%KWr.m.c.5
Dec Max
%MWr.m.c.21
Deceleration Rate
%KDr.m.c.6
FMax
%MWr.m.c.25
Hysteresis
Special cases
If the set target velocity cannot be reached before attaining the target position, the axis velocity will then follow a triangular profile: