MLAxisWritePos
Description
Sets a new value to an axis’ current location. After this function is called, the axis’ current location will have a value equal to the Position argument.
The following data are illustrated in the figure below.
-
-
All positions are in user units with modulo applied if active, unless specified.
Position / Offset | Description |
---|---|
Actual Position |
Actual Position refers to the actual position of the underlying axis as reported by the drive. It is the sum of the feedback value (Position actual value) returned from the communication link to the drive and any zero-offset due to an MLWritePos function block (MLAxisWritePipPos, MLAxisWritePos). ActualPos := FeedbackPos + ZeroOffset |
Feedback Position | Feedback Position is the current position the drive reports for an axis, scaled to user units. It does not take into account the value of the Zero Offset or axis modulo. |
Generator Position | Generator Position is the summation of all previous commands (i.e. calls to functions which perform motion such as MLAxisAbs, MLAxisMoveVel, and MLAxisRel) to the Axis internal motion generator. It is modified by MLAxisWritePos in order to insure no jumps in the Reference Position command. It also accumulates changes in pipe position due to activate and deactivation of the pipe the Axis block is associated with. |
Pipe Position | The output of the convertor block is written into the Pipe Position value whenever the Convertor block is connected to the axis and the pipe is active. |
Reference Position |
Reference Position is the commanded axis position sent to the drive. It is the summation of Pipe Position and Generator Position. ReferencePosition = Pipe Position + Generator Position |
Zero Offset | The Zero Offset adjusts the coordinate system so that the Actual Position reports correct values after homing or using MLAxisWritePos. |
Arguments
Input
ID |
Description |
ID Name of the Axis block. |
Data type |
DINT |
|
Range |
— |
|
Unit |
N/A |
|
Default |
— |
|
Position |
Description |
The new value for the axis’ current location. |
Data type |
LREAL |
|
Range |
— |
|
Unit |
User unit |
|
Default |
— |
Output
Default (.Q) |
Description |
Returns true when function successfully executes. See more details here. |
Data type |
BOOL |
|
Unit |
N/A |
Previous Function Name
Example
Structured Text
MLAxisWritePos(PipeNetwork.Axis1, 0) ;
Ladder Diagram
Function Block Diagram