<< Prev        Next >>

ID : 3629

ClearAreaDetected

Function

Clear the currently retaining area detection information.

This command is available in Ver.2.5.* or higher.

Syntax

ClearAreaDetected Area number[, Condition]

Guaranteed Entry

Area number
Specify the area detection number (0 to 31, or -1) by integer type data. Specifying "-1" will obtain all area's detection status.
Condition
Specify the following detection conditions by integer type data. This is an optional value. This should be "0" if this is omitted.
If "-1" is specified, detection conditions of both "0: When robot enters the specified area." and "1: When robot leaves the specified area." are cleared.
Designated value Detection condition
-1 When a robot leaves the specified area after entering, or When a robot enters the specified area after leaving.
0 When robot enters the specified area.
1 When robot leaves the specified area.

Description

Clear the currently retaining detection information at the specified area.

A controller retains detection information until this command is issued.

Attention

The detection information is retained in the controller until ClearAreaDetected command is issued.
If you want to monitor the change of detection state as the following example shows, use ClearAreaDetected command before GetAreaDetected command.

Example

'!TITLE "Pro1.pcs"

Sub Main
  TakeArm Keep = 0

  ResetArea 0
	
  Move P, P( 100, 10, 300, 180, 0, 180, -1 )

  Area  0, P( 300, 0, 200, 0, 0, 0 ), V( 50, 50, 50 ), 128, -1, 0, Tar_Time( 2 )
SetArea 0 Move L, P( 300, 100, 200, 180, 0, 180, -1 ), Next 'Wait until a robot enters Area 0. Inform an external device once the robot enters the area.
ClearAreaDetected -1, -1
Wait GetAreaDetected( 0, 0 ) Set IO24
'Wait until a robot leaves Area 0. Inform an external device once the robot leaves the area.
ClearAreaDetected -1, -1
Wait GetAreaDetected( 0, 1 )
Reset IO24 End Sub

ID : 3629

<< Prev        Next >>