CALL run_check (args[], error)

 

Function

Statement execution routine for the RUN_CHECK statement. It is used to check whether or not it is okay for the current sequence to command robot motion.

NOTE: The statement name is hard-coded in the routine gm.scr.spawn( ) (in the file GEMAIM.V2). That routine shows only writable numeric variables in the scrolling pick list for the statement argument.

Usage Considerations
Runtime Control Robot Vision

Syntax
	RUN_CHECK --gemvariable-- = MOTION_OK 

Input Parameters

args[ ]

Real array containing the arguments for this statement (record numbers or constants). The individual elements are described below:

--gemvariable--                                                                                                            args[1]

Record number from the GEM Variables database.

Output Parameter

error

Real variable that receives a value indicating whether or not the operation was successful and what action should be taken by the calling routine. See the standard AIM operator error response code values for details.

A Boolean TRUE/FALSE is stored in the specified GEM variable (if it is a valid destination) indicating whether or not conditions permit the sequence to perform robot motion. See the Data Structure described in the Details section for more information.

Details

This routine is used in a sequence to verify that the current state of the equipment is compatible with host control of robot motion. It is considered okay in any of the following situations:

  1. The sequence was initiated by the host and the control state is Remote. (The communication state must be On-Line for the host request to be received.)

  2. The sequence was initiated by the user, and one of the following is true:

    a. The communication state is "Not Communicating".

    b. The control state is "On-Line/Local".

    c. The control state is "Off-Line/Equipment Off-Line".

    d. The output GEM variable must have the type "numeric variable".

Data Structure:

gm.comm Boolean TRUE if communicating
gm.online Boolean TRUE if communication is On-Line (*)
gm.remote Boolean TRUE if communication is Remote (*)
gm.stask Number of task used for GEM "service"
gv.db[ ] Number of the GEM Variables database
gm.gv.lock Lock variable for access to the GEM Variables database

(*) The value of this variable should not be considered if not communicating (i.e., if "gm.comm" is FALSE). In that case, this variable indicates the state that will result the next time communication is established.

File: GEMSTMT.SQU/V2

Statement DB: STATGEM.DB