90768338 r 30ia karel reference manual ver 7 30 marrcrlrf04071e rev b

947
FANUC Robotics SYSTEM R-30i  A Cont r o ller K A REL Reference Manual MARRCRLRF04071E REV B  Applies to Version 7.30 © 2007 FANUC Robotics Ame rica, Inc.

Upload: eteichmann

Post on 12-Apr-2018

286 views

Category:

Documents


2 download

TRANSCRIPT

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    1/945

    FANUC Robotics SYSTEMR-30iA Controller KARELReference Manual

    MARRCRLRF04071E REV BApplies to Version 7.30

    2007 FANUC Robotics America, Inc.

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    2/945

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    3/945

    About This ManualThis manual can be used with controllers labeled R-30iA or R-J3iC. If you have a controller labeledR-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, Inc. furnished

    for customer use only. No other uses are authorized without the express written permission of

    FANUC Robotics America, Inc.

    FANUC Robotics America, Inc

    3900 W. Hamlin Road

    Rochester Hills, Michigan 48309-3253

    FANUC Robotics America, Inc. The descriptions and specifications contained in this manual were in

    effect at the time this manual was approved. FANUC Robotics America, Inc, 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.

    i

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    4/945

    Ab ou t Thi s Manu al MARRCRLRF04071E REV B

    Warning

    This equipment generates, uses, and can radiate radio frequency energyand if not installed and used in accordance with the instruction manual,may cause interference to radio communications. As temporarilypermitted by regulation, it has not been tested for compliance with the

    limits for Class A computing devices pursuant to subpart J of Part 15 ofFCC Rules, which are designed to provide reasonable protection againstsuch interference. Operation of the equipment in a residential area islikely to cause interference, in which case the user, at his own expense,will be required to take whatever measure may be r equired to correctthe interference.

    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, IncTraining Department

    3900 W. Hamlin Road

    Rochester Hills, Michigan48309-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:[email protected]

    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, KAREL, PaintTool,PalletTool, SOCKETS, SpotTool,SpotWorks, and TorchMateare 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,

    ii

    http://www.fanucrobotics.com/mailto:[email protected]:[email protected]://www.fanucrobotics.com/
  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    5/945

    MARRCRLRF04071E REV B About This Manual

    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, 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.

    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

    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,1946,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,928,337 6,917,837 6,965,091

    ii i

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    6/945

    Ab ou t Thi s Manu al MARRCRLRF04071E REV B

    6,970,802 7,038,165 7,069,808 7,08,4900 7,092,791 7,131,848 7,133,747 7,143,100 7,149,602

    7,161,321 7,171,041 7,174,234 7,173,213 7,177,722 7,177,439 7,181,294 7,181,313

    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.

    Warning

    Information appearing u nder WARNING concerns the protection ofpersonnel. It is boxed and in bold type to set it apart from other text.

    Caution

    Information appearing underCAUTION 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

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    7/945

    Contents

    Ab out Thi s Manual ................................................................................................................................ i

    Safety .............................................................................................................................................. xxvii

    Chapter 1 KAREL LANGUAGE OVERVIEW ................................................................................ 11

    1.1 OVERVIEW .................................................................................................................... 12

    1.2 KAREL PROGRAMMING LANGUAGE ............................................................................. 121.2.1 Overview ......................................................................................................................... 121.2.2 Creating a Program ............................................................................................................ 14

    1.2.3 Translating a Program ........................................................................................................ 141.2.4 Loading Program Logic and Data ......................................................................................... 141.2.5 Executing a Program .......................................................................................................... 151.2.6 Execution History ............................................................................................................. 151.2.7 Program Structure ............................................................................................................. 15

    1.3 SYSTEM SOFTWARE ...................................................................................................... 161.3.1 Software Components ........................................................................................................ 171.3.2 Supported Robots .............................................................................................................. 17

    1.4 CONTROLLER................................................................................................................ 171.4.1 Memory .......................................................................................................................... 181.4.2 Input/Output System ........................................................................................................ 1101.4.3 User Interface Devices ..................................................................................................... 110

    Chapter 2 LANGUAGE ELEMENTS ............................................................................................ 21

    2.1 LANGUAGE COMPONENTS ............................................................................................ 222.1.1 Character Set .................................................................................................................... 222.1.2 Operators ......................................................................................................................... 252.1.3 Reserved Words ................................................................................................................ 252.1.4 User-Defined Identifiers ..................................................................................................... 272.1.5 Labels ............................................................................................................................. 272.1.6 Predefined Identifiers ......................................................................................................... 282.1.7 System Variables ............................................................................................................... 292.1.8 Comments ....................................................................................................................... 29

    2.2 TRANSLATOR DIRECTIVES ....................................................................................... 210

    2.3 DATA TYPES ................................................................................................................ 212

    2.4 USER-DEFINED DATA TYPES AND STRUCTURES ......................................................... 213

    2.4.1 User-Defined Data Types .................................................................................................. 2132.4.2 User-Defined Data Structures ............................................................................................ 215

    2.5 ARRAYS ....................................................................................................................... 2172.5.1 Multi-Dimensional Arrays ................................................................................................ 2182.5.2 Variable-Sized Arrays ...................................................................................................... 220

    Chapter 3 USE OF OPERATORS ................................................................................................ 31

    v

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    8/945

    Contents MARRCRLRF04071E REV B

    3.1 EXPRESSIONS AND ASSIGNMENTS ................................................................................ 323.1.1 Rule for Expressions and Assignments .................................................................................. 323.1.2 Evaluation of Expressions and Assignments ........................................................................... 323.1.3 Variables and Expressions ................................................................................................... 34

    3.2 OPERATIONS ................................................................................................................. 343.2.1 Arithmetic Operations ........................................................................................................ 35

    3.2.2 Relational Operations ......................................................................................................... 363.2.3 Boolean Operations ........................................................................................................... 373.2.4 Special Operations ............................................................................................................. 38

    Chapter 4 MOTION AND PROGRAM CONTROL ......................................................................... 41

    4.1 OVERVIEW .................................................................................................................... 42

    4.2 MOTION CONTROL STATEMENTS .................................................................................. 424.2.1 Extended Axis Motion ....................................................................................................... 444.2.2 Group Motion ................................................................................................................... 44

    4.3 PROGRAM CONTROL STRUCTURES ............................................................................... 454.3.1 Alternation Control Structures ............................................................................................. 454.3.2 Looping Control Statements ................................................................................................ 464.3.3 Unconditional Branch Statement .......................................................................................... 46

    4.3.4 Execution Control Statements .............................................................................................. 464.3.5 Condition Handlers ............................................................................................................ 47

    Chapter 5 ROUTINES ................................................................................................................. 51

    5.1 ROUTINE EXECUTION ................................................................................................... 525.1.1 Declaring Routines ............................................................................................................ 525.1.2 Invoking Routines ............................................................................................................. 555.1.3 Returning from Routines .................................................................................................... 575.1.4 Scope of Variables ............................................................................................................. 585.1.5 Parameters and Arguments .................................................................................................. 595.1.6 Stack Usage ................................................................................................................... 513

    5.2 BUILT- IN ROUTINES .................................................................................................... 515

    Chapter 6 CONDITION HANDLERS ............................................................................................ 616.1 CONDITION HANDLER OPERATIONS ............................................................................. 63

    6.1.1 Global Condition Handlers .................................................................................................. 636.1.2 Local Condition Handlers ................................................................................................... 66

    6.2 CONDITIONS ................................................................................................................. 686.2.1 Port_Id Conditions ............................................................................................................ 696.2.2 Relational Conditions ......................................................................................................... 696.2.3 System and Program Event Conditions ................................................................................ 6106.2.4 Local Conditions ............................................................................................................. 6136.2.5 Synchronization of Local Condition Handlers ....................................................................... 614

    6.3 ACTIONS ..................................................................................................................... 6166.3.1 Assignment Actions ......................................................................................................... 6166.3.2 Motion Related Actions .................................................................................................... 6176.3.3 Routine Call Actions ........................................................................................................ 6186.3.4 Miscellaneous Actions ..................................................................................................... 619

    Chapter 7 FILE INPUT/OUTPUT OPERATIONS ........................................................................... 71

    7.1 OVERVIEW .................................................................................................................... 73

    7.2 FILE VARIABLES ............................................................................................................ 73

    vi

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    9/945

    MARRCRLRF04071E REV B Contents

    7.3 OPEN FILE STATEMENT ................................................................................................. 747.3.1 Setting File and Port Attributes ............................................................................................ 757.3.2 File String ...................................................................................................................... 7107.3.3 Usage String ................................................................................................................... 711

    7.4 CLOSE FILE STATEMENT ............................................................................................. 714

    7.5 READ STATEMENT ....................................................................................................... 714

    7.6 WRITE STATEMENT ..................................................................................................... 716

    7.7 INPUT/OUTPUT BUFFER............................................................................................... 717

    7.8 FORMATTING TEXT (ASCII) INPUT/OUTPUT ................................................................. 7187.8.1 Formatting INTEGER Data Items ....................................................................................... 7197.8.2 Formatting REAL Data Items ............................................................................................ 7227.8.3 Formatting BOOLEAN Data Items ..................................................................................... 7257.8.4 Formatting STRING Data Items ......................................................................................... 7277.8.5 Formatting VECTOR Data Items ........................................................................................ 7317.8.6 Formatting Positional Data Items ....................................................................................... 732

    7.9 FORMATTING BINARY INPUT/OUTPUT ........................................................................ 7347.9.1 Formatting INTEGER Data Items ....................................................................................... 7357.9.2 Formatting REAL Data Items ............................................................................................ 736

    7.9.3 Formatting BOOLEAN Data Items ..................................................................................... 7367.9.4 Formatting STRING Data Items ......................................................................................... 7367.9.5 Formatting VECTOR Data Items ........................................................................................ 7377.9.6 Formatting POSITION Data Items ...................................................................................... 7377.9.7 Formatting XYZWPR Data Items ....................................................................................... 7377.9.8 Formatting XYZWPREXT Data Items ................................................................................ 7387.9.9 Formatting JOINTPOS Data Items ..................................................................................... 738

    7.10 USER INTERFACE TIPS ................................................................................................. 7387.10.1 USER Menu on the Teach Pendant ..................................................................................... 7387.10.2 USER Menu on the CRT/KB ............................................................................................. 740

    Chapter 8 MOTION ..................................................................................................................... 81

    8.1 OVERVIEW .................................................................................................................... 82

    8.2 POSITIONAL DATA ......................................................................................................... 828.3 FRAMES OF REFERENCE ............................................................................................... 83

    8.3.1 World Frame .................................................................................................................... 848.3.2 User Frame (UFRAME) ..................................................................................................... 858.3.3 Tool Definition (UTOOL) ................................................................................................... 858.3.4 Using Frames in the Teach Pendant Editor (TP) ...................................................................... 86

    8.4 JOG COORDINATE SYSTEMS .......................................................................................... 86

    8.5 MOTION CONTROL ........................................................................................................ 878.5.1 Motion Trajectory ............................................................................................................. 898.5.2 Motion Trajectories with Extended Axes .............................................................................. 8178.5.3 Acceleration and Deceleration ........................................................................................... 8188.5.4 Motion Speed ................................................................................................................. 8218.5.5 Motion Termination ......................................................................................................... 8268.5.6 Multiple Segment Motion ................................................................................................. 8298.5.7 Path Motion ................................................................................................................... 8368.5.8 Motion Times ................................................................................................................. 8398.5.9 Correspondence Between Teach Pendant Program Motion and KAREL Program Motion .............. 842

    Chapter 9 FILE SYSTEM ............................................................................................................ 91

    9.1 OVERVIEW .................................................................................................................... 92

    vi i

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    10/945

    Contents MARRCRLRF04071E REV B

    9.2 FILE SPECIFICATION ...................................................................................................... 939.2.1 Device Name .................................................................................................................... 939.2.2 File Name ........................................................................................................................ 949.2.3 File Type ......................................................................................................................... 95

    9.3 STORAGE DEVICE ACCESS ............................................................................................ 969.3.1 Overview ......................................................................................................................... 97

    9.3.2 Memory File Devices ....................................................................................................... 9139.3.3 Virtual Devices ............................................................................................................... 9149.3.4 File Pipes ....................................................................................................................... 915

    9.4 FILE ACCESS ............................................................................................................... 920

    9.5 FORMATTING XML INPUT ........................................................................................... 9209.5.1 Overview ....................................................................................................................... 9209.5.2 Installation Sequence ....................................................................................................... 9219.5.3 Example XML File .......................................................................................................... 9219.5.4 Example KAREL Program Referencing an XML File ............................................................ 9229.5.5 Parse Errors ................................................................................................................... 924

    9.6 MEMORY DEVICE ........................................................................................................ 925

    Chapter 10 DICTIONARIES AND FORMS ................................................................................... 101

    10.1 OVERVIEW ................................................................................................................... 103

    10.2 CREATING USER DICTIONARIES .................................................................................. 10310.2.1 Dictionary Syntax ........................................................................................................... 10310.2.2 Dictionary Element Number.............................................................................................. 10410.2.3 Dictionary Element Name ................................................................................................. 10510.2.4 Dictionary Cursor Positioning ............................................................................................ 10510.2.5 Dictionary Element Text ................................................................................................... 10610.2.6 Dictionary Reserved Word Commands ................................................................................ 10810.2.7 Character Codes ............................................................................................................. 101010.2.8 Nesting Dictionary Elements ............................................................................................ 101010.2.9 Dictionary Comment ....................................................................................................... 1011

    10.2.10 Generating a KAREL Constant File ................................................................................... 101110.2.11 Compressing and Loading Dictionaries on the Controller ....................................................... 1011

    10.2.12 Accessing Dictionary Elements from a KAREL Program ....................................................... 101210.3 CREATING USER FORMS ............................................................................................. 1013

    10.3.1 Form Syntax .................................................................................................................. 101410.3.2 Form Attributes ............................................................................................................. 101510.3.3 Form Title and Menu Label .............................................................................................. 101610.3.4 Form Menu Text ............................................................................................................ 101710.3.5 Form Selectable Menu Item .............................................................................................. 101810.3.6 Edit Data Item ............................................................................................................... 101910.3.7 Non-Selectable Text ........................................................................................................ 102510.3.8 Display Only Data Items .................................................................................................. 102610.3.9 Cursor Position Attributes ................................................................................................ 1026

    10.3.10 Form Reserved Words and Character Codes ........................................................................ 102610.3.11 Form Function Key Element Name or Number .................................................................... 102810.3.12 Form Function Key Using a Variable ................................................................................. 102910.3.13 Form Help Element Name or Number ................................................................................ 103010.3.14 Teach Pendant Form Screen ............................................................................................. 103010.3.15 CRT/KB Form Screen ..................................................................................................... 103110.3.16 Form File Naming Convention .......................................................................................... 103210.3.17 Compressing and Loading Forms on the Controller............................................................... 103210.3.18 Displaying a Form .......................................................................................................... 1034

    viii

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    11/945

    MARRCRLRF04071E REV B Contents

    Chapter 11 SYSTEM VARIABLES ............................................................................................... 111

    11.1 ACCESS RIGHTS .......................................................................................................... 11211.1.1 System Variables Accessed by KAREL Programs .................................................................. 113

    11.2 STORAGE ..................................................................................................................... 114

    Chapter 12 KAREL COMMAND LANGUAGE (KCL) .................................................................... 121

    12.1 COMMAND FORMAT .................................................................................................... 12212.1.1 Default Program .............................................................................................................. 12212.1.2 Variables and Data Types .................................................................................................. 123

    12.2 MOTION CONTROL COMMANDS ................................................................................. 123

    12.3 ENTERING COMMANDS ............................................................................................... 12312.3.1 Abbreviations ................................................................................................................. 12412.3.2 Error Messages ............................................................................................................... 12412.3.3 Subdirectories ................................................................................................................. 124

    12.4 COMMAND PROCEDURES ............................................................................................ 12412.4.1 Command Procedure Format ............................................................................................. 12512.4.2 Creating Command Procedures .......................................................................................... 12612.4.3 Error Processing .............................................................................................................. 126

    12.4.4 Executing Command Procedures ........................................................................................ 126

    Chapter 13 INPUT/OUTPUT SYSTEM ......................................................................................... 131

    13.1 USER-DEFINED SIGNALS ............................................................................................. 13213.1.1 DIN and DOUT Signals .................................................................................................... 13213.1.2 GIN and GOUT Signals .................................................................................................... 13313.1.3 AIN and AOUT Signals .................................................................................................... 13313.1.4 Hand Signals .................................................................................................................. 135

    13.2 SYSTEM-DEFINED SIGNALS ........................................................................................ 13513.2.1 Robot Digital Input and Output Signals (RDI/RDO) ............................................................... 13613.2.2 Operator Panel Input and Output Signals (OPIN/OPOUT) ....................................................... 13613.2.3 Teach Pendant Input and Output Signals (TPIN/TPOUT) ....................................................... 1317

    13.3 Serial Input/Output ......................................................................................................... 1321

    13.3.1 Serial Input/Output ......................................................................................................... 1321

    Chapter 14 MULTI-TASKING ....................................................................................................... 141

    14.1 MULTI-TASKING TERMINOLOGY ................................................................................. 142

    14.2 INTERPRETER ASSIGNMENT ....................................................................................... 143

    14.3 MOTION CONTROL ...................................................................................................... 143

    14.4 TASK SCHEDULING ..................................................................................................... 14414.4.1 Priority Scheduling .......................................................................................................... 14514.4.2 Time Slicing ................................................................................................................... 146

    14.5 STARTING TASKS ......................................................................................................... 14614.5.1 Running Programs from the User Operator Panel (UOP) PNS Signal ........................................ 14714.5.2 Child Tasks .................................................................................................................... 147

    14.6 TASK CONTROL AND MONITORING ............................................................................. 14814.6.1 From TPP Programs ........................................................................................................ 14814.6.2 From KAREL Programs ................................................................................................... 14814.6.3 From KCL ..................................................................................................................... 149

    14.7 USING SEMAPHORES AND TASK SYNCHRONIZATION ................................................. 149

    14.8 USING QUEUES FOR TASK COMMUNICATIONS ........................................................... 1414

    ix

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    12/945

    Contents MARRCRLRF04071E REV B

    Ap pen di x A KA REL LA NGUAGE AL PHAB ETICAL DESCRIPTION ............................................... A1

    A.1 OVERVIEW ................................................................................................................... A9

    A.2 - A - KAREL LANGUAGE DESCRIPTION ........................................................................ A18A.2.1 ABORT Action ............................................................................................................... A18A.2.2 ABORT Condition ........................................................................................................... A18A.2.3 ABORT Statement ........................................................................................................... A19

    A.2.4 ABORT_TASK Built-In Procedure ..................................................................................... A19A.2.5 ABS Built-In Function ..................................................................................................... A20A.2.6 ACOS Built-In Function ................................................................................................... A21A.2.7 ACT_SCREEN Built-In Procedure ..................................................................................... A22A.2.8 ADD_BYNAMEPC Built-In Procedure ............................................................................... A22A.2.9 ADD_DICT Built-In Procedure ......................................................................................... A24

    A.2.10 ADD_INTPC Built-In Procedure ........................................................................................ A25A.2.11 ADD_REALPC Built-In Procedure .................................................................................... A26A.2.12 ADD_STRINGPC Built-In Procedure ................................................................................. A27A.2.13 %ALPHABETIZE Translator Directive ............................................................................... A29A.2.14 APPEND_NODE Built-In Procedure .................................................................................. A29A.2.15 APPEND_QUEUE Built-In Procedure ................................................................................ A30A.2.16 APPROACH Built-In Function .......................................................................................... A31A.2.17 ARRAY Data Type .......................................................................................................... A31A.2.18 ARRAY_LEN Built-In Function ........................................................................................ A33A.2.19 ASIN Built-In Function .................................................................................................... A33A.2.20 Assignment Action .......................................................................................................... A34A.2.21 Assignment Statement ...................................................................................................... A35A.2.22 AT NODE Condition ....................................................................................................... A37A.2.23 ATAN2 Built-In Function ................................................................................................. A37A.2.24 ATTACH Statement ......................................................................................................... A38A.2.25 ATT_WINDOW_D Built-In Procedure ................................................................................ A39A.2.26 ATT_WINDOW_S Built-In Procedure ................................................................................ A40A.2.27 AVL_POS_NUM Built-In Procedure .................................................................................. A41

    A.3 - B - KAREL LANGUAGE DESCRIPTION ........................................................................ A41A.3.1 BOOLEAN Data Type ..................................................................................................... A41A.3.2 BYNAME Built-In Function ............................................................................................. A43

    A.3.3 BYTE Data Type ............................................................................................................. A43A.3.4 BYTES_AHEAD Built-In Procedure .................................................................................. A44A.3.5 BYTES_LEFT Built-In Function ........................................................................................ A46

    A.4 - C - KAREL LANGUAGE DESCRIPTION ........................................................................ A47A.4.1 CALL_PROG Built-In Procedure ....................................................................................... A47A.4.2 CALL_PROGLIN Built-In Procedure ................................................................................. A48A.4.3 CANCEL Action ............................................................................................................. A48A.4.4 CANCEL Statement ........................................................................................................ A49A.4.5 CANCEL FILE Statement ................................................................................................ A51A.4.6 CHECK_DICT Built-In Procedure ..................................................................................... A52A.4.7 CHECK_EPOS Built-In Procedure ..................................................................................... A52A.4.8 CHECK_NAME Built-In Procedure ................................................................................... A53A.4.9 CHR Built-In Function ..................................................................................................... A54

    A.4.10 CLEAR Built-In Procedure ............................................................................................... A54A.4.11 CLEAR_SEMA Built-In Procedure .................................................................................... A55A.4.12 CLOSE FILE Statement ................................................................................................... A56A.4.13 CLOSE HAND Statement ................................................................................................. A56A.4.14 CLOSE_TPE Built-In Procedure ........................................................................................ A57A.4.15 CLR_IO_STAT Built-In Procedure ..................................................................................... A58A.4.16 CLR_PORT_SIM Built-In Procedure .................................................................................. A58A.4.17 CLR_POS_REG Built-In Procedure ................................................................................... A59

    x

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    13/945

    MARRCRLRF04071E REV B Contents

    A.4.18 %CMOSVARS Translator Directive ................................................................................... A59A.4.19 %CMOS2SHADOW Translator Directive ............................................................................ A60A.4.20 CNC_DYN_DISB Built-In Procedure ................................................................................. A60A.4.21 CNC_DYN_DISE Built-In Procedure ................................................................................. A61A.4.22 CNC_DYN_DISI Built-In Procedure .................................................................................. A62A.4.23 CNC_DYN_DISP Built-In Procedure ................................................................................. A62A.4.24 CNC_DYN_DISR Built-In Procedure ................................................................................. A63A.4.25 CNC_DYN_DISS Built-In Procedure ................................................................................. A64A.4.26 CNCL_STP_MTN Built-In Procedure ................................................................................. A64A.4.27 CNV_CONF_STR Built-In Procedure ................................................................................. A65A.4.28 CNV_INT_STR Built-In Procedure .................................................................................... A66A.4.29 CNV_JPOS_REL Built-In Procedure .................................................................................. A67A.4.30 CNV_REAL_STR Built-In Procedure ................................................................................. A67A.4.31 CNV_REL_JPOS Built-In Procedure .................................................................................. A68A.4.32 CNV_STR_CONF Built-In Procedure ................................................................................. A69A.4.33 CNV_STR_INT Built-In Procedure .................................................................................... A70A.4.34 CNV_STR_REAL Built-In Procedure ................................................................................. A71A.4.35 CNV_STR_TIME Built-In Procedure ................................................................................. A71A.4.36 CNV_TIME_STR Built-In Procedure ................................................................................. A72A.4.37 %COMMENT Translator Directive .................................................................................... A73A.4.38 COMMON_ASSOC Data Type ......................................................................................... A73A.4.39 CONDITION...ENDCONDITION Statement ....................................................................... A74A.4.40 CONFIG Data Type ......................................................................................................... A75A.4.41 CONNECT TIMER Statement ........................................................................................... A77A.4.42 CONTINUE Action ......................................................................................................... A77A.4.43 CONTINUE Condition ..................................................................................................... A78A.4.44 CONT_TASK Built-In Procedure ....................................................................................... A79A.4.45 COPY_FILE Built-In Procedure ......................................................................................... A80A.4.46 COPY_PATH Built-In Procedure ........................................................................................ A81A.4.47 COPY_QUEUE Built-In Procedure .................................................................................... A82A.4.48 COPY_TPE Built-In Procedure .......................................................................................... A84A.4.49 COS Built-In Function ..................................................................................................... A85A.4.50 CR Input/Output Item ...................................................................................................... A85A.4.51 CREATE_TPE Built-In Procedure ...................................................................................... A86

    A.4.52 CREATE_VAR Built-In Procedure ..................................................................................... A87A.4.53 %CRTDEVICE ............................................................................................................... A90A.4.54 CURJPOS Built-In Function ............................................................................................. A90A.4.55 CURPOS Built-In Function ............................................................................................... A91A.4.56 CURR_PROG Built-In Function ........................................................................................ A92

    A.5 - D - KAREL LANGUAGE DESCRIPTION ........................................................................ A93A.5.1 DAQ_CHECKP Built-In Procedure .................................................................................... A93A.5.2 DAQ_REGPIPE Built-In Procedure .................................................................................... A94A.5.3 DAQ_START Built-In Procedure ....................................................................................... A96A.5.4 DAQ_STOP Built-In Procedure ......................................................................................... A98A.5.5 DAQ_UNREG Built-In Procedure ...................................................................................... A99A.5.6 DAQ_WRITE Built-In Procedure ..................................................................................... A100A.5.7 %DEFGROUP Translator Directive .................................................................................. A102A.5.8 DEF_SCREEN Built-In Procedure ................................................................................... A103

    A.5.9 DEF_WINDOW Built-In Procedure .................................................................................. A103A.5.10 %DELAY Translator Directive ........................................................................................ A105A.5.11 DELAY Statement ......................................................................................................... A105A.5.12 DELETE_FILE Built-In Procedure ................................................................................... A106A.5.13 DELETE_NODE Built-In Procedure ................................................................................. A107A.5.14 DELETE_QUEUE Built-In Procedure ............................................................................... A107A.5.15 DEL_INST_TPE Built-In Procedure ................................................................................. A108

    xi

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    14/945

    Contents MARRCRLRF04071E REV B

    A.5.16 DET_WINDOW Built-In Procedure ................................................................................. A109A.5.17 DISABLE CONDITION Action ....................................................................................... A109A.5.18 DISABLE CONDITION Statement .................................................................................. A110A.5.19 DISCONNECT TIMER Statement ................................................................................... A111A.5.20 DISCTRL_ALPH Built_In Procedure ............................................................................... A112A.5.21 DISCTRL_FORM Built_In Procedure ............................................................................... A114A.5.22 DISCTRL_LIST Built-In Procedure .................................................................................. A116A.5.23 DISCTRL_PLMN Built-In Procedure ............................................................................... A117A.5.24 DISCTRL_SBMN Built-In Procedure ............................................................................... A119A.5.25 DISCTRL_TBL Built-In Procedure .................................................................................. A122A.5.26 DISMOUNT_DEV Built-In Procedure .............................................................................. A125A.5.27 DISP_DAT_T Data Type ................................................................................................ A125

    A.6 - E - KAREL LANGUAGE DESCRIPTION ...................................................................... A127A.6.1 ENABLE CONDITION Action ....................................................................................... A127A.6.2 ENABLE CONDITION Statement ................................................................................... A127A.6.3 %ENVIRONMENT Translator Directive ........................................................................... A128A.6.4 ERR_DATA Built-In Procedure ....................................................................................... A130A.6.5 ERROR Condition ......................................................................................................... A131A.6.6 EVAL Clause ............................................................................................................... A132A.6.7 EVENT Condition ......................................................................................................... A132

    A.6.8 EXP Built-In Function ................................................................................................... A133A.7 - F - KAREL LANGUAGE DESCRIPTION ...................................................................... A133

    A.7.1 FILE Data Type ............................................................................................................ A133A.7.2 FILE_LIST Built-In Procedure ........................................................................................ A134A.7.3 FOR...ENDFOR Statement ............................................................................................. A135A.7.4 FORCE_SPMENU Built-In Procedure .............................................................................. A137A.7.5 FORMAT_DEV Built-In Procedure .................................................................................. A140A.7.6 FRAME Built-In Function .............................................................................................. A140A.7.7 FROM Clause .............................................................................................................. A142

    A.8 - G - KAREL LANGUAGE DESCRIPTION ...................................................................... A143A.8.1 GET_ATTR_PRG Built-In Procedure ............................................................................... A143A.8.2 GET_FILE_POS Built-In Function ................................................................................... A145A.8.3 GET_JPOS_REG Built-In Function .................................................................................. A146

    A.8.4 GET_JPOS_TPE Built-In Function ................................................................................... A147A.8.5 GET_PORT_ASG Built-in Procedure ............................................................................... A148A.8.6 GET_PORT_ATR Built-In Function ................................................................................. A149A.8.7 GET_PORT_CMT Built-In Procedure ............................................................................... A152A.8.8 GET_PORT_MOD Built-In Procedure .............................................................................. A152A.8.9 GET_PORT_SIM Built-In Procedure ................................................................................ A154

    A.8.10 GET_PORT_VAL Built-In Procedure ................................................................................ A155A.8.11 GET_POS_FRM Built-In Procedure ................................................................................. A155A.8.12 GET_POS_REG Built-In Function ................................................................................... A156A.8.13 GET_POS_TPE Built-In Function .................................................................................... A157A.8.14 GET_POS_TYP Built-In Procedure .................................................................................. A158A.8.15 GET_PREG_CMT Built-In-Procedure .............................................................................. A159A.8.16 GET_QUEUE Built-In Procedure ..................................................................................... A159A.8.17 GET_REG Built-In Procedure ......................................................................................... A161

    A.8.18 GET_REG_CMT .......................................................................................................... A161A.8.19 GET_TIME Built-In Procedure ........................................................................................ A162A.8.20 GET_TPE_CMT Built-in Procedure ................................................................................. A163A.8.21 GET_TPE_PRM Built-in Procedure ................................................................................. A163A.8.22 GET_TSK_INFO Built-In Procedure ................................................................................ A166A.8.23 GET_USEC_SUB Built-In Procedure ............................................................................... A168A.8.24 GET_USEC_TIM Built-In Function ................................................................................. A168

    xi i

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    15/945

    MARRCRLRF04071E REV B Contents

    A.8.25 GET_VAR Built-In Procedure ......................................................................................... A169A.8.26 GO TO Statement .......................................................................................................... A173A.8.27 GROUP_ASSOC Data Type ............................................................................................ A174

    A.9 - H - KAREL LANGUAGE DESCRIPTION ...................................................................... A175A.9.1 HOLD Action ............................................................................................................... A175A.9.2 HOLD Statement .......................................................................................................... A176

    A.10 - I - KAREL LANGUAGE DESCRIPTION ....................................................................... A177A.10.1 IF ... ENDIF Statement .................................................................................................. A177A.10.2 IN Clause .................................................................................................................... A178A.10.3 %INCLUDE Translator Directive ..................................................................................... A179A.10.4 INDEX Built-In Function ............................................................................................... A180A.10.5 INI_DYN_DISB Built-In Procedure ................................................................................. A180A.10.6 INI_DYN_DISE Built-In Procedure .................................................................................. A182A.10.7 INI_DYN_DISI Built-In Procedure .................................................................................. A183A.10.8 INI_DYN_DISP Built-In Procedure .................................................................................. A185A.10.9 INI_DYN_DISR Built-In Procedure ................................................................................. A186

    A.10.10 INI_DYN_DISS Built-In Procedure .................................................................................. A187A.10.11 INIT_QUEUE Built-In Procedure .................................................................................... A188A.10.12 INIT_TBL Built-In Procedure ......................................................................................... A189A.10.13 IN_RANGE Built-In Function ......................................................................................... A200A.10.14 INSERT_NODE Built-In Procedure .................................................................................. A201A.10.15 INSERT_QUEUE Built-In Procedure ................................................................................ A202A.10.16 INTEGER Data Type ..................................................................................................... A203A.10.17 INV Built-In Function .................................................................................................... A204A.10.18 IO_MOD_TYPE Built-In Procedure ................................................................................. A205A.10.19 IO_STATUS Built-In Function ......................................................................................... A206

    A.11 - J - KAREL LANGUAGE DESCRIPTION ....................................................................... A207A.11.1 J_IN_RANGE Built-In Function ...................................................................................... A207A.11.2 JOINTPOS Data Type .................................................................................................... A208A.11.3 JOINT2POS Built-In Function ......................................................................................... A209

    A.12 - K - KAREL LANGUAGE DESCRIPTION ...................................................................... A210A.12.1 KCL Built-In Procedure ................................................................................................. A210A.12.2 KCL_NO_WAIT Built-In Procedure ................................................................................. A211

    A.12.3 KCL_STATUS Built-In Procedure .................................................................................... A212A.13 - L - KAREL LANGUAGE DESCRIPTION ...................................................................... A212

    A.13.1 LN Built-In Function ..................................................................................................... A212A.13.2 LOAD Built-In Procedure ............................................................................................... A213A.13.3 LOAD_STATUS Built-In Procedure ................................................................................. A214A.13.4 LOCK_GROUP Built-In Procedure .................................................................................. A215A.13.5 %LOCKGROUP Translator Directive ............................................................................... A216

    A.14 - M - KAREL LANGUAGE DESCRIPTION ..................................................................... A217A.14.1 MIRROR Built-In Function ............................................................................................. A217A.14.2 MODIFY_QUEUE Built-In Procedure .............................................................................. A219A.14.3 MOTION_CTL Built-In Function .................................................................................... A220A.14.4 MOUNT_DEV Built-In Procedure ................................................................................... A221A.14.5 MOVE ABOUT Statement .............................................................................................. A222

    A.14.6 MOVE ALONG Statement ............................................................................................. A223A.14.7 MOVE AWAY Statement ................................................................................................ A225A.14.8 MOVE AXIS Statement ................................................................................................. A226A.14.9 MOVE_FILE Built-In Procedure ...................................................................................... A228

    A.14.10 MOVE NEAR Statement ................................................................................................ A229A.14.11 MOVE RELATIVE Statement ......................................................................................... A230A.14.12 MOVE TO Statement ..................................................................................................... A231

    xiii

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    16/945

    Contents MARRCRLRF04071E REV B

    A.14.13 MSG_CONNECT Built-In Procedure ............................................................................... A232A.14.14 MSG_DISCO Built-In Procedure ..................................................................................... A234A.14.15 MSG_PING ................................................................................................................. A235

    A.15 - N - KAREL LANGUAGE DESCRIPTION ...................................................................... A235A.15.1 NOABORT Action ........................................................................................................ A235A.15.2 %NOABORT Translator Directive ................................................................................... A236

    A.15.3 %NOBUSYLAMP Translator Directive ............................................................................ A236A.15.4 NODE_SIZE Built-In Function ........................................................................................ A237A.15.5 %NOLOCKGROUP Translator Directive .......................................................................... A238A.15.6 NOMESSAGE Action .................................................................................................... A240A.15.7 NOPAUSE Action ......................................................................................................... A240A.15.8 %NOPAUSE Translator Directive .................................................................................... A241A.15.9 %NOPAUSESHFT Translator Directive ............................................................................ A241

    A.15.10 NOWAIT Clause ........................................................................................................... A242

    A.16 - O - KAREL LANGUAGE DESCRIPTION ...................................................................... A242A.16.1 OPEN FILE Statement ................................................................................................... A242A.16.2 OPEN HAND Statement ................................................................................................. A243A.16.3 OPEN_TPE Built-In Procedure ........................................................................................ A244A.16.4 ORD Built-In Function ................................................................................................... A245A.16.5 ORIENT Built-In Function .............................................................................................. A246

    A.17 - P - KAREL LANGUAGE DESCRIPTION ...................................................................... A247A.17.1 PATH Data Type ........................................................................................................... A247A.17.2 PATH_LEN Built-In Function .......................................................................................... A249A.17.3 PAUSE Action .............................................................................................................. A250A.17.4 PAUSE Condition ......................................................................................................... A250A.17.5 PAUSE Statement ......................................................................................................... A251A.17.6 PAUSE_TASK Built-In Procedure .................................................................................... A252A.17.7 PEND_SEMA Built-In Procedure .................................................................................... A253A.17.8 PIPE_CONFIG Built-In Procedure ................................................................................... A254A.17.9 POP_KEY_RD Built-In Procedure ................................................................................... A255

    A.17.10 Port_Id Action .............................................................................................................. A255A.17.11 Port_Id Condition .......................................................................................................... A256A.17.12 POS Built-In Function .................................................................................................... A257

    A.17.13 POS2JOINT Built-In Function ......................................................................................... A258A.17.14 POS_REG_TYPE Built-In Procedure ................................................................................ A259A.17.15 POSITION Data Type .................................................................................................... A261A.17.16 POST_ERR Built-In Procedure ........................................................................................ A262A.17.17 POST_SEMA Built-In Procedure ..................................................................................... A263A.17.18 PRINT_FILE Built-In Procedure ...................................................................................... A263A.17.19 %PRIORITY Translator Directive .................................................................................... A264A.17.20 PROG_BACKUP Built-In Procedure ................................................................................ A266A.17.21 PROG_CLEAR Built-In Procedure ................................................................................... A269A.17.22 PROG_RESTORE Built-In Procedure ............................................................................... A271A.17.23 PROG_LIST Built-In Procedure ....................................................................................... A273A.17.24 PROGRAM Statement ................................................................................................... A274A.17.25 PULSE Action .............................................................................................................. A275A.17.26 PULSE Statement ......................................................................................................... A276

    A.17.27 PURGE CONDITION Statement ..................................................................................... A277A.17.28 PURGE_DEV Built-In Procedure ..................................................................................... A278A.17.29 PUSH_KEY_RD Built-In Procedure ................................................................................. A279

    A.18 - Q - KAREL LANGUAGE DESCRIPTION ...................................................................... A280A.18.1 QUEUE_TYPE Data Type .............................................................................................. A280

    A.19 - R - KAREL LANGUAGE DESCRIPTION ...................................................................... A280A.19.1 READ Statement ........................................................................................................... A280

    xi v

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    17/945

    MARRCRLRF04071E REV B Contents

    A.19.2 READ_DICT Built-In Procedure ...................................................................................... A282A.19.3 READ_DICT_V Built-In-Procedure ................................................................................. A283A.19.4 READ_KB Built-In Procedure ......................................................................................... A284A.19.5 REAL Data Type ........................................................................................................... A289A.19.6 Relational Condition ...................................................................................................... A290A.19.7 RELAX HAND Statement .............................................................................................. A291A.19.8 RELEASE Statement ..................................................................................................... A292A.19.9 REMOVE_DICT Built-In Procedure ................................................................................. A292

    A.19.10 RENAME_FILE Built-In Procedure ................................................................................. A293A.19.11 RENAME_VAR Built-In Procedure .................................................................................. A294A.19.12 RENAME_VARS Built-In Procedure ................................................................................ A295A.19.13 REPEAT ... UNTIL Statement ......................................................................................... A295A.19.14 RESET Built-In Procedure .............................................................................................. A296A.19.15 RESUME Action .......................................................................................................... A297A.19.16 RESUME Statement ...................................................................................................... A298A.19.17 RETURN Statement ...................................................................................................... A299A.19.18 ROUND Built-In Function .............................................................................................. A299A.19.19 ROUTINE Statement ..................................................................................................... A300A.19.20 RUN_TASK Built-In Procedure ....................................................................................... A301

    A.20 - S - KAREL LANGUAGE DESCRIPTION ...................................................................... A303

    A.20.1 SAVE Built-In Procedure ................................................................................................ A303A.20.2 SAVE_DRAM Built-In Procedure .................................................................................... A304A.20.3 SELECT ... ENDSELECT Statement ................................................................................ A305A.20.4 SELECT_TPE Built-In Procedure .................................................................................... A306A.20.5 SEMA_COUNT Built-In Function ................................................................................... A307A.20.6 SEMAPHORE Condition ............................................................................................... A307A.20.7 SEND_DATAPC Built-In Procedure ................................................................................. A308A.20.8 SEND_EVENTPC Built-In Procedure ............................................................................... A309A.20.9 SET_ATTR_PRG Built-In Procedure ................................................................................ A310

    A.20.10 SET_CURSOR Built-In Procedure ................................................................................... A311A.20.11 SET_EPOS_REG Built-In Procedure ................................................................................ A312A.20.12 SET_EPOS_TPE Built-In Procedure ................................................................................. A313A.20.13 SET_FILE_ATR Built-In Procedure ................................................................................. A314A.20.14 SET_FILE_POS Built-In Procedure .................................................................................. A315

    A.20.15 SET_INT_REG Built-In Procedure ................................................................................... A316A.20.16 SET_JPOS_REG Built-In Procedure ................................................................................. A316A.20.17 SET_JPOS_TPE Built-In Procedure ................................................................................. A317A.20.18 SET_LANG Built-In Procedure ....................................................................................... A318A.20.19 SET_PERCH Built-In Procedure ...................................................................................... A319A.20.20 SET_PORT_ASG Built-In Procedure ................................................................................ A320A.20.21 SET_PORT_ATR Built-In Function .................................................................................. A321A.20.22 SET_PORT_CMT Built-In Procedure ............................................................................... A323A.20.23 SET_PORT_MOD Built-In Procedure ............................................................................... A324A.20.24 SET_PORT_SIM Built-In Procedure ................................................................................. A325A.20.25 SET_PORT_VAL Built-In Procedure ................................................................................ A326A.20.26 SET_POS_REG Built-In Procedure .................................................................................. A327A.20.27 SET_POS_TPE Built-In Procedure ................................................................................... A328A.20.28 SET_PREG_CMT Built-In-Procedure ............................................................................... A329

    A.20.29 SET_REAL_REG Built-In Procedure ............................................................................... A329A.20.30 SET_REG_CMT Built-In-Procedure ................................................................................. A330A.20.31 SET_TIME Built-In Procedure ........................................................................................ A330A.20.32 SET_TPE_CMT Built-In Procedure .................................................................................. A332A.20.33 SET_TRNS_TPE Built-In Procedure ................................................................................ A332A.20.34 SET_TSK_ATTR Built-In Procedure ................................................................................ A333A.20.35 SET_TSK_NAME Built-In Procedure ............................................................................... A334

    xv

  • 7/21/2019 90768338 R 30ia Karel Reference Manual Ver 7 30 Marrcrlrf04071e Rev b

    18/945

    Contents MARRCRLRF04071E REV B

    A.20.36 SET_VAR Built-In Procedure .......................................................................................... A335A.20.37 %SHADOWVARS Translator Directive ............................................................................ A338A.20.38 SHORT Data Type ......................................................................................................... A338A.20.39 SIGNAL EVENT Action ................................................................................................ A339A.20.40 SIGNAL EVENT Statement ............................................................................................ A339A.20.41 SIGNAL SEMAPHORE Action ....................................................................................... A340A.20.42 SIN Built-In Function .................................................................................................... A340A.20.43 SQRT Built-In Function ................................................................................................. A341A.20.44 %STACKSIZE Translator Directive .................................................................................. A341A.20.45 STD_PTH_NODE Data Type .......................................................................................... A341A.20.46 STOP Action ................................................................................................................ A342A.20.47 STOP Statement ............................................................................................................ A343A.20.48 STRING Data Type ....................................................................................................... A344A.20.49 STR_LEN Built-In Function ........................................................................................... A345A.20.50 STRUCTURE Data Type ................................................................................................ A346A.20.51 SUB_STR Built-In Function ........................................................................................... A346

    A.21 - T - KAREL LANGUAGE DESCRIPTION ...................................................................... A347A.21.1 TAN Built-In Function ................................................................................................... A347A.21.2 TIME Condition ............................................................................................................ A348A.21.3 %TIMESLICE Translator Directive .................................................................................. A349

    A.21.4 %TPMOTION Translator Directive .................................................................................. A349A.21.5 TRANSLATE Built-In Procedure ..................................................................................... A350A.21.6 TRUNC Built-In Function .............................................................................................. A351

    A.22 - U - KAREL LANGUAGE DESCRIPTION ...................................................................... A352A.22.1 UNHOLD Action .......................................................................................................... A352A.22.2 UNHOLD Statement ...................................................................................................... A353A.22.3 UNINIT Built-In Function .............................................................................................. A353A.22.4 %UNINITVARS Translator Directive ............................................................................... A354A.22.5 UNLOCK_GROUP Built-In Procedure ............................................................................. A354A.22.6 UNPAUSE Action ......................................................................................................... A356A.22.7 UNPOS Built-In Procedure ............................................................................................. A357A.22.8 UNTIL Clause .............................................................................................................. A357A.22.9 USING ... ENDUSING Statement .................................................................................... A358

    A.23 - V - KAREL LANGUAGE DESCRIPTION ...................................................................... A359A.23.1 V_CAM_CALIB iRVision Built-In Procedure .................................................................... A359A.23.2 V_GET_OFFSET iRVision Built-In Procedure ................................................................... A360A.23.3 V_GET_PASSFL iRVision Built-In Procedure .................................................................... A362A.23.4 V_RUN_FIND iRVision Built-In Procedure ....................................................................... A364A.23.5 V_SET_REF iRVision Built-In Procedure .......................................................................... A366A.23.6 VAR_INFO Built-In Procedure ........................................................................................ A367A.23.7 VAR_LIST Built-In Procedure ......................................................................................... A369A.23.8 VECTOR Data Type ...................................................................................................... A372A.23.9 VIA Clause .................................................................................................................. A373

    A.23.10 VOL_SPACE Built-In Procedure ...................................................................................... A373

    A.24 - W - KAREL LANGUAGE DESCRIPTION ..................................................................... A375A.24.1 WAIT FOR Statement .................................................................................................... A375A.24.2 WHEN Clause .............................................................................................................. A376A.24.3 WHILE...ENDWHILE Statement ..................................................................................... A376A.24.4 WITH Clause ............................................................................................................... A377A.24.5 WRITE Statement ......................................................................................................... A378A.24.6 WRITE_DICT Built-In Procedure .................................................................................... A379A.24.7 WRITE_DICT_V Built-In Procedure ...........................................................................