IF_RobotMotion - ClearSegmentsFromId (Method)
Type: |
Method |
Available as of: |
V1.0.0.0 |
This chapter provides information on:
oTask
Deleting issued motion commands.
With the method ClearSegmentsFromId(...), an already issued motion job with the i_udiSegmentId Id, as well as the motion jobs following this motion job can be deleted again.
Case examples explain the behavior of the method ClearSegmentsFromId(…).
Input |
Data type |
Description |
---|---|---|
i_udiSegmentId |
UDINT |
Id of the motion job that has to be deleted. The motion jobs following thereafter are also deleted. The motion job that has to be deleted with the i_udiSegmentId Id is searched for on the the connected paths configured in the robot. Special case: Id = 0 -> In this case the motion jobs configured in the robot are deleted. Requirement for this is, that the robot is in standstill - IF_RobotFeedback.xInMoiton = FALSE. |
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General library-independent statement on the diagnostic. A value not equal to GD.ET_Diag.Ok corresponds to a diagnostic message. |
|
q_etDiagExt |
POU-specific output on the diagnostic. q_etDiag = ET_Diag.Ok -> Status message q_etDiag <> ET_Diag.Ok -> Diagnostic message |
|
q_sMsg |
STRING[80] |
Event-triggered message that gives additional information on the diagnostic state. |
Initial situation:
oFB_Robot.xEnable = TRUE -> FB_Robot.xActive = TRUE AND FB_Robot.xReady = TRUE.
oFB_Robot.xStart = FALSE -> The robot is not starting to process motion commands.
oMotion commands (MoveL, MoveC, ...) have been issued. See graphic.
o IF_RobotFeedback.xInMotion = FALSE.
1. The issued motion jobs have to be deleted again.
Variant 1:
ifRobotMotion.ClearSegmentsFromId( i_udiSegmentId := 0,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Result of the call-up:
oThe issued motion jobs are deleted.
oDiagnostic message: q_etDiag = GD.ET_Diag.Ok AND q_etDiagExt = ET_DiagExt.Ok.
Variant 2:
ifRobotMotion.ClearSegmentsFromId( i_udiSegmentId := 10,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Result of the call-up:
oThe issued motion jobs are deleted.
oDiagnostic message: q_etDiag = GD.ET_Diag.Ok AND q_etDiagExt = ET_DiagExt.Ok.
2. The motion job with SegmentId = 20 and the following thereafter have to be deleted.
ifRobotMotion.ClearSegmentsFromId( i_udiSegmentId := 20,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Result of the call-up:
oThe motion job with SegmentId = 20 and the following thereafter are deleted.
oDiagnostic message: q_etDiag = GD.ET_Diag.Ok AND q_etDiagExt = ET_DiagExt.Ok.
3. The motion job with SegmentId = 30 and the following thereafter have to be deleted.
ifRobotMotion.ClearSegmentsFromId( i_udiSegmentId := 30,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Result of the call-up:
oThe motion job with SegmentId = 30 and the following thereafter are deleted.
oDiagnostic message: q_etDiag = GD.ET_Diag.Ok AND q_etDiagExt = ET_DiagExt.Ok.
Initial situation:
o FB_Robot.xEnable = TRUE -> FB_Robot.xActive = TRUE AND FB_Robot.xReady = TRUE.
oFB_Robot.xStart = TRUE -> The robot starts processing motion jobs.
o Motion commands (MoveL, MoveC, ...) have been issued. See graphic.
oIF_RobotFeedback.xInMotion = TRUE -> The robot is processing the motion job with SegmentId = 10.
1. The issued motion jobs have to be deleted.
ifRobotMotion.ClearSegmentsFromId( i_udiSegmentId := 0,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Result of the call-up:
oThis is no longer possible at this stage, because the robot is processing the motion job with SegmentId = 10 and is in motion.
oDiagnostic message: q_etDiag = GD.ET_Diag.ExecutionAborted AND q_etDiagExt = ET_DiagExt.AlreadyInSegment.
2. The motion job with SegmentId = 10 and the following thereafter have to be deleted.
ifRobotMotion.ClearSegmentsFromId( i_udiSegmentId := 10,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Result of the call-up:
oThis is no longer possible at this stage because the robot is processing the motion job with SegmentId = 10 and is in motion.
oDiagnostic message: q_etDiag = GD.ET_Diag.ExecutionAborted AND q_etDiagExt = ET_DiagExt.AlreadyInSegment.
3. The motion job with JobId = 20 and the following thereafter have to be deleted.
Requirement:
oIt is possible to stop before the motion job starts with SegmentId = 20.
ifRobotMotion.ClearSegmentsFromId( i_udiSegmentId := 20,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Result of the call-up:
oThe motion job with SegmentId = 20 and the following thereafter are deleted.
oDiagnostic message: q_etDiag = GD.ET_Diag.Ok AND q_etDiagExt = ET_DiagExt.Ok.
Requirement:
oIt is not possible to stop before the motion job starts with SegmentId = 20.
Result of the call-up:
oThe motion job with SegmentId = 20 and the following thereafter are NOT deleted.
oDiagnostic message: q_etDiag = GD.ET_Diag.ExecutionAborted AND q_etDiagExt = ET_DiagExt.StopInFrontOfSegmentNotPossible.
4. The motion job with JobId = 30 and the following thereafter have to be deleted.
Requirement:
oIt is possible to stop before the motion job starts with SegmentId = 30.
ifRobotMotion.ClearSegmentsFromId( i_udiSegmentId := 30,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Result of the call-up:
oThe motion job with SegmentId = 30 and the following thereafter are deleted.
oDiagnostic message: q_etDiag = GD.ET_Diag.Ok AND q_etDiagExt = ET_DiagExt.Ok.
Initial situation:
oFB_Robot.xEnable = TRUE -> FB_Robot.xActive = TRUE AND FB_Robot.xReady = TRUE.
oFB_Robot.xStart = TRUE ->FALSE.
oMotion commands (MoveL, MoveC, ...) have been issued. See graphic.
oIF_RobotFeedback.xInMotion = FALSE -> The robot is not in motion, but is already processing the motion job with SegmentId = 10.
1. The issued motion jobs have to be deleted.
ifRobotMotion.ClearSegmentsFromId( i_udiSegmentId := 0,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Result of the call-up:
oThe issued motion jobs are deleted.
oDiagnostic message: q_etDiag = GD.ET_Diag.Ok AND q_etDiagExt = ET_DiagExt.Ok.
2. The motion job with SegmentId = 10 and the following thereafter have to be deleted.
ifRobotMotion.ClearSegmentsFromId( i_udiSegmentId := 0,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Result of the call-up:
oThe issued motion jobs are deleted.
oDiagnostic message: q_etDiag = GD.ET_Diag.Ok AND q_etDiagExt = ET_DiagExt.Ok.
3. The motion job with SegmentId = 20 and the following thereafter have to be deleted.
ifRobotMotion.ClearSegmentsFromId( i_udiSegmentId := 20,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Result of the call-up:
oThe motion job with SegmentId = 20 and the following thereafter are deleted.
oDiagnostic message: q_etDiag = GD.ET_Diag.Ok AND q_etDiagExt = ET_DiagExt.Ok.
4. The motion job with SegmentId = 30 and the following thereafter have to be deleted.
ifRobotMotion.ClearSegmentsFromId( i_udiSegmentId := 30,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Result of the call-up:
oThe motion job with SegmentId = 30 and the following thereafter are deleted.
oDiagnostic message: q_etDiag = GD.ET_Diag.Ok AND q_etDiagExt = ET_DiagExt.Ok.
Initial situation:
oFB_Robot.xEnable = TRUE -> FB_Robot.xActive = TRUE AND FB_Robot.xReady = TRUE.
oFB_Robot.xStart = TRUE.
oMotion commands (MoveL, MoveC, ...) have been issued. See graphic.
oIF_RobotFeedback.xInMotion = TRUE -> The robot is in motion and is processing the motion job with SegmentId = 20.
1. The motion job with SegmentId = 10 and the following thereafter have to be deleted.
ifRobotMotion.ClearSegmentsFromId( i_udiSegmentId := 10,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Result of the call-up:
oThe motion job with SegmentId = 10 cannot be deleted, because the robot is already processing the motion job with SegmentId = 20.
oDiagnostic message: q_etDiag = GD.ET_Diag.ExecutionAborted AND q_etDiagExt = ET_DiagExt.SegmentAlreadyPassed.
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
ExecutionAborted |
80 |
The robot is already in the segment. |
|
ExecutionAborted |
73 |
The robot is already in the zone. |
|
ExecutionAborted |
9 |
There is no connected path available. |
|
ExecutionAborted |
101 |
The robot already passed the segment. |
|
ExecutionAborted |
100 |
The segment was not found. |
|
ExecutionAborted |
102 |
The robot cannot stop in front of the segment. |
|
ExecutionAborted |
205 |
The external position source is configured. |
|
UnexpectedProgramBehavior |
3 |
An interface is invalid. |
Enumeration name: |
AlreadyInSegment |
Enumeration value: |
80 |
Description: |
The robot is already in the segment. |
Issue |
Cause |
Solution |
---|---|---|
No motion job was deleted. |
The motion job with the Id transferred at the input i_udiSegmentId is already traveling. |
Ensure that ClearSegmentsFromId(...) is called early enough to make sure that the robot has not entered the segment that is intended to be deleted. |
Enumeration name: |
AlreadyInZone |
Enumeration value: |
73 |
Description: |
The robot is already in the zone. |
Issue |
Cause |
Solution |
---|---|---|
No motion job was deleted. |
The robot is already in the zone prior to the motion job with the Id transferred at the input i_udiSegmentId. |
Ensure that ClearSegmentsFromId(...) is called early enough to make sure that the robot is not in the zone prior to the segment that is intended to be deleted. |
ExternalPositionSourceConfigured
Enumeration name: |
ExternalPositionSourceConfigured |
Enumeration value: |
205 |
Description: |
The external position source is configured. |
Issue |
Cause |
Solution |
---|---|---|
No motion job was deleted. |
An external position source for the robot components cartesian, orientation and auxiliary axes is configured. |
Deleting motion jobs is not possible when an external position source for the robot components is configured. Do not delete motion jobs. |
Enumeration name: |
InterfaceInvalid |
Enumeration value: |
3 |
Description: |
An interface is invalid. |
No motion job was deleted.
Enumeration name: |
NoConnectedPathAvailable |
Enumeration value: |
9 |
Description: |
There is no connected path available. |
Issue |
Cause |
Solution |
---|---|---|
It was not possible to delete any motion job. |
ClearSegmentsFromId(...) called but no connected path is available. |
Create a connected path before calling ClearSegmentsFromId(...). |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The motion jobs from and including the Id transferred at the input i_udiSegmentId were deleted successfully.
Enumeration name: |
SegmentAlreadyPassed |
Enumeration value: |
101 |
Description: |
The robot already passed the segment. |
Issue |
Cause |
Solution |
---|---|---|
No motion job was deleted. |
The motion job with the Id transferred at the input i_udiSegmentId was passed already. |
Ensure that ClearSegmentsFromId(...) is called before the robot has passed the segment. |
Enumeration name: |
SegmentNotFound |
Enumeration value: |
100 |
Description: |
The segment was not found. |
Issue |
Cause |
Solution |
---|---|---|
No motion job was deleted. |
The motion job with the Id transferred at the input i_udiSegmentId was not found. |
Ensure that a segment with the Id i_udiSegmentId was sent to the robot successfully. |
StopInFrontOfSegmentNotPossible
Enumeration name: |
StopInFrontOfSegmentNotPossible |
Enumeration value: |
102 |
Description: |
The robot cannot stop in front of the segment. |
Issue |
Cause |
Solution |
---|---|---|
No motion job was deleted. |
It is no longer possible to stop prior to the motion job with the Id transferred at the input i_udiSegmentId. |
Ensure that ClearSegmentsFromId(...) is called early enough so that the robot is able to stop before entering the segment. |