MLAxisWritePos
Function A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. - Sets a new value to an axis’ current location.
- If a convertor is not connected, zero Pipe Position Position means a point in space which is described by different coordinates. Depending on the used system and transformation it can consist of a maximum of six dimensions (coordinates).This means three Cartesian coordinates in space and coordinates for the orientation. In ACS there can be even more than six coordinates. If the same position is described in different coordinate systems the values of the coordinates are different. 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. |
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 In electrical engineering, a drive is an electronic device to provide power to a motor or servo. Control device for regulating the speed, torque and position of a motor. A unit controlling a motor using the current and timing in its coils..
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 The reference system in which a coordinate or path is described. so the Actual Position reports correct values after homing The homing procedure allows, based on a position measurement, to set a position offset to the motor to ensure it is physically at the home position. or using MLAxisWritePos. |
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
MLAxisWritePos(PipeNetwork.Axis1, 0) ;