<< Prev        Next >>

ID : 3666

Arrive

Function

To let the task stand-by until the motion complete rate specified by the currently-active motion instruction is reached.

Syntax

Arrive motion rate

Guaranteed Entry

Motion rate
Designate the motion rate by single precision real number type data, and the percentage of the motion distance within the range of 0 < motion rate <=100. The unit is "%."

Description

When an Arrive instruction is executed during execution of motion instruction of own task, the program is suspended until the current position (encoder value) achieves the designated motion ratio.

The execution timing of the next command can be specified by writing Arrive command immediately behind the motion instruction with Next option.

Acquisition of control of the robot axis is required.

Attention

  • If a motion instruction is skipped by the interrupt skip function (Interrupt) during stand-by period by an Arrive instruction, the task is released from the stand-by state assuming the motion instruction is completed.
  • Arrive monitors the motion command that is issued the last. If the same motion command is written in sequenced two lines, these motion commands show different behaviors from when it is written in only one line.
    ' Case 1
     Move P, @0 J(0, 45, 90, 0, 45, 0)
     Move P, @P J(0, 45, 90, 0, 45, 90), Next        ' (1)
     Arrive 90
    In Case1, Arrive monitors the state of the motion command of (1). Once the motion command of (1) achieves 90% of its motion, the next line of Arrive starts its process.
    ' Case 2
     Move P, @0 J(0, 45, 90, 0, 45, 0)
     Move P, @P J(0, 45, 90, 0, 45, 90), Next        ' (2)
     Move P, @P J(0, 45, 90, 0, 45, 90), Next        ' (3)
     Arrive 90
    In Case2, Arrive monitors the state of the motion command of (3). In principle, once the motion command of (3) achieves 90% of its motion, the next line of Arrive starts its process. However, when Arrive is executed, the motion command (3) has been completed already (robot does not move anymore because it has already arrived at the destination position). Therefore, the next line of Arrive starts its process immediately.
    On the other hand, since the motion command of (2) is path motion, the motion of (3) starts once the path motion from (2) to (3) starts.
    That is to say, the next line of Arrive starts its process when the path motion from (2) to (3) starts, not when the motion command (2) achieves 90% of its motion (the same position as Case1).
  • "Arrive motion ratio" and "WaitMotion 0, motion ratio" behave the same way.

Example

'!TITLE "Program Stand-by"
' Let the program standby until the specified motion rate is reached
Sub Sample_Arrive

  TakeArm Keep = 1

  Dim aaa As Position

  ' Acquire the current position
  aaa = CurPos

  ' Set internal speed to 10
  Speed 10

  ' Transfer to the next processing after starting movement from the current position to
P( 200, 0, 30, 180, 0, 180, -1 ) Move P, P( 200, 0, 30, 180, 0, 180, -1 ), Next Arrive 50 ' Turn ON the I/O port number 240 when the motion rate reaches to 50% Set IO[240] ' Display "1" indicating ON on the message output window PrintDbg IO[240] Arrive 80 ' Turn OFF the I/O port number 240 when the motion rate reaches to 80% Reset IO[240] ' Display "0" indicating OFF on the message output window PrintDbg IO[240] End Sub

ID : 3666

<< Prev        Next >>