MC_SetPosition
This FB is used to set the current position of the axis to an absolute value or shift it by a relative position. The zero point is defined in the machine measurement system and the status "Reference known" is set.
- This axis does not move.
- A following error continues to exist if pending.
- The position can be set in any state of the axis (even "Disabled" and "ErrorStop"). Therefore, this FB can be used to implement " Homing on the fly " during an existing movement.
Note:
The function MC_SetPostion on the axis, which is guided by Leitwert, leads to compensation movement due to bearing detection!
In parallel with the functions:
- L_MC1P_FollowSetValues
- MC_GearInPos
- Technology modules that follow MasterValues
If the axis is already following a master value and the MC_SetPosition function is executed in parallel, this leads to the actual position being referenced. The setpoint position continues to follow the master value and is not influenced by MC_SetPosition. A following error occurs as the actual position is determined by MC_SetPosition and the setpoint position by the reference value.
The resulting situation can be compared with a jump in the setpoint position. The following error is compensated by the drive control. Depending on the setting of the inverter, the compensating movement is jerky and, in the worst case, can lead to mechanical damage.
If the reference is set, an entry is automatically made in the logbook of the controller. If this is not desired, e.g. because the position is moved cyclically, the generation of the logbook entry can be deactivated by the property DisableLogMessages.
|
|
|
|
MC_SetPosition |
|
|
|
|
|---|---|---|---|---|---|---|---|
|
AXIS_REF |
- |
Axis |
Done |
- |
BOOL |
||
|
BOOL |
- |
Execute |
Busy |
- |
BOOL |
||
|
LREAL |
- |
Position |
Error |
- |
BOOL |
||
|
BOOL |
- |
Relative |
ErrorID |
- |
L_IE1P_Error |
||
|
MC_EXECUTION_MODE |
- |
ExecutionMode |
|||||
|
BOOL |
- |
Restart Positioning |
|||||
|
|
|
|
|
|
|
|
|
Inputs
|
Name Data type |
Information/possible settings
|
|
|---|---|---|
|
Axis |
Transfer of the axis data structure |
|
|
Execute BOOL |
FALSEรคTRUE |
Set axis position. |
|
Position LREAL |
Absolute position or distance in [unit] |
|
|
Relative BOOL |
FALSE |
The axis position is set to the absolute position Position. |
|
TRUE |
The axis position is shifted by the Position distance. |
|
|
ExecutionMode |
Execution mode:
|
|
|
Restart Positioning BOOL |
FALSE |
During active positioning, the movement profile is not recalculated, but the original distance to the assigned target position is moved. Under certain circumstances, this leads to the fact that an absolute positioning of the axis is not finished at the assigned position (because a shift of the reference offset has taken place in the meantime). |
|
TRUE |
In the case of active positioning, the movement profile is automatically recalculated. This results in an absolute positioning of the axis being terminated at the commissioned absolute position (with reference to the new zero point) |
|
|
UseSettingsFromHomeMode BOOL |
FALSE |
The values present at the inputs of the FB are used to set the reference position. |
|
If mode 97 or 98 is selected in the HomeMode (subindex 70) of the connected axis, the reference is set from the values set in subindex 84 or 86 according to the selected mode. |
||
Motion axes (AXIS_REF)