MLAxisWritePos
Function - Sets a new value to an axis’ current location.
- If a convertor is not connected, zero Pipe Position and Pipe Offset.
- If a convertor is connected (pipe active also), the pipe position and offset are left alone.
- The actual position is then set equal to the target position, and the Zero Offset is adjusted for no motion.
- The Reference position and Generator Positions are then realigned so that the new reference position creates no step in motion.
- The lag between reference position and actual position is absorbed in the generator position.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
ID |
DINT |
No range |
N/A |
No default |
ID Name of the Axis block. |
Position |
LREAL |
No range |
User units |
No default |
The new value for the axis’ current location. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Default (.Q) |
BOOL |
FALSE, TRUE |
N/A |
Returns TRUE when the function successfully executes. See Function - General Rules. |
Remarks
- Previous function name: MLAxisSetZero
- After this function is called, the axis’ current location has a value equal to the Position argument.
This data are illustrated here:
-
-
All positions are in user units with modulo applied if active, unless specified.
Position / Offset | Description |
---|---|
This is the actual position of the underlying axis as reported by the drive.
ActualPos := FeedbackPos + ZeroOffset |
|
This 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. |
|
This is the summation of all previous commands (i.e., calls to functions which perform motion) to the Axis internal motion generator. See either such as MLAxisAbs, MLAxisMoveVel, or MLAxisRel.
|
|
This is 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. See Convertor. |
|
This is the commanded axis position sent to the drive. It is the summation of Pipe Position and Generator Position. ReferencePosition = Pipe Position + Generator Position |
|
This adjusts the coordinate system so the Actual Position reports correct values after homing or using MLAxisWritePos. |
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
MLAxisWritePos(PipeNetwork.Axis1, 0) ;