logo资料库

Fanuc机器人KAREL语言参考手册

第1页 / 共912页
第2页 / 共912页
第3页 / 共912页
第4页 / 共912页
第5页 / 共912页
第6页 / 共912页
第7页 / 共912页
第8页 / 共912页
资料共912页,剩余部分请下载后查看
FANUC ROBOTICS SYSTEM R-30iA AND R-30iB CONTROLLER KAREL REFERENCE MANUAL
About This Manual
Copyrights and Trademarks
Patents
Conventions
Contents
List of Figures
List of Tables
Safety
CONSIDERING SAFETY FOR YOUR ROBOT INSTALLATION
Keeping People Safe
Using Safety Enhancing Devices
Setting Up a Safe Workcell
Staying Safe While Teaching or Manually Operating the Robot
Staying Safe During Automatic Operation
Staying Safe During Inspection
Staying Safe During Maintenance
KEEPING MACHINE TOOLS AND EXTERNAL DEVICES SAFE
Programming Safety Precautions
Mechanical Safety Precautions
KEEPING THE ROBOT SAFE
Operating Safety Precautions
Programming Safety Precautions
ADDITIONAL SAFETY CONSIDERATIONS FOR PAINT ROBOT INSTALLATIONS
Paint System Safety Features
Staying Safe While Operating the Paint Robot
Special Precautions for Combustible Dusts (powder paint)
Staying Safe While Operating Paint Application Equipment
Staying Safe During Maintenance
1 KAREL LANGUAGE OVERVIEW
1.1 OVERVIEW
1.2 KAREL PROGRAMMING LANGUAGE
1.2.1 Overview
1.2.2 Creating a Program
1.2.3 Translating a Program
1.2.4 Loading Program Logic and Data
1.2.5 Executing a Program
1.2.6 Execution History
1.2.7 Program Structure
Structure of a KAREL Program
1.3 SYSTEM SOFTWARE
1.3.1 Software Components
1.3.2 Supported Robots
1.4 CONTROLLER
1.4.1 Memory
Figure 1 1. Controller Memory
1.4.2 Input/Output System
1.4.3 User Interface Devices
Figure 1 2. R-30 i A Controller
2 LANGUAGE ELEMENTS
2.1 LANGUAGE COMPONENTS
2.1.1 Character Set
2.1.2 Operators
2.1.3 Reserved Words
2.1.4 User-Defined Identifiers
Declaring Identifiers
2.1.5 Labels
Using Labels
2.1.6 Predefined Identifiers
2.1.7 System Variables
2.1.8 Comments
Comments From Within a Program
2.2 TRANSLATOR DIRECTIVES
%INCLUDE Directive in a KAREL Program
Include File mover_decs for a KAREL Program
2.3 DATA TYPES
2.4 USER-DEFINED DATA TYPES AND STRUCTURES
2.4.1 User-Defined Data Types
User-Defined Data Type Example
2.4.2 User-Defined Data Structures
Defining a Data Type as a User-Defined Structure
Accessing Elements of a User-Defined Structure in a KAREL Progra
Defining a Range of Executable Statements
Valid STRUCTURE Definitions
Defining a Variable as a Type Previously Defined as a Structure
2.5 ARRAYS
2.5.1 Multi-Dimensional Arrays
Declaring Variables as Arrays with Two or Three Dimensions
Accessing Elements of Multi-Dimensional Arrays in KAREL Statemen
Declaring Routine Parameters as Multi-Dimensional Arrays
Using a Subarray
2.5.2 Variable-Sized Arrays
Indicates that the Size of an Array is
3 USE OF OPERATORS
3.1 EXPRESSIONS AND ASSIGNMENTS
3.1.1 Rule for Expressions and Assignments
3.1.2 Evaluation of Expressions and Assignments
3.1.3 Variables and Expressions
3.2 OPERATIONS
3.2.1 Arithmetic Operations
3.2.2 Relational Operations
3.2.3 Boolean Operations
3.2.4 Special Operations
Relational Operator
Figure 3 1. Determining w_handle Relative to WORLD Frame
Figure 3 2. Determining b_handle Relative to BUMPER Frame
Vector Operations
Specifying a KAREL Routine to Return a STRING Value
Using an Operator to Concatenate Strings
Using a STRING Expression in a WRITE Statement
String Comparison
Building a String from Another String
4 PROGRAM CONTROL
4.1 OVERVIEW
4.2 PROGRAM CONTROL STRUCTURES
4.2.1 Alternation Control Structures
4.2.2 Looping Control Statements
4.2.3 Unconditional Branch Statement
4.2.4 Execution Control Statements
4.2.5 Condition Handlers
5 ROUTINES
5.1 ROUTINE EXECUTION
5.1.1 Declaring Routines
Defining Local Routines Using a FROM Clause
Local and External Procedure Declarations
Function Declarations
5.1.2 Invoking Routines
Procedure Calls
Function Calls
Recursive Function
5.1.3 Returning from Routines
Procedure RETURN Statements
Function RETURN Statements
5.1.4 Scope of Variables
5.1.5 Parameters and Arguments
Corresponding Parameters and Arguments
Passing Variable Arguments
Correct Passage of an ARRAY
Incorrect Passage of an ARRAY
5.1.6 Stack Usage
5.2 BUILT- IN ROUTINES
6 CONDITION HANDLERS
6.1 CONDITION HANDLER OPERATIONS
6.1.1 Global Condition Handlers
Global Condition Handler Definitions
Using Global Condition Handlers
6.2 CONDITIONS
6.2.1 Port_Id Conditions
6.2.2 Relational Conditions
6.2.3 System and Program Event Conditions
6.3 ACTIONS
6.3.1 Assignment Actions
6.3.2 Motion Related Actions
6.3.3 Routine Call Actions
6.3.4 Miscellaneous Actions
7 FILE INPUT/OUTPUT OPERATIONS
7.1 OVERVIEW
7.2 FILE VARIABLES
Using FILE in a KAREL Program
7.3 OPEN FILE STATEMENT
7.3.1 Setting File and Port Attributes
7.3.2 File String
7.3.3 Usage String
File String Examples
7.4 CLOSE FILE STATEMENT
CLOSE FILE Example
7.5 READ STATEMENT
READ Statement Examples
7.6 WRITE STATEMENT
WRITE Statement Examples
7.7 INPUT/OUTPUT BUFFER
7.8 FORMATTING TEXT (ASCII) INPUT/OUTPUT
7.8.1 Formatting INTEGER Data Items
7.8.2 Formatting REAL Data Items
7.8.3 Formatting BOOLEAN Data Items
7.8.4 Formatting STRING Data Items
7.8.5 Formatting VECTOR Data Items
7.8.6 Formatting Positional Data Items
7.9 FORMATTING BINARY INPUT/OUTPUT
7.9.1 Formatting INTEGER Data Items
7.9.2 Formatting REAL Data Items
7.9.3 Formatting BOOLEAN Data Items
7.9.4 Formatting STRING Data Items
7.9.5 Formatting VECTOR Data Items
7.9.6 Formatting POSITION Data Items
7.9.7 Formatting XYZWPR Data Items
7.9.8 Formatting XYZWPREXT Data Items
7.9.9 Formatting JOINTPOS Data Items
7.10 USER INTERFACE TIPS
7.10.1 USER Menu on the Teach Pendant
Figure 7 1.
Figure 7 2.
7.10.2 USER Menu on the CRT/KB
Figure 7 3.
Figure 7 4.
8 POSITION DATA
8.1 OVERVIEW
8.2 POSITIONAL DATA
8.3 FRAMES OF REFERENCE
Figure 8 1. Referencing Positions in KAREL
8.3.1 World Frame
8.3.2 User Frame (UFRAME)
8.3.3 Tool Definition (UTOOL)
8.3.4 Using Frames in the Teach Pendant Editor (TP)
8.4 JOG COORDINATE SYSTEMS
9 FILE SYSTEM
9.1 OVERVIEW
9.2 FILE SPECIFICATION
9.2.1 Device Name
9.2.2 File Name
9.2.3 File Type
9.3 STORAGE DEVICE ACCESS
9.3.1 Overview
9.3.2 Memory File Devices
9.3.3 Virtual Devices
9.3.4 File Pipes
Program
9.4 FILE ACCESS
9.5 FORMATTING XML INPUT
9.5.1 Overview
9.5.2 Installation Sequence
9.5.3 Example KAREL Program Referencing an XML File
Figure 9 1. XML File 1 Separated start and end tags
Figure 9 2. XML File 2 Combined start and end tags
Figure 9 3. XML File 3 GRID tag not registered or processed
Figure 9 4. KAREL Program
9.5.4 Parse Errors
9.6 MEMORY DEVICE
10 DICTIONARIES AND FORMS
10.1 OVERVIEW
10.2 CREATING USER DICTIONARIES
10.2.1 Dictionary Syntax
10.2.2 Dictionary Element Number
10.2.3 Dictionary Element Name
10.2.4 Dictionary Cursor Positioning
10.2.5 Dictionary Element Text
10.2.6 Dictionary Reserved Word Commands
10.2.7 Character Codes
10.2.8 Nesting Dictionary Elements
10.2.9 Dictionary Comment
10.2.10 Generating a KAREL Constant File
10.2.11 Compressing and Loading Dictionaries on the Controller
Figure 10 1. Dictionary Compressor and User Dictionary File
10.2.12 Accessing Dictionary Elements from a KAREL Program
10.3 CREATING USER FORMS
10.3.1 Form Syntax
Form Syntax
10.3.2 Form Attributes
10.3.3 Form Title and Menu Label
10.3.4 Form Menu Text
10.3.5 Form Selectable Menu Item
10.3.6 Edit Data Item
10.3.7 Dynamic Forms using Tree View
10.3.8 Non-Selectable Text
10.3.9 Display Only Data Items
10.3.10 Cursor Position Attributes
10.3.11 Form Reserved Words and Character Codes
10.3.12 Form Function Key Element Name or Number
10.3.13 Form Function Key Using a Variable
10.3.14 Form Help Element Name or Number
10.3.15 Teach Pendant Form Screen
Figure 10 2. Teach Pendant Form Screen
10.3.16 CRT/KB Form Screen
Figure 10 3. CRT/KB Form Screen
10.3.17 Form File Naming Convention
10.3.18 Compressing and Loading Forms on the Controller
Figure 10 4. Dictionary Compressor and Form Dictionary File
10.3.19 Displaying a Form
Figure 10 5. Example of Selectable Menu Items
Example Form Dictionary for Selectable Menu Items
Example Program for Selectable Menu Items
Figure 10 6. Example of Edit Data Items
Example Dictionary for Edit Data Items
Example Program for Edit Data Items
Figure 10 7. Example of Display Only Data Items
Example Dictionary for Display Only Data Items
Example Program for Display Only Data Items
11 SOCKET MESSAGING
11.1 OVERVIEW
11.2 SYSTEM REQUIREMENTS
11.2.1 Overview
11.2.2 Software Requirements
11.2.3 Hardware Requirements
11.3 CONFIGURING THE SOCKET MESSAGING OPTION
11.3.1 Overview
11.3.2 Setting up a Server Tag
Procedure 11-1 Setting up a Server Tag
11.3.3 Setting up a Client Tag
Procedure 11-2 Setting up a ClientTag
11.4 SOCKET MESSAGING AND KAREL
11.4.1 Overview
11.4.2 MSG_CONN( string, integer )
11.4.3 MSG_DISCO( string, integer )
11.4.4 MSG_PING( string, integer )
11.4.5 Exchanging Data during a Socket Messaging Connection
11.5 NETWORK PERFORMANCE
11.5.1 Overview
11.5.2 Guidelines for a Good Implementation
11.6 PROGRAMMING EXAMPLES
11.6.1
11.6.2 A KAREL Client Application
A KAREL Client Application
11.6.3 A KAREL Server Application
KAREL Server Application
11.6.4 ANSI C Loopback Client Example
ANSI C UNIX-Based Loopback Client Example
12 SYSTEM VARIABLES
12.1 ACCESS RIGHTS
12.2 STORAGE
13 KAREL COMMAND LANGUAGE (KCL)
13.1 COMMAND FORMAT
13.1.1 Default Program
13.1.2 Variables and Data Types
13.2 PROGRAM CONTROL COMMANDS
13.3 ENTERING COMMANDS
13.3.1 Abbreviations
13.3.2 Error Messages
13.3.3 Subdirectories
13.4 COMMAND PROCEDURES
13.4.1 Command Procedure Format
Confirmation in a Command Procedure
13.4.2 Creating Command Procedures
13.4.3 Error Processing
13.4.4 Executing Command Procedures
14 INPUT/OUTPUT SYSTEM
14.1 USER-DEFINED SIGNALS
14.1.1 DIN and DOUT Signals
14.1.2 GIN and GOUT Signals
14.1.3 AIN and AOUT Signals
Figure 14 1. KAREL Logic for Converting Input to a Real Value Re
14.1.4 Hand Signals
14.2 SYSTEM-DEFINED SIGNALS
14.2.1 Robot Digital Input and Output Signals (RDI/RDO)
14.2.2 Operator Panel Input and Output Signals (OPIN/OPOUT)
Figure 14 2. RSR Timing Diagram
Figure 14 3. PNS Timing Diagram
14.2.3 Teach Pendant Input and Output Signals (TPIN/TPOUT)
14.3 Serial Input/Output
14.3.1 Serial Input/Output
Figure 14 4. Location of Ports on the Controller
15 MULTI-TASKING
15.1 MULTI-TASKING TERMINOLOGY
15.2 INTERPRETER ASSIGNMENT
15.3 MOTION CONTROL
15.4 TASK SCHEDULING
15.4.1 Priority Scheduling
15.4.2 Time Slicing
15.5 STARTING TASKS
15.5.1 Running Programs from the User Operator Panel (UOP) PNS S
15.5.2 Child Tasks
15.6 TASK CONTROL AND MONITORING
15.6.1 From TPP Programs
15.6.2 From KAREL Programs
15.6.3 From KCL
15.7 USING SEMAPHORES AND TASK SYNCHRONIZATION
Figure 15 1. Task Synchronization Using a Semaphore
Main Task
Server Task
Semaphore and Task Synchronization Program Example - MAIN TASK
Semaphore and Task Synchronization Program Example - TASK A
Semaphore and Task Synchronization Program Example - TASK B
15.8 USING QUEUES FOR TASK COMMUNICATIONS
Requester
Server
A KAREL LANGUAGE ALPHABETICAL DESCRIPTION
A.1 OVERVIEW
A.2 - A - KAREL LANGUAGE DESCRIPTION
A.2.1 ABORT Action
A.2.2 ABORT Condition
A.2.3 ABORT Statement
A.2.4 ABORT_TASK Built-In Procedure
A.2.5 ABS Built-In Function
A.2.6 ACOS Built-In Function
ACOS Built-In Function
ACOS Built-In Function
A.2.7 ACT_SCREEN Built-In Procedure
A.2.8 ACT_TBL Built-In Procedure
A.2.9 ADD_BYNAMEPC Built-In Procedure
ADD_BYNAMEPC Built-In Procedure
A.2.10 ADD_DICT Built-In Procedure
A.2.11 ADD_INTPC Built-In Procedure
A.2.12 ADD_REALPC Built-In Procedure
A.2.13 ADD_STRINGPC Built-In Procedure
A.2.14 %ALPHABETIZE Translator Directive
A.2.15 APPEND_NODE Built-In Procedure
A.2.16 APPEND_QUEUE Built-In Procedure
A.2.17 APPROACH Built-In Function
APPROACH Function
A.2.18 ARRAY Data Type
A.2.19 ARRAY_LEN Built-In Function
A.2.20 ASIN Built-In Function
ASIN Built-In Function
ASIN Built-In Function
A.2.21 Assignment Action
Assignment Action
A.2.22 Assignment Statement
Assignment Statement
Assignment Statement
Assignment Statement
A.2.23 ATAN2 Built-In Function
ATAN2 Built-In Function
A.2.24 ATTACH Statement
A.2.25 ATT_WINDOW_D Built-In Procedure
A.2.26 ATT_WINDOW_S Built-In Procedure
A.2.27 AVL_POS_NUM Built-In Procedure
A.3 - B - KAREL LANGUAGE DESCRIPTION
A.3.1 BOOLEAN Data Type
A.3.2 BYNAME Built-In Function
A.3.3 BYTE Data Type
BYTE Data Type
A.3.4 BYTES_AHEAD Built-In Procedure
BYTES_AHEAD Built-In Procedure
A.3.5 BYTES_LEFT Built-In Function
BYTES_LEFT Built-In Function
A.4 - C - KAREL LANGUAGE DESCRIPTION
A.4.1 CALL_PROG Built-In Procedure
A.4.2 CALL_PROGLIN Built-In Procedure
A.4.3 CANCEL Action
A.4.4 CANCEL Statement
A.4.5 CANCEL FILE Statement
CANCEL FILE Statement
A.4.6 CHECK_DICT Built-In Procedure
A.4.7 CHECK_EPOS Built-In Procedure
A.4.8 CHECK_NAME Built-In Procedure
A.4.9 CHR Built-In Function
A.4.10 CLEAR Built-In Procedure
CLEAR Built-In Procedure
A.4.11 CLEAR_SEMA Built-In Procedure
A.4.12 CLOSE FILE Statement
A.4.13 CLOSE HAND Statement
CLOSE HAND Statement
A.4.14 CLOSE_TPE Built-In Procedure
A.4.15 CLR_IO_STAT Built-In Procedure
A.4.16 CLR_PORT_SIM Built-In Procedure
A.4.17 CLR_POS_REG Built-In Procedure
CLR_POS_REG Built-In Procedure
A.4.18 %CMOSVARS Translator Directive
A.4.19 %CMOS2SHADOW Translator Directive
A.4.20 CNC_DYN_DISB Built-In Procedure
A.4.21 CNC_DYN_DISE Built-In Procedure
A.4.22 CNC_DYN_DISI Built-In Procedure
A.4.23 CNC_DYN_DISP Built-In Procedure
A.4.24 CNC_DYN_DISR Built-In Procedure
A.4.25 CNC_DYN_DISS Built-In Procedure
A.4.26 CNCL_STP_MTN Built-In Procedure
CNCL_STP_MTN Built-In Procedure
A.4.27 CNV_CNF_STRG Built-In Procedure
CNV_CNF_STRG Built-In Procedure
A.4.28 CNV_CONF_STR Built-In Procedure
CNV_CONF_STR Built-In Procedure
A.4.29 CNV_INT_STR Built-In Procedure
A.4.30 CNV_JPOS_REL Built-In Procedure
A.4.31 CNV_REAL_STR Built-In Procedure
CNV_REAL_STR Built-In Procedure
A.4.32 CNV_REL_JPOS Built-In Procedure
A.4.33 CNV_STR_CONF Built-In Procedure
CNV_STR_CONF Built-In Procedure
A.4.34 CNV_STR_INT Built-In Procedure
A.4.35 CNV_STR_REAL Built-In Procedure
CNV_STR_REAL Built-In Procedure
A.4.36 CNV_STR_TIME Built-In Procedure
CNV_STR_TIME Built-In Procedure
A.4.37 CNV_TIME_STR Built-In Procedure
A.4.38 %COMMENT Translator Directive
A.4.39 COMPARE_FILE Built-in Procedure
Figure A 1. Example of COMPARE_FILE built-in Procedure
A.4.40 CONDITION...ENDCONDITION Statement
A.4.41 CONFIG Data Type
CONFIG Data Type
A.4.42 CONNECT TIMER Statement
A.4.43 CONTINUE Action
A.4.44 CONTINUE Condition
CONTINUE Condition
A.4.45 CONT_TASK Built-In Procedure
CONT_TASK Built-In Procedure
A.4.46 COPY_FILE Built-In Procedure
A.4.47 COPY_PATH Built-In Procedure
A.4.48 COPY_QUEUE Built-In Procedure
COPY_QUEUE Built-In Procedure
A.4.49 COPY_TPE Built-In Procedure
A.4.50 COS Built-In Function
A.4.51 CR Input/Output Item
A.4.52 CREATE_TPE Built-In Procedure
A.4.53 CREATE_VAR Built-In Procedure
A.4.54 %CRTDEVICE
A.4.55 CURJPOS Built-In Function
CURJPOS Built-In Function
A.4.56 CURPOS Built-In Function
A.4.57 CURR_PROG Built-In Function
A.5 - D - KAREL LANGUAGE DESCRIPTION
A.5.1 DAQ_CHECKP Built-In Procedure
DAQ_CHECKP Built-In Procedure
DAQ_CHECKP Built-In Procedure
A.5.2 DAQ_REGPIPE Built-In Procedure
DAQ_REGPIPE Built-In Procedure
DAQ_REGPIPE Built-In Procedure
A.5.3 DAQ_START Built-In Procedure
DAQ_START Built-In Procedure
DAQ_START Built-In Procedure
DAQ_START Built-In Procedure
DAQ_START Built-In Procedure
A.5.4 DAQ_STOP Built-In Procedure
DAQ_STOP Built-In Procedure
DAQ_STOP Built-In Procedure
DAQ_STOP Built-In Procedure
A.5.5 DAQ_UNREG Built-In Procedure
DAQ_UNREG Built-In Procedure
DAQ_UNREG Built-In Procedure
A.5.6 DAQ_WRITE Built-In Procedure
DAQ_WRITE Built-In Procedure
DAQ_WRITE Built-In Procedure
DAQ_WRITE Built-In Procedure
A.5.7 %DEFGROUP Translator Directive
A.5.8 DEF_SCREEN Built-In Procedure
A.5.9 DEF_WINDOW Built-In Procedure
A.5.10 %DELAY Translator Directive
A.5.11 DELAY Statement
A.5.12 DELETE_FILE Built-In Procedure
A.5.13 DELETE_NODE Built-In Procedure
A.5.14 DELETE_QUEUE Built-In Procedure
A.5.15 DEL_INST_TPE Built-In Procedure
A.5.16 DET_WINDOW Built-In Procedure
A.5.17 DISABLE CONDITION Action
DISABLE CONDITION Action
A.5.18 DISABLE CONDITION Statement
DISABLE CONDITION Statement
A.5.19 DISCONNECT TIMER Statement
DISCONNECT TIMER Statement
A.5.20 DISCTRL_ALPH Built_In Procedure
A.5.21 DISCTRL_FORM Built_In Procedure
A.5.22 DISCTRL_LIST Built-In Procedure
A.5.23 DISCTRL_PLMN Built-In Procedure
DISCTRL_PLMN Built-In Procedure
A.5.24 DISCTRL_SBMN Built-In Procedure
DISCTRL_SBMN Built-In Procedure
A.5.25 DISCTRL_TBL Built-In Procedure
A.5.26 DISMOUNT_DEV Built-In Procedure
A.5.27 DISP_DAT_T Data Type
A.5.28 DOSFILE_INF Built-In Procedure
DOSFILE_INF Built-In Procedure
A.6 - E - KAREL LANGUAGE DESCRIPTION
A.6.1 ENABLE CONDITION Action
A.6.2 ENABLE CONDITION Statement
A.6.3 %ENVIRONMENT Translator Directive
A.6.4 ERR_DATA Built-In Procedure
A.6.5 ERROR Condition
A.6.6 EVAL Clause
EVAL Clause
A.6.7 EVENT Condition
A.6.8 EXP Built-In Function
EXP Built-In Function
A.7 - F - KAREL LANGUAGE DESCRIPTION
A.7.1 FILE Data Type
A.7.2 FILE_LIST Built-In Procedure
A.7.3 FOR...ENDFOR Statement
A.7.4 FORCE_SPMENU Built-In Procedure
A.7.5 FORMAT_DEV Built-In Procedure
A.7.6 FRAME Built-In Function
Figure A 2. FRAME Built-In Function
FRAME Built-In Function
A.7.7 FROM Clause
A.8 - G - KAREL LANGUAGE DESCRIPTION
A.8.1 GET_ATTR_PRG Built-In Procedure
A.8.2 GET_FILE_POS Built-In Function
GET_FILE_POS Built-In Function
A.8.3 GET_JPOS_REG Built-In Function
A.8.4 GET_JPOS_TPE Built-In Function
A.8.5 GET_PORT_ASG Built-in Procedure
GET_PORT_ASG Built-In Procedure
A.8.6 GET_PORT_ATR Built-In Function
GET_PORT_ATR Built-In Function
A.8.7 GET_PORT_CMT Built-In Procedure
A.8.8 GET_PORT_MOD Built-In Procedure
GET_PORT_MOD_Built-In Procedure
A.8.9 GET_PORT_SIM Built-In Procedure
A.8.10 GET_PORT_VAL Built-In Procedure
A.8.11 GET_POS_FRM Built-In Procedure
A.8.12 GET_POS_REG Built-In Function
A.8.13 GET_POS_TPE Built-In Function
A.8.14 GET_POS_TYP Built-In Procedure
A.8.15 GET_PREG_CMT Built-In-Procedure
A.8.16 GET_QUEUE Built-In Procedure
GET_QUEUE Built-In Procedure
A.8.17 GET_REG Built-In Procedure
A.8.18 GET_REG_CMT
A.8.19 GET_SREG_CMT Builtin Procedure
A.8.20 GET_STR_REG Built-In Procedure
A.8.21 GET_TIME Built-In Procedure
A.8.22 GET_TPE_CMT Built-in Procedure
A.8.23 GET_TPE_PRM Built-in Procedure
GET_TPE_PRM Built-In Procedure
A.8.24 GET_TSK_INFO Built-In Procedure
A.8.25 GET_USEC_SUB Built-In Procedure
Figure A 3. GET_USEC_SUB Built-In Function
A.8.26 GET_USEC_TIM Built-In Function
A.8.27 GET_VAR Built-In Procedure
Accessing $TP_DEFPROG on MHROB03
GET_VAR Built-In Procedure
GET_VAR SET_VAR Built-In Procedure
Using GET_VAR and SET_VAR To Set Register Values
A.8.28 GO TO Statement
GO TO Statement
A.9 - H - KAREL LANGUAGE DESCRIPTION
A.9.1 HOLD Action
HOLD Action
A.9.2 HOLD Statement
A.10 - I - KAREL LANGUAGE DESCRIPTION
A.10.1 IF ... ENDIF Statement
A.10.2 IN Clause
A.10.3 %INCLUDE Translator Directive
A.10.4 INDEX Built-In Function
INDEX Built-In Function
A.10.5 INI_DYN_DISB Built-In Procedure
A.10.6 INI_DYN_DISE Built-In Procedure
A.10.7 INI_DYN_DISI Built-In Procedure
A.10.8 INI_DYN_DISP Built-In Procedure
A.10.9 INI_DYN_DISR Built-In Procedure
A.10.10 INI_DYN_DISS Built-In Procedure
A.10.11 INIT_QUEUE Built-In Procedure
INIT_QUEUE Built-In Procedure
A.10.12 INIT_TBL Built-In Procedure
INIT_TBL Built-In Procedure
A.10.13 IN_RANGE Built-In Function
IN_RANGE Built-In Function
A.10.14 INSERT_NODE Built-In Procedure
INSERT_NODE Built-In Procedure
A.10.15 INSERT_QUEUE Built-In Procedure
INSERT_QUEUE Built-In Procedure
A.10.16 INTEGER Data Type
A.10.17 INV Built-In Function
INV Built-In Function
A.10.18 IO_MOD_TYPE Built-In Procedure
IO_MOD_TYPE Built-In Procedure
A.10.19 IO_STATUS Built-In Function
A.11 - J - KAREL LANGUAGE DESCRIPTION
A.11.1 J_IN_RANGE Built-In Function
A.11.2 JOINTPOS Data Type
A.11.3 JOINT2POS Built-In Function
A.12 - K - KAREL LANGUAGE DESCRIPTION
A.12.1 KCL Built-In Procedure
KCL Built-In Procedure
A.12.2 KCL_NO_WAIT Built-In Procedure
KCL_NO_WAIT Built-In Procedure
A.12.3 KCL_STATUS Built-In Procedure
A.13 - L - KAREL LANGUAGE DESCRIPTION
A.13.1 LN Built-In Function
LN Built-In Function
A.13.2 LOAD Built-In Procedure
A.13.3 LOAD_STATUS Built-In Procedure
A.13.4 LOCK_GROUP Built-In Procedure
LOCK_GROUP Built-In Procedure
A.13.5 %LOCKGROUP Translator Directive
A.14 - M - KAREL LANGUAGE DESCRIPTION
A.14.1 MIRROR Built-In Function
MIRROR Built-In Function
A.14.2 MODIFY_QUEUE Built-In Procedure
MODIFY_QUEUE Built-In Procedure
A.14.3 MOTION_CTL Built-In Function
A.14.4 MOUNT_DEV Built-In Procedure
A.14.5 MOVE_FILE Built-In Procedure
MOVE_FILE Built-In Procedure
A.14.6 MSG_CONNECT Built-In Procedure
MSG_CONNECT Built-In Procedure
A.14.7 MSG_DISCO Built-In Procedure
A.14.8 MSG_PING
MSG_PING Built-In Procedure
A.15 - N - KAREL LANGUAGE DESCRIPTION
A.15.1 NOABORT Action
NOABORT Action
A.15.2 %NOABORT Translator Directive
A.15.3 %NOBUSYLAMP Translator Directive
A.15.4 NODE_SIZE Built-In Function
NODE_SIZE Built-In Function
A.15.5 %NOLOCKGROUP Translator Directive
A.15.6 NOMESSAGE Action
A.15.7 NOPAUSE Action
NOPAUSE Action
A.15.8 %NOPAUSE Translator Directive
A.15.9 %NOPAUSESHFT Translator Directive
A.16 - O - KAREL LANGUAGE DESCRIPTION
A.16.1 OPEN FILE Statement
A.16.2 OPEN HAND Statement
OPEN HAND Statement
A.16.3 OPEN_TPE Built-In Procedure
A.16.4 ORD Built-In Function
A.16.5 ORIENT Built-In Function
A.17 - P - KAREL LANGUAGE DESCRIPTION
A.17.1 PATH Data Type
PATH Data Type
PATH Data Type
A.17.2 PATH_LEN Built-In Function
A.17.3 PAUSE Action
A.17.4 PAUSE Condition
PAUSE Condition
A.17.5 PAUSE Statement
PAUSE Statement
A.17.6 PAUSE_TASK Built-In Procedure
PAUSE_TASK Built-In Procedure
A.17.7 PEND_SEMA Built-In Procedure
A.17.8 PIPE_CONFIG Built-In Procedure
A.17.9 POP_KEY_RD Built-In Procedure
A.17.10 Port_Id Action
A.17.11 Port_Id Condition
A.17.12 POS Built-In Function
POS Built-In Function
A.17.13 POS2JOINT Built-In Function
A.17.14 POS_REG_TYPE Built-In Procedure
POS_REG_TYPE Built-In Procedure
A.17.15 POSITION Data Type
POSITION Data Type
A.17.16 POST_ERR Built-In Procedure
A.17.17 POST_ERR_L Built-In Procedure
A.17.18 POST_SEMA Built-In Procedure
A.17.19 PRINT_FILE Built-In Procedure
A.17.20 %PRIORITY Translator Directive
%PRIORITY Translator Directive
A.17.21 PROG_BACKUP Built-In Procedure
A.17.22 PROG_CLEAR Built-In Procedure
A.17.23 PROG_RESTORE Built-In Procedure
A.17.24 PROG_LIST Built-In Procedure
A.17.25 PROGRAM Statement
A.17.26 PULSE Action
A.17.27 PULSE Statement
PULSE Statement
A.17.28 PURGE CONDITION Statement
PURGE CONDITION Statement
A.17.29 PURGE_DEV Built-In Procedure
A.17.30 PUSH_KEY_RD Built-In Procedure
A.18 - Q - KAREL LANGUAGE DESCRIPTION
A.18.1 QUEUE_TYPE Data Type
A.19 - R - KAREL LANGUAGE DESCRIPTION
A.19.1 READ Statement
A.19.2 READ_DICT Built-In Procedure
A.19.3 READ_DICT_V Built-In-Procedure
READ_DICT_V Built-In Procedure
A.19.4 READ_KB Built-In Procedure
READ_KB Built-In Procedure
A.19.5 REAL Data Type
A.19.6 Relational Condition
A.19.7 RELAX HAND Statement
RELAX HAND Statement
A.19.8 RELEASE Statement
A.19.9 REMOVE_DICT Built-In Procedure
A.19.10 RENAME_FILE Built-In Procedure
A.19.11 RENAME_VAR Built-In Procedure
A.19.12 RENAME_VARS Built-In Procedure
A.19.13 REPEAT ... UNTIL Statement
A.19.14 RESET Built-In Procedure
A.19.15 RESUME Action
A.19.16 RESUME Statement
RESUME Statement
A.19.17 RETURN Statement
A.19.18 ROUND Built-In Function
A.19.19 ROUTINE Statement
A.19.20 RUN_TASK Built-In Procedure
A.20 - S - KAREL LANGUAGE DESCRIPTION
A.20.1 SAVE Built-In Procedure
A.20.2 SAVE_DRAM Built-In Procedure
A.20.3 SELECT ... ENDSELECT Statement
A.20.4 SELECT_TPE Built-In Procedure
A.20.5 SEMA_COUNT Built-In Function
A.20.6 SEMAPHORE Condition
A.20.7 SEND_DATAPC Built-In Procedure
SEND_DATAPC Built-In Procedure
A.20.8 SEND_EVENTPC Built-In Procedure
SEND_EVENTPC Built-In Procedure
A.20.9 SET_ATTR_PRG Built-In Procedure
A.20.10 SET_CURSOR Built-In Procedure
A.20.11 SET_EPOS_REG Built-In Procedure
SET_EPOS_REG Built-In Procedure
A.20.12 SET_EPOS_TPE Built-In Procedure
A.20.13 SET_FILE_ATR Built-In Procedure
A.20.14 SET_FILE_POS Built-In Procedure
SET_FILE_POS Built-In Procedure
A.20.15 SET_INT_REG Built-In Procedure
A.20.16 SET_JPOS_REG Built-In Procedure
A.20.17 SET_JPOS_TPE Built-In Procedure
A.20.18 SET_LANG Built-In Procedure
A.20.19 SET_PERCH Built-In Procedure
SET_PERCH Built-In Procedure
A.20.20 SET_PORT_ASG Built-In Procedure
A.20.21 SET_PORT_ATR Built-In Function
A.20.22 SET_PORT_CMT Built-In Procedure
A.20.23 SET_PORT_MOD Built-In Procedure
A.20.24 SET_PORT_SIM Built-In Procedure
A.20.25 SET_PORT_VAL Built-In Procedure
SET_PORT_VAL Built-In Procedure
A.20.26 SET_POS_REG Built-In Procedure
A.20.27 SET_POS_TPE Built-In Procedure
A.20.28 SET_PREG_CMT Built-In-Procedure
A.20.29 SET_REAL_REG Built-In Procedure
A.20.30 SET_REG_CMT Built-In-Procedure
A.20.31 SET_SREG_CMT Built-in Procedure
A.20.32 SET_STR_REG Built-in Procedure
A.20.33 SET_TIME Built-In Procedure
SET_TIME Built-In Procedure
A.20.34 SET_TPE_CMT Built-In Procedure
A.20.35 SET_TRNS_TPE Built-In Procedure
A.20.36 SET_TSK_ATTR Built-In Procedure
A.20.37 SET_TSK_NAME Built-In Procedure
A.20.38 SET_VAR Built-In Procedure
Accessing $TP_DEFPROG on MHROB03
GET_VAR SET_VAR Example
Using GET_VAR and SET_VAR To Set Register Values
A.20.39 %SHADOWVARS Translator Directive
A.20.40 SHORT Data Type
A.20.41 SIGNAL EVENT Action
A.20.42 SIGNAL EVENT Statement
A.20.43 SIGNAL SEMAPHORE Action
A.20.44 SIN Built-In Function
A.20.45 SQRT Built-In Function
SQRT Built-In Function
A.20.46 %STACKSIZE Translator Directive
A.20.47 STD_PTH_NODE Data Type
A.20.48 STOP Action
A.20.49 STOP Statement
STOP Statement
A.20.50 STRING Data Type
A.20.51 STR_LEN Built-In Function
A.20.52 STRUCTURE Data Type
A.20.53 SUB_STR Built-In Function
A.21 - T - KAREL LANGUAGE DESCRIPTION
A.21.1 TAN Built-In Function
TAN Built-In Function
A.21.2 %TIMESLICE Translator Directive
A.21.3 %TPMOTION Translator Directive
A.21.4 TRANSLATE Built-In Procedure
TRANSLATE Built-In Procedure
A.21.5 TRUNC Built-In Function
TRUNC Built-In Function
A.22 - U - KAREL LANGUAGE DESCRIPTION
A.22.1 UNHOLD Action
UNHOLD Action
A.22.2 UNHOLD Statement
UNHOLD Statement
A.22.3 UNINIT Built-In Function
A.22.4 %UNINITVARS Translator Directive
A.22.5 UNLOCK_GROUP Built-In Procedure
UNLOCK_GROUP Built-In Procedure
A.22.6 UNPAUSE Action
A.22.7 UNPOS Built-In Procedure
UNPOS Built-In Procedure
A.22.8 USING ... ENDUSING Statement
A.23 - V - KAREL LANGUAGE DESCRIPTION
A.23.1 V_CAM_CALIB i RVision Built-In Procedure
A.23.2 V_GET_OFFSET i RVision Built-In Procedure
A.23.3 V_GET_PASSFL i RVision Built-In Procedure
A.23.4 V_GET_QUEUE i RVision Built-in Procedure
A.23.5 V_INIT_QUEUE i RVision Built-in Procedure
A.23.6 V_RALC_QUEUE i RVision Built-in Procedure
A.23.7 V_RUN_FIND i RVision Built-In Procedure
A.23.8 V_SET_REF i RVision Built-In Procedure
A.23.9 V_START_VTRK i RVision Built-in Procedure
A.23.10 V_STOP_VTRK i RVision Built-in Procedure
A.23.11 VAR_INFO Built-In Procedure
VAR_INFO Built-In Procedure
A.23.12 VAR_LIST Built-In Procedure
A.23.13 VECTOR Data Type
VECTOR Data Type
VECTOR Data Type
A.23.14 VOL_SPACE Built-In Procedure
VOL_SPACE Built-In Procedure
A.23.15 VREG_FND_POS i RVision Built-in Procedure
A.23.16 VREG_OFFSET i RVision Built-in Procedure
A.24 - W - KAREL LANGUAGE DESCRIPTION
A.24.1 WAIT FOR Statement
A.24.2 WHEN Clause
A.24.3 WHILE...ENDWHILE Statement
A.24.4 WITH Clause
A.24.5 WRITE Statement
A.24.6 WRITE_DICT Built-In Procedure
A.24.7 WRITE_DICT_V Built-In Procedure
WRITE_DICT_V Built-In Procedure
A.25 - X - KAREL LANGUAGE DESCRIPTION
A.25.1 XML_ADDTAG Built-In Procedure
A.25.2 XML_GETDATA Built-In Procedure
A.25.3 XML_REMTAG Built-In Procedure
A.25.4 XML_SCAN Built-In Procedure
A.25.5 XML_SETVAR Built-In Procedure
A.25.6 XYZWPR Data Type
XYZWPR Data Type
A.25.7 XYZWPREXT Data Type
XYZWPREXT Data Type
A.26 - Y - KAREL LANGUAGE DESCRIPTION
A.27 - Z - KAREL LANGUAGE DESCRIPTION
B KAREL EXAMPLE PROGRAMS
B.1 SETTING UP DIGITAL OUTPUT PORTS FOR PROCESS MONITORING
Setting Up Digital Output Ports for Process Monitoring - Overvie
Setting Up Digital Output Ports for Monitoring Teach Pendant Pro
Setting Up Digital Output Ports for Process Monitoring - Declara
Setting Up Digital Output Ports for Process Monitoring - Declare
Setting Up Digital Output Ports for Process Monitoring - Declare
Setting Up Digital Output Ports for Process Monitoring - Declare
Setting Up Digital Output Ports for Process Monitoring - Declare
Setting Up Digital Output Ports for Process Monitoring - Declare
Setting Up Digital Output Ports for Process Monitoring - Declare
Setting Up Digital Output Ports for Process Monitoring - Main
Setting Up Digital Output Ports for Process Monitoring - Main
Setting Up Digital Output Ports for Process Monitoring - Main
Setting Up Digital Output Ports for Process Monitoring - Main
Setting Up Digital Output Ports for Process Monitoring - Main
B.2 COPYING PATH VARIABLES
Copy Path Variables Program - Overview
Copy Path Variables Program - Overview and Declaration Section
Copy Path Variables Program - Declaration Section
Copy Path Variables Program - Storing Variables in Memory
Copy Path Variables Program - Monitor User Response
Copy Path Variables Program - Copying Path Variables
Copy Path Variables Program - Opens CRT/KB & Sends Data to Defau
Copy Path Variables Program - Checks Path Initialization
Copy Path Variables Program - Path Initialization
Copy Path Variables Program - Copy User Defined Paths
Copy Path Variables Program - Copy User Defined Paths Continued
B.3 SAVING DATA TO THE DEFAULT DEVICE
Saving Data Program - Overview
Saving Data Program - Declarations Section
Saving Data Program - Create File Spec
Saving Data Program - Delete/Overwrite
B.4 STANDARD ROUTINES
Standard Routines - Overview
Standard Routines - Declaration Section
Standard Routines - Clears Screen and Displays Menu
B.5 USING REGISTER BUILT-INS
Using Register Built-ins Program - Overview
Using Register Built-ins Program - Declaration Section
Using Register Built-ins - Storing and Manipulating Positions
Using Register Built-ins - Executing Program and Checking Regist
B.6 PATH VARIABLES AND CONDITION HANDLERS PROGRAM
Path Variables and Condition Handlers Program - Overview
Path Variables and Condition Handlers Program - Overview Continu
Path Variables and Condition Handlers Program - Declaration Sect
Path Variables and Condition Handlers Program - Declare Routines
Path Variables and Condition Handlers Program - Declare Conditio
Path Variables and Condition Handlers Program - Teach and Move A
Path Variables and Condition Handlers Program - Move Along Path
B.7 LISTING FILES AND PROGRAMS AND MANIPULATING STRINGS
Listing Files and Programs and Manipulating Strings - Overview
Listing Files and Programs and Manipulating Strings - Overview C
Listing Files and Programs and Manipulating Strings - Declaratio
Listing Files and Programs and Manipulating Strings - Declare Ro
Listing Files and Programs and Manipulating Strings - Main Progr
Listing Files and Programs and Manipulating Strings - Create and
Listing Files and Programs and Manipulating Strings - List Progr
B.8 GENERATING AND MOVING ALONG A HEXAGON PATH
Generate and Move Along Hexagon Path - Overview
Generate and Move Along Hexagon Path - Declaration Section
Generate and Move Along Hexagon Path - Declare Routines
Generate and Move Along Hexagon Path - Declare Routines
Generate and Move Along Hexagon Path - Main Program
B.9 USING THE FILE AND DEVICE BUILT-INS
File and Device Built-ins Program - Overview
File and Device Built-ins Program - Overview Continued
File and Device Built-ins Program - Declaration Section, Declare
File and Device Built-ins Program - Mount and Copy to RAM Disk
File and Device Built-ins Program - Mount and Copy to RAM Disk C
B.10 USING DYNAMIC DISPLAY BUILT-INS
Using Dynamic Display Built-ins - Overview
Using Dynamic Display Built-ins - Overview Continued
Using Dynamic Display Built-ins - Declaration Section
Using Dynamic Display Built-ins - Declare Routines
Using Dynamic Display Built-ins - Declare Routines Continued
Using Dynamic Display Built-ins - Declare Routines Continued
Using Dynamic Display Built-ins - Declare Routines Continued
Using Dynamic Display Built-ins - Declare Routines Continued
Using Dynamic Display Built-ins - Declare Routines Continued
Using Dynamic Display Built-ins - Initiate Dynamic Displays
Using Dynamic Display Built-ins - Initiate Dynamic Displays
Using Dynamic Display Built-ins - Execute Subordinate Task
Using Dynamic Display Built-ins - User Response Cancels Dynamic
B.11 MANIPULATING VALUES OF DYNAMICALLY DISPLAYED VARIABLES
Manipulate Dynamically Displayed Variables - Overview
Manipulate Dynamically Displayed Variables - Declaration Section
Manipulate Dynamically Displayed Variables - Main Program
B.12 DISPLAYING A LIST FROM A DICTIONARY FILE
Display List from Dictionary File - Overview
Display List from Dictionary File - Overview Continued
Display List from Dictionary File - Declaration Section
Display List from Dictionary File - Declare Routines
Display List from Dictionary File - Declare Error Routines
Display List from Dictionary File - Setup and Define Screen
Display List from Dictionary File - Write Elements to the Screen
Display List from Dictionary File - Initialize Display Data
Display List from Dictionary File - Control Cursor Movement
Display List from Dictionary File - Control Cursor Movement Cont
Display List from Dictionary File - Cleanup and Exit Program
B.12.1 Dictionary Files
Dictionary File
B.13 USING THE DISCTRL_ALPHA BUILT-IN
Using the DISCTRL_ALPHA Built-in - Overview
Using the DISCTRL_ALPHA Built-in - Declaration Section
Using the DISCTRL_ALPHA Built-in - Enter Data from Teach Pendant
Using the DISCTRL_ALPHA Built-in - Enter Data from CRT/KB
B.13.1 Dictionary Files
DCALPHEG.UTX Dictionary File
B.14 APPLYING OFFSETS TO A COPIED TEACH PENDANT PROGRAM
Applying Offsets to Copied Teach Pendant Program - Overview
Applying Offsets to Copied Teach Pendant Program - Overview Cont
Applying Offsets to Copied Teach Pendant Program - Declaration S
Applying Offsets to Copied Teach Pendant Program - Declare Routi
Applying Offsets to Copied Teach Pendant Program - Generate Prog
Applying Offsets to Copied Teach Pendant Program - Overwrite or
Applying Offsets to Copied Teach Pendant Program - Input Offset
Applying Offsets to Copied Teach Pendant Program - Apply Offsets
Applying Offsets to Copied Teach Pendant Program - Apply Offsets
Applying Offsets to Copied Teach Pendant Program - Clears TP Use
C KCL COMMAND ALPHABETICAL DESCRIPTION
C.1 ABORT command
C.2 APPEND FILE command
C.3 APPEND NODE command
C.4 CHDIR command
C.5 CLEAR ALL command
C.6 CLEAR BREAK CONDITION command
C.7 CLEAR BREAK PROGRAM command
C.8 CLEAR DICT command
C.9 CLEAR PROGRAM command
C.10 CLEAR VARS command
C.11 COMPRESS DICT command
C.12 COMPRESS FORM command
C.13 CONTINUE command
C.14 COPY FILE command
C.15 CREATE VARIABLE command
C.16 DELETE FILE command
C.17 DELETE NODE command
C.18 DELETE VARIABLE command
C.19 DIRECTORY command
C.20 DISABLE BREAK PROGRAM command
C.21 DISABLE CONDITION command
C.22 DISMOUNT command
C.23 EDIT command
C.24 ENABLE BREAK PROGRAM
C.25 ENABLE CONDITION command
C.26 FORMAT command
C.27 HELP command
C.28 HOLD command
C.29 INSERT NODE command
C.30 LOAD ALL command
C.31 LOAD DICT command
C.32 LOAD FORM command
C.33 LOAD MASTER command
C.34 LOAD PROGRAM command
C.35 LOAD SERVO command
C.36 LOAD SYSTEM command
C.37 LOAD TP command
C.38 LOAD VARS command
C.39 LOGOUT command
C.40 MKDIR command
C.41 MOUNT command
C.42 MOVE FILE command
C.43 PAUSE command
C.44 PURGE command
C.45 PRINT command
C.46 RECORD command
C.47 RENAME FILE command
C.48 RENAME VARIABLE command
C.49 RENAME VARS command
C.50 RESET command
C.51 RMDIR command
C.52 RUN command
C.53 RUNCF command
C.54 SAVE MASTER command
C.55 SAVE SERVO command
C.56 SAVE SYSTEM command
C.57 SAVE TP command
C.58 SAVE VARS command
C.59 SET BREAK CONDITION command
C.60 SET BREAK PROGRAM command
C.61 SET CLOCK command
C.62 SET DEFAULT command
C.63 SET GROUP command
C.64 SET LANGUAGE command
C.65 SET LOCAL VARIABLE command
C.66 SET PORT command
C.67 SET TASK command
C.68 SET TRACE command
C.69 SET VARIABLE command
C.70 SET VERIFY command
C.71 SHOW BREAK command
C.72 SHOW BUILTINS command
C.73 SHOW CONDITION command
C.74 SHOW CLOCK command
C.75 SHOW CURPOS command
C.76 SHOW DEFAULT command
C.77 SHOW DEVICE command
C.78 SHOW DICTS command
C.79 SHOW GROUP command
C.80 SHOW HISTORY command
C.81 SHOW LANG command
C.82 SHOW LANGS command
C.83 SHOW LOCAL VARIABLE command
C.84 SHOW LOCAL VARS command
C.85 SHOW MEMORY command
C.86 SHOW PROGRAM command
C.87 SHOW PROGRAMS command
C.88 SHOW SYSTEM command
C.89 SHOW TASK command
C.90 SHOW TASKS command
C.91 SHOW TRACE command
C.92 SHOW TYPES command
C.93 SHOW VARIABLE command
C.94 SHOW VARS command
C.95 SHOW data_type command
C.96 SIMULATE command
C.97 SKIP command
C.98 STEP OFF command
C.99 STEP ON command
C.100 TRANSLATE command
C.101 TYPE command
C.102 UNSIMULATE command
C.103 WAIT command
D CHARACTER CODES
D.1 CHARACTER CODES
E SYNTAX DIAGRAMS
Figure E 1.
Figure E 2.
Figure E 3.
Figure E 4.
Figure E 5.
Figure E 6.
Figure E 7.
Figure E 8.
Figure E 9.
Figure E 10.
Figure E 11.
Figure E 12.
Figure E 13.
Figure E 14.
Figure E 15.
Figure E 16.
Figure E 17.
Figure E 18.
Figure E 19.
Figure E 20.
Figure E 21.
Figure E 22.
Figure E 23.
Figure E 24.
Figure E 25.
Glossary
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
FANUC Robotics SYSTEM R-30iA and R-30iB Controller KAREL Reference Manual MARRC75KR07091E Rev D Applies to Version 7.50 and higher © 2012 FANUC Robotics America Corporation
About This Manual This manual can be used with controllers labeled R-30iA or R-J3iC. If you have a controller labeled R-J3iC, you should read R-30iA as R-J3iC throughout this manual. Copyrights and Trademarks This new publication contains proprietary information of FANUC Robotics America Corporation, furnished for customer use only. No other uses are authorized without the express written permission of FANUC Robotics America Corporation. FANUC Robotics America Corporation 3900 W. Hamlin Road Rochester Hills, MI 48309-3253 The descriptions and specifications contained in this manual were in effect at the time this manual was approved. FANUC Robotics America Corporation, hereinafter referred to as FANUC Robotics, reserves the right to discontinue models at any time or to change specifications or design without notice and without incurring obligations. FANUC Robotics manuals present descriptions, specifications, drawings, schematics, bills of material, parts, connections and/or procedures for installing, disassembling, connecting, operating and programming FANUC Robotics’ products and/or systems. Such systems consist of robots, extended axes, robot controllers, application software, the KAREL® programming language, INSIGHT® vision equipment, and special tools. FANUC Robotics recommends that only persons who have been trained in one or more approved FANUC Robotics Training Course(s) be permitted to install, operate, use, perform procedures on, repair, and/or maintain FANUC Robotics’ products and/or systems and their respective components. Approved training necessitates that the courses selected be relevant to the type of system installed and application performed at the customer site. Warning This equipment generates, uses, and can radiate radio frequency energy and if not installed and used in accordance with the instruction manual, may cause interference to radio communications. As temporarily permitted by regulation, it has not been tested for compliance with the limits for Class A computing devices pursuant to subpart J of Part 15 of FCC Rules, which are designed to provide reasonable protection against such interference. Operation of the equipment in a residential area is likely to cause interference, in which case the user, at his own expense, will be required to take whatever measure may be required to correct the interference. i
About This Manual MARRC75KR07091E Rev D FANUC Robotics conducts courses on its systems and products on a regularly scheduled basis at its headquarters in Rochester Hills, Michigan. For additional information contact FANUC Robotics America Corporation 3900 W. Hamlin Road Rochester Hills, MI 48309-3253 www.fanucrobotics.com For customer assistance, including Technical Support, Service, Parts & Part Repair, and Marketing Requests, contact the Customer Resource Center, 24 hours a day, at 1-800-47-ROBOT (1-800-477-6268). International customers should call 011-1-248-377-7159. Send your comments and suggestions about this manual to: product.documentation@fanucrobotics.com The information illustrated or contained herein is not to be reproduced, copied, downloaded, translated into another language, distributed, or published in any physical or electronic format, including Internet, or transmitted in whole or in part in any way without the prior written consent of FANUC Robotics America, Inc. AccuStat®, ArcTool®, iRVision®, KAREL®, PaintTool®,PalletTool®, SOCKETS®, SpotTool®, SpotWorks®, and TorchMate®are Registered Trademarks of FANUC Robotics. FANUC Robotics reserves all proprietary rights, including but not limited to trademark and trade name rights, in the following names: AccuAir™, AccuCal™, AccuChop™, AccuFlow™, AccuPath™, AccuSeal™, ARC Mate™, ARC Mate Sr.™, ARC Mate System 1™, ARC Mate System 2™, ARC Mate System 3™, ARC Mate System 4™, ARC Mate System 5™, ARCWorks Pro™, AssistTool™, AutoNormal™, AutoTCP™, BellTool™, BODYWorks™, Cal Mate™, Cell Finder™, Center Finder™, Clean Wall™, DualARM™, LR Tool™, MIG Eye™, MotionParts™, MultiARM™, NoBots™, Paint Stick™, PaintPro™, PaintTool 100™, PAINTWorks™, PAINTWorks II™, PAINTWorks III™, PalletMate™, PalletMate PC™, PalletTool PC™, PayloadID™, RecipTool™, RemovalTool™, Robo Chop™, Robo Spray™, S-420i™, S-430i™, ShapeGen™, SoftFloat™, SOFT PARTS™, SpotTool+™, SR Mate™, SR ShotTool™, SureWeld™, SYSTEM R-J2 Controller™, SYSTEM R-J3 Controller™, SYSTEM R-J3iB Controller™, SYSTEM R-J3iC Controller™, SYSTEM R-30iA Controller™, SYSTEM R-30iB Controller™, TCP Mate™, TorchMate™, TripleARM™, TurboMove™, visLOC™, visPRO-3D™, visTRAC™, WebServer™, WebTP™, and YagTool™. Patents One or more of the following U.S. patents might be related to the FANUC Robotics products described in this manual. ii
MARRC75KR07091E Rev D About This Manual FRA Patent List 4,630,567 4,639,878 4,707,647 4,708,175 4,708,580 4,942,539 4,984,745 5,238,029 5,239,739 5,272,805 5,293,107 5,293,911 5,331,264 5,367,944 5,373,221 5,421,218 5,434,489 5,644,898 5,670,202 5,696,687 5,737,218 5,823,389 5,853,027 5,887,800 5,941,679 5,959,425 5,987,726 6,059,092 6,064,168 6,070,109 6,086,294 6,122,062 6,147,323 6,204,620 6,243,621 6,253,799 6,285,920 6,313,595 6,325,302 6,345,818 6,356,807 6,360,143 6,378,190 6,385,508 6,425,177 6,477,913 6,490,369 6,518,980 6,540,104 6,541,757 6,560,513 6,569,258 6,612,449 6,703,079 6,705,361 6,726,773 6,768,078 6,845,295 6,945,483 7,149,606 7,149,606 7,211,978 7,266,422 7,399,363 FANUC LTD Patent List 4,571,694 4,626,756 4,700,118 4,706,001 4,728,872 4,732,526 4,742,207 4,835,362 4,894,596 4,899,095 4,920,248 4,931,617 4,934,504 4,956,594 4,967,125 4,969,109 4,970,370 4,970,448 4,979,127 5,004,968 5,006,035 5,008,834 5,063,281 5,066,847 5,066,902 5,093,552 5,107,716 5,111,019 5,130,515 5,136,223 5,151,608 5,170,109 5,189,351 5,267,483 5,274,360 5,292,066 5,300,868 5,304,906 5,313,563 5,319,443 5,325,467 5,327,057 5,329,469 5,333,242 5,337,148 5,371,452 5,375,480 5,418,441 5,432,316 5,440,213 5,442,155 5,444,612 5,449,875 5,451,850 5,461,478 5,463,297 5,467,003 5,471,312 5,479,078 5,485,389 5,485,552 5,486,679 5,489,758 5,493,192 5,504,766 5,511,007 5,520,062 5,528,013 5,532,924 5,548,194 5,552,687 5,558,196 5,561,742 5,570,187 5,570,190 5,572,103 5,581,167 5,582,750 5,587,635 5,600,759 5,608,299 5,608,618 5,624,588 5,630,955 5,637,969 5,639,204 5,641,415 5,650,078 5,658,121 5,668,628 5,687,295 5,691,615 5,698,121 5,708,342 5,715,375 5,719,479 5,727,132 5,742,138 5,742,144 5,748,854 5,749,058 5,760,560 5,773,950 5,783,922 5,799,135 5,812,408 5,841,257 5,845,053 5,872,894 5,887,122 5,911,892 5,912,540 5,920,678 5,937,143 5,980,082 5,983,744 5,987,591 5,988,850 6,023,044 6,032,086 6,040,554 6,059,169 6,088,628 6,097,169 6,114,824 6,124,693 6,140,788 6,141,863 6,157,155 6,160,324 6,163,124 6,177,650 6,180,898 6,181,096 6,188,194 6,208,105 6,212,444 6,219,583 6,226,181 6,236,011 6,236,896 6,250,174 6,278,902 6,279,413 6,285,921 6,298,283 6,321,139 6,324,443 6,328,523 6,330,493 6,340,875 6,356,671 6,377,869 6,382,012 6,384,371 6,396,030 6,414,711 6,424,883 6,431,018 6,434,448 6,445,979 6,459,958 6,463,358 6,484,067 6,486,629 6,507,165 6,654,666 6,665,588 6,680,461 6,696,810 6,728,417 6,763,284 6,772,493 6,845,296 6,853,881 6,888,089 6,898,486 6,917,837 6,928,337 6,965,091 6,970,802 7,038,165 7,069,808 7,084,900 7,092,791 7,133,747 7,143,100 7,149,602 7,131,848 7,161,321 7,171,041 7,174,234 7,173,213 7,177,722 7,177,439 7,181,294 7,181,313 7,280,687 7,283,661 7,291,806 7,299,713 7,315,650 7,324,873 7,328,083 7,330,777 7,333,879 7,355,725 7,359,817 7,373,220 7,376,488 7,386,367 7,464,623 7,447,615 7,445,260 7,474,939 7,486,816 7,495,192 7,501,778 7,502,504 7,508,155 7,512,459 7,525,273 7,526,121 VersaBell, ServoBell and SpeedDock Patents Pending. Conventions This manual includes information essential to the safety of personnel, equipment, software, and data. This information is indicated by headings and boxes in the text. iii
About This Manual MARRC75KR07091E Rev D Warning Information appearing under WARNING concerns the protection of personnel. It is boxed and in bold type to set it apart from other text. Caution Information appearing under CAUTION concerns the protection of equipment, software, and data. It is boxed to set it apart from other text. Note Information appearing next to NOTE concerns related information or useful hints. iv
Contents About This Manual ................................................................................................................................. i Safety .............................................................................................................................................. xxvii Chapter 1 KAREL LANGUAGE OVERVIEW ................................................................................ 1.1 OVERVIEW .................................................................................................................... 1.2 KAREL PROGRAMMING LANGUAGE ............................................................................. 1.2.1 Overview ......................................................................................................................... 1.2.2 Creating a Program ............................................................................................................ Translating a Program ........................................................................................................ 1.2.3 Loading Program Logic and Data ......................................................................................... 1.2.4 Executing a Program .......................................................................................................... 1.2.5 Execution History ............................................................................................................. 1.2.6 Program Structure ............................................................................................................. 1.2.7 SYSTEM SOFTWARE ...................................................................................................... 1.3 Software Components ........................................................................................................ 1.3.1 Supported Robots .............................................................................................................. 1.3.2 1.4 CONTROLLER ................................................................................................................ 1.4.1 Memory .......................................................................................................................... Input/Output System ........................................................................................................ 1.4.2 1.4.3 User Interface Devices ..................................................................................................... ............................................................................................ LANGUAGE ELEMENTS Chapter 2 LANGUAGE COMPONENTS ............................................................................................ 2.1 2.1.1 Character Set .................................................................................................................... 2.1.2 Operators ......................................................................................................................... 2.1.3 Reserved Words ................................................................................................................ 2.1.4 User-Defined Identifiers ..................................................................................................... Labels ............................................................................................................................. 2.1.5 Predefined Identifiers ......................................................................................................... 2.1.6 System Variables ............................................................................................................. 2.1.7 2.1.8 Comments ..................................................................................................................... 2.2 TRANSLATOR DIRECTIVES ....................................................................................... 2.3 DATA TYPES ................................................................................................................ 2.4 USER-DEFINED DATA TYPES AND STRUCTURES ......................................................... 2.4.1 User-Defined Data Types .................................................................................................. 2.4.2 User-Defined Data Structures ............................................................................................ 2.5 ARRAYS ....................................................................................................................... 2.5.1 Multi-Dimensional Arrays ................................................................................................ 2.5.2 Variable-Sized Arrays ...................................................................................................... ................................................................................................ Chapter 3 USE OF OPERATORS 1–1 1–2 1–2 1–2 1–4 1–4 1–4 1–5 1–5 1–5 1–7 1–7 1–7 1–8 1–8 1–10 1–10 2–1 2–2 2–2 2–5 2–6 2–7 2–8 2–8 2–10 2–10 2–11 2–13 2–14 2–14 2–16 2–18 2–19 2–20 3–1 v
Contents MARRC75KR07091E Rev D EXPRESSIONS AND ASSIGNMENTS ................................................................................ 3.1 3.1.1 Rule for Expressions and Assignments .................................................................................. Evaluation of Expressions and Assignments ........................................................................... 3.1.2 3.1.3 Variables and Expressions ................................................................................................... 3.2 OPERATIONS ................................................................................................................. 3.2.1 Arithmetic Operations ........................................................................................................ 3.2.2 Relational Operations ......................................................................................................... 3.2.3 Boolean Operations ........................................................................................................... Special Operations ............................................................................................................. 3.2.4 ............................................................................................... 4.1 OVERVIEW ..................................................................................................................... PROGRAM CONTROL STRUCTURES ............................................................................... 4.2 4.2.1 Alternation Control Structures ............................................................................................. Looping Control Statements ................................................................................................ 4.2.2 4.2.3 Unconditional Branch Statement .......................................................................................... Execution Control Statements .............................................................................................. 4.2.4 4.2.5 Condition Handlers ............................................................................................................ ................................................................................................................. 5.1 ROUTINE EXECUTION ................................................................................................... 5.1.1 Declaring Routines ............................................................................................................ Invoking Routines ............................................................................................................. 5.1.2 5.1.3 Returning from Routines .................................................................................................... Scope of Variables ............................................................................................................. 5.1.4 Parameters and Arguments .................................................................................................. 5.1.5 Stack Usage ................................................................................................................... 5.1.6 5.2 BUILT- IN ROUTINES .................................................................................................... ............................................................................................ 6.1 CONDITION HANDLER OPERATIONS ............................................................................. 6.1.1 Global Condition Handlers .................................................................................................. 6.2 CONDITIONS ................................................................................................................. Port_Id Conditions ............................................................................................................ 6.2.1 6.2.2 Relational Conditions ......................................................................................................... System and Program Event Conditions .................................................................................. 6.2.3 6.3 ACTIONS ..................................................................................................................... 6.3.1 Assignment Actions ......................................................................................................... 6.3.2 Motion Related Actions .................................................................................................... 6.3.3 Routine Call Actions ........................................................................................................ 6.3.4 Miscellaneous Actions ..................................................................................................... ........................................................................... 7.1 OVERVIEW .................................................................................................................... FILE VARIABLES ............................................................................................................ 7.2 7.3 OPEN FILE STATEMENT ................................................................................................. Setting File and Port Attributes ............................................................................................ 7.3.1 File String ...................................................................................................................... 7.3.2 7.3.3 Usage String ................................................................................................................... 7.4 CLOSE FILE STATEMENT ............................................................................................. FILE INPUT/OUTPUT OPERATIONS 3–2 3–2 3–2 3–4 3–4 3–5 3–6 3–7 3–8 4–1 4–2 4–2 4–2 4–3 4–3 4–3 4–4 5–1 5–2 5–2 5–5 5–7 5–8 5–9 5–13 5–15 6–1 6–3 6–3 6–6 6–7 6–7 6–8 6–11 6–11 6–13 6–13 6–14 7–1 7–3 7–3 7–4 7–5 7–10 7–11 7–14 Chapter 6 CONDITION HANDLERS Chapter 4 PROGRAM CONTROL Chapter 5 ROUTINES Chapter 7 vi
分享到:
收藏