MLAxisWritePos
Description
Used to set a position offset at the Axis when the Pipe Network:
- Pipe Position and Pipe Offset are set to zero
- Generator Position is set to equal to Zero Position
- Then Reference Position equals Pipe Position + Generator Position
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 |
---|---|
ActualPosition |
Actual refers to the actual position of the underlying Drive. It is the current position of the drive in user units. It is the sum of the feedback value (Position actual value) returned from the communication link to the drive, the Power ON Delta Offset, and any zero-offset due to an MLWritePos function (MLAxisWritePipPos, MLAxisWritePos). Normally the value of power on delta offset is zero. ActualPos := FeedbackPos + ZeroOffset |
CurrentPosition |
Current position is the actual command value being sent to the drive. It is an unsigned 32-bit integer value (fraction = zero). When in the power on condition this value is the command value that represents the target value in the communication link (Position demand value). It is not in user units, but in Drive units of 2**20 units per revolution of the drive. CurrentPos := ReferencePosition + ZeroOffset |
FeedbackPosition | Feedback Position is the “Position actual value” read from the drive. FeedbackPos relates to the TxPDO value of 'Actual position value' |
GeneratorPosition | Generator position is the summation of all previous commands to the Axis internal trapezoidal motion generator. It is also a collector of uncompensated motion due to MLAxisWritePos being used to modify actual position via the zero offset value and the adjustment in commanded value to insure no steps in the Current position command. It also accumulates changes in pipe position due to activate and deactivation of the pipe and convertor output to pipe position of the axis. |
MotorPosition |
Motor position relates to the RxPDO value of 'Position demand value' MotorPosition = CurrentPos + PowerOnDeltaOffset |
PipePosition | The output of the convertor block is written into the PipePosition value whenever the convertor block is connected to the axis and the pipe is active. |
Power ON Delta Offset | A change was made a long time ago to allow absolute feedback to be passed into the axis rather than always starting at zero actual position. Units are in Drive units of 2**20 units per revolution. On Drive Power On this value is set to be the difference between the “ActualPosition value” and the “Position demand value” last sent to the drive. It is then added to the Current position value when the “Position demand value” is updated. It is read in User Units without periodicity applied. |
ReferencePosition |
Reference position is the summation of PipePosition and GeneratorPosition. ReferencePosition = Pipe Position + Generator Position |
Zero Offset | Affected by the MLAxisWritePos function to adjust the actual position to the desired value of the command by setting zero offset to the difference between the desired and actual position, and applying the change to modify the generator position so that the reference position tracks the change in reference. |
Arguments
Input
ID |
Description |
ID Name of the Axis block. |
Data type |
DINT |
|
Range |
— |
|
Unit |
N/A |
|
Default |
— |
|
Position |
Description |
Position offset. |
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