0% found this document useful (0 votes)
23 views552 pages

D Series Controller AS Language Manual

The D Series Controller AS Language Reference Manual provides essential information for programming and operating Kawasaki industrial robots using the AS Language. It includes specifications, programming capabilities, and system configurations, emphasizing the ease of learning and integration with peripheral components. The manual also outlines available training courses and the proprietary nature of its content.

Uploaded by

m2bmanutencao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views552 pages

D Series Controller AS Language Manual

The D Series Controller AS Language Reference Manual provides essential information for programming and operating Kawasaki industrial robots using the AS Language. It includes specifications, programming capabilities, and system configurations, emphasizing the ease of learning and integration with peripheral components. The manual also outlines available training courses and the proprietary nature of its content.

Uploaded by

m2bmanutencao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY

Kawasak
D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
MPPDCONTO63E

Kawasak
Kawasaki Robotics (USA), Inc.
COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY
This publication contains proprietary information of Kawasaki Robotics (USA), Inc. and
is furnished solely for customer use only. No other uses are authorized or permitted
without the express written permission of Kawasaki Robotics (USA), Inc. The contents
of this manual cannot be reproduced, nor transmitted by any means, e.g., mechanical,
electrical, photocopy, facsimile, or electronic data media, without the express written
permission of Kawasaki Robotics (USA), Inc.

All Rights Reserved.

Copyright © 2004, Kawasaki Robotics (USA), Inc.


Wixom, Michigan 48393

The descriptions and specifications in this manual were in effect when it was submitted
for publishing. Kawasaki Robotics (USA), Inc. reserves the right to change or discon-
tinue specific robot models and associated hardware and software, designs, descrip-
tions, specifications, or performance parameters at any time and without notice, without
incurring any obligation whatsoever.

This manual presents information specific to the robot model listed on the title page of
this document. Before performing maintenance, operation, or programming procedures,
all personnel are recommended to attend an approved Kawasaki Robotics (USA), Inc.
training course.

KAWASAKI ROBOTICS (USA), INC. TRAINING

Training courses covering operation, programming, electrical maintenance, and me-


chanical maintenance are available from Kawasaki Robotics (USA), Inc. These courses
are conducted at our training facility in Wixom, Michigan, or on-site at the customer’s
location.

For additional information contact:

Kawasaki Robotics (USA), Inc.


Training and Documentation Dept.
28059 Center Oaks Court
Wixom, Michigan 48393
D SERIES CONTROLLER
Kawasak

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

REVISION HISTORY

Revision Release
Description of Change Initials
Number Date

-0 05/18/04 Initial PDF release, based on Rev.-0 of print copy CB/CB


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INTRODUCTION

I.0 INTRODUCTION ................................................................................................... I-2


I.1 Robot Controller Design Specifications ................................................................. I-3

June 10, 2003 I-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INTRODUCTION

I.0 INTRODUCTION

The D Series Controller AS Language Reference Manual is designed to assist the user
whose primary responsibility includes programming and operating Kawasaki industrial
robots on a daily basis. AS Language is a computer control language designed specifi-
cally for use with Kawasaki robot controllers. This text provides information on creating
programs, running programs, and editing programs using AS Language commands. AS
Language is relatively easy to learn with many keywords, syntax sequences, and inter-
face commands being intuitive.

AS Language provides the programmer with the ability to precisely define the task a
robot is to perform. Programming the robot with a computer control language (AS) also
provides the ability to integrate peripheral components into the program. Typical compo-
nent interfacing with AS Language programs includes: programmable logic controllers
(PLCs), lasers, weld controllers, gray scale vision, and remote sensing systems.

AS Language programs provide outstanding performance in terms of robot trajectory


control. Program location points can be stored and played back as either joint angles
representing the manipulator configuration (precision points) or geometrically defined
locations in the work envelope (transformations). Transformation locations can also be
defined based on their relative position to one another (compound transformations).
These capabilities allow program locations to be shifted and moved based on param-
eters and variables identified in the AS Language program.

I-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INTRODUCTION

I.1 ROBOT CONTROLLER DESIGN SPECIFICATIONS

Control System: 32 bit RISC main CPU


32 bit RISC servo CPU controller
Software controlled AC servo drive system using pulse width
modulation (PWM) circuitry.

Number of Axes: 6 standard; 7th optional

Motion Control: Teach mode - Joint


Base
Tool

Repeat mode - Joint move


Linear move
Circular move (optional)
FLIN move (optional)

Memory: CMOS RAM

Memory Capacity: Standard - 1024 KB (approx. 4,000 steps)


Optional - 4096 KB (approx. 34,000 steps)

Accuracy: Four levels of accuracy for block step programs

F-series
Adjustable between 0.03 mm - 5,000 mm

Z-series
Adjustable between 0.3 mm - 5,000 mm

Speed: Proportional speed - percentage of maximum joint or TCP


speed. Adjustable in increments of 0.0001 up to 100%
(rounding occurs as necessary).

Absolute speed - speed of TCP in mm/s. Adjustable in


increments of 0.0001 mm/s up to maximum robot TCP speed
(rounding occurs as necessary).

Data Editing: Step insertion and deletion, and rewriting of auxiliary and
positional data.

June 10, 2003 I-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INTRODUCTION

Software Features: Continuous path motion control - CP ON/OFF


Time delays
Coordinate modification
Process control programs (5)
Peripheral equipment control
Interrupt signal control
Error interrupt control
Input of real, string, and integer variables
Local variables
Subroutine calls with arguments (maximum stack = 20)
Program weld schedules
Servo shutdown timer
Auto start function

I/O Signals: 1GW/1HW I/O board


32 inputs/32 outputs (128 maximum) (including dedicated
signals)
Robot internal 256

1FS RI/O board (option)


Robot I/O 256 I/O (including dedicated signals)
Robot internal 256
A-B PLC 64 I/O
Weld controller 32 I/O
Non-retentive 128
Retentive 16
Timers 16
Counters 16
Message display 64
Slogic status 16
Control Net (option)

1HS RI/O board (option)


Robot I/O 256 I/O (including dedicated signals)
Robot internal 256
Mitsubishi PLC 128 I/O CC Link (Mitsubishi proprietary
communications)
Weld controller 64 I/O
Non-retentive 128
Retentive 16
Timers 16
Counters 16
Message display 64
Slogic status 16

I-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INTRODUCTION

Dedicated Signals: Outputs - Motor power ON


Error occurrence
Automatic
CYCLE_START
Teach mode
HOME1
HOME2
Power ON
RGSO
External program select (RPS) enabled

Dedicated Signals: Inputs - External motor power ON,


External error reset
External cycle start
External program select start (JUMP)
JUMP_ON
JUMP_OFF
JUMP_ST
External program select start (RPS)
RPS_ON
RPS_ST
Number of RPS code signal
First signal number of RPS code
Program reset
External Hold (EXT_IT)
External condition wait (EXT_WAIT)
External slow repeat mode

Error Messages: Error code messages, self-diagnosis, error logging, operation


logging

Special Features: Program check mode


Adjustable hard stops - F-series JT1, JT2, JT3
and Z-series JT1
Terminal box on robot arm (optional)
Robot application interface panel (optional)
Overtravel limit switch - JT1 (JT2, JT3 option)
Power lockout
Ethernet (option)

June 10, 2003 I-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INTRODUCTION

Teach Pendant: Three-position enabling devices


16.5 cm (6.5 in) color LCD
Touch panel
Soft key panel
Teach-lock function
Emergency stop switch

Supplemental
Data Storage: PC flash RAM Memory Card 8MB, PCMCIA 2.1 Slot
Floppy disk drive (option)
Personal computer (option)

Power Requirements: N. American Spec.: 3-phase 400/440/460/480/515/575 VAC

Tolerance: +/- 10%

Frequency: 50/60 Hz

Rated Load: 11 kVA

Ground: less than 100 ohm ground line separated


from welder power ground

Dimensions: N. American Spec.: WxDxH, 600 mm x 550 mm x 1200 mm


(inches: 23.6 x 21.7 x 47.3)

Weight: N. American Spec.: 200 kg (441 lb)

I-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OVERVIEW

1.0 OVERVIEW .......................................................................................................... 1-2


1.1 AS System Overview ........................................................................................... 1-2
1.2 AS System Characteristics .................................................................................. 1-3
1.3 AS System Configuration ..................................................................................... 1-5

June 10, 2003 1-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OVERVIEW

1.0 OVERVIEW

The Kawasaki robots are controlled by a software-based system called AS. This chapter
describes the overall view of the AS system.

1.1 AS SYSTEM OVERVIEW

In the AS system, the operator can enter commands or execute programs using AS
Language. The AS system is stored in the nonvolatile memory in the robot controller.
When the control power is set to ON, the AS system is activated and waits for a com-
mand input.

The AS system controls the robot according to the given commands and programs. It
can also execute several types of functions while a program is running. Some of the
functions that are used while a program is running are:

• Display the system status

• Display the robot pose (location)

• Save data in external memory devices

• Writing and editing programs

NOTE
In accordance with the international standards organiza-
tion (ISO), location and posture of the robot are referred
to as pose.

1-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OVERVIEW

1.2 AS SYSTEM CHARACTERISTICS

In the AS system, the robot is controlled and operated based on a program that de-
scribes the necessary tasks and which is made prior to operation (Teaching Playback
Method).

AS Language is divided into two groups:

• Monitor commands

• Program instruction

Monitor commands:
Used to write, edit, and execute programs. They are entered after the prompt (>) shown
on the screen, and are immediately executed. Some of the monitor commands are used
within the programs to work as program instructions.

Program instructions:
Used to direct the movements of the robot, to monitor or control external signals, etc., in
programs. A program is a collection of program instructions.

In this manual, a monitor command is referred to as a command, a program instruction


as an instruction.

June 10, 2003 1-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OVERVIEW

Features of AS Language programming:

1. The robot can be moved in a continuous path motion (CP motion: Continuous Path
motion)

2. Two coordinate systems, base coordinates and tool coordinates, are used for pre-
cise control of the robot movement.

3. The coordinates can be shifted or rotated corresponding to the pose changes of the
workpiece.

4. When teaching locations or executing a program in repeat mode, a linear move is


used to move the tool center point in a straight line at a constant speed while main-
taining tool posture.

5. Programs are operator named and the number of programs is only limited to the
memory available in the controller.

6. Each operation segment can be defined as a separate program and these pro-
grams can be called as subroutines to accomplish complex tasks.

7. Programs can be interrupted and branched to a different program, suspending


current motions when an external signal is input (Interruption).

8. A Process Control program (PC program) can be executed simultaneously with a


robot control program (up to five PC programs).

9. Programs and pose (location) data can be displayed on a terminal and saved to a
PC card or an optional floppy drive.

10. Programming can be done off-line using a personal computer loaded with the termi-
nal software (KRterm or KCwin32) provided by Kawasaki.

1-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OVERVIEW

1.3 AS SYSTEM CONFIGURATION

A typical Kawasaki D series robot system consists of components as shown in


figures 1-1 and 1-2.

Teach Pendant

Robot D Series Controller

Personal
Computer

Peripheral
Controller

Figure 1-1 D Series Controller Robot System Block Diagram

June 10, 2003 1-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OVERVIEW

The operations shown in figure 1-2 are available when a personal computer, with the
KRterm or KCwin32 terminal software loaded, and the teach pendant are connected to
the D series controller.

NOTE
KRterm or KCwin32 monitor software operates with win-
dows 95/98/Me/2000/XP. The appropriate operating
system must be set up.

D Series Controller

Personal Computer Teach Pendant

CONTROL MOTOR CYCLE


POWER POWER START
ON OFF

TEACH REPEAT
CHECK INTER CANCEL
T. LOCK MENU TEACH
ERROR SPEED A
ERROR HOLD RUN SELECT
RESET
PROG
EXT AXIS
STEP (Robot)
S
GO
CHECK JOG
S CONT
BACK
1
— X +
INS DEL
2
O. WRITE
— Y +
AUX POS
MOD REC MOD 3
— Z +
CL1 CL2 CLn
4
— rx +
SPD ACC TMR TOOL
7 D 8 E 9 F BS 5
— ry +
OX WX WS CC
?
4 A 5 B 6 C CLEAR 6
— rz +
ON OFF CLAUX WRK

1 2 3 C —
7
+
, - J/E

0 . I
6037-1200

KRterm or KCwin32
Used to:
Used to: Select Programs
Enter AS Language Commands Display Program Names and Steps
Create AS Language Programs Manually Control the Robot
Save/Load Programs Monitor Signals
Set Repeat Conditions
Teach Pose Data
Used For Daily Operations: Teach auxiliary Data (Block Teaching)
Select Teach/Repeat Mode
Set Motor Power ON
Cycle Start Programs
Select Hold/Run Mode
Emergency Stop Robot

Figure 1-2 D Series Controller Interface components

1-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.0 SAFETY.......................................................................................................... 2-2


2.1 Terminology .................................................................................................... 2-3
2.1.1 Safety Information Contacts ........................................................................... 2-6
2.2 Warning and Caution Symbols ....................................................................... 2-8
2.3 Battery Use and Disposal ............................................................................... 2-9
2.4 Safety Categories ......................................................................................... 2-10
2.4.1 Personal Safety ............................................................................................. 2-10
2.4.2 Safety During Operation ............................................................................... 2-12
2.4.3 Safety During Programming.......................................................................... 2-12
2.4.4 Safety During Inspection, Maintenance and Repair ..................................... 2-13
2.5 Safety Features............................................................................................. 2-14
2.6 Restricted Space Drawings .......................................................................... 2-15
2.6.1 FC06N/FS06N/FS10C/FW06N ..................................................................... 2-15
2.6.2 FP20N .......................................................................................................... 2-16
2.6.3 FS02N/FS03N .............................................................................................. 2-17
2.6.4 FS06L ........................................................................................................... 2-18
2.6.5 FS10E ........................................................................................................... 2-19
2.6.6 FS10L ........................................................................................................... 2-20
2.6.7 FS10N .......................................................................................................... 2-21
2.6.8 FS20C .......................................................................................................... 2-22
2.6.9 FS20N .......................................................................................................... 2-23
2.6.10 FS30L ........................................................................................................... 2-24
2.6.11 FS30N/FS45C .............................................................................................. 2-25
2.6.12 FS45N .......................................................................................................... 2-26
2.6.13 ZD130 ........................................................................................................... 2-27
2.6.14 ZD165 ........................................................................................................... 2-28
2.6.15 ZT130 ........................................................................................................... 2-29
2.6.16 ZT165 ........................................................................................................... 2-30
2.6.17 ZT200 ........................................................................................................... 2-31
2.6.18 ZX130L ......................................................................................................... 2-32
2.6.19 ZX130U ........................................................................................................ 2-33
2.6.20 ZX165U ........................................................................................................ 2-34
2.6.21 ZX200S ......................................................................................................... 2-35
2.6.22 ZX200U ........................................................................................................ 2-36
2.6.23 ZX300S ......................................................................................................... 2-37

June 10, 2003 2-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.0 SAFETY

Safety is the most important consideration when using industrial automated and robotic
equipment. All operators, teachers, maintenance, and repair personnel must be aware
of all automated, peripheral, and robotic equipment that occupy the safeguarded space
(refer to section 2.1.1 below), and their associated operational, maintenance, and repair
procedures. For this reason it is recommended that all personnel who operate, teach,
maintain, and repair Kawasaki industrial robots (hereafter referred to as robots), attend
a Kawasaki approved training course that pertains to each employee’s specific job
responsibilities.

The information in this unit is intended to enhance existing safety guidelines that are
provided by municipal, state, or national governments; it does NOT supersede existing
rules, regulations, or guidelines. Because safety is the primary responsibility of the user,
owner, and employer, Kawasaki recommends that specific safety guidelines and recom-
mendations be adopted from safety design and implementation professionals.

All safety issues and descriptions, presented in written or oral form by a representative
of Kawasaki Robotics (USA), Inc., are intended to provide general safety precautions
and procedures. These safety precautions and procedures are NOT intended to provide
all safety measures necessary for the protection of personnel and equipment in the work
environment.

Kawasaki robots are safe for use when all safety guidelines are followed. It is the re-
sponsibility of the end user to follow robot operation safety guidelines for the protection
of personnel and equipment.

2-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.1 TERMINOLOGY

The following terms are used in this safety section and throughout Kawasaki Robotics
(USA), Inc. documentation.

automatic mode Operating mode in which the control system operates in accordance
with the task program.

automatic operation The state in which the robot is executing its programmed task.

continuous path control 1 A type of robot control in which the robot moves according
to a replay of closely spaced points, programmed on a constant time base during teach-
ing. The points are first recorded as the robot is taught along a desired path, and the
position of each axis is recorded by the control unit on a constant time basis by scan-
ning axis encoders during the robot motion. The replay algorithm attempts to duplicate
that motion. 2 Interpolation of a desired path curve between a few taught points.

continuous path system A type of robot movement in which the tool performs the task
while the motion axes are moving. All motion axes may move simultaneously, each at a
different velocity, in order to trace a required path or trajectory.

controller The manipulator power supply and control system. The controller contains
microprocessors; memory for the operating system, programs, and data; operator and
equipment interfaces; communication hardware and software; and servo amplifiers to
drive the manipulator servo motors.

emergency stop The operation of a circuit that overrides all other robot controls, re-
moves drive power, causes all moving parts to stop, and removes power from other
hazardous functions present in the safeguarded space, and does not cause additional
hazards.

enabling device (formerly known as trigger switch or deadman switch) A manually


operated device which, when continuously activated, permits robot motion.

hazard a potential source of harm.

industrial robot An automatically controlled, multipurpose manipulator, programmable


in three or more axes. It may be either fixed in place or mobile for use in industrial
automation applications.

limit switch (also overtravel limit switch) An electrical switch positioned so that when
physical contact with an object occurs, the switch is activated.

June 10, 2003 2-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

manipulator (also known as mechanical unit) a mechanism, usually consisting of a


series of segments or links, jointed or sliding relative to one another, usually in several
degrees of freedom. It is remotely operated using a controller. The term refers to the
mechanical portion of the robot.

operator The person designated to start, monitor, and stop the operation of a robot or
robot system. The operator may also interface with a robot for production purposes.

path The path traced by the tool center point (TCP) during the execution of a task
program.

peripheral equipment The equipment used in conjunction with the robot for a com-
plete robotic system. This equipment includes grippers, dispensers, weld guns, convey-
ors, part positioners, part or material feeders, and any equipment located within the
safeguarded space that is not part of the robot.

pinch point Any point where it is possible for a part of the body to be injured between
the moving or stationary part of a robot and the moving or stationary part of associated
equipment, or between the material and moving part of the robot or associated equip-
ment.

point-to-point control A robot motion control in which the robot is programmed to


move from one position to the next. The intermediate paths between these points can-
not be specified.

point-to-point system Robot movement in which the robot moves to a numerically


defined position and stops, performs an operation, and then moves to another numeri-
cally defined position and stops, and so on.

restricted space (formerly known as work envelope) The space defined by the maxi-
mum reach of the manipulator, including the end-effector and work piece, in all direc-
tions, after a limiting device is actuated.

safeguarded space (formerly known as work cell) The space defined by the perimeter
safeguarding devices.

safeguarding device A device that detects or prevents access to a hazard.

slow speed control A mode of robot motion control where the speed is limited to
250 mm/sec. This allows the teacher to either withdraw from hazardous motion or stop
the robot.

2-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

teach pendant (also multi function panel) A portable hand-held programming device
that interfaces with the robot controller. It contains keys (soft or touch keys), switches
(e.g., emergency stop, enabling device, teach/automatic mode), indicators, and a dis-
play. Used to direct the controller to position the robot, record positional and auxiliary
data information, and interface with auxiliary equipment.

teach programming A method of entering a control program into the robot controller.
The robot is manually moved by an operator using a teach pendant. The teacher
records positions and other data which is saved to the robot controller as the robot is
moved through the desired path.

teacher A person who provides the robot with a set of instructions to perform a task.

June 10, 2003 2-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.1.1 SAFETY INFORMATION CONTACTS

Four recommended sources for national safety laws and regulations are:

1. Occupational Safety and Health Administration (OSHA)

U.S. Department of Labor


Office of Public Affairs
Occupational Safety and Health Administration - Room: 3647
200 Constitution Avenue
Washington, DC 20210
Phone: (202) 693-1999

[Link]

2. Mine Safety and Health Administration (MSHA)

[Link]

3. National Institute for Occupational Safety and Health (NIOSH)

Phone: (800) 35-NIOSH {(800) 356-4674}


Outside the U.S.: (513) 533-8328

[Link]

4. American National Standards Institute (ANSI)

Headquarters

American National Standards Institute


1819 L Street, NW
Washington, DC 20036

Phone: (202) 293-8020


Fax: (202) 293-9287

Customer Service: (212) 642-4980


General Inquiries: (212) 642-4900

[Link]

2-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

To order the Industrial Robots And Robot Systems - Safety Requirements


(ANSI/RIA R15.06-1999):

[Link]

In the “Standards Search/Lookup:” field, enter “robot” to locate


ANSI/RIA R15.06-1999.

Customer Service: (212) 642-4900, or E-mail: storemanager@[Link]

June 10, 2003 2-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.2 WARNING AND CAUTION SYMBOLS

The following symbol and its enclosed text, when presented in Kawasaki Robotics
(USA), Inc. documentation, provides EXTREMELY IMPORTANT personnel safety infor-
mation. The information relates to the text that directly follows the symbol.

! WARNING
Warning symbols indicate processes or procedures that,
if not followed properly, can result in serious injury or
death to personnel.

The following symbol and its enclosed text, when presented in Kawasaki Robotics
(USA), Inc. documentation, provides VERY IMPORTANT equipment protection informa-
tion. The information relates to the text that directly follows the symbol.

! CAUTION
Caution symbols indicate processes or procedures that,
if not followed properly, can result in equipment
damage.

2-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.3 BATTERY USE AND DISPOSAL

Various batteries are used for data backup in the robot mechanical unit and controller. if
not used and disposed of properly these batteries may malfunction, ignite, overheat,
explode corrode, leak, etc. Always use and dispose of all batteries in compliance with
the following warnings and cautions.

! WARNING
1. Only use batteries specified by Kawasaki.

2. Never re-charge, dismantle, convert and/or overheat


batteries.

3. Never dispose of batteries into water or fire.

4. Batteries with damaged cases may short internally


and must not be used.

5. Never short the positive and negative poles of a bat-


tery with material such as wire.

! CAUTION
Never dispose of depleted batteries with garbage that is
disposed of in an incinerator, land-fill, dumping-ground,
etc. When disposing of batteries, insulate with tape so
as not to contact other metal. Comply with local regula-
tions and rules for battery disposal.

June 10, 2003 2-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.4 SAFETY CATEGORIES

Personnel safety is described in one of the following four categories:

• Personal safety

• Safety during operation

• Safety during programming

• Safety during inspection, maintenance, and repair.

Each safety category is described in the following sections.

2.4.1 PERSONAL SAFETY

All applicable safety procedures must be followed consistently and be an integral part of
standard operating procedures.

The following are personal safety guidelines:

• Comply with ALL applicable OSHA, NIOSH, MSHA, local, state, national, and
facility safety specifications and procedures.

• Before operating, teaching, maintaining, or repairing the robot controller or me-


chanical unit, ensure ALL operating, programming, maintenance, and repair proce-
dures are fully understood.

• When performing robot controller or mechanical unit maintenance or repair, do not


wear loose clothing, scarves, wrist watches, rings, or jewelry. It is also recom-
mended that if a necktie is worn, it be a clip-on (NOT tied) type.

• When required by facility safety regulations, ALWAYS wear safety glasses or


goggles, approved safety shoes, hard hats, and other protective equipment.

• Know the ENTIRE safeguarded space, including peripheral devices.

• Know the extent of the ENTIRE mechanical unit restricted space.

• Know the location of ALL emergency stop (E-stop) switches.

• AVOID trap points where personnel can become trapped between moving and
stationary devices.

2-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

• Before initiating robot motion, ensure that ALL personnel are clear of the safe-
guarded space and know how the robot will perform when motion is initiated.

• Before operating the robot, ensure the work area is free of tools, lubricants, clean-
ing equipment, and debris.

• If unsafe working conditions are observed, IMMEDIATELY report them to the super-
visor or facility safety coordinator.

• ALL robot operators must be able to identify, by name and function, ALL switches,
control devices, and signals that initiate robot motion.

• NEVER defeat, render useless, jumper out, or bypass any mechanical or electrical
safety device.

• To ensure personnel safety, ALL safety devices approved for use in the facility must
be properly installed and maintained.

• During robot operation, NEVER attempt to stop or brake the mechanical unit with a
part of your body.

• Use E-stop switches to stop mechanical unit motion in emergency situations ONLY.

• During automatic operation, NEVER enter the safeguarded space.

June 10, 2003 2-11


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.4.2 SAFETY DURING OPERATION

• Before operating the robot, know the boundaries of the restricted space.

• ALWAYS keep the work area clean and free of debris which includes, but is not
limited to, oil, water, tools, and electronic test equipment.

• Because the teach pendant has provisions to protect the operator during teaching
operations, the ONLY person allowed in the safeguarded space is the person oper-
ating the teach pendant. Teach pendant safety provisions include an E-stop switch
and enabling device.

• Before performing teach operations, ALWAYS have a planned retreat path.

• NEVER block the operator’s retreat path.

• AVOID trap points.

2.4.3 SAFETY DURING PROGRAMMING

• Before operating the robot, know the boundaries of the restricted space.

• Because the teach pendant has provisions to protect the operator during teaching
operations, the ONLY person allowed in the safeguarded space is the person oper-
ating the teach pendant. Teach pendant safety provisions include an E-stop switch
and enabling device.

• AVOID trap points.

• Before operating the robot in point-to-point mode, the operator must be COM-
PLETELY clear of the safeguarded space. During point-to-point playback opera-
tions, the robot has information about its present location and the next point to
which it is programmed to move. If an object lies between these two points, the
robot will impact the object.

• Playback accuracy and speed affect path coordinate geometry. When changing
program accuracy or speed, ALWAYS test a program in the point-to-point mode, or
at a slow speed, before performing continuous path operation in the repeat mode.

• For a newly created program, before performing high-speed playback operation in


the repeat mode, ALWAYS run the new program in the point-to-point mode, or at a
slow speed.

2-12 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.4.4 SAFETY DURING INSPECTION, MAINTENANCE AND REPAIR

Before entering the safeguarded space to perform inspection, maintenance, or repair


procedures, set the robot controller main disconnect to OFF and tag and lock it out.

! WARNING
When the robot controller’s main disconnect is set to
OFF, the input side may still be energized. Before per-
forming maintenance on the main disconnect, ALWAYS
set the source disconnect to OFF and tag and lock it
out.

• If an axis is not supported when the servo drive motor is removed, the axis will fall.
The brake assembly is part of the servo drive motor.

• If an axis is not supported and the brake release switch is activated, the axis will fall.

• Before working on pneumatic or high pressure water supplies, turn the supply
pressure off, and purge ALL lines to remove residual pressure.

• Assign ONLY qualified personnel to perform ALL maintenance or repair procedures.

• Before performing maintenance or repair procedures, review ALL available docu-


mentation related to the procedure.

• Use ONLY Kawasaki Robotics (USA), Inc. approved replacement parts.

• Robot controller interlock control circuits are identified with yellow wiring. BEFORE
adjusting or repairing an interlock control circuit device, locate the disconnect sup-
plying power to the device and set it to OFF.

• During inspection, maintenance, or repair procedures, if the system is equipped


with safety fences and safety plugs, REMOVE and HOLD the safety plug while
performing these procedures. In addition to this safety plug procedure, ALL safety
procedures described above must be followed.

June 10, 2003 2-13


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.5 SAFETY FEATURES

To safeguard the user, Kawasaki robot systems are equipped with many safety features,
including the following:

• All E-stops are hard-wired.

• The teach pendant and operation panel are equipped with red mushroom-type E-
stop switches. If an optional interface panel is installed, the operation panel E-stop
switch is relocated to the optional interface panel.

• All robot axes are monitored by the robot controller for velocity and deviation errors.
If an over-velocity or deviation condition is detected, the robot faults in a velocity or
deviation error condition.

• Teach and check mode velocities are limited to a maximum of 250 mm/sec
(9.843 in/sec).

• All robot axes have software limits.

• JT1 is equipped with overtravel limit switches. Optional overtravel limit switches are
available for JT2 and JT3.

• All F-series and Z-series mechanical units have overtravel hardstops on the JT1,
JT2, JT3, and JT5 axes.

• All robot axes are equipped with 24 VDC electromechanical brakes that engage
when power is removed. If the robot loses power unexpectedly, the mechanical unit
arm is held in position by the brakes and does not fall.

2-14 June 10, 2003


IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6 RESTRICTED SPACE DRAWINGS
2.6.1 FC06N/FS06N/FS10C/FW06N
Figure 2-1 FC06N/FS06N/FS10C/FW06N Restricted Space
June 10, 2003 2-15
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.2 FP20N
Figure 2-2 FP20N Restricted Space
2-16 June 10, 2003
Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.6.3 FS02N/FS03N

Figure 2-3 FS02N/FS03N Restricted Space

June 10, 2003 2-17


IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.4 FS06L
Figure 2-4 FS06L Restricted Space
2-18 June 10, 2003
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.5 FS10E
Figure 2-5 FS10E Restricted Space
June 10, 2003 2-19
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.6 FS10L
Figure 2-6 FS10L Restricted Space
2-20 June 10, 2003
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.7 FS10N
Figure 2-7 FS10N Restricted Space
June 10, 2003 2-21
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.8 FS20C
Figure 2-8 FS20C Restricted Space
2-22 June 10, 2003
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.9 FS20N
Figure 2-9 FS20N Restricted Space
June 10, 2003 2-23
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.10 FS30L
Figure 2-10 FS30L Restricted Space
2-24 June 10, 2003
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.11 FS30N/FS45C
Figure 2-11 FS30N/FS45C Restricted Space
June 10, 2003 2-25
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.12 FS45N
Figure 2-12 FS45N Restricted Space
2-26 June 10, 2003
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.13 ZD130
Figure 2-13 ZD130 Restricted Space
June 10, 2003 2-27
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.14 ZD165
Figure 2-14 ZD165 Restricted Space
2-28 June 10, 2003
Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.6.15 ZT130

Figure 2-15 ZT130 Restricted Space

June 10, 2003 2-29


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.6.16 ZT165

Figure 2-16 ZT165 Restricted Space

2-30 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAFETY

2.6.17 ZT200

Figure 2-17 ZT200 Restricted Space

June 10, 2003 2-31


IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.18 ZX130L
Figure 2-18 ZX130L Restricted Space
2-32 June 10, 2003
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.19 ZX130U
Figure 2-19 ZX130U Restricted Space
June 10, 2003 2-33
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.20 ZX165U
Figure 2-20 ZX165U Restricted Space
2-34 June 10, 2003
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.21 ZX200S
Figure 2-21 ZX200S Restricted Space
June 10, 2003 2-35
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.22 ZX200U
Figure 2-22 ZX200U Restricted Space
2-36 June 10, 2003
IGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENC
Kawasak D SERIES CONTROLLER
AS LANGUAGE REFERENCE MANUAL
SAFETY
2.6.23 ZX300S
Figure 2-23 ZX300S Restricted Space
June 10, 2003 2-37
Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

3.0 AS SYSTEM ................................................................................................... 3-2


3.1 AS System Status ........................................................................................... 3-2
3.2 AS System Switches....................................................................................... 3-2
3.3 AS System Set-Up .......................................................................................... 3-4
3.4 Input/Output Control ....................................................................................... 3-6
3.4.1 Terminal Control .............................................................................................. 3-6
3.4.2 External Memory Devices ............................................................................... 3-7
3.5 Terminal Software Installation ......................................................................... 3-8
3.6 Operations From a Personal Computer .......................................................... 3-9
3.6.1 System Start-Up ............................................................................................. 3-9
[Link] Connecting to the RS-232C Port .................................................................... 3-9
[Link] Connecting to the Ethernet Port ................................................................... 3-12
3.6.2 Data Save/Load ............................................................................................ 3-16
2.6.3 System Shut-Down ....................................................................................... 3-17
3.6.4 KRterm Functions ......................................................................................... 3-19
[Link] Creating Log Files......................................................................................... 3-19
[Link] Macro Functions ........................................................................................... 3-21

June 10, 2003 3-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

3.0 AS SYSTEM

AS Language for the C controller is a software based control system and high-level
language used to interface with the robot controller and control robot motion. The AS
software is permanently stored in the robot controller’s memory and is activated as soon
as controller power is set ON. It continuously generates robot control commands and
can simultaneously interact with a programmer, permitting on-line program generation
and modification. The teach pendant and/or a personal computer is used to access AS
Language.

3.1 AS SYSTEM STATUS

The AS system consists of the monitor mode, the editor mode, and the playback mode.

• Monitor Mode: This is the default mode in the AS system. Monitor commands are
executed in this mode. The editor or playback modes are accessed from this mode.

• Editor Mode: This mode enables the user to create a new program or modify an
existing program. Only editor commands are accepted by the system in this mode.

• Playback Mode: The system is in the playback mode during program execution.
Computations for robot motion control are performed and commands entered from
the terminal are processed during unoccupied CPU time. Some monitor commands
cannot be executed in playback mode. Refer to unit 4, Monitor and Editor Com-
mands for details.

3.2 AS SYSTEM SWITCHES

The AS system is controlled by the system switches described in table 3-1. For detailed
information on system switches refer to unit 8, System Switches.

3-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

Table 3-1 System Switches

System Switch Description


CP Enables/disables continuous path (CP) function.
[Link] Enables/disables EXECUTE, DO, STEP, MSTEP and CONTINUE commands
in HOLD.
[Link] Stops cycle with external HOLD.
MESSAGES Enables/disables message display.
[Link] Changes timing of blockstep program output signals.
[Link] Changes timing of AS Language program output signals.
QTOOL Enables/disables tool transformation.
RPS Enables/disables random program selection (RPS).
SCREEN Controls terminal display scrolling.
REP_ONCE Sets repeat mode to repeat once or repeat continuous.
STP_ONCE Sets repeat mode to step once or step continuous.
[Link] Enables automatic PC program star t at controller power-up.
[Link] Executes the selected PC program when an error occurs.
TRIGGER Displays the TRIGGER switch status (ON/OFF).
CS Displays the CYCLE START status (ON/OFF).
POWER Displays the MOTOR POWER status (ON/OFF).
RGSO Displays the SERVO POWER status (ON/OFF).
TEACH_LOCK Displays the TEACH LOCK switch status (ON/OFF).
ERROR Displays program error status (Error/No Error).
REPEAT Displays the TEACH/REPEAT switch status.
RUN Displays the HOLD/RUN switch status.
DISPIO_01 Changes the I/O status display (0 and 1 or X and O).
[Link] Enables display of the current step when the program is in HOLD (option).
WS_COMPOFF Changes weld schedule (WS) signal timing (option).
FLOWRATE Changes between FLOWRATE and SPEED OUTPUT mode (option).
[Link] Changes signal processing for weld schedule (WS) 0 (option).
[Link] Enables/disables absolute speed (option).
SLOW_START Enables/disables slow star t function (option).
[Link] Changes the star t timing of blockstep program timers (option).

June 10, 2003 3-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

3.3 AS SYSTEM SET-UP

The following system settings are set during system set-up, using the monitor com-
mands as described below.

1. Zeroing (ZZERO command)


ZZERO command is used to set the encoder value to correspond to the robot’s
mechanical zero position (zero position scribe marks aligned). When a servo motor
is replaced or maintenance is performed on an encoder, the encoder rotational
count value must be reset using this command. (This command is for maintenance
purposes only.)

2. Clamp setting (HSETCLAMP command)


These settings are preset at the factory. The settings, single or double and output
specification (ON when closed or OFF when closed), can be changed using
HSETCLAMP command. These changes only affect the software. Ensure the
hardware used is compatible with the settings.

3. Maximum number of input and output signals (ZSIGSPEC command)


ZSIGSPEC command sets the maximum number of input and output signals that
can be used. ZSIGSPEC is preset at the factory to a default setting that is used as
a software error check. Ensure the hardware used is compatible with the settings.

4. Software Dedicated Signals (DEFSIG command)


In addition to the hardware dedicated signals, there are I/O signals in the software
that are used as dedicated signals (software dedicated signals). The number of I/O
signals in the software is the sum of software dedicated signals and general pur-
pose signals, the number of general purpose signal decreases as more software
dedicated signals are used (Table 3-2).

3-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

Table 3-2 Dedicated I/O signals

Software Dedicated Input Signal Software Dedicated Output Signal


EXT. MOTOR ON MOTOR_ON
EXT. ERROR RESET ERROR
EXT. CYCLE START AUTOMATIC
EXT. PROGRAM RESET CYCLE START
Ext. prog. select (JUMP_ON, TEACH MODE
JUMP_OFF RPS_ON, RPSxx)
EXT_IT HOME1, HOME2
EXT. SLOW REPEAT MODE POWER ON
RGSO

June 10, 2003 3-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

3.4 INPUT/OUTPUT CONTROL

3.4.1 TERMINAL CONTROL

Data and commands input at a terminal are first received by the system buffer. Then
they are read by the monitor or program and echoed or displayed on the terminal
screen. The maximum number of characters that can be input at a terminal is 128, and
additional characters input are ignored.

Output of data to a terminal is controlled using the PRINT and TYPE instructions. Eight
bits are displayed on the terminal screen. Data is displayed with a new line starting after
each command unless formatting is specified using specification code “/S” with the
PRINT/TYPE instruction (refer to section 7.8, Message Control Instructions, for detailed
information).

Terminal input and output can be controlled using the commands shown in table 3-3.
These commands are called the terminal control commands. The Ctrl (Control) Key is
pressed with each alphabetical character (the character may be either lower or upper-
case letters). Unlike other AS commands, there is no need to press the ENTER key
after these commands.

Table 3-3 Terminal Control Commands

Command Function
Ctrl+S Stops display terminal scrolling.
Ctrl+Q Resumes display terminal scrolling stopped by Ctrl+S.
Ctrl+C Cancels the current input line.
Ctrl+H Deletes the last character entered (backspace).
Ctrl+M Terminates the current input line (return).
Ctrl+L Enables the contents of the line previously entered to display on the current input
line. Can be used up to seven times to recover previously entered data (last).
Ctrl+N Used in conjunction with the Ctrl+L command. Ctrl+N changes the contents of the
current input line to the next line in the history of command inputs after the Ctrl+L
command is used. Ctrl+N is only available if Ctrl+L is used more than once (next).
Backspace Deletes the last character entered.
Ctrl+I or Tab Inser ts a blank space into the current input line.

3-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

3.4.2 EXTERNAL MEMORY DEVICES

The commands described in table 3-4 are used to save programs, variables, and pose
information in the robot memory, PC card, floppy disk, or computer hard disk.

Table 3-4 Data Control Commands

Command PC Card Function Floppy Disk Function


CARD_FORMAT, FD_FORMAT Formats the PC card. Formats the floppy disk.
CARD_FDIR, FD_DIR Displays the files on the PC Displays the files on the floppy
card. disk.
SAVE1, CARD_SAVE, FD_SAVE Saves data from controller Saves data from controller
memory to the PC card. memory to the floppy disk.
LOAD1, CARD_LOAD, FD_LOAD Loads data from the PC card Loads data from the floppy
into controller memory. disk into controller memory.
DELETE, CARD_FDEL, FD_FDEL Deletes files from the PC card. Deletes files from the floppy
disk.
1. This command is only available if a personal computer is connected.

For more information on data control commands refer to sections 5.2, Program and Data
Control Commands, and 5.3, Program and Data Storage Commands.

June 10, 2003 3-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

3.5 TERMINAL SOFTWARE INSTALLATION

The robot can be controlled from a personal computer using AS Language. KCwin32 or
KRterm terminal software must be loaded to the PC and the PC connected to the D-
series controller. KCwin32 and KRterm may be installed on computers running Win-
dows 95/98/Me/2000/XP.

Connecting the computer and the controller using the RS-232C cable enables a single
computer to control a single robot. An Ethernet connection enables multiple computers
to control multiple robots. Terminal software KCwin and KCwin32 can also be used by
connecting to the RS-232C port.

To install the terminal software follow the procedure below.

1. Install the software to your hard disk. Copy the following files from the KRterm
floppy disk to any directory of the computer hard disk.

[Link]
[Link] (Japanese version help file)
[Link] (English version help file)
[Link]

2. It is recommended that a shortcut is made on the desktop or in the start menu for
easier start-up of the KRterm software.

3-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

3.6 OPERATIONS FROM A PERSONAL COMPUTER

3.6.1 SYSTEM START-UP

[Link] CONNECTING TO THE RS-232C PORT

1. Ensure the control power for the controller and the computer power are set to OFF.

2. Connect the personal computer to the controller using an RS-232C interface cable
(Figure 3-1).

ON OFF
PC with RS-232C Port
CHECK INTER CANCEL
MENU TEACH
T. LOCK
SPEED A
SELECT
PROG
EXT AXIS
STEP (Robot)
S
GO
CHECK JOG
S BACK
CONT
1
— X +
INS DEL
2
O. WRITE
— Y +
AUX POS
MOD REC MOD 3
— Z +
CL1 CL2 CLn
4
— rx +
SPD ACC TMR TOOL
7 D 8 E 9 F BS 5
— ry +
?
OX WX
4 A 5 B 6 C CLEAR
WS CC


6
+
PCMCIA
rz
ON OFF CLAUX WRK

1 2 3 C —
7
+
, - J/E

0 . I
6037-1200

CONTROL MOTOR CYCLE


POWER POWER START

TEACH REPEAT

ERROR
ERROR
RESET HOLD RUN RS-232C

FDD

(OPTION)

RS-232-C

Figure 3-1 RS-232C Connection

June 10, 2003 3-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

3. Set the computer power to ON, and start the terminal software (KRterm or
KCwin32, KRterm is shown in the following example screens).

4. When the software opens, select the type of connection from the menu bar:
[Communication (C)]–[Connect Parameter (O)] (Figure 3-2).

kawasaki Robot Terminal KRterm–[C¥PROGRAM FILES¥KRTERM¥]


FILE(F) EDIT(E) Communication(C) VIEW(V) HELP(H)
COM1 9600 8 1 NONE
Connect History( C )
Select Connect( E )
Disconnect( D )
Connect Parameter( 0 )

Figure 3-2 Setting KRterm Connection Type

5. Click the “Serial” tab, check the settings, if the settings are correct, click <OK> (refer
to figure 3-3 for settings).

If the settings are not correct, change the settings as shown in figure 3-3 and click
<OK>.

SET CONNECTION
Serial ETHERNET

COM Options

Port : COM1
Baud Rate : 9600
Data Bits : 8
Stop Bits : 1

Parity Bits : NONE

OK CANCEL

Figure 3-3 Setting KRterm Com Options

3-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

6. Set the control power for the controller to ON.


Refer to the D Series Controller Operations and Programming Manual section 4,
Power ON/OFF Procedures, for more information on setting the controller power to
ON.

7. The initial KRterm screen followed by a prompt “>” is displayed.

When the control power for the controller is set to ON before connecting the PC to
the controller, only the prompt “>” is displayed and not the initial screen. In this case
KRterm still works the same.

June 10, 2003 3-11


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

[Link] CONNECTING TO THE ETHERNET PORT

Ethernet communication (1KN board) is an option that must be purchased and installed
prior to connection and set up.

1. Ensure the control power for the controller and the computer power are set to OFF.

2. Using a LAN cable (cross-cable) connect the personal computer’s Ethernet port to
the controller’s Ethernet port on the 1KN daughter board, mounted to the 1KA
board in the controller card rack (Figure 3-4).

Controller Card Rack ON OFF

(Inside the Controller)


CHECK INTER CANCEL
MENU TEACH
T. LOCK
SPEED A
SELECT
PROG
EXT AXIS
STEP (Robot)
S
GO
CHECK JOG
S BACK
CONT
1
— X +
INS DEL
2
O. WRITE
— Y +
AUX POS
MOD REC MOD 3
— Z +
CL1 CL2 CLn
4
— rx +
SPD ACC TMR TOOL
7 D 8 E 9 F BS 5
— ry +
OX WX WS CC
?
4 A 5 B 6 C CLEAR 6
— rz +
ON OFF CLAUX WRK

1 2 3 C —
7
+
, - J/E

0 . I
6037-1200

CONTROL MOTOR CYCLE


POWER POWER START

TEACH REPEAT

ERROR
ERROR HOLD RUN
RESET

Personal Computer

1KA Board 1KN Daughter Board

Figure 3-4 Ethernet Connection

3-12 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

3. Start KRterm and set the controller control power to ON.

4. When the software opens, select the type of connection from the menu bar:
[Communication (C)]–[Connect Parameter (O)] (Figure 3-5).

kawasaki Robot Terminal KRterm–[C¥PROGRAM FILES¥KRTERM¥]


FILE(F) EDIT(E) Communication(C) VIEW(V) HELP(H)
COM1 9600 8 1 NONE
Connect History( C )
Select Connect( E )
Disconnect( D )
Connect Parameter( 0 )

Figure 3-5 Setting KRterm Connection Type

5. Click the Ethernet tab and enter the IP address and name of the robot to connect to
the network, and click <ADD>. (Figure 3-6)

SET CONNECTION
Serial ETHERNET

IP ADDRESS NAME
[Link] robot 3 ADD
[Link] : robot1
[Link] : robot2
[Link] : robot3 INSERT

CHANGE

DELETE

OK CANCEL

Figure 3-6 Ethernet IP Address Setting

June 10, 2003 3-13


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

6. Select [Communication(C)]–[[Link](C)] from the menu bar. The most


recently connected robot is displayed at the top of the drop-down menu. To select
the robot, click the robot name from the drop-down menu, (Figure 3-7).

kawasaki Robot Terminal KRterm–[C¥PROGRAM FILES¥KRTERM¥]


FILE(F) EDIT(E) Communication(C) VIEW(V) HELP(H)
COM1 9600 8 1 NONE
Connect History( C ) [Link] : robot1
Select Connect( E ) COM1 9600 8 1 NONE
Disconnect( D ) [Link] : robot2
Connect Parameter( 0 ) [Link] : robot3

Figure 3-7 Selecting the Robot from the Connect History (C) Drop-Down Menu

7. If the robot address is not displayed in the Connect History (C) drop-down menu,
select [Communication (C)]–[Connect (E)] from the menu bar (Figure 3-8).

kawasaki Robot Terminal KRterm–[C¥PROGRAM FILES¥KRTERM¥]


FILE(F) EDIT(E) Communication(C) VIEW(V) HELP(H)
COM1 9600 8 1 NONE
Connect History( C )
Select Connect( E )
Disconnect( D )
Connect Parameter( 0 )

Figure 3-8 Selecting the Select Connect (E) Screen

3-14 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

8. Select the robot from the select connection screen and click <CONNECT> (Figure
3-9).

SELECT CONNECTION

SELECT CONNECTION

COM1 9600 8 1 NONE


[Link] : robot1
[Link] : robot2
[Link] : robot3

CONNECT CANCEL

Figure 3-9 Selecting the Robot from the Select Connect (E) Screen

9. When the connection is established, the robot name followed by a prompt ”>” is
displayed on the KRterm screen. AS Language commands are entered at the
prompt.

June 10, 2003 3-15


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

3.6.2 DATA SAVE/LOAD

1. SAVE command:

To save the data to the computer hard drive, use the SAVE command (see section
6.3, Program and Data Storage Commands, SAVE command).

Example:

>SAVE [Link] This saves the data in the same directory as


the KRterm in the computer hard disk.

>SAVE [Link]\my documents This saves the data in the specified file.

2. LOAD command:

To load data from the computer to the robot memory, use the LOAD command (see
section 6.3, Program and Data Storage Commands, LOAD command).

Example:

>LOAD [Link]

3-16 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

2.6.3 SYSTEM SHUT-DOWN

Use the following procedure for system shut-down:

1. Select [Communication(C)]–[Disconnect(D)] from the menu bar to disconnect the


robot (Figure 3-10).

kawasaki Robot Terminal KRterm–[[Link]:robot1]–[C¥PROGRAM FILES¥KRTERM¥]


FILE(F) EDIT(E) Communication(C) VIEW(V) HELP(H)
[Link] : robot1
Connect History( C )
Select Connect( E )
Disconnect( D )
Connect Parameter( 0 )

Figure 3-10 KRterm Disconnect

2. Set the HOLD/RUN switch (on the controller) to HOLD.

3. Press the EMERGENCY STOP switch (on the controller) to set the motor power to
OFF.

4. Set the controller control power to OFF. Refer to the D Series Controller Operations
and Programming Manual unit 4, Power ON/OFF Procedures, for more information
on setting the controller power to OFF.

5. To shut-down KRterm, select [FILE(F)]–[END(X)], from the menu bar (Figure 3-11).

kawasaki Robot Terminal KRterm–[[Link]:robot1]–[C¥PROGRAM FILES¥KRTERM¥]


FILE(F) EDIT(E) Communication(C) VIEW(V) HELP(H)
OPEN LOG FILE( 0 )
CLOSE LOG FILE( C )
SET CURRENT DIRECTORY( S )
MACRO( M )

END( X )

Figure 3-11 KRterm Shut-Down

June 10, 2003 3-17


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

6. Click <YES> at the KRterm shut-down confirmation screen (Figure 3-12).

KRterm Close

! OK to close window

YES NO

Figure 3-12 KRterm Shut-Down Confirmation Screen

7. Shut-down the computer. If there is no need to keep the computer connected to the
controller, ensure the controller and the computer power are set to OFF and discon-
nect the interface cable.

3-18 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

3.6.4 KRTERM FUNCTIONS

[Link] CREATING LOG FILES

The data displayed on the KRterm screen can be saved as a log file. This is useful to
printout robot operation procedures.

1. To start logging, select [FILE(F)]–[OPEN LOG FILE(O)] from the menu bar (Figure
3-13).

kawasaki Robot Terminal KRterm–[C¥PROGRAM FILES¥KRTERM¥]


FILE(F) EDIT(E) Communication(C) VIEW(V) HELP(H)
OPEN LOG FILE( 0 )
CLOSE LOG FILE( C )
SET CURRENT DIRECTORY( S )
MACRO( M )

END( X )

Figure 3-13 Selecting Log File from the Menu Bar

2. Select the folder to save the log file to, and name the file (Figure 3-14).

LOG FILE OPEN ?

File in: KRterm

File name: [Link] OPEN

Files of type: *.log CANCEL

Figure 3-14 Selecting Log File Folder and File Name

June 10, 2003 3-19


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

3. During file logging, [Logging Now] is displayed in the title bar (Figure 3-15). The
data displayed on the screen is recorded until the log file is closed.

kawasaki Robot Terminal KRterm–[C¥PROGRAM FILES¥KRTERM¥]–[Logging Now]


FILE(F) EDIT(E) Communication(C) VIEW(V) HELP(H)

Figure 3-15 Saving the Log File

4. To close the log file and end the file logging, select [FILE(F)]–[CLOSE LOG
FILE(C)], from the menu bar (Figure 3-16).

kawasaki Robot Terminal KRterm–[C¥PROGRAM FILES¥KRTERM¥]–[Logging Now]


FILE(F) EDIT(E) Communication(C) VIEW(V) HELP(H)
OPEN LOG FILE( O )
CLOSE LOG FILE( C )
SET CURRENT DIRECTORY( S )
MACRO( M )

END( X )

Figure 3-16 Closing the Log File

3-20 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

AS SYSTEM

[Link] MACRO FUNCTIONS

Macro functions are provided in the KRterm and KCwin32 system. If a task is executed
repeatedly, recording the series of instructions/commands for that task in a macro can
be very useful and increase efficiency.

To record a macro, select [FILE (F)]–[MACRO (M)] from the menu bar and enter the file
name to save the macro. To run a macro, use the SEND command on the KRterm
screen.

Select [HELP(H)] from the KRterm or KCwin32 menu bar for detailed instructions.

June 10, 2003 3-21


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.0 VARIABLES AND EXPRESSIONS ............................................................... 4-2


4.1 Notations and Convections ............................................................................. 4-2
4.2 Pose Data, Numeric Data, Character String Data .......................................... 4-5
4.2.1 Pose Data ....................................................................................................... 4-5
[Link] Defining Transformation Pose Values ............................................................. 4-9
4.2.2 Numeric Data ................................................................................................ 4-10
4.2.3 Character String Data ................................................................................... 4-12
4.3 Variables ....................................................................................................... 4-12
4.3.1 Global Variables ............................................................................................ 4-12
4.3.2 Local Variables .............................................................................................. 4-13
4.4 Variable Names ............................................................................................ 4-14
4.5 Defining Pose Variables ................................................................................ 4-15
4.5.1 Defining Pose Variables Using Monitor Commands...................................... 4-15
4.5.2 Defining Pose Variables Using Program Instructions .................................... 4-18
4.5.3 Defining Compound Transformation (Relative Transformation) Values ......... 4-19
4.6 Defining Real Variables ................................................................................. 4-24
4.7 Defining Character String Variables .............................................................. 4-26
4.8 Arrays ........................................................................................................... 4-27
4.9 Numeric Expressions .................................................................................... 4-28
4.10 Operators ...................................................................................................... 4-28
4.11 Order of Operations ...................................................................................... 4-30
4.12 Logical Expressions ...................................................................................... 4-31
4.13 String Expressions ........................................................................................ 4-32

June 10, 2003 4-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.0 VARIABLES AND EXPRESSIONS

This section describes the variables and data expressions used with AS Language.

4.1 NOTATIONS AND CONVECTIONS

Uppercase and lowercase letters:

The following rules apply to the usage of upper and the lowercase letters in this manual.

• All AS keywords (commands, instructions, etc.) are shown in uppercase.

• Variables and any other items that can be specified are shown in lowercase.

• Upper and the lowercase letters can be used when entering data at an AS terminal.

Keys and switches:

• The keys on the teach pendant or the computer keyboard and the switches on the
controller are shown as the name or label appears on the switch or key.

Example: RUN/HOLD, Backspace

Abbreviations:

• Keywords can be abbreviated. For example, the EXECUTE command is abbrevi-


ated as EX. See Appendix, section A.1, AS Language Keyword List.

Space, Tab:

• At least one blank space or tab is necessary as a delimiter between the command
(or instruction) and the parameter. Also, a space or tab is necessary between
those parameters not divided by commas or other delimiters. Excess spaces or
tabs are ignored by the system.

Example: SPEED 50

4-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

NOTE
A parameter is necessary data to complete commands
or other functions.

For example, with the SPEED command, parameter


data is needed to specify the robot speed. When the
command or function uses several parameters, a
comma or a space separates each parameter.

ENTER key:

• Monitor commands and program instructions are processed by pressing the ENTER
key. In this manual, the ENTER key is shown as ↵ .

Omitted Parameters:

• Many monitor commands and program instructions have parameters that can be
omitted. If there is a comma after these optional parameters, the comma should be
retained even if the parameter is omitted. If all successive parameters are omitted,
the comma may also be omitted.

Numeric values:

• expressions can be used to designate values as arguments. The acceptable values


are restricted.

The following rules show how the values are interpreted in various cases.

Distance:

• Used to define the length the robot moves between two points. The unit for distance
is millimeter (mm); the unit is omitted. The values can be negative or positive.

Angles:

• Defines and modifies the robot’s posture at the specified pose, and describes the
degrees of rotation of the robot joints. The values can be negative or positive, with
the maximum angles limited to 180 degrees or 360 degrees, depending on the
commands used.

June 10, 2003 4-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

Scalar variables:

• Unless noted otherwise, these variables define real values. The values for the
variables can range from -3.4E+38 to 3.4E+38 (-3.4×1038 ~ 3.4+1038). When it
exceeds ±999999, it is expressed as xE+y (x is the mantissa, y is an exponent).

Joint number:

• Expresses the joints of the robot in integers from 1 to the number of joints available
(6 joints is the standard). The joints are numbered in order starting from the base
joint. (Expressed as JT1, JT2 ....).

Signal number:

• Identifies binary (ON/OFF) signals (negative signal numbers indicate the OFF
state). The values are given as integers and the ranges are shown in table 4-1.

Table 4-1 Robot Signal Value Ranges

Signal Standard Range Maximum Range


External output 1–32 1–96
External input 1001–1032 1001–1096
Internal 2001–2256 2001–2256

Keywords:

• Variable names are freely assigned in the AS system, with the exception of key-
words. Keywords, such as commands and instructions in the AS system, are re-
served and cannot be used to name pose data (location data) or variable data.

4-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.2 POSE DATA, NUMERIC DATA, CHARACTER STRING DATA

There are three types of data in the AS system: pose data, numeric data, and character
data.

4.2.1 POSE DATA

NOTE
In accordance with the international standards organiza-
tion (ISO) location and posture of the robot are referred
to as pose.

Pose data (positional data) is used to specify the position and posture of the robot in a
given work area. The robot’s position and posture refers to the position and posture of
the tool center point (TCP) of the robot. The position and posture together are called
the pose of a robot.

The pose is determined by the robot location and which way it is facing, therefore; when
a robot is instructed to move, these two things are done at the same time:

1. Robot’s TCP moves to the specified position.


2. Robot’s tool coordinates rotate to the specified posture.

The pose data is described by a set of joint displacement values or by a transformation


value:

Joint displacement values:

This pose data is given by a set of angular or linear displacement values from each
of the robot axes. Using encoder values, rotational axes produce angular displace-
ment described in degrees, and linear axes produce linear displacement described
in millimeters.

Example:

The joints are expressed in order from JT1 to JT6, and the displacement value of
each joint, in degrees, is shown beneath the joint number.
JT1 JT2 JT3 JT4 JT5 JT6
#pose = 0.00, 33.00, -15.00, 0, -40, 30

June 10, 2003 4-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

Transformation value:

Defines a pose of coordinates in relation to reference coordinates. Unless other-


wise specified, it refers to the transformation values of the tool coordinates relative
to the base coordinates of a robot (Figure 4-1). The position is given by the XYZ
values of the base coordinates, and the posture in OAT angles.

Some of the commonly used transformation values are:

The tool transformation value, describing the pose of the tool coordinates relative to
the null tool coordinates, and work based transformation values, defining the pose
of the tool coordinates relative to the work coordinates (Figure 4-1).

Example:

X Y Z O A T
pose = 0, 1434, 300, 0, 0, 0

If the robot has more than six axes, the value of the additional axis is shown with the
transformation values.

Example:

X Y Z O A T JT7
pose = 0, 1434, 300, 0, 0, 0 1000

4-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

Tool Transformation Values


zt1
zt
xt1
Null Tool Coordinates1
Tool Coordinates
xt

yt1
yt
Work-Based
Transformation Values
Transformation Values
zw
Base Coordinates
zb1
yw

xw
Work Coordinates
yb1
xb1 zb Work Transformation Values

Base Transformation
Values yb
xb
Null Base Coordinates2

Note1 Null tool coordinates origin are at the center of the robot’s tool mounting flange,
and they are defined by the tool transformation values (0, 0, 0, 0, 0, 0).

Note2 Null base coordinates are set at the robot’s default value, and are defined by the base
transformation values (0, 0, 0, 0, 0, 0)

Figure 4-1 Transformation Values

June 10, 2003 4-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

Joint location values and transformation location values have advantages and disadvan-
tages as described in table 4-2. Use the information in table 4-2 to determine the type
of location value to fit a particular need.

Table 4-2 Joint Value and Transformation Value Comparison

Location Data Advantages Disadvantages Usage


Joint values Playback precision is TCP changes when the Setting the star t pose of
achieved and there is no tool is changed (null tool a program.
ambiguity about the robot coordinates remain the Setting the robot
configuration at a pose. same). configuration at or just
Cannot use relative before a pose defined by
coordinates (work transformation values.
coordinates). Used for other common
poses.
Transformation The tool coordinates origin Coordinates change Defining relative
values used in repeat mode does according to base or tool coordinates such as
not change even if the tool transformation values. An work coordinates.
is changed (null tool understanding of the effect Defining a pose that is
coordinates shift). of any change is needed changed using numeric
Can use relative for safe usage of values with functions
coordinates (work transformations values. such as SHIFT.
coordinates). Robot configuration may Defining a pose that is
Convenient for processing change if it is not set changed by sensor data.
as the data is shown in X, before repeat mode
Y, Z, O, A, T values. movement.

4-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

[Link] DEFINING TRANSFORMATION POSE VALUES

When a pose is defined by joint values, the robot configuration is exactly as recorded in
teach mode. When a pose is defined using a transformation value the robot may take
different configurations to achieve the location as taught in teach mode. This is because
transformation values only set the XYZOAT values of the tool coordinates of the robot
and do not define the axis value of each joint.

Before running a robot motion program in repeat mode, set the robot configuration using
a configuration command UWRIST, DWRIST, LEFTY, RIGHTY, ABOVE, BELOW.

A joint value pose may be used to set the configuration of the robot at a point near
where the transformation locations are used.

Transformation values are defined by the base coordinates, if the base coordinates are
shifted using the BASE command/instruction, the robot’s TCP is shifted by the same
amount. This is one of the advantages of using transformation values.

The operator must be aware of the effect changing the base coordinates has on trans-
formation location values. The same precautions must be taken when the TOOL com-
mand/instruction is used. Failure to account for BASE or TOOL command/instruction
changes may cause damage to the robot or peripheral equipment.

June 10, 2003 4-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.2.2 NUMERIC DATA

In the AS system, numeric values and expressions are used as numeric data. A nu-
meric expression is a value expressed using numerals and variables combined with
operators and functions. Numeric expressions are used not only for mathematical
calculations, but also as parameters for monitor commands and program instructions.

For example the DRIVE command, specifies three parameters: joint number, degree,
and speed. The parameters are expressed either in numeric values or in expressions.

Example:

DRIVE 3,45,75 Moves joint number 3 by 45° at the speed of 75%

DRIVE joint, (start+30)/2, 75 With the variables specified as: joint=2, start=30 then
joint 2 moves +30° at 75% speed

Numeric values used in the AS system are divided into the four types:

1. Real numbers:
Real numbers have both integer and fractional parts. Real numbers can be positive
or negative values between -3.4 E+38 and 3.4 E+38(-3.4´1038 and 3.4´1038) or zero.
Real numbers can be represented in scientific notation. The symbol E separates
the mantissa and the exponent. The exponent may be negative (power of 1/10) or
positive (power of 10).

Example:

8.5E3 8.5*103 (+ in the exponent is omitted)


6.64 6.64*100 (E, 0 is omitted)
-9E-5 -9.0*10-5 (decimal point is omitted)
-377 -377*100 (decimal point, E, 0 are omitted)

Real values are stored with an accuracy of approximately seven digits, actual values
may have less precision because of calculation procedures.

4-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

2. Integers:

Integers are real values without fractional parts (whole numbers). The range is from
-16,777,216 to +16,777,215. Values that exceed this range are rounded to seven
significant digits. Integer values are usually entered as decimal notation although
there are times when it is convenient to use binary or hexadecimal notation. ^B
indicates the number is in binary notation. ^H indicates the number is in hexadeci-
mal notation.

Example:

^B101 (5 decimal)
^HC1 (193 decimal)
-^B1000 (-8 decimal)
-^H1000 (-4096 decimal)

3. Logical values:

Logical values have only two states, ON and OFF, or TRUE and FALSE. A value of
-1.0 is assigned for the TRUE or ON state, and a value of 0 (or 0.0) is assigned for
the FALSE or OFF state.

ON, OFF, TRUE and FALSE are AS language keywords.

Example:

Logical true = TRUE, ON, -1.0


Logical false = FALSE, OFF, 0.0

4. ASCII values:

An ASCII value is the numeric value of an ASCII character. An ASCII value is


specified by an apostrophe (‘).

Example:

X = ‘A Stores a value of 65 (the ASCII value of upper case A) in variable X.


X = ‘a Stores a value of 97 (the ASCII value of lower case a) in variable X.

June 10, 2003 4-11


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.2.3 CHARACTER STRING DATA

The character data referred to in the AS system is defined as a string of ASCII charac-
ters enclosed by quotation marks (“). Since the quotation marks indicate the beginning
and end of a character string, they cannot be included in the string. ASCII control char-
acters (CTRL, CR, LF, etc.) also cannot be included in the string.

A command for printing (displaying on the screen) is entered as shown in the example
below.

Example:

>PRINT “Kawasaki”

4.3 VARIABLES

In the AS system, names are assigned to pose data, numeric data, and character data.
These names are called variables, and the variables are divided into two types: global
variables and local variables. Unless otherwise noted, global variables are referred to
as variables.

4.3.1 GLOBAL VARIABLES

Variables for pose data, numeric data, and character data are called pose variable, real
variable, and string variable, respectively. Several values can be grouped and defined
under one name using an array variable.

NOTE
Since most numeric values used in the AS system are
real numbers, numeric variables are referred to as real
number variables or real variables.

Integers, logical values, and ASCII values are all ex-


pressed using real number values and may also be re-
ferred to as real variables.

Once a variable is defined, the value is saved in the memory and can be used in any
program.

4-12 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.3.2 LOCAL VARIABLES

Unlike global variables, local variables are redefined each time the program is executed,
and are not saved in the memory. A local variable name is defined with a “.” (period) at
the beginning of the name.

Local variables are useful when several programs use the same variable name and the
value of the variable changes each time the program is run. Local variables are also
used as a parameter of a subroutine (refer to section [Link] Subroutine with Param-
eters).

Local variables cannot be defined using monitor commands.

Since local variables are not saved in the memory, the value of the local variable .pose
cannot be displayed using the POINT command.

Example:

POINT .pose Does not display the value of .pose

To see the current value of the local variable, set its value to a global variable in the
program where the local variable is defined, and then use the POINT command.

Example:

Execute the program that defines the local variable before using the POINT command.

>POINT a=.pose
>POINT a
X[mm] Y[mm] Z[mm] O[deg] A[deg] T[deg]
xxxxxxx xxxxxxx xxxxxxx xxxxxxx xxxxxxx xxxxxxx
Change? (If not, hit RETURN only)
>

June 10, 2003 4-13


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.4 VARIABLE NAMES

Variable names must start with an alphabetic character and can contain only letters,
numbers, periods, and underlines. The letters used in variable names can be entered
either in lowercase or uppercase. The length of a name is limited to fifteen characters.

AS Language commands should not be used as variable names and in some cases use
as a variable name is prohibited, because they cause ambiguity with the AS system
keywords; however, their abbreviations can be used. For example, the following names
cannot be used:

3P (first character is not alphabetic)


part#2 (“#” prefix for precision location name)
random (AS keyword)

Precision location names must be preceded by the symbol “#” to differentiate them from
transformation location names. String variables must be preceded by the symbol “$” to
differentiate them from real and transformation variables.

pick (transformation or real variable value)


#pick (precision value)
$count (string variable)

A transformation location and precision location may have the same name, however, the
same name may not be used for transformation values and real values. A defined
variable may be used by any program in the system.

All types of variables can be used as array variables. Arrays consist of several values
under the same name and these values are distinguished from each other by their index
value. In order to designate array elements, attach an element number (index) enclosed
by brackets to the array name. For example, “part[7]” indicates the seventh element of
the array “part”. Indexes should be integers within the range 0 to 9999.

Location, real, string, and array are four types of variables within the AS system. These
four variable types are explained in the following sections.

4-14 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.5 DEFINING POSE VARIABLES

A location variable (precision or transformation) is automatically defined when a value is


assigned for the first time. Prior to this, the location name is undefined. If a program
uses an undefined variable, an error occurs. The operator defines location variables by
using monitor commands or program instructions.

Advantages of pose variables:

1. The same pose data can be used repeatedly without having to teach the pose every
time.

2. A defined pose variable may be used in different programs.

3. A defined pose variable can be used or changed to define a different pose.

4. Calculated values can be used as pose data instead of time consuming process of
teaching poses using the teach pendant.

5. Pose variables are named by the operator, the names can be used to make pro-
grams more understandable.

4.5.1 DEFINING POSE VARIABLES USING MONITOR COMMANDS

1. The HERE command stores the robot’s current pose data with the specified name.

Example 1:

For joint values, begin the variable name with a pound sign (#) to differentiate it from
transformation values. When the command is entered, the joint displacement val-
ues of the current pose are displayed and stored in memory.

>HERE #pose

JT1 JT2 JT3 JT4 JT5 JT6


90.000° 145.056° -95.098° 90.000° 45.000° 0.000°
Change? (If not, hit RETURN only)
>

June 10, 2003 4-15


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

Example 2:

For transformation values, use the HERE command as shown below. The transfor-
mation values of the current pose is displayed and stored in memory.

>HERE pose
X Y Z O A T
60.000 mm 145.050 mm -95.098 mm 90.000° 45.000° 0.000
Change? (If not, hit RETURN only)
>

2. The TEACH command is used with the teach pendant to store a series of poses.
The robot is moved to each pose in the program and recorded as described below.

Move the robot to the first pose, enter TEACH and the variable name, and press the
ENTER key . The pose is recorded as the specified pose variable name, and the
name is issued a number (an element of an array) counting up from 0, unless other-
wise specified (i.e. pt1, pt2, pt3, ... or x[1],x[2],x[3], ... ).

Example 1:

For joint values, use the TEACH command as shown below.

>TEACH #pt1 ; jog the robot to the pose using the teach
pendant and press the REC key.

Each time the REC key is pressed the current pose is recorded as a joint value
location. Each new pose is assigned the same name and the index number
incremented, as shown below.

#pt2
#pt3
#pt4
:

Example 2:

For transformation values, use the same procedure as above, only omit the pound
sign (#) from the pose variable name.

4-16 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

3. The POINT command is used to define a pose using another defined pose variable
or to define it by data entered from the terminal.

Example 1: Using joint values.

To use joint values to define a new variable, use the POINT command as shown
below.

>POINT #pose
JT1 JT2 JT3 JT4 JT5 JT6
0.000 0.000 0.000 0.000 0.000 0.000
Change ? (If not, hit RETURN only)
>
Enter the new values, separating each value with a comma.
xxx, xxx, xxx, xxx, xxx, xxx

To change the value of a defined variable, use the POINT command as shown
below.

>POINT #pose
JT1 JT2 JT3 JT4 JT5 JT6
10.000 20.000 30.000 40.000 50.000 40.000
Change ? (If not, hit RETURN only)
>
Enter the values to change.
30, , , ,20, ;changes the value of JT1 and JT 5 to 30 and 20

To substitute the value of a defined variable, use the POINT command as shown
below.

>POINT pose_1=pose_2
JT1 JT2 JT3 JT4 JT5 JT6
10.000 20.000 30.000 40.000 50.000 40.000
Change ? (If not, hit RETURN only)

The value to define as pose_1 (the current value of pose_2) is displayed. Press the
ENTER key to set the values as they are or change the values as shown in the
above examples.

June 10, 2003 4-17


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

NOTE
When a pose variable name starting with a pound sign
(#) is used, the variable is stored as a joint value (i.e.
#pick, #start).

When a pose variable has no prefix and starts with any


alphabetical character, the variable is stored as a trans-
formation value (i.e., pick, start).

Example 2:

For transformation values, use the same procedure as above, only omit the pound
sign (#) from the pose variable name.

4.5.2 DEFINING POSE VARIABLES USING PROGRAM INSTRUCTIONS

1. The HERE instruction stores the robot’s current pose with the specified name.

Example:

HERE pose

2. The POINT instruction substitutes a pose variable with the values from a previously
defined pose.

Example:

POINT pose_1=pose_2

Values of “pose _1” are substituted with the values of the defined variable “pose_2”.
An error occurs if “pose _2” is not defined.

4-18 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.5.3 DEFINING COMPOUND TRANSFORMATION (RELATIVE TRANSFORMATION)


VALUES

Compound transformations are defined by a combination of transformation poses, used


to create a pose or poses that are relative to the first transformation value in the com-
pound transformation (Figure 4-3).

transformation value+transformation value....

The last component of the compound transformation value, defines the actual pose.

If the transformations are subtracted an inverse value results.

transformation - transformation

This is useful when several poses are defined relative to a reference location.

To change the pose points defined relative to a reference pose, only the transformation
pose of the reference must be updated. All poses defined relative to the reference point
are automatically changed.

Unlike usual addition or subtraction, the commutative law does apply to the transforma-
tion operation. The compound expression “loc.a + loc.b” does not necessarily equal
“loc.b + loc.a” because the turning angles O,A,T are taken into consideration. An ex-
ample of this is shown in figure 4-2.

a1 = (1000, 0, 0, 0, 0, 0)
a2 = ( 0, 1000, 0, 60, 0, 0)
x1
a1+a2 = (1000, 1000, 0, 60, 0, 0) y1
a2+a1 = ( 500, 1866, 0, 60, 0, 0) 1,866 mm a2+a1
X
in
m
m

Y
00

60°
10

a2
1,000 mm a1+a2
a2
1,000 mm

a1

1,000 mm X 500 mm

Figure 4-2 Transformation + Transformation

June 10, 2003 4-19


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

For example, “Plate” is the name of the transformation pose representing the pose of a
base plate relative to the origin of the base coordinate system of the robot. “Object” is
the relative transformation for the pose of an object relative to the pose of the plate.

The compound transformation “Plate+Object” defines the pose of the object relative to
the origin of the base coordinate system of the robot.

If the transformation location “Pickup” represents the final pose relative to


“Plate+Object”, the compound transformation “Plate+Object+Pickup” defines the pose of
pickup relative to the origin of the base coordinate system (Figure 4-3).

Plate+Object+Pickup
Pickup
Base Coordinate Origin
Object

Plate Plate+Object

Figure 4-3 Compound Transformation

To define the compound transformations as shown in figure 4-3, use the following proce-
dure.

1. Move the robot to the pose Plate and enter the command: HERE Plate.

>HERE Plate

2. Move the robot to the pose Object and enter the command: HERE Plate+Object.

>HERE Plate+Object

3. Move the robot to the pose Pickup and enter the command: HERE
Plate+Object+Pickup.

>HERE Plate+Object+Pickup

4-20 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

As described in the preceding example, a compound transformation is defined by a


combination of several transformation values separated by the plus sign (+).

Ensure that spaces are not entered between the plus sign (+) and the transformation
values. The operator may combine as many transformation values as needed.

If the robot is to pick up an object at the pose “Pickup”, defined relative to the pose
“Object”, the program line is written as shown in the example below.

Example:

JMOVE Plate+Object+Pickup
or
LMOVE Plate+Object+Pickup

NOTE
Do not change the order of the transformation expres-
sion. If the transformation variable ”b” is defined relative
to the transformation variable “a”, “a+b” provides the ex-
pected result, but “b+a” does not (Figure 4-2).

The pose data for “Object” and “Pickup”, in the preced-


ing example, are defined in relation to other pose data.
Because of the relativity of the defined transformations
do not use motion commands such as “JMOVE Object”
or “LMOVE Pickup”, unless the affect on the program is
certain.

June 10, 2003 4-21


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

When using compound transformations repeatedly, use the POINT command to lessen
the time to calculate the compound transformation values. For example, to approach
the pose “Pickup” and then to move to that pose, to save calculation time enter the
program lines as shown in the second example below.

Example 1:

JAPPRO Plate+Object+Pickup, 100 ;approach 100 mm above “pickup”


JMOVE Plate+Object+Pickup ;move in linear motion to “pickup”

If the program lines shown example 2 are entered in place of the program lines shown in
example 2, calculation time is saved.

Example 2:

POINT x = plate+object+pickup ;calculate the target pose


JAPPRO x, 100 ;approach 100 mm above the target
LMOVE x ;move in linear motion to the target

These two programs result in the same motion, but the latter calculates the compound
transformation only once, so the execution time is shorter when the POINT command is
used. In simple programs, the difference is minor, but in more complex programs it may
make a big difference and improve overall cycle time.

4-22 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

NOTE
For seven axes robots

When using the POINT command, the value of JT7


must be considered.

Example:

POINT p=p1+p2

The value of JT7 assigned to “p” is the value of JT7 at


“p2”. The value of the right-most variable on the right
side of the expression is assigned to the variable on the
left side of the equal sign (=).

To assign a specific value to JT7 use the variation of the


POINT command “POINT/7”.

Example:

POINT/7 p=TRANS(,,,,,,value)

The above command assigns “value” to the pose value


of JT7 in the variable “p”.

June 10, 2003 4-23


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.6 DEFINING REAL VARIABLES

Real variables are defined by using the assignment instruction (=). The format for as-
signing a real variable is:

Real_variable_ name = numeric_value

Example:

a=10.5
count=i*2+8
Z[2]=Z[1]+5.2

The variable on the left side may be either a scalar variable (i.e., count) or an array
element (i.e., x[2]). A variable is defined only when a value is assigned to it. It remains
undefined until a value is assigned, and if a program using an undefined variable is
executed, an error occurs.

The numeric value on the right side may be a constant, a variable or a numeric expres-
sion. When the assignment instruction is processed, the value on the right side of the
assignment instruction is computed first, and then the value is assigned to the variable
on the left side.

If the variable on the left side of the instruction is a new variable and is not assigned a
value, the value on the right is assigned to the variable automatically. If the left side
variable is already defined, the new value replaces the current value.

For example, the instruction “x=3” assigns the value 3 to the variable “x”. It is read,
“assign 3 to x” and not “x is equal to 3”. The following example illustrates the processing
order.

Example:

x=x+1

4-24 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

If this example is a math equation, it is read “x is equal to x plus 1”, which does not
make sense. As an assignment instruction, it is read, “assign the value of x plus 1 to x”.
In this case, the sum of the current value “x” and 1 is calculated and then the resulting
value is assigned to “x” as a new value. Such an equation requires that x be defined in
advance, as shown in the example below.

Example:

x=3
x=x+1

In this example, the resulting value of “x” is 4.

June 10, 2003 4-25


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.7 DEFINING CHARACTER STRING VARIABLES

For a definition of character string data refer to section 4.2.3.

Character string variables are defined using the assignment instruction (=). The format
for assigning a character string variable is:

$string_variable=string_value

Example:

$a1=$a2
$error mess[2]=”time over”

The string variable on the left can be a variable (i.e., $name), or an array element (i.e.,
$line[2]). A variable is defined only when a value is assigned to it. It remains undefined
until a value is assigned, and if a program using an undefined variable is executed, an
error occurs.

The character string on the right side may be a string constant, a string variable or a
string expression. When an assignment instruction is processed, the value on the right
side is computed first, and then the value is assigned to the variable on the left side.

Example 1:

$name = “Kawasaki Robotics (USA), Inc.”

Example 2:

$First = “Kawasaki”
$Last = “Robotics”
$Name = $First+Last+”(USA), Inc.”

In the example 1, the string enclosed in quotation marks (“”) is assigned to the variable
“$name”. If the variable on the left side of the instruction is not defined, this string is
assigned automatically. If the left side variable is already defined, this instruction re-
places the current string with the new string on the right side.

In example 2, the sum of “$First”, “$Last”, and the character string “(USA), Inc.” is as-
signed to the string variable “$Name”. The command PRINT $Name or TYPE $Name
returns the string value:

Kawasaki Robotics (USA), Inc.

4-26 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.8 ARRAYS

An array is a group of values that share a single name. Location variables can be sca-
lars or arrays. A location scalar is a single location value. Each value in an array is
called an element of the array. An element of a location array is specified in exactly the
same way as an element of a numeric array by appending an index enclosed in brackets
to the array name. For example, “part[7]” refers to element 7 of the array “part.” Indexes
must be integers in the range of 0 ~ 9999. Three examples of arrays are described
below:

Example 1:

PROGRAM OUTPUT

HERE edge edge[1]=120.456


DECOMPOSE edge[1]=edge edge[2]=145.670
FOR i=1 to 6 edge[3]=-95.432
TYPE “edge[“I1,i,”]=“,/D,edge[i] edge[4]=90.456
END edge[5]=45.000
edge[6]=10.018

In the above example, the current location of the robot is defined as “edge”. The DE-
COMPOSE instruction extracts component values of edge (XYZOAT) consecutively (1
through 6). The program instructions between the FOR and END statements are ex-
ecuted repeatedly and the TYPE instruction displays the component values of edge
individually.

Example 2:

FOR i = 2 to 6 STEP 2
DRAW 100, 10 * i + 7, 50
HERE weld[i]
END

In the above example, the robot moves 100 mm in the X direction, a calculated amount
(10 * i + 7) mm in the Y direction, and 50 mm in the Z direction, and defines the location
as weld[i].

The FOR statement, in this example, increments the value of “i” in increments of two:
i = 2, i = 4, i = 6.

June 10, 2003 4-27


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

Example 3:

PROGRAM SUBPROGRAM OUTPUT

Main() Pg10() Corner 1


$POINT[1]=”Corner1” FOR i=1to3 edge
$POINT[2]=”edge” JMOVE weld[i] Corner2
$POINT[3]=”Corner2” TYPE$POINT[i]
CALL pg10 END

In the above example, the array is used as a string array. Each move of the robot dis-
plays the strings assigned in the main program.

4.9 NUMERIC EXPRESSIONS

Numeric expressions consist of numerals, variables, specific functions or other numeric


expressions combined with operators. All numeric expressions evaluated by the AS
system result in a real number value. Numeric expressions can be used anywhere in
place of numeric values. They can be used as parameters in monitor commands and
program instructions, or as array indexes.

The interpretation of the value depends on the context in which the expression appears.
For example, an expression specified for an array index is interpreted as yielding an
integer value. An expression specified for a logical value is interpreted as false when it
is evaluated as 0, and true if it is other than 0.

4.10 OPERATORS

For describing expressions, arithmetic, logical, and binary, operators are provided. All,
except three, of these operators combine two values to obtain a single resulting value;
the exceptions are: the two operators (NOT and COM) operate on a single value and
the operator (-) operates on one or two values. The operators are described in table 4-
3.

4-28 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

Table 4-3 Operators

Operator Type Operator Description


Arithmetic + Addition
- Subtraction or Negation
* Multiplication
/ Division
^ Power (if ab, a<0 results in error)
x= (-2)^2 results in an error
x= -2^2 assigns -4 to x
MOD Remainder
x=5 MOD 2 assigns the remainder of 5/2 (1 in this case) to x
Relational < Less than
<=, (=<) Less than or equal to
== Equal to
<> Not equal to
>=, (=>) Greater than or equal to
> Greater than
Logical AND Logical AND
NOT Logical complement
OR Logical OR
XOR Exclusive logical OR
Binary BAND Binary AND
BOR Binary OR
BXOR Binary Exclusive OR
COM Complement

The logical operators are used in Boolean operations such as logical OR (0+1=1,
1+1=1, 0+0=0), logical AND (0x1=0, 1x1=1, 0x0=0), and logical XOR (0+1=1, 1+1=0,
0+0=0). The logical operators are not used for calculating numeric values, but for deter-
mining the logical state (TRUE or FALSE) of the conditional expression. If a numeric
value is zero (0), it is considered to be FALSE (0). All nonzero values are considered to
be TRUE(-1).

Example:

OPERATION RESULT

0 AND 0 0 (FALSE)
1 AND 1 -1 (TRUE)
1 OR 0 -1 (TRUE)

June 10, 2003 4-29


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

Binary Operators:

OPERATION RESULT

BAND Binary AND


BOR Binary OR
BXOR Binary XOR
COM Binary Complement

The binary logical operators perform logical operations for each respective bit of two
numeric values.

Example:

OPERATION RESULT

5 BOR 3 7
0101 BOR 0011 0111
5 BAND 9 1
0101 BAND 1001 0001

4.11 ORDER OF OPERATIONS

Expressions are evaluated according to a sequence of priorities. Parentheses can be


used to group the components of an expression and to control the order in which the
operations are performed. When expressions containing parentheses are evaluated, the
expression within the innermost pair is evaluated first, then the system works toward the
outermost pair. Within parentheses, expressions are evaluated in the following order:

1. Evaluate functions and arrays.


2. Process relational operators concerning character strings
3. Process power operator “ ^ ”.
4. Process unary operators “ - ” (negation), NOT, COM.
5. Process multiplication “ * ” and division “ / ” operators from left to right.
6. Calculate remainders (MOD operators) from left to right.
7. Process addition “ + ” and subtraction “ - ” operators from left to right.
8. Process relational operators from left to right.
9. Process BAND operators from left to right.
10. Process BOR operators from left to right.
11. Process BXOR operators from left to right.
12. Process AND operators from left to right.
13. Process OR operators from left to right.
14. Process XOR operators from left to right.

4-30 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.12 LOGICAL EXPRESSIONS

The logical expressions result in a logical value TRUE or FALSE. A logical expression
can be used as a condition in which the execution of a program or program steps is
performed. When evaluating logical expressions, the value zero is considered FALSE
and all nonzero values are considered TRUE. Therefore, all real values or real value
expressions can be used as a logical value.

For example, the following two statements have the same meaning, but the second
statement is easier to understand.

IF x GOTO 10 (If the value of x is true, goto label 10 in the program)

IF x <> 0 GOTO 10 (If the value of x is not equal to 0, goto label 10 in the program)

June 10, 2003 4-31


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

VARIABLES AND EXPRESSIONS

4.13 STRING EXPRESSIONS

String expressions consist of character strings, string variables, specific functions or


other string expressions combined together with operators. The string operators are
described in table 4-4.

Table 4-4 String Operators

Operator Type Operator Description


String + Combine
Relational < Less than
<=, (=<) Less than or equal to
== Equal to
<> Not equal to
>=, (=>) Greater than or equal to
> Greater than

The result of using string operators is a string, and the result of using relational opera-
tors is a real value.

When using relational operators with character strings, the strings are compared char-
acter for character from the first character string. If all the characters are the same, the
two strings is considered equal, but if there is even one difference, the string with the
character having a higher ASCII character code is evaluated as the greater string. If
one of the strings is shorter, the shorter one is evaluated as less. In relational opera-
tions with strings, spaces and tabs are regarded as characters.

Examples:

“AA” < “AB”


“BASIC” == “BASIC”
“PEN.” > “PEN”
“DESK” < “DESKS”

NOTE
Uppercase and lowercase letters in string expressions
are regarded as different characters.

4-32 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5.0 PROGRAMS .................................................................................................. 5-2


5.1 Types of AS Language Programs .................................................................. 5-2
5.1.1 Robot Motion Control Program ...................................................................... 5-2
5.1.2 PC Program ................................................................................................... 5-2
5.1.3 Autostart ........................................................................................................ 5-3
5.2 Creating and Editing AS Language Programs ............................................... 5-4
5.2.1 AS Language Program Format ...................................................................... 5-4
5.2.2 Editor Commands .......................................................................................... 5-5
5.2.3 AS Language Programming Flow .................................................................. 5-6
5.2.4 Creating AS Language Programs .................................................................. 5-7
[Link] Example Program .......................................................................................... 5-7
5.3 AS Language Program Execution ................................................................ 5-10
5.3.1 Robot Control Program Execution ............................................................... 5-10
[Link] EXECUTE Monitor Command ..................................................................... 5-10
[Link] PRIME Monitor Command ........................................................................... 5-11
[Link] STEP Command .......................................................................................... 5-12
[Link] CHECK Keys ............................................................................................... 5-12
[Link] Stopping a Robot Control Program .............................................................. 5-13
[Link] Resuming Robot Control Program Execution .............................................. 5-14
5.3.2 PC Program Execution ................................................................................ 5-15
5.3.3 Program Execution Flow .............................................................................. 5-15
5.3.4 Subroutine ................................................................................................... 5-15
[Link] Subroutine with Parameters ......................................................................... 5-16
5.3.5 Asynchronous Process (Interruption)........................................................... 5-17
5.3.6 Robot Motion Instructions ............................................................................ 5-17
[Link] Continuous Path (CP) Motion ...................................................................... 5-19
[Link] CP Motion Break .......................................................................................... 5-20
5.3.7 Current Robot Motion and Current Step Relation ........................................ 5-22
5.3.8 CP Switch and Accuracy, Accel, and Decel Instructions Relation ............... 5-24
[Link] CP ON, Standard Motion Type ..................................................................... 5-24
[Link] CP ON, Type 2 Motion ................................................................................. 5-27
[Link] Specified Path Motion .................................................................................. 5-32
[Link] CP OFF ........................................................................................................ 5-32
5.3.9 Setting Load Mass/Load Center Point ......................................................... 5-33

June 10, 2003 5-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5.0 PROGRAMS

This unit describes the procedures used to create and execute AS Language programs.
Robot motion control and process control (PC) programs are described.

5.1 TYPES OF AS LANGUAGE PROGRAMS

A program is a series of instructions used to control robot movement, send output sig-
nals, make calculations, etc. per a set process. An AS Language program name con-
sists of no more than 15 characters starting with an alphabetical character, and can
contain only letters, numbers and periods. The number of programs is limited to the
amount of free memory in the controller. Programs are usually created using the AS
system editor mode, but programs may also be created off-line, using KRterm or
KCwin32 terminal software or PC-ROSET, and loaded to the robot memory.

5.1.1 ROBOT MOTION CONTROL PROGRAM

Robot control programs are programs used to control robot motion. All program instruc-
tions including robot motion instructions are used to create this program.

5.1.2 PC PROGRAM

PC or process control programs are programs executed simultaneously with the robot
motion control program. PC programs are commonly used to control or monitor external
devices by monitoring external I/O signals. The PC program and the robot motion con-
trol program communicate with each other using common variables and internal signals.

PC programs and robot motion control programs use common instructions. A PC pro-
gram can be executed as a robot control program although PC programs cannot include
motion instruction. Instructions that cause robot motion, except for the BRAKE instruc-
tion, cannot be used. BASE and TOOL functions are not available for PC programs.

5-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5.1.3 AUTOSTART

A PC program can be set to start automatically when the control power is turned on.

1. Turn ON the system switch [Link] (or [Link] –


[Link]).

2. Create the program you want to start automatically and name it [Link] (or
[Link] – [Link]).

Some monitor commands can be executed in a program using the MC program


instruction. Refer to section 7.9, MC Program Instruction, for more information.

Example:

MC CONTINUE

In the following example autostart program, the robot monitors motor power and
executes program pg1 when the controller power is set to ON. For clarity, safety check
procedures are omitted, in actual program usage ensure safety check procedures are
included.

Example:

[Link]( )
1 WAIT SWITCH (POWER) ;waits for the MOTOR POWER ON
2 WAIT SIG(27) ;checks if the robot is at home position
3 MC EXECUTE pg1 ;executes pg1 (robot motion program)

NOTE
Set the home position and assign the dedicated signal
HOME1 to signal 27 before executing this program.

June 10, 2003 5-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5.2 CREATING AND EDITING AS LANGUAGE PROGRAMS

A program is a list of procedures that the robot follows. This section describes creating
a simple program to instruct the robot to perform a task. When executing a program
through the AS system, program steps (lines) are processed in order from top to bottom
and the operations defined in each step are preformed by the robot.

5.2.1 AS LANGUAGE PROGRAM FORMAT

Each line (step) of an AS Language program is expressed in the following format.

step number label program instruction ;comment

1. Step number:

A step number is automatically assigned to each line of a program. Steps are


numbered consecutively beginning with 1 and are automatically renumbered when
lines are inserted or deleted.

2. Label:

Labels are used in a program to branch the program. Labels are used to name a
branch destination from anywhere within the program. A label can be an integer
from 1 to 9999 or a string of up to 15 alphanumeric characters, periods or under-
scores. Alphanumeric labels must begin with an alphabetical character and end
with a colon. Labels are inserted at the beginning of a program line, after the step
number.

3. Comment:

A semicolon (;) indicates all information to the right of the semicolon is a comment.
Comments are not processed as program instructions when the program is ex-
ecuted, and are only used as explanations of the program contents. A program line
may contain a comment only, with no label or instruction. Blank lines can be used
to improve program legibility (A blank line consists of at least one space or tab after
a semicolon).

5-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5.2.2 EDITOR COMMANDS

The editor commands are used to create and edit programs.

Table 5-1 lists and describes the editor commands. For more information on editor
commands refer to section 6.1.

The parameters in italic can be omitted. A space is required when an argument is used.

Table 5-1 Editor Commands

Command Format Description


EDIT ED program name, step Opens the AS editor mode.
CHANGE C program name, step Changes to another program to edit.
ENTER ENTER key Advances to the next program step without changing the
current step.
DELETE D number of steps Deletes program step(s).
EXIT E Exits the AS editor mode.
FIND F character string Searches for and displays the defined character string.
INSERT I Step inser t mode.
LAST L Displays the previous step.
MODIFY M/existing characters/ Replaces existing characters with new characters in a
new characters step.
ONELINE O Places the cursor on the current line for editing.
PRINT P step count Displays the specified number of program steps.
REPLACE R character string Replaces a character string in a step.
STEP S step number Selects a program step.
XD (Cut) XD number of steps Cuts the selected step(s) and stores them in the clipboard.
XY (Copy) XY number of steps Copies the selected step(s) and stores them in the
clipboard.
XP (Paste) XP Pastes the contents of the clipboard.
XQ (Paste XQ Pastes the contents of the clipboard in reverse order.
reverse)
XS (Display XS Displays the contents of the clipboard.
Clipboard)
TEACH T Allows teaching motion instructions from editor mode.

June 10, 2003 5-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5.2.3 AS LANGUAGE PROGRAMMING FLOW

Figure 5-1 describes the process for creating AS Language programs.

Preparation:
1. Plan robot operation steps
2. Confirm robot operation steps
3. Set controller and teach pendant for teach mode

1. Enter AS editor mode - ED (EDIT)


Modify program 2. Enter planned program steps
3. Exit AS editor mode - E (EXIT)

Teach program poses (locations) (TEACH/ HERE) Re-teach poses (locations)

Step through program in check mode

No Program steps correct?


Yes

Program poses (locations) correct? No


Yes
Set controller and teach pendant for repeat mode
Set repeat speed to slow speed (10%–20%)
Run program (EXECUTE)

No Program steps correct?


Yes
Program poses (locations) correct? No
Yes
Gradually increase speed to production speed

No Program steps correct?

Yes
Program poses (locations) correct? No
Yes
Run program in production

Figure 5-1 AS Language Programming Flow Chart

5-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5.2.4 CREATING AS LANGUAGE PROGRAMS

The major components of an AS Language program are:

1. Robot operating conditions.

2. Robot poses/path.

[Link] EXAMPLE PROGRAM

This section describes the procedure for creating a simple AS Language program (Fig-
ure 5-2).

The first step in creating an AS Language program is to define the robot motions
needed to complete the task. The sample program step numbers correspond with the
numbers in figure 5-2.

1., 2. 9.
5. 6.

3., 4. 7., 8.
part

#part #box

Figure 5-2 Sample Program diagram

1. Ensure the handling clamp is open.

2. Move the open handling clamp to a pose 50 mm above the part, at pose “#part”.

3. Move straight down to the part, at pose “#part”.

4. Close the handling clamp to grasp the part.

June 10, 2003 5-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5. Move straight up to a pose 150 mm above the pose “#part”.

6. Move to a pose 200 mm above the pose ” #box”.

7. Move to the pose “#box”.

8. Open the handling clamp to release the part.

9. Move straight up to a pose 180 mm above the pose “#box”.

Define the pose variables “#box” and “#part” as described in section 4.5.1.

Enter the AS Language program instructions through the AS editor as described in the
following procedure.

1. To create a program with the name “demo”, select the keyboard screen, enter “ED
demo” and press the ENTER key on the keyboard touch screen, as shown
below.

>ED demo
.PROGRAM demo ()
1?

2. At “1 ?” enter the first program instruction, as shown below.

>ED demo
.PROGRAM demo ()
1? OPENI
2?

3. At “2 ?” enter the next program instruction, as shown below.

>ED demo
.PROGRAM demo ()
1? OPENI
2 ? JAPPRO #part, 50
3?

4. Enter the remaining instructions needed to complete the program, in the same
manner as above, to match the sample program “demo” steps shown in figure 5-3.

If a spelling or syntax error is detected when a step is entered, an error message is


displayed and the step is not accepted. Ensure the correct spelling and syntax is
used and re-enter the step correctly.

5-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

>ED demo
.PROGRAM demo ()
1? OPENI
2? JAPPRO #part,50
3? LMOVE #part
4? CLOSEI
5? LDEPART 150
6? JAPPRO #box,200
7? LMOVE #box
8? OPENI
9? LDEPART 180
10? E
>

Figure 5-3 Sample Program

The “E” in step 10 is not a program instruction, it is an editor command used to exit the
AS editor mode.

When an AS Language program is executed, the steps are executed in sequential order.

For more information on AS Language programing refer to unit 12, Sample Programs.

June 10, 2003 5-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5.3 AS LANGUAGE PROGRAM EXECUTION

Robot control programs and PC programs are executed differently. The following sec-
tions describes robot control and PC program execution.

5.3.1 ROBOT CONTROL PROGRAM EXECUTION

Use the following procedure to set the controller to repeat mode to execute a robot
control program.

1. Set the TEACH/REPEAT switch to the REPEAT position.

2. Set the TEACH LOCK switch to the OFF position.

3. Press the MOTOR POWER switch.

4. Set the HOLD/RUN switch to the RUN position.

[Link] EXECUTE MONITOR COMMAND

The procedure described below is used to run a robot control program with the EX-
ECUTE monitor command.

1. Set the controller to repeat mode as described in section 5.3.1.

2. Set the monitor speed to 10%. Enter the SPEED monitor command at the keyboard
prompt as shown below.

>SPEED 10

Press the ENTER key on the keyboard or the teach pendant keypad.

3. Enter the EXECUTE command at the keyboard prompt as shown below.

>EXECUTE demo

Press the ENTER key on the keyboard or the teach pendant keypad.

4. If the robot does not move as expected, set the HOLD/RUN switch to the HOLD
position (the robot decelerates and stops). If an emergency condition exists, press
the EMERGENCY STOP switch on the teach pendant or the controller operation
panel (the brakes are applied and the robot stops immediately).

5-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5. If the robot program executes correctly at 10% speed, gradually increase the speed.

>SPEED 30

Press the ENTER key on the keyboard or the teach pendant keypad. The robot
operates at 30% speed.

>SPEED 80

Press the ENTER key on the keyboard or the teach pendant keypad. The robot
operates at 80% speed.

Once the EXECUTE command is used to execute a program the first time, the CYCLE
START switch can be used re-start the program.

To execute a program more than once, enter the EXECUTE command as shown below.

>EXECUTE demo,5 (executes the program 5 times)

>EXECUTE demo,-1 (executes the program continuously)

[Link] PRIME MONITOR COMMAND

The procedure described below is used to run a robot control program with the PRIME
monitor command.

1. Set the controller to repeat mode as described in section 5.3.1.

2. Set the monitor speed to 10%. Enter the SPEED monitor command at the keyboard
prompt as shown below.

>SPEED 10

Press the ENTER key on the keyboard or the teach pendant keypad.

3. Enter the PRIME command at the keyboard prompt as shown below.

>PRIME demo

Press the ENTER key on the keyboard or the teach pendant keypad.

4. The program is primed and can be executed using the CYCLE START switch or the
EXECUTE or CONTINUE command.

June 10, 2003 5-11


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

[Link] STEP COMMAND

To check the program one step at a time using the STEP command, use the procedure
described below.

1. Set the controller to repeat mode as described in section 5.3.1.

2. Set the monitor speed to 10%. Enter the SPEED monitor command at the keyboard
prompt as shown below.

>SPEED 10

Press the ENTER key on the keyboard or the teach pendant keypad.

3. Enter the PRIME command at the keyboard prompt as shown below.

>PRIME demo

Press the ENTER key on the keyboard or the teach pendant keypad.

4. With the program primed each time the STEP command is entered, the current step
of the robot program is executed. Enter the STEP command as shown below.

>STEP

Press the ENTER key on the keyboard or the teach pendant keypad.

[Link] CHECK KEYS

To check the program one step at a time using the CHECK keys, use the procedure
described below.

1. Prime the program to check using the procedure in section [Link], steps 2 and 3.

2. Set the TEACH/REPEAT switch to the TEACH position.

3. Set the TEACH LOCK switch to the ON position.

4. Press and hold one of the enabling devices on the teach pendant.

5. Set the HOLD/RUN switch to the RUN position.

6. Press the MOTOR POWER switch.

5-12 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

7. Press and hold the CHECK GO key to check forward in the program or press and
hold the CHECK BACK key to check backward.

When the robot reaches the pose in the program step the robot stops. Release the
CHECK GO or CHECK BACK key. Press and hold the CHECK GO or CHECK
BACK key again to move to the next pose in the program.

[Link] STOPPING A ROBOT CONTROL PROGRAM

The following methods for stopping a robot control program are listed in order from the
most urgent to the least urgent.

1. EMERGENCY STOP switch:

In an emergency situation press the EMERGENCY STOP switch on the controller


operation panel or the teach pendant. This applies the brakes and the robot stops
immediately. This places extreme stress loads on the robot and is used in emer-
gency situations only. To stop the robot in a non-emergency situation use method 2
or 3.

2. HOLD/RUN switch:

Set the HOLD/RUN switch, on the controller operation panel, to the HOLD position.
This allows the robot to decelerate and stop.

3. ABORT/HOLD monitor commands:

Enter the ABORT or HOLD command at the keyboard prompt as shown below.

>ABORT

Press the ENTER key on the keyboard or the teach pendant keypad.

>HOLD

Press the ENTER key on the keyboard or the teach pendant keypad.

June 10, 2003 5-13


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

[Link] RESUMING ROBOT CONTROL PROGRAM EXECUTION

The method used to resume robot control program execution depends on what method
was used to stop the program.

The following methods are used to resume execution when the robot is stopped using
the methods described in section [Link], or due to an error condition.

1. EMERGENCY STOP switch:

Rotate the EMERGENCY STOP switch clockwise to release the lock and press the
MOTOR POWER switch. With motor power ON press the CYCLE START switch to
resume robot control program execution.

2. HOLD/RUN switch:

Set the HOLD/RUN switch to the RUN position to resume robot control program
execution.

3. ABORT/HOLD monitor command or an error condition:

Enter the CONTINUE command at the keyboard prompt, as shown below. If the
robot control program was stopped due to an error condition, reset the error before
entering the CONTINUE command.

>CONTINUE

Press the ENTER key on the keyboard or the teach pendant keypad.

5-14 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5.3.2 PC PROGRAM EXECUTION

PC programs are executed using the PCEXECUTE monitor command or using a pro-
gram instruction executed in a robot control program.

The PCABORT command is used to stop execution of the PC program. The PCEND
command is used to end PC program execution after the current cycle is completed.

The PCCONTINUE command is used to resume PC program execution suspended by


the PCABORT command or an error condition. If the PC program was stopped due to
an error condition, reset the error before entering the PCCONTINUE command.

5.3.3 PROGRAM EXECUTION FLOW

Program instructions are executed in order from the top to the bottom of a program.
This consecutive flow is changed when an instruction such as GOTO or IF....GOTO is
executed.

A CALL instruction calls and executes a different program, but this does not change the
order of the flow. When a RETURN instruction is executed, the processing returns to
the caller program and resumes execution at the step following the CALL instruction.

The WAIT instruction stops the program from proceeding to the next step until the speci-
fied condition is met. The PAUSE and HALT instructions stop a program at the step the
instruction is executed.

The STOP instruction may not stop the execution in all cases. If specified execution
cycles are remaining, execution continues with the first step in the main program. Even
if the STOP instruction is executed in a subroutine, the execution returns to the begin-
ning of the main program. If there are no cycles remaining, the execution stops at the
step where the STOP instruction was executed.

5.3.4 SUBROUTINE

A main program can be temporarily suspended and a different program, called the
subroutine, can be called and executed. Using subroutines, the operator/programmer is
able to use a modular program structure that is easier to follow and understand.

June 10, 2003 5-15


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

[Link] SUBROUTINE WITH PARAMETERS

Subroutines can be used with parameters for more versatility. For example, when a
calculation that uses different input data is used repetitively, create a subroutine to make
the calculation. Use the CALL instruction to branch to the subroutine, and use the input
data as parameters in the calculation (see examples 1 and 2 below).

Up to 25 parameters can be set using real variables, pose variables or string variables.
The variable type must be the same in the main program and the subroutine. When
assigning a parameter name to transformation values an, ampersand “&” is used pre-
ceding the parameter variable name in order to differentiate from a real number variable.
Use local variables (local variable is preceded with a period “.”) in the CALL destination
program (subroutine).

Example 1 The value of real number variable “c” is the sum of input data “a” and “b”.

.PROGRAM main()
1 a=1
2 b=2
3 CALL calc(a,b,c)
4 TYPE c

.PROGRAM calc(.aa,.bb,.cc)
1 .cc=.aa+.bb

To set parameters in the subroutine, as in example 1, enter “EDIT calc,0” at the key-
board prompt. Press the ENTER key,on the keyboard or the teach pendant keypad.
The display is shown below.

0.()
0?

Enter (.aa,.bb,.cc) at the 0? promt and press the ENTER key.

Example 2 The value of transformation value “c” is the sum of transformation values
“a” and “b”.

.PROGRAM position()
1 point a = trans(10)
2 point b = trans(0,20)
3 CALL add(&a,&b,&c)
4 point d = c

.PROGRAM add(.&aa,.&bb,.&cc)
1 point .cc=.aa+.bb

5-16 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5.3.5 ASYNCHRONOUS PROCESS (INTERRUPTION)

Under certain conditions, such as an error condition or when a specific external signal is
received, program execution may be interrupted and another program executed. This
occurs independently from the flow of execution of the main program and is called
asynchronous processing (interruption). When the specified signal (e.g. an external
signal or an error) is detected, the interruption occurs regardless of the execution of the
main program. This interruption is activated using the ON (or ONI) ...CALL instruction.

For more information on the ON and ONI instructions refer to unit 7, Program Instruc-
tions.

5.3.6 ROBOT MOTION INSTRUCTIONS

This section describes robot motion instructions. The AS system starts processing the
next step in a program as soon as the robot begins motion towards the pose specified in
the current step. For example, the steps in the program shown in figure 5-4 are ex-
plained below.

NOTE
Timing of program step execution is changed depending
on settings of system switches.

If the [Link] system switch is ON, output


signals are sent as robot motion starts towards the pro-
gram pose. If the [Link] system switch is
OFF, output signals are sent after the robot reaches the
pose.

[Link] ON [Link] OFF

part1 part2 part1 part2

JMOVE part1
SIGNAL 1 SIG 1 SIG 1
JMOVE part2
SIGNAL 2 SIG 2 SIG 2

Figure 5-4 Sample Robot Motion Program

June 10, 2003 5-17


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

When the robot starts motion toward pose part1, external output signal 1 is set ON or
high ([Link] system switch ON). The signal is not set to ON at pose
part1, but as soon as motion starts to pose part1.

When the program encounters the second motion instruction in the program JMOVE
part2, the current motion instruction is completed before performing the next motion
instruction.

When the robot reaches pose part1 and starts motion toward pose part2, external
output signal 2 is set ON or high.

The operator must be aware that the robot control program processes logic, signal and
motion instructions simultaneously. Because of this simultaneous processing, care must
be taken when programming signal instructions.

5-18 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

[Link] CONTINUOUS PATH (CP) MOTION

When executing a motion instruction like the one in the example in figure 5-5, the robot
accelerates smoothly up to the current speed setting as it moves toward the pose “pick”.
As the robot approaches “pick”, it gradually decelerates until it stops at the pose. A
series of motions carried out by one motion instruction is called a “motion segment”.

Current Pose Pose pick


JMOVE pick
STOP
Speed
Time

Figure 5-5 Robot Motion Segment

If the CP system switch is ON, the robot accelerates to reach the specified speed, but
does not decelerate when it approaches pos.1, as shown in figure 5-6. Instead, it
makes a smooth transition toward pos.2. When the robot approaches pos.2, it gradually
decelerates and stops at that point. This motion consists of two motion instructions, and
is made up of two motion segments.

Current Pose pos.1 pos.2


JMOVE pos.1
JMOVE pos.2
STOP Speed (v)
Time (t)

Motion Segment 1 Motion Segment 2

Figure 5-6 CP Motion

CP motion is when the robot performs a series of motions making smooth transitions
between motion segments without stopping at each location.

If the CP switch is OFF the robot decelerates and stops at the end of each motion
segment. CP motion can be used with linear motions and joint motions or with a combi-
nation of joint motions and linear motions (LMOVE, JMOVE, JAPPRO, LDEPART, etc.).
For more information on the CP switch refer to sections 3.2 and 6.6.

June 10, 2003 5-19


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

[Link] CP MOTION BREAK

Some instructions can suspend the execution of a program until the robot reaches
coincidence at the destination pose. This is called CP motion break. These instructions
are useful when the robot should be stationary while certain operations are performed,
such as closing a clamp (Figure 5-7).

Current Pose pos.1

JMOVE pos.1
BREAK
SIGNAL 1
SIG 1

Figure 5-7 CP Motion Break

The JMOVE instruction moves the robot toward pos.1. The BREAK instruction is ex-
ecuted and suspends the program until the move to pos.1 is completed. With the
BREAK instruction after the JMOVE instruction, the external signal is not output until the
robot comes to a stop.

Program instructions that suspend program execution are:

• BASE
• BREAK
• BRAKE
• CLOSI
• HALT
• ONI
• OPENI
• PAUSE
• RELAXI
• TOOL

The ONI instruction can interrupt motion at any point in the motion segment.

5-20 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

NOTE
The robot decelerates and stops if a motion instruction
is not encountered before the execution of the current
motion is completed.

Possible causes of robot motion stopping:

1. A WAIT instruction is executed and the conditions to


resume the program (set for the WAIT instruction) are
not satisfied before the current motion is completed.

2. Non-motion program steps before the next motion in-


struction are not completed before the current motion
is completed.

3. During CP motion, motion segment transition calcula-


tions require a certain amount of time. If the distance
between the two poses is too short, the calculations
may not be completed before reaching the next pose,
causing the robot to stop between the motion seg-
ments. To correct this condition, decrease robot
speed. If speed cannot be decreased, allow more
space between the program poses.

June 10, 2003 5-21


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5.3.7 CURRENT ROBOT MOTION AND CURRENT STEP RELATION

The example described below and shown in figure 5-8 demonstrates the AS system
program execution sequence.

With the robot at pose #a, the program steps are executed in the following order:

1. At pose #a, the AS system plans the motion for JMOVE #b and starts moving to-
ward #b.

2. As soon as the motion starts, the next step, SIGNAL 1, is executed (SIG 1 is set to
ON) immediately after the robot departs #a.

3. During the move to #b, step 3 assigns a value of 2 to real variable a.

4. The execution proceeds to step 4, and the AS system plans LMOVE #c and waits
for the robot to reach #b.

5. When the robot reaches #b, the robot immediately starts moving toward #c and
SIGNAL 2 is executed.

6. During the move to #c, the AS system plans the motion for LMOVE #d, and waits for
the robot to reach #c.

7. When the robot reaches #c, Signal 3 is executed immediately, speed is set to 50%,
and the robot starts moving toward #d.

1 JMOVE #b #a
Signal 1 Output #b
2 SIGNAL 1 Signal 2 Output
3 a=2
4 LMOVE #c
5 SIGNAL 2
6 SPEED 50
7 LMOVE #d
8 SIGNAL 3
Signal 3 Output #c

Speed is set to 50%


as motion starts to #d

#d

Figure 5-8 Program Execution Sequence

5-22 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

NOTE
The program always processes the next step until it has
to wait for the robot to reach the specified pose.

A WAIT instruction suspends the processing until the


specified condition(s) (set for the wait instruction) is/are
satisfied.

If the CP switch is OFF, the program processes all the


non-motion steps preceding a motion instruction and
stops at the motion instruction before proceeding.

June 10, 2003 5-23


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

5.3.8 CP SWITCH AND ACCURACY, ACCEL, AND DECEL INSTRUCTIONS


RELATION

Table 5-2 provides a description of the motion control instructions discussed in this
section.

Table 5-2 Motion Control Instructions Description

Instruction Description
ACCURACY Used to set the robot's positioning accuracy at the end of each motion segment.
When the robot reaches the range set by the ACCURACY instruction, the robot
considers the destination achieved and star ts motion to the next destination.
ACELL Used to set the acceleration of the robot at the beginning of a motion segment.
DECEL Used to set the deceleration of the robot at the end of a motion segment.
CP ON/OFF Enables or disables CP motion.

[Link] CP ON, STANDARD MOTION TYPE

Refer to figure 5-9 during this discussion.

When the robot reaches the set accuracy range (D in figure 5-9), the current motion
path is superimposed over the next motion path to calculate the trajectory for a smooth
transition to the next motion path, without hesitation at the programed pose. The robot’s
current motion path moves continuously toward the next motion path according to these
calculated command values.

The larger the set accuracy range, the sooner the path superimposing (transition) be-
gins.

Command Value

Pose B Speed (v)

ACCURACY Instructed trajectory


D
Actual trajectory
(Deviation due to delay) Time (t)
Pose A E Pose B Pose C
Pose C
Pose A D

Figure 5-9 CP and Accuracy Range

5-24 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

Acceleration to the next motion path does not begin until the deceleration ramp (E in
figure 5-10) of the current motion path is reached. Maximum CP motion effect is
reached when the accuracy is set to the distance between where deceleration starts (E
in figure 5-10) and the actual destination pose (B in figure 5-10).

Speed (v)

Time (t)
A EB C
Accuracy Range Setting

If the accuracy range is set as indicated above,


the acceleration for the transition to the next
motion segment does not start until the
deceleration ramp (of the first motion segment)
at E is reached.

Figure 5-10 CP Accuracy Range Limits

If the acceleration and the deceleration values are set lower, the superimposition (transi-
tion) begins earlier and the robot moves in a larger radius trajectory, but the total time it
takes to reach C (Figure 9-11) is not significantly changed.

Speed (v)

Time (t)
A EB C
Accuracy Range Setting

Figure 5-11 CP and Acceleration and Deceleration Settings

June 10, 2003 5-25


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

If the deceleration is decreased and the acceleration for the next motion segment is
increased, the overall speed does not exceed the specified maximum speed, since the
superposing does not begin until the robot reaches the point where acceleration starts
(figure 5-12, F). The time to complete deceleration and acceleration is the same (figure
5-12, B).

Speed (v)

Time (t)
A EF B C

Figure 5-12 CP and Acceleration and Deceleration Time

5-26 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

[Link] CP ON, TYPE 2 MOTION

In type 2 motion, the concept of accuracy and velocity in linear motion and circular
motion is different than standard motion type. Standard motion type and type 2 motion
use the same programs without modifications, but the actual motion path and motion
speed changes.

1. Accuracy setting.

a. Accuracy in joint interpolated motion:


The motion path of the robot corresponding to the accuracy setting is shown in
the figure 5-13. In this example, the accuracy values at point B are 1 mm, 100
mm, and 200 mm. As with standard motion type, the robot starts to make the
transition to the next motion segment before reaching point B, but does not
necessarily start turning at the point where it enters the accuracy range. How
close the robot approaches point B before turning is determined by the angle
of each axis calculated proportionally to the accuracy value.

By setting a larger accuracy value, the robot can calculate the transition using
the shorter distance of either the remaining distance of the current motion
segment or half the distance of the next motion segment from B to C.

ACCURACY RANGE

200 mm
100 mm

A 1 mm
B

Non-Symetrical Arc

Maximum accuracy setting


is half the distance betwen
B and C.

Figure 5-13 Type 2 Motion Joint Interpolation CP Motion and Accuracy Range

June 10, 2003 5-27


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

b. Accuracy in linear and circular interpolated motion:


The motion path of the robot corresponding to the accuracy setting is shown in
the figure 5-14. In this example, the accuracy values at point B are 1 mm, 100
mm, and 200 mm. The robot starts turning at the point where it enters the
accuracy range. The robot follows a circular trajectory within the radius of the
accuracy range.

By setting the accuracy range larger, the robot can calculate the transition
using the shorter distance of either the remaining distance of the current
motion segment, or half the distance of the next motion segment from B to C.
The accuracy value can be set up to the value equal to half the distance of the
second motion segment.

ACCURACY RANGE

200 mm
100 mm

A 1 mm
B

Circular Arc

Maximum accuracy setting


is half the distance betwen
B and C.

Figure 5-14 Type 2 Motion Linear Interpolation CP Motion and Accuracy Range

5-28 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

By making the transition sooner, cycle time can be shortened.

When the following conditions exist, the accuracy processing is the same as in
standard motion type:

When a wait instruction (TWAIT, SWAIT, etc.) is executed at point B.

When work coordinates or tool coordinates are changed at point B.

When the interpolation mode for the next point is changed to joint interpolation

When the motion mode is changed at point B from normal motion to fixed
linear interpolation (FLIN) motion or from FLIN motion to normal motion.

2. Speed setting.

a. Speed for joint interpolated motion:


Same as for standard motion type.

When a small accuracy value is set, speed is determined for joint interpolated
motion using maximum acceleration and deceleration to reach the program
pose.

When a large accuracy value is set, speed is determined for joint interpolated
motion by blending motion segments to make a smooth transition (CP motion).
This transition is limited to accuracies up to the deceleration and acceleration
ramps. Accuracy set larger than the deceleration and acceleration ramps have
no additional effect on the robot path (Figure 5-15).

June 10, 2003 5-29


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

CP motion segment transition


is based on accuracy settings
up to the deceleration and
acceleration ramps.

Dec
el

el

Dec
A cc

A cc
el

el
A B C
Accuracies beyond the
deceleration and acceleration
ramps has no additional effect
on the robot path.

Figure 5-15 Joint Interpolated Move Speed

b. Speed for linear and circular interpolated motion:


For motion type 2, if a large accuracy value is set and the configuration of the
robot does not change between two poses, the specified speed is attained
even if there is only a short distance between the two poses.

Specified Speed

Motion Type 2

Standard Type Motion

Program Poses
(Locations) A B C D E

Figure 5-16 Linear/Circular Interpolated Move Speed

5-30 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

When the following conditions exist, the accuracy processing is the same as in
standard motion type:

When a wait instruction (TWAIT, SWAIT, etc.) is executed at point B.

When work coordinates or tool coordinates are changed at point B.

When the interpolation mode for the next point is changed to joint interpola-
tion.

When the motion mode is changed at point B from normal motion to fixed
linear interpolation (FLIN) motion or from FLIN motion to normal motion.

c. Speed in circular interpolation:


In motion type 2, the robot follows a circular trajectory within the set accuracy
range. The speed is set by the robot’s capability to follow the specified trajec-
tory of the circular interpolation.

NOTE
When executing program steps where the robot posture
changes greatly within a short distance, the time it takes
to change posture exceeds the time it takes to move
that distance at the specified speed. In this case, the
joint movements are given priority and the specified
speed is not achieved during the motion.

June 10, 2003 5-31


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

[Link] SPECIFIED PATH MOTION

Linear and joint interpolated motion is standard for all robot models. At times it is neces-
sary to move the robot along a specified or calculated path, these complex motions are
possible because the AS system can make calculations during robot motion. This
process is referred to as “motion along a specified path”.

A program loop is used to perform a series of continuous calculations of short-distance


motions while the motion instructions are executed. The calculated motion segments
are connected smoothly using the CP motion function.

In the following example, the robot follows a path defined by a series of poses specified
by the array variable “path”. Path 0 to path 10 must be manually taught or defined by
calculations.

Example:

FOR index=0 TO 10
LMOVE path[index}
END

[Link] CP OFF

When the CP switch is OFF, the motion segments are not superimposed and there is no
smooth transition. The acceleration for the second motion segment starts after the first
motion segment is completed and the robot enters the default accuracy range (for ex-
ample, 1 mm for FS10).

Speed (v)

Time (t)
A C

The point the robot enters


the default accuracy range
of point B on the time line.

Figure 5-17 CP OFF Acceleration and Deceleration

5-32 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAMS

When the CP switch is OFF, the motion for the second motion segment begins only
when the deceleration of the first motion segment is zero, even if the accuracy range is
set larger than the end of the first motion segment.

Speed (v)

Time (t)
A B C

The point the robot enters


the set accuracy range
of point B on the time line.

Figure 5-18 CP OFF Acceleration and Deceleration with a Large Accuracy Range

5.3.9 SETTING LOAD MASS/LOAD CENTER POINT

When the load data for the robot’s current motion is set, the optimal acceleration and
deceleration is automatically determined. The WEIGHT command/instruction is used to
set the load mass and load mass center point.

NOTE
Always set the correct load mass and center of gravity
location. Incorrect data may weaken or shorten the lon-
gevity of parts or cause overload/deviation errors. For
information on the WEIGHT command/instruction refer
to section 6.6.

June 10, 2003 5-33


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

6.0 MONITOR COMMANDS...................................................................................... 6-2


6.1 Editor Commands ................................................................................................ 6-3
6.2 Program and Data Control Commands .............................................................. 6-23
6.3 Program and Data Storage Commands ............................................................. 6-40
6.4 Program Control Commands ............................................................................. 6-47
6.5 Pose Information Commands ............................................................................ 6-56
6.6 System Control Commands ............................................................................... 6-66
6.7 Binary Signal Commands ................................................................................ 6-109
6.8 Message Display Commands .......................................................................... 6-121

June 10, 2003 6-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

6.0 MONITOR COMMANDS

A monitor command consists of a keyword (command) and argument(s) or


parameter(s), as shown in figure 6-1.

Keyword Parameter

EDIT program name, step number

Shaded parameters can be omitted.

When parameters are omitted, omit the comas.

Always enter a space between the keyword and the parameter.

Figure 6-1 Monitor Command Example

NOTE
This symbol is used to represent the ENTER key.

6-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

6.1 EDITOR COMMANDS

Editor commands are monitor commands used in the edit mode to create and edit
programs. This section describes the editor commands and parameters.

Table 6-1 lists the editor commands and provides a brief description of their functions.
Shaded parameters can be omitted.

Detailed descriptions follow.

Table 6-1 Editor Command Descriptions

Command Format Description Page


EDIT ED program name, step Opens the AS editor mode. 6-4
CHANGE C program name, step Changes to another program to edit. 6-5
STEP S step number Selects a program step. 6-6
PRINT P number of steps Displays the specified number of program steps. 6-7
LAST L Displays the previous step. 6-8
INSERT I Step inser t mode. 6-9
DELETE D number of steps Deletes program step(s). 6-10
ENTER key Advances to the next program step without
ENTER NA
changing the current step.
F character string Searches for and displays the defined character
FIND 6-11
string.
M/existing characters/ Replaces existing characters with new characters
MODIFY 6-12
new characters in a step.
REPLACE R character string Replaces a character string in a step. 6-13
ONELINE O Places the cursor on the current line for editing. 6-14
EXIT E Exits the AS editor mode. 6-15
XD number of steps Cuts the selected step(s) and stores them in the
XD (Cut) 6-16
clipboard.
XY number of steps Copies the selected step(s) and stores them in the
XY (Copy) 6-17
clipboard.
XP (Paste) XP Pastes the contents of the clipboard. 6-18
XQ (Paste XQ Pastes the contents of the clipboard in reverse
6-19
reverse) order.
XS (Display XS Displays the contents of the clipboard.
6-20
Clipboard)
T variable name Allows teaching motion instructions from editor
TEACH (Option) 6-21
mode.

June 10, 2003 6-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

EDIT ED program name, step number

Function Enters the AS editor mode to name a new program or edit an exist-
ing program.

Parameter Program name:


Name of the program to edit. If a program name is not specified,
then the last program edit or stopped by an error is opened.

If the program name does not exist in memory, a new program is


created.

Step number:
Selects the step number to start editing. If no step is specified,
editing starts at the last step edited.

If an error occurred during the last program executed, the step


where the error occurred is selected.

Example >ED test


.Program test()
1 LMOVE
1?
2 LMOVE aa
2?
3 HOME
3?

NOTE
A program cannot be edited or deleted during execution.
If a program calls a program that is being edited, an er-
ror occurs and the execution of the program is stopped.

Program commands or instructions are entered in low-


ercase or uppercase characters. When listing or editing
a program, keywords are displayed in uppercase char-
acters.

6-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

CHANGE C program name, step number

Function Changes the program currently selected in the editor mode.

Parameter Program name:


Selects the program name to edit.

Step Number:
Selects the step number to start editing. If no step is specified, the
first step is selected.

Example >EDIT test1


.Program test1()
1 LMOVE aa
1?
2 LMOVE bb
2? c pg01
.Program pg01()
1HOME
1?
2 JMOVE #start
2?
3 LMOVE pickup

June 10, 2003 6-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

STEP S step number

Function Selects and displays the specified step for editing.

Parameter Step number:


If a step number is not specified, the first step is selected.

If the step number specified is greater than the number of steps in


the program, an new step, following the last step in the program, is
selected.

Example >EDIT test


.Program test()
1 LMOVE aa
1?
2 LMOVE bb
2?
3 JMOVE cc
3? s 6
6 LMOVE dd
6?
7 LDEPART
7? s
1 LMOVE aa
1?

6-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

PRINT P step count

Function Displays the number of steps specified starting with the current
step.

Parameter Step count:


Specifies the number of steps to display. If the number of steps is
not specified, only the current step is displayed.

Explanation Displays only the specified number of steps. The last step in the list
is selected for editing.

Example >EDIT test


.Program test()
1 LMOVE aa
1?
2 LMOVE bb
2? p 2
2 LMOVE bb
3 SPEED 500 mm/s
4?

June 10, 2003 6-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

LAST L

Function Selects the previous (last) step for editing.

Explanation [(current step number) -1 = ( selected step number)]

Example >EDIT test


.Program test()
1 LMOVE aa
1?
2 LMOVE bb
2?
3 JMOVE cc
3? l
2 LMOVE bb
2?

6-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

INSERT I

Function Inserts lines before the current step.

Explanation The steps after the inserted line are renumbered.

To exit the insert mode, press the ENTER key.

All lines entered before exiting the insert mode are inserted into the
program.

Example Insert the CLOSEI command between steps 3 and 4.

>EDIT test
.Program test ()
1 OPENI
1?
2 JAPPRO #part,500
2?
3 LMOVE #part
3?
4 LDEPART 1000
4?
5 JAPPRO #place,500
5? s 4 ;Selects step 4 as the insertion point
4 LDEPART 1000
4? i ;Type “i” and press ENTER
4 I CLOSEI ;Type the instruction and press ENTER
5I ;Press ENTER to complete the procedure
5 LDEPART 1000 ; Step 4 is renumbered step 5
5?

NOTE
To insert a blank line, in the insert mode, press the
SPACEBAR or TAB key, and press the ENTER key.

June 10, 2003 6-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

DELETE D step count

Function Deletes the specified number of steps plus the current step.

Parameter step count:


Specifies the number of steps to delete beginning with the current
step (step count plus the current step).

If a step count is not specified, only the current step is deleted.

Explanation When the specified steps are deleted all remaining steps are re-
numbered and moved up in the display.

Example >EDIT test


.Program test ()
1 LMOVE aa
1?
2 LMOVE bb
2? d3
2 LMOVE bb
2 JMOVE cc
2 JAPPRO #pickup,200
2 LMOVE #pickup
2?
3 JAPPRO #place

NOTE
If the number of steps specified is greater than the num-
ber of steps in the program, all steps after the current
step are deleted.

6-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

FIND F character string

Function Searches the current program for the specified character string from
the current step to the last step, and displays the first step that
contains the specified character string.

Parameter Character string:


Specifies the character string to search for.

Example Find the character string home, starting at step 3.

<EDIT test
.Program test()
1 LMOVE aa
1?
2 LMOVE bb
2?
3 LDEPART 50
3? f home
6 HOME
6?
7 JMOVE #place
7?

June 10, 2003 6-11


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

MODIFY M/existing characters/new characters

Function Modifies the characters in the current step.

Parameter Existing characters:


Specifies the characters to overwrite in the current step.

New characters:
Specifies the characters that replace the existing characters.

Example Replace the characters “50” in step 3 with the characters “75”.

>EDIT test
.Program test()
1 LMOVE aa
1?
2 LMOVE bb
2?
3 LDEPART 50
3? m/50/75
3 LDEPART 75
3?

6-12 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

REPLACE R character string

Function Replaces existing characters in the current step with the specified
characters.

Parameter Character string:


Specifies the new characters that replace the existing characters.

Explanation R command procedure:

Use the spacebar to move the cursor under the first character to
replace.

Press the R key and then the spacebar.

Enter the new character(s).

The characters entered do not replace characters above the cursor


but those two spaces to the left, starting above the R (refer to the
example below).

Press ENTER key

When the ENTER key is pressed, the AS system checks spelling


and syntax. If there is an error, the entry is ignored.

Example Replace the characters “75” in step 3 with the characters “50”.

>EDIT test
.Program test()
1 LMOVE aa
1?
2 JMOVE bb
2?
3 LDEPART 75
3? r 50
3 LDEPART 50
3?
4 JMOVE cc
4?

June 10, 2003 6-13


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

ONELINE O

Function Places the cursor on the current step for editing. (“O” for “oneline”,
not zero).

Explanation O command procedure:


Enter O and press the ENTER key to place the cursor in the current
step for editing.

With the cursor in the current step use the right and left cursor keys
to move the cursor to the characters to edit.

Use the BS (backspace) key to delete the characters and retype the
correct characters.

Example Replace the characters “bb” in step 2 with the characters “cc”.

>EDIT test
.Program test()
1 LMOVE aa
1?
2 LMOVE bb
2? o Enter “o” and press ENTER key
2 LMOVE bb Use cursor keys to place cursor at end of line
2 LMOVE Use BS (backspace) key to delete characters
2 LMOVE cc Retype correct characters, press ENTER key

NOTE
This command is used on a PC interfaced with the con-
troller. This command is not available from the teach
pendant.

6-14 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

EXIT E

Function Exits the editor and returns to the monitor mode.

Example >EDIT test


.Program test()
1 LMOVE aa
1?
2 LMOVE bb
2? e
>

June 10, 2003 6-15


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

XD (Cut) XD step count

Function Cuts the specified number of steps from a program and stores them
in the paste buffer.

Parameter Step count:


Specifies the number of steps to cut and store in the paste buffer,
beginning with the current step.

Up to ten steps can be cut. If not specified, only the current step is
cut.

Explanation The XD command cuts the steps and the remaining steps in the
program are renumbered accordingly.

Use the XY command to copy the steps.

Example The example in figure 6-2 shows the XD command is used to cut
steps 3 and 4 from the program test.

> >

xd 2 
dd

4 4 ee
4 4
5 JMOVE dd
5?
6 LMOVE ee
6?

Figure 6-2 XD (Cut) Command Example

6-16 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

XY (Copy) XY step count

Function Copies the specified number of steps of a program and stores them
in the paste buffer.

Parameter Step count:


Specifies the number of steps to copy and store in the paste buffer,
beginning with the current step.

Up to ten steps can be copied. If not specified, only the current


step is copied.

Explanation The XY command copies the steps and the steps in the program
remain the same.

Use the XD command to cut the steps.

Example The example in figure 6-3 shows the XY command is used to copy
steps 2 and 3 from the program “test” into the paste buffer.

> >

xy 2  xy 2

4 4
4 4
5 JMOVE dd 5 JMOVE dd
5? 5?
6 LMOVE ee 6 LMOVE ee
6? 6?

Figure 6-3 XY (Copy) Command Example

June 10, 2003 6-17


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

XP (Paste) XP

Function Inserts the contents of the paste buffer before the current step.

Explanation Use the XD or XY command, prior to the XP command, to store the


specified steps into the paste buffer.

Example In example A (Figure 6-4) steps 2 and 3 are cut from the program
and stored in the paste buffer.

Example B (Figure 6-4) shows the program steps are renumbered


after steps 2 and 3 are cut. The XP command is entered at step 3
to paste the cut steps before step 3.

Example C (Figure 6-4) shows the cut steps pasted back into the
program as steps 3 and 4.

Steps 2 and 3 cut from the program


Steps 2 and 3 pasted back into
the program as steps 3 and 4

A B C
.PROGRAM test() .PROGRAM test() .PROGRAM test()
1 LMOVE aa 1 LMOVE aa 1 LMOVE aa
1? 1? 1?
2 LMOVE bb 2 LMOVE dd 2 LMOVE dd
2?xd 2 2? 2?
3 JMOVE cc 3 JMOVE ee 3 LMOVE bb
3? 3?xp 3?
4 LMOVE dd 4 LMOVE ff 4 JMOVE cc
4? 4? 4?
5 JMOVE ee 5 JMOVE ee
5? 5?
6 LMOVE ff 6 LMOVE ff
6? 6?

Figure 6-4 XP (Paste) Command Example

6-18 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

XQ (Paste Rev.) XQ

Function Inserts the contents of the paste buffer before the current step in
reverse order.

Explanation Use the XD or XY command, prior to the XQ command, to store the


specified steps into the paste buffer.

Example In example A (Figure 6-5) steps 2 and 3 are cut from the program
and stored in the paste buffer.

Example B (Figure 6-5) shows the program steps are renumbered


after steps 2 and 3 are cut. The XQ command is entered at step 3
to paste the cut steps before step 3 in reverse order.

Example C (Figure 6-5) shows the cut steps pasted back into the
program as steps 3 and 4 in reverse order.

Steps 2 and 3 cut from the program


Steps 2 and 3 pasted, in reverse
order, back into the program as
steps 3 and 4

A B C
.PROGRAM test() .PROGRAM test() .PROGRAM test()
1 LMOVE aa 1 LMOVE aa 1 LMOVE aa
1? 1? 1?
2 LMOVE bb 2 LMOVE dd 2 LMOVE dd
2?xd 2 2? 2?
3 JMOVE cc 3 JMOVE ee 3 LMOVE cc
3? 3?xq 3?
4 LMOVE dd 4 LMOVE ff 4 JMOVE bb
4? 4? 4?
5 JMOVE ee 5 JMOVE ee
5? 5?
6 LMOVE ff 6 LMOVE ff
6? 6?

Figure 6-5 XQ (Paste Reverse) Command Example

June 10, 2003 6-19


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

XS (Paste Buffer) XS

Function Displays the paste buffer contents.

Explanation Displays the current paste buffer contents. If the paste buffer is
empty, nothing is displayed.

Example The example in figure 6-6 shows the paste buffer contents dis-
played using the XS command.

>

XS
--- Paste Buffer ---
[1]> JMOVE #a
[2]> JMOVE #b
[3]> JMOVE #c
2 JMOVE bb
2?

Figure 6-6 XS (Paste Buffer) Display Command Example

6-20 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

TEACH T variable name

Function Enables teaching motion instructions (JMOVE, LMOVE, etc.) using


the teach pendant in editor mode (option).

Parameter Variable name:


Specifies the pose variable name for the taught program point.

Explanation This command is used in the editor mode only.

When this command is executed, the teach screen is displayed.


The teach pendant is used to record a motion instruction with the
program open in the editor mode. Press the CANCEL key to return
to the editor mode.

If the T command is used at an existing step in the program, the


motion command and robot pose overwrite the step.

To insert a motion instruction within the program, first insert a new


line using the I (INSERT) command.

Array variables can be used with this command by specifying the


pose variable name in the format “T variable name [ ]”.

Joint numbers can be specified in place of pose variable names.

Example The example in figure 6-7 shows the T command used with a pa-
rameter and without a parameter.

With Parameter Without Parameter


2 JAPPRO #a 2 JAPPRO #a
2? 2?
3? T pos 3? T

3 JMOVE pos0 3 JMOVE #[0,10,20,0,0,]


4 JMOVE pos1 4 JMOVE #[10,10,20,0,0,0,]
5 JMOVE pos2 5 JMOVE pos2

Figure 6-7 TEACH command Example

June 10, 2003 6-21


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

NOTE
The teach pendant must be connected to the controller
and teach mode selected to use the T (TEACH) com-
mand.

6-22 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

6.2 PROGRAM AND DATA CONTROL COMMANDS

This section describes the program and data control commands and parameters.

Table 6-2 lists the program and data control commands and provides a brief description
of their functions.

Detailed descriptions follow.

Table 6-2 Program and Data Control Command Descriptions

Command Description Page


1
CARD_FDIR Lists names of the programs and variables on a PC card. 6-25
DIRECTORY Displays all program and variable names. 6-26
DIRECTORY/P Displays all program names. 6-26
DIRECTORY/L Displays all pose (location) variable names. 6-26
DIRECTORY/R Displays all real variable names. 6-26
DIRECTORY/S Displays all string variable names. 6-26
LIST Displays all program steps and variable values. 6-28
LIST/P Displays all program steps. 6-28
LIST/L Displays all pose (location) variables and values. 6-28
LIST/R Displays all real variables and values. 6-28
LIST/S Displays all string variables and values. 6-28
DELETE Deletes programs and variables in the controller memory. 6-30
DELETE/P Deletes programs in the controller memory. 6-30
DELETE/L Deletes pose (location) variables in the controller memory. 6-30
DELETE/R Deletes real variables in the controller memory. 6-30
DELETE/S Deletes string variables in the controller memory. 6-30
1
CARD_FDEL Deletes programs and variables on a PC card. 6-32
CARD_VERIFY1 Used to set the PC card drive verifying function to ON or OFF. 6-32
1
RENAME Used to change the name of a program. 6-33
Used to copy steps from a program and paste them into the same program
XFER 6-34
or another program.
COPY1 Used to copy a program. 6-35
1
These commands are used to control PC card functions. The same commands are used for a floppy
disk if "CARD_ " is changed to "FD_".

June 10, 2003 6-23


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Table 6-2 Program and Data Control Command Descriptions (Continued)

Command Description Page


CARD_COPY1 Used to copy programs on a PC card. 6-35
TRACE Used to set the TRACE function to ON or OFF (option). 6-36
SETTRACE Use to reserve memory for logging (option). 6-37
RESTRACE Used to release memory reserved using SETTRACE (option). 6-37
LSTRACE Displays the logging data (option). 6-38
1
These commands are used to control PC card functions. The same commands are used for a floppy
disk if "CARD_ " is changed to "FD_".

NOTE
The asterisk “*” is a wild card character which repre-
sents any character. It can be used with all program
and data control commands except the RENAME com-
mand.

For example, if “DIR w*” is entered, all programs begin-


ning with “w” are listed. In addition, subroutine pro-
grams called by the selected programs are listed. All lo-
cations and real variables used in the programs are dis-
played.

6-24 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

CARD_FDIR CARD_FDIR

FD_FDIR FD_FDIR

Function Displays the name of programs or variables. CARD_FDIR is used


for a PC card and FD_FDIR is used for a floppy disk.

Explanation All programs, subroutines and variables used in the programs are
listed.

Example >CARD_FDIR Displays the names of all the programs,


subroutines, and variables on a PC card.

>FD_FDIR Displays the names of all the programs,


subroutines, and variables on a floppy disk.

NOTE
When the SCREEN switch is set to ON, the display
does not scroll and stops at the end of the screen. To
continue the display, press the spacebar. To exit the dis-
play, press the ENTER key.

Program and variable names with an “*” or a “~” dis-


played at the beginning of the name, indicates the con-
tents of the program or variable are not defined.

June 10, 2003 6-25


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

DIRECTORY DIRECTORY program name,program name...

DIRECTORY/P program name,program name...

DIRECTORY/L pose variable,pose variable...

DIRECTORY/R real variable,real variable...

DIRECTORY/S string variable,string variable...

Function The DIRECTORY command displays the specified program names,


and program variable (location, real, and string) names. If a pro-
gram name is not specified, all program names, and program vari-
able (location, real, and string) names are displayed.

Parameter /P:
Lists program names, but does not display program variable (loca-
tion, real, and string) names.

/L:
Lists pose variable names.

/R:
Lists real variable names.

/S:
Lists string variable names.

Example >DIR Lists all program names and program


variable (location, real and string), names
in the controller memory.

>DIR/L pg01,pg02 Lists the pose variable names used in


programs “pg01” and “pg02”.

>DIR/R Lists all real variables names, in


the controller memory.

>DIR test* Lists the program names and variable


(location, real, and string) names, of all
program names that start with “test”.

6-26 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

NOTE
When the SCREEN switch is set to ON, the display
does not scroll and stops at the end of the screen. To
continue the display, press the spacebar. To exit the dis-
play, press the ENTER key.

June 10, 2003 6-27


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

LIST LIST program name,program name...

LIST/P program name,program name...

LIST/L pose variable,pose variable...

LIST/R real variable,real variable...

LIST/S string variable,string variable...

Function The LIST command displays the specified program name(s), pro-
gram steps, and program variables (location, real, and string). If a
program name is not specified, all program names, program steps,
and program variables (location, real and string) are displayed.

Parameter /P:
Lists program name and program steps, but does not display pro-
gram variables (location, real and string).

/L:
Lists pose variables and their values.

/R:
Lists real variables and their values.

/S:
Lists string variables and their values.

Example >LIST Lists all program names, program steps,


and program variables (location, real and
string) in the controller memory.

>LIST/L pg01,pg02 Lists the pose variables and their


values used in program pg01 and pg02.

>LIST/R Lists all real variables and their values in


the controller memory.

>LIST test* Lists the program names, program steps,


and variables (location, real and string),
of all program names that start with “test”.

6-28 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

NOTE
When the SCREEN switch is set to ON, the display
does not scroll and stops at the end of the screen. To
continue the display, press the spacebar. To exit the dis-
play, press the ENTER key.

June 10, 2003 6-29


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

DELETE DELETE program name,program name...

DELETE/P program name,program name...

DELETE/L pose variable,pose variable...

DELETE/R real variable [array index],real variable [array index]...

DELETE/S string variable[array index],string variable[array index]...

Function Deletes the specified program and all data associated with the
program from the controller memory.

Parameter /P:
Deletes the specified program only, from the controller memory.

/L:
Deletes the specified pose variable.

/R:
Deletes the specified real variable or real variable array element.

/S:
Deletes the specified string variable or string variable array element.

Explanation The DELETE command deletes the specified program and all
associated data, unless used by another program. This data con-
sists of the following:
All subroutines called by the program.

All pose variables used in the program and in the subroutines of the
program.

All real variables used in the program and in the subroutines of the
program.

All string variables used in the program and in the subroutines of


the program.

The DELETE/P command deletes only the program and not the
subroutines and variables used by the program.

6-30 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Explanation If array elements are not specified with the /R and /S parameters, all
the elements in the specified array variable are deleted. If array
element(s) are specified, only the specified element(s) are deleted.

Example >DELETE test Deletes the program “test” and all the
subroutines and variables used in program
“test” and associated subroutines.

>DELETE/P pg11,pg12
Deletes the programs “pg11” and “pg12”.
The subroutines and variables are not
deleted.

>DELETE/R a Deletes all the elements of the array vari-


able “a”.

>DELETE/R a[10] Deletes the tenth element of the array


variable “a”.

June 10, 2003 6-31


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

CARD_FDEL CARD_FDEL file name,file name...

FD_FDEL FD_FDEL file name,file name...

Function Deletes the specified file(s) from the PC card or floppy disk.

Parameter File name:


Specifies the name of the file to delete.

CARD_VERIFY CARD_VERIFY mode

FD_VERIFY FD_VERIFY mode

Function The CARD_VERIFY (PC card) or FD_VERIFY (floppy disk) com-


mand is used to set the verify function to ON or OFF or to display
the current setting.

Parameter mode:
0 – Sets the verify mode to OFF.
1 – Sets the verify mode to ON.
2 – Displays the current setting of the verify mode.

If the mode parameter is omitted 2 is assumed.

Explanation The verify function confirms copied, saved, transferred, or loaded


data was processed correctly. When the verify function is enabled,
processing time increases.

6-32 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

RENAME RENAME new program name=existing program name

CARD_RENAME CARD_RENAME new program name=existing program name

FD_RENAME FD_RENAME new program name=existing program name

Function RENAME changes the name of a program in the controller memory.


CARD_RENAME changes the name of a program stored on a PC
card. FD_RENAME changes the name of a program stored on a
floppy disk.

Parameter New program name:


Specifies the new name for the program.

Existing program name:


Specifies the current name of the program.

Explanation If the new program name specified already exists, an error is gen-
erated.

Example >FD_RENAME test=[Link] Changes the name of the pro-


gram [Link] to test on a floppy
disk.

June 10, 2003 6-33


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

XFER XFER destination program name,step number1=


source program name,step number2,step count

Function Used to transfer steps from one program to another program.

Parameter Destination program name:


Specifies the program to receive the copied data. If the program
name does not exist, the data is transferred into a new program with
that name.

Step number 1:
Specifies the step number the copied data is inserted before. If a
step is not specified, the data is inserted at the end of the specified
program.

Source program name:


Specifies the name of the program the data is copied from.

Step number 2:
Specifies the step number in the source program where the data is
copied from. If a number is not specified, the data is copied starting
from the top of the program.

Step count:
Specifies the number of steps to copy from the source program,
starting from the step number specified above (step number 2). If a
step count is not specified, all remaining steps in the program are
copied.

Explanation Copies the specified steps from the specified program and inserts
the copied steps before the specified step in the destination pro-
gram.

NOTE
If the program is displayed using the STATUS,
PCSTATUS, or EDIT command, the XFER command is
not available.

6-34 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

COPY COPY new program name=


source program name+source program name+...

CARD_COPY CARD_COPY new program name=


source program name+source program name+...

FD_COPY FD_COPY new program name=


source program name+source program name+...

Function Copy copies a complete program to a new program into the control-
ler memory. FD_COPY copies the programs onto a floppy disk, and
CARD_COPY copies the programs onto a PC card.

Parameter New program name:


Specifies the name of the program to copy new program into. This
parameter cannot be omitted.

Source program name:


Specifies the name of the program(s) to copy. At least one program
must be specified.

Explanation When two or more source programs are specified, the programs are
combined into one program under the new program name. The
name specified for the new program cannot be an existing program.

June 10, 2003 6-35


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

TRACE TRACE stepper number: ON/OFF

Function Logs and traces the contents of robot control and PC programs that
are executed.

Parameter Stepper number:


Specifies the type of program to trace using the stepper numbers as
shown below:

1: = Robot program
1001: = PC program 1
1002: = PC program 2
1003: = PC program 3
1004: = PC program 4
1005: = PC program 5

If the program type is not specified, all the programs are logged.

ON/OFF:
Enables/disables the trace function.

Explanation If the required memory is not reserved using the SETTRACE com-
mand before TRACE ON is specified, error P2034 is displayed as
shown below.

Error (P2034) Memory undefined for logging

Example TRACE 1001: ON Specifies PC program 1

6-36 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

SETTRACE SETTRACE step count

Function Reserves memory for logging trace data.

Parameter Step count:


Specifies the number of steps to log. The range is 1 to 9999.
Memory for 100 steps is reserved if the step count is not specified.

Explanation A portion of the user memory is reserved to accommodate the


specified number of steps and the current number of existing robot
and PC programs.

If TRACE ON and LSTRACE commands are executed without


reserving the memory for logging, error P2034 is displayed as
shown below.

Error (P2034) Memory undefined for logging

If the SETTRACE command is used while logging, error P2033 is


displayed as shown below and the trace function is set to OFF
(ends).

Error (P2033) Logging is in process

RESTRACE RESTRACE

Function Releases the memory set aside using the SETTRACE command.

Explanation If the RESTRACE command is used while logging, the error P2033
is displayed as shown below.

Error (P2033) Logging is in process

June 10, 2003 6-37


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

LSTRACE LSTRACE stepper number: logging number

Function Displays the logging data for the specified robot program or PC
program.

Parameter Stepper number:


Specifies the type of program to display using the stepper numbers
as shown below:

1: = Robot program
1001: = PC program 1
1002: = PC program 2
1003: = PC program 3
1004: = PC program 4
1005: = PC program 5

If type is not specified, the robot program log is displayed.

Logging number:
Specifies the logging data line number to start the log display. If not
specified, line 1 is selected.

Explanation If the LSTRACE command is executed without reserving memory


for logging, using the SETTRACE command, error P2034 is dis-
played as shown below.

Error (P2034) Memory undefined for logging

If the LSTRACE command is used while logging, error P2033 is


displayed as shown below and the trace function is set to OFF
(ends).

Error (P2033) Logging is in process

When the LSTRACE command is executed, the logging data is


displayed. The cursor is displayed after the data. The following
commands can be entered at the cursor:

N
Displays the next 9 lines.

L
Displays the previous 9 lines.

6-38 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Explanation S number
Displays the specified log line number and the 4 lines logged before
and after that line (9 lines). If a line number is not specified, lines 1
to 9 are displayed. If the number is greater than the existing num-
ber of lines, the highest line number is displayed.

F character
Displays the line that includes the specified character(s) and the 4
lines logged before and after that line (9 lines). If character(s) are
not specified, the characters entered previously with the F com-
mand are used. If the characters are not found in the data, nothing
is displayed.

E
Ends the display and returns to the AS monitor mode.

Displays the next 9 lines.

Example The example in figure 6-8 shows the display when the LSTRACE
command is entered as shown below.
>LSTRACE 1:91

91 pg1 31 JOINT SPEED9 ACCU1 TIMER0 TOOL1 WORK0 CLAMP1 (OFF,0,0,0) 2


92 pg1 32 SIGNAL 14;sig on
93 pg1 33 JOINT SPEED9 ACCU1 TIMER0 TOOL1 WORK0 CLAMP1 (OFF,0,0,0) 2
94 pg1 34 CALL “sub1”
95 sub1 1 PRINT “SUB1”
96 sub1 2 xyz:
97 sub1 3 JMOVE a
98 sub1 4 JMOVE b
99 sub1 5 JMOVE c
——N: Next page, L: Previous page, S number: Jump to number, F character: Find
character, E: End———-

Figure 6-8 LSTRACE Command Example

June 10, 2003 6-39


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

6.3 PROGRAM AND DATA STORAGE COMMANDS

This section describes the program and data storage commands and parameters.

Table 6-3 lists the program and data storage commands and provides a brief description
of the functions.

Detailed descriptions follow.

Table 6-3 Program and Data Storage Command Descriptions

Command Description Page


CARD_FORMAT Used to format a PC card. 6-41
FD_FORMAT Used to format a floppy disk. 6-41
1
SAVE Saves all data. 6-42
1
SAVE/P Saves programs. 6-43
SAVE/L1 Saves pose (location) variables. 6-43
1
SAVE/R Saves real variables. 6-43
1
SAVE/S Saves characters strings. 6-43
SAVE/A1 Saves auxiliary information. 6-43
SAVE/SYS1 Saves system data. 6-43
1
SAVE/ROB Saves robot data. 6-43
SAVE/ELOG1 Saves error data. 6-43
LOAD1 Loads programs and data into the controller's memory. 6-45
1
These commands are used to save/load data to a PC. To save/load the data to a PC card add the
prefix "CARD_" to the command. To save/load the data to a floppy disk add the prefix "FD_" to the
command.

6-40 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

CARD_FORMAT CARD_FORMAT

FD_FORMAT FD_FORMAT format type

Function CARD_FORMAT is used to initialize (format) an SRAM PC card.

FD_FORMAT is used to initialize (format) a floppy disk.

Parameter Format type:


Selects the type of floppy disk to format.

1: 1.44 MB
2: 1.25 MB

If omitted 1 is assumed.

Explanation When a SRAM PC card or a floppy disk is formatted, all existing


data is erased and a new file directory is set-up.

Example >CARD_FORMAT
Are you sure? (Yes:1, No:0)?
1
Now formatting card...
>
Formatting done.

NOTE
A new SRAM PC card must be formatted before pro-
grams and data are stored.

Flash ATA PC cards do not need to be formatted.

June 10, 2003 6-41


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

SAVE SAVE/SEL file name=program name, program name,...

CARD_SAVE CARD_SAVE/SEL file name=program name, program name,...

FD_SAVE FD_SAVE/SEL file name=program name, program name,...

Function The SAVE command stores the program and variable data to a
computer’s hard drive, PC card, CD burner, or floppy disk drive.
The SAVE command is only available when a PC is connected to
the controller.

The CARD_SAVE command stores the programs and variable data


to a PC card in the controller.

The FD_SAVE command stores the programs and variable data to


a floppy disk in the controller (if an optional floppy disk drive is
installed).

Parameters /SEL:
Saves only the specified program(s). The subroutines and variables
used by the specified program(s) are not saved.

If /SEL is omitted the specified program(s) and all subroutines and


variables used by the program(s) are saved.

File name:
Saves the specified program under the file name. If the extension is
not specified, the extension “.as” is automatically added to the file
name.

Program name:
Select the program to save. If a program name is not specified, all
the programs in the controller’s memory are saved.

6-42 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Explanation Variations of the SAVE command are as follows:

SAVE/SEL/P
Saves program data in a file with the extension “.PG”.

SAVE/SEL/L
Saves pose variable data in a file with the extension “.LC”.

SAVE/SEL/R
Saves real variable data in a file with the extension “.RV”.

SAVE/SEL/S
Saves string variable data in a file with the extension “.ST”.

SAVE/SYS
Saves system data in a file with the extension “.SY”.

SAVE/A
Saves auxiliary data in a file with the extension “.AU”.

SAVE/ROB
Saves robot data in a file with the extension “.RB”.

SAVE/ELOG
Saves error log data in a file with the extension “.EL”.

The SAVE command used alone stores all the five data types in
one file.

To use the above variations of the SAVE commands to save data to


a PC card add the prefix “CARD_”.

To use the above variations of the SAVE commands to save data to


a floppy disk add the prefix “FD_”.

If /SEL is entered with /P, /L, /R, or /S, only the specified program
and the variables used in that program are saved. The subroutines
and variables used in the subroutines are not saved.

The names of the programs specified with the SAVE command and
any program names used as a subroutine of the specified
program(s) are displayed on the terminal when the SAVE command
is executed.

June 10, 2003 6-43


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Explanation Programs are saved in a file in alphabetical order, regardless of the


order in which they were saved.

If the specified file name already exists in the controller’s memory,


the existing file is automatically renamed with a “b” (backup) in front
of the file extension.

For example if “[Link]” already exists in memory and “file1” is


specified as the file name (as shown below) the file (“[Link]”) is
renamed “[Link]”. The newly created file is named “[Link]”.

>SAVE file1

The next time a SAVE is entered using the file name “file1” the
original file is lost, the second file becomes the “.bas” (backup) file,
and the last saved file is named with the “.as” extension.

Example >SAVE f3=cycle,motor


Saves the two programs “cycle” and “motor”, the system data,
subroutines, and variables used by the two programs, under the file
name “[Link]”.

>SAVE/L file2=pg1,pg2
Saves the pose variables used in programs “pg1” and “pg2” under
the file name “[Link]”.

6-44 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

LOAD LOAD/Q file name

CARD_LOAD CARD_LOAD/Q file name

FD_LOAD FD_LOAD/Q file name

Function The LOAD command loads the specified files from the computer
memory into the controller memory. The LOAD command is only
available when a PC is connected to the controller.

The CARD_LOAD command loads the specified files from a PC


card into the controller memory.

FD_LOAD command loads the specified files from a floppy disk into
the controller memory.

Parameter /Q:
Loads selected programs and variables from a specified file into the
controller memory. The operator is prompted for each file item as
shown below.

Load? (1:Yes, 0:No, 2:Load all, 3:Exit)

0: Does not load the data.


1: Loads the data.
2: Loads the data and all remaining data in the file without inquiry.
3: Does not load the data and exits the LOAD command.

File name:
Name of the file to load data from. If an extension is not specified
“.as” is assumed.

Explanation If there is an unreadable or incorrect step in the program, the mes-


sage shown below is displayed:

The step format is incorrect (0:continue load 1:Delete program and


exit)

If the load operation is continued by entering “0”, use the editor


mode to correct the step in the program after the program is loaded
into the controller memory.

June 10, 2003 6-45


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Explanation Attempting to load a program name that already exists in memory


results in error and execution of the LOAD command is aborted.

NOTE
When loading a pose variable, real variable or string
variable name that already exists in memory, the data in
the memory is overwritten without warning. Programs
are not overwritten.

The original data is deleted if LOAD is canceled while


overwriting data in the memory.

Example Load the data in the file “[Link]” into the controller memory.

>LOAD pallet
Loading...
System data
Program a1()
Program test()
:
Transformation values
Joint interpolation values
Real values
Loading done.
>

Load all programs in file “[Link]” into the controller memory.

>LOAD [Link]

6-46 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

6.4 PROGRAM CONTROL COMMANDS

This section describes the program control commands and parameters.

Table 6-4 lists the program control commands and provides a brief description of their
functions.

Detailed descriptions follow.

Table 6-4 Program Control Command Descriptions

Command Description Page


SPEED Used to set monitor speed. 6-48
PRIME Prepares a program for execution. 6-49
EXECUTE Used to execute a program. 6-50
STEP Used to execute one step of a program. 6-52
MSTEP Used to execute one motion instruction in a program. 6-52
ABORT Stops execution after completing the current step. 6-53
HOLD Stops program execution. 6-53
CONTINUE Resumes program execution. 6-54
STPNEXT Used to execute a program in the step once mode. 6-55
KILL Initializes (clears) the execution stack. 6-55
DO Used to execute a single program instruction, without writing a program. 6-55

June 10, 2003 6-47


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

SPEED SPEED monitor speed %

Function Sets the monitor speed in percentage.

Parameter Monitor speed:


Sets the monitor speed in percentage. If this value is set to 100, the
speed is 100% of the maximum speed. If this value is set to 50, the
speed is set at half of the maximum speed. If the speed limit re-
lease option is set, the value can be set up to 99999 (%).

Explanation Robot motion speed is a product of the monitor speed (set using
the SPEED command) and program speed (set in the program
using the SPEED instruction).

For example, if the monitor speed is set at 50 and the speed set in
the program is 60, and then the robot’s maximum speed is 30%.

The default setting of the monitor speed is 10%.

NOTE
The maximum speed of the robot is automatically set to
100% if the product of the monitor speed and the pro-
gram speed exceeds 100%.

This command does not affect the speed of motion cur-


rently in execution. The new speed setting is effective
after the current motion and the planned motion are
completed.

Example If the program speed is set to 100%:

>SPEED 30 Sets maximum speed to 30%

>SPEED 50 Sets maximum speed to 50%.

>SPEED 100 Sets maximum speed to 100%.

>SPEED 200 Sets maximum speed to 100%.

6-48 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

PRIME PRIME program name,execution cycles,step number

Function Prepares the system to execute the specified program using the
CYCLE START switch, CONTINUE, or EXECUTE command. This
command alone does not execute the program.

Parameter Program name:


Selects the program to prepare for execution. If not specified, the
last program executed or used with the prime command is selected.

Execution cycles:
Sets the number of times the program is executed. If not specified,
1 is assumed. To execute the program continuously, enter a nega-
tive number (-1).

Step number:
Specifies the step where execution is to start. If not specified, the
execution starts from the first step of the program.

Explanation This command prepares the system for program execution. It does
not execute the program. The program is executed using the CON-
TINUE or EXECUTE command after the PRIME command pre-
pares the system. The program can also be executed using the
CYCLE START switch.

NOTE
When the PRIME command is used, the execution stack
is initialized (cleared). If the program on the execution
stack is in a hold condition (HOLD/RUN switch in HOLD
or an error condition exists), or in a subroutine, the pro-
gram execution cannot continue or return to the main
program. The program specified with the PRIME com-
mand replaces the program in the execution stack.

June 10, 2003 6-49


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

EXECUTE EXECUTE program name,execution cycles,step number

Function Used to execute the current program (program on the execution


stack).

Parameter Program name:


Selects the program to execute. If not specified, the last program
executed (using the EXECUTE, PRIME, STEP, or MSTEP com-
mand) is selected.

Execution cycles:
Sets the number of times the program is executed. If not specified,
1 is assumed. To execute the program continuously, enter a nega-
tive number (-1).

Step number:
Specifies the step where execution is to start. If not specified, the
execution starts from the first step of the program. The step number
specified is effective for the first iteration of the program cycle. After
the first cycle, if more than one cycle is specified, the program starts
from the first step.

Explanation Executes a specified robot program from the specified step. The
execution is repeated the specified number of cycles.

NOTE
When the EXECUTE command is used to execute a
program, speed and accuracy are automatically set as
shown below:

SPEED 100 ALWAYS

ACCURACY 1 ALWAYS

A STOP instruction or the last step of the program indi-


cates the end of a program cycle.

6-50 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Example Execute program “test” continuously. The program execution contin-


ues until stopped by an AS Language command or an error occurs.

>EXECUTE test,-1

Execute the last program executed, for one cycle.

>Execute

June 10, 2003 6-51


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

STEP STEP program name,execution cycles,step number

MSTEP MSTEP program name,execution cycles,step number

Function Used to execute one step of a robot program.

Parameter Program name:


Selects the program to execute. If not specified, the currently sus-
pended program or the last program executed is selected.

Execution cycles:
Sets the number of times the program is executed. If not specified,
1 is assumed.

Step number:
Specifies the step where execution is to start. If not specified,
execution starts from the first executable step of the program. If no
parameters are specified, the step after the last executed step is
selected.

Explanation The STEP and MSTEP commands are executed without param-
eters, only in the following conditions:

After a PAUSE instruction,

After the program is stopped by causes other than an error,

when the previous program instruction was executed using the


STEP or MSTEP command.

The MSTEP command executes one motion segment (e.g., one


motion instruction and the steps before the next motion instruction).
The STEP command executes only one step of the program (the
robot does not necessarily move).

Example Execute step 23 (only) of the program “assembly”.

>STEP assembly,,23

If the STEP command is executed again without parameters imme-


diately, step 24 of the program “assembly” is executed.

6-52 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

ABORT ABORT

Function Stops execution of the robot program.

Explanation Stops execution of the robot program after the current step is com-
pleted. If the robot is in motion, the execution stops after the motion
is completed. Program execution is resumed using the CONTINUE
command.

NOTE
In the AS system, the motion of the robot and the step
in execution are not necessarily the same. If the pro-
cessing of steps is faster than the motion of the robot,
the robot may perform one more motion step after the
current motion step before it stops.

HOLD HOLD

Function Stops robot program execution immediately.

Explanation The robot motion is stopped immediately. This command has the
same effect as setting the HOLD/RUN switch to the HOLD position.
Motor power is not set to OFF, as with the EMERGENCY STOP
switch. Program execution is resumed using the CONTINUE com-
mand.

June 10, 2003 6-53


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

CONTINUE CONTINUE NEXT

Function Resumes execution of a program stopped using the PAUSE instruc-


tion, ABORT or HOLD command, or as a result of an error. This
command can be used to start programs set to execute using the
PRIME, STEP or MSTEP command.

Parameter NEXT:
If NEXT is not specified, execution resumes from the step where
execution stopped. If NEXT is specified, execution resumes from
the step following the step where execution stopped.

Explanation The effect the keyword NEXT has on program restart, differs de-
pending on how the program was stopped.

If the program stopped during execution of a step or of a motion:


CONTINUE restarts the program and re-executes the interrupted
step. CONTINUE NEXT restarts at the step after the step where
the program stopped.

If the program execution is stopped after a step or a motion is


completed:
CONTINUE and CONTINUE NEXT restarts the program from the
step immediately after the completed step, regardless of NEXT.

If the program is suspended by a WAIT, SWAIT or TWAIT instruc-


tion:
CONTINUE NEXT skips the above instructions and resumes execu-
tion from the next step.

NOTE
The CONTINUE command cannot resume program ex-
ecution when:

The program ended properly.


The program was stopped using the HALT instruction.
The KILL command is used.

6-54 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

STPNEXT STPNEXT

Function Executes the next step if the STP_ONCE system switch is ON.

Explanation When the STP_ONCE system switch is ON, the program can be
executed in one step increments. The STPNEXT command ad-
vances execution to the next step in the program.

KILL KILL

Function Initializes (clears) the execution stack of the robot program.

Explanation If the program is stopped by a PAUSE instruction, an ABORT com-


mand, or an error, the program stack is unchanged. The KILL
command is used to initialize (clear) the stack. Once the KILL
command is used, the CONTINUE command is ineffective, since
there is no program on the stack.

DO DO program instruction

Function Executes a single program instruction, without writing a program


(Some program instructions cannot be used with this command).

Parameter Program instruction:


Executes the specified program instruction. If omitted, the program
instruction last executed using the DO command is executed again.

Explanation Program instructions are normally written within the programs and
executed as program steps. The DO command enables execution
of a single instruction without having to write a program to run that
instruction.

Example Move the robot to the pose “safe” in a joint interpolated motion.

>DO JMOVE safe

Move the robot to the home pose in a joint interpolated motion.

DO HOME

June 10, 2003 6-55


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

6.5 POSE INFORMATION COMMANDS

This section describes the pose information commands and parameters.

Table 6-5 lists the pose information commands and provides a brief description of the
functions.

Detailed descriptions follow.

Table 6-5 Pose Information Command Descriptions

Command Description Page


HERE Defines the specified pose (location) variable as the current pose (location). 6-57
POINT Defines a pose (location) variable. 6-60
PONT/X Defines the X value of a pose (location) variable. 6-63
POINT/Y Defines the Y value of a pose (location) variable. 6-63
POINT/Z Defines the Z value of a pose (location) variable. 6-63
POINT/OAT Defines the OAT values of a pose (location) variable. 6-63
POINT/O Defines the O value of a pose (location) variable. 6-63
POINT/A Defines the A value of a pose (location) variable. 6-63
POINT/T Defines the T value of a pose (location) variable. 6-63
POINT/7 Defines the seventh axis value of a pose (location) variable. 6-63
TEACH Defines a series of poses (locations), as an array, using the RECORD key. 6-65

6-56 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

HERE HERE pose variable name

Function Defines the pose variable as the current robot pose. The pose may
be expressed in transformation values, joint displacement values or
compound transformation values.

Parameter Pose variable name:


Is specified in transformation values, joint displacement values, or
compound transformation values.

NOTE
Only the right most variable in a compound transforma-
tion values is defined (see example). If the other vari-
ables used in the compound values are not defined, an
error occurs.

June 10, 2003 6-57


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Explanation The values of the variable are displayed on the terminal followed by
the message “Change?” The values can be changed by entering
the values separating each value with a comma, as shown in figure
6-9. A value that is not changed may be skipped by using comas as
place holders. Press the ENTER key to complete the editing pro-
cess. To exit without making changes press the ENTER key at the
prompt.

Example The example in figure 6-9 shows the joint displacement value for
JT5 is changed from 89.080 to 90.000.

>HERE #PICK

Figure 6-9 HERE Command Example

6-58 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Explanation If the variable is defined in joint displacement values (variable name


starting with a #), the joint values of the current pose are displayed.
If the variable is in transformation values, the XYZOAT values are
displayed. The XYZ values describe the position of the origin of the
tool coordinates with respect to the base coordinates. The OAT
values describe the posture of the tool coordinates.

Example Define the robot’s current pose as “#pick” (joint displacement val-
ues).

>HERE #pick

Define the robot’s current pose as “place” (transformation values)

>HERE place

Define the robot’s current pose as “object” relative to the pose plate
(compound transformation values). If plate is not defined an error
occurs.

>HERE plate+object

June 10, 2003 6-59


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

POINT POINT pose variable name


=pose values, joint displacement values

Function Assigns the pose information on the right of the assignment sign (=)
to the pose variable on the left side of the assignment sign (=).

Parameter Pose variable name:


Specifies the name of the pose information variable to define (may
be defined in joint displacement values, transformation values, or
compound transformation values).

Pose values:
If not specified, the assignment sign (“=”) is also omitted.

Joint displacement values:


This parameter must be set if the pose variable name on the left is
defined by joint displacement values and the pose information
values on the right are transformation values (if the parameter on
the left is not defined by joint displacement values, this parameter
cannot be set).

The joint displacement values specified here define the configura-


tion of the robot at the pose. If not specified, the current configura-
tion is used to define the pose variable.

Explanation Assigns pose values specified on the right to the pose variable.
When the pose values are not specified, the values already defined
for that pose are displayed on the terminal, and can be edited. If
the pose variable is not defined, the values displayed are 0, 0, 0, 0,
0, 0.

When the POINT command is executed, the pose values are dis-
played followed by the message “Change?” and a prompt. The
values can be edited. To exit without making changes press the
ENTER key at the prompt.

If the variable is defined by joint displacement values, then joint


values appear on the display. If the variable is defined by transfor-
mation values, the XYZOAT values are displayed. The XYZ values
describe the position of the origin of the tool coordinates with re-
spect to the base coordinates. The OAT values describe the pos-
ture of the tool coordinates. When the variable is expressed in
compound transformation values, the right most variable in the
compound transformation value is defined.

6-60 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Explanation If the other variables used in the compound value are not defined,
an error occurs.

If the value types on the right and the left side of the assignment
sign (=) are different, the POINT command functions as follows:

POINT transformation values=joint displacement values

The joint displacement values on the right are transformed into


transformation values and assigned to the variable on the left.

POINT joint displacement values=transformation values, joint dis-


placement values

The transformation values on the right are transformed into joint


displacement values and assigned to the variable on the left. If the
joint displacement values on the right are specified, the transforma-
tion value is transformed with the robot taking the configuration of
the specified joint displacement values. If not specified, the trans-
formation value is transformed with the robot in its current configu-
ration.

When specifying values, a maximum of nine decimal digits can be


entered, but the accuracy of entries with more than nine digits
cannot be guaranteed.

Example Display the values of the pose variable “#park”.


If #park is not previously defined zeros are displayed (0,0,0,0,0,0)

>POINT #park

JT1 JT2 JT3 JT4 JT5 JT6


10.000 15.000 20.000 30.000 50.000 40.000
Change?(If not, Press RETURN only)
,,,-15
JT1 JT2 JT3 JT4 JT5 JT6
10.000 15.000 20.000 -15.000 50.000 40.000
Change?(If not, Press RETURN only)

June 10, 2003 6-61


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Example Assign the transformation values of “pick” to the transformation


values of “pick1” and display the values for editing.

>POINT pick1=pick

X[mm] Y[mm] Z[mm] O[deg] A[deg] T[deg]


00.000 2322.000 1788.000 90.000 135.000 -90.000
Change?(If not, Press RETURN only)

Transform the joint displacement values of “#pos0” into transforma-


tion values and assign them to “pos0”.

>POINT pos0=#pos0

X[mm] Y[mm] Z[mm] O[deg] A[deg] T[deg]


-995.344 1637.886 884.776 -90.000 149.698 89.997
Change?(If not, Press RETURN only)

Transform the transformation values of “pos1” into joint displace-


ment values using the robot configuration of “#pos2” and assign the
values to “#pos1”.

>POINT #pos1=pos1,#pos2
JT1 JT2 JT3 JT4 JT5 JT6
19.602 10.955 -18.182 0.336 -70.928 -19.710
Change?(If not, Press RETURN only)

6-62 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Variations of the point command.

POINT POINT/X transformation variable name=transformation values

POINT/ Y transformation variable name=transformation values

POINT/Z transformation variable name=transformation values

POINT/OAT transformation variable name=transformation values

POINT/O transformation variable name=transformation values

POINT/A transformation variable name=transformation values

POINT/T transformation variable name=transformation values

POINT/7 transformation variable name=transformation values

Function Assigns the components of the transformation values specified on


the right of the assignment sign (=) to the corresponding component
of the transformation values on the left of the assignment sign (=).
The values are displayed on the terminal and can be edited.

Parameter Variable name:


Selects the transformation variable name to define (transformation
values or compound transformation values).

Transformation values:
If not specified, the assignment sign (=) is also omitted.

Explanation Assigns the specified components (X, Y, Z, O, A, T) of the transfor-


mation values. When this command is executed, the values of each
component are displayed followed by the message “Change?” and a
prompt. These values can be edited. To exit without making
changes press the ENTER key at the prompt.

June 10, 2003 6-63


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Example Assign the OAT values of pose a1 to pose a2.


The values of a1 and a2 are as shown below.

a1=(1000, 2000, 3000, 10, 15, 30)


a2=(0, 0, 0, 0, 0, 0)

>POINT/OAT a2=a1
X[mm] Y[mm] Z[mm] O[deg] A[deg] T[deg]
0.000 0.000 0.000 10.000 15.000 30.000
Change?(If not, Press RETURN only)

6-64 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

TEACH TEACH pose variable name

Function Used to record a series of poses using the RECORD key on the
teach pendant. Press the ENTER key to exit the teach mode.

Parameter Pose variable name:


Specifies a pose variable or an array variable. The poses can be
defined as transformation values or joint displacement values. If
compound transformation values are used, the last variable in the
expression is defined by the TEACH command.

Explanation Enter the TEACH command and variable name, jog the robot to the
required pose, and press the RECORD key. The current pose of
the robot is recorded using the specified variable name. The pose
name is automatically incremented each time a pose is recorded. If
an array variable is used the poses are recorded as consecutive
elements of the array.

Example Each time the RECORD key is pressed, the variable name index
number is incremented by 1, and the current robot pose is re-
corded.

>TEACH hole1
hole1
hole2
hole3

>TEACH point56
point56
point57
point58

If an array variable is used each time the RECORD key is pressed


the array index number is incremented by 1, and the current robot
pose is recorded.

>TEACH x[0]
x[0]
x[1]
x[2]

June 10, 2003 6-65


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

6.6 SYSTEM CONTROL COMMANDS

This section describes the system control commands and parameters.

Table 6-6 lists the system control commands and provides a brief description of the
functions.

Detailed descriptions follow.

Table 6-6 Pose Information Command Descriptions

Command Description Page


STATUS Displays system status. 6-68
WHERE Displays the current pose (location) data for the robot. 6-70
IO Displays the status of the binary signals. 6-72
FREE Displays the amount of free memory. 6-73
TIME Displays and sets the current time and date. 6-74
ULIMIT Used to set the upper limit of robot motion. 6-75
LLIMIT Used to sets the lower limit of robot motion. 6-75
BASE Used to change base transformation values. 6-76
TOOL Used to define tool transformation values. 6-79
SETHOME Used to set the home position. 6-80
SET2HOME Used to set the home position no.2. 6-80
ERRLOG Displays a history of error conditions. 6-81
OPLOG Displays a history of operations. 6-81
SWITCH Displays the system switch setting. 6-82
ON Used to enable the system switch. 6-83
OFF Used to disable the system switch. 6-83
ZSIGSPEC Used to set and display the total number of I/O signals. 6-84
HSETCLAMP Used to sets the default clamp specifications. 6-85
DEFSIG Used to display or set software dedicated signals. 6-87
ZZERO Used to display or set the zeroing data. 6-90
ERESET Used to reset an error condition. 6-94
SYSINIT Used to initialize the system. 6-94
HELP Displays a listing of AS Language commands/instructions. 6-95
ID Displays the version of the software. 6-97
WEIGHT Used to set the weight load data. 6-98

6-66 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Table 6-6 Pose Information Command Descriptions (Continued)

Command Description Page


BATCHK Used to enable/disable battery low voltage check. 6-99
Used to set an acceptable deviation range when checking the robot's
ENCCHK_ EMG pose at an emergency stop versus the pose (location) when the robot 6-99
restar ts.
Used to set the acceptable range for the difference in encoder value when
ENCCHK_ PON the control power is turned ON versus the value when the power was 6-100
turned OFF the last time.
SLOW_ REPEAT Used to set slow repeat mode speed. 6-100
REC_ ACCEPT Used to enable/disable recording and or changing programs. 6-101
ENV_ DATA Used to sets auto servo off timer and teach pendant connect/disconnect. 6-102
ENV_ 2DATA Used to set terminal connect/disconnect. 6-103
CHSUM Used to clear a check sum error. 6-104
PLCAOUT Used to set real values to output data (Option). 6-105
TPLIGHT Used to activate the teach pendant backlight (Option). 6-106
IPEAKLOG Displays peak current values (Option). 6-106
IPEAKCLR Used to resets peak current values (Option). 6-106
OPEINFO Displays operation information (Option). 6-107
OPEINFOCLR Used to clear operation information (Option). 6-108

June 10, 2003 6-67


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

STATUS STATUS

Function Displays the status of the system and the current robot program.

Explanation An explanation of the possible status conditions is provided below.

Robot Status:
The current robot status is on of the following.
Error state: An error has occurred. Try the error reset pro-
cedure.

Motor power OFF: Motor power is OFF.

Teach mode: Motor power is ON and the robot is controlled


using the teach pendant.

Repeat mode: Motor power in ON and the robot is controlled


by the robot program.

Repeat mode
cycle start ON: Motor power is ON and the program is running.

Program waiting: Motor power is ON and the robot program is


running and in a wait condition (WAIT, SWAIT,
or TWAIT instruction).

Environment:
The current monitor speed in percentage.

The current program speed in percentage or mm/s.

The current accuracy in mm.

Stepper status:
The current status of step execution.

Execution cycles:
Completed cycles: Execution cycles completed (0 to 32767).

Remaining cycles: Remaining execution cycles. If a negative


number is specified for execution cycles with the
EXECUTE command, “infinite” is displayed.

6-68 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Explanation Program name:


The current program name or step currently executing, or in a wait
condition.

Example The STATUS command displays the robot program status as shown
in figure 6-10.

>STA
Robot status:
Motor Power OFF
REPEAT mode

Environment:
Monitor speed (%) = 10.0
Program speed (%) ALWAYS = 100.0
ALWAYS Accu.[mm] = 1.0
Stepper status: Program is not running.
Execution cycles
Completed cycles: 3
Remaining cycles: Infinite
Program name Prio Step No.
test 0 1 WAIT sig(1001)

Figure 6-10 STATUS Command Example

June 10, 2003 6-69


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

WHERE WHERE display mode

Function Displays the current robot pose and other relative data.

Parameter Display mode:


Specifies the data display mode. The 16 data display modes are
described below. Display modes 7–16 are optional.

WHERE Displays the current robot pose in transformation


values (X, Y, Z, O, A, T) and joint angles in degrees
(JT1, JT2, JT3, JT4, JT5, JT6).

WHERE 1 Displays the current pose in joint angels in degrees


(JT1, JT2, JT3, JT4, JT5, JT6).

WHERE 2 Displays the current pose in transformation values (X,


Y, Z, O, A, T).

WHERE 3 Displays the current commanded pose values in joint


angles in degrees (JT1, JT2, JT3, JT4, JT5, JT6).

WHERE 4 Displays deviations from the command pose values


in encoder bit data.

WHERE 5 Displays the encoder values for each joint in encoder


bit data.

WHERE 6 Displays the speed of each joint in degrees per


seconds.

WHERE 7 Displays the current pose, including an external axis


(option).

WHERE 8 Displays the current pose in a fixed work coordinate


system (option).

WHERE 9 Displays the command value of each joint for trans-


formation values (option).

Where 10 Displays motor current values in amps (option).

WHERE 11 Displays the motor speed in RPM (option).

6-70 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

WHERE 12 Displays the current transformation values in base


coordinates for the second robot, (when the two arm
option is installed).

WHERE 13 Displays the current transformation values in tool


coordinates for the second robot, (when the two arm
option is installed).

WHERE 14 Displays the commanded motor current value in


amps (option).

WHERE 15 Displays the original encoder data (hexadecimal)


(option).

WHERE 16 Displays the TCP speed in mm/s (option).

June 10, 2003 6-71


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

IO IO/E signal number

Function Displays the current status of all the external and internal I/O sig-
nals.

Parameter Signal number:


1 Displays 1-32, 1001-1032, 2001-2032
2 Displays 33-64, 1033-1064, 2033-2064
3 Displays 65-96, 1065-1096, 2065-2096
4 Displays 97-128, 1097-1128, 2097-2128
If a signal is not specified Displays 1-32, 1001-1032, 2001-2032

Explanation If the system switch DISPIO_01 is OFF, “o” is displayed for signals
that are ON, “x” is for signals that are OFF. Dedicated signals are
displayed in uppercase letters (O and X). If the system switch
DISPIO_01 is ON, “1” is displayed for signals that are ON and “0” for
signals that are OFF. A hyphen (-) is displayed for external I/O
signals that are not installed.

If “/E” is entered with the command, signal numbers 3001 and


above are displayed along with the signals numbered 1-32, 1001-
1032, 2001-2032, and 3001-3032 (Optional).

The display updates continuously until the display is terminated


using the ENTER key. For more information on the DISPIO_01
system switch refer to unit 8.

Example With the DISPIO_01 system switch OFF.

>IO
32- 1 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxo
1032-1001 xxxx xxxx xxxx xxxx xxxx xxxx xxxx oxxx
2032-2001 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
>

>IO/E
32- 1 xxxx xxxx xxxx xxXX xxxx XXXX XXXO XXXO
1032-1001 xxxx xxxx xxxx xxXX xxxx XXXX XXXO XXXO
2032-2001 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
3032-3001 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
>

6-72 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

With the DISPIO_01 system switch ON.

>IO
32- 1 0000 0000 0000 0000 0000 0000 0001 0001
1032-1001 0000 0000 0000 0000 0000 0000 0000 1000
2032-2001 0000 0000 0000 0000 0000 0000 0000 0000
>

FREE FREE

Function Displays the amount of memory available in percentage and bytes.

Example >FREE
Total memory 262144 bytes

Available memory size 262128 bytes (99%)

June 10, 2003 6-73


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

TIME TIME year-month-day hour:minute:second

Function Used to set or display the current time and date.

Parameter year–month–day hour: minute: second


Use the format above to set the time and date as described below.
When setting “hour: minute: second”, the parameter “year – month –
day” cannot be omitted. The values set are displayed followed by
the message “Change?”

Explanation This command sets the calendar within the controller. The value
ranges for each element are as shown below:

Year (00–99)
Month (01–12)
Day (01–31)
Hour (0–23)
Minute (0–59)
Second (0–59)

The current time, or the value input, is displayed followed by the


message “Change?” To change the data, enter new values and
press the ENTER key. To terminate the TIME command Press the
ENTER key.

Example >TIME 02-04-29 [Link]

>TIME
Current time 02-04-29 [Link]

Change? (If not, Press RETURN only)

02-05-17
Current time 02-05-17 [Link]

Change? (If not, Press RETURN only)


>

6-74 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

ULIMIT ULIMIT joint displacement values

LLIMIT LLIMIT joint displacement values

Function Used to set or display the upper/lower limits of robot motion range.

Parameter Joint displacement values:


Specifies the software limit (upper or lower) in joint displacement
values. If this parameter is not specified, the current value is dis-
played.

Explanation If the parameter is specified, the new values entered are displayed
followed by the message “Change?”. Enter any value adjustments
after the change message, and press the ENTER key to complete
the procedure.

Example Display and change the current settings:


>ULIMIT
JT1 JT2 JT3 JT4 JT5 JT6
maximum 120.00 60.00 60.00 190.00 115.00 270.00
Current 30.00 15.00 25.00 -40.00 60.00 15.00
Change?(If not, Press RETURN only)

>110,50
JT1 JT2 JT3 JT4 JT5 JT6
maximum 120.00 60.00 60.00 190.00 115.00 270.00
Current 110.00 50.00 25.00 -40.00 60.00 15.00
Change?(If not, Press RETURN only)

Set the upper software limit to the pose defined as


“#upper”.
>ULIMIT #upper

Set the lower software limit to the pose defined as


“#low”.
>LLIMIT #low

June 10, 2003 6-75


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

BASE BASE transformation values

Function Defines the base transformation values, used to determine the pose
relation between the base coordinates and the null base coordi-
nates.

Parameter Transformation values (or compound transformation values):


Used to define new base coordinates. The BASE transformation
values describe the configuration of the base coordinates with
respect to the null base coordinates, expressed in null base coordi-
nates. If no values are entered, the current base transformation
values are displayed

Explanation If “NULL” is designated for the parameter, the base transformation


values are set as “null base” (XYZOAT=0, 0, 0, 0, 0, 0,). When the
system is initialized, the base transformation values are automati-
cally set to null base.

After a new base transformation value is set, the values (XYZOAT)


and the message “Change?” are displayed. To change the values,
enter new values separated by commas and press the ENTER key.
If a parameter is not specified, the current BASE values are dis-
played.

When the robot moves to a pose defined by transformation values


or is jogged in base mode, the system automatically calculates the
robot pose taking in consideration the base transformation values
defined using the BASE command.

When a pose variable is used as the parameter and that pose


variable is redefined, the base transformation must also be rede-
fined using the BASE command and the newly defined pose as the
parameter. The change in the pose variable is reflected to the base
transformation.

The BASE command has no effect on poses defined by joint dis-


placement values.

6-76 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

When the robot moves to a pose the destination is different if the


base transformation is changed. The example below shows how
the robot moves to the same pose differently if the base transforma-
tion is changed.

>BASE abc

>DO JMOVE def

>BASE NULL

>DO JMOVE def

Y
Z
Y
X
def

Null Base Coordinate X

Y
Z
Y
X
def

abc Base Coordinate X

June 10, 2003 6-77


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Example Display the current base transformation values.


>BASE
X[mm] Y[mm] Z[mm] O[deg] A[deg] T[deg]
-300.0 0.0 0.0 0.0 0.0 0.0
Change?(If not, Press RETURN only)

Change the base transformation value to null base.


>BASE NULL
(X, Y, Z, O, A, T=0, 0, 0, 0, 0, 0)

Change the base transformation value to the pose described by the


pose variable “abc”.

>BASE abc

6-78 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

TOOL TOOL transformation values

Function Defines the tool transformation values that specify the position and
orientation relationship between the tool coordinates and the null
tool coordinates.

Parameter Transformation values (or compound transformation values):


Defines the new tool coordinates. The transformation values de-
scribe the pose of the tool coordinates with respect to the null tool
coordinates, expressed in null tool coordinates. If no values are
entered, the current tool transformation values are displayed.

Explanation If “NULL” is designated for the parameter, the tool transformation


values are set at “null tool” (XYZOAT=0, 0, 0, 0, 0, 0,). The null tool
coordinates have their origin at the center of the tool mounting
flange and the axes are parallel to the axes of the robot’s last joint.
When the system is initialized, the tool transformation values are set
automatically at the null tool.

After a new tool transformation is set, the values (X, Y, Z, O, A, T)


and the message “Change?” are displayed. To change the values,
enter the new values separated by commas and press ENTER. If
no parameter is specified the current values are displayed.

When the robot moves to a pose defined by transformation values


or is jogged in base mode or tool mode, the system automatically
calculates the robot pose taking in consideration the tool transfor-
mation values defined by the tool transformation.

When a pose variable is used as the parameter and if that pose


variable is redefined, the tool transformation must also be redefined
using the TOOL command and the newly defined pose as the
parameter. The change made in the pose variable is reflected to
the tool transformation. For more information, refer to section 12.4,
Tool Transformation.

Example Change the pose of the tool coordinates to the pose described by
the pose variable “grip”.

>TOOL grip

Change the tool transformation values to null tool.

>TOOL NULL
(X, Y, Z, O, A, T)=(0, 0 ,0 ,0 ,0 ,0)
June 10, 2003 6-79
Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

SETHOME SETHOME accuracy,HERE

SET2HOME SET2HOME accuracy, HERE

Function Sets and displays the HOME position.

Parameter Accuracy:
Sets the accuracy range of the HOME position in millimeters.

The robot is at the HOME position when it nears HOME by the


distance specified here. If not specified, the default value 1 mm is
assumed.

The accuracy does not affect the robots move to the HOME posi-
tion. The accuracy determines when the dedicated HOME position
output signal is sent.

The signal is sent when the robot is within the accuracy range of the
set HOME position.

HERE:
Sets the current robot pose as HOME or HOME 2.

Explanation If parameters are not entered, the current values are displayed
followed by the message “Change?” Enter the new value and press
the ENTER key. If no change is made, press the ENTER key only.

Two HOME positions (HOME1 and HOME2) can be set in the AS


system. HOME 1 is set using SETHOME command, HOME 2 using
SET2HOME command.

6-80 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Example Change the HOME position by entering new values and set the
accuracy to 2 mm.

>SETHOME 2

JT1 JT2 JT3 JT4 JT5 JT6 accuracy[mm]


0.0 0.0 0.0 0.0 0.0 0.0 2
Change? (If not, Press RETURN only)
,90,-90
JT1 JT2 JT3 JT4 JT5 JT6 accuracy[mm]
0.0 90.0 -90.0 0.0 0.0 0.0 2
Change? (If not, Press RETURN only)
>

Set the current robot pose as the HOME position and set the accu-
racy to 10 mm.

>SETHOME 10,HERE

ERRLOG ERRLOG

Function Used to display the error log.

Explanation Used to display the last one hundred errors. When the display
reaches the end of the screen, press the spacebar to continue
viewing. Errors are listed in chronological order. The error log is
also accessed through auxiliary function 0702.

Example >ERRLOG
1-[02/07/17 [Link] (SIGNAL:00)
(D1016)

OPLOG OPLOG

Function Used to display the last one hundred operations in the format
shown below. When the display reaches the end of the screen,
press the spacebar to continue viewing. The oplog is also accessed
through auxiliary function 0703.

Example >OPLOG
1-[02/07/17 [Link] (SIGNAL:00) [PNL]

June 10, 2003 6-81


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

SWITCH SWITCH switch name, switch name,...=ON


SWITCH switch name, switch name,...=OFF

Function Used to display and change system switch settings.

Parameter Switch name:


Specifies the system switch to display or change setting. If not
specified, all the switches are displayed. More than one switch
name can be entered separating each switch name by commas.

ON or OFF:
Sets the specified system switch(es) to ON or OFF. If this param-
eter is not entered, the switch setting is displayed.

Example Display all system switches and settings.

>SWITCH
*POWER ON *REPEAT ON
*RUN ON *CS OFF
*RGSO OFF *ERROR OFF
*TRIGGER ON *TEACH LOCK OFF
[Link] OFF CP ON
[Link] OFF [Link] ON
[Link] OFF QTOOL OFF
REP ONCE OFF RPS OFF
STP ONCE OFF [Link] ON
MESSAGES ON SCREEN ON
[Link] OFF [Link] OFF
[Link] OFF [Link] OFF
DISPIO 01 OFF [Link] OFF
FLOWRATEOFF SPOT OP OFF
>

Set the SCREEN and MESSAGE switches to OFF.

>SWITCH SCREEN, MESSAGE = OFF

SCREEN OFF
MESSAGE OFF
>

6-82 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

ON switch name, switch name,... ON

Function Used to set the specified system switch(es) to ON.

Parameter Switch name:


One or more system switch names can be entered, separated by
commas.

To display the current system switch settings, use the SWITCH


command.

Example Set the MESSAGES system switch to ON.

>MESSAGES ON

Set the SCREEN and MESSAGES system switches to ON.

>SCREEN, MESSAGES ON

OFF switch name, switch name,... OFF

Function Used to set the specified system switch(es) to OFF.

Parameter Switch name:


One or more system switch names can be entered, separated by
commas.

Use the SWITCH command to display the current system switch


settings.

Example Set the MESSAGES system switch to OFF.

>MESSAGES OFF

Set the SCREEN and MESSAGES system switches to OFF.

>SCREEN, MESSAGES OFF

June 10, 2003 6-83


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

ZSIGSPEC ZSIGSPEC

Function Used to display and set the number of external and internal I/O
signals.

Explanation The current setting and the message “Change?” are displayed. This
command changes only the software setting. Ensure the number of
signals corresponds with the hardware setting.

DO = external output signal

DI = external input signal

INT = internal signal

Example >ZSIGSPEC
DO, DI, INT
64 64 64

Change? (If not, Press RETURN only)


32,32,32

DO, DI, INT


32 32 32

Change? (If not, Press RETURN only)

6-84 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

HSETCLAMP HSETCLAMP

Function Used to assign signal numbers to operate material handling clamps.

Example Set clamp 3 as a double solenoid type.

>HSETCLAMP

Clamp 1 Clamp 2 Clamp 3 Clamp 4


Spot weld Handling Not used Not used
‘ON’[Link] 10 0 24 24
‘OFF’[Link] 9 11 0 0
Clamp 5 Clamp 6 Clamp 7 Clamp 8
Not used Not used Not use Not used
‘ON’[Link] 24 24 24 24
‘OFF’[Link] 0 0 0 0
Clamp number (1~8, ENTER only:No change,CTRL+C:Exit)3
Define as Handling clamp?

(1:Defined as Handling clamp, 0:Not used, ENTER only:No change, CTRL+C Exit)1
For single solenoid valve, define one signal.
For double solenoid valve, define both.
‘ON’[Link]
(0:Not used, ENTER only:No change, CTRL+C:Exit) Change?12
‘OFF’[Link]
(0:Not used, ENTER only:No change, CTRL+C:Exit) Change?13

Clamp 1 Clamp 2 Clamp 3 Clamp 4


Spot weld Handling Handling Not used
‘ON’[Link] 10 0 12 24
‘OFF’[Link] 9 11 13 0
Clamp 5 Clamp 6 Clamp 7 Clamp 8
Not used Not used Not used Not used
‘ON’[Link] 24 24 24 24
‘OFF’[Link] 0 0 0 0
Clamp number (1~8, ENTER only:No change,CTRL+C:Exit)

June 10, 2003 6-85


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

NOTE
Always use the clamps in order from 1 to 8; i.e., clamp 5
cannot be used without using clamp 4.

CTRL+C (exit) cannot be used from the teach pendant


keyboard screen.

6-86 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

DEFSIG DEFSIG INPUT

DEFSIG DEFSIG OUTPUT

Function Used to set and display dedicated signals.

Parameter INPUT:
INPUT, abbreviated I, displays the dedicated input signals. The
dedicated signals can be changed from this display screen.

If a parameter is not entered, the dedicated signals are displayed


and cannot be changed.

OUTPUT:
OUTPUT, abbreviated O, displays the dedicated output signals. The
dedicated signals can be changed from this display screen.

If a parameter is not entered, the dedicated signals are displayed


and cannot be changed.

Explanation The signals used as dedicated signals are shown below.

Dedicated Input Signals Dedicated Output Signals


EXT. MOTOR ON MOTOR_ON
EXT. ERROR RESET ERROR
EXT. CYCLE START AUTOMATIC
EXT. PROGRAM RESET CYCLE START
Ext prog. select(JUMP) TEACH MODE
JUMP_ON HOME1, HOME2
JUMP_OFF POWER ON
Ext. prog. select (RPS) RGSO
RPS_ON Ext. prog. select (JUMP)
EXT_IT JUMP_ST
[Link] REPEAT MODE Ext. prog. select (RPS)
RPS_ST

The following functions are available while editing dedicated signals:


L–previous signal
N–next signal
Q–cancel operation, changes are not saved
E–exit, changes are saved

June 10, 2003 6-87


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

NOTE
External program selection:
When selecting JMP as a dedicated signal, signals
JMP_ON, JMP_OFF, JMP_ST are also automati-
cally set as dedicated. JMP_ST is an output signal
but is set using the DEFSIG INPUT command.

When selecting RPS signal as a dedicated signal,


signals RPS_ON, RPS_ST are also automatically
set as dedicated signals. RPS_ST is an output sig-
nal but is set using the DEFSIG INPUT command.

RPS code:
If at least one of the following signals is selected as
a dedicated signal, a prompt is displayed and an
RPS code must be set.
JMP, RPS or EXT. PROGRAM RESET

Signal numbers:
Signals can be set within the following range: Dedi-
cated output signals: 1 ~ number of signals in-
stalled. Dedicated input signals: 1001 ~ number of
signals installed.

Others:
If a signal number is assigned as a dedicated sig-
nal, it cannot be assigned to another dedicated sig-
nal nor used as a general purpose signal.

6-88 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Example Display the currently set dedicated signals.

>DEFSIG

Dedicated signals are set


EXT. MOTOR ON = 1032
EXT. ERROR RESET = 1031
EXT. CYCLE START = 1030
MOTOR ON = 32
ERROR = 31
AUTOMATIC = 30
Condition : Panel switch in RUN.
Condition : Panel switch in REPEAT.
Condition : Repeat continuous.
Condition : Step continuous.
CYCLE START = 29
TEACH MODE = 28
HOME1 = 27
>

Reset (cancel) MOTOR ON, change the AUTOMATIC signal to 30,


set the TEACH MODE dedicated signal to 3.

>DEFSIG OUTPUT
MOTOR ON Dedication cancel? (Enter 1 to cancel.)1
ERROR Dedication cancel? (Enter 1 to cancel.)
Signal number 31 Change? (1-32)
AUTOMATIC Dedication cancel? (Enter 1 to cancel.)
Signal number 2 Change? (1-32) 30
CYCLE START Dedication cancel? (Enter 1 to cancel.)
Signal number 29 Change? (1-32)
TEACH MODE Dedication set? (Enter 1 to set.) 1
Signal number 0 Change? (1-32) 3
HOME1 Dedication cancel? (Enter 1 to cancel.)
>

June 10, 2003 6-89


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

ZZERO ZZERO joint number

Function Sets the encoder value to correspond to a robot’s known mechani-


cal position. Also, the current amount of offset between the robot
mechanical position and the encoder origin (zeroing data) can be
displayed using this command.

Parameter Joint number:


To reset the encoder rotation count enter the joint number plus 100.
To reset the encoder rotation count for JT2, enter:

ZZERO 102

If “100” is entered as the joint number, all the joints are reset to 0°.

Encoder zeroing data:


To set the encoder zeroing data for joint two, enter:

ZZERO 2

If “0” is entered as the joint number, zeroing data for all joints is set
at 0°.

If a joint number is not specified, the current encoder data and the
zeroing data are displayed.

NOTE
Reset encoder rotation count before setting the zeroing
data.

6-90 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

! CAUTION
The zzero command is used to:

Check for changes in zeroing data when the


position of the arm is abnormal.

To correct zeroing data when it is changed


unexpectedly.

When zeroing data is changed, the values used for ro-


bot poses is also changed.

The same program poses and trajectory are different


before and after zeroing data is changed.

Example Display zeroing data.

>ZZERO

JT1 JT2 JT3 JT4 JT5 JT6


Set data 268435456 268435456 268435456 268435456 268435456 268435456
Current 268435456 268435456 268435456 268435456 268435456 268435456

Change? (If not, hit RETURN only)

JT1 JT2 JT3 JT4 JT5 JT6


OFFSET 0 0 0 0 0 0

Change? (If not, hit RETURN only)

Figure 6-11 Zeroing Data Display

June 10, 2003 6-91


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Example Reset the encoder rotation counter for all joints.

>ZZERO 100
**Encoder rot. counter reset (all joints)**
Are you sure? (Enter 1 to execute) 1
Setting complete.
>

Figure 6-12 Reset Encoder Rotation Counter for All Joints Example

Reset the encoder rotation counter for joint 2 at the specified joint
position.

>ZZERO 102
**Encoder rot. counter reset (joint 2)**
Current angle (deg, mm) ? 0
Are you sure? (Enter 1 to execute) 1
Setting complete.
>

Figure 6-13 Reset Encoder Rotation Counter for Joint 2 Example

Set the zeroing data so the current pose is 0°.

>ZZERO 0

JT1 JT2 JT3 JT4 JT5 JT6


Set data 268427264 268427264 268427264 268427264 268427264 268427264
Current 268427264 268427264 268427264 268427264 268427264 268427264
Set current values of all joints as zeroing data? (Enter 1 to set) 1

Setting complete.

Figure 6-14 Set Zeroing Data Example

6-92 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Example Set the encoder value describing the current pose of joint 2 as 0°.

>ZZERO 2
Current angle (deg, mm) ? 0
Change? (If not, Press RETURN only.)
Encoder value? Current=268435456, Enter 1 to set current value) 1
Zeroing value=268435456 (268419072-268451840) OK? (Enter 0 to change)
Setting complete.
>

Figure 6-15 Set Encoder Data Example

June 10, 2003 6-93


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

ERESET ERESET

Function Used to reset an error condition. The operation is identical to the


ERROR RESET button on the operation panel.

Explanation When the ERESET command is executed, the ERROR_RESET


signal is generated. This command is ineffective when an error is
continuous.

SYSINIT SYSINIT

Function Deletes all program and data in the memory and initializes (sets to
default values) defined parameters.

Explanation Initializes the system and deletes all programs, pose variables,
numeric variables, and string variables.

NOTE
All programs and variables are deleted from memory
when the SYSINIT command is executed.

6-94 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

HELP HELP alpha character


HELP/M alpha character
HELP/P alpha character
HELP/F alpha character
HELP/PPC alpha character
HELP/MC alpha character
HELP/DO alpha character
HELP/SW alpha character

Function Used to display a list of AS Language commands, program instruc-


tions, functions, or system switches.

Parameter Alpha character:


Specifies the letter in the alphabet the command, or instruction,
begins with. If omitted, all the commands and instructions are
displayed.

Entering the HELP alpha character command displays the monitor


commands or program instructions starting with that alphabetic
character. Entering the HELP/F alpha character command displays
the functions starting with that alphabetic character.

Explanation Entering HELP only, displays a list of monitor command and pro-
gram instructions.

HELP/M lists the monitor commands.

HELP/P lists the program instructions.

HELP/F lists functions.

HELP/PPC lists program instructions usable in PC programs.


(Option)

HELP/MC lists monitor commands usable with the MC instruction.


(Option)

HELP/DO lists program instructions usable with DO command.


(Option)

HELP/SW lists system switches. (Option)

For some commands and instructions, the parameters are also


displayed.

June 10, 2003 6-95


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Example Display monitor commands.

>HELP/M
ABORT BASE BITS BATCHK CONTINUE COPY DEFSIG
DELETE DIRECTORY DLYSIG DO EDIT ERESET ERRLOG

Figure 6-16 Display Monitor Commands Example

Display functions.

>HELP/F
#DEST #PPOINT $CHR $DECODE $ENCODE $ERROR
$LEFT $MID $RIGHT $SPACE ABS ASC

Figure 6-17 Display Function Example

6-96 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

ID ID

Function Used to display the version of the software installed in the controller.

Explanation Displays the following information:

Robot name: name of the currently connected robot


Joint number: number of joints of the robot
Serial number: serial number of the robot
Software version: AS software version number
Servo: servo software version number
Number of signals: total number of output, input, and internal
signals available in the system
Clamp number: total number of clamps available in the system
Motion type: robot motion type
Servo type: servo software type

! CAUTION
If the ID information displayed does not match the robot
model connected to the controller, DO NOT engage mo-
tor power or operate the robot system.

Contact Kawasaki customer service Immediately.

Example Display the software version.

>ID
Robot name :FS006-E001 Num of axes: 6 Serial No. 1

Software version :version 000004-04...97/01/27 13:11


Servo :SAOA00-ZX165-01
Number of signals:output=32 input=32 internal=256
Clamp number :2 MOTION TYPE:1 SERVO TYPE:1

Figure 6-18 Display Software Version Example

June 10, 2003 6-97


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

WEIGHT WEIGHT load mass, center of gravity location X, center of


gravity location Y, center of gravity location Z, inertia
moment ab. X axis, inertia moment ab. Y axis, inertia
moment ab. Z axis

Function Used to set the load mass data (weight of tool and workpiece). The
data is used to determine the optimum acceleration for the robot
axes.

Parameter Load mass:


The mass of the tool and work (in kilograms). Range: 0.0 to the
maximum load ability (kg).

Center of gravity location (unit = mm):


X the x value of the center of gravity in tool coordinates
Y the y value of the center of gravity in tool coordinates
Z the z value of the center of gravity in tool coordinates

Inertia moment about X axis:


Inertia moment about Y axis:
Inertia moment about Z axis (Option):

Used to set the inertia moment around each axes. The unit is
kg·m2. The inertia moment about each axis is defined as the mo-
ment around the coordinates axes parallel to the null tool coordi-
nates with the center of rotation at the tool’s center of gravity.

Explanation If parameters are not specified, the current value is displayed fol-
lowed by the message “Change?”.

! CAUTION
Always set the correct load mass and center of gravity
location. Incorrect data may weaken or shorten robot
parts serviceability or cause overload/deviation errors.

6-98 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

BATCHK BATCHK

Function Used to enable or disable the battery low voltage check.

Explanation >BATCHK
BATTERY ERROR CHECK (0:Ineffect, 1:Effect)
(Enter only: No change ^C:Exit): Now 1 Change ?

If a change is not made, press ENTER.

Enter 0 to disable battery check and 1 to enable battery check.

NOTE
CTRL+C (Exit) cannot be used from the teach pendant
keyboard screen.

ENCCHK_EMG ENCCHK_EMG

Function Used to set an acceptable deviation range when checking the


robot’s pose at an emergency stop, compared to the pose when the
robot is restarted.

Explanation Deviation = [(pose when motor power is reapplied)-


(pose after an emergency stop)]

An acceptable deviation range can be set for each joint. If 0.0 is


set, the deviation check is not performed. Settings that are too
small may generate an error when the robot is operating within
specifications.

June 10, 2003 6-99


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

ENCCHK_PON ENCCHK_PON

Function Used to set the acceptable range for the difference in encoder
values from when the controller power is set to ON, compared to
the encoder values when the power was set to OFF.

Explanation Acceptable range = [(encoder value at power ON)-(Encoder value


at power OFF)]

An acceptable range can be set for each joint. Settings that are too
small may generate an error when the robot is operating within
specifications.

SLOW_REPEAT SLOW_REPEAT

Function Used to set repeat speed for slow repeat mode.

Explanation >SLOW_REPEAT
SLOW REPEAT MODE Speed (1~25%)
(Enter only: No change ^C:Exit): Now 10 Change ?

If a change is not made, press ENTER.

To change the slow repeat speed, enter the new value and press
the ENTER key.

NOTE
CTRL+C (Exit) cannot be used from the teach pendant
keyboard screen.

6-100 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

REC_ACCEPT REC_ACCEPT

Function Enables or disables RECORD and PROGRAM CHANGE functions.

Explanation >REC_ACCEPT
RECORD(0:Enable, 1:Disable)
(Enter only: No change ^C:Exit): Now 0 Change ?
PROGRAM CHANGE(0:Enable, 1:Disable)
(Enter only: No change ^C:Exit): Now 0 Change ?

Enter 0 to enable RECORD or PROGRAM CHANGE. Enter 1 to


disable RECORD or PROGRAM CHANGE.

NOTE
CTRL+C (Exit) cannot be used from the teach pendant
keyboard screen.

If PROGRAM CHANGE is disabled, the message “Pro-


gram change inhibited. Set ACCEPT and operate
again.” is displayed when the EDIT command is ex-
ecuted.

June 10, 2003 6-101


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

ENV_DATA ENV_DATA

Function Used to set hardware environmental data for the auto servo OFF
timer and the status of the teach pendant (connected or discon-
nected).

Explanation >ENV_DATA
AUTO SERVO OFF TIMER(0:Servo not off)
(Enter only: No change ^C:Exit): Now 0 Change ?

If a change is not made, press ENTER. Enter 0 to disable the auto


servo OFF timer. Enter the time in seconds to delay the auto servo
OFF timer to enable the function.

When ENTER is pressed the teach pendant environmental data


option is displayed.

TEACH PENDANT(0:Connect, 1:Disconnect)


(Enter only: No change ^C:Exit): Now 0 Change ?

If a change is not made, press ENTER. To operate the robot with-


out the teach pendant connected, enter 1. When the teach pendant
is disconnected a dummy plug (E-stop circuit jumper) must be
installed to operate the robot.

NOTE
CTRL+C (Exit) cannot be used from the teach pendant
keyboard screen.

6-102 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

ENV2_DATA ENV2_DATA

Function Used to set the software environmental data for the teach pendant
or an external terminal [a personal computer (PC)].

Explanation >ENV2_DATA
TEACH PENDANT(0:Connect, 1:Disconnect)
(Enter only: No change ^C:Exit): Now 0 Change ?

If a change is not made, press ENTER. To operate the robot with-


out the teach pendant connected, enter 1. When the teach pendant
is disconnected a dummy plug (E-stop circuit jumper) must be
installed to operate the robot.

When ENTER is pressed the terminal environmental data option is


displayed.

TERMINAL(0:Connect, 1:Disconnect)
(Enter only: No change ^C:Exit): Now 0 Change ?

If a change is not made, press ENTER. The terminal that is usually


connected is a PC.

NOTE
CTRL+C (Exit) cannot be used from the teach pendant
keyboard screen.

June 10, 2003 6-103


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

CHSUM CHSUM

Function Used to enable or disable the check sum error reset function.

Explanation >CHSUM
CLEAR CHECK SUM ERROR (0:Ineffect, 1:Effect)
(Enter only: No change ^C:Exit): Now 0 Change ?

If 0 is entered, the error is not reset. If 1 is entered the error is


reset. The default setting is 0. CHSUM is reset to 0 when controller
power is set to OFF.

If the CHSUM function cannot reset the error the message shown
below is displayed.

>CHSUM
Cannot clear check sum error. Check the following command or
auxiliary data.
ZZERO
DEFSIG
:
:
>

If any data still contains an abnormal check sum, the message in


the first example “CLEAR CHECK SUM ERROR” is not displayed.
The message in the second example “Cannot clear check sum
error” is displayed with additional troubleshooting information.

NOTE
CTRL+C (Exit) cannot be used from the teach pendant
keyboard screen.

6-104 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

PLCAOUT PLCAOUT data number=real value

Function Used to set a real number value to the specified data number.
(Option)

Parameter Data number=output data number specified as a whole number


between 1 and 32.

Real value=real number value assigned to the output data number,


entered in decimal notation (can be set as a variable name). The
acceptable range is between 0 and 6,5535.

NOTE
This command is only available if the “Built-in Se-
quencer Function” is set to ON. If the option is OFF, the
error massage “(E1102) Cannot execute, no option set
up. - Check option specs.” is displayed.

Example <PLCAOUT 13=120

Assigns 120 (decimal notation) to data number 13.

June 10, 2003 6-105


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

TPLIGHT TPLIGHT

Function Illuminates the teach pendant backlight.


(Option)

Explanation If the teach pendant backlight is OFF, this command illuminates the
backlight. If this command is used when the backlight is ON, the
backlight remains on for 600 seconds.

IPEAKLOG IPEAKLOG

Function Used to display the peak motor current for each robot axis.

Explanation When the IPEAKLOG command is executed, the program name,


step number, effective current value [Arms], and the ratio of the
peak value to motor limit) when the motor torque is at the highest
point for each joint) are displayed.

>IPEAKLOG

Log since 00/1/24 [Link]

Joint Program Step Effective current Date


JT1 pg223 5 4.1[Arms] 29.5[%] 00/1/24 13:44
JT2 pg223 13 1.4[Arms] 9.8[%] 00/1/24 13:44
JT3 pg223 10 13.7[Arms] 98.2[%] 00/1/24 13:44
JT4 pg223 1 2.1[Arms] 55.5[%] 00/1/24 13:45
JT5 pg223 7 2.4[Arms] 64.8[%] 00/1/24 13:45
JT6 pg223 4 1.0[Arms] 27.8[%] 00/1/24 13:45

IPEAKCLR IPEAKCLR

Function Clears the peak current value log and restarts logging values.

Explanation The logged values are reset using the IPEAKCLR command, the
SYSINI command, or by initializing the system using bit 8 of SW2
on the 1KA board.

Example >IPEAKCLR
Are you sure? (Yes:1,No:0)
>

6-106 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

OPEINFO OPEINFO robot number: joint number


(Option)

Function Used to display the robot operation information.

Parameter Robot number:


Specifies the robot if more than one robot is controlled by the con-
troller.

Joint number:
Specifies the joint number information to display. If the joint number
is not specified information for all joints is displayed.

Example >OPEINFO
Operation Info. (02/1/14 [Link] -) (FILE LOAD 02/1/14)
Control ON 0.2[H]
Servo ON 0.1[H]
Motor ON 4 times
Servo ON 10 times
Emergency stop (while in motion) 2 times
JT1
Operation hour 0.1[H]
Operation distance 301.28 [x100 deg, mm]
JT2
Operation hour 0.1[H]
Operation distance 193.84 [x100 deg, mm]
:

NOTE
The first line shows the date and time the data accumu-
lation started.

The limits of data accumulation are:


Hours [H]–69 years
Times–approximately 2,000 million times (1176 years if
operated 10,000 times daily)
Degrees, millimeters–12.5 years if operated at
500 mm/s

June 10, 2003 6-107


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

OPEINFOCLR OPEINFOCLR
(Option)

Function Used to reset the operation information.

6-108 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

6.7 BINARY SIGNAL COMMANDS

This section describes the system control commands and parameters.

Table 6-7 lists the binary signal commands and provides a brief description of the func-
tions.

Detailed descriptions follow.

Table 6-7 Binary Signal Commands

Command Description Page


RESET Used to set all external I/O signals to OFF. 6-110
SIGNAL Used to set output signals OFF or ON. 6-111
PULSE Used to set an output signal ON for a specified time. 6-112
DLYSIG Used to set an output signal ON after a specified time has elapsed. 6-112
BITS Used to set a group of signals equal to a specified value. 6-113
Used to count signal pulses and set the signal ON at the specified count
SCNT 6-114
(option).
SCNTRESET Used to reset the SCNT count to 0 (option). 6-115
SFLK Used to set a signal ON/OFF (flicker signal) (option). 6-115
SFLP Used to set a signal ON/OFF using SET/RESET signals (option). 6-116
SOUT Used to output a signal when specified condition is met (option). 6-117
STIM Used to set a timer signal ON when specified signal is ON (option). 6-119
SETPICK Used to set the time to star t clamp close control (option). 6-120
SETPLACE Used to set the time to star t clamp open control (option). 6-120

NOTE
The D series controller uses two types of binary signals.

External I/O signals are used between the controller


and external devices.

Internal I/O signals are used within the controller. Inter-


nal I/O signals are used between robot control and PC
programs, or as test signals to check programs before
connecting external devices.

June 10, 2003 6-109


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

RESET RESET

Function When the RESET command is executed all external output signals
are set to OFF, except:

• Dedicated signals

• Clamp signals

• Antinomy multifunction OX/WX signals

If the optional setting is available, the interface panel signals are not
affected by this command.

! CAUTION
The RESET command sets all output signals to OFF
(except those listed above) in teach or repeat mode.

6-110 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

SIGNAL SIGNAL signal number, signal number, ...

Function Used to set the specified signal(s) to ON or OFF.

Parameter Signal number:


Specifies the external output or internal signal to set to ON or OFF.

Explanation The signal number identifies the signal type as external or internal.

Acceptable signal numbers:


External output signals: 1–number of installed signals
Internal signals: 2001–2256
External input signals—cannot be specified for SIGNAL command

If the signal number is positive the signal is set ON. If the signal
number is negative the signal is set OFF. An error occurs if a dedi-
cated signal number is specified.

Example >SIGNAL -1,4,2010

External output signal 1 is set OFF, 4 is set ON, and Internal signal
2010 is set ON.

>Signal -reset,4

If the value of the variable “reset” is positive, the output signal desig-
nated by “reset” is set OFF, and output signal 4 is set ON.

June 10, 2003 6-111


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

PULSE PULSE signal number,time

Function Used to set the specified signal to ON for the specified time.

Parameter Signal number:


Specifies the external output or internal signal to set to ON (positive
values only). An error occurs if a dedicated signal number is speci-
fied.

Acceptable signal numbers:


External output signals: 1–number of installed signals up to 64
Internal signals: 2001–2256
External input signals—cannot be specified for PULSE command

Time:
Specifies the time in seconds the signal remains ON. If the time
parameter is not specified 0.2 seconds is used.

DLYSIG DLYSIG signal number,time

Function Used to set the specified signal to ON after the specified time is
elapsed.

Parameter Signal number:


Specifies the external output or internal signal to set to ON or OFF.

If the signal number is positive the signal is set ON. If the signal
number is negative the signal is set OFF. An error occurs if a dedi-
cated signal number is specified.

Acceptable signal numbers:


External output signals: 1–number of installed signals
Internal signals: 2001–2256
External input signals—cannot be specified for DLYSIG command

Time:
Specifies the delay time before the specified signal is set to ON or
OFF.

6-112 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

BITS BITS starting signal number,number of signals=value

Function Used to arrange a group of external output signals or internal sig-


nals into a binary bit pattern. The signal states are set ON/OFF
according to the binary equivalent of the decimal value specified. If
a value is not specified, the current signal states are displayed.

Parameter Starting signal number:


Specifies the first signal number of the binary bit pattern.

Number of signals:
Specifies the number of signals in the binary bit pattern.

Decimal value:
Specifies the decimal value used to set ON or OFF signal states.
The decimal value is converted into binary notation and each bit of
the binary value is used to set the signal states starting at the least
significant bit. If the binary notation of the value has more bits than
the number of signals specified, only the state of the specified
number of signals are set and the remaining bits are ignored.

If the decimal value is omitted, the current signal states are dis-
played.

Explanation Used to set/reset the signal state of external output signals or


internal signals, according to the specified decimal value.

Acceptable signal numbers:


External output signals: 1–number of installed signals
Internal signals: 2001–2256
External input signals—cannot be specified for BITS command

An error occurs if a signal number is specified that is greater than


the number of installed signals or a dedicated signal number is
specified.

Example >BITS 2001,3


Displays the values of internal signals 2001–2003.

>BITS 1,8=100
External output signals 1–8 are set to the binary notation of 100
(01100100). Bits designated as “1” are set ON and bits designated
as “0” are set OFF.

June 10, 2003 6-113


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

SCNT SCNT counter signal number, count up signal, count down


(Option) signal, counter clear signal, counter value

Function Used to set the specified counter signal number to ON when the
specified counter value is reached.

Parameter Counter signal number:


Specifies the signal number to set to ON. Counter signal numbers
are 3097 to 3128

Count up signal:
Specified by a signal number or a logical expression. When the
signal state changes from OFF to ON, the count increases by 1.

Count down signal:


Specified by a signal number or a logical expression. When the
signal state changes from OFF to ON, the count decreases by 1.

Counter clear (reset) signal:


Specified by a signal number or a logical expression. When the
signal state changes from OFF to ON, the count is set to 0.

Counter value:
When the internal counter reaches the specified value the specified
signal number is set to ON. If “0” is specified the signal is set to
OFF.

Explanation When the SCNT command is executed and the count up signal
changes from OFF to ON, the internal counter value increases by 1.
If the count down signal changes from OFF to ON, the internal
counter value decreases by 1.

When the internal counter value reaches the specified value, the
specifies counter signal number is set ON. If the counter clear
(reset) signal changes from OFF to ON, the value of the internal
counter is set to 0. Each counter signal has an individual counter
value. To force reset an internal counter value to 0, use the
SCNTRESET command.

To display the state of internal signals 3001–3128, use the IO/E


command (option).

6-114 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

SCNTREST SCNTRESET counter signal number


(Option)

Function Resets the specified counter signal number count to 0.

Parameter Counter signal number:


Specifies the counter signal number to reset. Counter signal num-
bers are 3097 to 3128

SFLK SFLK signal number=time


(Option)

Function Used to set the specified signal ON/OFF in the specified time cycle.

Parameter Signal number:


Specifies the number of the signal to flicker (set ON/OFF). The
acceptable signal numbers are:
3065–3096

Time:
Specifies the ON/OFF cycle time (real number value). If a negative
value is specified, flickering is canceled.

Explanation The ON/OFF switching is considered one cycle. The ON/OFF cycle
is executed in the specified time.

June 10, 2003 6-115


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

SFLP SFLP output signal=set signal expression,reset signal


(Option) expression

Function Used to set an output signal ON/OFF using a set signal and a reset
signal.

Parameter Output signal:


Specifies the signal number to set ON/OFF based on the state of
the set signal expression and the reset signal expression. A posi-
tive number sets the signal ON and a negative number sets the
signal OFF. External output signals, 1–number of installed signals
can be used.

Set signal expression:


Specifies the signal number or logical expression used to set the
specified output signal ON/OFF.

Reset signal expression:


Specifies the signal number or logical expression used to reset the
specified output signal ON/OFF.

Explanation Positive output signal number:


If the set signal is ON, the output signal is set ON. If the reset
signal is ON, the output signal is set OFF. If the set and reset
signals are ON the output signal is set OFF.

Negative output signal number:


If the set signal is ON, the output signal is set OFF. If the reset
signal is ON, the output signal is set ON. If the set and reset sig-
nals are ON the output signal is set ON.

The output signal is set ON/OFF based on the state of the set and
reset signals when the SFLP command is executed.

6-116 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

SOUT SOUT signal number=signal expression


(Option)

Function Used to set the specified signal number ON when the specified
condition(s) is/are satisfied.

Parameter Signal number:


Specifies the output signal number to set ON, when the signal
expression is satisfied.

Acceptable signal numbers:


External output signals: 1–number of installed signals.

Signal expression:
Specifies a signal number or a logical expression.

Explanation The SOUT command is used for logical calculation of signals.


Logical expressions such as AND and OR are used. The specified
signal number is set ON when the logical expression conditions are
satisfied (see example).

June 10, 2003 6-117


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Example 1001
SOUT 1 = 1001 AND 1002 1
1002

1001
SOUT 1 = 1001 OR 1002 1
1002

1001
SOUT -1 = 1001 AND 1002
1
SOUT 1 = NOT (1001 AND 1002)
1002

1001
SOUT 1 = -1001 AND 1002 1
1002

1001
SOUT 1 = (1001 AND 1002) OR 1003
1002
1
1003

SOUT -1 = 1001
SOUT 1 = -1001 1001 1
SOUT 1 = NOT (1001)

6-118 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

STIM STIM timer signal=input signal number, time


(Option)

Function Used to set the specified timer signal ON, when the specified input
signal is ON for the specified time.

Parameter Timer signal:


Specifies the timer signal number.

Acceptable signal numbers:


Timer signal numbers: 3001–3064

Input signal number:


Specifies the input signal number, or logical expression (in whole
numbers), to monitor as a condition for setting the timer signal ON.

Time:
Specifies (in real numbers) the time, in seconds, the signal is ON
before the timer signal is set ON.

Explanation The monitored input signal must remain ON continuously for the
specified time for the timer signal to be set ON. If the input signal is
set OFF before the specified time elapses, the time count restarts
when the input signal is set ON again.

If the input signal is set OFF, the timer signal is set OFF immedi-
ately. The input signal affects the timer signal only when the STIM
command is executed. The timer signal remains ON, when the
input signal is set OFF, until the STIM command is executed again.

To display the state of internal signals 3001–3128, use the IO/E


command (option).

Example When the PC program test, shown below, is executed and signal 1
is ON for 5 seconds, signal 2 is set ON.

PC program test

STIM 3001 = 1,5


SOUT 2 = 3001

>PCEXECUTE test

June 10, 2003 6-119


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

SETPICK SETPICK time1,time2,...,time8


(Option)

SETPLACE SETPLACE time1,time2,...,time8


(Option)

Function Used to set the time to start the clamp close control (SETPICK) or
open control (SETPLACE) for up to eight clamps.

Parameter Time 1–8:


Determines the control time to open/close clamps (1–8 in seconds).

Acceptable range:
0.0–10.0 seconds

Explanation Refer to section 7.7, Binary Signal Instructions, for information on


clamp operation instructions.

6-120 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

6.8 MESSAGE DISPLAY COMMANDS

This section describes the message display commands and parameters.

Table 6-8 lists the message display commands and provides a brief description of the
functions.

Detailed descriptions follow.

Table 6-8 Message Display Commands

Command Description Page


PRINT Used to display messages and data on the keyboard screen or a PC. 6-122
TYPE Used to display messages and data on the keyboard screen or a PC. 6-122
Used to display the specified character string in a display window on the
IFPWPRINT 6-125
software interface panel.

June 10, 2003 6-121


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

PRINT PRINT device number: print data,print data,...

TYPE TYPE device number: print data,print data,...

Function Used to display messages and data on the specified device.

Parameter Device number:


Specifies the display device.

1: Displays messages and data on a PC


2: Displays messages and data on the teach pendant keyboard ......
screen.

If a device is not specified, the currently active device is selected.

Print data:
One or more of the available data types (shown below) may be
selected, separated by commas.

Character string in quotes


“count =”

Real value expression (value is calculated and displayed)


count

Display format codes


/D,/S

If parameters are not specified a blank line is displayed.

Explanation If “2” is specified for the device number, when the TYPE or PRINT
command is executed, the display automatically switches to the
keyboard screen to display the message or data.

The following specifications are used to control the format of nu-


meric values. The settings are effective for subsequent parameters
until another format is given. In any format, if the value is too large
to be displayed in the specified area, asterisks (*) fill the area. It is
possible to display up to 128 characters in a line. To display more
than 128 characters, use the format /S described on the following
page.

If the MESSAGES switch is OFF, messages and data are not dis-
played on the screen.

6-122 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

TYPE/PRINT format Specification codes

/D Default format. This is the same as /Gm.n, where m=15 characters


and n=8 characters including the decimal except that following
zeros and all spaces except one between the values are removed.

/Em.n The value is displayed in scientific notation, whole numbers in the m


digits field and the fraction in n digits field. The value of m should
be larger than n by six or more, and smaller than thirty-two.

Example: 1.234E+02

/Fm.n The value is displayed in fixed point notation, whole numbers in the
m digits field with the fraction in the n digits field.

Example: -1.234

/Gm.n If the value is 0.01 or greater and can be displayed in the format F
in the m digit field, the value is displayed in F format. Otherwise,
the value is displayed in the /Em.n format.

/Hn The value is displayed as a hexadecimal number in the n digit field.

/ln The value is displayed as a decimal number in the n digit field.

The following format codes insert the specified characters between character strings.

/Cn A set of carriage returns (CR) and line feeds (LF) is output n times.
If this argument is the first or the last in the PRINT instruction, n
blank lines are displayed on the terminal, otherwise, n-1 blank lines.

/S This format code suppresses the output of (CR) and (LF) at the
beginning of a message. This is effective only when /S is the first
format code.

/Xn n spaces are inserted.

/Jn (Option) This format code displays the value as a hexadecimal number in the
n digit field. Zeros are displayed in place of blanks.

/Kn (Option) This format code displays the value as a decimal number in the n
digit field. Zeros are displayed in place of blanks.

/L This format code is the same as /D except all the spaces are re-
moved from the message or data.

June 10, 2003 6-123


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Example In this example the value of real variable “i” is 5, the fifth element of
the array variable “point” is 12.66666.

>PRINT “point” ,i,”=”,/F5.2,point [i]

When the above PRINT command and format code is entered the
display is shown as below.

point 5=12.67

The format code “/F5.2” allows five digits, three to the left of the
decimal and two to the right of the decimal. If the value of point[5] is
1000 (requires 4 digits to the left of the decimal), the display area is
too small and asterisks are displayed as shown below.

point 5=*****

In the following example format code /S is used to display data


without a carriage return or a line feed.

>PRINT “ABC”
>PRINT/S, “DEF”
>PRINT “GHI”

The resulting display of the above entered PRINT commands is


shown below (“DEF” and “GHI” are displayed on the same line).

ABC
DEFGHI

6-124 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

IFPWPRINT IFPWPRINT window,row,column,background color,label color=


”character string”,”character string,...

Function Displays the specified character string in the specified text window
assigned in AUX 0509 Interface Panel.

Parameter Window:
Specifies the window to display the character string. Windows 1–4
are available.

Row:
Specifies the row in the window to display the character string.
Rows 1–16 are available, depending on window size specified in
AUX 0509 Interface Panel. If a row is not specified, 1 is assumed.

Column:
Specifies the column in the window to display the character string.
Columns 1–43 are available, depending on window size specified in
AUX 0509 Interface Panel. If a column is not specified, 1 is as-
sumed.

Background color:
Specifies the background color of the window. Color code numbers
0–15 are available (see table 6-9). If a background color code
number is not specified, white is used.

Label color:
Specifies the character color displayed in the specified window.
Color code numbers 0–15 are available (see table 6-9). If a label
color code number is not specified, white is used.

Character string:
Specifies the character string displayed in the window. If multiple
character strings are specified, each character string is displayed in
a separate row.

Explanation The IFPWPRINT command is available only when the interface


panel window data is set in AUX 0509 Interface Panel. If param-
eters are not specified, the last parameters set for the specified
window are used. If parameters are not previously set, the default
parameters listed above are used. If the character string does not
fit in a row, the display wraps to the next row. If the character string
does not fit in the window the remaining characters are not dis-
played. Control characters are displayed as blanks.

June 10, 2003 6-125


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

MONITOR COMMANDS

Table 6-9 Interface Panel Color Palette

Number Color Number Color Number Color Number Color


0 Gray 4 Green 8 Pink 12 Navy
1 Blue 5 Pale Blue 9 White 13 Reddish Brown
2 Red 6 Yellow 10 Black 14 Dark Green
3 Orange 7 White 11 Cyan 15 Lavender

6-126 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.0 PROGRAM INSTRUCTIONS ............................................................................ 7-2


7.1 Motion Instructions ............................................................................................ 7-3
7.2 Speed and Accuracy Control Instructions ....................................................... 7-19
7.3 Clamp Control Instructions .............................................................................. 7-29
7.4 Configuration Instructions ............................................................................... 7-37
7.4.1 Robot Configuration ........................................................................................ 7-38
7.4.2 Configuration Instruction Parameters .............................................................. 7-39
7.4.3 Configuration Instructions Description ............................................................ 7-40
7.5 Program Control Instructions........................................................................... 7-43
7.6 Program Control Flow Structure Instructions .................................................. 7-60
7.7 Binary Signal Instructions................................................................................ 7-72
7.8 Message Control Instructions .......................................................................... 7-94
7.9 Pose Information Instructions ........................................................................ 7-102
7.10 Program and Data Control Instructions ......................................................... 7-121

June 10, 2003 7-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.0 PROGRAM INSTRUCTIONS

A program instruction consists of a keyword (instruction) and argument(s) or


parameter(s), as shown in figure 7-1.

Keyword Parameter

JMOVE pose variable name, clamp number

Shaded parameters can be omitted.

When parameters are omitted, omit the comas.

Always enter a space between the keyword and the parameter.

Figure 7-1 Program Instruction Example

NOTE
This symbol is used to represent the ENTER key.

7-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.1 MOTION INSTRUCTIONS

This section describes the motion instructions and parameters.

Table 7-1 lists the motion instruction and provides a brief description of the functions.
Shaded parameters can be omitted.

Detailed descriptions follow.

Table 7-1 Motion Instruction Descriptions

Instruction Description Page


JMOVE Moves the robot in joint interpolated motion. 7-4
LMOVE Moves the robot in linear interpolated motion. 7-4
DELAY Stops robot motion for the specified time. 7-5
STABLE Stops robot motion for the specified time after the axes reach coincidence. 7-5
Approaches the destination in a joint interpolated motion by the specified
JAPPRO 7-6
distance.
Approaches the destination in a linear interpolated motion by the specified
LAPPRO 7-6
distance.
Moves away from the current pose in a joint interpolated motion by the
JDEPART 7-8
specified distance.
Moves away from the current pose in a linear interpolated motion by the
LDEPART 7-8
specified distance.
HOME Moves to the home position. 7-10
Moves a single axis in the specified direction by the specified number of
DRIVE 7-11
degrees.
Moves the specified amount in the X, Y and Z directions of the base
DRAW 7-12
coordinates.
Moves the specified amount in the X, Y and Z directions of the tool
TDRAW 7-12
coordinates.
ALIGN Aligns the tool Z axis with the closest base coordinate axis. 7-13
Moves the major axis in a linear interpolated motion and moves the wrist
HMOVE 7-14
axis in a joint interpolated motion (hybrid interpolation).
XMOVE Moves toward the specified pose until the specified signal is received. 7-15
C1MOVE Determines the trajectory of a circular interpolated motion (option). 7-17
C2MOVE Determines the end point of a circular interpolated motion (option). 7-17

June 10, 2003 7-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

JMOVE JMOVE pose variable name,clamp number

LMOVE LMOVE pose variable name,clamp number

Function Moves the robot to the specified pose.

JMOVE: the robot moves the robot in joint interpolation.

LMOVE: the robot moves the robot in linear interpolation.

Parameter Pose variable name:


Specifies the robot motion destination. The Pose variable name can
be a transformation, compound transformation, joint displacement
value, or pose information function.

Clamp number:
Specifies the clamp number to open or close at the destination
pose. A positive number closes the clamp, a negative number
opens the clamp.

Clamp data must be set using the HSETCLAMP command or AUX


0605 Clamp Specifications for the clamp number used.

If the clamp number is omitted, the clamp does not open or close.

Explanation JMOVE:
The robot moves in a joint interpolated motion when the JMOVE
instruction is executed. The robot moves so that the ratios of dis-
tance traveled compared to the total distance are equal for all joints
during the movement from the start pose to the end pose.

LMOVE:
The robot moves in a linear interpolated motion when the LMOVE
instruction is executed. The tool center point (TCP) is moved in a
linear motion at a constant speed while maintaining tool orientation.

Example JMOVE #pick The robot moves to a pose described by joint


displacement values “#pick” in joint interpolated
motion.

LMOVE ref+place The robot moves to a pose described by the


compound transformation values “ref+place” in
linear interpolated motion.

7-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example LMOVE #pick,1 Moves to a pose described by the compound


transformation values “pick” in linear interpo-
lated motion. When the pose is reached, clamp
1 is closed.

DELAY DELAY time

Function Stops robot motion for the specified time.

Parameter Time:
Specifies the time the robot is stopped in seconds.

Explanation The DELAY instruction is considered a motion instruction, though


the robot does not move.

During the specified delay time, all non-motion instructions preced-


ing the next motion instruction are executed.

Example In the program shown below, the robot stops at pose “a” for 2.5
seconds. The SIGNAL instruction in step 3 is executed during the
time delay. After 2.5 seconds, robot motion begins toward pose “b”.

>EDIT pg01
.Program pg01()
1 JMOVE a
2 Delay 2.5
3 SIGNAL 1
4 JMOVE b

STABLE STABLE time

Function Stops execution of the next motion instruction for the specified time
after the robot reaches coincidence (the robot is stable).

Parameter Time:
Specifies the time the robot is stopped in seconds.

Explanation When the robot is moving at high speed with a heavy payload, it is
possible the robot can overshoot the destination pose. If this is the
case the robot adjusts the pose to satisfy the destination. The
STABLE instruction is not executed until the robot axes are at coin-
cidence and stable.

June 10, 2003 7-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

JAPPRO JAPPRO pose variable name,distance

LAPPRO LAPPRO pose variable name,distance

Function Moves the robot to a pose, the specified distance from the specified
taught pose, in the tool Z direction.

JAPPRO: moves the robot in a joint interpolated motion.

LAPPRO: moves the robot in a linear interpolated motion.

Parameter Pose variable name:


Specifies the pose to approach, by the specified distance. The
pose can be a transformation or joint displacement value.

Distance:
Specifies the distance, in millimeters, to approach the specified
pose.

If the distance is a positive value, the robot approaches the speci-


fied pose in the negative tool Z direction (before the pose).

If the distance is a negative value, the robot approaches the speci-


fied pose in the positive tool Z direction (after the pose).

Explanation When the JAPPRO/LAPPRO instruction is executed, the posture of


the robot is the same as for the specified pose, at the specified
distance in the tool Z axis.

7-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example JAPPRO place,100 The robot moves in joint interpolated motion


to a pose 100 mm away from the pose
“place” in the tool -Z direction.

LAPPRO place,offset The robot moves in a linear interpolated


motion to a pose, described in transformation
values, at the distance defined by the vari-
able “offset” in the tool -Z direction.

The example in figure 7-2 shows the tool center point position,
when program pg03, step 2 is executed.

>EDIT pg03
.Program pg03 ()
1 HOME
2 LAPPRO a,100
3 LMOVE a
Tool -Z

Robot Stops Here


(Step 2)
100 mm
Point a
Tool +Z

Figure 7-2 JAPPRO/LAPPRO Instruction Example

June 10, 2003 7-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

JDEPART JDEPART distance

LDEPART LDEPART distance

Function Moves the robot to a pose the specified distance from the specified
taught pose, in the tool Z direction.

JDEPART: moves the robot in a joint interpolated motion.

LDEPART: moves the robot in a linear interpolated motion.

Parameter Distance:
Specifies the distance, in millimeters, to depart the specified pose.

If the distance is a positive value, the robot departs the pose in the
negative tool Z direction (before the pose).

If the distance is a negative value, the robot departs the pose in the
positive tool Z direction (after the pose).

7-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example JDEPART 80 The tool moves back 80 mm in the tool -Z


direction. The move is made in joint interpo-
lation.

LDEPART 2*offset The tool moves back “2*offset” (200 mm if


offset = 100) in the tool -Z direction. The
move is made in linear interpolation.

The example in figure 7-3 shows the tool center point position,
when program pg03, steps 2 and 4 are executed.

>EDIT pg03
.Program pg03 ()
1 HOME
2 LAPPRO a,100
3 LMOVE a
4 LDEPART 100 Tool -Z

Robot Stops Here


(Step 2 and step 4)
100 mm
Point a
Tool +Z

Figure 7-3 JDEPART/LDEPART Instruction Example

June 10, 2003 7-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

HOME HOME home position number

Function Moves the robot to the pose defined as HOME or HOME2, in joint
interpolation.

Parameter Home position number:


Specifies the home position number 1 or 2. If the home position
number is omitted HOME 1 is assumed.

Explanation Two home positions are available, HOME 1 and HOME 2. When
the HOME 1 or HOME 2 instruction is executed, the robot is moved,
in joint interpolation, to the defined pose.

The home position is defined using the SETHOME (HOME 1) or


SET2HOME (HOME 2) instruction. If the home position is not
defined null or all joints at 0 degrees is assumed.

Example HOME Moves the robot to the position defined using the
SETHOME command, in joint interpolated motion.

HOME2 Moves the robot to the position defined using the


SET2HOME command, in joint interpolated motion.

7-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

DRIVE DRIVE joint number,displacement, speed

Function Moves a single joint the specified amount, in degrees of joint move-
ment.

Parameter Joint number:


Specifies the joint number to move. For a standard robot JT1–JT6
are available.

Displacement:
Specifies the amount to move the joint, in the positive or negative
direction.

Speed:
Specifies the speed for the robot motion. The speed is expressed
as a percentage of the monitor speed. If speed is not specified,
100% of monitor speed is assumed.

Explanation The drive instruction moves the specified joint the specified amount
at the specified speed. The program speed set in the program does
not affect this instruction.

Example DRIVE 2,-10,75 Moves joint 2, -10 degrees from the current
pose, at a speed of 75% of the monitor
speed.

June 10, 2003 7-11


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

DRAW DRAW X distance,Y distance,Z distance,X rotation,


Y rotation,Z rotation, speed

TDRAW TDRAW X distance,Y distance,Z distance,X rotation,


Y rotation,Z rotation, speed

Function Moves the robot in linear interpolation the distance and direction
specified for the X, Y and Z coordinates and the rotation specified
around each axis in the base coordinates.

TDRAW moves the robot based on the tool coordinates.

Parameter X distance:
Specifies the distance to move in the X axis in millimeters. If not
specified, 0 millimeters is assumed.

Y distance:
Specifies the distance to move in the Y axis in millimeters. If not
specified, 0 millimeters is assumed.

Z distance:
Specifies the distance to move in the Z axis in millimeters. If not
specified, 0 millimeters is assumed.

X rotation:
Specifies the amount of rotation around the X axis in degrees. The
acceptable range is less than ±180 degrees. If not specified, 0
degrees is assumed.

Y rotation:
Specifies the amount of rotation around the Y axis in degrees. The
acceptable range is less than ±180 degrees. If not specified, 0
degrees is assumed.

Z rotation:
Specifies the amount of rotation around the Z axis in degrees. The
acceptable range is less than ±180 degrees. If not specified, 0
degrees is assumed.

Speed:
Specifies the speed in percentage (%), millimeters per second
(mm/s), millimeters per minute (mm/min), centimeters per minute
(cm/min), or seconds (s). If not specified, the robot moves at the
program speed.

7-12 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Explanation The robot moves, from the current pose, the specified amount, at
the specified speed in linear interpolation.

Example DRAW 50,,-30 Moves the robot from the current pose 50
mm in the X axis and -30 mm in the Z axis in
base coordinates.

ALIGN ALIGN

Function Moves the tool Z-axis parallel to the closest base coordinate axis.

Explanation The ALIGN instruction is used to set the tool direction parallel to a
base axis before teaching a series of poses. The ALIGN instruction
is also used to verify the tool coordinate definition.

Example The example in figure 7-4 shows the ALIGN command used to align
the tool Z-axis with the base Z-axis.

>DO ALIGN

+Z
Before ALIGN After ALIGN

-X

Tool Z-Axis
-Y +Y

+X

-Z
Base Coordinates

Figure 7-4 ALIGN Instruction Example

June 10, 2003 7-13


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

HMOVE HMOVE pose variable name,clamp number

Function Moves the robot to the specified pose. The robot moves in hybrid
interpolation: major axes move in linear interpolation and wrist axes
move in joint interpolation.

Parameter Pose variable name:


Specifies the robot motion destination. The pose variable name can
be a transformation, compound transformation, joint displacement
value, or pose information function.

Clamp number:
Specifies the clamp number to open or close at the destination
pose. A positive number closes the clamp, a negative number
opens the clamp.

Clamp data must be set using the HSETCLAMP command or AUX


0605 Clamp Specifications for the clamp number used.

If the clamp number is omitted, the clamp does not open or close.

Explanation This instruction moves the robot in linear interpolation. The tool
center point is moved in a linear trajectory and the wrist joints move
in joint interpolation.

This instruction is used when the robot is moved in linear motion


and the posture of the wrist changes greatly between the beginning
and the end of the motion.

Example >EDIT pg01


.Program pg01()
1 HOME
2 JMOVE #start
3 HMOVE pick,1
4 LMOVE place,-1
5 HMOVE end

7-14 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

XMOVE XMOVE mode pose variable name TILL signal number

Function Moves the robot towards the specified pose, in linear interpolation,
stops motion when the specified signal condition is satisfied and
moves to the next program step (the robot may not complete motion
to the originally specified pose).

Parameter Mode:
/ERR (option); returns an error if the signal condition is already
satisfied when the signal monitor starts.

/LVL (option); immediately moves to the next program step if the


signal condition is satisfied when the monitor signal starts.

Pose variable name:


Specifies the robot motion destination. The pose variable name can
be a transformation, compound transformation, joint displacement
values, or pose information function.

Signal Number:
Specifies the external input signal or internal signal to monitor.

If a positive number is used, the signal is monitored for the rising


edge transition (OFF to ON).

If a negative number is used, the signal is monitored for the trailing


edge transition (ON to OFF).

Acceptable signal numbers:


External input signals—1001–number of installed signals, up to
1064
Internal signals—2001–2256

NOTE
When the rising or trailing edge of the signal is moni-
tored, the program branches only if there is a transition
in the signal state. If the rising edge is monitored and
the signal is ON when the XMOVE is executed, the pro-
gram does not branch unless the signal goes OFF and
ON while the XMOVE is monitoring the signal. The sig-
nal must remain stable for 50 msec for monitoring.

June 10, 2003 7-15


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example In the program example shown in figure 7-5 the robot moves from
“start “towards “end”. When signal 1001 is received during the
motion from “start” to “end” the robot stops and moves to “skip”,
even if the robot has not reached “end”.

ED pg04
.Program pg04()
1 JMOVE start
1?
2 XMOVE end TILL 1001
2?
3 LMOVE skip
3?

Start

skip

Signal 1001 received

end

Figure 7-5 XMOVE Instruction Example

7-16 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

C1MOVE C1MOVE pose variable name,clamp number

C2MOVE C2MOVE pose variable name,clamp number

Function Moves the robot to the specified pose using circular


(Option) interpolation.

Parameter Pose variable name:

Specifies the robot motion destination. The pose variable name can
be a transformation, compound transformation, joint displacement
values, or pose information function.

Clamp number:
Specifies the clamp number to open or close at the destination
pose. A positive number closes the clamp, a negative number
opens the clamp.

Clamp data must be set using the HSETCLAMP command, or AUX


0605 Clamp Specifications, for the clamp number used.

If the clamp number is omitted, the clamp does not open or close.

Explanation The C1MOVE and C2MOVE instructions are used to create a


circular interpolation path.

The C1MOVE and C2MOVE instructions specify the arc of the robot
path to reach the end pose. Three poses are needed for the con-
troller to calculate a circular path trajectory.

The first pose is the beginning of the arc and can be specified with
any of the following instructions: Align, C1MOVE, C2MOVE, DELAY,
DRAW, TDRAW, DRIVE, HOME, JMOVE, JAPPRO, JDEPART,
LMOVE, LAPPRO, LDEPART, STABLE, or XMOVE.

The second pose is defined by the C1MOVE instruction and is a


pose on the arc that connects the arc beginning and arc ending
points.

The C2MOVE instruction defines the arc end point.

June 10, 2003 7-17


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example The examples in figure 7-6 show three possible circular interpola-
tion configurations.

pt2

JMOVE pt1
C1MOVE pt2
C2MOVE pt3
pt1 pt3

pt2

JMOVE pt1
C1MOVE pt2
C2MOVE pt3
C1MOVE pt4
pt1 pt5
C2MOVE pt5 pt3

pt2
pt4

JMOVE pt1
C1MOVE pt2
C2MOVE pt3 pt1 pt3
C1MOVE pt4
C2MOVE pt1

pt4

Figure 7-6 Circular Interpolation Example

NOTE
It is possible to have several C1MOVEs between the
start pose and the end pose of the circular trajectory de-
fining the arc.

7-18 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.2 SPEED AND ACCURACY CONTROL INSTRUCTIONS

This section describes the speed and accuracy control instructions and parameters.

Table 7-2 lists the speed and accuracy control instructions and provides a brief descrip-
tion of the functions. Shaded parameters can be omitted.

Detailed descriptions follow.

Table 7-2 Speed and Accuracy Control Instruction Descriptions

Instruction Description Page


SPEED Sets the motion speed (program speed). 7-20
ACCURACY Sets the accuracy range. 7-23
ACCEL Sets the acceleration parameter in percentage. 7-24
DECEL Sets the deceleration parameter in percentage. 7-24
BREAK Stops execution of the next step until the current motion is complete. 7-25
BRAKE Stops the current motion and proceeds to the next step. 7-25
BSPEED Sets the block speed (option). 7-26

June 10, 2003 7-19


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

SPEED SPEED speed value,rotational speed value,ALWAYS

Function Specifies robot motion speed.

Parameter Speed value:


Specifies the program speed. Normally specified in percentages
between 0.01 to 100%. Absolute speed is set by specifying the
speed in mm/s (millimeters per second) or mm/min (millimeters per
minute).

If speed is not specified in a program the default speed is 100%.

Rotational speed:
Specifies the rotational speed of the tool posture in linear and
circular interpolated motion. Normally specified in percentages
between 0.01 to 100%. Absolute speed is set by specifying the
speed in mm/s (millimeters per second) or mm/min (millimeters per
minute).

If rotational speed is not specified in a program, the default speed is


100%.

ALWAYS:
When ALWAYS is specified, the setting is effective until the next
SPEED instruction is executed. When ALWAYS is not specified,
only the next robot motion is affected.

Explanation The actual robot speed is determined by the product of the monitor
speed and the program speed (monitor speed x program speed).

Calculated speed may not be achieved if:

The distance between the two poses is too short.

A linear move exceeds the maximum speed of an axis rotational


capability.

Speed is determined differently for joint interpolation and linear


interpolation. For joint interpolation, the speed is determined as a
percentage of the maximum sped of each axis.

For linear interpolation, the speed is determined as a percentage of


the maximum speed at the tool center point.

7-20 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Explanation When the speed is specified as distance per time unit or in seconds
for linear interpolation, the tool center point is moved to reach the
pose at the specified speed or with in the specified time value.

For joint interpolation speed is set as a percentage of maximum


speed. If speed is set as absolute speed or in time, the specified
speed is calculated as a percentage of the maximum speed.

Absolute speed expressed in values of mm/s or mm/min and in


seconds are achieved with monitor speed set at 100%. If the moni-
tor speed is decreased, these speeds decrease proportionately.

NOTE
If the product of program speed and monitor speed ex-
ceeds 100% the actual speed does not exceed 100%.

The rotational speed cannot be set if the option is not


installed (an error occurs).

Example SPEED 50 Sets the speed for the next robot motion to
50%.

SPEED 100 Sets the speed for the next robot motion to
100%

SPEED 200 Sets the speed for the next robot motion to
100%. Speeds over 100% are set to 100%.

SPEED 20 MM/S ALWAYS


Sets the speed at the tool center point as 20
mm/s (millimeters per second), with monitor
speed at 100%. The ALWAYS instruction
causes the speed to be effective until another
speed instruction is executed.

June 10, 2003 7-21


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example SPEED 6000 MM/MIN


Sets the speed for the next robot motion to
6000 mm/min (millimeters per minute), with
the monitor speed at 100%.

SPEED 5 S Sets the speed for the next robot motion to


reach the next program point in 5 seconds,
with monitor at 100%. Speed is calculated at
the tool center point.

SPEED 100 MM/S, 10 DEG/S


Sets the speed for the next robot motion to
100 mm/s (millimeters per second) for the
major axes, and 10 deg/s (degrees per sec-
ond) for the minor axes, with monitor speed
at 100%. The axis that requires the longest
time to reach the program point, is the deter-
mining factor of actual speed.

7-22 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

ACCURACY ACCURACY distance value ALWAYS

Function Sets the accuracy when determining the robot pose.

Parameter Distance value:


Specifies the accuracy range in millimeters.

ALWAYS:
When ALWAYS is specified the setting is effective until the next
ACCURACY instruction is executed.

When ALWAYS is not specified, only the next robot motion is af-
fected.

Explanation If accuracy is not specified in an AS Language program, the default


accuracy is used. The default accuracy is 1 mm

There is a limit to the effect of the accuracy setting because the


accuracy is not checked until the robot begins to decelerate as it
approaches the program point. For more information refer to sec-
tion, 5.3.8, CP Switch and Accuracy, Accel, and Decel Instructions
Relation.

NOTE
When the accuracy is set to 1 mm, the robot pauses
when each program point is reached. To use continu-
ous path (CP) motion, increase the accuracy range set-
ting.

When a small accuracy range is set, an non-coinci-


dence of axes error may occur.

The accuracy setting is not the repetition accuracy, but


is used to position the robot. To avoid non-coincidence
errors do not use a accuracy value of 1 mm or less.

Example ACCURACY 10 ALWAYS Sets the accuracy range to 10 mm until


another accuracy instruction is executed.

June 10, 2003 7-23


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

ACCEL ACCEL acceleration value ALWAYS

DECEL DECEL deceleration value ALWAYS

Function Specifies the acceleration/deceleration parameter for robot motion.

Parameter Acceleration/deceleration:
Specifies the acceleration/deceleration as a percentage of the
maximum value. The acceptable range is 0.01–100. Values over
100 are set as 100. Values under 0.01 are set as 0.01.

ALWAYS:
When ALWAYS is specified the setting is effective until the next
ACCEL/DECEL instruction is executed. When ALWAYS is not
specified, only the next robot motion is affected.

Explanation The ACCEL instruction specifies the acceleration when the robot
starts a motion as a percentage of maximum acceleration.

The DECEL instruction specifies the deceleration when the robot is


at the end of a motion as a percentage of maximum deceleration.

Example ACCEL 80 ALWAYS Sets the acceleration to 80%, until another


ACCEL instruction is executed.

DECEL 50 Sets the deceleration to 50% for the next


motion instruction.

7-24 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

BREAK BREAK

Function Causes program execution to stop until the current robot motion is
completed.

Explanation The BREAK instruction:


The next program step is not executed until the robot reaches its
destination.

The CP motion from the current motion to the next motion is inter-
rupted and the robot pauses between the motion segments.

Example In this example the BREAK instruction ensures the robot reaches a
point 500 mm away from point “a” and then creates the location
variable “pt1”. Without the BREAK instruction, the location “pt1” is
created when the robot is in motion to the point 500 mm away from
point “a”.

>EDIT pg06
.Program pg06()
1 JMOVE a
1?
2 DRAW ,,500
2?
3 BREAK
3?
4 HERE pt1
4?

BRAKE BRAKE

Function Stops the current robot motion immediately.

Explanation Stops the current robot motion immediately and skips to the next
program step.

June 10, 2003 7-25


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

BSPEED BSPEED speed value

Function Specifies robot motion speed for a block of program steps


(Option) (BSPEED = block speed). Robot motion speed is calculated using
monitor speed x program speed x block speed.

Parameter Speed value:


Specifies the BSPEED value. The acceptable range is 1–1000%.
The BSPEED instruction is effective until the next BSPEED instruc-
tion is executed.

Explanation Robot motion speed is calculated using monitor speed x program


speed x block speed. The total speed cannot exceed 100%. Values
up to 1000 can be entered for each speed value, but if the total
speed exceeds 100%, it is reduced to 100%.

For example, if the monitor speed is 100% and the program speed
is 50%, the motion speed is calculated using 100% x 50% x block
speed. If the block speed is less than 200%, the speed is calcu-
lated as described above. If the block speed is over 200%, the
robot motion speed is adjusted to 100%.

NOTE
When the EXECUTE command is used to start the pro-
gram from the teach pendant, the block speed is set to
the default value of 100%. When the program is se-
lected using external program reset (not using RPS and
JUMP signals), the block speed is set to the default
value (100%).

The robot may not move at the specified program speed


if the program is not executed from the beginning of the
program or if steps are skipped (see examples).

7-26 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example In this example the robot is stopped at step 3 and motion is re-
sumed at step 25. The block speed at step 25 is the speed set in
block 1, because the program was interrupted at step 3.

>EDIT pg04
.Program pg04()
1 BSPEED block1 ;Sets speed for block 1
1?
2 JOINT SPEED9...
2?
3 LINEAR SPEED9...
:
12 BSPEED block2 ;Sets speed for block 2
12?
13 JOINT SPEED9...
13?
14 LINEAR SPEED9...
14?
:
24 BSPEED block3 ;Sets speed for block 3
24?
25 JOINT SPEED9...
25?
26 LINEAR SPEED9...
26?

June 10, 2003 7-27


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example Use an array variable and the BITS instruction to control speed
using external input signals.

Define the bits to use:


a=BITS(1010,4)

Define the array variable:


BSPEED block1[a]
block1=50
block11[0]=10
block11[1]=20
block11[2]=30
block11[3]=40

Create the program:


>LIST pg05
.Program pg05()
1 BSPEED block1 ;Sets the default value for the block
2 IF SIG (1001) THEN ;Determines if external speed is enabled
3 a=BITS(1010,4) ;Acquires the number for external selection
4 If (a<11) THEN ;A number greater than 11 cannot be used
5 BSPEED block11[a] ;Sets the selected block speed
6 END
7 END
8 JOINT SPEED9... ;Moves the robot at the selected block
9 JOINT SPEED9... ;speed

If the bit state of the selected signals is as shown below:


1010 OFF
1011 ON
1012 OFF
1013 OFF

Then a=2, block11[2] is used, and the robot motion speed is set to
30%.

7-28 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.3 CLAMP CONTROL INSTRUCTIONS

This section describes the clamp control instructions and parameters.

Table 7-3 lists the clamp control instruction and provides a brief description of the func-
tions. Shaded parameters can be omitted.

Detailed descriptions follow.

Table 7-3 Clamp Control Instruction Descriptions

Instruction Description Page


OPEN Sends clamp open signal when the next motion instruction begins. 7-30
OPENI Sends clamp open signal when the current motion instruction is completed. 7-30
CLOSE Sends clamp close signal when the next motion instruction begins. 7-32
CLOSEI Sends clamp close signal when the current motion instruction is completed. 7-32
RELAX Sets clamp signal OFF when the next motion instruction begins. 7-33
RELAXI Sets clamp signal OFF when the current motion instruction is completed. 7-33
OPENS Sends clamp open signal during motion instruction execution (option). 7-34
COLSES Sends clamp close signal during motion instruction execution (option). 7-34
RELAXS Sets clamp signal OFF during motion instruction execution (option). 7-34
GUNON Sends gun ON signal and controls gun signal timing by distance (option). 7-35
GUNOFF Sends gun OFF signal and controls gun signal timing by distance (option). 7-35
GUNONTIMER Controls gun signal ON timing (option). 7-36
GUNOFFTIMER Controls gun signal OFF timing (option). 7-36

June 10, 2003 7-29


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

OPEN OPEN clamp number

OPENI OPENI clamp number

Function Sends the clamp open signal.

Parameter Clamp number:


Specifies the clamp number. If omitted, 1 is assumed.

Acceptable range: 1–8

Explanation Sends the signal to the clamp control pneumatic valve to open the
specified clamp.

When OPEN is used, the signal is not sent until the next motion
starts.

When OPENI is used and the robot is in motion, the signal is sent
after the motion is completed. If CP motion is used, the CP motion
is suspended as with the BREAK instruction.

If the robot is not in motion the signal is sent immediately.

Clamp instructions are not affected by the [Link]


switch.

Example OPEN The clamp 1 open signal is sent to the clamp 1


control valve when the next robot motion starts.

OPENI 2 The clamp 2 open signal is sent to the clamp 2


control valve as soon as the robot completes the
current motion.

7-30 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Robot path with OPENI command


Accuracy range Robot completes current motion and
clamp opens

Robot path with OPEN command


aa Clamp opens at transition to next location

bb

Figure 7-7 OPEN/OPENI Instructions

June 10, 2003 7-31


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

CLOSE CLOSE clamp number

CLOSEI CLOSEI clamp number

Function Sends the clamp close signal.

Parameter Clamp number:


Specifies the clamp number. If omitted, 1 is assumed.

Acceptable range: 1–8

Explanation Sends the signal to the clamp control pneumatic valve to close the
specified clamp.

When CLOSE is used, the signal is not sent until the next motion
starts.

When CLOSEI is used and the robot is in motion, the signal is sent
after the motion is completed. If CP motion is used, the CP motion
is suspended as with the BREAK instruction.

If the robot is not in motion the signal is sent immediately.

Clamp instructions are not affected by the [Link]


switch.

Example CLOSE 3 The clamp 3 close signal is sent to the clamp 3


control valve when the next robot motion starts.

CLOSEI The clamp 1 close signal is sent to the clamp 1


control valve as soon as the robot completes the
current motion.

7-32 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

RELAX RELAX clamp number

RELAXI RELAXI clamp number

Function Sets clamp signals for open and close OFF. For double solenoid
application, clamp open and close signals are set OFF.

Parameter Clamp number:


Specifies the clamp number. If omitted, 1 is assumed.

Acceptable range: 1–8

Explanation When RELAX is used, the signal is not sent until the next motion
starts.

When RELAXI is used, and the robot is in motion, the signal is sent
after the motion is completed. If CP motion is used, the CP motion
is suspended as with the BREAK instruction.

If the robot is not in motion the signal, is sent immediately.

Clamp instructions are not affected by the [Link]


switch.

June 10, 2003 7-33


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

OPENS OPENS clamp number

CLOSES CLOSES clamp number

RELAXS RELAXS clamp number

Function Sets the clamp close/open signal ON/OFF.


(Option)

Parameter Clamp number:


Specifies the clamp number. If omitted, 1 is assumed.

Acceptable range: 1–8

Explanation These instructions differ from the OPEN/CLOSE/RELAX and


OPENI/CLOSEI/RELAXI instructions as described below.

OPEN/CLOSE/RELAX instructions:
The signal is sent when the next motion starts.

OPENI/CLOSEI/RELAXI instructions:
If the robot is in motion, the signal is sent when the motion is
completed. If CP motion is used, the CP motion is suspended
as with the BREAK instruction.

OPENS/CLOSES/RELAXS instructions:
The signal is sent immediately when the instruction is executed.

Clamp instructions are not affected by the [Link]


switch.

7-34 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

GUNON GUNON gun number,distance

GUNOFF GUNOFF gun number,distance

Function Sets the gun ON/OFF signals ON/OFF and controls the gun signal
(Option) timing, specified by the distance.

Parameter Gun number:


Specifies gun number 1 or 2.

Distance:
Specifies the distance, in millimeters (mm), before or after the
program point, to set the gun signals ON/OFF.

A negative value advances the timing.

A positive value delays the timing. If not specified, 0 is assumed.

Explanation The gun signal is set ON or OFF when the next motion instruction is
executed after the GUNON/GUNOFF instruction. The gun signal
timing is controlled by the distance specified in the GUNON/
GUNOFF instruction.

If gun control by time is required the GUNONTIMER/


GUNOFFTIMER instructions are used. Information on the
GUNONTIMER/GUNOFFTIMER instruction follows.

Example GUNON 2,100 Sets the GUNON signal ON, when the robot
has reached a point 100 mm past the in-
tended program point.

June 10, 2003 7-35


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

GUNONTIMER GUNONTIMER gun number,time

GUNOFFTIMER GUNOFFTIMER gun number,time

Function Controls the timing of the gun off/gun on signals.


(Option)

Parameter Gun number:


Specifies the gun number.
The available gun numbers are 1 and 2.

Time:
Specifies the time, in seconds, to advance or delay the GUNON/
GUNOFF signals.

Explanation The timing depends on may factors:

The distance from the control valve to the gun tip.

The type and viscosity of paint.

Ambient temperature, humidity, etc.

The GUNONTIMER/GUNOFFTIMER time value should always be


assigned to a variable at the beginning of the program. The variable
at the beginning of the program saves time when the variable needs
to be change because of the above mentioned conditions that affect
gun signal timing.

With the timer value assigned to a variable the value can also be
set using input signals outside of the program.

The GUNONTIMER/GUNOFFTIMER does not cause the gun


control signal(s) to be set ON or OFF, it only changes the timing of
the gun control signal(s).

Example GUNONTIMER 1,-0.5


Advances the gun ON signal for gun 1 by 0.5 seconds.

7-36 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.4 CONFIGURATION INSTRUCTIONS

This section describes the configuration instructions and parameters.

Table 7-4 lists the configuration instructions and provides a brief description of the
functions.

Detailed descriptions follow.

Table 7-4 Configuration Instructions Descriptions

Instruction Description Page


RIGHTY Changes the robot arm configuration to resemble a person's right arm. 7-40
LEFTY Changes the robot arm configuration to resemble a person's left arm. 7-40
ABOVE Changes the robot arm configuration so the elbow joint (JT3) is in the above
7-41
position.
BELOW Changes the robot arm configuration so the elbow joint (JT3) is in the below
7-41
position.
UWRIST Changes the robot arm configuration so JT5 has a positive value. 7-42
DWRIST Changes the robot arm configuration so JT5 has a negative value. 7-42

June 10, 2003 7-37


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.4.1 ROBOT CONFIGURATION

When a precision pose (pose designated with #) is taught, the displacement values of
each of the six axis are defined. When a pose is defined using transformation values,
there are cases where more than one set of joint positions results in the same transfor-
mation pose value.

In AS Language programs, the robot retains the configuration used by the previous
move. In most cases, a precision pose can be used before a transformation pose to
establish robot configuration. In some cases, the configuration should be specified
using configuration instructions. The following examples describe cases when configu-
ration should be specified:

When the robot moves from a pose with unclear configuration to a transformation pose.

When joint 5 passes through the origin (0 degrees) on a robot with a swivel, bend,
swivel (SBS) wrist.

If the pose #a is taught with the configuration shown in figure 7-8, A; when the robot
moves to transformation pose b the robot configuration is as shown by the dotted lines
in figure 7-8, B.

If the transformation pose b is taught with the robot configuration as shown by the solid
lines in figure 7-8, B; the configuration will be as shown by the dotted lines when pose
#a proceeds transformation pose (location b as shown in the program example below).

JMOVE #a
JMOVE b

A #a B b

Figure 7-8 Robot Configuration Example

7-38 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

To correct these configuration errors the robot configuration must be changed while the
robot is in motion. To change the robot configuration use the following configuration
instructions.

• LEFTY, RIGHTY

• ABOVE, BELOW

• UWRIST, DWRIST

Detailed explanations of the configuration instructions are provided in section 7.4.3.

7.4.2 CONFIGURATION INSTRUCTION PARAMETERS

1. Configuration instructions do not have an affect on precision poses (pose desig-


nated with #). The robot moves to the precision pose in the configuration as taught.
If the configuration between precision points varies greatly during a linear move, an
error may occur.

2. The robot does not react immediately to a configuration instruction. The configura-
tion changes while executing the next joint interpolated move (JMOVE, JAPPRO,
JDEPART, DRIVE).

3. In most cases configuration instructions are not needed. The configuration instruc-
tions are used in the following cases.

a. When a program does not begin with a precision pose to set the robot’s con-
figuration. The configuration instruction is used at the beginning of the pro-
gram to set robot configuration.

b. When a JAPPRO instruction causes excessive rotation of JT4 and JT6 (wrist
roll) during the move from the approach pose to the actual pose as in the
example programs below.

Causes wrist roll Does not cause wrist roll

JT5>0°* JT5<0°*
JMOVE a JMOVE a JMOVE a
JAPPRO #b,100 UWRIST DWRIST
JMOVE #b JAPPRO #b,100 JAPPRO #b,100
JMOVE #b JMOVE #b

*If the angle of JT5 is positive at #b, use the UWRIST instruction. If the angle
of JT5 is negative at #b, use the DWRIST instruction.

June 10, 2003 7-39


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.4.3 CONFIGURATION INSTRUCTIONS DESCRIPTION

This section provides explanations of the robot configuration instructions. These instruc-
tions are used when it becomes necessary to ensure a specific robot configuration to
avoid program errors or to prevent interference with tooling or peripheral equipment.

RIGHTY RIGHTY

LEFTY LEFTY

Function Forces a robot configuration change during the next motion so the
robot arm is configured to resemble a person’s right (RIGHTY) or
left (LEFTY) arm. The configuration may not change during a linear
interpolated move or when the destination pose is a precision point.

Example

LEFTY RIGHTY

7-40 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

ABOVE ABOVE

BELOW BELOW

Function Forces a robot configuration change during the next motion so the
elbow joint (JT3) is configured to resemble a person’s arm with the
elbow in the above or below position relative to the wrist. The
configuration may not change during a linear interpolated move or
when the destination pose is a precision point.

Example

ABOVE BELOW

June 10, 2003 7-41


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

UWRIST UWRIST

DWRIST DWRIST

Function Forces a robot configuration change during the next motion so the
angle of JT5 has a positive or negative value. The configuration
may not change during a linear interpolated move or when the
destination pose is a precision point.

Example In the UWRIST configuration JT5 angle is a positive value.

In the DWRIST configuration JT5 angle is a negative value and JT4


is rotated 180 degrees.

UWRIST DWRIST

7-42 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.5 PROGRAM CONTROL INSTRUCTIONS

This section describes the program control instructions and parameters.

Table 7-5 lists the program control instructions and provides a brief description of the
functions.

Detailed descriptions follow. Shaded parameters can be omitted.

Table 7-5 Program Control Instructions Descriptions

Instruction Description Page


GOTO Causes program execution to jump to the specified label. 7-44
Causes program execution to jump to the specified label when specified
IF 7-45
conditions are met.
CALL Causes program execution to jump to the specified subroutine. 7-46
Causes program execution to return to the program that called the
RETURN 7-47
subroutine.
WAIT Causes program execution to pause until the specified condition is met. 7-48
TWAIT Causes program execution to pause until specified time elapses. 7-49
MVWAIT Causes program execution to pause until specified distance or time is met. 7-50
LOCK Changes the priority of robot control programs. 7-52
Causes program execution to pause until the CONTINUE command is
PAUSE 7-54
executed.
HALT Stops program execution. Program execution cannot be resumed. 7-54
STOP Stops program execution cycle. 7-55
SCALL Causes program execution to branch to a subroutine. 7-56
ONE Calls a program when an error occurs. 7-57
Resumes program execution from the step following the step in which the
RETURNE 7-59
error occurred.
CALLAUX Displays the auxiliary function screen (option). 7-59

June 10, 2003 7-43


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

GOTO/IF GOTO label IF condition

Function Causes program execution to jump to the program step with the
specified label.

Parameter Label:
Specifies the program step label to jump to. The label can be any
whole number between 0 and 32767. The label must be in the
same program.

Condition:
Specifies the condition required to cause the program execution to
jump to the specified label. The condition parameter can be omit-
ted. When the condition is omitted, the IF instruction is also omit-
ted.

When the GOTO instruction is used without a condition the program


execution jumps to the specified label each time the GOTO instruc-
tion is executed.

Explanation If a condition is not specified the program execution jumps to the


specified label.

If a condition is specified, the program execution jumps to the speci-


fied label when the condition is met.

If a condition is specified and is not met, the program execution


resumes at the step following the GOTO/IF instruction.

Program execution jumps to labels only, not step numbers.

The GOTO/IF instruction functions the same as the IF GOTO in-


struction. The description of the IF GOTO instruction follows.

If there is not a step with the specified label, an error occurs.

Example GOTO 100 Causes program execution to jump to the


step with the label 100. If there is no step
labeled 100, an error occurs.

GOTO 200 IF n==3 Causes program execution to jump to the


step with the label 200 if “n” is equal to 3.

7-44 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

IF/GOTO IF condition GOTO label

Function Causes program execution to jump to the program step with the
specified label if the specified condition is met.

Parameter Condition:
Specifies the condition required to cause the program execution to
jump to the specified label (e.g. n==0, n>3, m+n<0).

Label:
Specifies the program step label to jump to. The label can be any
whole number between 0 and 32767. The label must be in the
same program.

Explanation Causes program execution to jump to the specified label when the
condition is met.

If the condition specified is not met, the program execution resumes


at the step following the IF/GOTO instruction.

Program execution jumps to labels only, not step numbers.

If there is not a step with the specified label, an error occurs.

Example IF n>3 GOTO 100 If the value of whole number variable “n” is
greater than 3, then program execution jumps
to the step labeled 100. If “n” is not greater
than 3, the step after the IF/GOTO instruction
is executed.

IF flag GOTO 25 If the value of the whole number variable


“flag” is not 0, program execution jumps to
the step labeled 25. If the value of the vari-
able “flag” is equal to 0, the step after the IF/
GOTO instruction is executed.

This line could also be written as:


IF flag<>0 GOTO 25

June 10, 2003 7-45


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

CALL CALL program name

Function Pauses current program execution and jumps to the specified pro-
gram (subroutine). When the subroutine is completed, the execu-
tion returns to the original program at the step following the CALL
instruction.

Parameter Program name:


Specifies the program (subroutine) to execute.

Explanation The CALL instruction causes execution of the current program to


pause and execution to jump to the specified subroutine.

A subroutine cannot be called from a robot control program and a


PC program at the same time. A subroutine cannot call itself.

Multiple subroutine calls (calling another subroutine from the one


being executed) are possible, with a maximum of twenty.

Example For this example refer to figure 7-9.

In pg00 at step 2, if input signal 1001 is high, step 3 is executed


(CALL pg02) and execution branches to pg02.

If input signal 1001 is low, step 5 is executed.

In pg02, step 3 causes execution to branch to pg07. After pg07 is


executed, execution returns to the line following the call command
in pg02.

The execution continues from step 4, and if input signal 1020 is


high (step 6), the program branches to label 150 and pg07 is ex-
ecuted again.

If input signal 1020 is low, then execution returns to the line follow-
ing the call command in pg00.

7-46 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

pg07
1 JMOVE a1
2 C1MOVE a2
07 3 C2MOVE a3
4 C1MOVE a4
5 C2MOVE a1

Figure 7-9 CALL Instruction Example

RETURN RETURN

Function Ends execution of a subroutine and returns execution to the step


after the CALL instruction in the program that called the subroutine.

Explanation At the end of a subroutine, program execution returns to the step


following the CALL instruction in the program that called the subrou-
tine with or without a return instruction. Using the return instruction
at the end of a subroutine is not necessary but it makes the pro-
gram execution flow easier to follow.

If a subroutine is not called from a program (executed using the


EXECUTE command), execution is ended at the last of the subrou-
tine.

June 10, 2003 7-47


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

WAIT WAIT condition

Function Causes program execution to pause until the specified condition is


met.

Parameter Condition:
specifies the condition that must be met to resume program execu-
tion (real number expressions).

Explanation The CONTINUE NEXT instruction can be used to resume program


execution if the condition is not met. The CONTINUE NEXT instruc-
tion causes program execution to skip to the next program step
overriding the wait condition.

! CAUTION
Overriding the WAIT instruction can cause damage to
the robot or peripheral equipment. Ensure conditions
are safe to continue program execution without satisfy-
ing the wait condition.

Example WAIT SIG(1001,-1003) Causes program execution to pause until


external input signal 1001 (WX1) is ON
and input signal 1003 (WX3) is OFF.

WAIT TIMER(1)>10 Causes program execution to pauses until


the value of timer 1 is greater than 10
seconds.

WAIT n>100 Causes program execution to pause until


the value of variable “n” is greater than
100. Variable “n” can be a value calculated
by a PC program.

7-48 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

TWAIT TWAIT time

Function Causes program execution to pause until the specified time


elapses.

Parameter Time:
Specifies the time, in seconds, to pause program execution.

Explanation The CONTINUE NEXT instruction can be used to resume program


execution if the condition is not met. The CONTINUE NEXT instruc-
tion causes program execution to skip to the next program step
overriding the wait condition.

! CAUTION
Overriding the WAIT instruction can cause damage to
the robot or peripheral equipment. Ensure conditions
are safe to continue program execution without satisfy-
ing the wait condition.

Example TWAIT 0.5 Causes program execution to pauses for 0.5


seconds.

TWAIT delay Causes program execution to pause until the


value assigned to variable “delay” elapses.

June 10, 2003 7-49


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

MVWAIT value

Function Causes program execution to wait until the specified remaining


distance or remaining time of the current robot motion is met.

Parameter Value:
Specifies the distance or time. Distance is expressed in millimeters
(mm) and time is expressed in seconds (S).

Explanation The MVWAIT instruction is used to synchronize program execution


with robot motion. The MVWAIT instruction monitors the remaining
distance or time based on the specified value, so the actual remain-
ing distance or time may vary due to response time lag.

When the robot is in a joint interpolated motion, the distance or time


may differ greatly from the specified distance or time. If the current
motion is completed when the MVWAIT instruction is executed, the
execution jumps to the next instruction. The CONTINUE NEXT
command can be used to override the MVWAIT instruction.

NOTE
When the MVWAIT instruction is used the
[Link] switch must be ON.

The MVWAIT instruction cannot be used in a PC pro-


gram or with the DO command.

7-50 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example In the example below, the robot moves toward pose “pt1”, and when
the robot reaches the point 100 mm from “pt1”, signal 21 is set ON.
[Link] switch must be ON and the robot must be in
the accuracy range set for “pt1”.

LMOVE pt1
MVWAIT 100 mm
SIGNAL 21 100 mm

Robot path to pt1


21
Pose (location) pt1

Signal 21 is set to ON at this point

In the example below, the robot moves toward pose “pt1”, and when
the robot reaches the point .5 second from “pt1”, signal 21 is set
ON. [Link] switch must be ON and the robot must be
in the accuracy range set for “pt1”.

LMOVE pt1
MVWAIT .5S
SIGNAL 21 .5 seconds remaing

Robot path to pt1


21
Pose (location) pt1

Signal 21 is set to ON at this point

June 10, 2003 7-51


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

LOCK LOCK priority

Function Changes the priority of the robot program currently on the stack.

Parameter Priority:
Specifies program priority in real numbers from 0–127.

Explanation Unless changed, priority 0 is assigned to robot programs. The


priority is changed using the LOCK instruction. The higher the
number (0–127), the higher the priority.

The LOCK instruction is used with the ON and ONI instructions to


set program interrupt priority. If the priority specified by the LOCK
instruction in the program called by the ON/ONI instruction is the
same or higher than specified in the ON/ONI instruction, the pro-
gram call is not executed. Refer to the ON/ONI instruction for more
information.

7-52 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example In the example figure 7-10, step 1 in program main sets the priority
for the ON instruction at 3. Step 2 sets the priority for the call of
subroutine part1 at 4. Step 3 sets the priority for the call of subrou-
tine part2 at 2.

If signal 1001 changes from OFF to ON at any point in program


main, the subroutine part1 is called. Priority for subroutine part1 is
set at 4, which is above the LOCK instruction setting of 3.

If signal 1002 changes from OFF to ON, during steps 1 through 12,
the ON instruction is not executed. Priority for subroutine part2 is
set at 2, which is below the LOCK instruction setting of 3.

Step 12 changes the priority to 1. If signal 1002 changes from OFF


to ON, during execution of steps 13 through 20, the ON instruction,
for subroutine part2, is executed because the priority is set to 1.

If signal 1002 changes from OFF to ON during execution of steps 1


through 12, the execution of the ON instruction, for subroutine
part2, is delayed until after execution of the LOCK instruction at
step 12, changing the priority to 1.

.Program main() .Program part1() .Program part2()


1 LOCK 3 1 IGNORE 1001 1 IGNORE 1001
2 ON 1001 CALL part1,4 2 IGNORE 1002 2 IGNORE 1002
3 ON 1002 CALL part2,2 3 part1=0 3 part2=0
4 JAPPRO partbin1,100 4 10 JAPPRO conveyor1,100 4 10 JAPPRO conveyor2,100
5 LMOVE partbin1 5 LMOVE conveyor1 5 LMOVE conveyor2
6 CLOSEI 6 CLOSEI 6 CLOSEI
7 LDEPART 100 7 LDEPART 100 7 LDEPART 100
8 JAPPRO place1,100 8 JAPPRO partbin1,100 8 JAPPRO partbin2,100
9 LMOVE place1 9 LMOVE partbin1 9 LMOVE partbin2
10 OPENI 10 OPENI 10 OPENI
11 LDEPART 100 11 LDEPART 100 11 LDEPART 100
12 LOCK 1 12 part1=part1+1 12 part2=part2+1
13 JAPPRO partbin2,100 13 IF part1<50 GOTO 10 13 IF part2<50 GOTO 10
14 LMOVE partbin2 14 IF part1==50 GOTO 20 14 IF part2==50 GOTO 20
15 CLOSEI 15 20 HOME 15 20 HOME
16 LDEPART 100 16 ON 1001 CALL part1,4 16 ON 1001 CALL part1,4
17 JAPPRO place2,100 17 ON 1002 CALL part2,2 17 ON 1002 CALL part2,2
18 LMOVE place2 18 RETURN 18 RETURN
19 OPENI
20 LDEPART 100

Figure 7-10 LOCK Instruction Example

June 10, 2003 7-53


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

PAUSE PAUSE

Function Temporarily holds (pauses) program execution.

Explanation The PAUSE instruction stops program execution and displays the
message “program paused” on the terminal (keyboard screen).
Program execution is resumed using the CONTINUE command.
The PAUSE instruction can be used to verify variables while the
program execution is paused.

HALT HALT

Function Stops program execution. Program execution cannot be resumed.

Explanation The HALT instruction stops program execution regardless of re-


maining steps. The message “program halted” is displayed on the
terminal (keyboard screen). Program execution cannot be resumed
using the CONTINUE command.

7-54 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

STOP STOP

Function Terminates the current program execution cycle.

Explanation When the STOP instruction is executed and there are remaining
execution cycles, program execution returns to the first step. The
program execution continues between the first step and the step
with the STOP instruction until remaining execution cycles are
completed. The STOP instruction indicates the end of the execution
path.

The STOP instruction is different than the HALT instruction. The


STOP instruction allows remaining cycles to be completed and the
HALT instruction stops program execution immediately.

If there are remaining execution cycles, execution continues at the


first step of the main program when the STOP instruction is ex-
ecuted in a subroutine or another interrupting program.

A RETURN instruction in a main program functions in the same


manner as a STOP instruction.

Program execution interrupted by a STOP instruction cannot be


resumed using the CONTINUE command.

NOTE
A main program is a program executed using the EX-
ECUTE, STEP, or PCEXECUTE commands.

A subroutine is a program called from another program


by a CALL, ON, or ONI instruction.

June 10, 2003 7-55


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

SCALL SCALL string expressing, variable

Function Causes program execution to jump to the subroutine specified by


the string expression.

Parameter String expression:


Specifies the subroutine name as a string expression.

Variable:
If the subroutine call (SCALL) is executed normally (without an
error), the variable is assigned the value 0. If an error occurs during
the subroutine call (SCALL), and error code is assigned to the
variable (≠ 0). If the variable is omitted, program execution is
stopped when an error occurs in the subroutine call.

Explanation The SCALL instruction has the same function as the CALL instruc-
tion except the program name is expressed as a string expression.

The SCALL instruction is used in the case of many possible subrou-


tine calls.

For more information refer to the CALL instruction.

Example $porg=”sub1” ;Assigns sub1 to string expression $prog.


SCALL $prog ;Jumps to the subroutine named sub1.

num=12 ;Assigns the value 12 to the variable num.


$temp1=$ENCODE(/I2,num) ;Converts the real value assigned
$temp2=”” ;to “num” into a string expression .
;and jumps to the subroutine
;“sub12”.
FOR i=1 to LEN($temp1)
$temp3=$MID($temp1,i,1)
$temp3=<>””THEN
$temp2=$temp2+$temp3
END
END
SCALL “sub”+$temp2

7-56 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

ONE ONE program name

Function Calls the specified program when an error occurs.

Parameter Program name:


Specifies the program to call when an error occurs.

Explanation The ONE instruction is used to call a robot control program or a PC


program when an error occurs (Figure 7-11).

The RETURN instruction returns program execution to the step


where the error occurred. The RETURNE instruction returns pro-
gram execution to the step after the error occurred. If RETURN or
RETURNE are not in the subroutine, program execution stops at
the end of the subroutine called by the ONE instruction.

Motions instructions cannot be used in the subroutine program


called by the ONE instruction.

If an error occurs in the program called by the ONE instruction,


program execution is stopped.

NOTE
While the main program containing the ONE instruction
is executing, the ONE instruction is effective for the
main program and subroutines called from the main pro-
gram.

When an error occurs, the ERROR lamp does not illumi-


nate if a program is called by the ONE instruction.

June 10, 2003 7-57


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example In the example in figure 7-11, the ONE instruction in step one of the
program main, calls the subroutine recover when an error occurs.

Subroutine recover, pulses signal 10 for 2 seconds. Signal 10 can


be sent to a indicator lamp or a PLC to indicate an error has oc-
curred. The RETURNE instruction returns program execution to the
step following the step where the error occurred. Program execu-
tion is not interrupted, but the step where the error occurred is not
executed.

.Program main() .Program recover()


1 ONE recover 1 PULSE 10,2
2 SPEED 80 ALWAYS 2 RETURNE
3 ACCURACY 1 ALWAYS
4 10 JMOVE a
5 LMOVE b
6 IF SIG (1001) THEN
7 GOTO 10
8 END
9 IF SIG (1002) THEN
10 GOTO 20
11 END
12 20 JMOVE c
13 LMOVE d

Figure 7-11 ONE/RETURNE Instruction Example

7-58 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

RETURNE RETURNE

Function Returns program execution to the step after an error occurred.

Explanation The RETURNE instruction is usually used with the ONE instruction.
When the ONE instruction is executed the program jumps to the
specified subroutine when an error occurs. The program execution
is returned to the step after the error in the original program when
the RETURN instruction is executed in the subroutine (Figure 7-11).

CALLAUX CALLAUX auxiliary function number

Function Displays the specified auxiliary function screen.


(Option)

Parameter Auxiliary function number:


Specifies the auxiliary function number to display.
Acceptable range:
1–XXXX.

Explanation The CALLAUX instruction allows auxiliary functions to be displayed


and set from a program.

If program execution is set to a hold state while the CALLAUX


instruction is executing, the auxiliary function screen display is
canceled. If the CALLAUX instruction is executed from several
programs, the CALLAUX instruction waits until the first CALLAUX
instruction is terminated or held.

If an undefined auxiliary function number is specified by the


CALLAUX instruction, Error (P2030) Undefined function number, is
displayed. While the function number range is 1–XXXX, not all
numbers are valid auxiliary function numbers.

June 10, 2003 7-59


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.6 PROGRAM CONTROL FLOW STRUCTURE INSTRUCTIONS

This section describes the program control flow structure instructions and parameters.

Control flow structures are special types of program instructions that consist of more
than one line of code to form a group or block of steps. Depending on the structure
used, these blocks can provide sequence control, decision making, looping, and the
ability to select a set of instructions from many possible sets.

Table 7-6 lists the program control flow structure instructions and provides a brief de-
scription of the functions.

Detailed descriptions follow. Shaded parameters can be omitted.

Table 7-6 Program Control Flow Structure Instructions Descriptions

Instruction Description Page


IF..THEN..ELSE..END Executes instructions according to a logical expression. 7-61
While the specified condition is TRUE instructions are
WHILE..DO..END 7-63
executed.
DO..UNTIL Executes instructions until specified conditions are FALSE. 7-65
Executes instructions according to specified star t and end
FOR..TO..END 7-67
parameters.
CASE..OF..VALUE..ANY..END Executes program instructions according to case number. 7-69

7-60 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

IF..THEN.. IF logical expression THEN program instructions(1)


ELSE.. ELSE program instructions(2)
END END

Function Executes a group of program instructions according to the state


(TRUE or FALSE) of a logical expression.

Parameter Logical expression:


Specifies a logical expression or a real value expression. Monitors
the value of the expression, TRUE (not 0) or FALSE (0).

Program instructions(1):
Program instructions executed if the logical or real value expression
is TRUE.

Program instructions(2):
Program instructions executed if the logical or real value expression
is FALSE.

Explanation This control flow structure executes one of the two groups of
instructions according to the value of the logical expression.

Program execution sequence is as follows:

1. The logical expression is evaluated and if the value is FALSE


(0), the sequence jumps to step 4 below.

2. The logical expression is evaluated and if the value is TRUE (not


0), program instructions(1) are executed.

3. Execution jumps to step 5 below.

4. If there is an ELSE statement, program instructions(2) are ex-


ecuted.

5. Program execution continues with the program step after the


END instruction.

NOTE
The ELSE and END statements each occupy a full line.

The IF..THEN structure must include an END statement.

June 10, 2003 7-61


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example In the program example below, if “n” is greater than 5, program


speed is set to 10%, if “n” is not greater than 5, speed is set to 20%.

20 ...
21 IF n>5 THEN
22 sp=10
23 ELSE
24 sp=20
25 END
26 SPEED sp ALWAYS
27 ...

In the program example below the value of variable “m” is evaluated.


If “m” is not 0, the program monitors external input signal 1001
(WX1) and displays a different message according to the status of
the signal. In the example, the outer IF structure does not have an
ELSE statement.

70 ...
71 IF m THEN
72 IF SIG(1001) THEN
73 PRINT “Input signal is TRUE”
74 ELSE
75 PRINT “Input signal is FALSE”
76 END
77 END
78 ...

7-62 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

WHILE..DO WHILE condition DO


.. program instructions
END END

Function While the specified condition is TRUE, the program instructions are
executed. When the condition is FALSE, the WHILE..DO..END
structure is ignored.

Parameter Condition:
Logical expression or real value expression. The logical expression
or real value expression is monitored for state, TRUE (not 0) or
FALSE (0).

Program instructions:
Specifies a group of instructions to execute when the condition is
TRUE.

Explanation This control flow structure repeats the specified program instruc-
tions while the specified condition is TRUE.

Program execution sequence is as follows:

1. The logical expression is evaluated and if the value is FALSE


(0), the sequence jumps to step 4 below .

2. The logical expression is evaluated and if the value is TRUE (not


0), program instructions are executed .

3. Execution jumps to step 1 above.

4. Program execution continues with the program step after the


END instruction.

NOTE
Unlike the DO..UNTIL structure, if the condition is
FALSE, none of the program instructions in the
WHILE..DO structure are executed.

When the WHILE..DO structure is used, the condition


must change from TRUE to FALSE to allow program ex-
ecution to exit the loop.

June 10, 2003 7-63


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example In the following example, input signals 1001 and 1002 are moni-
tored and robot motion is stopped based on the signal’s state. If
either of the signal,s states changes to OFF, indicating the parts
feeder is empty, the program execution continues at the step after
the END statement.

If either of the signals are OFF, indicating the parts feeder is empty,
when the WHILE..DO structure is executed, none of the program
instructions in the structure are executed.

22 ...
23 WHILE SIG(1001,1002) DO
24 CALL part1
25 CALL part2
26 END
27 ...

7-64 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

DO DO
.. program instructions
UNTIL.. UNTIL logical expression

Function This structure forms a loop to execute the specified program in-
structions until the specified logical expression is FALSE.

Parameter Program instructions:


Specifies the program instructions to execute repeatedly as long as
the logical expression is FALSE.

Logical expression:
Specifies the logical expression or real value expression to monitor
for change in state from FALSE to TRUE.

Explanation This control flow structure executes a group of program instructions


while the specified logical expression or real value expression is
FALSE.

Program execution sequence is as follows:

1. The program instructions are executed.

2. The logical expression is evaluated and if the value is FALSE


(0), program execution jumps to step 1 above. If the logical
expression is TRUE, program execution jumps to step 3 below.

3. Program execution continues with the program step after the


UNTIL statement.

When the logical expression is TRUE program execution exits the


DO..UNTIL loop.

June 10, 2003 7-65


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

NOTE
Unlike the WHILE..DO structure, the program instruc-
tions in the DO..UNTIL structure are executed at least
once.

The program instruction between the DO statement and


the UNTIL statement can be omitted. If there are no
program instructions, the logical expression after the
UNTIL statement is evaluated repeatedly. When the
value of the logical expression changes to TRUE, then
the program execution exits the DO..UNTIL loop and
continues at the step after tie DO..UNTIL structure.

The DO..UNTIL structure must end with an UNTIL state-


ment.

Example In the example below the DO..UNTIL structure controls the following
task:

1. A part is picked up and carried to the buffer.

2. When the buffer is full, the input signal “[Link]” is set to ON.

3. When the signal “[Link]” is set ON, the program execution


continues with the step following the UNTIL instruction.

12 ...
13 DO
14 CALL [Link]
15 CALL [Link]
16 UNTIL SIG([Link])
17 ...

7-66 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

FOR..TO.. FOR loop variable=start value TO end value STEP step value
.. program instructions
END END

Function Causes repeated execution of program instructions between the


FOR and END statements.

Parameter Loop variable:


Variable or real value. This variable is set at an initial value, and is
incremented by one each time the loop is executed.

Start value:
Real value or expression. Sets the initial value of the loop variable.

End value:
Real value or expression. When the end value is equal to the start
value, program execution exits the loop.

Step value:
Real value or expression. The step value is added or subtracted to/
from the loop variable during each iteration of the loop. The STEP
instruction and step value can be omitted. If a step value is not
specified, 1 is added to the loop variable during each iteration of the
loop.

Explanation This control flow structure repeats execution of program instructions


between the FOR and END statements. The loop variable is
incremented/decremented during each iteration of the loop.

Program execution sequence is as follows:

1. The start value is assigned to the loop variable.

2. The end and step values are calculated.

3. The loop variable value is compared to the end value.

a. If the step value is positive, and the loop variable is greater


than the end value, program execution jumps to step 7 below.

b. If the step value is negative, and the loop variable is less than
the end value, program execution jumps to step 7 below.

c. In any other case, program execution jumps to step 4 below.

June 10, 2003 7-67


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

4. The program instructions after the FOR statement are executed.

5. When the END statement is executed, the step value is added/


subtracted to/from the loop variable.

6. Program execution returns to step 3 above.

7. Program execution continues with the step following the END


statement. The value of the loop variable does not change.

NOTE

There must be an END statement for each FOR..TO


loop (see example below).

If the loop variable is greater than the end value (less if


the step value is negative), none of the program instruc-
tions between the FOR and END statements are ex-
ecuted.

The value of the loop variable must not be changed by


other programming instructions (operators, expressions,
etc.) within the FOR..TO loop.

Example In the example below the robot moves 100 mm in the X direction, a
calculated distance (10*i + 7 mm) in the Y direction, and 50 mm in
the Z direction, and defines the location as weld[i].

The FOR..TO structure in this example uses the optional STEP


instruction to increment the value of “i” by 2 during each loop (2, 4,
6). The DRAW in the Y direction is 27 mm, 47 mm, and 67 mm.

FOR i=2 TO 6 STEP 2


DRAW 100,10*i+7,50
HERE weld[i]
END

7-68 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

CASE..OF CASE index variable OF


VALUE..: VALUE case number 1..:
: :
VALUE..: VALUE case number n..:
ANY ANY :
.. program instructions
END END

Function Executes program instructions according to case number.

Parameter Index variable:


Real value variable or expression. Determines which CASE struc-
ture to execute according to the index variable value.

Program instructions:
Program instructions to execute as determined by the index variable
value.

Explanation This control flow structure allows the program to execute a choice of
several groups of program instructions. This control flow structure is
used to allow several alternatives within a single program.

Program execution sequence is as follows:

1. The index variable value is evaluated.

2. The VALUE statements are evaluated to find a match for the


index variable value.

a. If a match is not found the program instructions for the ANY


statement are executed.

b. If there is not an ANY statement, program execution jumps to


step 4 below.

3. Program instructions for the matching VALUE statement are


executed.

4. Program execution continues with the step following the END


statement.

June 10, 2003 7-69


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example In the following example, if the value of real variable “x” is negative,
the message “Stopping because of a negative value” is displayed
and program execution is stopped. If the value is positive, the
program execution continues as follows:

1. If the value is an even number between 0 and 10, the message


“The number x is EVEN.”, is displayed. Where “x” represents the
number 0, 2, 4, 6, 8, or 10.

2. If the value is an odd number between 1 and 9, the message


“The number x is ODD.”, is displayed. Where “x” represents the
number 1, 3, 5, 7, or 9.

3. If the value is a positive number other than listed above, the


message “The number x is larger than 10.”, is displayed. Where
“x” represents a positive number other than listed above.

NOTE
The ANY statement and its program instructions can be
omitted.

The ANY statement can be used only once in the struc-


ture. The statement must be at the end of the structure
as shown in the example below.

A space must be entered between the ANY statement


and the colon. Without a space, the ANY is read as a
label.

The ANY and END statements occupy an entire line.

7-70 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

1 IF x<0 GOTO 10
2 CASE x OF
3 VALUE 0,2,4,6,8,10:
4 PRINT “The number”,X,”is EVEN.”
5 VALUE 1,3,5,7,9
6 PRINT “The number”,x,”is ODD.”
7 ANY :
8 PRINT “The number”,x,”is larger than 10.”
9 END
10 STOP
11 10 PRINT “Stopping because of a negative value.”
12 STOP

June 10, 2003 7-71


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.7 BINARY SIGNAL INSTRUCTIONS

This section describes the binary signal instructions and parameters.

Table 7-7 lists the binary signal instructions and provides a brief description of the func-
tions.

Detailed descriptions follow. Shaded parameters can be omitted.

Table 7-7 Binary Signal Instructions Descriptions

Instruction Description Page


RESET Sets all external output signals to OFF. 7-73
SIGNAL Sets external I/O and internal signals to ON or OFF. 7-73
PULSE Sets the specified signal ON for the specified time. 7-74
DLYSIG Sets the specified signal ON after the specified time delay. 7-75
RUNMASK Specifies signals to mask. 7-76
BITS Sets a specified group of signals equal to the specified value. 7-77
SWAIT Causes program execution to pause until the specified condition is met. 7-79
EXTCALL Calls the selected program using external signals. 7-80
ON Monitors specified signal for program interrupt. 7-82
ONI Monitors specified signal for program interrupt. 7-82
IGNORE Cancels ON and ONI instructions. 7-85
SCNT Sets the specified counter signal ON at the specified counter value. 7-86
SCNTRESET Resets the specified counter to 0. 7-87
SFLK Sets the specified signal ON/OFF at the specified cycle time. 7-87
SFLP Sets the specified signals ON/OFF using SET/RESET signals. 7-88
SOUT Sets the specified signal ON when the specified conditions are met. 7-89
Sets the specified timer signal ON when the specified signal is ON for the
STIM 7-91
specified time.
SETPICK Sets the time to star t clamp close. 7-92
SETPLACE Sets the time to star t clamp open. 7-92
CLAMP Controls the clamp open/close signals. 7-93

7-72 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

RESET RESET

Function Sets all external output signals OFF. This instruction does not effect
dedicated signals, clamp signals, or multifunction OX/WX antinomy.

With the optional setting, the interface panel signals are not affected
by the RESET instruction.

SIGNAL SIGNAL signal number,signal number,...

Function Sets the specified signal(s) to ON or OFF.

Parameter Signal number:


Specifies the external output or internal signal to set to ON or OFF.

Explanation The signal number identifies the signal type as external or internal.

Acceptable signal numbers:


External output signals: 1–number of installed signals
Internal signals: 2001–2256
External input signals—cannot be specified for SIGNAL command

If the signal number is positive, the signal is set ON. If the signal
number is negative, the signal is set OFF. An error occurs if a
dedicated signal number is specified.

Example 10 ...
11 JMOVE pick
12 SIGNAL 1,2
13 LMOVE place
14 SIGNAL -1,-2
15 ...

June 10, 2003 7-73


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

PULSE PULSE signal number,time

Function Sets the specified signal to ON for the specified time.

Parameter Signal number:


Specifies the external output or internal signal to set to ON (positive
values only). An error occurs if a dedicated signal number is speci-
fied.

Acceptable signal numbers:


External output signals: 1–number of installed signals
Internal signals: 2001–2256
External input signals—cannot be specified for PULSE command

Time:
Specifies the time in seconds the signal remains ON. If the time
parameter is not specified 0.2 seconds is used.

Example 10 ...
11 JMOVE pick
12 PULSE 10,3
13 LMOVE place
14 SIGNAL 1,2
15 ...

7-74 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

DLYSIG DLYSIG signal number,time

Function Used to set the specified signal to ON after the specified time is
elapsed.

Parameter Signal number:


Specifies the external output or internal signal to set to ON or OFF.

If the signal number is positive the signal is set ON. If the signal
number is negative the signal is set OFF. An error occurs if a dedi-
cated signal number is specified.

Acceptable signal numbers:


External output signals: 1–number of installed signals
Internal signals: 2001–2256
External input signals—cannot be specified for DLYSIG command

Time:
Specifies the delay time before the specified signal is set to ON or
OFF.

Example 10 ...
11 JMOVE pick
12 DLYSIG 15,5
13 LMOVE place
14 PULSE 10,3
15 ...

June 10, 2003 7-75


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

RUNMASK RUNMASK starting signal number,number of signals

Functions Allows the specified signals to be ON only during program execu-


tion. Signals set ON by the SIGNAL, PULSE or DLYSIG instruc-
tions are set OFF when program execution stops. If the RUNMASK
instruction is not used, signals remain ON until set OFF by another
signal instruction.

Parameter Starting signal number:


Specifies the first external output signal or internal signal number in
the group of signals to mask. Using a negative number cancels the
mask function for that signal number.

Acceptable signal numbers:


External output signals: 1–number of installed signals
Internal signals: 2001–2256

Number of signals:
Specifies the number of signals to mask. If not specified, 1 is as-
sumed.

Explanation Signals specified by the RUNMASK instruction are set OFF when
program execution stops. Dedicated signals are not affected by the
RUNMASK instruction.

When program execution is resumed using the CONTINUE, DO, or


STEP command, the signals return to the same state as before the
program was interrupted. If the program is restarted using the
EXECUTE command the RUNMASK instruction is nullified.

Example In the following example the signals set ON by the SIGNAL,


PULSE, and DLYSIG instructions, are set OFF by the RUNMASK
instruction if program execution is interrupted.

10 ...
11 JMOVE pick
12 SIGNAL 1,3
13 LMOVE place
14 PULSE 10,3
15 JMOVE start
16 DLYSIG 15,5
17 RUNMASK 1,15
18 ...

7-76 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

BITS BITS starting signal number,number of signals=value

Function Arranges a group of external output signals or internal signals into a


binary bit pattern. The signal states are set ON/OFF according to
the binary equivalent of the decimal value specified.

Parameter Starting signal number:


Specifies the first signal number of the binary bit pattern.

Acceptable signal numbers:


External output signals: 1–number of installed signals
Internal signals: 2001–2256
External input signals—cannot be specified for BITS command

Number of signals:
Specifies the number of signals in the binary bit pattern. The maxi-
mum number of signals that can be used with the BITS instruction
is 16.

Decimal value:
Specifies the decimal value used to set the required ON or OFF
signal states.

The decimal value is converted into binary notation and each bit of
the binary value is used to set the signal states starting at the least
significant bit.

If the binary notation of the value has more bits than the number of
signals specified, only the state of the specified number of signals
are set and the remaining bits are ignored.

June 10, 2003 7-77


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Explanation Sets or resets the signal state of one or more external output sig-
nals or internal signals according to the specified decimal value.

An error occurs if a signal number is specified that is greater than


the number of installed signals or a dedicated signal number is
specified.

Example In the example below, the output signal 1 is the least significant bit,
the number of bits in the binary pattern is 4 (signals 1,2,3, and 4),
and the decimal value is 10. The result of the BITS instruction
1,4=10 sets output signals 2 and 4 ON.

10 ...
11 JMOVE pick
12 BITS 1,4=10
13 LMOVE place
14 ...

7-78 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

SWAIT SWAIT signal number,signal number,...

Function Causes program execution to pause until the specified signal state
is met.

Parameter Signal number:


Specifies the external I/O or internal signal number(s) to monitor. A
negative signal number indicates the OFF state must be met.

Acceptable signal numbers:


External output signals: 1–number of installed signals
External input signals: 1001–1256
Internal signals: 2001–2256

Explanation When all specified signals meet the specified conditions, program
execution is resumed. If the specified condition(s) is/are not met,
program execution is held at the step with the SWAIT instruction.

An SWAIT instruction can be overridden using the CONTINUE


NEXT instruction.

The WAIT SIG instruction can be used to obtain the same results.

Example SWAIT 1001,1002 Causes program execution to pause until


external input signals 1001 (WX1) and 1002
(WX2) are set ON.

SWAIT 1,-2001 Causes program execution to pause until


external output signal 1 (OX1) is set ON and
internal signal 2001 is set OFF.

June 10, 2003 7-79


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

EXTCALL EXTCALL

Function Calls the program specified by an external input signal

Explanation The EXTCALL instruction operates using random program selection


(RPS) signals as described below and shown in the flow chart in
figure 7-12.

1. The JUMP-ST (jump start) signal is set ON, allowing external


program selection.

2. Program execution waits for the JUMP-ON signal to be set ON.

3. When the JUMP-ON signal is received, the RPS code is read to


determine program number to call. Programs must be num-
bered with a “pg” prefix.

For more information on RPS refer to the D Series Controller


Operations and Programming Manual.

NOTE
The EXTCALL instruction can be overridden using the
CONTINUE NEXT monitor command, if the JUMP-ON
signal is not received.

The EXTCALL instruction is valid only when RPS mode


is set ON and the required dedicated signals are set-up
and operational. If the RPS dedicated signals are not
set and the EXTCALL instruction is executed, an error
occurs.

If RPS is OFF, the EXTCALL instruction is ignored.

The EXTCALL instruction is used to call a subroutine.


After the subroutine is executed or a RETURN instruc-
tion is processed in the subroutine, program execution
returns to the original program.

7-80 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

JUMP-ST Output Signal ON

JUMP-ON OFF
Input Signal

ON
JUMP-OFF OFF
Read RPS Code
Input Signal

Equal
Current Program
= New Program Error (P1014)
Cannot execute ON
because program
Not Equal
is already in use.

Change Program

JUMP-ST OFF

Figure 7-12 EXTCALL Operation Flow Chart

June 10, 2003 7-81


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

ON ON mode signal number CALL program name,priority


ON mode signal number GOTO label,priority
ONI ONI mode signal number CALL program name,priority
ONI mode signal number GOTO label,priority

Function When an ON or ONI instruction is executed, the specified signal


number is monitored. When the signal state changes, program
execution branches to the specified subroutine (CALL) or jumps to
the specified label (GOTO).

The ONI instruction interrupts the current motion and executes the
CALL or GOTO instruction immediately. The ON instruction waits
until the current motion is completed before executing the CALL or
GOTO instruction.

Parameter Mode:
If a mode is not specified, the leading edge of the signal transition,
from OFF to ON, is monitored for a positive signal number. The
trailing edge, from ON to OFF, is monitored for a negative signal
number.

/ERR mode (option):


Returns an error if the signal status already meets the specified
condition when the ON or ONI instruction is executed.

/LVL mode (option):


Immediately executes the CALL or GOTO instruction if the signal
status already meets the specified condition when the ON or ONI
instruction is executed.

Signal number:
Specifies the signal number to monitor.

If a positive signal number is specified, the leading edge of the


signal transition is monitored.

If a negative signal number is specified, the trailing edge of the


signal transition is monitored.

Acceptable signal numbers:


External input signals: 1001–1256
Internal signals: 2001–2256

7-82 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Parameter Program name:


Specifies the program name to branch to when the specified signal
state is met. If a program name is not specified, program execution
continues at the next step.

Label:
Specifies the label to jump to when the specified signal condition is
met.

Priority:
Specifies program priority in real numbers from 0–127. If priority is
not specified, 0 is assigned. The higher the number the higher the
program priority.

Priority has no effect when a label is specified.

Explanation The ON...CALL instruction performs the same function as the CALL
instruction once the monitored signal condition is met.

If a RETURN instruction is executed in the called subroutine,


program execution returns to the step after the step being executed
before the interruption occurred.

The ONI instruction cannot be used in a PC program.

ON/ONI signal monitoring is canceled in the following cases:

1. An ignore instruction is executed for the specified ON or ONI


instructions.

2. An ON/ONI instruction is executed and program execution has


branched to a subroutine.

3. A new ON/ONI instruction that specifies the same signal and


condition as a previous ON/ONI instruction. The previous ON/
ONI instruction is canceled.

June 10, 2003 7-83


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

NOTE
The ON/ONI instruction specified signal is monitored for
a change in state not the current state. If a positive sig-
nal number is specified, the signal must change from
OFF to ON to cause program execution to branch to the
specified subroutine. If the signal is ON when the ON/
ONI instruction is executed program execution does not
branch until the signal is set OFF and ON again.

To ensure proper signal detection, the signal must re-


main stable for at least 50 msec.

Signal monitoring starts at the same time the motion in-


struction before the ON/ONI instruction is executed.

When program execution is interrupted signal monitor-


ing is canceled.

Example ONI -1001 CALL alarm


Monitors external input signal 1001 (WX1) for a change in state
from ON to OFF. When the signal transition occurs program execu-
tion immediately branches to the subroutine “alarm”.

ON test CALL delay


Monitors the signal assigned to the variable “test” (may be a positive
or negative signal number). When the specified signal condition is
met and the current robot motion is completed, program execution
branches to the subroutine ”delay”.

7-84 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

IGNORE IGNORE signal number

Function Cancels signal monitoring specified by an ON or ONI instruction.

Parameter Signal number:


Specifies the signal number to cancel monitoring.

Acceptable signal numbers:


External input signals: 1001–1256
Internal signals: 2001–2256

Explanation Cancels signal monitoring specified by an ON or ONI instruction.

Example IGNORE 1005


Cancels external input signal 1005 (WX5) monitoring.

IGNORE test
Cancels monitoring external input signal assigned to the variable
“test”.

June 10, 2003 7-85


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

SCNT SCNT counter signal number=count up signal, count down


signal, counter value

Function Sets the specified counter signal number ON when the specified
counter value is met.

Parameter Counter signal number:


specifies the counter signal number.

Acceptable signal numbers: 3097–3128

Count up signal:
Specifies a signal number or logical expression. Each time the
specified signal changes from OFF to ON the count value is in-
creased by 1.

Count down signal:


Specifies a signal number or logical expression. Each time the
specified signal changes from OFF to ON the count value is de-
creased by 1.

Counter clear signal:


Specifies a signal number or logical expression. When the specified
signal is set ON the counter value is reset to 0.

Explanation When the SCNT instruction is executed, each time the count up
signal is set from OFF to ON the count value is increased by 1.
Each time the count down signal is set from OFF to ON the counter
value is decreased by 1. When the specified counter value is
reached the counter signal is set ON.

When the counter clear signal is set from OFF to ON, or the
SCNTRESET instruction is executed, the counter value is reset to 0.
Refer to the SCNTRESET instruction for more information.

To verify the states of the counter signals (3097–3128) use the IO/E
command (option).

7-86 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

SCNTRESET SCNTRESET counter number

Function Sets the specified counter signal counter value to 0.

Parameter Counter signal number:


Specifies the counter signal counter value to reset.

Acceptable signal numbers: 3097–3128

Example SCNTRESET 3097


Resets the counter value for counter number 3097 to 0.

SFLK SFLK signal number=time

Function Sets the specified signal number ON/OFF in the specified time
cycle.

Parameter Signal number:


Specifies the flicker signal number.

Acceptable signal numbers: 3065–3096

Time:
Specifies signal ON/OFF cycle time in seconds. Cycle time is
expressed as a real value. If a negative value is specified, flickering
is canceled.

Explanation The process of setting the specified signal ON and OFF, in the
specified time, is considered one cycle.

Example In the example below, flicker signal 3065 is cycled ON for 15 sec-
onds and OFF for 15 seconds. A 30 second cycle time.

SFLK 3065=30

June 10, 2003 7-87


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

SFLP SFLP output signal=set signal expression,reset signal


expression

Function Used to set an output signal ON/OFF using a set signal and a reset
signal.

Parameter Output signal:


Specifies the signal number to set ON/OFF based on the state of
the set signal expression and the reset signal expression. A posi-
tive number sets the signal ON and a negative number sets the
signal OFF. External output signals, 1–number of signals installed,
can be used

Set signal expression:


Specifies the signal number or logical expression used to set the
specified output signal ON/OFF.

Reset signal expression:


Specifies the signal number or logical expression used to reset the
specified output signal ON/OFF.

Explanation Positive output signal number:


If the set signal is ON, the output signal is set ON. If the reset
signal is ON, the output signal is set OFF. If the set and reset
signals are ON, the output signal is set OFF.

Negative output signal number:


If the set signal is ON, the output signal is set OFF. If the reset
signal is ON, the output signal is set ON. If the set and reset sig-
nals are ON, the output signal is set ON.

The output signal is set ON/OFF, based on the state of the set and
reset signals when the SFLP instruction is executed.

7-88 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

SOUT SOUT signal number=signal expression

Function Used to set the specified signal number ON when the specified
condition(s) is/are satisfied.

Parameter Signal number:


Specifies the output signal number to set ON, when the signal
expression is satisfied.

Acceptable signal numbers:


External output signals: 1–number of installed signals.

Signal expression:
Specifies a signal number or a logical expression.

Explanation The SOUT instruction is used for logical calculation of signals.


Logical expressions such as AND and OR are used. The specified
signal number is set ON when the logical expression conditions are
satisfied (see example).

June 10, 2003 7-89


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example 1001
SOUT 1 = 1001 AND 1002 1
1002

1001
SOUT 1 = 1001 OR 1002 1
1002

1001
SOUT -1 = 1001 AND 1002
1
SOUT 1 = NOT (1001 AND 1002)
1002

1001
SOUT 1 = -1001 AND 1002 1
1002

1001
SOUT 1 = (1001 AND 1002) OR 1003
1002
1
1003

SOUT -1 = 1001
SOUT 1 = -1001 1001 1
SOUT 1 = NOT (1001)

7-90 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

STIM STIM timer signal=input signal number, time

Function Used to set the specified timer signal ON, when the specified input
signal is ON for the specified time.

Parameter Timer signal:


Specifies the timer signal number.

Acceptable signal numbers:


Timer signal numbers: 3001–3064

Input signal number:


Specifies the input signal number or logical expression (in whole
numbers) to monitor as a condition for setting the timer signal ON.

Time:
Specifies (in real numbers) the time, in seconds, the signal is ON
before the timer signal is set ON.

Explanation The monitored input signal must remain ON continuously for the
specified time for the timer signal to be set ON. If the input signal is
set OFF before the specified time elapses, the time count restarts
when the input signal is set ON again.

If the input signal is set OFF, the timer signal is set OFF immedi-
ately. The input signal affects the timer signal only when the STIM
command is executed. The timer signal remains ON, when the
input signal is set OFF, until the STIM instruction is executed again.

To display the state of internal signals 3001–3128, use the IO/E


command (option).

Example When the PC program test, shown below, is executed and signal 1
is ON for 5 seconds, signal 2 is set ON.

PC program test

STIM 3001 = 1,5


SOUT 2 = 3001

>PCEXECUTE test

June 10, 2003 7-91


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

SETPICK SETPICK time1,time2,...,time8

SETPLACE SETPLACE time1,time2,...,time8

Function Used to set the time to start clamp close control (SETPICK) or open
control (SETPLACE) for up to eight clamps.

Parameter Time 1–8:


Determines the control time to open/close clamps 1–8, in seconds.

Acceptable range:
0.0–10.0 seconds

Explanation Refer to the CLAMP instruction for information on clamp operation.

7-92 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

CLAMP CLAMP clamp number 1,...clamp number 8

Function Sets clamp output signals to open/close clamps ON.


Output signal timing is controlled by the SETPICK/SETPLACE
instruction.

Parameter Clamp number 1–8


Specifies the clamp number. If a positive number is specified, the
clamp is opened. If a negative number is specified, the clamp is
closed.

Explanation The clamp instruction sends the output signals to the control valve
to open and close the pneumatic clamp. The output signal is sent
immediately if the robot is not in motion, or if the remaining motion
time is less than the time set using the SETPICK/SETPLACE in-
struction. The output signal is sent when the axes are at coinci-
dence, if the next motion segment begins before the time set using
the SETPICK/SETPLACE instruction. If ambiguous clamp numbers
are used (i.e., CLAMP 1,-1) the latter clamp number is used.

Example 11 ...
12 SETPICK 4,3,2,1
13 SETPLACE 0.2,0.4,0.6,0.8
14 LMOVE a
15 CLAMP -1,2,3,-4
16 ...

In the above example program, execution is as follows:


Clamp 2 closes 3 seconds before reaching pose a.
Clamp 3 closes 2 seconds before reaching pose a.
Clamp 4 opens 0.8 seconds before reaching pose a.
Clamp 1 opens 0.2 seconds before reaching pose a.

June 10, 2003 7-93


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.8 MESSAGE CONTROL INSTRUCTIONS

This section describes the message control instructions and parameters.

Table 7-8 lists the message control instructions and provides a brief description of the
functions.

Detailed descriptions follow. Shaded parameters can be omitted.

Table 7-8 Message Control Instructions Descriptions

Instruction Description Page


PRINT Displays messages on the terminal (keyboard screen or PC). 7-95
TYPE Displays messages on the terminal (keyboard screen or PC). 7-95
PROMPT Displays messages on the terminal (keyboard screen or PC), and waits for 7-98
input.
IFPWPRINT Displays specified character string in a display window on the interface 7-100
panel.

7-94 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

PRINT PRINT device number: print data,print data,...

TYPE TYPE device number: print data,print data,...

Function Used to display messages and data on the specified device.

Parameter Device number:


Specifies the display device.

1: Displays messages and data on a PC


2: Displays messages and data on the teach pendant keyboard
screen.

If a device is not specified, the currently active device is selected.

Print data:
One or more of the available data types (shown below) may be
selected, separated by commas.

Character string in quotes


“count =”

Real value expression (value is calculated and displayed)


count

Display format codes


/D,/S

If parameters are not specified, a blank line is displayed.

Explanation If “2” is specified for the device number, when the TYPE or PRINT
instruction is executed the display automatically switches to the
keyboard screen to display the message or data.

The following format specifications are used to control the format of


numeric values. The setting is effective for subsequent parameters
until another format is given. In any format, if the value is too large
to be displayed in the specified area, asterisks (*) fill the area. It is
possible to display up to 128 characters in a line. To display more
than 128 characters, use the format /S described on the following
page.

If the MESSAGES switch is OFF, messages and data are not dis-
played on the screen.

June 10, 2003 7-95


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

TYPE/PRINT format Specification codes

/D Default format. This is the same as /Gm.n, where m=15 characters


and n=8 characters including the decimal except that following
zeros and all spaces except one between the values are removed.

/Em.n The value is displayed in scientific notation, whole numbers in the m


digits field and the fraction in n digits field. The value of m should
be greater than n by six or more, and less than thirty-two.

Example: 1.234E+02

/Fm.n The value is displayed in fixed point notation, whole numbers in the
m digits field with the fraction in the n digits field.

Example: -1.234

/Gm.n If the value is 0.01 or greater and can be displayed in the format F
in the m digit field, the value is displayed in F format. Otherwise,
the value is displayed in the /Em.n format.

/Hn The value is displayed as a hexadecimal number in the n digit field.

/ln The value is displayed as a decimal number in the n digit field.

The following format codes insert the specified characters between character strings.

/Cn A set of carriage returns (CR) and line feeds (LF) is output n times.
If this argument is the first or the last in the PRINT instruction, n
blank lines are displayed on the terminal, otherwise, n-1 blank lines.

/S This format code suppresses the output of (CR) and (LF) at the
beginning of a message. This is effective only when /S is the first
format code.

/Xn n spaces are inserted.

/Jn (Option) This format code displays the value as a hexadecimal number in the
n digit field. Zeros are displayed in place of blanks.

/Kn (Option) This format code displays the value as a decimal number in the n
digit field. Zeros are displayed in place of blanks.

/L This format code is the same as /D except all the spaces are re-
moved from the message or data.

7-96 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example In this example the value of real variable “i” is 5, the fifth element of
the array variable “point” is 12.66666.

PRINT “point” ,i,”=”,/F5.2,point [i]

When the above PRINT instruction and format code are entered the
display is shown as below.

point 5=12.67

The format code “/F5.2” allows five digits, three to the left of the
decimal and two to the right of the decimal. If the value of point[5] is
1000 (requires 4 digits to the left of the decimal), the display area is
too small and asterisks are displayed as shown below.

point 5=*****

In the following example, format code /S is used to display data


without a carriage return or a line feed.

PRINT “ABC”
PRINT/S, “DEF”
PRINT “GHI”

The resulting display of the above entered PRINT instruction is


shown below (“DEF” and “GHI” are displayed on the same line).

ABC
DEFGHI

June 10, 2003 7-97


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

PROMPT PROMPT device number:character string,variables

Function Displays the specified character string on the terminal followed by


the keyboard prompt ”>” and waits for input from the keyboard.

Parameter Device number:


Specifies the display device.

1: Displays messages and data on a PC


2: Displays messages and data on the teach pendant keyboard
screen.

If a device is not specified, the currently active device is selected.

Character string:
Specifies the character string displayed.

Variable:
The input from the keyboard, when the prompt is displayed, is
assigned to the specified variable. The variable may be a series of
real variables or a single string variable.

Explanation The PROMPT instruction displays the specified character string on


the terminal and waits for data to be entered followed by pressing
the ENTER key on the keyboard.

The data entered from the keyboard is processed in one of the


following ways:

1. When the PROMPT instruction is used to input values for a


series of real variables, the system reads the input line as a
series of numbers separated by spaces or commas. Each
number is converted into an internal expression according to its
notation, and assigned to variables individually.

2. If the number of values input is greater than the number of


variables, the extra values are ignored. If the number of values
input is less than the number of variables, 0 is assigned the
remaining variables. If data other than numeric values are input,
an error occurs and program execution stops. To minimize
confusion and error, use one PROMPT instruction to assign one
value to one variable.

7-98 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Explanation When a character string variable is used as the variable parameter


for the PROMPT, the characters input are read as a single data line
and all of the characters are assigned to the character string vari-
able.

At the prompt, if only the ENTER key or CTRL+C key is pressed, 0


is assigned to the real variable, or a null string, in the case of a
string variable.

If “2” is entered as the device number, the teach pendant keyboard


is automatically displayed. Press the NEXT PAGE key to return to
the previous screen.

Example In the example below, the character string in quotations is displayed


on the terminal, program execution waits for data input. When the
data (number of parts) is input and the ENTER key is pressed, the
value entered is assigned to the variable “[Link]”. Program
execution continues.

PROMPT “Enter the number of parts:”,[Link]


FOR parts = 1 to [Link]
LMOVE pick
LMOVE place
END

In the example below, the variable value is entered as a character


string variable and the number of parts is determined by the length
(LEN) of the string variable (number of characters).

PROMPT “Enter the number of parts:”,$input


FOR parts = 1 TO LEN( $input)
LMOVE pick
LMOVE place
END

June 10, 2003 7-99


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

IFPWPRINT IFPWPRINT window,row,column,background color,label color=


”character string”,”character string,...

Function Displays the specified character string in the specified text window
assigned in AUX 0509 Interface Panel.

Parameter Window:
Specifies the window to display the character string. Windows 1–4
are available.

Row:
Specifies the row in the window to display the character string.
Rows 1–16 are available, depending on window size specified in
AUX 0509 Interface Panel. If a row is not specified, 1 is assumed.

Column:
Specifies the column in the window to display the character string.
Columns 1–43 are available, depending on window size specified in
AUX 0509 Interface Panel. If a column is not specified, 1 is as-
sumed.

Background color:
Specifies the background color of the window. Color code numbers
0–15 are available (see table 6-9). If a background color code
number is not specified, white is used.

Label color:
Specifies the character color displayed in the specified window.
Color code numbers 0–15 are available (see table 6-9). If a label
color code number is not specified, white is used.

Character string:
Specifies the character string displayed in the window. If multiple
character strings are specified, each character string is displayed in
a separate row.

Explanation The IFPWPRINT instruction is available only when the interface


panel window data is set in AUX 0509 Interface Panel. If param-
eters are not specified, the last parameters set for the specified
window are used. If parameters are not previously set the default
parameters listed above are used. If the character string does not
fit in a row, the display wraps to the next row. If the character string
does not fit in the window the remaining characters are not dis-
played. Control characters are displayed as blanks.

7-100 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Table 7-9 Interface Panel Color Palette

Number Color Number Color Number Color Number Color


0 Gray 4 Green 8 Pink 12 Navy
1 Blue 5 Pale Blue 9 White 13 Reddish Brown
2 Red 6 Yellow 10 Black 14 Dark Green
3 Orange 7 White 11 Cyan 15 Lavender

June 10, 2003 7-101


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.9 POSE INFORMATION INSTRUCTIONS

This section describes the pose information instructions and parameters.

Table 7-10 lists the pose information instructions and provides a brief description of the
functions.

Detailed descriptions follow. Shaded parameters can be omitted.

Table 7-10 Pose Information Instructions Descriptions

Instruction Description Page


HERE Defines the current pose (location) as a pose (location) variable. 7-104
POINT Defines a pose variable. 7-105
POINT/X Sets the X value of a pose (location) variable. 7-106
POINT/Y Sets the Y value of a pose (location) variable. 7-106
POINT/Z Sets the Z value of a pose (location) variable. 7-106
POINT/OAT Sets the OAT value of a pose (location) variable. 7-106
POINT/O Sets the O value of a pose (location) variable. 7-106
POINT/A Sets the A value of a pose (location) variable. 7-106
POINT/T Sets the T value of a pose (location) variable. 7-106
POINT/7 Sets the value of the seventh axis of a pose (location) variable. 7-106
DECOMPOSE Assigns the components of a pose (location) variable to elements of an 7-108
array variable.
BASE Changes the robots base coordinate system. 7-110
TOOL Defines the tool center point (TCP). 7-111
LLIMIT Sets the upper limit of robot motion. 7-112
ULIMIT Sets the lower limit of robot motion. 7-112
TIMER Sets a timer value in seconds (timers 1–10). 7-113
UTIMER Sets a user timer value in seconds. 7-114
ON Sets a system switch ON. 7-115
OFF Sets a system switch OFF. 7-115
NCHON Sets the notch filter ON (option). 7-116
NCHOFF Sets the notch filter OFF (option). 7-116

7-102 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Table 7-10 Pose Information Instructions Descriptions (Continued)

Instruction Description Page


WEIGHT Sets weight data (load on the robot arm). 7-117
MC Executes monitor commands from a PC program. 7-118
PLCAOUT Assigns real values to output data (option). 7-119
TPLIGHT Sets the teach pendant backlight ON. 7-120

June 10, 2003 7-103


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

HERE HERE pose variable name

Function Defines the pose variable as the current robot pose. The pose may
be expressed in transformation values, joint displacement values or
compound transformation values.

Parameter Pose variable name:


Is specified in transformation values, joint displacement values, or
compound transformation values.

NOTE
Only the right most variable in a compound transforma-
tion value is defined. If the other variables used in the
compound values are not defined, an error is occurs.

Explanation In the example below, the DRIVE instruction is used to move JT1,
75 degrees at 50 percent speed. The BREAK instruction ensures
the robot completes the move instruction before reading the next
instruction. The HERE instruction records the current pose as pose
variable a.

The next DRIVE instruction is used to move JT2, 100 degrees at 50


percent speed. The BREAK instruction ensures the robot com-
pletes the move instruction before reading the next instruction. The
HERE instruction records the current location as pose variable b.

.Program pg55()
1 DRIVE 1, 75, 50
2 BREAK
3 HERE a
4 DRIVE 2, 100, 50
5 BREAK
6 HERE b
7 JMOVE a
8 JMOVE b

7-104 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

POINT POINT pose variable name 1


=pose variable name 2, joint displacement values

Function Assigns the pose information on the right of the assignment sign (=)
to the pose variable on the left side of the assignment sign (=).

Parameter Pose variable name 1:


Specifies the name of the pose information variable to define (may
be defined in joint displacement values, transformation values, or
compound transformation values).

Pose variable name 2:


May be defined in joint displacement values or transformation
values.

Joint displacement values:


This parameter must be set if the pose variable name on the left is
defined by joint displacement values and the pose information
values on the right are transformation values (if the parameter on
the left is not defined by joint displacement values, this parameter
cannot be set). The joint displacement values specified here define
the configuration of the robot at the pose. If not specified, the
current configuration is used to define the pose variable.

Explanation When the variable is expressed in compound transformation values,


the right most variable in the compound transformation value is
defined. If the other variables used in the compound value are not
defined, an error occurs.

If the pose variable on the right side of the assignment sign (=) is
not defined, an error occurs.

June 10, 2003 7-105


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Variations of the point command.

POINT POINT/X transformation variable name 1=


transformation variable name 2

POINT/ Y transformation variable name 1=


transformation variable name 2

POINT/Z transformation variable name 1=


transformation variable name 2

POINT/OAT transformation variable name 1=


transformation variable name 2

POINT/O transformation variable name 1=


transformation variable name 2

POINT/A transformation variable name 1=


transformation variable name 2

POINT/T transformation variable name 1=


transformation variable name 2

POINT/7 transformation variable name 1=


transformation variable name 2

Function Assigns the components of the transformation values specified on


the right of the assignment sign (=) to the corresponding component
of the transformation values on the left of the assignment sign (=).
The values are displayed on the terminal and can be edited.

Parameter Variable name 1:


Specifies the transformation variable name to define (transformation
variable or compound transformation values with a transformation
variable as the rightmost value).

Variable name 2:
Specifies the transformation variable to use to define the compo-
nent of the variable name on the left side of the assignment sign (=).
A previously defined transformation value variable or compound
transformation variable, or a transformation value function may be
used.

7-106 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Explanation If compound transformation values are specified on the left side of


the assignment sign (=), only the rightmost value in the compound
transformation is defined. If any value other than the rightmost
variable in the compound transformation value is undefined, an
error occurs.

If any pose information on the right side of the assignment sign (=)
is not defined, an error occurs.

Example In the example below, the POINT/X instruction is used to assign the
X component of the transformation value “tempx” to the X compo-
nent of the transformation value “temp”.

POINT/X temp=tempx

June 10, 2003 7-107


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

DECOMPOSE DECOMPOSE array variable name[element number]=pose


variable name or real variable name

Function Stores the value of the specified pose variable (X, Y, Z, O, A, T for
transformation values; JT1, JT2, JT3, JT4, JT5, JT6 for joint dis-
placement values) or real value variable as elements of an array
variable.

Parameter Array variable name:


Specifies the array variable where the component values are
stored.

Element number:
Specifies the first element number used to store the components. If
omitted, zero (0) is assumed.

Pose variable name:


Specifies the pose variable to extract components from, for assign-
ment to the array variable elements.

Real variable name:


Specifies the real variable to extract components from, for assign-
ment to the array variable elements.

Explanation The DECOMPOSE instruction extracts component values from the


specified location, and assigns these values to consecutive ele-
ments of the specified array.

If the specified pose is in transformation values, six elements corre-


sponding to the X, Y, Z, O, A, T components are defined.

If the specified pose is in joint displacement values, six elements


corresponding to the JT1, JT2, JT3, JT4, JT5, JT6 components are
defined.

7-108 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

Example In the example shown in figure 7-13, the current pose of the robot is
defined as “a”. The DECOMPOSE instruction extracts the compo-
nent values one through six of “a”. The program instructions be-
tween the FOR and END statements are executed six times. The
TYPE instruction displays the component values of “a” individually.

.Program pg62()
1 HERE a
2 DECOMPOSE 1[1]1 = a
3 FOR i = 1 TO 6
4 TYPE “a [”,i,’] = “, a[i]
5 END

>LIST/r a*
a[1] = 16.78
a[2] = 25.67
a[3] = 30.08
a[4] = 12.34
a[5] = 45.76
a[6] = 10.99

Figure 7-13 DECOMPOSE Instruction Example

June 10, 2003 7-109


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

BASE BASE transformation values

Function Defines the base transformation values used to determine the pose
relation between the base coordinates and the null base coordi-
nates.

Parameter Transformation values (or compound transformation values):


Used to define new base coordinates. The BASE transformation
values describe the configuration of the base coordinates with
respect to the null base coordinates, expressed in null base coordi-
nates.

Explanation If “NULL” is designated for the parameter, the base transformation


values are set as “null base” (XYZOAT=0, 0, 0, 0, 0, 0,). When the
system is initialized, the base transformation values are automati-
cally set to null base.

When the robot moves to a pose defined by transformation values


or is jogged in base mode, the system automatically calculates the
robot pose taking in consideration the base transformation values
defined using the BASE instruction.

When the BASE instruction is executed, robot continuous path


motion is paused, as with the BREAK instruction. The base trans-
formation values are changed to the specified transformation values
and robot motion is resumed.

The BASE instruction has no affect on poses defined by joint dis-


placement values.

7-110 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

TOOL TOOL transformation values

Function Defines the tool transformation values that specify the position and
orientation relationship between the tool coordinates and the null
tool coordinates.

Parameter Transformation values (or compound transformation values):


Defines the new tool coordinates. The transformation values de-
scribe the position and orientation of the tool coordinates with
respect to the null tool coordinates, expressed in null tool coordi-
nates.

Explanation If “NULL” is designated for the parameter, the tool transformation


values are set at “null tool” (XYZOAT=0, 0, 0, 0, 0, 0,). The null tool
coordinates have their origin at the center of the tool mounting
flange and the axes are parallel to the axes of the robot’s last joint.
When the system is initialized, the tool transformation values are
automatically set to null tool.

When the robot moves to a pose defined by transformation values


or is jogged in base mode or tool mode, the system automatically
calculates the robot pose taking in consideration the tool transfor-
mation values defined by the tool transformation.

When the TOOL instruction is executed, robot continuous path


motion is paused as with the BREAK instruction. The tool transfor-
mation values are changed to the specified transformation values
and robot motion is resumed.

June 10, 2003 7-111


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

ULIMIT ULIMIT joint displacement values

LLIMIT LLIMIT joint displacement values

Function Used to set the upper/lower limits of robot motion range.

Parameter Joint displacement values:


Specifies the software limit (upper or lower) in joint displacement
values.

Example Set the upper software limit to the pose defined as


“#upper”.
ULIMIT #upper

Set the lower software limit to the pose defined as


“#low”.
LLIMIT #low

7-112 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

TIMER TIMER timer number = time

Function Sets the time of the specified timer.

Parameter Timer number:


Specifies the timer number to set the time.

Acceptable range:
1–10

Time:
Specifies the time to set for the specified timer number.

Explanation When the TIMER instruction is executed the specified timer is set to
the specified time immediately. The TIMER function is used to
check the timer value, as described in unit 10, Functions.

Example In the example below, timer 1 is set to 0. Program execution is


paused until the value of timer 1 is greater than variable delay.

1 TIMER 1= 0 ;Sets timer 1 to 0 seconds


2 WAIT TIMER(1)>delay ;Pauses program execution until the
;value of timer 1 is greater than variable
;delay

June 10, 2003 7-113


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

UTIMER UTIMER @timer variable = timer value

Function Specifies the default value for a user timer. The user timer is named
by the timer variable parameter. Multiple user timers may be used.

Parameter @timer variable:


Specifies the variable or array variable name. Enter “@” before a
whole number variable.

Timer value:
Specifies the default value for the user timer.

Acceptable range:
0–2147483647.

7-114 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

..ON switch name, switch name,...ON


..OFF switch name, switch name,...OFF

Function Used to change system switch settings.

Parameter Switch name:


Specifies the system switch to change setting. More than one
switch name can be entered separating each switch name by com-
mas.

ON or OFF:
Sets the specified system switch(es) to ON or OFF.

Example In the example below, the CP and MESSAGES switches are set to
ON.

1 SPEED 80 ALWAYS
2 ACCURACY 10 ALWAYS
3 CP,MESSAGES ON
4 LMOVE start

June 10, 2003 7-115


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

NCHON NCHON
NCHOFF NCHOFF

Function Sets the notch filter ON/OFF for the motion steps following the
NCHON/NCHOFF instruction.

NOTE
Default setting for the notch filter is ON (NCHON).

NCHOFF is used when vibration is observed at low


speed operation or when an external force is applied to
the robot.

The notch filter is reset when the EXECUTE, PRIME,


STEP, or MSTEP commands are executed.

Example In the example below, the notch filter is set OFF for the DRAW
instruction at step 6 and set back to ON at step 7.

1 SPEED 100 ALWAYS


2 HOME
3 DRIVE 5,90
4 NCHOFF
5 SPEED 10
6 DRAW 1000
7 NCHON
DRAW,-500

7-116 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

WEIGHT WEIGHT load mass, center of gravity location X, center of


gravity location Y, center of gravity location Z, inertia
moment ab. X axis, inertia moment ab. Y axis, inertia
moment ab. Z axis

Function Used to set the load mass data (weight of tool and workpiece). The
data is used to determine the optimum acceleration for the robot
axes.

Parameter Load mass:


The mass of the tool and work (in kilograms). Range: 0.0 to the
maximum load ability (kg).

Center of gravity location (unit = mm):


X the x value of the center of gravity in tool coordinates
Y the y value of the center of gravity in tool coordinates
Z the z value of the center of gravity in tool coordinates

Inertia moment about X axis:


Inertia moment about Y axis:
Inertia moment about Z axis (option):

Used to set the inertia moment around each axes. The unit is
kg·m2. The inertia moment about each axis is defined as the mo-
ment around the coordinates axes parallel to the null tool coordi-
nates with the center of rotation at the tool’s center of gravity.

Explanation If parameters are not specified, the setting defaults to the maximum
load capacity for the robot model.

! CAUTION
Always set the correct load mass and center of gravity
location. Incorrect data may weaken or shorten robot
parts serviceability or cause overload/deviation errors.

June 10, 2003 7-117


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

MC MC monitor command

Function Enables execution of monitor commands from PC programs. Moni-


tor commands available using the MC instruction are; ABORT,
CONTINUE, ERESET, EXECUTE, HOLD, and SPEED.

Explanation The MC instruction is used to execute a robot program from the


[Link] program. Motor power must be set ON, to execute
a robot program from the [Link] program (see example
below).

The MC instruction cannot be used in a robot program.

Example The example below shows an example of an [Link]


program using the MC instruction.

.Program [Link]()
1 10 IF SWITCH(POWER)==FALSE GO TO 10
2 MC EXECUTE pg1
3 END

7-118 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

PLCAOUT PLCAOUT data number = real value

Function Assigns the specified real number value to the specified data
(Option) number.

Parameter Data number:


Specifies the output data number in whole numbers.

Acceptable range:
1–32

Real value:
Specifies the value assigned to the output data, and is entered in
decimal notation or a variable name.

Acceptable range:
0–65535

NOTE
This command is only available if the “Built-in Se-
quencer Function” is set to ON. If the option is OFF, the
error message “(E1102) Cannot execute, no option set
up. - Check option specs.” is displayed.

Example PLCAOUT 13=120

Assigns 120 (decimal notation) to data number 13.

June 10, 2003 7-119


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

TPLIGHT TPLIGHT

Function Sets the teach pendant backlight ON.

Explanation If the tech pendant screen backlight is OFF, the TPLIGHT instruc-
tion sets the backlight ON. If the teach pendant backlight is ON, the
backlight stays on for 600 seconds.

7-120 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

7.10 PROGRAM AND DATA CONTROL INSTRUCTIONS

This section describes the program and data control instructions and parameters.

Table 7-11 lists the program and data control instructions and provides a brief descrip-
tion of the functions.

Detailed descriptions follow. Shaded parameters can be omitted.

Table 7-11 Program and Data Control Instructions Descriptions

Instruction Description Page


DELETE Deletes programs and variables from the controller's memory (option). 7-122
DELETE/P Deletes programs from the controller's memory (option). 7-122
DELETE/L Deletes pose (location) variables from the controller's memory (option). 7-122
DELETE/R Deletes real variables from the controller's memory (option). 7-122
DELETE/S Deletes string variables from the controller's memory (option). 7-122
TRACE Sets the TRACE function ON/OFF. 7-123

June 10, 2003 7-121


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

DELETE program name, program name,...


DELETE/P program name, program name,...
DELETE/L pose variable, pose variable,...
DELETE/R real variable [array element], real variable [array element]
DELETE/S string variable [array element], string variable [array ele-
ment],...

Function Deletes the specified data from the controller’s memory.


(Option)

Parameters Program name:


Specifies the program name(s) to delete.

Pose variable:
Specifies the pose(s) (locations) to delete.

Real variable [array element]:


Specifies the real variable(s) to delete.

String variable(s):
Specifies the string variable(s) to delete.

Explanation For more information on the delete instructions refer to unit 6, DE-
LETE monitor command.

7-122 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROGRAM INSTRUCTIONS

TRACE TRACE stepper number: ON/OFF

Function Logs and traces the contents of robot control and PC programs that
are executed.

Parameter Stepper number:


Specifies the type of program to trace using the stepper numbers as
shown below:

1: Robot program
1001: PC program 1
1002: PC program 2
1003: PC program 3
1004: PC program 4
1005: PC program 5

If type is not specified, all the programs are logged.

ON/OFF:
Enables/disables the trace function.

Explanation If the necessary memory is not reserved using the SETTRACE


command before TRACE ON is specified, error P2034 is displayed
as shown below.

Error (P2034) Memory undefined for logging

For information on the SETTRACE monitor command, refer to unit


6.

June 10, 2003 7-123


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SYSTEM SWITCHES

8.0 SYSTEM SWITCHES .......................................................................................... 8-2

June 10, 2003 8-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SYSTEM SWITCHES

8.0 SYSTEM SWITCHES

This unit describes the functions of the AS system switches.

The system switches allow the operator to set software switches ON and OFF to alter
robot system functions. Changes made to the status of the system switches are global
and affect all programs in the controller’s memory.

Table 8-1 lists the system switches and provides a brief description of the functions.

Detailed descriptions follow.

8-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SYSTEM SWITCHES

Table 8-1 System Switches

System Switch Description Page


CP Enables/disables continuous path (CP) function. 8-4
[Link] Enables/disables EXECUTE, DO, STEP, MSTEP and CONTINUE 8-4
commands in HOLD.
[Link] Stops cycle with external HOLD. 8-5
MESSAGES Enables/disables message display. 8-5
[Link] Changes timing of blockstep program output signals. 8-6
[Link] Changes timing of AS Language program output signals. 8-6
QTOOL Enables/disables tool transformation. 8-7
RPS Enables/disables random program selection (RPS). 8-7
SCREEN Controls terminal display scrolling. 8-7
REP_ONCE Sets repeat mode to repeat once or repeat continuous. 8-7
STP_ONCE Sets repeat mode to step once or step continuous. 8-7
[Link] Enables automatic PC program star t at controller power-up. 8-8
[Link] Executes the selected PC program when an error occurs. 8-8
TRIGGER Displays the TRIGGER switch status (ON/OFF). 8-8
CS Displays the CYCLE START status (ON/OFF). 8-8
POWER Displays the MOTOR POWER status (ON/OFF). 8-8
RGSO Displays the SERVO POWER status (ON/OFF). 8-8
TEACH_LOCK Displays the TEACH LOCK switch status (ON/OFF). 8-8
ERROR Displays program error status (Error/no error). 8-9
REPEAT Displays the TEACH/REPEAT switch status. 8-9
RUN Displays the HOLD/RUN switch status. 8-9
DISPIO_01 Changes the I/O status display (0 and 1 or X and O). 8-9
[Link] Enables display of the current step when the program is in HOLD 8-9
(option).
WS_COMPOFF Changes weld schedule (WS) signal timing (option). 8-10
FLOWRATE Changes between FLOWRATE and SPEED OUTPUT mode (option). 8-10
[Link] Changes signal processing for weld schedule (WS) 0 (option). 8-10
[Link] Enables/disables absolute speed (option). 8-11
SLOW_START Enables/disables slow star t function (option). 8-11
[Link] Changes the star t timing of blockstep program timers (option). 8-11

June 10, 2003 8-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SYSTEM SWITCHES

• CP

The CP switch is used to enable or disable the continuous path function. When the
switch is ON, the robot makes smooth transitions between motion segments within
the accuracy ranges set.

When the switch is OFF, the robot decelerates and stops at the end of each motion
segment regardless of accuracy (Figure 8-1).

The default setting for this switch is ON.

Robot path with CP ON


Robot path with CP OFF
TAUGHT POSITION

ACCURACY RANGE

Figure 8-1 CP Switch

• [Link]

This switch is used with the AS Language commands EXECUTE, DO, STEP,
MSTEP and CONTINUE. When the [Link] switch is ON these commands
are available only if the HOLD/RUN switch is in the HOLD position. The controller
accepts these commands with the HOLD/RUN switch in the HOLD position but
robot motion is not initiated until the switch is manually placed in the RUN position.

The default setting for this switch is OFF.

8-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SYSTEM SWITCHES

• [Link]

This switch is used in conjunction with an external input signal to stop the motion of
the robot. With the switch ON, when the input signal is received the robot stops and
the cycle start light turns OFF. When the program is started again it starts at the
beginning. If the program is called from another program, the program restarts at
the beginning of the main program.

With the switch OFF, when the input signal is received the robot stops and the cycle
start light remains ON. The robot is in a hold condition and when the program is
started again, it continues at the point in the cycle where it was stopped.

The default setting for this switch is OFF.

• MESSAGES

Enables or disables message output (PRINT or TYPE) to the keyboard screen.

The default setting for this switch is ON.

June 10, 2003 8-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SYSTEM SWITCHES

• [Link]

This switch affects the timing of output signal generation in block step programs.
When the switch is ON, an output programmed for a given point is turned ON when
the robot begins motion to the point.

With the [Link] switch OFF, an output programmed for a given point is not
turned ON until the robot reaches the accuracy range of the point. Figure 8-2
shows the effects of the [Link] switch on signal timing.

The default setting for this switch is ON.

Figure 8-2 [Link] Switch

• [Link]

This switch is used in conjunction with AS Language instructions and has the same
effect on signal timing as the [Link] switch has with blockstep instructions.

The AS Language instructions affected are; SWAIT, TWAIT, SIGNAL, PULSE,


DLYSIG, RUNMASK, RESET and BITS.

The default setting for this switch is ON.

8-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SYSTEM SWITCHES

• QTOOL

This switch allows the user to identify tools to use in block step or AS Language
programming. When the QTOOL switch is ON, nine tools are available for program-
ming and jogging. The tool dimensions are recorded and assigned a tool number
using auxiliary function 48. When the QTOOL switch is ON, the selected tool di-
mensions are in effect for jogging and linear playback of block step programs.

When the QTOOL switch is OFF, the tool identified with AS Language instructions
is used and tool “T0” is displayed on the status screen.

The default setting for this switch is ON.

• RPS (Random Program Selection)

This switch enables or disables the random selection of programs based on binary
status of dedicated inputs.

The default setting for this switch is OFF.

• SCREEN

This switch enables or disables scrolling of the screen when information is too large
to fit on one screen.

The default setting for this switch is ON.

• REP_ONCE (Repeat Once)

When this switch is ON, programs run one time.

With the switch OFF, the program runs continuously.

The default setting for this switch is OFF.

• STP_ONCE (Step Once)

When this switch is ON, the repeat condition function of progressing through a
program one step at a time is active. The step forward key is used to step through a
program. When the switch is OFF, programs run continuously.

The default setting for this switch is OFF.

June 10, 2003 8-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SYSTEM SWITCHES

• [Link]

The [Link], [Link], and [Link] switches automati-


cally start the associated PC program when controller power is turned on.

The default setting for this switch is OFF.

• [Link]

When this switch is ON and specified errors (assigned dedicated signals) occur, a
PC program is run as soon as the error is detected.

The default setting for this switch is OFF.

• SWITCH (TRIGGER)

Used with the SWITCH function to display the status of the teach pendant trigger
switch (enabling device), ON or OFF. If the switch is ON, -1 is returned. If the
switch is OFF, 0 is returned.

• SWITCH (CS)

Used with the SWITCH function to display the status of the CYCLE START switch,
ON or OFF. If the switch is ON, -1 is returned. If the switch is OFF, 0 is returned.

• SWITCH (POWER)

Used with the SWITCH function to display the status of the MOTOR POWER
switch, ON or OFF. If the switch is ON, -1 is returned. If the switch is OFF, 0 is
returned.

• SWITCH (RGSO)

Used with the SWITCH function to display the status of the SERVO MOTOR
POWER, ON or OFF. If the SERVO MOTOR POWER is ON, -1 is returned. If the
SERVO MOTOR POWER is OFF, 0 is returned.

• SWITCH (TEACH LOCK)

Used with the SWITCH function to display the status of the TEACH LOCK switch,
ON or OFF. If the switch is ON, -1 is returned. If the switch is OFF, 0 is returned.

8-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SYSTEM SWITCHES

• SWITCH (ERROR)

Used with the SWITCH function to display the status of program ERROR condition.
If an error condition exists, -1 is returned. If an error condition does not exist, 0 is
returned.

• SWITCH (REPEAT)

Used with the SWITCH function to display the status of the TEACH/REPEAT switch,
TEACH or REPEAT. If the switch is in the REPEAT position, -1 is returned. If the
switch is in the TEACH position, 0 is returned.

• SWITCH (RUN)

Used with the SWITCH function to display the status of the RUN/HOLD switch, RUN
or HOLD. If the switch is in the RUN position, -1 is returned. If the switch is the
HOLD position, 0 is returned.

• DISPIO_01

This switch allows the user to select the type of display for viewing the status of
inputs and outputs. If the switch is ON, 1s and 0s are displayed to identify the
signal state of individual signals. A 1 represents an ON signal, while a 0 represents
an OFF signal.

If the switch is off, an ON signal is represented by an O, while an X represents a


OFF signal. Dedicated signals are represented by uppercase Xs and Os.

The default setting for this switch is OFF.

• [Link]

When the [Link] switch is ON and program execution is in a hold condition,


the current logic or motion step is displayed.

When this switch is OFF and program execution is in a hold condition, the last
motion step executed is displayed.

The default setting for this switch is OFF.

June 10, 2003 8-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SYSTEM SWITCHES

• WS_COMPOFF

When this switch is ON, the weld schedule (WS) bits are set low after they are sent
rather than when the robot is at the next program step

The default setting for this switch is OFF.

• FLOWRATE

This switch is available with sealing software only.

With sealing software installed and the FLOWRATE switch ON, data in AUX 65 is
used to control the sealer dispensing equipment.

When this switch is OFF, data defined using the AS Language command
SETOUTSPEED is used.

The default setting for this switch is OFF.

• [Link]

When the [Link] switch is ON and weld schedule 0 is selected, the controller
waits for the weld complete signal before continuing robot motion (gun pressurizes
and welds).

When this switch is OFF and weld schedule 0 is selected the controller does not
wait for the weld complete signal (gun pressurizes only).

The default setting for this switch is OFF.

8-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SYSTEM SWITCHES

• [Link]

Enables/disables absolute speed function. When this switch is ON motion steps are
executed at a pre-defined speed setting. The absolute speed is effective for the
entire program and overrides the monitor speed setting.

When this switch is ON, the robot moves at the absolute speed specified for the
program when maximum speed x monitor speed > program speed.

Example:

If maximum speed = 2400 mm/s, monitor speed = 10%, and program speed = 100
mm/s, then:

2400 x 0.1 > 100, and the robot moves at the program speed, 100 mm/s.

If maximum speed = 100%, monitor speed = 10%, and program speed = 5%, then:

100 x 0.1 > 5, and the robot moves at the program speed, 5%.

If maximum speed = 2400 mm/s, monitor speed = 2%, and program speed = 100
mm/s, then:

2400 x 0.02 < 100, and the robot moves at the monitor speed 48 mm/s.

• SLOW_START

Enables/disables the SLOW_START function. When the SLOW_START switch is


ON, the first motion step of the program is executed at slow repeat speed. If the
program is stopped and restarted, the first motion step executed is executed at slow
repeat speed.

The default setting for this switch is OFF.

• [Link]

When this switch is ON, timers begin timing for a specified step when all wait condi-
tions are satisfied. When this switch is OFF, timers begin timing when the robot
reaches coincidence of the taught point.

The default setting for this switch is OFF.

June 10, 2003 8-11


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OPERATORS

9.0 OPERATORS ...................................................................................................... 9-2


9.1 Arithmetic Operators ............................................................................................ 9-3
9.2 Relational Operators ............................................................................................ 9-4
9.3 Logical Operators ................................................................................................ 9-5
9.4 Binary Operators .................................................................................................. 9-8
9.5 Transformation Value Operators ........................................................................ 9-10
9.6 String Operator .................................................................................................. 9-13

June 10, 2003 9-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OPERATORS

9.0 OPERATORS

This unit describes the AS Language operators and their functions. These operators are
used with monitor commands and program instructions.

The following AS Language operators are used:

• Arithmetic operators

• Relational operators

• Logical operators

• Binary operators

• Transformation value operators

• String operators

Detailed information follows.

9-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OPERATORS

9.1 ARITHMETIC OPERATORS

Arithmetic operators are used to perform mathematical calculations. The arithmetic


operators are listed in table 9-1.

Table 9-1 Arithmetic Operators

Operator Function Example


+ Addition i = i+1
- Subtraction j = i-1
* Multiplication i = i*3
/ Division i = i/2
MOD Remainder i = iMOD2
^ Power i = i^3

Example i = i+1
The value of i plus 1 is assigned to i. If i is 5, then 6 is assigned to i.

i = iMOD2
If i is 5, the MOD operator calculates 5÷2 and assigns the remain-
der of 1 to i.

i = i^3
The value of i3 is assigned to i. If i is 2, then 8 is assigned to i on
the left side of the equation.

When using the division (/) and MOD operators, using 0 as the rightmost value of the
equation causes an error. Refer to the example below.

Example i = i/0
i = iMOD0

June 10, 2003 9-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OPERATORS

9.2 RELATIONAL OPERATORS

Relational operators are used with program instructions such as IF and WAIT to verify
specified conditions. The relational operators are listed in table 9-2.

Table 9-2 Relational Operators

Operator Function Example


< TRUE (-1), when the left side value is less than the right side value. i<j
> TRUE (-1), when the left side value is greater than the right side value. i>j
<= TRUE (-1), when the left side value is less than or equal to the right side i <= j
value.
=< TRUE (-1), when the left side value is less than or equal to the right side i =< j
value.
>= TRUE (-1), when the left side value is greater than or equal to the right side i >= j
value.
=> TRUE (-1), when the left side value is greater than or equal to the right side i => j
value.
== TRUE (-1), when the two sides are mathematically equal. i == j
<> TRUE (-1), when the two sides are not equal. i <> j

Example IF i < j GOTO 10


When i is less than j (i.e. the expression i < j is true), program ex-
ecution jumps to the step labeled 10. If the expression is not true,
program execution proceeds to the next step.

WAIT t == 5
When t is 5 (i.e. t == 5 is true), program execution proceeds to the
next step. If the expression is not true, program execution is
paused until the condition is met.

IF i+j > 100 GOTO 20


When i+j is greater than 100 (i.e. the expression i+j > 100 is true),
program execution jumps to the step labeled 20. If the expression
is not true, program execution proceeds to the next step.

IF $a == “abc” GOTO 20
When $a is “abc” (i.e. $a == “abc” is true), program execution jumps
to the step labeled 20. If the expression is not true, program execu-
tion proceeds to the next step.

9-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OPERATORS

9.3 LOGICAL OPERATORS

Logical operators are used in Boolean operations such as 0+1 = 1, 1+1 = 1,0+0 = 0
(logical OR), or 0x1 = 0, 1x1 = 1, 0x0 = 0 (logical AND). There are two types of logical
operators used in AS Language, logical operators an binary operators.

Logical operators are not used for calculating numeric values, but for determining if the
value of an expression is true or false. All non-zero values are considered TRUE (ON).
When the expression is determined to be TRUE -1 is returned. The logical operators
are listed in table 9-3.

Table 9-3 Logical Operators

Operator Function Example


AND Logical AND i AND j
OR Logical OR i OR j
XOR Exclusive logical OR i XOR j
NOT Logical complement NOT i

Example i AND j
In this example, the logical AND between i and j is evaluated. The
variables i and j are typical logical values, but they can be real
number values. In this example, all real number values other than 0
are considered ON (TRUE).

i j Result
0 0 0 (OFF)
0 not 0 0 (OFF)
not 0 0 0 (OFF)
not 0 not 0 -1 (ON)

The result is ON (TRUE) only when both values are ON (TRUE).

June 10, 2003 9-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OPERATORS

Example i OR j
In this example, the logical OR between i and j is evaluated.

i j Result
0 0 0 (OFF)
0 not 0 -1 (ON)
not 0 0 -1 (ON)
not 0 not 0 -1 (ON)

The result is ON (TRUE) when both or either of the two values are
ON (TRUE).

Example i XOR j
In this example, the logical XOR between i and j is evaluated.

i j Result
0 0 0 (OFF)
0 not 0 -1 (ON)
not 0 0 -1 (ON)
not 0 not 0 -1 (ON)

The result is ON (TRUE) when only one of the two values are ON
(TRUE).

Example NOT i
In this example, the logical complement of i is evaluated.

i Result
0 -1 (ON)
not 0 0 (OFF)

9-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OPERATORS

In the AS system, the logical status of a value or expression is expressed as:

True: not 0, ON, or TRUE

False: 0, OFF, or FALSE

June 10, 2003 9-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OPERATORS

9.4 BINARY OPERATORS

Binary operators perform logical operations for each respective bit of two numeric val-
ues. For example, if a number is composed of 4 bits, the values calculated are 0000,
0001, 0010, 0011, ...,1111(in the AS system the numeric values are composed of 32
bits).

Binary Decimal
Expression Expression
0000 0
0001 1
0010 2
0011 3
: :
1111 15

The binary operators are listed in table 9-4.

Table 9-4 Binary Operators

Operator Function Example


BOR Binary OR i BOR j
BAND Binary AND i BAND j
BXOR Binary XOR i BXOR j
COM Binary complement COM i

Example i BOR j
If i = 5, j = 9, then the result is 13
i=5 0101
j=9 1001
0001⇒13

9-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OPERATORS

Example i BAND j
If i = 5, j = 9, then the result is 1.
i=5 0101
j=9 1001
0001⇒1

Example i BXOR j
If i = 5, j = 9, then the result is 12
i =5 0101
j=9 1001
1100⇒12

Example COM i
If i = 5, then the result is -5
i = 5 0...0101
1...1010⇒-5

June 10, 2003 9-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OPERATORS

9.5 TRANSFORMATION VALUE OPERATORS

Compound transformations are defined by a combination of transformation values used


to create a location, or locations, that are relative to the first transformation value (Figure
9-1 and 9-2).

transformation value+transformation value....

The last component of the compound transformation value defines the actual location.

If the transformations are subtracted an inverse value results.

transformation value - transformation value

This is useful when several locations are defined relative to a reference location.

To change the location points defined relative to a reference location, only the transfor-
mation location of the reference must be updated. All locations defined relative to the
reference point are automatically changed to reflect the change.

Unlike usual addition or subtraction, the commutative law does not hold true for the
transformation operation. The compound expression “loc.a + loc.b” does not necessarily
equal “loc.b + loc.a” because the turning angles O,A,T are taken into consideration.

Example

a1 = (1000, 0, 0, 0, 0, 0)
a2 = ( 0, 1000, 0, 60, 0, 0)
x1
a1+a2 = (1000, 1000, 0, 60, 0, 0) y1
a2+a1 = ( 500, 1866, 0, 60, 0, 0) 1,866 mm a2+a1
X
in
m
m

Y
00

60°
10

a2
1,000 mm a1+a2
a2
1,000 mm

a1

1,000 mm X 500 mm

Figure 9-1 Transformation Value Operators Example

9-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OPERATORS

For example, “Plate” is the name of the transformation pose representing the pose of a
base plate relative to the origin of the base coordinate system of the robot. “Object” is
the relative transformation for the pose of an object relative to the pose of the plate.

The compound transformation “Plate+Object” defines the pose of the object relative to
the origin of the base coordinate system of the robot.

If the transformation location “Pickup” represents the final pose relative to


“Plate+Object”, the compound transformation “Plate+Object+Pickup” defines the pose of
pickup relative to the origin of the base coordinate system (Figure 4-3).

Plate+Object+Pickup
Pickup
Base Coordinate Origin
Object

Plate Plate+Object

Figure 9-2 Compound Transformation

To define the compound transformations as shown in figure 4-3, use the following proce-
dure.

1. Move the robot to the pose Plate and enter the command: HERE Plate.

>HERE Plate

2. Move the robot to the pose Object and enter the command: HERE Plate+Object.

>HERE Plate+Object

3. Move the robot to the pose Pickup and enter the command: HERE
Plate+Object+Pickup.

>HERE Plate+Object+Pickup

June 10, 2003 9-11


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OPERATORS

As described in the preceding example, a compound transformation is defined by a


combination of several transformation values separated by the plus sign (+).

Ensure that spaces are not entered between the plus sign (+) and the transformation
values. The operator may combine as many transformation values as needed.

If the robot is to pick up an object at the pose “Pickup” defined relative to “Object”, the
program line is written as shown in the example below.

Example JMOVE Plate+Object+Pickup

or

LMOVE Plate+Object+Pickup

NOTE
Do not change the order of the transformation expres-
sion. If the transformation variable “a2” is defined rela-
tive to the transformation variable “a1”, “a1+a2” provides
the expected result, but “a2+a1” does not (Figure 9-1).

The pose data for “Object” and “Pickup”, in figure 9-2,


are defined in relation to other pose data. Because of
the relativity of the defined transformations do not use
motion commands such as “JMOVE Object” or “LMOVE
Pickup”, unless the affect on the program is certain.

9-12 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

OPERATORS

9.6 STRING OPERATOR

The string operator used in the AS system is the plus sign (+). This operator is used to
combine two strings.

Example $a = $b+$c
Combines the strings $b and $c and assigns the resulting string to
$a.

If $b = “abc” and $c = “123” the resulting string assigned to $a is


“abc123”

June 10, 2003 9-13


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

10.0 FUNCTIONS .................................................................................................... 10-2


10.1 Real Value Functions ....................................................................................... 10-3
10.2 Pose Value Functions ..................................................................................... 10-26
10.3 Mathematical Functions ................................................................................. 10-40
10.4 String Functions ............................................................................................. 10-43

June 10, 2003 10-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

10.0 FUNCTIONS

Functions are used to return a value or a modified value.

AS Language uses four types of functions:

• Real value functions

• Pose value functions

• Mathematical functions

• String functions

This section describes the AS Language functions. Functions are used in combination
with monitor commands and program instructions. The keyword specifies the function
and the parameters entered in parentheses determine the value.

An example of the function format is shown in figure 10-1

Keyword Parameter

SIG (signal number,signal number,...)

Shaded parameters can be omitted.

When parameters are omitted, omit the comas.

Always enter a space between the keyword and the parameter.

Figure 10-1 AS Language Function Format Example

10-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

10.1 REAL VALUE FUNCTIONS

This section describes the real value functions and parameters.

Table 10-1 lists the real value functions and provides a brief description of the functions.

Detailed descriptions follow. Shaded parameters can be omitted.

Table 10-1 Real Value Functions Descriptions

Function Description Page


SIG Returns the specified signal logical AND. 10-4
BITS Returns the specified signal bit pattern value. 10-6
TIMER Returns the specified TIMER current value. 10-7
DISTANCE Returns the distance between two specified points. 10-8
DX, DY, DZ Returns the specified transformation displacement values (X, Y, or Z). 10-9
DEXT Returns the specified component of a specified pose (location) (option). 10-10
ASC Returns ASCII character values. 10-11
LEN Returns the specified string length (number of characters). 10-11
TRUE, ON Returns the value -1.0, representing TRUE or ON. 10-12
FALSE, OFF Returns the value 0.0, representing FALSE or OFF. 10-13
VAL Returns the real value in the specified string. 10-14
INSTR Returns the specified string star ting value. 10-16
MAXVAL Compares specified values to determine the maximum value. 10-17
MINVAL Compares specified values to determine the minimum value. 10-17
INT Returns a value as an integer. 10-17
SWITCH Returns the status of the specified system switch(es). 10-18
TASK Returns specified program execution status. 10-18
ERROR Returns the ERROR number. 10-20
PLCAIN Returns the data number (option). 10-20
PRIORITY Returns the specified robot program priority (option). 10-21
UTIMER Returns the specified UTIMER current value. 10-21
MSPEED Returns the monitor speed of robot 1 (option). 10-21
MSPEED2 Returns the monitor speed of robot 2 (option). 10-21
INRANGE Determines if a pose (location) is in range (option). 10-22
SYSDATA Returns AS System parameters (option). 10-24

June 10, 2003 10-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

SIG SIG(signal number,signal number,...)

Function Returns the logical AND of the specified binary signal states.

Parameter Signal number:


Specifies the external or external I/O signal number(s).

Acceptable signal numbers:


External output signals: 1–actual number of installed signals
External input signals: 1001–actual number of installed signals
Internal signals: 2001–2256

Explanation Calculates logical AND of all the specified binary signal states and
returns the resulting value. If all the specified signal states are
TRUE, the SIG function returns TRUE -1. If any of the specified
signal states are FALSE, the SIG function returns FALSE 0.

Signals specified by positive numbers are considered TRUE when


ON and FALSE when OFF. No signal corresponds with signal
number “0” and is considered always TRUE.

NOTE
There is a timing restriction when evaluating more than
one signal at a time. Approximately 2 ms is required for
signal stabilization for each signal.

10-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

Example If signal 1001 = ON, 1004 = OFF, and 20 = OFF, the SIG function
returns the results as shown in figure 10-2.

.Program pg_sig()
1 a = SIG (1001);assigns signal to variable a
1?
2 b = SIG (1004);assigns signal to variable b
2?
3 c = SIG (-1004);assigns signal to variable c
3?
4 d = SIG (1001,1004);assigns signals to variable d
4?
5 e = SIG (1001,-1004);assigns signals to variable e
5?
6 f = SIG (1001,-1004,-20);assigns signals to variable f

>LI/R (Results)
a = -1 b=0 c = -1 d = 0 e = -1 f = -1

Figure 10-2 SIG Function Example

June 10, 2003 10-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

BITS BITS(starting signal number,number of signals)

Function Reads the specified consecutive binary signals and returns the
decimal value corresponding to the signal bit pattern.

Parameter Starting signal number:


Specifies the first signal to read (least significant bit).

Number of signals:
Specifies the number of signals to read, beginning with the starting
signal number. If not specified, one is assumed. The maximum
number of signals is sixteen.

Acceptable signal numbers:


External output signals: 1–actual number of installed signals
External input signals: 1001–actual number of installed signals
Internal signals: 2001–2256

Explanation The BITS function returns the decimal value of the specified signal
bit pattern. The starting signal number is read as the least signifi-
cant bit.

NOTE
There is a timing restriction when evaluating more than
one signal at a time. Approximately 2 ms is required for
signal stabilization for each signal.

Example MSB LSB


Signal: 1006 1005 1004 1003
state: OFF ON OFF ON
binary value: 0 1 0 1

When the signals shown above are in the indicated state the result
of:

x = BITS(1003,4)

is 0101, or 5 in decimal notation.

10-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

TIMER TIMER(timer number)

Function Returns the current value of the specified timer number in seconds.

Parameter Timer number:


Specifies the timer to read.

Acceptable timer numbers: 0–10

Explanation The value returned indicates the time elapsed (in seconds) since
the last execution of the TIMER instruction for the specified timer.

If a timer number is not specified the current value of TIMER 0 is


returned. TIMER 0 represents the system clock and tracks the
elapsed time since system start-up.

Example In the example in figure 10-3, the TIMER instruction in line 1 is used
to set TIMER (1) to 0 seconds. The TIMER function in line 7 is used
to read the value of TIMER(1), to determine the program cycle time.

.Program pg67()
1 TIMER(1) = 0
1?
2 JMOVE a
2?
3 LMOVE b
3?
4 LDEPART 200
4?
5 HOME
5?
6 PRINT “Cycle time = “,/F5.3,TIMER(1),”seconds”
6?

>EX pg67

Cycle time = 5.678 seconds

Figure 10-3 TIMER Function Program Example

June 10, 2003 10-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

DISTANCE DISTANCE(transformation value,transformation value)

Function Calculates the straight line distance between two transformation


poses in millimeters.

Parameter Transformation value:


Specifies the two poses to calculate the distance between.

Explanation Returns the distance between the specified poses in millimeters.


The order of the two poses does not affect the result.

Example >x = DISTANCE (a,b)


Calculates the distance between poses “a” and “b” and assigns the
value to real variable “x”.

>LI/R
x = 397.566

>k = DISTANCE (HERE,part)


Calculates the distance between the current tool center point (TCP)
and the pose “part” and assigns the value to the real variable “k”.

LI/R
k = 435.425

10-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

DX DX(transformation value)
DY DY(transformation value)
DZ DZ(transformation value)

Function Returns the transformation component value (X, Y, or Z) of the


specified pose.

Parameter Transformation value:


Specifies the pose to extract the X, Y, or Z transformation compo-
nent value.

Explanation The transformation component values can also be obtained using


the DECOMPOSE instruction. If the transformation component
values for O, A, or T are required, the DECOMPOSE instruction
must be used.

Example In this example, the transformation pose “start” has the component
values as shown below. The DX, DY, and DZ functions are used to
assign the X, Y, and Z components of the pose “start” to real vari-
ables x, y, and z respectively.

X Y Z O A T
125 250 -50 135 50 75

x = DX (start) ;assigns the x component to variable x = 125.00


y = DY (start) ;assigns the y component to variable y= 250.00
z = DZ (start) ;assigns the z component to variable z = -50.00

June 10, 2003 10-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

DEXT DEXT(pose variable name,element number)

Function Returns the specified element of the specified pose.

Parameter Pose variable name:


Specifies the pose in joint displacement values or transformation
values.

Element number:
Specifies the element value to extract from the specified pose
variable (Table 10-2).

Table 10-2 Pose Elements

Pose (location)
Joint
Element Displacement
Number Transformation Value Value
1 X component–mm JT1–degrees
2 Y component–mm JT2–degrees
3 Z component–mm JT3–degrees
4 O component–degrees JT4–degrees
5 A component–degrees JT5–degrees
6 T component–degrees JT6–degrees
7 JT7–mm JT7–mm

Example In this example, the transformation pose “start” has the component
values as shown below. The DEXT function is used to extract the
JT6 component of the pose “start”.

X Y Z O A T
125 250 -50 135 50 75

>DEXT(start,6)

Returns the component value of element 6 of the pose variable


“start” (75 mm).

10-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

ASC ASC(string,character number)

Function Returns the ASCII value of the specified character in a string ex-
pression.

Parameter String:
Specifies the string that contains the character to extract the ASCII
value. If a null string (“”) is specified, or the character number
specified exceeds the number of characters in the string, -1 is
returned.

Character number:
Specifies the character number, counting from the beginning of the
string, to extract the ASCII value. If not specified, or if 0 or 1 is
specified, the ASCII value of the first character of the string is re-
turned.

Explanation The ASCII value is returned in real values.

Example ASC(“sample”,2) Returns the ASCII value of the character “a”.

ASC($name) Returns the ASCII value of the first character


of the string “$name”.

ASC($system,i) Returns the ASCII value of the character


corresponding to the value of real variable “i”
in the string variable “$system”.

LEN LEN(string)

Function Returns the number of characters in the specified string.

Parameter String:
Specifies the string variable or expression to return the number of
characters.

Example LEN(“sample”)
Returns the number of characters in the string “sample” (6).

June 10, 2003 10-11


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

TRUE ...TRUE...

ON ...ON...

Function Returns the logical value for TRUE/ON (-1).

Explanation This function is used when it is necessary to specify the logical


condition TRUE. The TRUE and ON functions return the same
result. Use TRUE or ON as needed in the program.

Example .Program pg0()


1 IF x == TRUE THEN ;compares the value of x to TRUE (-1)
1?
2 CALL pg1
2?
3 END
3?
4 IF X< TRUE THEN ;compares the value of x to TRUE (-1)
4?
5 CALL pg2
5?
6 END
6?
7 IF x+1> TRUE THEN ;compares the value of x+1 to TRUE (-1)
7?
8 CALL pg3
8?
9 END
9?

10-12 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

FALSE ...FALSE...

OFF ...OFF...

Function Returns the logical value for FALSE/OFF (0).

Explanation This function is used when it is necessary to specify the logical


condition FALSE. The FALSE and OFF functions return the same
result. Use FALSE or OFF as needed in the program.

Example .Program pg0()


1 IF x == FALSE THEN ;compares the value of x to FALSE (0)
1?
2 CALL pg1
2?
3 END
3?
4 IF X< FALSE THEN ;compares the value of x to FALSE (0)
4?
5 CALL pg2
5?
6 END
6?
7 IF x+1> FALSE THEN ;compares the value of x+1 to FALSE (0)
7?
8 CALL pg3
8?
9 END
9?

June 10, 2003 10-13


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

VAL VAL(string,code)

Function Returns the real value in the specified string.

Parameter String:
Specifies the character string, character string variable, or string
expression.

Code:
Specifies the notation of the value returned in a real value or ex-
pression. If not specified, or a number other than 0, 1, or 2 is speci-
fied, 0 (decimal notation) is assumed.

Table 10-3 Notation Code Key

Code Notation
0 Decimal
1 Binary
2 Hexadecimal

NOTE
Notation codes can be used in the beginning of the
string to specify the notation of the returned value.

^B = Binary notation

^H = Hexadecimal notation (see example below)

All characters not read as a numeric value or notation


code are interpreted as characters indicating the end of
the string.

10-14 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

Example VAL(“123“) ;Returns the real value 123.

VAL(“123abc“) ;Returns the real value 123.

VAL(“12 ab 3“) ;Returns the real value 12.

VAL(“1.2E-5”) ;Returns the real value 0.00001.

VAL(“^HFF”) ;Returns the real value 255. ^H specifies


hexadecimal notation (16 x 15 + 15 = 255).

June 10, 2003 10-15


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

INSTR INSTR(starting point,string 1, string 2)

Function Returns the place (real value) where the specified string 2, starts in
the specified string 1.

Parameter Starting point:


Specifies the starting point in string 1 to search for string 2. If not
specified, the search starts from the beginning of string 1.

String 1:
Specifies the string to search for string 2. Expressed in a character
string, character string variable, or string expression.

String 2:
Specifies the string to search for. If a null string (“”) is specified, the
value of the starting point (1 if not specified) is returned.

Explanation This function returns the value of the starting point of string 2 in
string 1, if string 2 is included in string 1.

If string 2 is not included in string 1, 0 is returned.

If the specified starting point is equal to or less than 1, the search


starts from the beginning of string 1. If the value of the starting
point is greater than the number of characters in string 1, 0 is re-
turned.

The INSTR function is not case sensitive.

Example INSTR(“[Link]”,”.”) ;Returns real value 5.

INSTR(“file”,”.”) ;Returns real value 0.

INSTR(“abcdefgh”,”DE”) ;Returns real value 4.

INSTR(5,”1-2-3-4”,”-”) ;Returns real value 6.

10-16 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

MAXVAL MAXVAL(real value 1,real value2,...)

Function Compares the specified real values and returns the largest value.

Parameter Real value1, real value2,...:


Specifies the real values to compare.

Example In this example: a=10, b=15, and c=20.


m = MAXVAL(a,b,c) ;assign the value of 20 to real variable “m”.

MINVAL MINVAL(real value 1,real value2,...)

Function Compares the specified real values and returns the smallest value.

Parameter Real value1, real value2,...:


Specifies the real values to compare.

Example In this example: a=10, b=15, and c=20.


m = MINVAL(a,b,c) ;assign the value of 10 to real variable “m”.

INT INT(numeric expression)

Function Returns the nearest integer value of the expression, rounded down
from the left of the decimal point.

Parameter Numeric expression:


Specifies the numeric expression to evaluate.

Explanation Returns the integer on the left side of the decimal point (for values
not in scientific notation). The negative sign remains with the inte-
ger unless the integer is 0.

Example INT(0.123) ;0 is returned.

INT(10.8 ;10 is returned.

INT(-5.462 ;-5 is returned.

INT(1.3125E+2) ;131 is returned.

INT(cost+0.5) ;The value of real variable “cost”, rounded


down to the nearest integer is returned.

June 10, 2003 10-17


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

SWITCH SWITCH(switch name)

Function Returns the current state of the specified system switch.

Parameter Switch name:


Specifies the system switch to check status.

Explanation If the switch is ON, -1 is returned. If the switch is OFF 0 is returned.

Example d = SWITCH(CP)
If the CP switch is ON , -1 is assigned as the value of real variable
d. If the CP switch is OFF, 0 is assigned as the value of real vari-
able d.

TASK TASK(task number)

Function Returns the specified program execution status.

Parameter Task number:


TASK(1) = Robot program 1, for robot 1, and is named pg1.

TASK(2) = Robot program 2, for robot 2, (two arm option), and is


named pg2.

TASK(1001) = PC program 1 status.


TASK(1002) = PC program 2 status.
TASK(1003) = PC program 3 status.
TASK(1004) = PC program 4 status.
TASK(1005) = PC program 5 status.

Explanation The TASK function returns the specified program execution status.
The TASK function can be used to monitor the status of a PC pro-
gram from a robot control program. Robot operation can be modi-
fied according to PC program execution status.

The program status and the corresponding value returned are


shown in table 10-4.

10-18 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

Table 10-4 Program Status Return Values

Value Program Status


0 Program not executing.
1 Program executing.
2 Program execution in hold.
Stepper execution completed, waiting
3 for completion of current robot motion.

Example rbsta1 = TASK(1001)


Assigns the status of robot program number 1 (pg1) to real variable
rbsta1.

.Program main()
1 10
2 pcstat1 = TASK(1001) ;assigns status of PC pg 1 to pcstat1
3 IF pcstat1 == 1 GOTO 15
4 15
5 If clean >= 10 THEN
6 CALL clean
7 GOTO 10
8 END

June 10, 2003 10-19


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

ERROR ERROR

Function Returns the current error code and message.

Explanation If no error is present 0 is returned

Example TYPE $ERROR(ERROR)

PLCAIN PLCAIN(data number)

Function Returns the specified data number value, in whole numbers.

Parameter Data number:


Specifies the input data number in whole numbers.

Acceptable number range:


1–32

NOTE
The PLCAIN function is available when the built-in se-
quencer function option is ON. If the option is OFF, the
error message “(E1102) Cannot execute, no option set
up. - Check option specs.” is displayed.

Example aa = PLCAIN(12)
Returns the value of the 12th input data in whole numbers.

10-20 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

PRIORITY PRIORITY

Function Returns the current robot program priority number.

Explanation Returns the current robot program priority number in real values.
Priority settings cannot be applied to PC programs.

The default robot program priority is 0. The priority number is


changed using the LOCK instruction.

UTIMER UTIMER(@timer variable name)

Function Returns the @timer variable current value set by the UTIMER
instruction.

Parameter @timer variable name:


Specifies the timer variable name set by the UTIMER instruction.
An “@” sign is added to the beginning of the variable name so a
whole number variable name can be specified.

MSPEED MSPEED

MSPEED2 MSPEED2

Function Returns the current monitor speed (0–100%)

Explanation MSPEED is used for robot 1. MSPEED2 is used for robot 2, when
the two arm option is used.

June 10, 2003 10-21


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

INRANGE INRANGE(pose variable, joint displacement values)

Function Used to verify if a pose is within the robot’s range and


(Option) returns a value (see table 10-5).

Parameter Pose variable:


Specifies the pose to verify (joint displacement values, transforma-
tion values, or compound transformation values can be used).

Joint displacement values:


This parameter is entered when the specified pose is in transforma-
tion values or compound transformation values. The robot configu-
ration is calculated by the specified joint displacement values. If not
specified, the current configuration is used.

Table 10-5 INRANGE Return Values

Value Description
0 Out of robot motion range.
1 JT1 is out of robot motion range.
2 JT2 is out of robot motion range.
4 JT3 is out of robot motion range.
8 JT4 is out of robot motion range.
16 JT5 is out of robot motion range.
32 JT6 is out of robot motion range.
16384 Beyond the collision check range.
32768 Out of reach of the robot arm.

NOTE
The INRANGE function verifies if the specified pose is
in the robot’s motion range, but does not verify if the
taught path to the specified pose is within the robot’s
motion range.

10-22 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

Example In the following example, if the pose is out of motion range, the
message “Pose place is out of range.” is displayed and program
execution is stopped.

.Program pg50()
1 IF INRANGE(place,#p) GOTO ERR_STOP
2 JMOVE start
3 LMOVE pounce
4 JAPPRO pickup
5 LMOVE pickup
6 JAPPRO place
7 LMOVE place
8 ERR_STOP
9 TYPE “Pose place is out of range.”
10 PAUSE

June 10, 2003 10-23


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

SYSDATA SYSDATA(keyword,opt1,opt2)

Function Returns the specified keyword parameters in the AS system data.


(Option)

Parameter Keyword,opt1,opt2:
[Link]
Returns monitor speed in percentage. If a motion step is not being
executed, -1 is returned.

Opt1:
Robot number, when two arm option is used. If omitted, 1 is as-
sumed.

Opt2:
Not used.

MSTEP:
Returns the current motion step number or the last executed motion
step in the current program. If a motion step is not being executed,
-1 is returned.

Opt1:
Robot number, when two arm option is used. If omitted, 1 is as-
sumed.

Opt2:
Not used.

STEP:
Returns the current motion step number or the last executed motion
step in the current program. If a motion step is not being executed,
-1 is returned.

Opt1:
Robot number, when two arm option is used. If omitted, 1 is as-
sumed.
Or:
PC TASK number (1001–1005).

Opt2:
Not used.

10-24 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

Parameter [Link]
Returns the speed (in percentage) of the current motion or the next
motion. If the speed is set in seconds, -1 is returned.

Opt1:
Robot number, when two arm option is used. If omitted, 1 is as-
sumed.

Opt2:
Not used.

[Link].M
Returns the motion speed (in mm/s) of the current motion or the
next motion. If the speed is set in seconds, -1 is returned.

Opt1:
Robot number, when two arm option is used. If omitted, 1 is as-
sumed.

Opt2:
Not used.

June 10, 2003 10-25


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

10.2 POSE VALUE FUNCTIONS

This section describes the pose value functions and parameters.

Table 10-6 lists the pose value functions and provides a brief description of the func-
tions.

Detailed descriptions follow. Shaded parameters can be omitted.

Table 10-6 Pose Value Functions Descriptions

Function Description Page


DEST Returns the destination pose (location) in transformation values. 10-27
#DEST Returns the destination pose (location) in joint displacement values. 10-27
FRAME Returns the frame coordinate transformation values. 10-28
NULL Returns the null transformation values. 10-31
HERE Returns the current pose (location) transformation values. 10-31
#HERE Returns the current pose (location) joint displacement values. 10-31
Returns the transformation values composed from the specified
TRANS components. 10-33

Returns the transformation values expressing the rotation around the


RX, RY, RZ specified axis. 10-33

Returns the joint displacement values composed from the specified


#PPOINT 10-34
components.

SHIFT Returns the transformation value specified by shifting the original pose 10-35
(location).
AVE_TRANS Returns the average transformation values of two poses (locations). 10-36
BASE Returns the base transformation values. 10-37
TOOL Returns the tool transformation values. 10-37
Returns the value of the X component with the value of the traverse axis
TRADD added (option). 10-37

TRSUB Returns the value of the X component with the value of the traverse axis 10-37
subtracted (option).
#HOME Returns the HOME position joint displacement values (option). 10-38
Returns the transformation values for the center of the circle described by
CCENTER the specified poses (locations) (option). 10-39

CSHIFT Returns the transformation values of the pose (location) shifted towards the 10-39
center of the circle described by the specified poses (locations) (option).

10-26 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

DEST DEST

#DEST #DEST

Function DEST:
Returns the current robot motion destination in transformation
values.

#DEST:
Returns the current robot motion destination in joint displacement
values.

Explanation The DEST and #DEST functions, are used to determine the robot’s
destination after the robot motion is interrupted.

The DEST/#DEST functions can be used to resume the motion


interrupted by the ONI...CALL instruction (see example below).

NOTE
The pose where the robot stops and the pose returned
by the DEST/#DEST function are not necessarily the
same. If the RUN/HOLD switch is set to the HOLD posi-
tion during robot motion, the pose returned by the
DEST/#DEST function is the pose the robot was moving
toward at the interruption.

Example The follow example shows a sample subroutine used to return the
robot to the motion path that was interrupted.

1 POINT save = HERE ;Stores the current location as “save”.


2 POINT old = DEST ;Stores the destination location as “old”.
3 JDEPART 50 ;Backs the tool 50 mm away.
4 JAPPRO save,50 ;Approaches “save” by 50 mm.
5 LMOVE save ;Moves to location “save”.
6 LMOVE old ;Moves to location “old”, the original
;destination.

June 10, 2003 10-27


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

FRAME FRAME(transformation values 1,transformation values 2,


transformation values 3,transformation values 4)

Function Returns the transformation values of the frame (relative) coordi-


nates with respect to the base coordinates.

An example program using the FRAME function is included in


section 12.6.

Parameter Transformation values 1, transformation values 2:


Specifies the direction of the X-axis. The frame coordinate’s X-axis
is set so that it passes through the two transformation poses.

The positive direction of the X-axis is set in the direction from trans-
formation values 1, to transformation values 2.

Transformation values 3:
Specifies the direction of the Y-axis. The frame coordinate’s Y-axis
is set so that the three points, transformation values 1, transforma-
tion values 2, and transformation values 3, are on the XY plane and
transformation values 3 is on the positive Y-axis.

Transformation values 4:
Specifies the origin of the frame coordinates, equal to the values
returned by the FRAME function.

Explanation POINT F1 = FRAME (O1,X1,Y1,O1)


Sets the frame coordinates as shown in figure 10-4.

Z Z Y

Y1 Frame (Relative) Coordinates


F1 O1 X
X1

O Y

Base Coordinates

Figure 10-4 Frame (Relative) Coordinates Example 1

10-28 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

Explanation If the poses are taught as F1+A, then only F1 needs to be retaught
if the coordinates change, as if the parts station is moved. For more
information refer to section, 12.6 Relative Pose Using the Frame
Coordinates.

POINT F2 =FRAME (O1,X1,Y1,O2)


Sets the frame coordinates as shown in figure 10-5.

Z Z Y

Y1
F1 O1 X
X1
Z Y
O Y

Frame (Relative) Coordinates


F2
Base Coordinates X
O2
X

Figure 10-5 Frame (Relative) Coordinates Example 2

The Y and Z axes in the two frame coordinates [figure 10-6(A)] face
opposite directions, depending on where a3 is taught.

When a3 is taught close to the X axis [Figure 10-6(B)], the direction


of the Z axis may not be as expected. Always verify the frame
coordinates are correct before using the coordinates in a program.

a3 a1
a2
A
a1 a2
a3

a3
B a1
a2
(a3)

Figure 10-6 FRAME X, Y, and Z Axes

June 10, 2003 10-29


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

NOTE
The three points a1, a2, and a3 define the position of
the tool coordinates origin (TCP). When redefining the
frame coordinates, the tool transformation must be the
same as when a1, a2, and a3 were taught.

For increased accuracy, teach the three points a1, a2,


and a3 as far apart as possible. Point a3 should be
near the Y axis, but as far away from the X axis as pos-
sible.

When teaching points a1, a2, and a3, the origin of the
tool coordinates should be defined at a point that is
easy to see, e.g., the tip of the tool.

With some tools, it is difficult to determine the origin of


the tool coordinates even when it defined by the tool
transformation. In this case, a1, a2, and a3 are taught
at null tool. The operator must be aware that at null tool,
the origin of the tool coordinates (TCP) is at the center
of the tool mounting flange.

10-30 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

NULL NULL

Function Returns the null transformation values.

Explanation The null transformation translational and rotational components are


all 0 (X=0,Y=0,Z=0,O=0,A=0,T=0). The NULL function provides a
means to easily redefine transformation values using the SHIFT
function. Coordinates can be shifted in translation movement with-
out changing the rotational components (OAT).

Example POINT new = SHIFT(NULL BY [Link],[Link],[Link])+old


Defines the variable “new” by shifting the pose defined as “old” a
specified distance in the base coordinates.

dist = DISTANCE(NULL,[Link])
Calculates the distance between the pose “[Link]” and the null
origin of the robot (0,0,0,0,0,0), and assigns the value to the real
variable “dist”.

HERE HERE

#HERE #HERE

Function HERE:
Returns the transformation values that describe the current pose of
the TCP.

#HERE:
Returns the joint displacement values that describe the current
pose of the TCP.

Explanation The encoder values are read at the moment the HERE/#HERE
function is executed. The values returned by the HERE/#HERE
function represent the pose of the robot when the function was
executed.

NOTE
The name “here” cannot be used as a program name or
a variable name.

June 10, 2003 10-31


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

Example dist = DISTANCE(HERE,pos1)


Calculates the distance between the pose “pos1” and the current
pose and assigns the value to the real variable “dist”.

10-32 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

TRANS TRANS(X,Y,Z,O,A,T,)

Function Returns the transformation value with the specified translational and
rotational components.

Parameter X component, Y component, Z component:


Specifies the translational components X, Y, and Z. If not specified,
0 is assumed.

O component, A component, T component:


Specifies the rotation components O, A, and T. If not specified, 0 is
assumed.

Explanation The new transformation values can be used to define pose vari-
ables, in compound transformation values, or in motion instructions.
The TRANS function is also used with the DECOMPOSE instruc-
tion.

Example POINT [Link] = TRANS(v[0],+v[1]+100,v[2],v[3],v[4],v[5])


In this example, array variable v[0]–v[5] is used to build the transfor-
mation pose “[Link]”.

RX RX(angle)

RY RY(angle)

RZ RZ(angle)

Function Returns the transformation value that represents the rotation


around the specified axis.

Parameter Angle:
Specifies the rotational value in degrees.

Explanation The X, Y, and Z in the RX/RY/Z functions represent the base coordi-
nate axes. The translational values (X, Y, and Z) are not retuned by
the RX/RY/RZ function.

Example POINT x_rev = RX(30)


Returns the transformation value that represents 30° rotation
around the X axis and assigns the value to “x_rev”.

June 10, 2003 10-33


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

#PPOINT #PPOINT(jt1.jt2,jt3,jt4,jt5,jt6)

Function Returns the specified joint displacement values.

Parameter jt1–jt6:
Specifies the value of each joint displacement angle in degrees. If
not specified, 0 is assumed.

Explanation The #PPOINT function returns the specified joint displacement


values, up to the number of axes used. If installed, jt7, jt8... can be
specified.

NOTE
The #PPOINT function is processed in joint displace-
ment values and the “#” sign must proceed the PPOINT
function.

Example In this example, joints 2 and 3 of a six-axis robot are moved the
specified amount from the current pose.

HERE #ref ;stores the current pose as “#ref”.


DECOMPOSE x[0]=#ref ;decomposes each component into
elements of array variable x[0]–x[5].

JMOVE #PPOINT(x[0],x[1]+a,x[2]-a/2,x[3].x[4],x[5])

In this example, the same robot pose is achieved with two different
moves.

DRIVE 2,A,100 ;Moves Joint 2, “a” degrees.

DRIVE 3,-a/2,100 ;Moves joint 3, “-a/2” degrees.

10-34 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

SHIFT SHIFT(transformation values BY X shift,Y shift,Z shift)

Function Returns the transformation values of the pose shifted by the speci-
fied distance for each base axis (X, Y, Z), from the pose described
by the transformation values parameter.

An example program using the SHIFT function is included in section


12.2.

Parameter Transformation values:


Specifies the pose to shift in transformation values.

X shift, Y shift, Z shift:


Specifies the values to add to each of the components of the speci-
fied transformation values. If a shift value is not specified, 0 is
assumed.

Explanation The X shift, Y shift , and Z shift amounts are added to specified X, Y,
or Z component as specified. The result is returned as transforma-
tion values.

Example In this example, the transformation values of x are


(200,150,100,10,20,30). The point instruction is used to assign the
shifted value of pose x to pose y.

POINT y=SHIFT(x BY 5,-5,10)

The above instruction results are pose y=(205,145,110,10,20,30)

June 10, 2003 10-35


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

AVE_TRANS AVE_TRASN(transformation values 1,transformation values 2)

Function Returns the average values of the two specified transformation


values.

Parameter Transformation values 1, transformation values 2:

Specifies the transformation values to average.

Explanation The AVE_TRANS function calculates the average values for the
components of the specified transformation values.

This function is commonly used for calculating the average of pose


information obtained from sensor input.

NOTE
The average for the X, Y, and Z components of the two
transformation values are calculated individually, by
adding the two values and dividing by 2. The average
for the O, A, and T components, is not necessarily cal-
culated in the same manner.

Example POINT x= AVE_TRANS(p,q)


The average of transformation values for poses “p” and “q” are
assigned to location variable “x”.

JMOVE AVE_Trans(p,q)
When the above instruction is executed in a program the robot is
moved to the pose defined by the average of the transformation
values for poses ”p” and “q”.

10-36 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

BASE BASE

Function Returns the current base transformation values.

Example POINT a = BASE


Assigns the current base transformation values to the variable “a”.

TOOL TOOL

Function Returns the current tool transformation values.

Example POINT aa = TOOL


Assigns the current tool transformation values to variable “aa”.

TRADD TRADD(Transformation values)

Function Returns the sum of the traverse axis value and the x component of
(Option) the transformation values.

Parameter Transformation values:


Specifies the transformation values to add to the traverse axis.

TRSUB TRSUB(Transformation values)

Function Returns the value obtained by subtracting the traverse axis value
(Option) from the x component of the transformation values.

Parameter Transformation values:


Specifies the transformation values the traverse axis value is sub-
tracted from.

June 10, 2003 10-37


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

#HOME #HOME(home position number)

Function Returns the current home position joint displacement values.


(Option)

Parameter Home position number:


Specifies the home position number

1: Specifies home position 1. Home position 1 is set using the


SETHOME command.

2: Specifies home position 2. Home position 2 is set using the


SET2HOME command.

If not specified, 1 is assumed.

Explanation Returns the pose of the currently set home position in joint dis-
placement values.

NOTE
Always enter the “#” symbol with the #HOME function,
because it is processed in joint displacement values
only.

Example In this example, the robot does not move directly to the home posi-
tion. The robot is moved the same height (Z axis position) as the
home position, and then moved to the home position.

1 POINT homepos = #HOME(1)


2 IF DZ(homepos) > DZ(HERE) THEN
3 HERE tmp
4 POINT/Z tmp = homepos
5 LMOVE tmp
6 END
7 HOME

10-38 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

CCENTER CCENTER(transformation values 1,transformation values2,


transformation values 3,configuration transformation values)

Function Returns the center of the arc created by the three specified poses
(Option) (locations).

Parameters Transformation values 1, transformation values 2, transformation


values 3:
Specifies the three points on the arc.

Configuration transformation values:


Specifies the transformation values to determine the configuration
of the robot.

CSHIFT CSHIFT(Transformation values 1,transformation values 2,trans-


formation values 3,object transformation values BY shift
amount)

Function Returns the pose shifted by the specified amount from the
(Option) object pose. The robot shifts towards the center of the circle cre-
ated by the three poses specified.

Parameter Transformation values 1, Transformation values 2, Transformation


values 3:
Specifies the three points on the arc.

Object transformation values:


Specifies the object pose in transformation values.

Shift Amount:
Specifies the shift amount in real values.

June 10, 2003 10-39


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

10.3 MATHEMATICAL FUNCTIONS

This section describes the mathematical functions and parameters.

Table 10-7 lists the mathematical functions and provides a brief description of the func-
tions.

Detailed descriptions follow. Shaded parameters can be omitted.

Table 10-7 Mathematical Functions Descriptions

Function Description Page


ABS Returns the absolute value of a numerical expression. 10-41
SQRT Returns the square root of a numerical expression. 10-41
PI Returns the constant π. 10-41
SIN Returns the sine value. 10-41
COS Returns the cosine value. 10-41
ATAN2 Returns the arctangent value. 10-42
RANDOM Returns a random number. 10-42

10-40 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

ABS ABS(value)

Function Returns the absolute value of a numerical expression.

Example x = ABS(y)
Assigns the absolute value of “y” to the real variable “x”.

SQRT SQRT(value)

Function Returns the square root of a numerical expression.

Example x = SQRT(y)
Assigns the square foot of “y” to real variable “x”.

PI PI

Function Returns the constant π.

Example en = 2*PI*r
Assigns the result of 2πr to the real variable “en”.

SIN SIN(value)

Function Returns the sine value of the specified angle.

Example z = (SIN(x)^2)+(COS(y)^2)
Assigns the result of (sin(x))2+(cos(y))2 to the real variable “z”.

COS COS(value)

Function Returns the cosine value of the specified angle.

Example z = (SIN(x)^2)+(COS(y)^2)
Assigns the result of (sin(x))2+(cos(y))2 to the real variable “z”.

June 10, 2003 10-41


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

ATAN2 ATAN2(v1,v2)

Function Returns the values of an angle (in degrees) whose tangent equals
v1/v2.

Example slope = ATAN2(rise,run)


Assigns the result of tan-1(rise/run) to real variable “slope”.

RANDOM RANDOM

Function Returns a random number from 0.0 to 1.0.

Example r = RANDOM*10
Assigns a random number between 0 and 10 to the real variable “r”.

10-42 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

10.4 STRING FUNCTIONS

This section describes the string functions and parameters.

Table 10-8 lists the string functions and provides a brief description of the functions.

Detailed descriptions follow. Shaded parameters can be omitted.

Table 10-8 String Functions Descriptions

Function Description Page


$CHAR Returns the ASCII characters of the specified values. 10-44
$SPACE Returns the specified number of blanks. 10-44
$LEFT Returns the leftmost characters in the specified string. 10-45
$RIGHT Returns the rightmost characters in the specified string. 10-45
$MID Returns the specified number of characters. 10-46
$DECODE Extracts characters separated by specified characters. 10-47
$ENCODE Returns the string created by the specified print data. 10-49
$ERRORS Returns the specified error code, error message. 10-51
$ERROR Returns the error code, error message specified by a negative number. 10-51
$DATE Returns the system date as a string. 10-52
$TIME Returns the system time as a string. 10-52

June 10, 2003 10-43


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

$CHR $CHR(real value)

Function Returns the ASCII character string of the specified ASCII value.

Parameter Real value (or numeric expression):


Specifies the value to chant to an ASCII character.

Acceptable range:
0–255

Example $CHR(65)
Returns “A”, the ASCII character for value “65”.

$CHR(^H61)
Returns “a”, the ASCII character for value “97” (16x6+1).

$SPACE $SPACE(number of blanks)

Function Returns the specified number of blank spaces.

Parameter Number of blanks:


Specifies the number of blank spaces.

Acceptable range:
0 or positive value.

Example TYPE “a”+$SPACE(1)+” dog”


Displays “a dog”. One blank space for the $SPACE(1) function and
one blank space for the blank space preceeding “dog” (“ dog”).

10-44 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

$LEFT $LEFT(string,number of characters)

Function Returns the specified number of characters beginning with the


leftmost character of the specified string.

Parameter String:
The string can be a character string, string variable, or string ex-
pression.

Number of characters:
Specifies the number of characters to return, beginning with the
leftmost (first) character of the specified string. If 0 or a negative
number is specified, a blank is returned. If the number specified is
larger than the number of characters in the specified string, the
whole string is returned.

Example $LEFT(“abcdefgh”,3)
Returns the string “abc”.

$LEFT(“*1*2*3*4*5”,15)
Returns “*1*2*3*4*5” (the whole string).

$RIGHT $RIGHT(string,number of characters)

Function Returns the specified number of characters starting from the


rightmost character of the specified string.

Parameter String:
The string can be a character string, string variable, or string ex-
pression.

Number of characters:
Specifies the number of characters to return counting from the
rightmost (last) character of the specified string. If 0 or a negative
number is specified, a blank is returned. If the number specified is
larger than the number of characters in the specified string, the
whole string is returned.

Example $RIGHT(“abcdefgh”,3)
Returns the string “fgh”.

June 10, 2003 10-45


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

$MID $MID(string,real vlaue,number of characters)

Function Returns the specified number of characters from the specified


string.

Parameter String:
The string can be a character string, string variable, or string ex-
pression.

Real value (or numeric expression):


Specifies the starting position in the string to extract the characters
from.

Number of characters:
Specifies the number of characters to extract.

Explanation If the starting position is not specified, or specified by a value of 1 or


less, the characters are extracted beginning with the first character
of the specified string. If the starting position is specified by a value
of 0 or less, or if the number is larger than the number of characters
in the string, a blank is returned.

If the number of characters to extract is not specified, or the number


is larger than the number of characters in the string, the characters
from the specified starting position to end of the string are returned.

Example $substring = $MID(“abcdef”,3,2)


In this example, the $MID function returns “cd”, two characters
starting from the third character in the string “abcdef”. The result is
assigned to the string variable “$substring”.

10-46 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

$DECODE $DECODE(string variable,separator character,mode)

Function Returns the string separated by “separator characters”.

Parameter String variable:


Specifies the string to extract characters from.

Separator character:
Specifies the character to read as a separator (any character in the
string can be specified).

Mode:
Specifies the operation mode in a real number.

If the mode is not specified, or, if a negative number or 0 is speci-


fied, the characters beginning with the first character in the string
variable up to the separator are returned. If a positive number is
specified, the first separator in the string is returned. The returned
separator is removed from the string variable. If more than one
separator character exists in the string consecutively, all of the
separator characters are returned and removed from the string
variable.

Explanation The $ENCODE function searches the specified string for the speci-
fied separator character and extracts the characters from the begin-
ning of the string to the separator. The extracted characters are
returned as the result of the $ENCODE function, and are removed
from the original string.

The string returned by the $ENCODE function (the string removed


from the original string) can be the characters before the separator
or the separator.

NOTE
The $ENCODE function changes the original string and
returns the characters simultaneously.

The separator character is not case-sensitive.

June 10, 2003 10-47


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

Example In this example, the numbers separated by commas or blanks are


removed from the string “$input”.

The first instruction in the DO structure removes the first set of


characters in the string “$input” and assigns them to string variable
“$temp”.

The VAL function changes the string extracted in the previous


instruction into a real value. The real value is assigned to the array
variable “value”.

Program execution continues at the next $DECODE function and


searches for the next separator and extracts it from the string “$in-
put”.

1i=0 ;Resets the counter


2 DO
3 $temp = $DECODE($input,”,”,0) ;Extracts the characters to “,”
4 value[i] = VAL($temp) ;Converts the characters to real values
5 IF $input ==” “ GOTO 100
6 $temp = $DECODE($input,”,”,1) ;Extracts the separator “,”
7 i = i+1 ;Increments the counter by 1
8 UNTIL $input ==”” ;Continues execution until all characters
9 100 TYPE “END” ;are extracted

If the values of “$input” are:

1234, 93465.2, .4358, 3458, 3458103, (each value is separated by


a comma and a space).

The result of the above program is:

value[0] 1234.0
value[1] 93465.2
value[2] 0.4358
value[3] 348103.0

The result of the above program extracts all characters from the
string “$input” and the value of “$input” becomes “” or blank.

10-48 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

$ENCODE $ENCODE(print data, print data,...)

Function Returns the string created from the specified print data. The string
is created in the same manor as the TYPE instruction.

Parameter Print data:


acceptable parameters:

Character string.

Real value expressions (value is calculated and displayed).

Format Codes (specifies the print format of the message displayed).

Explanation The $ENCODE function enables creating strings within programs


using the same print data as in the TYPE instruction. The $EN-
CODE function does not display the created string, but the results
are used as values in programs.

The following format codes are used to specify the format of nu-
meric expressions. The same format is used until a different code is
specified. In all formats, if the value is larger than the specified
width, asterisks (*) are displayed.

$ENCODE function format specification codes

/D Default format. This is the same as /Gm.n, where m=15 characters


and n=8 characters including the decimal except that following
zeros and all spaces except one between the values are removed.

/Em.n The value is displayed in scientific notation, whole numbers in the m


digits field and the fraction in n digits field. The value of m should
be larger than n by six or more, and smaller than thirty-two.

Example: 1.234E+02

/Fm.n The value is displayed in fixed point notation, whole numbers in the
m digits field with the fraction in the n digits field.

Example: -1.234

June 10, 2003 10-49


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

/Gm.n If the value is 0.01 or greater and can be displayed in the format F
in the m digit field, the value is displayed in F format. Otherwise,
the value is displayed in the /Em.n format.

/Hn The value is displayed as a hexadecimal number in the n digit field.

/ln The value is displayed as a decimal number in the n digit field.

The following format codes insert the specified characters between character strings.

/Cn A set of carriage returns (CR) and line feeds (LF) is output n times.
If this argument is the first or the last in the PRINT instruction, n
blank lines are displayed on the terminal, otherwise, n-1 blank lines.

/S This format code suppresses the output of (CR) and (LF) at the
beginning of a message. This is effective only when /S is the first
format code.

/Xn n spaces are inserted.

/Jn (Option) This format code displays the value as a hexadecimal number in the
n digit field. Zeros are displayed in place of blanks.

/Kn (Option) This format code displays the value as a decimal number in the n
digit field Zeros are displayed in place of blanks.

/L This format code is the same as /D except all the spaces are re-
moved from the message or data.

Example $output = $output+$ENCODE(/F6.2,count)


In this example, the value of the real variable “count” is converted
into a string in the format specified by “/F6.2”, and added to the end
of the string “output”. The combined string is assigned to the string
variable “output”.

10-50 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

$ERRORS $ERRORS(error code)

Function Returns the specified error code, error message. The error code is
returned as a character string with the error message.

Parameter Error code.


The error is specified as:

Pxxxx (operation error)

Wxxxx (mechanical/control warning)

Exxxx (non-fatal error)

Dxxxx (fatal error)

$ERROR $ERROR(error number)

Function Returns the error message for the specified error code.

Parameter Error number:


Specifies the error number as a negative number (preceded by -).
The error codes are converted into negative error numbers as
shown below.

Dxxxx: -4xxxx

Exxxx: -3xxxx

Wxxxx: -2xxxx

Pxxxx: -1xxxx

June 10, 2003 10-51


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

FUNCTIONS

$DATE $DATE(date form)

Function Returns the system date in the specified string format.

Parameter Date form:


Specifies the date format (1–3).

$DATE(1):
mm/dd/yyyy
July 10, 2002 is returned as 07/10/2002.

$DATE(2):
dd/mmm/yyyy
July 10, 2002 is returned as 10/JUL/2002.
The months are represented as:
JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, and
DEC.

$DATE(3):
yyyy/mm/dd
July 10, 2002 is returned as 2002/07/10.

$TIME $TIME

Function Returns the system time in the string format:


hh : mm : ss

Explanation The time is expressed in the 24 hour format.

Example 18: 27: 50

10-52 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROCESS CONTROL PROGRAMS

11.0 PROCESS CONTROL PROGRAMS ............................................................... 11-2


11.1 Process Control Program Commands/Instructions .......................................... 11-3

June 10, 2003 11-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROCESS CONTROL PROGRAMS

11.0 PROCESS CONTROL PROGRAMS

This section describes the AS Language process control program commands/instruc-


tions. A process control (PC) program is an AS Language program executed simulta-
neously with a robot control program. A maximum of five PC programs and a robot
program can be executed simultaneously.

A PC program is used to monitor or to control external devices through external binary


signals. PC programs evaluate variables, perform mathematical calculations, execute
logic instructions, and set external or internal signals.

PC programs cannot use instructions that cause robot motion.

The BASE and TOOL instructions are not available for PC programs.

PC programs are used to display messages on the terminal by means of the PRINT
instruction. All internal and external binary signals can be used in PC programs.
The keyword specifies the function and the parameters entered in parentheses deter-
mine the value.

An example of the PC program commands/instructions format is shown in figure 11-1

Keyword Parameter

PCSTATUS program number

Shaded parameters can be omitted.

When parameters are omitted, omit the comas.

Always enter a space between the keyword and the parameter.

Figure 11-1 PC Program Command/Instruction Example

NOTE
This symbol is used to represent the ENTER key

11-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROCESS CONTROL PROGRAMS

11.1 PROCESS CONTROL PROGRAM COMMANDS/INSTRUCTIONS

This section describes the process control program commands/instructions and param-
eters.

Table 11-1 lists the process control commands/instructions and provides a brief descrip-
tion of the functions.

An “M” in parentheses indicates a monitor command, a “P” indicates a program instruc-


tion, and an “M” and a “P” indicates the command/instruction is used as a monitor com-
mand or a program instruction.

Detailed descriptions follow. Shaded parameters can be omitted.

Table 11-1 Process Control Commands/Instructions Descriptions

Command/
Instruction Description Page
PCSTATUS Displays the specified PC program status. (M) 11-4
PCEXECUTE Executes the specified PC program. (M,P) 11-5
PCABORT Stops specified PC program execution immediately. (M,P) 11-6
PCKILL Initializes the PC program stack. (M) 11-6
PCEND Stops specified PC program execution. (M,P) 11-7
PCCONTINUE Resumes PC program execution. (M) 11-8
PCSTEP Executes a PC program step. (M) 11-9
PCSCAN Specifies PC program process time (option). (P) 11-10

June 10, 2003 11-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROCESS CONTROL PROGRAMS

PCSTATUS PCSTATUS PC program number

Function Displays the specified PC program status.


(M)

Parameter PC program number:


Specifies the PC program number status to display. If a PC pro-
gram number is not specified, 1 is assumed.

Acceptable program number range:


1–5

Explanation The PC program status is displayed as shown in figure 11-2.

PC status: Program is not running


Execution cycles
Completed cycles: 11
Remaining cycles: Infinite
Program name Prio Step No.
pc_test() 0 1 PRINT “step1”

Figure 11-2 PC Status Example

PC status:
Program is not running
Program running
Program WAIT

Completed cycles:
The number of program execution cycles completed.

Remaining cycles:
The number of program execution cycles not completed. If the
program execution cycles is specified as “-1” using the PC execute
command, “infinite” is displayed.

Program name:
The program name specified in the PCSTATUS command.

Step:
The step currently executing in the specified PC program. The step
number and the step program instruction are displayed.

11-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROCESS CONTROL PROGRAMS

PCEXECUTE PCEXECUTE PC program number:program name,execution


cycles,step number

Function Executes the specified PC program according to the specified


(M,P) parameters.

Parameter PC program number:


Specifies the PC program to execute
Acceptable program number range:
1–5
If a PC program number is not specified, 1 is assumed. A maximum
of five PC programs can be executed simultaneously. The PC
program number is not the order of priority.

PC program name:
Selects the PC program to execute as the specified PC program
number (1–5). If not specified, the last program executed using the
PCEXECUTE command is selected.

Execution cycles:
Specifies the number of times to executed the specified PC pro-
gram. If -1 is entered, the program is executed continuously.

Step number:
Specifies the step to start execution. If not specified, the first step is
selected.

Explanation The PCEXECUTE command is similar to EXECUTE, except


PCEXECUTE executes a PC program instead of a robot control
program. The PC program currently executing is identified by a
blinking astrict (*) following the name.

PCEXECUTE is used as a monitor command or as a program


instruction.

Example PCEXECUTE control,-1


In this example, the program “control” is executed continuously.
When -1 is specified as execution cycles, the specified program
executes until a PCABORT command is executed, a PAUSE or
HALT instruction is executed in the program, or an error occurs.

June 10, 2003 11-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROCESS CONTROL PROGRAMS

PCABORT PCABORT PC program number

Function Stops execution of the currently running PC program.


(M,P)

Parameter PC program number:


Specifies the PC program to stop executing.
Acceptable range: 1–5

If a PC program number is not specified, 1 is assumed.

Explanation PCABORT is similar to ABORT, except PCABORT stops a PC


program instead of a robot control program.

The currently running PC program is stopped. Execution can be


resumed using the PCCONTINUE command.

PCABORT is used as a monitor command or as a program instruc-


tion.

PCKILL PCKILL PC program number

Function Initializes the PC program stack.


(M)

Parameter PC program number:


Specifies the PC program to initialize (remove from the PC program
stack).
Acceptable range: 1–5

If a PC program number is not specified, 1 is assumed.

Explanation If the PC program is running, suspended by the PAUSE or


PCABORT command, or by an error, the program cannot be initial-
ized (removed from the PC program stack).

A PC program that is on the PC program stack cannot be deleted.


To allow deletion of the PC program, use the PCKILL command to
remove the PC program from the stack.

11-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROCESS CONTROL PROGRAMS

PCEND PCEND PC program number:task number

Function Ends execution of the specified currently running PC program on


(M,P) execution of the next STOP instruction.

Parameter PC program number:


Specifies the PC program to end executing.
Acceptable range: 1–5

If a PC program number is not specified, 1 is assumed.

Task number:
Specifies the task number as 1 or -1. If a task number is not speci-
fied, 1 is assumed.

Explanation If a task number is not specified or specified as 1, the program


execution is stopped on execution of the next STOP, RETURN, or
similar instruction, regardless of remaining cycles. The remaining
cycles can be executed using the PCCONTINUE command.

If -1 is specified as the task number, the previously entered PCEND


command is canceled. When a program loop occurs or the program
runs infinitely without a STOP instruction, PCEND is ineffective and
must be canceled using the PCEND -1 command.

PCEND is used as a monitor command or as a program instruction.

June 10, 2003 11-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROCESS CONTROL PROGRAMS

PCCONTINUE PCCONTINUE PC program number, NEXT

Function Resumes execution of a suspended PC program. PCCONTINUE is


(M) used with the NEXT parameter to skip a WAIT instruction and
continue execution at the step following the WAIT instruction.

Parameter PC program number:


Specifies the PC program to continue execution.
Acceptable range: 1–5
If a PC program number is not specified 1 is assumed.

NEXT:
When the NEXT parameter is specified, execution is resumed at the
step following the step that was suspended. If NEXT is not speci-
fied, execution resumes at the step where the program suspension
occurred.

Explanation PCCONTINUE is similar to CONTINUE, except PCCONTINUE is


used to continue execution of a PC program instead of a robot
control program.

PC program execution is resumed from the step where the execu-


tion was stopped by PAUSE or PCABORT, or by an error. If the
NEXT parameter is specified, execution is resumed at the step
following the step where the interruption occurred.

11-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROCESS CONTROL PROGRAMS

PCSTEP PCSTEP PC program number:program name,


execution cycles,step number

Function Executes a single step of a PC program.


(M)

Parameter PC program number:


Specifies the PC program to execute a step.
Acceptable range: 1–5

If a PC program number is not specified, 1 is assumed.

PC Program name:
Selects the PC program containing the step to execute as the
specified PC program number (1–5). If the program name is not
specified, the last program executed using the PCEXECUTE com-
mand is selected.

Execution cycles:
Specifies the number of times a program step is executed. If not
specified, 1 is assumed.

Step number:
Specifies the program step number to execute. If not specified, the
first step of the program is executed.

If none of the parameters are specified, the next step is executed.

Explanation The PCSTEP command, like the PCCONTINUE command, can be


used without parameters under the following conditions:
1. When the PCSTEP command was used in the last executed
step.
2. After a PAUSE instruction.
3. When the program was suspended, except by an error.

Example >PCSTEP sequence,,23


In this example, step 23 of PC program number 1, named
“sequence”, is executed one time.

>PCSTEP
Executes the next step, in this example, step 24.

June 10, 2003 11-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

PROCESS CONTROL PROGRAMS

PCSCAN PCSCAN time

Function Sets the PC program execution cycle time.


(P)

Parameter Time:
Sets the PC program execution time (time it takes to execute a PC
program). The time is specified in seconds, 0 or greater.

Explanation The PCSCAN instruction is used to execute the PC program in the


specified cycle time. If the actual PC program scan time (cycle
time) is longer than the specified time, the time specified is ignored.

Example In this example, if the program below is executed continuously using


the PCEXECUTE command, with -1 specified as execution cycle,
SIGNAL 1 is set ON and OFF in a one second cycle time.

Program scan()
1 PCSCAN 1
2 IF SIG(1) THEN
3 SIGNAL -1
4 ELSE
5 SIGNAL 1
6 END

11-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

12.0 SAMPLE PROGRAMS .................................................................................. 12-2


12.1 Program Initial Settings/Parameters .............................................................. 12-2
12.2 Palletizing ...................................................................................................... 12-4
12.3 External Interlock ........................................................................................... 12-6
12.4 Tool Transformation........................................................................................ 12-9
12.4.1 Tool Transformation Values, Tool Dimensions Unknown ................................ 12-9
12.4.2 Tool Transformation Values, Tool Dimensions Known .................................. 12-12
12.5 Relative Transformations ............................................................................. 12-13
12.5.1 Using Relative Transformations ................................................................... 12-13
12.5.2 Using Relative Transformations in a Program .............................................. 12-15
12.6 Using Relative Transformations with the Frame Function ............................ 12-17

June 10, 2003 12-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

12.0 SAMPLE PROGRAMS

This section contains sample programs using AS Language program instructions and
functions. The sample programs include operation explanations.

12.1 PROGRAM INITIAL SETTINGS/PARAMETERS

To make changing program settings and parameters easy, place the settings and pa-
rameters at the beginning of the program before AS Language program instructions and
functions, as listed below.

• Move the robot to the home pose.

• Define the variables for each task (e.g., for palletizing, set the number of parts per
pallet).

• Initialize counters, set flags, etc.

• Set the tool coordinates.

• Set the base coordinates.

Example

In this example, parts are palletized in order 1–6. The program example below shows
the initial settings and parameters for the program diagram shown in figure 12-1.

.Program setting()
1 BASE NULL ;Defines the robot base coordinate to NULL base.
2 TOOL tool1 ;Tool transformation is set to tool1 (tool1 is pre-defined).
3 [Link]=3 ;Specifies 3 rows.
4 [Link]=2 ;Specifies 2 columns
5 xs=100 ;Sets the shift distance in the x axis (∆X=100 mm)
6 ys=150 ;Sets the shift distance in the y axis (∆Y=150 mm)
7 POINT put=start ;Assigns the value of pose start to variable put.
8 OPENI ;Opens the material handling clamp.
9 HOME ;Moves the robot to the pre-defined home position.

12-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

100 mm
Y

5 6

150 mm

3 4

150 mm
start
1 2
Pallet
X

Figure 12-1 Palletizing Example 1

June 10, 2003 12-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

12.2 PALLETIZING

In AS Language programming palletizing can be simplified by using the SHIFT function


to specify locations in place of teaching each location, as in block step programming.
To change pallet locations, the programmer changes the shift value in place of re-re-
cording the locations as in block step programming.

Example

In this example, parts are picked up from a parts feeder and placed on a pallet. The
pallet is set-up for three rows, 110 mm apart, and four columns, 90 mm apart (Figure
12-2). For simplicity, the pallet and the parts are placed parallel to the robot XY base
coordinates (Figure 12-2) and the procedure for synchronizing the parts feeder and the
robot using external I/O signals is omitted.

Pose #a (parts feeder) and start (first part location) must be pre-defined (Figure 12-2).

Parts Feeder

#a

90 mm 90 mm 90 mm

9 10 11 12

110 mm

5 6 7 8
X
110 mm
Robot start
1 2 3 4
Pallet

Figure 12-2 Palletizing Example 2

12-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

.Program palletize()
1 ;Initial settings (3 rows, 4 columns, X shift = 90 mm, Y shift = 100 mm,
;SPEED 100%, ACCURACY 100 mm)
2 [Link] = 3
3 [Link] = 4
4 xs = 90
5 ys = 100
6 SPEED 100 ALWAYS
7 ACCURACY 100 ALWAYS
8 OPENI
9 ;Start palletizing
10 FOR row = 1 TO [Link]
11 FOR col = 1 TO [Link]
12 JAPPRO #a,100 ;Steps 12 through 17 pick up the part from the parts feeder.
13 SPEED 30
14 ACCURACY 1
15 LMOVE #a
16 CLOSI
17 LDEPART 200
18 ;
19 JAPPRO put, 200 ;Steps 19 through 24 place the part on the pallet.
20 SPEED 30
21 ACCURACY 1
22 LMOVE put
23 OPENI
24 LDEPART 200
25 ;
26 ;Calculate the pose for the part in the next row.
27 POINT put = SHIFT(put BY xs, 0, 0)
28 END
29 ;
30 ;Calculate the pose for the part in the next column.
31 POINT put = SHIFT(start BY 0, ys*row, 0)
32 END
.END

June 10, 2003 12-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

12.3 EXTERNAL INTERLOCK

Internal interlocking is used to synchronize operation with an external device.

This example uses the AS Language instructions:

• SIGNAL

• IF

• SWAIT

• ONI

• IGNORE

Example

In this example:

1. Two types of parts, A and B, are sent to the parts feeder in random order. The parts
present signal (part in feeder) is external input 1001 (IN1, [Link]).

2. The robot picks up a part from the parts feeder and places it at the testing station.
The start test signal (part at test station) is external output 1 (OUT1, [Link]).

3. At the testing station, the parts are classified as part A, part B or other than A or B.
The signal for testing complete is external input signal 1002 (IN2, [Link]).

4 The robot places the part according to classification (A, B, other).

If a problem occurs at the testing station when the robot picks up the part from the parts
feeder and carries it to the testing station, the program is immediately interrupted and
execution branches to the troubleshooting subroutine (emergency). The external input
signal 1007 (IN7, fault) is set ON (high), indicating a problem exists. When troubleshoot-
ing is complete, external input signal 1006 (IN6, retry) is sent and program execution is
resumed.

The program is named “main” and the troubleshooting subroutine is named “emer-
gency”.

Refer to figure 12-3 for program diagram.

12-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

.Program main()
1 ;Define variables
2 [Link] = 1001 ;Set complete signal (IN1) is named [Link].
3 [Link] = 1002 ;Test complete signal (IN2) is named [Link].
4 [Link] = 1003 ;Part a signal (IN3) is named [Link].
5 [Link] = 1004 ;Part b signal (IN4) is named [Link].
6 retry = 1006 ;Problem resolved signal (IN6) is named retry.
7 fault = 1007 ;Problem detected signal (IN7) is named fault.
8 [Link] = 1 ;Start test signal (OUT1) is named [Link].
9 ;Program
10 OPENI ;Opens clamp.
11 10 JAPPRO part,100 ;Approaches location part by 100 mm.
12 ONI fault CALL emergency ;Monitors input signal fault and jumps to
13 ;emergency when fault is set ON.
14 SWAIT [Link] ;Waits for part in feeder (input signal [Link]).
15 LMOVE part ;Moves to location part (part feeder).
16 CLOSEI ;Closes clamp/picks up part.
17 LDEPART 100 ;Moves from location part by 100 mm.
18 JAPPRO test,100 ;Approaches location test by 100 mm.
19 LMOVE test ;Moves to location test.
20 Break ;Completes move to test before reading next step.
21 IGNORE fault ;Stops monitoring input signal fault.
22 SIGNAL [Link] ;Sets output signal [Link] to ON.
23 TWAIT 1.0 ;Pauses program execution for 1.0 second.
24 SWAIT [Link] ;Waits for input signal [Link] (test complete).
25 JDEPART 100 ;Moves from location test by 100 mm.
26 SIGNAL -[Link] :Sets output signal [Link] OFF.
27 IF SIG([Link],-[Link]) GOTO 20 ;If A part jump to label 20.
28 IF SIG(-[Link],[Link]) GOTO 30 ;If B part jump to label 30.
29 POINT n=r ;If not A or B part assigns value of location r to n.
30 GOTO 40 ;Program execution jumps to label 40.
31 20 POINT n=a ;Assigns value of location a to n (A part).
32 GOTO 40 ;program execution jumps to label 40.
33 30 POINT n=b ;Assigns value of location b to n (B part).
34 40 JAPPRO n,100 ;Approaches location assigned to n by 100 mm.
35 LMOVE n ;Moves to location assigned to n.
36 OPENI ;Opens clamp/releases part.
37 LDEPART 100 ;Moves from location assigned to n by 100 mm.
38 GOTO 10 ;Program execution jumps to label 10.
.END

June 10, 2003 12-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

.Program emergency()
1 PRINT “**ERROR**” ;Displays error message on the terminal.
2 SWAIT retry ;Waits for input signal retry to be set ON.
3 ONI falut CALL emergency ;Starts monitoring input signal fault.
4 RETURN ;Returns program execution to main program.
.END

Testing Station
test

Parts Feeder

a
Part A
part


b
Part B


r
Other

Robot

Figure 12-3 External Interlock Program Example Diagram

12-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

12.4 TOOL TRANSFORMATION

This section describes the procedure used to obtain tool transformation values.

12.4.1 TOOL TRANSFORMATION VALUES, TOOL DIMENSIONS UNKNOWN

When the tool dimensions are unknown, or difficult to obtain due unusual tool offset, the
values can be calculated using the following procedure.

1. At the monitor prompt enter:


>QTOOLOFF

2. Place a precise reference point within easy reach of the robot, preferably along the
base Y-axis (Figure 12-4).

NULL Tool Center Point


Tool Mounting Flange

Fixed Reference Point

Figure 12-4 Tool Transformation Reference Point

3. Jog the robot to a position with the tool mounting flange facing straight down, as
shown in figure 12-4.

4. At the monitor prompt enter:


>SPEED 10 ;Sets the monitor speed to 10%.
>TOOL NULL ;Sets the tool coordinates to NULL (0, 0, 0, 0, 0, 0).
>DO ALIGN ;Aligns the tool Z-axis with the base Z-axis.

June 10, 2003 12-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

5. Using base mode, jog the robot to a position with the center of the tool mounting
flange perpendicular to the fixed reference point (Figure 12-5).

NULL Tool Center Point


Tool Mounting Flange
Fixed Reference Point

Figure 12-5 Tool Mounting Flanged Aligned with Fixed Reference Point

6. With the robot in position as described in step 5, at the monitor prompt enter:
>HERE a

7. Jog the robot away from the fixed reference point. Install the tool onto the tool
mounting flange.

8. Jog the robot to a position with the tool center point (TCP) at the fixed reference
point and with the tool Z-axis perpendicular to the base X-axis and Y-axis (Figure
12-6).

9. With the robot in position as described in step 8, at the monitor prompt enter:
>HERE a + b

10. The tool transformation values are calculated from the compound transformation as
-b. The inverse of b (-b) is used because the compound transformation b is the
location of the NULL TCP, relative to the fixed reference point (Figure 12-6).

11. At the monitor prompt enter:


>POINT t = -b ;Assigns the values of -b to variable t.

12. To assign the values of variable t as an AS Language tool, at the monitor prompt
enter:
>TOOL t ;Assigns the values of t as AS Language tool t.

12-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

Tool Mounting Flange


b
Z

b
Tool coordinate Z-Axis a+b

X
New Tool Center Point
a
Fixed Reference Point a

Y
Base Coordinates

Figure 12-6 Compound Transformation a + b

To confirm proper tool transformation values:

1. Select tool mode, and jog the robot using the rx, ry, and rz keys. The TCP should
remain fixed while the robot arm rotates about point a. If the TCP does not remain
fixed during jogging, the tool transformation procedure should be repeated.

2. Move the robot away from the fixed reference point, at the monitor prompt enter:
>SPEED 10 ;Sets the monitor speed to 10%..
>DO JM a ;Moves the robot to reference point a.

If the tool center point does not move to the reference point, the tool transformation
procedure should be repeated.

June 10, 2003 12-11


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

12.4.2 TOOL TRANSFORMATION VALUES, TOOL DIMENSIONS KNOWN

When the tool dimensions are known, the following procedure can be used to obtain tool
transformation values. Tool transformation values obtained using this procedure are
more accurate than those obtained in the procedure in section 12.4.1 Tool Transforma-
tion Values, Tool Dimensions Unknown.

The X, Y, and Z-axes in figure 12-7 express the null tool coordinates. This procedure is
used to set the tool coordinate origin at the TCP and the tool Z-axis in the same orienta-
tion as the tool.

30 mm
X

X Z 90°

Y
Y 200 mm 55°
Z

Figure 12-7 Tool Dimensions Example

1. In this example, the tool transformation values are assigned to the variable “torch”
using the POINT command. At the monitor prompt enter:
>POINT torch
X Y Z O A T
0 0 0 0 0 0
Change?
>-30,0,200,0,35,0

X Y Z O A T
-30 0 200 0 35 0
Change?
>

2. To assign the transformation values of variable “torch” as an AS Language tool, at


the monitor prompt enter:
>TOOL torch

12-12 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

12.5 RELATIVE TRANSFORMATIONS

Relative transformations are transformation poses defined relative to a reference trans-


formation pose.

12.5.1 USING RELATIVE TRANSFORMATIONS

When transformation poses are taught relative to a reference transformation pose, the
relationship between the pose and the reference pose remains the same even if the
reference pose is redefined.

Example

In this example, transformation poses are taught at the corners of a table (Figure 12-8).
The positional relationship between the robot and the table changes depending on
where the corners are placed, but as long as the shape of the table remains the same
the relationship of the four corners does not change.

If one of the corners is taught as a reference point to specify the absolute positional
relationship between the robot and the table, and the other corners are taught relative to
the first corner, if the table is relocated, only the reference point has to be redefined
(Figure 12-8).

Top View Transformations are taught as:


a a+b
>HERE a
Y
>HERE a+b

>HERE a+c

X a+d a+c >HERE a+d

Z .Program table()
1 JMOVE a
a 2 LMOVE a+b
3 LMOVE a+c
a+b 4 LMOVE a+d
5 LMOVE a

a+d

a+c

Figure 12-8 Relative Transformations Example 1

June 10, 2003 12-13


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

In figure 12-9-A, the reference point a is taught as a transformation and the other cor-
ners are taught a compound transformations. In figure 12-9-B, the reference point a is
redefined. If the posture of the robot wrist is not changed, when reference point a is
redefined, the robot follows the path shown by the solid line. If the posture of the wrist is
changed when reference point a is redefined the robot path will follow the new wrist
posture, as indicated by the dashed line.

Top View
a a+b
Y
A

X a+d a+c

a a+b

a+d a+c

Figure 12-9 Relative Transformations Example 2

12-14 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

12.5.2 USING RELATIVE TRANSFORMATIONS IN A PROGRAM

In this example, parts are palletized on two pallets. The pallets are placed separately
but the reference point and parts locations are the same (Figure 12-10).

The parts are picked up from the parts feeder and placed on Pallet A. When six parts
are placed on Pallet A, program execution continues to place six parts on Pallet B (Fig-
ure 12-10). For simplicity, the process for synchronizing with the parts feeder is omitted.

Parts Feeder

Y 90 mm 90 mm
#a

4 5 6
start 50 mm
1 2 3
Pallet A
a

90 mm 90 mm

X
4 5 6
Robot start 50 mm
1 2 3
Pallet B
b

Figure 12-10 Relative Transformations Example 3

The taught poses for this example are:

#a ;Part is picked up from parts feeder.

a ;Reference transformation for Pallet A.

b :Reference transformation for Pallet B.

start ;First part location on pallet relative to the reference point.

June 10, 2003 12-15


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

.Program [Link]()
1 ;initial settings (2 rows,3 columns, ∆X=90, ∆Y=50)
2 [Link] = 2
3 [Link] = 3
4 xs = 90
5 ys = 50
6 OPENI
7 fig = 0 ;fig = 0: Pallet A, fig = 1:Pallet B
8 POINT pallet = a
9 ;start palletizing
10 10 POINT put = start
11 FOR row = 1 TO [Link]
12 FOR col = 1 TO [Link]
13 JAPPRO #a,100 ;approaches #a by 100 mm
14 LMOVE #a ;moves to #a
15 CLOSEI ;closes clamp/picks up part
16 LDEPART 100 ;departs #a by 100 mm
17 ;
18 POINT put_pt = pallet+put ;assigns the value of pallet+put to put_pt
19 JAPPRO put_pt,200 ;approaches put_pt by 200 mm
20 LMOVE put_pt ;moves to put_pt
21 OPENI ;opens clamp/releases part
22 LDEPART 200 ;departs put_pt by 200 mm
23 ;
24 POINT put = SHIFT(put BY xs,0,0) ;shifts part to next column
25 END
26 ;
27 POINT put = SHIFT(start BY 0,ys,0) ;shifts part to next row
28 END
29 ;
30 IF fig<>0 GOTO 30 ;goes to end of program when Pallet B is full
31 fig = 1 ;assigns the value of 1 to variable fig
32 POINT pallet = b ;defines the reference point for Pallet B
33 GOTO 10 ;program execution jumps to the label 10
34 30 TYPE “**END**” ;displays the message **END**
35 STOP
.END

12-16 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

12.6 USING RELATIVE TRANSFORMATIONS WITH THE FRAME FUNCTION

In the example in section 12.5.1, if the wrist posture is not corrected when the reference
pose is redefined, the pattern of the program poses is skewed (Figure 12-9-B). When
the FRAME function is used the wrist posture is not a factor.

To use the FRAME function, teach four points (b, c ,d, e) to define the frame transforma-
tion value a. Points “b” and “c” determine the direction of the X-axis, point “d” determines
the XY plane, and point “e” determines the origin. After the points are taught, at the
monitor prompt enter:

>POINT a = FRAME(b,c,d,e)

The POINT command defines variable “a” relative to the frame defined by the four points
(b,c,d,e). The XYZ values show the position of the origin of the relative coordinates and
the OAT values show the posture of the relative coordinates.

All poses on the relative coordinates can be expressed as a+x, where x is a pose taught
relative to a.

If the location of the pallet is changed, re-teach points “b, c, d, e” as described above. If
poses “b” and “e” are the same, as in the following example, only three points are re-
taught.

The relative coordinates defined using the FRAME function are also referred to as
FRAME coordinates.

This example program preforms the same procedure as the example in section 12.5.2,
except the FRAME function is used. Refer to figure 12-11 and the following example
program.

June 10, 2003 12-17


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

Parts are palletized on Pallet A. Three corners of the pallet are taught, org (origin), x (X-
axis), y (Y-axis) (Figure 12-11). To palletize on Pallet B, re-teach the three FRAME
coordinates (org, x, y) to the new pallet location. The FRAME coordinates are redefined
and parts are palletized in the same pattern as Pallet A.

To use the FRAME function as shown in the example in figure 12-11:

1. Teach the points required in the program.


#a ;parts feeder
org,x,y ;FRAME coordinates
start ;location of the first part on the pallet (must be located inside the frame
coordinates), define as:
>HERE pallet+start

2. Define the frame coordinate relative to the FRAME, at the monitor prompt enter:
>POINT pallet = FRAME(org,x,y,org)

3. Enter the program steps, refer to the following example program ([Link]).

Parts Feeder y 90
mm
Y 90
mm
4
#a
sta
r 5
1 t
org 6
2

Pa 3 50
llet mm
A
x

X mm
90 mm
m 50
Robot 9 0m 6
5
3 tB
y lle x
4 Pa
2
rt
sta
1

org

Figure 12-11 FRAME Function Example

12-18 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

SAMPLE PROGRAMS

.Program [Link]()
1 ;initial settings (2 rows,3 columns, ∆X=90, ∆Y=50)
2 [Link] = 2
3 [Link] = 3
4 xs = 90
5 ys = 50
6 OPENI
7 ;
8 POINT pallet = FRAME(org,x,y,org) ;defines the FRAME coordinates for the pallet
9 ;start palletizing
10 POINT put = start
11 FOR row = 1 TO [Link]
12 FOR col = 1 TO [Link]
13 JAPPRO #a,100 ;approaches #a by 100 mm
14 LMOVE #a ;moves to #a
15 CLOSEI ;closes clamp/picks up part
16 LDEPART 100 ;departs #a by 100 mm
17 ;
18 POINT put_pt = pallet+put ;assigns the value of pallet+put to put_pt
19 JAPPRO put_pt,200 ;approaches put_pt by 200 mm
20 LMOVE put_pt ;moves to put_pt
21 OPENI ;opens clamp/releases part
22 LDEPART 200 ;departs put_pt by 200 mm
23 ;
24 POINT put = SHIFT(put BY xs,0,0) ;shifts part to next column
25 END
26 ;
27 POINT put = SHIFT(start BY 0,ys,0) ;shifts part to next row
28 END
29 STOP
.END

June 10, 2003 12-19


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

A.0 APPENDIX .......................................................................................................... A-2


A.1 AS Language Keyword List (Alphabetical) .......................................................... A-2
A.2 American Standard Code for Information Interchange Set ............................... A-13
A.3 AS Language Signal Usage Limitations ............................................................ A-16
A.4 Euler’s O, A, T Angles ....................................................................................... A-17

June 10, 2003 A-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

A.0 APPENDIX

A.1 AS LANGUAGE KEYWORD LIST (ALPHABETICAL)

*Legend
M–Monitor command E–Editor command P–Program instruction S–Switch
F–Function O–Operator K–Other

Name Abbreviation Function * Format (Parameter) Page


ABORT AB Stops execution M ABORT 6-53
Changes elbow joint to above
ABOVE AB P ABOVE 7-41
position
ABS ABS Returns absolute value F ABS (real value) 10-41
[Link] [Link] Enables use of absolute speed S ...[Link]... 8-12
ACCEL ACCE Sets acceleration P ACCEL speed ALWAYS 7-24
ACCURACY ACCU Sets accuracy range P ACCURACY distance ALWAYS 7-23
Sets when timers begin timing in
[Link] AF S ...[Link]... 8-12
block step programs
Aligns tool Z axis with base
ALIGN AL P ALIGN 7-13
coordinate axis
AND AND Logical AND O .... AND.... 9-5
ASC ASC Returns ASCII value F ASC (string, character number) 10-11
ATAN2 ATAN2 Returns the arctangent value F ATAN2 (real value1, real value2) 10-41
[Link] AUTOSTART. Starts PC program automatically S ...[Link]... 8-9
[Link] AUTOSTART2. Starts PC program automatically S ...[Link]... 8-9
[Link] AUTOSTART3. Starts PC program automatically S ...[Link]... 8-9
[Link] AUTOSTART4. Starts PC program automatically S ...[Link]... 8-9
[Link] AUTOSTART5. Starts PC program automatically S ...[Link]... 8-9
AVE_TRANS (transformation
AVE_TRANS AVE_TRANS Returns average value F 10-36
values1, transformation values2)
BAND BAND Binary AND O ... BAND ... 9-8
Defines base transformation
BASE BA M BASE transformation values 6-76
values
Defines base transformation
BASE BA P BASE transformation values 7-109
values
Returns base transformation
BASE BASE F BASE 10-37
values
Enables/disables battery low
BATCHK BAT M BATCHK 6-99
voltage check
Changes elbow joint to below
BELOW BE P BELOW 7-41
position
BITS start number, number of
BITS BI Sets output signals M 6-113
signals = value
BITS start number, number of
BITS BI Sets output signals P signals=decimal value 7-77
values
BITS (starting signal number,
BITS BITS Returns bit patterns of signals F 10-6
number of signals)
BOR BOR Binary OR O ... BOR ... 9-8
BRAKE BRA Stops robot motion immediately P BRAKE 7-25
BREAK BRE Causes a break in CP motion P BREAK 7-25
BSPEED BSP Sets block speed P BSPEED speed 7-26
BXOR BX Binary XOR O ... BXOR ... 9-8
SHIFT (trans BY X shift, Y shift,
BY BY K 10-35
Z shift)
C (Change) C Changes program to edit E C program name, step number 6-5
C1MOVE pose variable name,
C1MOVE C1 Circular interpolated motion P 7-17
clamp number

A-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

Name Abbreviation Function * Format (Parameter) Page


C2MOVE pose variable name,
C2MOVE C2 Circular interpolated motion P 7-17
clamp number
CALL CA Calls subroutine P CALL program name 7-46
CALLAUX auxiliary function
CALLAUX CALLAUX Displays auxiliary function screen P 7-59
number
CARD_COPY new program
CARD_COPY CARD_COPY Copies programs in PC card M name = source program name + 6-35
...
CARD_FDEL CARD_FDEL Deletes data in PC card M CARD_FDEL file name... 6-32
Displays names of
CARD_FDIR CARD_FDIR M CARD_FDIR 6-25
program/variable in PC card
CARD_FORMAT CARD_FORMAT Formats PC card M CARD_FORMAT 6-41
Loads contents of PC card into
CARD_LOAD CARD_LOAD M CARD_LOAD/Q filename 6-45
robot memory
CARD_RENAME new program
CARD_RENAME CARD_REN Changes program name M 6-33
name = existing program name
Stores program/variable into a CARD_SAVE/SEL filename =
CARD_SAVE CARD_SA M 6-42
PC card program name...
CARD_SAVE/ELOG CARD_SA/ELOG Stores error log into a PC card M CARD_SAVE/ELOG file name 6-43
CARD_SAVE (/P)(/L)(/R)(/S)(/A)
CARD_SAVE/P,L,R, S,A CARD_SA/P,L,R,S,A Stores data into a PC card M 6-43
/SEL file name=program name...
CARD_SAVE/ROB CARD_SA/ROB Stores robot data into a PC card M CARD_SAVE/ROB file name 6-43
CARD_SAVE/SYS CARD_SA/SYS Stores system data into a PC card M CARD_SAVE/SYS file name 6-43
CARD_VERIFY CARD_VERIFY Turns ON/OFF verifying function M CARD_VERIFY mode 6-32
CASE number OF ... VALUE ...
CASE CASE CASE structure P 7-69
END
CCENTER (pose1, pose2,
CCENTER CCENTER Returns the center of arc F 10-39
pose3)
Enables or disables input of
[Link] CH commands from the keyboard S .... [Link].... 8-5
when HOLD/RUN is in HOLD
$CHR $CHR Returns ASCII characters F $CHR (real value) 10-44
Enables/disables resetting of
CHSUM CH M CHSUM 6-104
abnormal check sum error
CLAMP clamp number 1, …,
CLAMP CLAMP Controls open/close clamp signals P 7-92
clamp number 8
CLOSE CLOSE Closes clamp hand P CLOSE clamp number 7-32
CLOSEI CLOSEI Closes clamp hand P CLOSEI clamp number 7-32
CLOSES CLOSES Sets close clamp signal ON/OFF P CLOSES clamp number 7-34
COM COM Binary complement O ... COM ... 9-8
CONTINUE CON Resumes execution M CONTINUE NEXT 6-54
COPY new program name =
COPY COP Copies programs in robot memory M 6-35
source program name + ...
COS COS Returns the cosine value F COS (real value) 10-41
CP CP Continuous path (CP) function S ...CP..... 8-5
CYCLE START switch ON/OFF
CS CS S Switch (CS) 8-9
status
CSHIFT (pose1, pose2, pose3,
CSHIFT CSHIFT Returns the shifted pose F 10-39
object pose BY shift amount)
[Link] CY Stops cycle with External HOLD S .... [Link].... 8-6
D (Delete) D Deletes program steps E D step count 6-10
$DATE $DATE Returns system date F $DATE (date form) 10-52
DECEL DECE Sets deceleration P DECEL speed ALWAYS 7-24
Extracts characters seperated by $DECODE (string variable,
$DECODE $DECODE F 10-47
Specified character separator character, mode)
DECOMPOSE array variable
Extracts components of pose
DECOMPOSE DECO P name [element number] = pose 7-107
variable
variable name
Displays and changes software
DEFSIG DEF M DEFSIG OUTPUT/INPUT 6-87
dedicated signals
DELAY DEL Stops the robot for a given time P DELAY time 7-5

June 10, 2003 A-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

Name Abbreviation Function * Format (Parameter) Page


DELETE DEL Deletes data in memory M DELETE (/P) (/L) (/R) (/S) data, .. 6-30
DELETE DEL Deletes data in memory P DELETE (/P) (/L) (/R) (/S) data, .. 7-121
Returns destination in
DEST DEST F DEST 10-27
transformation values
Returns destination in joint
#DEST #DEST F #DEST 10-27
displacement values
Returns specified element of DEXT (pose variable name,
DEXT DEXT F 10-10
specified pose (location) element number)
DIRECTORY DIR Displays programs/variables DIR (/P)(/L)(/R)(/S) 6-26
Changes the display mode of IO
DISPIO_01 DIS S .... DISPIO_01.... 8-10
command
DISTANCE (transformation
DISTANCE DISTANCE Returns distance F 10-8
value, transformation value)
DLYSIG DL Outputs signal after delay M DLYSIGNAL signal number time 6-112
DLYSIG DL Outputs signal after delay P DLYSIGNAL signal number time 7-75
Executes a single program
DO DO M DO program instruction 6-55
instruction
DO DO DO structure P DO ... UNTIL logical expression 7-65
DRAW X translation,
Moves the robot by the specified Y translation, Z translation,
DRAW DRA P 7-12
amount X rotation, Y rotation, Z rotation,
speed
DRIVE joint number,
DRIVE DRI Moves a single joint P 7-11
displacement, speed
DWRIST DW Changes wrist configuration P DWRIST 7-42
DX DX Returns X component F DX (transformation value) 10-9
DY DY Returns Y component F DY (transformation value) 10-9
DZ DZ Returns Z component F DZ (transformation value) 10-9
E (Exit) E Exits edit mode E E 6-15
EDIT program number, step
EDIT ED Enters edit mode M 6-4
number
ELSE EL IF structure P IF ... ELSE ... END 7-61
Sets deviation range of robot
ENCCHK EMG ENCCHK E M ENCCHK EMG 6-99
pose (location) at E-stop
Sets acceptable encoder value of
ENCCHK PON ENCCHK P M ENCCHK PON 6-100
robot pose (location) at E-stop
$ENCODE $ENCODE Returns string created by print data F $ENCODE (print data, print data) 10-49
END END FOR structure, etc. P FOR ... END, CASE ... END 7-67
ENV DATA ENV Sets hardware environmental data M ENV DATA 6-102
ENV2 DATA ENV2 Sets software environmental data M ENV2 DATA 6-103
ERESET ERE Resets error condition M ERESET 6-94
ERRLOG ERRLOG Displays error log M ERRLOG 6-81
ERROR ERROR Program error status S Switch (ERROR) 8-10
ERROR ERROR Returns error code F ERROR 10-20
$ERROR $ERROR Returns error messages F $ERROR (error code) 10-51
$ERRORS $ERRORS Returns error messages F $ERRORS (error number) 10-51
Executes PC program when an
[Link] ERRS S ...[Link]... 8-9
error occurs
EXECUTE program name,
EXECUTE EX Executes a robot program M 6-50
execution cycles, step number
EXTCALL EX Calls program selected by signals P EXTCALL 7-79
F (Find) F Searches for a string E F character string 6-11
FD_COPY new program
FD_COPY FD_COPY Copies programs on FD M 6-35
name = source program name +
FD_FDEL FD_FDEL Deletes data on FD M FD_FDEL file name, … 6-32
Displays names of program/variable
FD_FDIR FD_FDIR M FD_FDIR 6-25
on FD
FD_FORMAT FD_FORMAT Formats floppy disk M FD_FORMAT format type 6-41
Loads contents of FD into robot
FD_LOAD FD_LOAD M FD_LOAD/Q filename 6-45
memory

A-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

Name Abbreviation Function * Format (Parameter) Page


FD_RENAME new program
FD_RENAME FD_RENAME Changes program name M 6-33
name = existing program name
Stores program/variable onto a FD_SAVE/SEL file
FD_SAVE FD_SA M 6-42
floppy disk name =program name...
FD_SAVE/ELOG FD_SA/ELOG Stores error log onto floppy disk M FD_SAVE/ELOG file name 6-43
FD_SAVE (/P)(/L)(/R)(/S)(/A)
FD_SAVE/P,L,R,S,A FD_SA/P... Stores data onto floppy disk M 6-43
/SEL file name=program name...
FD_SAVE/ROB FD_SA/ROB Stores robot data onto floppy disk M FD_SAVE/ROB file name 6-43
FD_SAVE/SYS FD_SA/SYS Stores system data onto floppy disk M FD_SAVE/SYS file name 6-43
FD_VERIFY FD_VERIFY Turns ON/OFF verifying function M FD_VERIFY mode 6-32
FLOWRATE FLOWRATE Changes flow rate control mode S ... FLOWRATE ... 8-11
FOR loop=start TO end STEP
FOR FOR FOR structure P 7-67
value
Returns the transformation values
FRAME FRAME F FRAME (x1, x2, y, origin) 10-28
for frame coordinates
FREE FR Displays size of free memory M FREE 6-73
GOTO G Jumps to label P GOTO label IF condition 7-44
GUNOFF GUNOFF Sets gun signals OFF P GUNOFF gun number, distance 7-35
GUNOFFTIMER gun number,
GUNOFFTIMER GUNOFFTIMER Controls gun output OFF timing P 7-36
time
GUNON GUNON Sets gun signals ON P GUNON gun number, distance 7-35
GUNONTIMER GUNONTIMER Controls gun output ON timing P GUNONTIMER gun number, time7-36
HALT HA Stops execution P HALT 7-54
Displays a list of AS commands
HELP HEL M HELP 6-95
and instructions
Displays a list of instructions
HELP/DO HEL/DO M HELP/DO 6-95
usable with DO command
HELP/F HEL/F Displays a list of functions M HELP/F 6-95
HELP/M HEL/M Displays a list of monitor commands M HELP/M 6-95
Displays a list of commands
HELP/MC HEL/MC M HELP/MC 6-95
usable with MC instructions
Displays a list of program
HELP/P HEL/P M HELP/P 6-95
instrucitons
Displays a list of instructions
HELP/PPC HEL/PPC M HELP/PPC 6-95
usable in PC programs
HELP/SW HEL/SW Displays a list of system switches M HELP/SW 6-95
HERE HE Records current pose M HERE pose variable name 6-57
HERE HE Records current pose P HERE pose variable name 7-103
Returns transformation value for
HERE HERE F HERE 10-31
current pose
Returns joint displacement value
#HERE #HERE F #HERE 10-31
for current pose
HMOVE pose variable name,
HMOVE HM Moves in hybrid motion P 7-14
clamp number
HOLD HO Stops execution M HOLD 6-53
Enables display of the step in
[Link] [Link] S .... [Link].... 8-10
execution when the program is held
HOME HO Moves to home position P HOME position number 7-10
#HOME #HOME Returns the home position F #HOME (home position number) 10-38
Assigns signal numbers to operate
HSETCLAMP HSETCLAMP M HSETCLAMP 6-87
clamps
I (Insert) I Inserts new steps E I 6-9
ID ID Displays software version info. M ID 6-97
IF IF Jumps to label when condition is met P IF condition GOTO label 7-45
IF IF IF structure P IF...THEN ... ELSE ... END 7-61
IFWPRINT window, row, column,
Displays string in string
IFPWPRINT IFPWPRINT M background color, label 6-125
window set by aux. function
color = "character string", …

June 10, 2003 A-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

Name Abbreviation Function * Format (Parameter) Page


IFWPRINT window, row, column,
Displays string in string
IFPWPRINT IFPWPRINT P background color, label 7-99
window set by aux. function
color = "character string", …
IGNORE IG Cancel ON or ONI instruction P IGNORE signal number 7-84
INPUT I Software dedicated input signals K DEFSIG INPUT 6-87
Returns the result of motion range INRANGE (pose variable, joint
INRANGE INRANGE F 10-22
check displacement values)
Returns the starting point of the INSTR (starting point, string 1,
INSTR INSTR F 10-16
specified string string 2)
Returns the integer value of a
INT INT F INT (numeric expression) 10-17
numeric expression
IO IO Displays signal states M IO/E signal number 6-72
Displays peak current value for
IPEAKCLR IPEAKCLR M IPEAKCLR 6-106
each joint
IPEAKLOG IPEAKLOG Displays peak current value log M IPEAKLOG 6-106
Approaches pose (location) in joint JAPPRO pose variable name,
JAPPRO JA P 7-6
interpolated motion distance

Withdraws from current pose


JDEPART JD P JDEPART distance 7-8
(location) in joint interpolated motion
JMOVE pose variable name,
JMOVE JM Starts joint interpolated motion P 7-4
clamp number
KILL KI Initialize program stack M KILL 6-55
L (Last) L Selects the previous step E L 6-8
Approaches pose (location) in linear LAPPRO pose variable name,
LAPPRO LA P 7-6
interpolated motion distance
Withdraws from current pose
LDEPART LD (location) in linear interpolated P LDEPART distance 7-8
motion
$LEFT (string, number of
$LEFT $LEFT Returns the leftmost characters F 10-45
characters)
LEFTY LE Changes to left-hand configuration P LEFTY 7-40
LEN LEN Returns number of characters F LEN (string) 10-11
LIST LI Displays data or program listing M LIST (/P)(/L)(/R)(/S) prog/data... 6-28
LLIMIT LL Sets lower limit of robot motion M LLIMIT joint displacement values 6-75
LLIMIT LL Sets lower limit of robot motion P LLIMIT joint displacement values 7-111
LMOVE pose variable name,
LMOVE LM Starts linear interpolated motion P 7-4
clamp number
Loads contents of PC into robot
LOAD LOAD M LOAD/Q filename 6-45
memory
LOCK LO Changes priority P LOCK priority 7-52
LSTRACE stepper number:
LSTRACE LSTRACE Displays the logging data M 6-38
logging number
M/existing characters/new
M (Modify) M Modifies characters E 6-12
characters
MAXVAL (real value1,
MAXVAL MAXVAL Returns the largest value F 10-17
real value 2, …)
Executes monitor commands from
MC MC P MC monitor commands 7-117
PC programs
MESSAGES ME Enables or disables terminal output S ...MESSAGES... 8-6
$MID (string, real value, number
$MID $MID Returns characters F 10-46
of characters)
MINVAL (real value1, real
MINVAL MINVAL Returns the smallest value F 10-17
value 2, …)
MM/MIN MM/M Millimeters per minute K ... MM/M 7-20
MM/S MM/S Millimeters per second K ... MM/S 7-20
MOD MOD Remainder O ... MOD ... 9-3
MSPEED MSPEED Returns the current monitor speed F MSPEED 10-21
MSPEED2 MSPEED2 Returns the current monitor speed F MSPEED2 10-21

A-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

Name Abbreviation Function * Format (Parameter) Page


MSTEP program name,
MSTEP MS Executes a single robot motion M 6-52
execution cycles, step number
Waits until given time or distance
MVWAIT MVWAIT P MVWAIT value 7-50
is reached
NCHOFF NCHOFF Sets notch filter OFF P NCHOFF 7-115
NCHON NCHON Sets notch filter ON P NCHON 7-115
NEXT N Skips to next step K CONTINUE NEXT 6-54
NOT NOT Logical NOT O ... NOT ... 9-5
NULL NULL Returns null transformation values F NULL 10-31
O (Oneline) O Places the cursor on current line E O 6-14
OFF OF Sets system switches OFF M switch name ... OFF 6-83
OFF OF Sets system switches OFF P switch name ... OFF 7-114
OFF OFF Returns FALSE value F ... OFF ... 10-13
ON ON Sets system switches ON M switch name.... ON 6-83
ON ON Sets system switches ON P switch name.... ON 7-114
ON mode signal number CALL
ON ON Sets interruption condition P 7-81
program name, priority
ON mode signal number GOTO
ON ON Sets interruption condition P 7-81
label, priority
ON ON Returns TRUE value F ... ON ... 10-12
Calls specified program when error
ONE ONE P ONE program name 7-57
occurs
ONI mode signal number CALL
ONI ONI Sets interruption condition P 7-81
program name, priority
ONI mode signal number GOTO
ONI ONI Sets interruption condition P 7-81
label, priority
OPEINFO robot number: joint
OPEINFO OPEINFO Displays operation information M 6-107
number
OPEINFOCLR OPEINFOCLR Resets operation information M OPEINFOCLR 6-108
OPEN OPEN Opens clamps P OPEN clamp number 7-30
OPENI OPENI Opens clamps P OPENI clamp number 7-30
OPENS OPENS Sets open clamp signal ON/OFF P OPENS clamp number 7-34
OPLOG OP Displays history of operations M OPLOG 6-81
OR OR Logical OR O ... OR ... 9-5
OUTPUT O Software dedicated output signals K DEFSIG OUTPUT 6-87
Sets the timing of OUTPUT
[Link] OX S .... [Link].... 8-7
signal generation
P (Print) P Displays program steps E P step count 6-7
PAUSE PA Stops execution temporarily P PAUSE 7-54
PCABORT PCA Stops execution of PC program M PCABORT PC program number: 11-6
PCABORT PCA Stops execution of PC program P PCABORT PC program number: 11-6
PCCONTINUE PC program
PCCONTINUE PCC Resumes execution of PC program M 11-8
number NEXT
PCEND PC program number:
PCEND PCEN Stops execution of PC program M 11-7
task number
PCEND PC program number:
PCEND PCEN Stops execution of PC program P 11-7
task number
PCEXECUTE PC program
PCEXECUTE PCEX Executes PC program M number, program name, 11-5
execution cycle, step number
PCEXECUTE PC program
PCEXECUTE PCEX Executes PC program P number, program name, 11-5
execution cycle, step number
PCKILL PCK Initializes PC program stack M PCKILL PC program number: 11-6
Sets cycle time for PC program
PCSCAN PCSC P PCSCAN time 11-10
execution
PCSTATUS PCSTA Displays status of PC program M PCSTATUS PC program number 11-4
PCSTEP PC program number:
Executes single step of a PC
PCSTEP PCSTE M program name, execution 11-9
program
cycles, step number
PI PI Returns the constant F PI 10-41

June 10, 2003 A-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

Name Abbreviation Function * Format (Parameter) Page


Returns value of input data as a
PLCAIN PLCAIN F PLCAIN (data number) 10-20
whole number
Sets specifed real number value to PLCAOUT data number =
PLCAOUT PLCAOUT M 6-105
data number real value
Sets real number values to data PLCAOUT data number =
PLCAOUT PLCAOUT P 7-118
number real value
POINT pose variable name=
POINT PO Defines pose (location) variable M pose values, joint displacement 6-60
values

POINT pose variable name1=


POINT PO Defines pose (location) variable P pose variable name2, joint 7-104
displacement values

POINT/7 transformation
POINT/7 PO/7 Assigns the value of joint 7 M variable name = transformation 6-63
values

POINT/7 transformation variable


POINT/7 PO/7 Assigns the value of joint 7 P name = transformation variable 7-105
name2

POINT/A transformation variable


POINT/A PO/A Assigns A component value M 6-63
name = transformation values

POINT/A transformation variable


POINT/A PO/A Assigns A component value P name 1 = transformation variable 7-105
name2

POINT/O transformation variable


POINT/O PO/O Assigns O component value M 6-63
name = transformation values

POINT/O transformation variable


POINT/O PO/O Assigns O component value P name 1= transformation variable 7-105
name2
POINT/OAT transformation
Assigns O, A and T component
POINT/OAT PO/OAT M variable name = transformation 6-63
values
values
POINT/OAT transformation
Assigns O, A and T component
POINT/OAT PO/OAT P variable name 1 = transformation 7-105
values
variable name2

POINT/T transformation variable


POINT/T PO/T Assigns T component value M 6-63
name = transformation values

POINT/T transformation variable


POINT/T PO/T Assigns T component value P name1 = transformation variable 7-105
name2

POINT/X transformation variable


POINT/X PO/X Assigns X component value M 6-63
name = transformation values

POINT/X transformation variable


POINT/X PO/X Assigns X component value P name1 = transformation variable 7-105
name2

POINT/Y transformation variable


POINT/Y PO/Y Assigns Y component value M 6-63
name = transformation values

POINT/Y transformation variable


POINT/Y PO/Y Assigns Y component value P name1 = transformation variable 7-105
name2

POINT/Z transformation variable


POINT/Z PO/Z Assigns Z component value M 6-63
name = transformation values

A-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

Name Abbreviation Function * Format (Parameter) Page


POINT/Z transformation variable
POINT/Z PO/Z Assigns Z component value P name1 = transformation variable 7-105
name2
MOTOR POWER switch ON/OFF
POWER POWER S switch (POWER) 8-9
status
#PPOINT #PPOINT Returns joint displacement values F #PPOINT (jt1,jt2,jt3,jt4,jt5,jt6) 10-34
Enables or disables early
[Link] PR S .... [Link].... 8-7
processing of I/O signals
PRIME program, execution
PRIME PRIM Sets up for program execution M 6-49
cycles, step number
PRINT device number:
PRINT PRIN Displays data on the terminal M 6-122
print data, …
PRINT device number:
PRINT PRIN Displays data on the terminal P 7-94
print data, …
PRIORITY PRIORITY Returns priority number F PRIORITY 10-21
Displays message on terminal PROMPT device number:
PROMPT PROMPT P 7-97
and waits for input character string, variables
PULSE PU Sets signal ON for specified time M PULSE signal number, time 6-112
PULSE PU Sets signal ON for specified time P PULSE signal number, time 7-74
Tool transformation during block
QTOOL Q S .... QTOOL.... 8-8
teaching
R (Replace) R Replaces characters E R character string 6-13
Returns random number
RANDOM RANDOM F RANDOM 10-42
from 0 to 1
Enables/disables
REC ACCEPT REC RECORD/PROGRAM CHANGE M REC_ACCEPT 6-101
function
Sets clamp signals OFF
RELAX RELAX P RELAX clamp number 7-33
(close and open)
Sets clamp signals OFF
RELAXI RELAXI P RELAXI clamp number 7-33
(close and open)
Sets clamp signal ON/OFF
RELAXS RELAXS P RELAXS clamp number 7-34
(close and open)
RENAME new program name =
RENAME REN Changes program name M 6-33
existing program name
Sets if repeat cycle to once or
REP_ONCE REP S ...REP ONCE.. 8-8
continuous
TEACH/REPEAT switch ON/OFF
REPEAT REPEAT S switch (REPEAT) 8-10
status
RESET RES Sets all external output signals OFF M RESET 6-110

RESET RES Sets all external output signals OFF P RESET 7-73
Releases memory set aside by
RESTRACE RESTRACE M RESTRACE 6-37
SETTRACE
RETURN RET Returns to the caller program P RETURN 7-47
RETURNE RETURNE Returns to step after the error P RETURNE 7-59
RGSO RGSO Servoing switch ON/OFF status S switch (RGSO) 8-9
$RIGHT (string, number of
$RIGHT $RIGHT Returns the rightmost characters F 10-45
characters)
Changes to right-hand
RIGHTY RI P RIGHTY 7-40
configuration
RPS RP Calls program selected by signals S .... RPS.... 8-8
RUN RUN HOLD/RUN switch status S switch (RUN) 8-10
RUNMASK start number,
RUNMASK RU Masks signals P 7-76
number of signals
RX RX Rotation about X Axis F RX (angle) 10-33
RY RY Rotation about Y Axis F RY (angle) 10-33
RZ RZ Rotation about Z Axis F RZ (angle) 10-33
S (Step) S Selects program step E S step number 6-6
Stores program/variable onto a PC SAVE/SEL filename =program
SAVE SA M 6-42
card name...

June 10, 2003 A-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

Name Abbreviation Function * Format (Parameter) Page


SAVE/ELOG SA/ELOG Stores error log onto PC card M SAVE/ELOG file name 6-43
SAVE (/P)(/L)(/R)(/S)(/A)/SEL
SAVE/P,L,R,S,A SA/P... Stores data onto PC card M 6-43
file name=program name...
SAVE/ROB SA/ROB Stores robot data onto PC card M SAVE/ROB file name 6-43
SAVE/SYS SA/SYS Stores system data onto PC card M SAVE/SYS file name 6-43
SCALL SCA Jumps to subroutine P SCALL string expression, variable7-56
SCNT counter signal number =
Outputs counter signal when count up signal, count down
SCNT SCN M 6-114
counter value is reached signal, counter clear signal,
counter value
SCNT counter signal number =
Outputs counter signal when count up signal, count down
SCNT SCNT P 7-85
counter value is reached signal, counter clear signal,
counter value
SCNTRESET counter signal
SCNTRESET SCNTR Resets internal counter value M 6-115
number
SCNTRESET counter signal
SCNTRESET SCNTR Resets internal counter value P 7-86
number
SCREEN SC Control terminal display S .... SCREEN.... 8-8
SETHOME SETH Defines home position 1 M SETHOME accuracy, HERE 6-80
SET2HOME SET2 Defines home position 2 M SET2HOME accuracy, HERE 6-80
Sets time to start clamp close
SETPICK SETPICK M SETPICK time1,…, time8 6-120
control
Sets time to start clamp close
SETPICK SETPICK P SETPICK time1,…, time8 7-91
control
Sets time to start clamp open
SETPLACE SETPLACE M SETPLACE time1,…, time8 6-120
control
Sets time to start clamp open
SETPLACE SETPLACE P SETPLACE time1,…, time8 7-91
control
Reserves necessary memory to
SETTRACE SETTRACE M SETTRACE step count 6-37
log data
Sets signal ON/OFF in specified
SFLK SFLK M SFLK signal number = time 6-115
cycle time
Sets signal ON/OFF in specified
SFLK SFLK P SFLK signal number = time 7-86
cycle time
SFLP output signal = set signal
Sets signal ON/OFF using
SFLP SFLP M expression, reset signal 6-116
set/reset signal
expression
SFLP output signal = set signal
Sets signal ON/OFF using
SFLP SFLP P expression, reset signal 7-87
set/reset signal
expression

Returns shifted transformation SHIFT (trans BY X shift, Y shift,


SHIFT SHIFT F 10-35
values Z shift)
Returns logical AND of signal
SIG SIG F SIG (signal number, …) 10-4
states
SIGNAL SIG Sets signals ON/OFF M SIGNAL signal number.... 6-111
SIGNAL SIG Sets signals ON/OFF P SIGNAL signal number.... 7-73
SIN SIN Returns the sine value F SIN (real values) 10-41
Sets the repeat speed in slow
SLOW REPEAT SL M SLOW REPEAT 6-100
repeat mode
Enables or disables the slow start
SLOW_START SLOW_START S ...SLOW_START... 8-12
function
Outputs signal when condition is SOUT signal number = signal
SOUT SO M 6-117
met expression
Outputs signal when condition is SOUT signal number = signal
SOUT SO P 7-88
met expression
$SPACE $SPACE Returns blanks F $SPACE (number of blanks) 10-44
SPEED SP Sets monitor speed M SPEED monitor speed 6-48

A-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

Name Abbreviation Function * Format (Parameter) Page


SPEED speed, rotational speed,
SPEED SP Sets program speed P 7-20
ALWAYS
SQRT SQRT Returns the square root F SQRT (real values) 10-41
Holds robot motion for the specified
STABLE STA P STABLE time 7-5
time
STATUS STA Displays system status M STATUS 6-68
Executes a single step of a STEP program name,execution
STEP STE M 6-52
program cycles, step number
STIM timer signal = input signal
STIM STI Sets timer signal ON M 6-119
number, time
STIM timer signal = input signal
STIM STI Sets timer signal ON P 7-90
number, time
STOP STO Terminates execution cycle P STOP 7-55
Sets the execution as one step at
STP_ONCE ST S ...STP_ONCE... 8-8
a time or continuous
STPNEXT STPNEXT Executes the next step M STPNEXT 6-55
SWAIT SW Waits for specified signal state P SWAIT signal number,… 7-78
SWITCH switch name...=
SWITCH SW Sets system switches M 6-82
ON (=OFF)
SWITCH SWITCH Returns condition of system switch F SWITCH (switch name) 10-18
SYSDATA SYSDATA Returns parameters F SYSDATA (keyword, opt1) 10-24
SYSINIT SY Initialize system M SYSINIT 6-94
Enables teaching by TP in editor
T (Teach) T E T variable name 6-21
mode
Returns execution status of
TASK TASK F TASK (task number) 10-18
program
TDRAW X translation,
Moves the robot by the specified Y translation, Z translation,
TDRAW TDRA P 7-12
amount of the tool coordinates X rotation, Y rotation, Z rotation,
speed
TEACH TE Teaches pose M TEACH pose variable name 6-65
TEACHLOCK switch ON/OFF
TEACH_LOCK TEACH_LOCK S switch (TEACH LOCK) 8-9
status
IF logical expression
THEN THEN IF structure K 7-61
THEN ... ELSE ... END
TIME TI Sets and displays date and time M TIME yy-mm-dd hh:mm:ss 6-74
$TIME $TIME Returns system time F $TIME 10-52
TIMER TI Sets timer P TIMER number = time 7-112
TIMER TIMER Returns timer value F TIMER (timer number) 10-7
TO TO FOR structure K FOR ... TO ... END 7-67
TOOL TOOL Defines tool transformation values M TOOL transformation values 6-79
TOOL TOOL Defines tool transformation values P TOOL transformation values 7-110
TOOL TOOL Returns tool transformation values F TOOL 10-37
TPLIGHT TPLIGHT Sets the TP backlight ON M TPLIGHT 6-106
TPLIGHT TPLIGHT Sets the TP backlight ON P TPLIGHT 7-119
TRACE stepper number:
TRACE TRACE Logs and traces programs M 6-36
ON/OFF
TRACE stepper number:
TRACE TRACE Logs and traces programs P 7-122
ON/OFF
Returns the sum of traverse axis
TRADD TRADD F TRADD (transformation values) 10-37
and transformation values
TRANS TRANS Returns transformation values F TRANS (X, Y, Z, O, A, T) 10-33
TRIGGER TRIGGER TRIGGER switch ON/OFF status S switch (TRIGGER) 8-9
Returns the difference of traverse
TRSUB TRSUB F TRSUB (transformation values) 10-37
axis and transformation values
TWAIT TW Wait for specified time P TWAIT time 7-49
TYPE device number: print
TYPE TY Displays data on the terminal M 6-122
data, …

June 10, 2003 A-11


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

Name Abbreviation Function * Format (Parameter) Page


TYPE device number: print data,
TYPE TY Displays data on the terminal P 7-94

ULIMIT UL Sets lower limit of robot motion M ULIMIT joint displacement values 6-75
ULIMIT UL Sets lower limit of robot motion P ULIMIT joint displacement values 7-111
UNTIL U DO structure P DO ... UNTIL logical expression
UTIMER @timer variable = timer
UTIMER UTIMER Sets user timer P 7-113
value
UTIMER UTIMER Returns value of timer variable F UTIMER (@timer) 10-21
UWRIST UW Changes wrist configuration P UWRIST 7-42
VAL VAL Returns real value F VAL (string, code) 10-14
WAIT WA Waits for specified condition P WAIT condition 7-48
WEIGHT WE Sets load mass data M WEIGHT load mass, x, y, z 6-98
WEIGHT WE Sets load mass data P WEIGHT load mass, x, y, z 7-116
Displays current robot pose
WHERE W M WHERE display mode 6-70
(location)
WHILE WH DO structure P WHILE ... DO ... END 7-63
[Link] [Link] Changes the weld processing S ...[Link]... 8-11
Changes the output timing of WS
WS_COMPOFF WS_COMPOFF S ...WS_COMPOFF... 8-11
signal
XD (Cut) XD Cuts step and places in buffer E XD step count 6-16
XFER destination program
name,step number 1 = source
XFER XF Copies and transfers steps M 6-34
program name, step number 2,
step count
XMOVE mode pose name TILL
XMOVE XM Moves until the signal changes P 7-15
signal number
XOR XOR Exclusive logical OR O XOR 9-5
XP (Paste) XP Inserts contents of paste buffer E XP 6-18
Inserts contents of paste buffer in
XQ (Paste Reverse) XQ E XQ 6-19
reverse order
XS (Display Clipboard) XS Displays contents of paste buffer E XS 6-20
XY (Copy) XY Copies step and pastes in the buffer E XY step count 6-17
ZSIGSPEC ZSIG Sets number of installed signals M ZSIGSPEC 6-84
ZZERO ZZE Sets zeroing data M ZZERO 6-90
FALSE FALSE Returns FALSE value F ... FALSE ... 10-13
TRUE TRUE Returns TRUE value F ... TRUE ... 10-12
– – Subtraction O ....–... 9-3
* * Multiplication O .... * ... 9-3
/ / Division O .... / ... 9-3
^ ^ Power O .... ^ ... 9-3
+ + Addition O .... + ... 9-3
+ + String concatenation O .... + ... 9-13
< < Less than O .... < ... 9-4
<= <= Less than or equal to O .... <= ... 9-4
<> <> Not equal to O .... <> ... 9-4
=< =< Less than or equal to O .... =< ... 9-4
== == Equal to O .... = ... 9-4
=> => Greater than or equal to O .... => ... 9-4
> > Greater than O .... > ... 9-4
>= >= Greater than or equal to O .... >= ... 9-4

A-12 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

A.2 AMERICAN STANDARD CODE FOR INFORMATION INTERCHANGE SET

The following table lists the entire American Standard Code for Information Interchange
(ASCII) character set. All the characters from SP (octal 040) through “~” (octal 176) can
be used as ASCII constants or within text strings. The characters with octal values from
0 to 40 and the value 177, are non-printing control characters with the meanings given
in the table.

ASCII Octal Decimal Meaning of


Character Value Value Control Character

NUL 000 000 Null


SOH 001 001 Start of heading
STX 002 002 Start of text
EXT 003 003 End of text
EOT 004 004 End of transmission
ENQ 005 005 Enquiry
ACK 006 006 Acknowledgment
BEL 007 007 Bell
BS 010 008 Backspace
HT 011 009 Horizontal tab
LF 012 010 Line feed
VT 013 011 Vertical tab
FF 014 012 Form feed
CR 015 013 Carriage return
SO 016 014 Shift out
SI 017 015 Shift in
DLE 020 016 Data link escape
DC1 021 017 Direct control 1
DC2 022 018 Direct control 2
DC3 023 019 Direct control 3
DC4 024 020 Direct control 4
NAK 025 021 Negative acknowledge
SYN 026 022 Synchronous idle
ETB 027 023 End of transmission block
CAN 030 024 Cancel
EM 031 025 End of medium
SUB 032 026 Substitute
ESC 033 027 Escape
FS 034 028 File separator
GS 035 029 Group separator
RS 036 030 Record separator
US 037 031 Unit separator
SP 040 032 Space

June 10, 2003 A-13


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

ASCII Octal Decimal ASCII Octal Decimal


Character Value Value Character Value Value

! 041 033 P 120 080


“ 042 034 Q 121 081
# 043 035 R 122 082
$ 044 036 S 123 083
% 045 037 T 124 084
& 046 038 U 125 085
‘ 047 039 V 126 086
( 050 040 W 127 087
) 051 041 X 130 088
* 052 042 Y 131 089
+ 053 043 Z 132 090
‘ 054 044 [ 133 091
- 055 045 \ 134 092
ù 056 046 ] 135 093
/ 057 047 ^ 136 094
0 060 048 - 137 095
1 061 049 ‘ 140 096
2 062 050 a 141 097
3 063 051 b 142 098
4 064 052 c 143 099
5 065 053 d 144 100
6 066 054 e 145 101
7 067 055 f 146 102
8 070 056 g 147 103
9 071 057 h 150 104
: 072 058 i 151 105
; 073 059 j 152 106
< 074 060 k 153 107
= 075 061 l 154 108
> 076 062 m 155 109
? 077 063 n 156 110
@ 100 064 o 157 111

A-14 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

ASCII Octal Decimal ASCII Octal Decimal


Character Value Value Character Value Value

A 101 065 p 160 12


B 102 066 q 161 113
C 103 067 r 162 114
D 104 068 s 163 115
E 105 069 t 164 116
F 106 070 u 165 117
G 107 071 v 166 118
H 110 072 w 167 119
I 111 073 x 170 120
J 112 074 y 171 121
K 113 075 z 172 122
L 114 076 { 173 123
M 115 077 l 174 124
N 116 078 } 175 125
O 117 079 ~ 176 126

DEL 177 127 Delete

June 10, 2003 A-15


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

A.3 AS LANGUAGE SIGNAL USAGE LIMITATIONS

Table A-1 describes the signal usage limitations for the listed commands/instructions.

Table A-1 Signal Usage Limitations

Command/
Instruction * Output Signals Input Signals Internal Signals
1
BITS M/P 1–maximum signal NA 2001–2256
BITS F 1–maximum signal1 NA 2001–2256
DEFSIG M 1–maximum signal1 1001–maximum signal1 NA
2
DLYSIG M/P 1–32/64 NA 2001–2256
ON/ONI P NA 1001–1032/10643 2001–2256
PULSE M/P 1–32/642 NA 2001–2256
2
RUNMASK P 1–32/64 NA 2001–2256
2
SIGNAL M/P 1–32/64 NA 2001–2256
SIG F 1–maximum signal1 1001–maximum signal1 2001–2256
1 1
SWAIT P 1–maximum signal 1001–maximum signal 2001–2256
– 3
XMOVE P NA 1001 1032/1064 2001–2256
* M–Monitor Command P–Program Instruction F–Function
1
Standard = 32 Optional = 64, 96, 128
2
Standard = 32 Optional = 64
3
Standard = 32 (1001–1032) Optional = 64 (1001–1064)

A-16 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

A.4 EULER’S O, A, T ANGLES

This section describes the method used to derive O, A, T angles. Refer to figure A-1
during this discussion.

The posture of a coordinate system represented by Σ (x, y, z) with respect to the base
coordinate system resented by Σ (X, Y, Z) is expressed using Euler’s O, A, T angles.
The two coordinate systems Σ (x, y, z) and Σ (X, Y, Z) are located at the same origin.

O: The angle between the Zz plane and the XZ plane.

A: The angle between the z-axis and the Z-axis.

T: The angle between the x-axis and the X-axis (the X-axis is on the Zz plane and
the angle between this axis and the z-axis is 90 degrees).

These three angles are used to represent the angles of rotations required for the base
coordinate system Σ (X, Y, Z) to coincide with the coordinate system Σ (x, y, z). The
results will be incorrect, if the order of the O, A, T rotation show below is changed.

1. O rotation of the coordinate system Σ (X, Y, Z) around the Z-axis. This rotation re-
orientates Σ (X, Y, Z) to Σ (X, Y, Z).

2. A rotation of the coordinate system Σ (X, Y, Z) around the Y-axis. This rotation re-
orientates Σ (X, Y, Z) to Σ (X, Y, z).

3. T rotation of the coordinate system Σ (X, Y, z) around the z-axis. This rotation re-
orientates Σ (X, Y, z) to Σ (x, y, z).

z
A

X T
O O Y9
AT
X9 Y

x
X0

Figure A-1 Euler’s O, A, T Angles

June 10, 2003 A-17


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

APPENDIX

This rotation can be considered in terms of polar coordinate values. If point P is on the
z-axis at the distance “d” from the origin, it is written as (d, A, O), then O and A in these
coordinate values are equal to O and A as described above. The direction of the z-axis
is expressed by these two values (O and A).

A-18 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

GLOSSARY ................................................................................................................ G-2

June 10, 2003 G-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

This glossary contains definitions of terms used by operators, programmers, and main-
tenance personnel who work with Kawasaki robots. The definitions are listed in alpha-
betical order.

A
• ACCELERATE
To speed up a process.

• ACCURACY
A measure of the difference between the commanded robot arm position and the
actual position. Also identifies how well an indicated value conforms to a true value
(i.e., an actual or accepted standard value).

• ACRONYM
A word formed from the initial letters of words in a name or phrase. For example,
ASCII is an acronym for American Standard Code for Information Interchange.

• ADDRESS
A number that identifies a specific location in the computer’s or processor’s memory.
Means of identifying a location or data in a control system.

• ADDRESSING
Computer operations store data in specific memory locations or addresses. The
largest memory location determines the amount of data that can be stored. The
larger the number, the larger the possible program.

• AIR CUT
Moving a weld gun into position but without generating an arc.

• ALGORITHM
A finite set of well-defined rules or procedures for solving a problem step-by-step.

• ALPHANUMERIC
Pertaining to a set of symbols that contain both letters and numbers, either individu-
ally or in combination.

• AMBIENT TEMPERATURE
The temperature of air or liquid that surrounds a device.

• AMPERE (AMP)
A unit of electrical current flow that is equivalent to one (1) coulomb per second.
One (1) volt across one (1) ohm of resistance causes a current flow that is equiva-
lent to one (1) amp.

G-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• ANALOG
A continuously changing electrical voltage signal. In robot systems, the magnitude
or value of the signal represents commanded robot axis motion.

• ANALOG DATA
Information that is represented by a characteristic of the value or magnitude of an
electrical signal, such as the amplitude, phase, or frequency of the voltage, the
amplitude or duration of a pulse, the angular position of a shaft, or the pressure of a
fluid number.

• ANTI-FRICTION BEARING
A rolling element which is used to support a rotating shaft.

• ARC SENSOR
A sensor that detects weld lines utilizing arc characteristics.

• ARGUMENT
A value applied to a procedure; data used by a function or other command. For
instance, in the AS command JMOVE flange, 2. The variable, flange, and the clamp
number 2 are the arguments of the function JMOVE.

• ARRAY
An ordered set of addresses or their values. Elements of an array can be refer-
enced individually or collectively. Array elements all have the same type of data, for
instance, integer or character, and are usually presented in rows and columns.

• ARTICULATED
To join together permanently or semi-permanently by means of a pivot connection
for operating separate segments as a unit.

• ARTICULATED ROBOT
A robot arm which contains at least two consecutive revolute joints, acting around
parallel axes, resembling human arm motion. The work envelope is formed by
partial cylinders or spheres. The two basic types of articulated robots, vertical and
horizontal, are sometimes called anthropomorphic because of the resemblance to
the motions of the human arm.

• ASCII
An acronym for American Standard Code for Information Interchange. This stan-
dard 8-bit code is used by many devices, such as keyboards and printers.

• AS LANGUAGE
Kawasaki robot language used to communicate commands and instructions from a
keyboard to the CPU.

June 10, 2003 G-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• ASSIGNMENT
An instruction used to express a sequence of operations, or used to assign oper-
ands to specified variables, or symbols, or both.

• ASYNCHRONOUS
A means of data communication where the data is sent a character at a time pre-
ceded by a start bit and followed by a stop bit. No direct timing signal links the
transmitter and receiver.

• AUXILIARY DATA
Information about a point, other than the positional data, such as speed, accuracy,
weld schedule and clamp condition.

• AXIS
A straight line about which sections of the mechanical unit rotate (e.g., joints JT1,
JT2, JT3 etc.).

B
• BACKLASH
The clearance, slack, or play between adjacent gears, or the jar or reaction often
caused by such clearance when the parts are suddenly put in action or are in ir-
regular action.

• BASE COORDINATE
A fixed coordinate system having an origin at the intersection of the X, Y, and Z
axes.

• BAUD RATE
Determines the number of bits per second (bps) or characters transmitted between
devices.

• BCD
An abbreviation for binary coded decimal. The BCD 8-4-2-1 code expresses each
decimal digit by its own 4-bit binary equivalent. The 8-4-2-1 code is identical to
binary through the decimal number 9. Above the decimal number 9 each decimal
digit is represented by its own 4-bit binary equivalent. For example, using the 8-4-2-
1 binary-coded system, the number 10 is interpreted as 0001 0000.

• BINARY CODE
A system in which characters are represented by a group of binary digits, that have
the value of either 0 or 1, true or false, on or off.

G-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• BIT
Acronym for binary digit, having one of two values: 0 or 1.

• BOOT
The method by which computers are brought from a non-operating to an operating
state. During this sequence, the computer memory is usually reset. This is often
performed to restart the computer after a crash, to bring it on-line.

• BUFFER
A temporary memory storage area in a computer or electronic device.

• BUG
A problem in a software or hardware element of a system.

• BUS
The primary communication path in the controller along which internal signals are
sent among processors and memories.

C
• CABLE CARRIER
A device which carries cables and hoses (including power sources) from a station-
ary location to a linear moving device.

• CARTESIAN COORDINATE
A location in space defined by three axes at right angles to each other, commonly
labeled X, Y, Z.

• cc
Abbreviation for cubic centimeter.

• CELL
A manufacturing unit consisting of two or more work stations or machines, and the
material transport mechanisms and storage buffers that interconnect them.

• CENTER OF GRAVITY
The point at which the entire weight of a body may be considered as concentrated,
so that if supported at this point the body would remain in equilibrium in any posi-
tion.

• CHARACTER
A term that describes all numbers, letters, and other symbols typically found on a
computer keyboard.

June 10, 2003 G-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• CHECK MODE
A procedure that allows the user to check positional data and auxiliary data while in
the teach mode with the Kawasaki robot . This procedure is in many ways analo-
gous to reverse point and forward point operations in other robot models.

• CHECKSUM
A method by which the contents of data or a transmission are verified to be accu-
rate. This method ‘sums’ all the characters and translates them into a number which
is appended to the data.

• CHEMICAL ANCHOR
A threaded rod installed in a structure (e.g., a concrete floor) and secured by epoxy,
for the purpose of securing hardware.

• CIRCULAR INTERPOLATION
A path taken by the robot that connects at least three points with an arching motion.
The CPU will calculate a path that places the taught points on a section of a circle.

• CLOSED-LOOP SYSTEM
A system in which a command value is output and a feedback value is returned.
The resulting error, the difference between the command and the feedback, is used
to correct the signal. In a robot system, the command signal is output by the con-
troller, causing the robot arm to move, and the feedback signal is produced by the
encoder, which reads the current position of the arm.

• CODE
A set of rules for expressing information in a language that is understood and pro-
cessed by a control system.

Also, a term for instructions in a computer program. Code performs a process, and
data is the information that is processed.

• COMMAND
An analog signal, or group of signals or pulses, which cause a specified function to
be performed. An instruction or request in a computer program that performs a
particular action. Commands that are needed to run the operating system are
called a command language.

• COMMENT
Optional, non-executing remarks added to a program to explain various aspects of
the program.

G-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• COMPILER
A system task that translates a program written in source code, into binary code
that can be understood by the processor.

• COMPOUND TRANSFORMATION
A location in the Cartesian coordinate system that is defined relative to another
Cartesian coordinate location.

• CONTIGUOUS FILE
A file that is stored in continuously adjacent areas of memory, in contrast to a file
which is scattered to make more efficient use of disk space.

• CONTINUOUS PATH CONTROL


A type of robot control in which the robot moves according to a replay of closely
spaced points programmed on a constant time base during teaching.

• CONTROL ERROR CODE


A code which identifies system problems whenever an alarm condition occurs.

• CONTROLLED AXIS
A robot axis that is operated by electrical or hydraulic power.

• CONTROLLER
An electronic device, with processing capabilities and software, which controls the
robot actions and functions.

• CONVEYER TRACKING
Used to make the robot follow a part on a conveyor, without the use of a traverse
axis.

• COORDINATE
A set of numbers that locate a point in space.

• CPU
Abbreviation for central processing unit. A collection of hardware in a computer
which performs all calculations, handles I/O, and executes programmed tasks.

• CRASH
A situation where the computer fails to operate, due to a software or hardware
problem.

• CRT
Abbreviation for cathode ray tube. A CRT is a charge storage tube in which the
information is written by means of the cathode ray beam.

June 10, 2003 G-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• CURRENT LOOP
A circuit in which a portion of the output is returned to modify the control circuit
output. This circuit may be used as a limiting device, for safety protection.

• CURSOR
A pointer or indicator on a computer screen, that identifies the current position on
the screen.

• CYCLE
A complete path of projectory performed by the robot for a specific application.

• CYCLOIDAL DRIVE
A mechanical gear reduction unit that reduces the speed of the input and increases
the torque capacity. The cycloidal unit consists of an internal arrangement of discs
and pins that are driven by an eccentric drive cam. This type of gear reduction
offers low gear train backlash and the capability to achieve high reduction ratios
from a single contained unit.

D
• DATA
A term given to information, instructions, words or symbols that are usually transmit-
ted, processed, or stored as a group.

• DETENT
A part of a mechanism that locks or unlocks a movement.

• DISCONNECT
A switch that isolates a circuit or one or more pieces of electrical apparatus after the
current has been interrupted by other means.

• DEVIATION ERROR
In all mechanical devices, the actual position of the mechanical unit will lag behind
the electrical command of the controller. An allowable limit is assigned for this
difference. However, if the controller detects a condition where the difference be-
tween this mechanical value and the desired electrical position is larger than the
established value limit, the robot controller will generate a deviation error. This error
is sometimes referred to as a FOLLOWING ERROR in the robot industry.

• DEBUG
The process by which an operator’s program is checked for mistakes and then
corrected.

G-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• DECIMAL NUMBER
Numbers in the base-10 numbering system, which uses the numerals 0 - 9.

• DEDICATED
A term used to describe a system resource, such as an I/O device or terminal,
which is used for only one purpose, or assigned a single function.

• DEDICATED SIGNAL
A term used to describe a signal which is used for only one purpose, or assigned a
single function. Both inputs and outputs can be dedicated.

• DEFAULT
A value or operation that is automatically entered by the system, if the operator
does not specify one. Typically, the default is the standard or expected response.

• DELETE
A command which will eliminate unwanted data.

• DELIMITER
A character which separates a group of items or a character string, from other
groups, or which terminates a task.

• DEVICE
Any peripheral hardware connected to the processor and capable of receiving,
sorting, or transmitting data.

• DIAGNOSTICS
Function performed by the processor to identify and check for error conditions in the
robot arm and peripheral devices.

• DIP SWITCH
DIP is an acronym for dual in-line package. A set of small switches on circuit
boards that can be set for different configurations.

• DIRECTORY
A logical structure that organizes a group of similar files.

• DISK
A high-speed, random-access memory device.

• DISK-BASED SYSTEM
System in which programs and files are stored on the hard disk and are read into
memory when requested by the user.

June 10, 2003 G-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• DISK PACK
A device which is used to store additional data in a computer system, and is usually
removable.

E
• ECHO
Process in which characters that are typed on a keyboard are also displayed on the
screen or are sent to the printer.

• EDITOR
An aid for entering information into the computer system and modifying existing text.

• EMERGENCY STOP (E-Stop)


An immediate stop of robot motion, selected by the operator with a switch.

• ENCODER
An electromechanical device that is connected to a shaft to produce a series of
pulses that indicate the position of the shaft.

• EPROM
Acronym for erasable programmable read-only memory. The contents of this
memory (computer chip) are retained, even when power to the system is turned off.
Usually stores executive programs and critical system variables.

• ERROR LOG
A report which contains a sequential list of system error messages.

• ERROR MESSAGE
Messages displayed on the plasma screen of the robot controller, when the action
requested by the operator could not be completed. Error messages can occur
when components malfunction or if an incorrect command is typed by the operator.

• EXPRESSION
A combination of real-valued variables and functions, and mathematical and logical
operators. When evaluated, this combination yields a numeric value.

F
• FEEDBACK
The transmission of a signal from a measuring device (e.g., encoder, transducer) to
the device which issued the command signal within a closed-loop system. See
CLOSED-LOOP SYSTEM.

G-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• FIELD SIGNALS
All electrical signals that exit or enter an electrical panel.

• FILE
A set of related records or data elements, which are stored using one name and are
arranged in a structure that can be used by a program.

• FILESPEC
Includes the name, creation date and size of the specified file.

• FIXED DISK
An electromagnetic mass storage device which is not removable. Hard disks have
much higher storage capacity than floppy disks.

• FLOPPY DISK
An electromagnetic mass storage device which can be removed and exchanged.

• FORM FEED
Process which causes a printer to advance the paper to the top of the next page.

• FUNCTION
A formula or routine for evaluating an expression.

G
• GAIN
A proportional increase in power or signal value relative to a control signal. The
ratios of voltage, power, or current as related to a reference or control signal input.

• GLOBAL
Refers to a function or process that affects the entire system or file.

• GRAY CODE
A positional binary number notation in which any two numbers whose difference is
one are represented by expressions that are the same except in one place or col-
umn and differ by only one unit in that place or column.

H
• HALF-DUPLEX COMMUNICATION
Data transmission between two devices, where the signal is sent in only one direc-
tion at a time.

June 10, 2003 G-11


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• HANDSHAKING PROTOCOL
Communication rules used for data transmissions between devices. Each device
must recognize the same protocol in order to communicate.

• HANG
A term which refers to the state of a computer system that seems to be inoperative
when processing should be taking place.

• HARDSTOP
A mechanical constraint or limit on motion.

• HARDWARE
Physical equipment and devices such as computer hard disk, cables, printer, etc.

• HAZARDOUS SIDE
The unsafe side of a component or panel, such as the inside of the control panel
when power is applied and functions are being performed.

• HOLD
When an external or an internal input is available for a hold condition, the robot will
stop its motion and servo drive power will be removed from the robot. When an
external hold reset is performed, the servo drive power will be energized.

• HOME POSITION
Refers to the starting or resting position of the robot.

• HYBRID ENCODER
On the Kawasaki robot a hybrid encoder is used to generate positional data, and is
composed of an incremental encoder that generates incremental pulses, and an
absolute encoder that generates gray code binary data.

I
• ID
Abbreviation for Identification.

• INCHING
A value that is used during the jogging process that allows the user to position the
robot in small minute increments.

G-12 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• INCREMENTAL CODE
A digital closed loop feedback code that provides digital feedback pulses to the
robot controller for the purpose of providing positional information. These incremen-
tal pulses are generated by an encoder through the use of an optical disk with
alternating opaque and transparent bars or lines around the periphery of the disk.
On one side of the disk a light source is mounted, and on the opposite side a
phototransistor When the disk rotates, the phototransistor is alternately forced into
saturation and cutoff, producing the digital signal.

• INPUT
Transmission of an external signal into a control system.

• INTEGRATED CIRCUIT (IC)


A combination of interconnected circuit elements which are within a continuous
substrate.

• INTERACTIVE SYSTEM
System where the user and the operating system communicate directly; the user
through the keyboard, and the operating system via the display screen.

• INTERLOCK
An arrangement whereby the operation of one part or mechanism automatically
brings about or prevents the operation of another.

• INTERPRETER
A program that changes English-like commands into machine language. An inter-
preter translates and executes one command at a time.

• INSTRUCTIONS
Discrete steps in a computer program that are commands or statements that tell a
computer to do something or identify data.

• INTEGER
A whole number, a number without a fractional part such as 7, -318, or 19.

• INTERFACE
The circuitry that fits between a system and a peripheral device to provide compat-
ible coupling between the two pieces of equipment.

• INTERPOLATION
The mathematical process that the CPU utilizes to plot a path for the robot to travel
from one position to another. A mathematical process that evaluates a number of
dependent and independent variables for the purpose of comparison and prediction.

June 10, 2003 G-13


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• INTERRUPT
An external signal that halts program execution so that the computer can service
the needs of some peripheral device or subsystem.

• INTRINSIC SAFETY BARRIER (ISB)


An electronic device used in robot controllers to restrict current and voltage to a
safe level.

• INVERTER
A circuit which switches a positive signal to a negative signal, and vice versa.

• I/O
Abbreviation for Input/Output. The interconnections through which the computer
and its peripheral devices communicate.

• IPM
Abbreviation for Intelligent Power Module

J
• JOG
A term used to describe the process in which the user moves the mechanical unit
through interaction with the robot controller and the teach pendant. Sometimes
referred to as slewing.

• JOINT
1. A term used to describe the individual axes of a robot.
2. A term used to describe the jogging process in which the robot is jogged one
axis at a time.

• JOINT MOVE
A mode of operation in which the robot moves from one point to the next with an
arching path. All axes motors (required for the move) begin and end their rotation at
the same time. The tool center point does not follow a linear path to reach the
taught position.

L
• LABEL
An identifier for a program command line. To identify an instruction, memory loca-
tion, or part of a program.

G-14 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• LAN
An acronym for local area network. A group of computer terminals interconnected
by cables, allowing communication of information via the network.

• LCD
Abbreviation for liquid crystal display. This type of display is made of material
whose reflectance or transmittance of light changes when an electric field is ap-
plied.

• LIMIT SWITCH
An electrical switch positioned to be switched when a motion limit occurs, thereby
deactivating the actuator that caused the motion.

• LINEAR MOVE
An operation where the rate and direction of relative movement of the robot arm are
continuously under computer control.

• LINE PRINTER
A high-speed output device that prints a line at a time.

• LINE TURN-AROUND
Changing the source of transmission in half-duplex communications.

• LOGICAL OPERATION
Any of several operations that manipulate information according to the rules of logic
(e.g., AND, OR, NOT, and exclusive OR).

• LM
Abbreviation for linear motion.

• LOAD
The weight applied to the end of the robot arm.

• LOCKOUT
Serving to prevent operation of a device or part of it.

• LSB
Abbreviation for least significant bit.

M
• MANIPULATOR
Another term for the mechanical portion of the robot system.

June 10, 2003 G-15


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• MACHINE LANGUAGE
A low-level computer language, usually written in binary code.

• MASS-STORAGE DEVICE
An input/output device that retains data input to it. Examples include: hard disk
drives, magnetic tapes, floppy diskettes, and disk packs.

• MECHANICAL UNIT
robot (excluding controller)

• MEMORY
An area of the computer which stores data, either permanently or temporarily.
When a program is requested, it is first loaded into memory so it can be accessed
quickly by the processor.

• MHz
Abbreviation for megahertz. One million cycles per second.

• MIRROR IMAGE
A process which converts the positive and negative values of a taught path from a
right-handed robot to a left-handed robot, or vice versa. The actions of the oppos-
ing robots are then coordinated and synchronized.

• mm
Abbreviation for millimeter.

• MNEMONIC
A term used to help the operator remember a large string of words or commands.

• MODEM
A signal conversion device that modulates and demodulates data into an audio
signal for transmission.

• MOMENT OF INERTIA
Used to calculate end of arm tooling and handling weights. The sum of the prod-
ucts formed by multiplying the mass of the load by the square of the distance from
the tool mounting flange.

• MONITOR PROGRAM
An administrative computer program that oversees operation of a system. The AS
monitor accepts user input and initiates the appropriate response, follows instruc-
tions from user programs to direct the robot, and performs the computations neces-
sary to control the robot.

G-16 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• MSB
Abbreviation for most significant bit.

• MSEC
Abbreviation for millisecond (0.001 seconds).

N
• NOISE
Any unwanted disturbance within a dynamic, mechanical, or electrical system.

• NULLED
An electrical zero state.

O
• OCTAL NUMBER
A numeral in the base-8 numbering system, which uses the numerals 0 - 7.

• OFF LINE
A state in which communications between two devices cannot occur (e.g., between
a printer and a computer, if the printer is off line).

• ON LINE
A state in which communication between two devices can occur.

• OPERATING SYSTEM
A set of system tasks and commands that are entered by the operator and inter-
preted and performed by the system.

• OPEN LOOP
A control which does not use feedback to determine its output.

• OPERATOR
Any mathematical action or function. The arithmetic operators are: add, subtract,
multiply, divide, modulo, and exponentiate. The relational operators are: greater
than, less than, equal to, and their combinations. The logical operators are: AND,
OR, exclusive OR, negate. The binary logical operators are AND, OR, exclusive
OR, ones complement.

• OPTO
An optical isolator or level converter.

June 10, 2003 G-17


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• OVERFLOW
When a value or buffer exceeds a predefined limit.

• OVERTRAVEL
An error condition that exists when the robot exceeds its normal software limit
values, and then actuates an overtravel limit switch.

• OVERVELOCITY
When an axis exceeds a preset value for velocity.

• OX (OUTPUT EXTERNAL)
Information transferred from the robot controller through output modules to control
output devices.

P
• PARITY
Method by which errors are detected. In this method the combined binary values of
a byte are flagged as 1 or 0.

• PARSE
To break a command string into individual elements, so it can be interpreted.

• PASSWORD
A code, entered by the user, to permit access to protected information.

• PAYLOAD
The maximum weight that a robot can handle satisfactorily during its normal opera-
tions and extensions.

• PC PROGRAM
PC is an abbreviation for process control. A PC program cannot contain any step
that causes robot motion. PC programs are used to evaluate logic and variables
and execute program CALL and GOTO commands

• PERIPHERAL DEVICE
Hardware equipment which is external to the CPU, but that transmits and/or re-
ceives I/O from the processor. Examples include: printer, CRT screen, or disk.

• PHASE
The angular relationship between current and voltage in alternating current circuits.
In a waveform or period function, the fraction of the period that has elapsed, as
measured from a reference point. Phase angle is determined by multiplying the
phase by 360 degrees.

G-18 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• PINCH POINT
Any point where it is possible for a part of the body to be injured between the mov-
ing or stationary parts of a robot and the moving or stationary parts of associated
equipment, or between the material and moving parts of the robot or associated
equipment.

• PLA
Abbreviation for programmable logic array. Used in many servo drive circuits.

• PLAYBACK
An operation where a taught path is run for evaluation purposes.

• PLC
Abbreviation for programmable logic controller. Usually referred to as the cell mod-
ule controller.

• POINT-TO-POINT
A robot motion control in which the robot can be programmed by a user to move
from one position to the next. The intermediate paths between these points cannot
be specified.

• POLARITY KEYS
These teach pendant or multi function panel keys allow the user to jog or slew the
robot in the Joint, Base (XYZ), or Tool coordinates system.

• PORT
The connection point of an opening or passage that is usually located outside the
housing of a device.

• POSITIONAL DATA
The location in space of the robot manipulator.

• POSE
Describes the location and the posture of a robot.

• POUNCE POSITION
A positional location at a point near the workpiece, clear of the transfer mechanism
and part, from which the robot is ready to begin production.

• PRINTED CIRCUIT
An assembly of electronic elements that provide a complete path of electrical cur-
rent through conductive material deposited between terminals on an insulated
surface.

June 10, 2003 G-19


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• PRECISION POINT
The play back of robot location based on the angular position of the six axes, joint
angles

• PRINTING
A process in which characters are stamped on a surface, usually paper.

• PROGRAM
A predefined, step-by-step set of instructions that are entered into a computer so a
specific process can be performed repeatedly without reentering all the steps.
Robot paths are stored and run as part of programs.

• PROGRAM EDIT
Modification of an existing program.

• PROCESSOR
Generally, any hardware or software system for carrying out programs and acting on
data.

• PULSE WIDTH MODULATION (PWM)


A modulation process in which the instantaneous sampling of the modulating wave
is caused to modulate the duration of the pulse. This type of modulation is also
referred to as pulse duration modulation (PDM), or pulse length modulation (PLM).

R
• RAM
Acronym for random access memory. An area used by the CPU for processing and
temporarily loading programs so they can be accessed quickly. The contents of
RAM are lost when the computer is powered down, unless battery backup is pro-
vided.

• REAL NUMBER
A number with a fractional part, such as 1.75, -31.89, .5, -4.00, etc.

• REAL-TIME
The actual time during which the computer analyzes and processes data: informa-
tion is usually processed as it is received.

• REAL VARIABLE
AS language term for a variable that has had a real value assigned to it.

G-20 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• REPEAT MODE
A mode of operation that allows the user to check positional and auxiliary informa-
tion at a selected speed value, in a continuous or a step by step type of movement
of the mechanical unit.

• REPEATABILITY
The measurement of the closeness of agreement among repeated measurements
of the same variable under the same conditions.

• REWRITE MODE
A mode of operation which allows the user to rewrite positional, or auxiliary data,
and to insert or delete step address locations.

• RISC
Acronym for reduced instruction set computer.

• ROM (read-only memory)

A memory device which is programmed at the factory and whose contents thereaf-
ter cannot be altered.

• RS-232C
An ASCII specification for connections and communication between serial devices.

• RUN
A mode of operation that allows the user to select servo motor power to provide
drive energy to the robot, allowing it to perform such modes of operation as teach,
check, repeat, and rewrite.

S
• SAFETY PLUG
A device used with safety fencing to interlock the opening of the fence with the
removal of power to the robot.

• SCROLL
When more information exists than can be displayed on one screen, the operator
can move up and down through the data to view it. When data is scrolled to the
screen, the information previously viewed moves up off the screen, and new infor-
mation enters the screen from the bottom.

June 10, 2003 G-21


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• SENSOR
A device used to detect various conditions: proximity, heat, pressure, etc. An electri-
cal signal from the sensor can be used to communicate information to a robot
program.

• SERIAL
A method of transmitting data by which only one bit is sent or received at any one
point in time.
• SEQUENTIAL ACCESS
A method used by many computers whereby data is read in the order in which it is
physically stored.

• SINGULARITY POSITION
When the robot is processing a linear or circular move and two or more joints are in
alignment. The CPU can not process the ambiguity of a singularity configuration
and an error is generated.

• SOFTWARE LIMITS
Programmed values that are included in a program at the point before a mechanical
device hits an overtravel limit switch or a hard limit.

• SOFTWARE
A set of written programs and instructions that are executed by a computer system.

• SOURCE CODE
A program that contains the actual software instructions entered by the user, in
contrast to object code which is source code that has been translated into a lan-
guage which can be interpreted by the computer.

• STRING
A series of characters that have been entered in a distinct sequence that can be
interpreted as a valid statement or command.

• STROKE
The movement in either direction of a mechanical part having a reciprocating mo-
tion. The entire distance passed through in such a movement.

• SUBSCRIPT
A set of numbers that identifies an element of an array.

• SUBROUTINE
A set of instructions that is run by another routine.

G-22 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• SYMBOL
A character or design that has a distinct meaning and/or is associated with some-
thing.

• SYNTAX
The proper way in which commands and phrases should be typed in order to be
understood by the control system. If the operator incorrectly types a command (i.e.,
misspelled or invalid characters), a syntax error message will be displayed.

• SYSTEM DATA
Data that is specific to a individual robot. Zeroing data, upper and lower software
limits, and software switch settings are all examples of system data.

• SYSTEM SWITCH
Software switches that are set to determine various configurations and characteris-
tics of the robot system performance.

T
• TEACH MODE
A mode selected on the operator panel, during which robot arm axes positions can
be taught by the operator and are recorded by the robot.

• TEACH PENDANT
A hand-held, portable device used by the operator during teach and jogging opera-
tions.

• TOOL COORDINATES
A Cartesian coordinate system in which the origin point is at the face plate of the
robot and the orientation of the tool can be expressed in terms of a 3-dimensional
space representation of X, Y, and Z projections.

• TOOL MODE
A mode of operation in which all motions are calculated to maintain the orientation
of the tool in space.

• TORQUE
Something which produces or tends to produce rotation or torsion and whose effec-
tiveness is measured by the product of the force and the perpendicular distance
from the line of action of the force to the axis of rotation.

• TRANSFORMER
A device to convert the current of a primary circuit into variations of voltage and
current used in secondary circuits.

June 10, 2003 G-23


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

• TRANSFORMATION
A mathematical description of a location that defines the position and orientation of
the location without regard for the configuration of the robot when it is at that loca-
tion.

• TRAP POINT
See PINCH POINT.

• TTL
Abbreviation for transistor-transistor logic.

• TWO’S COMPLEMENT
A means of representing a negative number as one more than the binary comple-
ment of the absolute value of the number.

• TRIANGULAR WAVEFORM
A waveform that has the shape of a triangle and is used in determining sampling
values for servo drive circuits that utilize pulse width modulation.

U
• UHF
Abbreviation for ultra-high frequency.

V
• VARIABLE
The name of a memory location or stored value. A variable can refer to a scalar or
an array.

• VELOCITY COMMAND
This analog signal is directly proportional to motor speed, and provides the initial
signal that is processed by the servo drive system to drive a servo motor.

• VELOCITY ERROR
When the robot controller detects an axis that has exceeded a preset value for
velocity, the robot controller will E-stop the robot.

• VOLT
A unit of electrical potential difference and electromotive force. One volt is equiva-
lent to the force required to produce one amp of current through one ohm of resis-
tance.

G-24 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

GLOSSARY

W
• WORK ENVELOPE
The effective range or reach of a robot’s axes.

• WORLD COORDINATES
A Cartesian coordinate system in which the origin point is near the base of the
robot, and robot movement can be expressed in terms of a 3-dimensional space
representation of X, Y, and Z projections.

• WRITE
In computer systems, a process in which information is output to and stored by a
device or area in memory.

• WS (WELD SCHEDULE)
Data that is stored in the weld controller and provides the specific current, clamp
pressures, etc. for spot welding applications.

• WX (WAIT EXTERNAL)
The wait external signal is one of many inputs that are processed by the robot
controller. When the robot encounters a wait external condition, the robot will cease
motion and the servo power will be removed.

Z
• ZEROING
This procedure provides the robot controller with encoder data that is referenced
from a known mechanical position (zeroing witness marks, in simple zeroing, or
inclinometer values in precision zeroing) and then establishes an encoder value for
this known position. Two methods can be used, simple and precision zeroing.
Some robot manufacturers call this procedure mastering or calibration.

June 10, 2003 G-25


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

INDEX .........................................................................................................................IN-2

June 10, 2003 IN-1


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

Symbols
#DEST Function, 10-27
#HERE Function, 10-31
#HOME Function, 10-38
#PPOINT Function, 10-34
$CHR Function, 10-44
$DATE Function, 10-52
$ENCODE Function, 10-47, 10-49
$ERROR Function, 10-51
$ERRORS Function, 10-51
$LEFT Function, 10-45
$MID Function, 10-46
$RIGHT Function, 10-45
$SPACE Function, 10-44
$TIME Function, 10-52
/Cn, 6-123, 7-96, 10-50
/D, 6-123, 7-96, 10-49
/Em.n, 6-123, 7-96, 10-49
/Fm.n, 6-123, 7-96, 10-49
/Gm.n, 6-123, 7-96, 10-50
/Hn, 6-123, 7-96, 10-50
/Jn, 6-123, 7-96, 10-50
/Kn, 6-123, 7-96, 10-50
/L, 6-123, 7-96, 10-50
/ln, 6-123, 7-96, 10-50
/S, 6-123, 7-96, 10-50
/Xn, 6-123, 7-96, 10-50
1GW/1HW Board, I-4
1KA Board, 3-12
1KN Board, 3-12

A
ABORT, 6-53
ABORT Monitor Command, 5-14
ABOVE, 7-39, 7-41
ABS Function, 10-41
[Link] Switch, 8-11
ACCEL, 7-24
Accuracy, I-3, 2-12
[Link] Switch, 8-11
ALIGN, 7-13
American National Standards Institute (ANSI), 2-6
American Standard Code for Information Interchange, A-13
Angles, O, A, T, A-17
ANSI, 2-6
Arithmetic Operators, 9-3
Arrays, 4-14, 4-27
AS Language Functions, 10-2
AS Language Keyword List, A-2
AS Language Program Execution, 5-10
AS Language Program Format, 5-4
AS Language Programming Flow Chart, 5-6

IN-2 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

AS Language Programs, 5-2


AS Language Signal Number Limitation, A-16
AS System, 3-2, 3-4
ASC Function, 10-11
ASCII Character Code, 4-32, A-13
Assignment Instruction, 4-24, 4-26
Asynchronous Process (Interruption), 5-17
ATAN2 Function, 10-42
Autostart, 5-3
[Link] Switch, 8-8
[Link] Switch, 8-8
[Link] Switch, 8-8
AVE_TRANS Function, 10-36

B
BASE, 6-76, 7-110
BASE Command, 4-9
BASE Function, 10-37
Base Mode, I-3
BATCHK, 6-99
Battery Use and Disposal, 2-9
BELOW, 7-39, 7-41
Binary Operators, 4-30, 9-8
Binary Signal Instructions, 7-72
BITS, 6-113, 7-77, 8-6
BITS Function, 10-6
BRAKE, 7-25
Brake Assembly, 2-13
Brakes, 2-14
BREAK, 7-25
BSPEED, 7-26

C
C, 6-5
C1MOVE, 7-17
C2MOVE, 7-17
CALL, 7-46
CALLAUX, 7-59
CARD_COPY, 6-35
CARD_FDEL, 6-32
CARD_FDIR, 6-25
CARD_FORMAT, 6-41
CARD_LOAD, 6-45
CARD_LOAD/Q, 6-45
CARD_RENAME, 6-33
CARD_SAVE, 6-42
CARD_SAVE/SEL, 6-42
CARD_VERIFY, 6-32
CASE..OF VALUE..ANY..END, 7-69
Caution Symbol, 2-8
CCENTER Function, 10-39
CHANGE, 6-5

June 10, 2003 IN-3


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

Character String Data, 4-5, 4-12


CHECK Keys, 5-12
Check Mode, 2-14
[Link] Switch, 8-4
CHSUM, 6-104
Circular Interpolation, 7-17
Circular Move, I-3
CLAMP, 7-93
Clamp Control Instructions, 7-29
CLOSE, 7-32
CLOSEI, 7-32
CLOSES, 7-34
Closing the Log File, 3-20
Compound Transformation, 4-19, 4-20, 4-22, 9-10, 9-11
Computer Hard Disk, 3-7
Configuration Instruction Parameters, 7-39
Configuration Instructions, 7-37, 7-40
CONTINUE, 6-54, 8-4
CONTINUE Monitor Command, 5-14
CONTINUE NEXT, 6-54
Continuous Path, 2-12
Continuous Path (CP) Motion, 5-19
Coordinate System, A-17
COPY, 6-17, 6-35
COS Function, 10-41
CP and Accuracy Range, 5-24
CP Motion Break, 5-20
CP OFF, 5-32
CP OFF Acceleration and Deceleration, 5-32
CP ON, Standard Motion Type, 5-24
CP ON, Type 2 Motion, 5-27
CP Switch, 5-24, 7-23, 8-4
Creating and Editing AS Language Programs, 5-4
Creating AS Language Programs, 5-7
Creating Log Files, 3-19
CSHIFT Function, 10-39
CUT, 6-16
CYCLE START Switch, 5-14
[Link] Switch, 8-5

D
D, 6-10
Data Editing, I-3
Data Load, 3-16
Data Save, 3-16
Data Storage, I-6
DECEL, 7-24
DECOMPOSE, 4-27
Dedicated I/O Signals, 3-5
Dedicated Signals, I-5
Defining Character String Variables, 4-26
Defining Compound Transformation Values, 4-19

IN-4 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

Defining Pose Variables Using Program Instructions, 4-18


Defining Transformation Pose Values, 4-9
DEFSIG, 6-87
DEFSIG Command, 3-4
DELAY, 7-5
DELETE, 6-10, 6-30, 7-122
DELETE/L, 6-30, 7-122
DELETE/P, 6-30, 7-122
DELETE/R, 6-30, 7-122
DELETE/S, 6-30, 7-122
Design Specifications, I-3
DEST Function, 10-27
Deviation Error, 2-14
DEXT Function, 10-10
Dimensions, I-6
DIR, 6-26
DIR/L, 6-26
DIR/P, 6-26
DIR/R, 6-26
DIR/S, 6-26
DIRECTORY, 6-26
DIRECTORY/L, 6-26
DIRECTORY/P, 6-26
DIRECTORY/R, 6-26
DIRECTORY/S, 6-26
DISPIO_01, 6-72
DISPIO_01 Switch, 8-9
DISTANCE Function, 10-8
DLYSIG, 6-112, 7-75, 8-6
DO, 6-55, 8-4
DO..UNTIL.., 7-65
DRAW, 7-12
DRIVE, 7-11
DRIVE Command, 4-10
DWRIST, 7-39, 7-42
DX Function, 10-9
DY Function, 10-9
DZ Function, 10-9

E
E, 6-15
E-stop Switch, 2-10, 2-11, 2-12, 2-14
ED, 6-4
EDIT, 6-4
Editor Commands, 5-5, 6-3
Editor Mode, 3-2
EMERGENCY STOP Switch, 5-14
Enabling Device, 2-12
ENCCHK_EMG, 6-99
ENCCHK_PON, 6-100
ENV_DATA, 6-102
ENV2_DATA, 6-103

June 10, 2003 IN-5


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

ERESET, 6-94
ERRLOG, 6-81
ERROR Function, 10-20
Error Messages, I-5
[Link] Switch, 8-8
Ethernet, 3-12
Euler’s O, A, T Angles, A-17
Example Program, 5-7
EXECUTE, 6-50, 8-4
EXECUTE Monitor Command, 5-10
EXIT, 6-15
Expressions, 4-30
EXTCALL, 7-80
External Interlock, 12-6
External Memory Devices, 3-7

F
F, 6-11
FALSE, 4-31
FALSE Function, 10-13
FC06N, 2-15
FD_COPY, 6-35
FD_FDEL, 6-32
FD_FDIR, 6-25
FD_FORMAT, 6-41
FD_LOAD, 6-45
FD_LOAD/Q, 6-45
FD_RENAME, 6-33
FD_SAVE, 6-42
FD_SAVE/SEL, 6-42
FD_VERIFY, 6-32
FIND, 6-11
Floppy Disk, 3-7
FOR..TO..END, 7-67
FP20N, 2-16
FRAME Function, 10-28
FREE, 6-73
FS02N, 2-17
FS03N, 2-17
FS06L, 2-18
FS06N, 2-15
FS10C, 2-15
FS10E, 2-19
FS10L, 2-20
FS10N, 2-21
FS20C, 2-22
FS20N, 2-23
FS30L, 2-24
FS30N, 2-25
FS45C, 2-25
FS45N, 2-26
Function, #DEST, 10-27

IN-6 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

Function, #HERE, 10-31


Function, #HOME, 10-38
Function, #PPOINT, 10-34
Function, $CHR, 10-44
Function, $DATE, 10-52
Function, $ENCODE, 10-47, 10-49
Function, $ERROR, 10-51
Function, $ERRORS, 10-51
Function, $LEFT, 10-45
Function, $MID, 10-46
Function, $RIGHT, 10-45
Function, $SPACE, 10-44
Function, $TIME, 10-52
Function, ABS, 10-41
Function, ASC, 10-11
Function, ATAN2, 10-42
Function, AVE_TRANS, 10-36
Function, BASE, 10-37
Function, BITS, 10-6
Function, CCENTER, 10-39
Function, COS, 10-41
Function, CSHIFT, 10-39
Function, DEST, 10-27
Function, DEXT, 10-10
Function, DISTANCE, 10-8
Function, DX, 10-9
Function, DY, 10-9
Function, DZ, 10-9
Function, ERROR, 10-20
Function, FALSE, 10-13
Function, FRAME, 10-28
Function, HERE, 10-31
Function, INRANGE, 10-22
Function, INSTR, 10-16
Function, INT, 10-17
Function, LEN, 10-11
Function, MAXVAL, 10-17
Function, MINVAL, 10-17
Function, MSPEED, 10-21
Function, MSPEED2, 10-21
Function, NULL, 10-31
Function, OFF, 10-13
Function, ON, 10-12
Function, PI, 10-41
Function, PLCAIN, 10-20
Function, Pose Value, 10-26
Function, PRIORITY, 10-21
Function, RANDOM, 10-42
Function, RX, 10-33
Function, RY, 10-33
Function, RZ, 10-33
Function, SHIFT, 10-35
Function, SIG, 10-4

June 10, 2003 IN-7


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

Function, SIN, 10-41


Function, SQRT, 10-41
Function, SWITCH, 10-18
Function, SYSDATA, 10-24
Function, TASK, 10-18
Function, TIMER, 10-7
Function, TRADD, 10-37
Function, TRANS, 10-33
Function, TRSUB, 10-37
Function, TRUE, 10-12
Function, UTIMER, 10-21
Function, VAL, 10-14
Functions, 10-2
Functions, Mathematical, 10-40
Functions, Real Value, 10-3
Functions, String, 10-43
FW06N, 2-15

G
Global Variables, 4-12
Goggles, 2-10
GOTO, 7-44, 7-45
GOTO/IF, 7-44
Gun Signal Timing, 7-36
GUNOFF, 7-35
GUNOFFTIMER, 7-36
GUNON, 7-35
GUNONTIMER, 7-36

H
HALT, 7-54
Hard Hat, 2-10
Hardstop, 2-14
HELP, 6-95
HELP/DO, 6-95
HELP/F, 6-95
HELP/M, 6-95
HELP/MC, 6-95
HELP/P, 6-95
HELP/PPC, 6-95
HELP/SW, 6-95
HERE, 6-57, 7-104
HERE Command, 4-16
HERE Function, 10-31
High-Speed Playback, 2-12
HMOVE, 7-14
HOLD, 6-53
HOLD Monitor Command, 5-14
[Link] Switch, 8-9
HOLD/RUN Switch, 5-14
HOME, 7-10
HSETCLAMP, 6-85

IN-8 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

HSETCLAMP Command, 3-4


Hybrid Interpolation, 7-14

I
I, 6-9
I/O Signals, I-4
ID, 6-97
IF, 7-44, 7-45
IF..THEN..ELSE..END, 7-61
IF/GOTO, 7-45
IFPWPRINT, 6-125, 7-100
IGNORE, 7-85
Inputs, I-5
INRANGE Function, 10-22
INSERT, 6-9
INSTR Function, 10-16
INT Function, 10-17
Interface Panel, Optional, 2-14
Interlock Control Circuit, 2-13
IO, 6-72
IO 1, 6-72
IO 2, 6-72
IO 3, 6-72
IO 4, 6-72
IO/E, 6-72
IP Address, 3-13
IPEAKCLR, 6-106
IPEAKLOG, 6-106

J
JAPPRO, 7-6
JEPART, 7-8
JMOVE, 7-4
Joint Mode, I-3
Joint Number, 4-4
Joint Value, 4-8
Joint Values, 4-9, 4-17

K
KCwin, 3-8
KCwin32, 3-8
Keyword List, A-2
Keywords, 4-4
KILL, 6-55
KRterm, 3-8, 3-19
KRterm Connection Type, 3-13
KRterm Disconnect, 3-17
KRterm Shut-Down, 3-17, 3-18
[Link], 3-8
[Link], 3-8
[Link], 3-8
[Link], 3-8

June 10, 2003 IN-9


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

L
L, 6-8
LAN Cable, 3-12
LAPPRO, 7-6
LAST, 6-8
LATRACE, 6-38
LDEPART, 7-8
LEFTY, 7-39, 7-40
LEN Function, 10-11
Limit Switch, 2-14
Linear Move, I-3
LIST, 6-26, 6-28
LIST/L, 6-28
LIST/P, 6-28
LIST/R, 6-28
LIST/S, 6-28
LLIMIT, 6-75, 7-112
LMOVE, 7-4
LOAD, 6-45
LOAD/Q, 6-45
Local Variables, 4-13
Location, 4-4
LOCK, 7-52
Lock Out, 2-13
Log File, File Name, 3-19
Log File Folder, 3-19
Logical Expressions, 4-31
Logical Operators, 4-29, 9-5
Lowercase Letters, 4-32
LSTRACE, 6-37

M
M, 6-12
Macro Functions, 3-21
Main Disconnect, 2-13
Mathematical Functions, 10-40
MAXVAL Function, 10-17
MC, 7-118
MC CONTINUE, 5-3
Memory Capacity, I-3
Message Control Instructions, 7-94
Message Display Commands, 6-121
MESSAGES Switch, 8-5
Mine Safety and Health Administration (MSHA), 2-6
MINVAL Function, 10-17
MODIFY, 6-12
Monitor Commands, 4-15, 6-2
Monitor Mode, 3-2
Motion Control, I-3
Motion Control Instructions Description, 5-24
Motion Instructions, 7-3
MOTOR POWER Switch, 5-14

IN-10 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

MSHA, 2-6, 2-10


MSPEED Function, 10-21
MSPEED2 Function, 10-21
MSTEP, 6-52, 8-4
MVWAIT, 7-50

N
NCHOFF, 7-116
NCHON, 7-116
NIOSH, 2-6, 2-10
NULL Function, 10-31
Numeric Data, 4-5, 4-10
Numeric Expressions, 4-28

O
O, 6-14
O, A, T Angles, A-17
OFF, 6-83, 7-115
OFF Function, 10-13
ON, 6-83, 7-82, 7-115
ON Function, 10-12
ONE, 7-57
ONELINE, 6-14
ONI, 7-82
OPEINFO, 6-107
OPEINFOCLR, 6-108
OPEN, 7-30
OPENI, 7-30
OPENS, 7-34
Operation Panel, 2-14
Operator, 4-28
Operators, 4-28, 4-29, 9-2
OPLOG, 6-81
Order of Operaitons, 4-30
OSHA, 2-6, 2-10
Outputs, I-5
[Link] Switch, 8-6

P
P, 6-7
Palletizing Sample Program, 12-4
Parts, Replacement, 2-13
PASTE, 6-18
PASTE BUFFER, 6-20
PASTE REVERSE, 6-19
PAUSE, 7-54
PC Card, 3-7
PC Program, 5-2
PC Program Execution, 5-15
PC Program Instructions, 11-2
PCABORT, 11-6
PCABORT Monitor Command, 5-15

June 10, 2003 IN-11


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

PCCONTINUE Function, 11-8


PCCONTINUE Monitor Command, 5-15
PCEND, 11-7
PCEND Monitor Command, 5-15
PCEXECUTE, 11-5
PCEXECUTE Monitor Command, 5-15
PCKILL, 11-6
PCSCAN, 11-10
PCSTATUS, 11-4
PCSTEP, 11-9
Peripheral Device, 2-10
Personal Computer, 3-9
Personal Safety, 2-10
PI Function, 10-41
Play-back Mode, 3-2
PLCAIN Function, 10-20
PLCAOUT, 6-105, 7-119
Pneumatic, 2-13
POINT, 6-60, 7-105
POINT Command, 4-13, 4-17, 4-22
Point-to-Point Mode, 2-12
POINT/ Y, 6-63, 7-106
POINT/7, 6-63, 7-106
POINT/A, 6-63, 7-106
POINT/O, 6-63, 7-106
POINT/OAT, 6-63, 7-106
POINT/T, 6-63, 7-106
POINT/X, 6-63, 7-106
POINT/Z, 6-63, 7-106
Pose, 4-4
Pose Data, 4-5
Pose Information Commands, 6-56
Pose Information Instructions, 7-102, 7-121
Pose Value Functions, 10-26
Pose Variables, 4-15
Posture, 4-4
Power Requirements, I-6
Precision Location, 4-14
Precision Pose, 4-15
[Link], 8-6
PRIME, 6-49
PRIME Monitor Command, 5-11
PRINT, 6-7, 6-122, 7-95
PRINT Instruciton, 3-6
PRIORITY Function, 10-21
Process Control Program Commands/Instructions, 11-3
Process Control Programs, 11-2
Program and Data Control Commands, 6-23
Program and Data Storage Commands, 6-40
Program Control Commands, 6-47
Program Control Flow Structure Instructions, 7-60
Program Control Instructions, 7-43
Program Execution Flow, 5-15

IN-12 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

Program Execution Sequence, 5-22


Program Initial Settings/Parameters, 12-2
Program Instructions, 7-2
Programmable Logic Controllers (PLCs), I-2
PULSE, 6-112, 7-74, 8-6

Q
QTOOL Switch, 8-7

R
R, 6-13
RANDOM Function, 10-42
Real Numbers, 4-10
Real Value Functions, 10-3
Real Variables, 4-24
REC_ACCEPT, 6-101
Relational Operators, 9-4
Relative Transformations, 12-13, 12-15, 12-17
RELAX, 7-33
RELAXI, 7-33
RELAXS, 7-34
RENAME, 6-33
REP_ONCE Switch, 8-7
Repeat Mode, I-3, 2-12
REPLACE, 6-13
Replacement Parts, 2-13
RESET, 6-110, 7-73, 8-6
RESTRACE, 6-37
Restricted Space, 2-10, 2-12, 2-15
Resuming Robot Control Program Execution, 5-14
Retreat Path, 2-12
RETURN, 7-47
RETURNE, 7-59
RIGHTY, 7-39, 7-40
Robot Configuration, 7-38
Robot Control Program Execution, 5-10
Robot Motion and Step Relation, 5-22
Robot Motion Control Program, 5-2
Robot Motion Instructions, 5-17
Robot Operating Conditions, 5-7
Robot Poses (Locations), 5-7
Robot Signal Value Ranges, 4-4
RPS Switch, 8-7
RS-232C, 3-8
RS-232C Port, 3-9
RUNMASK, 7-76, 8-6
RX Function, 10-33
RY Function, 10-33
RZ Function, 10-33

June 10, 2003 IN-13


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

S
S, 6-6
Safeguarded Space, 2-2, 2-10, 2-11, 2-12, 2-13
Safety Categories, 2-10
Safety Coordinator, 2-11
Safety Device, 2-11
Safety During Inspection and Maintenance, 2-13
Safety During Operation, 2-12
Safety During Programming, 2-12
Safety Features, 2-14
Safety Fence, 2-13
Safety Glasses, 2-10
Safety Plug, 2-13
Safety Shoes, 2-10
Sample Program, 5-9
Sample Program, Palletizing, 12-4
Sample Programs, 12-2
SAVE, 6-42
Save Pose Information, 3-7
Save Programs, 3-7
Save Variables, 3-7
SAVE/L, 6-43
SAVE/P, 6-43
SAVE/R, 6-43
SAVE/S, 6-43
SAVE/SEL, 6-42
SAVE/SYS, 6-43
Saving the Log File, 3-20
Scalar Variables, 4-4
SCALL, 7-56
Scientific Notation, 6-123, 7-96, 10-49
SCNT, 6-114, 7-86
SCNTRESET, 7-87
SCNTREST, 6-115
SCREEN Switch, 8-7
Selecting Log File, 3-19
Servo Drive Motor, 2-13
SET2HOME, 6-80
SETHOME, 6-80
SETPICK, 6-120, 7-92
SETPLACE, 6-120, 7-92
Setting Load Mass/Load Center Point, 5-33
Settings/Parameters, Program, 12-2
SETTRACE, 6-37
SFLK, 6-115
SFLP, 6-116, 7-88
SHIFT Function, 10-35
SIG Function, 10-4
SIGNAL, 6-111, 8-6
Signal Number, 4-4
Signal Timing, 8-6
SIN Function, 10-41

IN-14 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

SLOW_REPEAT, 6-100
SLOW_START Switch, 8-11
Software Limit, 2-14
SOUT, 6-117, 7-89
Specified Path Motion, 5-32
SPEED, 6-48, 7-20
Speed, I-3, 2-12
Speed and Accuracy Control Instructions, 7-19
SQRT Function, 10-41
STABLE, 7-5
STATUS, 6-68
STEP, 6-6, 6-52, 8-4
STEP Command, 5-12
STIM, 6-119, 7-91
STOP, 7-55
Stopping a Robot Control Program, 5-13
STP_ONCE Switch, 8-7
STP_ONCE System Switch, 6-55
STPNEXT, 6-55
String Expressions, 4-32
String Functions, 10-43
String Operator, 9-13
String Operators, 4-32
Subroutine, 5-15
SWAIT, 7-79, 8-6
SWITCH, 6-82
SWITCH (CS), 8-8
SWITCH (ERROR), 8-9
SWITCH (POWER), 8-8
SWITCH (REPEAT), 8-9
SWITCH (RGSO), 8-8
SWITCH (RUN), 8-9
SWITCH (TEACH LOCK), 8-8
SWITCH (TRIGGER), 8-8
SWITCH Function, 10-18
SYSDATA Function, 10-24
SYSINIT, 6-94
System Control Commands, 6-66
System Switch, 7-115
System Switches, 3-2

T
T, 6-21
Tag Out, 2-13
TASK Function, 10-18
TDRAW, 7-12
TEACH, 6-21
TEACH Command, 4-16
Teach Mode, I-3, 2-14
Teach Pendant, I-6, 2-12, 2-14
Terminal Control, 3-6
Terminal Control Commands, 3-6

June 10, 2003 IN-15


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

Terminal Software Installation, 3-8


TIME, 6-74
TIMER, 7-113
TIMER Function, 10-7
TOOL, 6-79, 7-111
Tool Center Point (TCP), 4-5
TOOL Command, 4-9
Tool Coordinates, 4-5, 4-9
Tool Dimensions, 8-7, 12-9
Tool Mode, I-3
Tool Transformation, 12-9, 12-12
TPLIGHT, 6-106, 7-120
TRACE, 6-36, 7-123
TRACE ON, 6-37
TRADD Function, 10-37
TRANS Function, 10-33
Transformation Location, 4-14
Transformation Pose, 4-15
Transformation Value, 4-8
Transformation Value - Transformation Value, 9-10
Transformation Value Operators, 9-10
Transformation Value+Transformation Value, 9-10
Transformation Values, 4-7
Trap Point, 2-12, 2-10
TRSUB Function, 10-37
TRUE, 4-31
TRUE Function, 10-12
TWAIT, 7-49, 8-6
TYPE, 6-122, 7-95
TYPE Instruction, 3-6

U
ULIMIT, 6-75, 7-112
Uppercase Letters, 4-32
Using Relative Transformations, 12-13
Using Relative Transformations in a Program, 12-15
Using Relative Transformations with the Frame Func, 12-17
UTIMER, 7-114
UTIMER Function, 10-21
UWRIST, 7-39, 7-42

V
VAL Function, 10-14
Variable Names, 4-14
Variable Types, 4-14
Variables, 4-12
Velocity Error, 2-14

IN-16 June 10, 2003


Kawasak D SERIES CONTROLLER

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


AS LANGUAGE REFERENCE MANUAL

INDEX

W
WAIT, 7-48
Warning Symbol, 2-8
Water, High Pressure, 2-13
WEIGHT, 6-98, 7-117
WHERE, 6-70
WHERE 1, 6-70
WHERE 10, 6-70
WHERE 11, 6-70
WHERE 12, 6-71
WHERE 13, 6-71
WHERE 14, 6-71
WHERE 15, 6-71
WHERE 16, 6-71
WHERE 2, 6-70
WHERE 3, 6-70
WHERE 4, 6-70
WHERE 5, 6-70
WHERE 6, 6-70
WHERE 7, 6-70
WHERE 8, 6-70
WHERE 9, 6-70
WHILE..DO..END, 7-63

X
XD, 6-16
XFER, 6-34
XMOVE, 7-15
XP, 6-18
XQ, 6-19
XS, 6-20
XY, 6-17
XYZOAT Values, 4-9

Z
ZD130, 2-27
ZD165, 2-28
ZSIGSPEC, 6-84
ZSIGSPEC Command, 3-4
ZT130, 2-29
ZT165, 2-30
ZT200, 2-31
ZX130L, 2-32
ZX130U, 2-33
ZX165U, 2-34
ZX200S, 2-35
ZX200U, 2-36
ZX300S, 2-37
ZZERO, 6-90
ZZERO Command, 3-4

June 10, 2003 IN-17

You might also like