<< Prev        Next >>

ID : 157

MotionSkip

Function

To interrupt the motion instruction by the currently-active.

Syntax

MotionSkip [arm group[, motion continuation option]]

Guaranteed Entry

Arm group
Designate an arm group number by integer type data. When "0" is designated, arm group number 0, or the arm group including robot axes will be designated. When "-1" is designated, the arm group whose control acquired by the task will be designated. This is an optional value. This should be "-1" if this is omitted.
Motion continuation option
This argument specifies the deceleration ratio to stop currently running motion and the execution timing of the next motion instruction by integer type data. The following table shows input values and its meanings. This is an optional value. This should be "0" if this is omitted.
Designated value Deceleration ratio to stop currently running motion Execution timing of the next motion instruction
0 or omitted Deceleration = 100 End motion (@0)
1 Deceleration = 100 Pass motion (@P)
2 Deceleration = Current setting value End motion (@0)
3 Deceleration = Current setting value Pass motion (@P)

If End motion (@0) is specified, Pass start displacement of currently running robot motion instruction will be changed to End motion (@0). The next motion instruction will start when the current robot motion completely stops.

If Pass motion (@P) is specified, Pass start displacement of currently running robot motion instruction will be changed to Pass motion (@P).
The next motion instruction starts as soon as the current motion starts reducing its speed.

Description

Motion instruction of the designated arm group is interrupted. The motion is decelerated and then stopped.

When "-1" is designated (or omitted) in the argument arm group, the active motion instruction in the own task is interrupted.

If the designated arm group is not in operation, nothing occurs.

Related Terms

MotionComplete

Attention

While the exclusive control function for robot is enabled, If you specify Pass motion (@P) for the start timing of the next motion command, it will be changed to the End motion (@0). As a result, the next motion will not start until the current motion is stopped.

Example

'!TITLE "Interrupting Motion Instruction"
' Interrupt motion if Z component is 400 or more during motion instruction
Sub Sample_MotionSkip

  Dim aaa As Position

  TakeArm Keep = 1

  aaa = P( 500, 300, 500, 180, 0, 180, -1 )

  ' Move to next process after start moving from current position to aaa
  Move P, aaa, Next

  Do

    ' If the current position of Z is 400 or more
    If PosZ( CurPos ) > 400 Then

      ' Stop motion instruction
      MotionSkip 0

      ' Display current position on the message output window
      PrintDbg CurPos

      ' To exit DO~LOOP
      Exit Do

    End If

  Loop

End Sub

ID : 157

<< Prev        Next >>