Conveyor Statements

The following statements are for use with conveyor belts.

GET_FRAME Statement

GET_FRAME is a special statement used with moving conveyor-belt frames.

The syntax for GET_FRAME is:

GET_FRAME --frame-- {1: --frame--} {2: --frame--}
	{3: --frame--} {4: --frame--} {5: --frame--}
	{6: --frame--} {7: --frame--} {8: --frame--}
	{WAIT --yes/no-- {WAIT_PATH --yes/no--}}
	{MATCH_CODE --variable--}{DISABLE --variable--} 
	{OUTPUT --o_variable--}
 

This statement assigns objects from the queue manager to moving frames.

The first --frame-- argument may be a variable frame, even if no object frames are specified. The remaining --frame-- arguments should reference a conveyor-based reference frame.

The GET_FRAME MotionWare statement selects an object from a list of up to eight objects and assigns it to a frame. The statement finds the first object in the queue that is not disabled via the DISABLE bit-mask variable. A bit mask corresponding to the object assigned is returned in the OUTPUT variable.

Once an object is assigned to a frame, it must be released by using the RELEASe_frame statement or by moving to a location that does not have Keep if success or Keep if error selected on the location page.

If all of the object selection clauses (1: through 8:) are omitted, the GET_FRAME argument may be either an object definition frame or a variable frame. When the statement is executed, an object frame is assigned the next matching object in the queue, or a variable frame is assigned the next object in the queue. If any of the object selection clauses are specified, the GET_FRAME argument must be a variable frame that receives information from the selected object in the queue.

The 1: --frame-- through 8: --frame-- arguments specify up to eight different objects that may be selected from the queue. The next object in the queue that matches any object specified by these arguments is returned in the variable frame in the GET_FRAME clause. The matching is further qualified by the MATCH_CODE and DISABLE arguments.

If WAIT is "yes", this statement waits until a matching object is found in the queue. Otherwise, if no matching object is found, this statement exits immediately with an output value of zero.

If WAIT_PATH is "yes", and the statement has to wait for an object, the robot enters the wait path specified in the conveyor record.

The MATCH_CODE clause is significant only if you are using the RELEASE_FRAME statement to set object code values.

NOTE: By default, all objects in the queue have a code value of zero unless it has been changed by a RELEASE_FRAME statement.

The DISABLE variable contains a bit mask that indicates which frame object clauses (1: through 8:) should be ignored when searching for an object in the queue. The nth bit in the mask corresponds to the nth clause in the same manner as the OUTPUT --variable-- clause. More than one bit may be set in the mask. If this clause is omitted, a value of zero is assumed, which means that none of the object clauses are disabled.

The OUTPUT variable receives a bit mask indicating which object is selected. When no object frames are specified, this variable is set to -1 if an object is found, or 0 if no objects are found (and waiting is disabled).

Otherwise, the value is a bit mask corresponding to the object clause that contains the object which is found, as follows:

Output
Clause
1
1:
2
2:
4
3:
8
4:
16
5:
32
6:
64
7:
128
8:

The DISABLE mask and OUTPUT variable can be used in combination to select a set of objects without regard to order, as shown in the example below:

	SET disable = 0
	RELEASE_FRAME vframe 
	WHILE disable <> 7
		GET_FRAME vframe = 1:object1 2:object2 3:object3 WAIT yes
			DISABLE disable OUTPUT status
		CASE status OF
			VALUE 1:
				MOVE TO location1
			VALUE 2:
				MOVE TO location2
			VALUE 4:
				MOVE TO location3
			ANY
				EXIT_LOOP
		END
		RELEASE_FRAME vframe
		SET disable = disable BOR status
	END 

The WAIT argument indicates whether the statement should wait if there are no objects queued. The WAIT_PATH argument indicates whether the robot should enter the wait path while waiting.

The MATCH_CODE argument is used with the export option to identify parts that have been exported from an upstream conveyor. The code is set by the RELEASE_FRAME statement (see below).

The remaining optional arguments are used with vision-based conveyors. See Using Conveyor Systems With Vision.

RELEASE_FRAME Statement

This statement releases moving frames assigned by the GET_FRAME statement.

The syntax for RELEASE_FRAME is:

RELEASE FRAME --frame-- {SET_CODE --variable--} 
{IGNORE--yes/no--} {NEW--yes/no--} 

The SET_CODE argument is set if the frame will be exported. It allows you to pass information about an object that has been exported to the downstream robot.

Select IGNORE if you want this object to be ignored by the current robot and to be optionally exported to a downstream robot. NEW indicates whether to return the object to the current queue as a new object.

CHECK_OBJECT Statement

The CHECK_OBJECT statement checks the status of an object that is assigned to a reference frame.

The syntax for CHECK_OBJECT is:

CHECK_OBJECT --frame-- {RESULT --o_variable--}
	{CODE --o_variable--} STATUS --o_variable--
	{NAME --string_variable--}
 

The --frame-- argument references the conveyor-based reference frame for which you want information.

The STATUS variable returns the following results:

Value
Description (for tracking conveyors)
0
No object assigned to this frame
1
Object is upstream
2
Object is within the normal pickup window
3
Object is beyond the conveyor stop line
4
Object is beyond the conveyor pickup limit
5
Object is beyond the conveyor downstream limit
6
Object is lost
Value
Description (for indexing conveyors)
0
No object assigned to this frame
2
Object is in range
5
Object is out of range

If the STATUS variable is nonzero, the vision result is returned in the RESULT variable and the object code is returned in the CODE result. The optional NAME string variable receives the object name.

MATCH_OBJECTS Statement

The MATCH_OBJECTS statement checks that a minimum number of different objects are present in the conveyor queue and ready for acquisition.

This statement is normally used with an indexing conveyor, but it may also be used with a tracking conveyor that is equipped with a belt-stop signal. In this case, Only stop busy objects on the conveyor record must be left unchecked.

Up to four pairs of objects and object counts may be specified. A match occurs if the conveyor queue contains at least the specified number of each object ready to be accessed.

The syntax for MATCH_OBJECTS is:

MATCH_OBJECTS 1:--variable-- of --frame-- {2:--variable-- of
	--frame-- {3:--variable-- of --frame-- {4:--variable-- of
	--frame--}}} {MATCH_CODE --variable--} WAIT --yes/no--}
	{INDEX --yes/no-- {TIMEOUT --variable--} {IGNORE --yes/no--}}
	{OUTPUT --o_variable--}{WAITING --o_variable--} 

If the optional MATCH_CODE clause is specified, all objects must have a corresponding matching code in order to be counted.

If WAIT is "no" and INDEX is "no", this statement samples the object queue once and returns match information in the OUTPUT and WAITING variables.

If WAIT is "yes" and INDEX is "no", this statement waits until either all objects match or until the conveyor manager has completed processing all vision information. The OUTPUT and WAITING variables show the results.

If WAIT is "no" and INDEX is "yes", this statement samples the object queue once and returns match information in the OUTPUT and WAITING variables. In addition, if the conveyor is in wait state, the conveyor indexes or advances once. The OUTPUT and WAITING variables show the results.

If WAIT is "yes" and INDEX is "yes", this statement samples the object queue and repeatedly indexes or advances the conveyor until all the objects match or until the TIMEOUT value is reached. TIMEOUT is specified in seconds. If TIMEOUT is omitted, this statement may cycle the conveyor indefinitely. The OUTPUT and WAITING variables show the results.

OUTPUT is an output variable that receives a bit mask indicating which items, if any, matched the count specified. A zero value indicates that no matches occurred.

WAITING is an output variable that is set to TRUE if the conveyor is waiting for objects to be removed from the queue. Otherwise, it is set to FALSE.

The optional clauses WAIT, INDEX, and IGNORE are assumed to be "no" if they are omitted.

RESUME_CONVEYOR Statement

The RESUME_CONVEYOR statement attempts to resume a conveyor that is in a wait state. If the conveyor is not in a wait state, this statement does nothing.

The syntax for RESUME_CONVEYOR is:

RESUME_CONVEYOR --conveyor-- {WAIT --yes/no--}
	{SET_CODE --variable--} {IGNORE --yes/no--} 

If the WAIT clause is "yes", this statement first waits for the conveyor to become idle before proceeding. If the conveyor never becomes idle, this statement may wait indefinitely.

If the SET_CODE clause is specified, the statement sets the object code for any changed objects to the specified value.

If the IGNORE clause is "yes", all "new" objects beyond the belt-stop line are set to "ignored". For details, see the paragraph above on tracking conveyors.