ID : 185
Delay
Function
To let the own task stand-by for the specified time.
Syntax
Delay delay time
Guaranteed entry
- Delay time
- Specify the stand-by time by double precision real number type data. The unit is [ms].
Description
The task goes to the stand-by state for the specified delay time [ms].
The task status is "stand-by" when the system is set to stand-by by a Delay statement.
During “Stand-by” state, the CPU load is reduced, this improves the efficiency of other multi-tasking.
Attention
If 0 is designated for Argument:delay time, the task never goes to the stand-by status. Negative value also resulted in the same behavior as 0.
There may be an error in specified delay time due to task loading, etc. Moreover, an error occurs if the specified time is very short.
Delay time elapses even during pausing or step stop.
Example
'!TITLE "Program Stop"
' Move the robot back to the original position after 1 second from moving it from the current value
Sub Sample_Delay
Dim aaa As Position
TakeArm Keep = 1
' Acquire the current position
aaa = CurPos
' Move 200 mm from the current position toward X axis
Move P, Dev( aaa, P( 200, 0, 0, 0, 0, 0, -1 ) )
' Wait for 1 second
Delay 1000
' Move to the original coordinate position
Move P, aaa
End Sub
ID : 185