You are on page 1of 154

Kawasaki Robot Controller

E Series

KLogic/ KLadder
Operation
Manual

Kawasaki Heavy Industries, Ltd.

90210-1083DEA
E Series Controller
Kawasaki Robot KLogic / KLadder Operation Manual

PREFACE

This manual gives instructions for using KLogic, a sequence control software built into E Series
Controller, and KLadder, a programming software used with it.

This manual provides as much detailed information as possible on the standard operating methods
for using this function. However, not every possible operation, condition or situation that should be
avoided can be described in full. Therefore, should any unexplained questions or problems arise
during robot operation, please contact Kawasaki Machine Systems. Refer to the contact
information listed on the rear cover of this manual for the nearest Kawasaki Machine Systems office.

Read the E Controller Basic Manuals (including safety manual), delivered with the robot, without
fail together with this manual. Do not perform any procedure described herein until the contents of
this manual are fully understood.

1. This manual does not constitute a guarantee of the systems in which the robot is utilized.
Accordingly, Kawasaki is not responsible for any accidents, damages, and/ or problems relating
to industrial property rights as a result of using the system.
2. It is recommended that all personnel assigned for activation of operation, teaching, maintenance
or inspection of the robot attend the necessary education/ training course(s) prepared by
Kawasaki, before assuming their responsibilities.
3. Kawasaki reserves the right to change, revise, or update this manual without prior notice.
4. This manual may not, in whole or in part, be reprinted or copied without the prior written
consent of Kawasaki.
5. Store this manual with care and keep it available for use at any time. If the robot is reinstalled
or moved to a different site or sold off to a different user, attach this manual to the robot without
fail. In the event the manual is lost or damaged severely, contact Kawasaki.
All rights reserved. Copyright © 2009 Kawasaki Heavy Industries Ltd.

i
E Series Controller
Kawasaki Robot KLogic / KLadder Operation Manual

SYMBOLS

The items that require special attention in this manual are designated with the following symbols.

Ensure proper and safe operation of the robot and prevent physical injury or property damage by
complying with the safety matters given in the boxes with these symbols.

! DANGER

Failure to comply with indicated matters can result in


imminent injury or death.

! WARNING
Failure to comply with indicated matters may possibly lead to
injury or death.

! CAUTION
Failure to comply with indicated matters may lead to physical
injury and/or mechanical damage.

[ NOTE ]

Denotes precautions regarding robot specification,


handling, teaching, operation and maintenance.

! WARNING

1. The accuracy and effectiveness of the diagrams, procedures, and detail


explanations given in this manual cannot be confirmed with absolute
certainty. Should any unexplained questions or problems arise, please
contact Kawasaki Machine Systems.
2. Safety related contents described in this manual apply to each individual work
and not to all robot work. In order to perform every work in safety, read
and fully understand the safety manual, all pertinent laws, regulations and
related materials as well as all the safety explanation described in each
chapter, and prepare safety measures suitable for actual work.

ii
E Series Controller
Kawasaki Robot KLogic / KLadder Operation Manual

INTRODUCTORY NOTES

1. HARDWARE KEYS AND SWITCHES (BUTTON)

E series controller provides hardware keys and switches on the operation panel and the teach pendant
for various kinds of operations. In this manual the names of the hardware keys and switches are
enclosed with a square as follows. The terms “key” or “switch” which should follow the relevant
names are sometimes omitted for simpler expression. When pressing two or more keys at the same
time, the keys are indicated by “+” as shown in the example below.

EXAMPLES

ENTER: expresses the hardware key “ENTER”.


TEACH/REPEAT: indicates the mode switch “TEACH/REPEAT” on the operation panel.
A+MENU: indicates pressing and holding down A then pressing MENU.

2. SOFTWARE KEYS AND SWITCHES

E series controller provides software keys and switches which appear on the screen of the teach
pendant for various kinds of operations depending on specifications and situations. In this manual,
the names of software keys and switches are enclosed by “< >” parentheses. The terms “key” or
“switch” which should follow the relevant names are sometimes omitted for simpler expression.

EXAMPLES

<ENTER>: expresses an “ENTER” key that appears on the teach pendant screen.
<NEXT PAGE>: expresses a “NEXT PAGE” key on the teach pendant screen.

3. SELECTION ITEMS

Very often an item must be selected from a menu or pull-down menu on the teach pendant screen.
In this manual the names of these menu items are enclosed in brackets [XXX].

EXAMPLES

[Auxiliary Function]: Expresses the item “Auxiliary Function” in a menu. To select it, move the
cursor to the relevant item by the arrow keys, and press the ↵ key. For
detailed description, this procedure should be described every time, but “select
[XXX] item” will be used instead for simpler expression.

iii
E Series Controller
Kawasaki Robot KLogic / KLadder Operation Manual

CONTENTS

Preface ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ i
Symbols ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ ii
Introductory Note・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ iii

1.0 Overview of KLogic / KLadder ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-1


1.1 Overview of KLogic ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-1
1.1.1 KLogic Specifications ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-2
1.1.2 KLogic Monitoring Functions ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-3
1.2 Overview of KLadder ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-4
1.2.1 KLadder Functions・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-4
1.2.2 KLadder Specifications・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-4

2.0 KLogic ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-1


2.1 Basic Operation Part ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-1
2.1.1 Mnemonics Used in Basic Operation Part ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-1
2.1.2 Programs for Basic Operation Part ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-1
2.1.3 Signals Used in Basic Operation Part・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-2
2.1.4 Rewriting Basic Operation Program during Execution ・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-4
2.2 Numeric Operation Part ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-5
2.2.1 Role of Numeric Operation Part ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-5
2.2.2 Execution of Numeric Operation Part ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-5
2.2.3 Programs for Numeric Operation Part ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-5
2.2.4 Signals Used in Numeric Operation Part・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-6
2.3 Signal Allocation with Fieldbus ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-7
2.4 KLogic Monitor ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-9
2.4.1 Starting KLogic Monitor ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-9
2.4.2 Details of KLogic Monitor Display ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-11
2.4.2.1 Basic Operation Part Monitor ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-11
2.4.2.2 Numeric Operation Part Monitor ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-12
2.5 KLogic Ladder Display・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-13
2.5.1 Starting KLogic Ladder Display ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-14
2.5.2 Details of KLogic Ladder Display ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-15
2.5.2.1 Details of Ladder Display Screen ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-15
2.5.2.2 Signal Search Screen ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-17
2.5.2.3 Step Search Screen・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-19
2.6 AS Language・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-20

iv
E Series Controller
Kawasaki Robot KLogic / KLadder Operation Manual

2.6.1 Commands/ Instructions for Basic Operation Part ・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-21


2.6.1.1 Monitor Commands ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-21
2.6.1.2 Program Instructions ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-28
2.6.1.2.1 Basic Operation Instruction ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-28
2.6.1.2.2 Applied Operation Instruction ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-39
2.6.2 Commands/ Instructions for Numeric Operation Part・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-80
2.6.2.1 Monitor Command・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-80
2.6.2.2 Instructions for Interface between Basic and Numeric Operation Parts ・・・・・・・・・・ 2-84

3.0 KLadder ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-1


3.1 Installation and Connection ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-1
3.1.1 KLadder Hardware Requirements ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-1
3.1.2 KLadder Installation Procedure・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-1
3.1.3 Connecting with E Controller ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-2
3.1.3.1 Connecting via RS232C ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-2
3.1.3.2 Connecting via ETHERNET ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-3
3.1.4 Setting Communication Module ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-3
3.2 Programming Using KLadder ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-5
3.2.1 Open File ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-5
3.2.2 Creating a New Circuit (Inserting New Block) ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-5
3.2.3 Placing Symbols ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-6
3.2.3.1 Ladder Diagram Configuration ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-8
3.2.4 Changing Symbols ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-9
3.2.5 Drawing Parallel Circuits ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-10
3.2.5.1 Adding a Second Line to a Block ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-10
3.2.5.2 Moving Symbols by One Column ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-11
3.2.5.3 Drawing OR Diagram ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-11
3.2.6 Moving/ Copying Data ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-12
3.2.7 Converting Data to Mnemonic ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-12
3.2.8 Inputting/ Editing of Comments ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-13
3.2.9 Input/ Edit Register ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-14
3.2.10 Block Editing ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-15
3.2.10.1 Editing All Signal numbers ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-15
3.2.10.2 Changing Operands for Applied Instructions ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-17
3.2.10.3 Replacing Make- and Break- contacts ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-19
3.2.11 Block Comparison ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-20
3.2.12 Search ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-21
3.2.13 Jump ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-22
3.2.14 Jump Using Bookmarks ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-22

v
E Series Controller
Kawasaki Robot KLogic / KLadder Operation Manual

3.2.15 Signal Status ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-23


3.2.16 Contact table ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-24
3.2.17 Program Check ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-25
3.3 RC (Robot Controller) Menu ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-27
3.3.1 Reading Files from RC ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-27
3.3.1.1 Reading Programs ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-27
3.3.1.2 Reading Comments ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-28
3.3.2 Writing into RC (Robot Controller) ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-28
3.3.2.1 Writing Program・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-28
3.3.2.2 Writing Comments・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-29
3.3.3 RC Operation Status ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-30
3.3.4 Stopping RC Program ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-30
3.3.5 Starting RC Program ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-31
3.3.6 Forcing I/O Signals ON/ OFF ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-31
3.4 Monitor Menu ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-34
3.4.1 Starting RC Monitor ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-34
3.4.2 Monitoring Registers and I/O Signals ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-35
3.5 Program File Management ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-36
3.5.1 Saving Data ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-36
3.5.2 Binary Comparison of File and Program・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-36
3.5.3 Importing Comments・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-36
3.6 Option Menu ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-37
3.6.1 Customize ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-37
3.6.1.1 Customizing Font ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-37
3.6.1.2 Customizing Color ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-38
3.6.1.3 Customizing Display ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-40
3.6.2 KLadder Settings ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-41
3.6.2.1 File Settings・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-41
3.6.2.2 Operation Settings ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-42
3.6.2.3 Setting Shortcut Keys ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-43
3.6.2.4 Language ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-44
3.7 Printing Files ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-45
3.7.1 Printing Procedures ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-45
3.7.2 Circuit Diagram List ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-46
3.7.3 Instruction List ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-48
3.7.4 Address Comment List ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-49
3.7.5 Contact Table List ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-50
3.7.6 Signal List ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-51

vi
E Series Controller 1. Overview of KLogic / KLadder
Kawasaki Robot KLogic / KLadder Operation Manual

1.0 OVERVIEW OF KLOGIC / KLADDER

This option realizes control of program sequencing for the robot system via KLogic software built
into the E controller. It requires no external control panel or installation of printed circuit boards
for that purpose. Ladder programming can be done using KLadder software together with
KLogic.
Controller PC

KLadder
・ Ladder editing, monitoring
・ Program upload/ download

CPU Board
Controls: RS232C/Ethernet
・ Robot motions
・ KLogic
・ PC program

Fieldbus board
・ Fieldbus functions ・ CC-Link
・ DeviceNet
・ PROFIBUS
・ ControlNet, etc.
・ PLC for line control
・ Power for welder etc.

Peripheral devices

1.1 OVERVIEW OF KLOGIC

KLogic performs sequence control using a part of CPU for robot control. No extra hardware is
necessary. This saves maintenance troubles.

Sequence programs for KLogic software are written in AS language, therefore, it can be managed
together with robot programs. Peripheral devices can be controlled using Fieldbus, available in
a wide variety of specifications.

See 2.6 AS Language for AS language commands/ instructions for sequence control.

1-1
E Series Controller 1. Overview of KLogic / KLadder
Kawasaki Robot KLogic / KLadder Operation Manual

1.1.1 KLOGIC SPECIFICATIONS

KLogic consists of a basic operation part that performs logical operations at high-speed, and a
numeric operation part that performs arithmetic calculations.

Specification for basic operation part is as follows:

Standard KLogic
Programming language Ladder
Sampling cycle Set automatically in increments of 2 ms
Basic instructions
2 μs/ step
processing time *
Program capacity Ladder 10000 step
Logical operation
13 types
(Basic commands)
Commands
(Applied commands) 37 types

Input 2048 &X0000-&X07FF


Output 2048 &Y0000-&Y07FF
Internal relay 2048 &M0000-&M07FF
Keep relay 512 &K0000-&K01FF
Signal types
Timer 256 &T0000-&T00FF
Counter 256 &C0000-&C00FF
Data register ** 2048 &D0000-&D07FF
Special register 256 &V0000-&V00FF
Program storage device Compact Flash
Processed in robot’s
Operations
main CPU
NOTE* For processing time of applied operation instruction, refer to each
instruction in 2.6.1.2.2 Applied Operation Instruction.
NOTE** Includes special registers (&D0700-&D07FF)

1-2
E Series Controller 1. Overview of KLogic / KLadder
Kawasaki Robot KLogic / KLadder Operation Manual

Specifications for numeric operation part are as follows:

KLogic (Numerical operation part)


Programming language AS Language
Program execution Executed as special PC program
Total time to execute all instructions in
Program execution cycle
the program
Operations Processed in robot’s main CPU
Program storage device Compact Flash

1.1.2 KLOGIC MONITORING FUNCTIONS

The execution status and the ladder diagram of the basic operation part of KLogic can be
monitored and displayed on the teach pendant screen. For information on how to operate the
monitors, refer to 2.4 KLogic Monitor and 2.5 KLogic Ladder Display.

1-3
E Series Controller 1. Overview of KLogic / KLadder
Kawasaki Robot KLogic / KLadder Operation Manual

1.2 OVERVIEW OF KLADDER

KLadder is a ladder programming software for Windows dedicated for use with KLogic.
Sequence control programs are written based on the ladder diagrams that are constructed in this
software application.

1.2.1 KLADDER FUNCTIONS

Major functions of KLadder are as follows:


1. Programming and editing of programs using ladder diagram
2. Writing/ loading of programs to/ from KLogic
3. Monitoring of signal conditions

1.2.2 KLADDER SPECIFICATIONS

KLadder specifications are as follows:

Name KLadder
PC Specification

OS Windows95 or above

CPU Pentium or above

Memory 32 M or more recommended

Hard disk 15 M byte or more


Ladder programming
Ladder editing
Editing
Functions Transfer of ladder programs
Execution of ladder programs
Ladder monitor
etc.
Connection with controller RS232C/Ethernet

See 3.0 KLadder, for installing and operating KLadder on a PC.

1-4
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.0 KLOGIC

This chapter explains the configuration of KLogic and the AS language used with it.

2.1 BASIC OPERATION PART

KLogic consists of the following two software components:


Basic Operation Part: ・ Processes logical operations
Numeric Operation Part: Processes numeric operation such as arithmetic calculations

This section explains about the basic operation part. For explanation of the numeric operation
part, see 2.2 Numeric Operation Part.

2.1.1 MNEMONICS USED IN BASIC OPERATION PART

Mnemonics used in basic operation part are all commands starting with “LSQ” and are treated as
AS language.
Example LSQ STR, &X0000
LSQ OUT, &Y0000

2.1.2 PROGRAMS FOR BASIC OPERATION PART

The program executed by the basic operation part must be named “lsqpg”. It is processed in the
same way as robot programs with the only differences being that its name is fixed to lsqpg and
that program instructions start with characters “LSQ.” Also, this program is edited, saved and
loaded just like robot programs.

Execution of programs created for basic operation part (hereinafter referred to as “basic operation
programs”) is controlled via monitor commands dedicated for this use. (See 2.6 AS Language
for details.)

Example LSQEXECUTE LSQREWRITE


LSQABORT LSQSTATUS etc.

There are two types of instructions for basic operation programs: 1. basic operations and 2.
applied operations. Basic operations perform logical operations, and applied operations execute
timers, counters and inputting of numeric values. See 2.6 AS Language for explanation of each
type of instruction.

2-1
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Basic operation programs, unlike other robot programs, are converted from mnemonic into binary
form for accelerated processing on the RAM (program in mnemonic form (lsqpg) cannot be
processed in basic operation part). However, programs are saved in mnemonic format, so be
careful not to delete/ change necessary programs. (Programs are not saved in binary form, but
converted from mnemonic each time the control power is turned ON.)

2.1.3 SIGNALS USED IN BASIC OPERATION PART

Signals used in basic operation part are written in different format than standard robot signals
(OX/ WX, etc.). Use the table below for correspondence between standard and KLadder signals.
(The relation between the two signals may vary per system conditions, e.g. the specification of the
General Purpose Fieldbus. See 2.3 for details.)

Correspondence between signal types used in basic operation part is as follows:

Number of
Signal Type Format and Upper/Lower limits
signals

Input &X0000-&X07FF 2048


Output &Y0000-&Y07FF 2048
Internal relay &M0000-&M07FF 2048
Keep relay &K0000-&K01FF 512
Timer &T0000-&T00FF 256
Counter &C0000-&C00FF 256
Data register &D0000-&D07FF 2048
Special relay &V0000-&V00FF 256

There are 16 bits of information for each data saved in the data register. For other signals, each
data contains only 1 bit of information. Within the data register, &D0700 - &D07FF are special
register that, with special relay shown in the table below, can output predetermined data such as
robot status, current time, etc.

2-2
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Special Relay List


Number Contents
V0000 Normally ON Always ON regardless of operation status
V0001 Normally OFF Always OFF regardless of operation status
V0002 User defined clock 1 Outputs result of LSQ USC1
V0003 User defined clock 2 Outputs result of LSQ USC2
V0004 Robot error Outputs robot error*
V0005 Carry flag Turns ON when result of LSQ+, LSQ W+ carries over
V0006 Borrow flag Turns ON when result of LSQ-, LSQ W- carries down
V0007 Zero flag Turns ON when result of LSQ+, W+ ,-, W-, X, WX, /, W/ is zero
V0008 Error flag Turns ON when the divided register is 0 in LSQ/, LSQ W/
NOTE* From among all robot errors, only outputs errors that turn ON the error lamp.
Error code number is output to special register D0700. Error occurrence time is
output to special register D0701-D0703.

Special Register List


Number Contents
D0700 Robot error code number*
D0701 Error occurrence time (Minute/ second) BCD display (2 digits displayed in 1 byte)
D0702 Error occurrence time (Day/ time) BCD display (2 digits displayed in 1 byte)
D0703 Error occurrence time (Year/ month) BCD display (2 digits displayed in 1 byte)
D0704 Current time (Minute/ second) BCD display (2 digits displayed in 1 byte)
D0705 Current time (Day/ time) BCD display (2 digits displayed in 1 byte)
D0706 Current time (Year/ month) BCD display (2 digits displayed in 1 byte)
Number after “pg”. If program named without “pg” as first two
D0707 Program name
character, then FFFFh.
D0708 Step number 0 when program does not exist
D0709 Scan time Basic operation part Current value
D070A Scan time Basic operation part Error threshold value
Numeric operation
D070B Scan time Current value
part
NOTE* The alphacharacters showing the error type at the beginning of the error code are
replaced by the numbers below.
Pxxxx:1xxxx Exxxx:3xxxx
Wxxxx:2xxxx Dxxxx:4xxxx

2-3
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.1.4 REWRITING BASIC OPERATION PROGRAM DURING EXECUTION

A basic operation program can be overwritten as a new program while it is being executed. (See
LSQ REWRITE command.)

The rewriting is processed as follows:

1. Syntax of the new program (lsqpg) is checked for correct format.


2. If any error is found, error message is displayed. The current (original) program continues to
be executed.
3. If there is no error, the current (original) program is executed to the last step, and is then
overwritten as a new program.
4. After current program has been changed to a new program, the new program is executed
immediately. If the LSQ START instruction is in the new program, the execution continues
from the step following the LSQ START step.

2-4
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.2 NUMERIC OPERATION PART

2.2.1 ROLE OF NUMERIC OPERATION PART

The numeric operation part processes programs that need to be executed in certain cycles and
that do not require high speed processing. Mostly, arithmetic calculations are processed by
the numeric operation part.

2.2.2 EXECUTION OF NUMERIC OPERATION PART

Numeric operation programs are processed in the same way as PC programs and are executed
via an allocation of the robot’s main CPU processing time. Therefore, most of the AS
language used in PC programs can also be used in numeric operation programs. Robot
motion and execution of other PC programs do not affect the execution of the numeric
operation program. Execution cycle is determined as the time taken to execute all of the
individual instructions in the program.

2.2.3 PROGRAMS FOR NUMERIC OPERATION PART

Execution of programs created for numeric operation part is controlled using instructions
prepared exclusively for this purpose.
Example
NUMEXECUTE
NUMABORT
NUMCONTINUE
NUMSTATUS
NUMKILL
The program name is fixed to numpg. Numeric operation programs cannot be written using
KLadder.

2-5
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.2.4 SIGNALS USED IN NUMERIC OPERATION PART

Since numeric operation programs are PC programs processed in the CPU in the robot
controller, the signals used are the same as those for the robot. Correspondence between
signals used in the numeric operation part and in the basic operation part is shown below.

Numeric
Basic Operation part Correspondence
Operation part
Notation signal &Xnnnn
Input See chart in 2.3
Limits 1-960 &X0000-&X03C0
Notation signal &Ynnnn
Output See chart in 2.3
Limits 1-960 &Y0000-&Y03C0
Data Notation &Dnnnn
variable Read/ Write with AS language
register Limits &D0000-&D07FF

2-6
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.3 SIGNAL ALLOCATION WITH FIELDBUS

Signals used in basic operation part correspond to those used in robot (OX/ WX, SIGNAL,
etc.) as shown below. This relationship varies depending on the specification of the general
purpose Fieldbus that is installed.

Standard

AS Software KLogic Software Hardware


(1TW Board)

[Output Signal] [Input Signal]

1 &X0000
…. ….
Number of &X01FF
[IN]
I/O
&X0200 1001
…. ….
&X02FF Number of
I/O
&X0300
….
….
&X07FF
[Input Signal] [Output]
1001 &Y0000
…. ….
Number of &Y01FF [OUT]
I/O
&Y0200 1
…. ….
&Y02FF Number of
I/O
&Y0300
….
….
&Y07FF

2-7
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

General Purpose Fieldbus I/O Option ON

AS Software KLogic software Hardware


[Input] [Input]
No of signals used ∗ No of signals used ∗
[Output signal] 1-512 513-960

1 &X0000 &X0000
…. …. ….
Number &X01FF &X03FF
[IN]
of I/O
&X0200 &X0400 1001 Local Port
…. …. …. Master Port
&X02FF &X07C0 Number
of I/O Slave Port
&X0300 &X07C1
…. …. 1TW
…. ….
&X07FF &X07FF
Fieldbus
[Input] [Input]
No of signals used ∗ No of signals used ∗
[Input Signal] 1-512 513-960 Fieldbus
1001 &Y0000 &Y0000 [OUT]
…. …. ….
Number 1 Local Port
&Y01FF &Y03FF
of I/O …. Master Port
&Y0200 &Y0400 Number Slave Port
…. …. of I/O
&Y02FF &Y07C0

&Y0300 &Y07C1
…. ….
…. ….
2.4 &Y07FF &Y07FF

NOTE* Number of signals used:


・ Total number of DO / MAS and SLA in ZSIGNAL command.
・ Total number of external output signals, master port signals and slave port signals in Aux.
0611 Number of I/O Signals.

2-8
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.4 KLOGIC MONITOR

KLogic monitor displays KLogic execution status on the liquid crystal display of the teach
pendant. Execution status and operation time for both the basic operation and the numeric
operation part can be displayed via this function.

2.4.1 STARTING KLOGIC MONITOR

Pressing <Monitor 1> or


<Monitor2> on the teach
pendant displays the monitor
menu as in figure shown on
the left.

Select [80. KLogic Monitor]


from the menu. Another menu
appears as shown in the left
figure. From the menu, select
either [1. Basic Operation] or
[2. Numeric Operation].

2-9
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Selecting [1.Basic Operation]


displays, the numeric operation
part monitor as in the figure
shown on the left.

Selecting [2.Numeric Operation]


displays, the numeric operation
part monitor as in the figure
shown on the left.

2-10
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.4.2 DETAILS OF KLOGIC MONITOR DISPLAY

2.4.2.1 BASIC OPERATION PART MONITOR

Items displayed in the Basic operation part monitor are as follows:

[Basic Operation Status]


Displays execution status of Basic operation program. “Program is running” or “Program is
not running” is displayed depending on the execution status.

[MaximumCycles]
Displays the greatest time allowed to complete one execution cycle. If the actual time
required for completing this cycle exceeds the set time, error occurs and the program stops.
The set time is changed via LSQ_CYCMAX command. Unit is ms.

[Cycles of program execution]


Displays execution time of currently executing program. Unit is ms.

[LSQPG]
Displays whether basic operation part program lsqpg exists or not. “Yes” is displayed when
1sqpg exists, and “No” is displayed when it does not.

2-11
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.4.2.2 NUMERIC OPERATION PART MONITOR

Items displayed in the Numeric operation part monitor are as follows.

9
7

[Numeric Operation Status]


Displays execution status of the numeric operation program. Depending on whether program
is being executed or not, “Program is running” or “Program is not running” is displayed.

[Program Execution Time]


Displays time taken to complete current program execution. Unit is ms.

[Program Execution Time (Average)]


Displays average time taken to complete current program execution. Unit is ms.

[NUMPG]
Displays whether numeric operation part program numpg exists or not. “Yes” is displayed
when numpg exists, and “No” is displayed when it does not.

2-12
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.5 KLOGIC LADDER DISPLAY

KLogic basic operation part of can be displayed on the teach pendant as a ladder diagram in a
KLadder-like format. Status of each contact is displayed, which can be used to check the
program execution status.

2-13
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.5.1 STARTING KLOGIC LADDER DISPLAY

Pressing Menu on the


teach pendant displays a
pull-down menu as in the
figure shown on the left.

Select
[KLogic Ladder Disp(lay)]
on the menu. The ladder
diagram of the basic
operation part program
(lsqpg) currently executing
or last executed is
displayed.

If the basic operation


program does not exist or
exists but has never been
executed, a blank screen
appears.

2-14
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.5.2 DETAILS OF KLOGIC LADDER DISPLAY

2.5.2.1 DETAILS OF LADDER DISPLAY SCREEN

Function of each button on the display is as follows:

<Prev(ious) Page>, <Next Page>


Displays the previous or next four lines of the ladder diagram. Pressing S key + ↑ ↓
on the teach pendant functions the same as these buttons.

<Sig.(nal) Search>
Displays the signal search screen. For details, refer to 2.5.2.2 Signal Search Screen.

<Step Search>
Displays the step search screen. For details, refer to 2.5.2.3 Step Search Screen.

2-15
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

1. Four lines are displayed on the screen at a time.


2. Maximum of 11 blocks (circuits) are displayed on one line. Blocks exceeding this number
are displayed on the following line. When line changes, marks indicating a new line is
displayed at the end and at the beginning of the applicable circuit as shown in the figure
below.

Marks for
new line

3. Step number is displayed on white background on the left end of each line.
4. Coil for the circuit is displayed at the end of each line. The comment for the coil is
displayed on the right end of each line.
5. Comments for the contacts are shown above the contacts. Maximum of 18 characters are
shown for the comment.
6. [EOF] is displayed after the last block of the ladder.
7. Coils, contacts and names of counters and timers (C0001,T0001,etc.) are displayed in
red when their signals are ON.
8. If lsqpg is changed while ladder diagram is displayed, dialog box to verify the update
appears. When verified, the updated program is reflected on the ladder diagram
9. If the program includes command that cannot be changed into ladder diagram, only the
program data before that command is changed, and ??? is displayed at the end of the line
that contains the command that cannot be changed.

2-16
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.5.2.2 SIGNAL SEARCH SCREEN

Searches for contacts and coils on the ladder diagram based on the signal numbers.

Press the <Sig. Search> at


the bottom of ladder
display screen.

The pop-up screen


shown on the left
appears. To enter the
signal numbers, press the
<Input char> button in
the pop-up screen.

2-17
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Keyboard screen shown on


the left appears. Input
signal number via the
displayed keyboard.

Signal numbers are entered using an alphabet (X, Y, M, K, T, C, D, V) identifying the signal
type and hexadecimal number of four digits or less. Enter the alphabet for the signal type and
at least one digit of the hexadecimal number to start the search for contacts and coils starting
with that alphabet and number. Both signal type and hexadecimal number must be entered;
appointing only either one is not valid.
Example Enter X0. → All signals from X0000 to X0FFF are searched.

Pressing Enter key returns


the display from the
keyboard screen to the
pop-up screen.

When <Begin Search>,


<Search Next>,
<Search Back> is pressed,
signal search starts.

< Begin Search >


Searches from the top of the ladder diagram until the first applicable step is found. The
applicable step is then displayed.

2-18
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

<Search Back>
Searches from higher to lower step number until the first applicable step is found. The
applicable step is then displayed.

<Search Next>
Searches from lower to higher step number until the first applicable step is found. The
applicable step is then displayed.

2.5.2.3 STEP SEARCH SCREEN

Displays steps of specified step number.

Press the <Step Search>


button at the bottom of the
ladder display.

Pop-up screen for step


search is displayed. Enter
the step number to display
and press <Begin Search>.
The circuit including the
specified step is displayed
with its first line at the top of
screen.

2-19
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.6 AS LANGUAGE

This section explains the commands and instructions that are processed by KLogic and used
exclusively for sequence control.

Basic operation programs can be written in AS language. However, it is recommended that


ladder diagram be created using KLadder and then converting it to AS program. Numeric
operation programs are created using instructions described in this section and other AS
language instructions available for PC programs.

EXAMPLE

Keyword Parameter

LSQIO signal number

Parameters marked with can be omitted.

Always enter a space between the keyword and the parameter.

↵ represents the Enter key in the examples.

2-20
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.6.1 COMMANDS/ INSTRUCTIONS FOR BASIC OPERATION PART

2.6.1.1 MONITOR COMMANDS

The monitor commands used to control the basic operation program (lsqpg) are listed below
and described in the following pages.

LSQEXECUTE Starts execution of lsqpg from the first step.


LSQABORT Stops lsqpg during execution.
LSQREWRITE Overwrites the contents of the lsqpg.
LSQSTATUS Displays current progress of lsqpg.
LSQIO Displays current status/ value of specific signals.
LSQ_CYCMAX Sets max. length of time to process lsqpg in one cycle.
LSQINIT Clears signal status.

2-21
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Monitor Command
LSQEXECUTE

Function
Executes program for basic operation part (lsqpg).

Explanation
The name for basic operation program is fixed to “lsqpg”. If the program (lsqpg) cannot be
found, error occurs:
(P1038) Program does not exist

If the basic operation program has already been started, error occurs:
(P2055)[LSEQ] Program is being executed

When the program is executed using non-existing signal numbers, error occurs:
[LSEQ] Compile error Program LSQPG
Step 2 Memory step 2
(P2056)[LSEQ] Signal number has exceeded upper/ lower limit.

Example
>LSQEXECUTE

Monitor Command
LSQABORT

Function
Stops execution of the basic operation program (lsqpg) when it is running.

Example
>LSQABORT

2-22
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Monitor Command
LSQREWRITE

Function
Rewrites the contents of basic operation program (lsqpg) currently being executed.

Explanation
Overwrites basic operation program while it is being executed. Changes take effect after
program has finished execution.

To rewrite the program, first modify the program (lsqpg) and then execute this command.

The modified program overwrites the program being executed immediately after the last step
of the program is executed.

If there is a format error, etc. in the modified program, error message is displayed and the
original program continues to be executed without being overwritten.

When there is an LSQ START instruction in the modified program, program execution
continues from the step after this instruction.

Example
>LSQREWRITE

2-23
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Monitor Command
LSQSTATUS

Function
Displays the current status of the basic operation part.

Explanation

1. [LSEQ] Program execution status: Executing

2. Setting status:
Max. execution cycle (ms) : 1000
Program execution cycle (ms) : 2

3. Program
LSQPG exists

1. [LSEQ] program execution status:


Displays the current program execution status of the basic operation part. The message
displayed is “Executing” or “Not executed” accordingly.

2. Setting status:
Displays the settings for basic operation part.

Max. execution cycle (ms)


Displays the greatest time allowed to complete one execution cycle.
If the actual time required to complete this cycle exceeds this set time, error occurs.
The max. time is set via LSQ_CYCMAX command.

Program execution cycle (ms)


Displays the time taken to execute the lsqpg program.

3. Program
Displays if basic operation program lsqpg exists or not.
The message displayed is “LSQPG exists” or “LSQPG does not exist” accordingly.

2-24
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Monitor Command
LSQIO signal number
LSQIO/X signal number
LSQIO/Y signal number
LSQIO/M signal number
LSQIO/K signal number
LSQIO/T signal number
LSQIO/C signal number
LSQIO/CNTH signal number
LSQIO/D signal number
LSQIO/V signal number

Function
Displays the status of signals currently being used in the basic operation program.

Parameter
Signal number
The signal number available differ per signal type used. Thirty two (32) signal numbers are
available for each signal type.

Example 1: Displays 1 - 32, 1001 - 1032, 2001 - 2032.


2: 33 - 64, 1033 - 1064, 2033 - 2064
Format & upper/lower Item Signal
Signal Type Qualifier limits number number
Input /X &X0000-&X07FF 2048 1-64
Output /Y &Y0000-&Y07FF 2048 1-64
Internal Relay /M &M0000-&M07FF 2048 1-64
Keep Relay /K &K0000-&K01FF 512 1-16
Timer /T &T0000-&T00FF 256 1-8
Counter /C &C0000-&C00FF 256 1-8
Current counter
value /CNTH - 256 1-4
Data register /D &D0000-&D07FF 2048 1-32
Special relay /V &V0000-&V00FF 256 1-8
When the signal number is omitted, 1 is input automatically.

Explanation
Data register and current counter value are displayed in 16 bit format (displayed as
hexadecimal numbers). Other types of signals are displayed in relay conditions (1 bit).
Signal types are sorted by qualifiers (/X, /Y, /M, etc.). If no qualifier is input, then status for
input (/X), output (/Y), internal relay (/M), keep relay (/K) qualifiers are displayed.

2-25
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Monitor Command
LSQ_CYCMAX max. execution cycle

Function
Sets the maximum execution cycle for basic operation part.

Parameter
Max. execution cycle
Sets the maximum time allowed for executing basic operation program. Unit: [ms].
Available Input range: 2-1000.

Explanation
When the execution time for the basic operation program exceeds the maximum cycle time set
via this command, following error occurs:
(P2072) [LSEQ] Exceeding maximum value of execution cycle

Acceptable value for actual processing is in multiples of 2 ms. For values that cannot be
divided evenly into a multiple of 2, the quotient is used as the setting value and any remainder
of the division is ignored.

The currently set value can be seen via LSQSTATUS command.

Example
>LSQ_CYCMAX 200 Sets the maximum execution cycle to 200 ms.

2-26
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Monitor Command
LSQINIT

Function
Clears all signals other than input signals (&X).

Explanation
Clears status of the signals.

Attempting LSQINIT while basic operation is currently being executed causes the error shown
below:
(P2055)[LSEQ] program is being executed.

2-27
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.6.1.2 PROGRAM INSTRUCTIONS

2.6.1.2.1 BASIC OPERATION INSTRUCTION

LSQ STR Starts operation for specified make-contact. Execution speed: 2 μs

LSQ STRN Starts operation for specified break- contact. Execution speed: 2 μs

LSQ AND Connects specified make-contact in serial. Execution speed: 2 μs

LSQ ANDN Connects specified break-contact in serial. Execution speed: 2 μs

LSQ OR Connects specified make-contact in parallel. Execution speed: 2 μs

LSQ ORN Connects specified break-contact in parallel. Execution speed: 2 μs

LSQ ANDS Connects two logic blocks in serial. Execution speed: 2 μs

LSQ ORS Connects two logic blocks in parallel. Execution speed: 2 μs

LSQ OUT Outputs an operation result to a device. Execution speed: 2 μs

LSQ SET Sets specified keep relay to ON. Execution speed: 2 μs

LSQ RST Resets specified keep relay to OFF. Execution speed: 2 μs

LSQ FST Forces ON result of operation unconditionally. Execution speed: 2 μs

LSQ NOT Reverses stored operation result. Execution speed: 2 μs

Syntax of instruction in basic operation programs.

Comma after instruction

LSQ STR, signal number


Parameter
One space after “LSQ”
In the explanation for each command/ instruction:
Number of Steps: Indicates how many steps each instruction is equivalent to.
Execution Time: Shows the time required for completing each instruction.

2-28
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ STR, signal number
LSQ STRN, signal number

Symbol
LSQ STR

LSQ STRN

Number of Steps 1
Execution Time 2 μs

Function
LSQ STR starts operation for specified make-contact. LSQ STRN starts operation for
break-contact. The ON/OFF information of the device specified by the signal number is
stored in the register as the result of the operation.

Parameter
Signal number
Specifies the address of the contact to be placed on the circuit. Add “&” as first character of
the signal number.

Acceptable signal types


X Y M K T C D V Constant
Yes Yes Yes Yes Yes Yes No Yes No

Example

LSQ STR, &X0000 X0000 Y0000


LSQ OUT, &Y0000

LSQ STRN, &X0001 X0001 Y0001


LSQ OUT, &Y0001

2-29
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ AND, signal number
LSQ ANDN, signal number

Symbol
LSQ AND

LSQ ANDN

Number of steps 1
Execution Time 2 μs

Function
Connects contacts in serial. LSQ AND connects make-contact while LSQ ANDN connects
break-contact. Calculates the logical product (AND) between the ON/OFF information of the
specified device and the current operation results in the register, then the new result is stored in
the register.

Parameter
Signal number
Specifies the address of the contact to be placed on the circuit. Add “&” as the first character
of the signal number.

Acceptable signal types


X Y M K T C D V Constant
Yes Yes Yes Yes Yes Yes No Yes No

Example

LSQ STR, &X0000


X0000 X0001 Y0000
LSQ AND, &X0001
LSQ OUT, &Y0000

LSQ STR, &X0002 X0002 X0003 Y0001


LSQ ANDN, &X0003
LSQ OUT, &Y0001

2-30
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ OR, signal number
LSQ ORN, signal number

Symbol
LSQ OR

LSQ ORN

Number of steps 1
Execution Time 2 μs

Function
Connects the contacts in parallel. LSQ OR connects make-contact, and LSQ ORN, connects
break-contact. Calculates the logical sum (OR) between the ON/OFF information of the
specified device and the current operation result in the register, then the new result is stored in
the register.

Parameter
Signal number
Specifies the address of the contact to be placed on the circuit. Add “&” as the first character
of the signal number.

Acceptable signal types


X Y M K T C D V Constant
Yes Yes Yes Yes Yes Yes No Yes No

Example
LSQ STR, &X0000
X0000 Y0000
LSQ OR, &X0001
LSQ OUT, &Y0000
X0001

LSQ STR, &X0002


LSQ ORN, &X0003 X0002 Y0001
LSQ OUT, &Y0001
X0003

2-31
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ ANDS

Symbol
LSQ ANDS

Number of steps 1
Execution Time 2 μs

Funct
ion
Connects two logic blocks in serial. Calculates the logical product (AND) between the two
blocks and stores the result in the register.

Example

LSQ STR, &X0000 X0000 X0002 Y0000


LSQ OR, &X0001
LSQ STR, &X0002
X0001 X0003
LSQ OR, &X0003
LSQ ANDS
LSQ OUT, &Y0000

2-32
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ ORS

Symbol

LSQ ORS

Number of steps 1
Execution Time 2 μs

Function
Connects two logic blocks in parallel. Calculates the logical sum (OR) between the two
blocks and stores the result in the register.

Example

LSQ STR, &X0000


LSQ AND, &X0001 X0000 X0001 Y0000
LSQ STR, &X0002
LSQ AND, &X0003
LSQ ORS
X0002 X0003
LSQ OUT, &Y0000

2-33
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ OUT, signal number

Symbol
LSQ OUT

Number of steps 1
Execution Time 2 μs

Function
Outputs the operation results stored in the register to the specified device.

Parameter
Signal number
Specifies the address of the device in which to store the calculation results. Add “&” as the
first character of the signal number.

Acceptable signal types


X Y M K T C D V Constant
No Yes Yes Yes No No No No No

Example
X0000 Y0000
LSQ STR, &X0000
LSQ OUT, &Y0000

LSQ STRN, &X0001 X0001 Y0001


LSQ OUT, &Y0001
LSQ OUT, &Y0002
Y0002

2-34
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ SET, signal number

Symbol
LSQ SET S

Number of steps 1
Execution Time 2 μs

Function
Turns ON the keep relay when the operation result before this instruction is ON (=1).

Parameter
Signal number
Specifies the keep relay to turn ON.

Acceptable signal types


X Y M K T C D V Constant
No No No Yes No No No No No

Example

LSQ STR, &X0000 X0000 K0000


LSQ SET, &K0000 S

2-35
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ RST, signal number

Symbol
LSQ RST R

Number of signals 1
Execution Time 2 μs

Function
Turns OFF the specified keep relay when the operations results before this instruction are ON
(=1).

Parameter
Specifies the keep relay to turn OFF.

Acceptable signal types


X Y M K T C D V Constant
No No No Yes No No No No No

Example

LSQ STR, &X0000 X0000 K0000


LSQ RST, &K0000 R

2-36
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ FST

Symbol
LSQ FST

Number of steps 1
Execution Time 2 μs

Function
Turns ON (=1) the operation result regardless of the condition

Example

Y0000
LSQ FST
LSQ OUT, &Y0000

2-37
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ NOT

Symbol
LSQ NOT

Number of steps 1
Execution Time 2 μs

Function
Reverses the logical value of the operation result stored in the register. (OFF is changed to
ON, ON is changed to OFF.)

Example

X0000 M0002 Y0000


LSQ STR, &X0000
LSQ ORN, &X0001
X0001
LSQ AND, &M0002
LSQ NOT
LSQ OUT, &Y0000

2-38
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.6.1.2.2 APPLIED OPERATION INSTRUCTION

LSQ TMR Sets timer and timer length for 100 ms timer. Execution speed 10 μs
LSQ TMRS Sets timer and timer length for 100 ms integrating Execution speed 10 μs
LSQ CNTH Up/ Down counter function. Execution speed 10 μs
LSQ PTS Sets operation result ON at rising edge. Execution speed 10 μs
LSQ NTS Sets operation result ON at trailing edge. Execution speed 10 μs
LSQ MOVE Transfers byte data to a register. Execution speed 10 μs
LSQ WMOVE Transfers word data to a register. Execution speed 10 μs
LSQ MOV Transfers 2 digits of hexadecimal byte data to a Execution speed 10 μs
LSQ WMOV Transfers 4 digits of hexadecimal word data to a Execution speed 10 μs
LSQ MOVR Transfers 3 digits of decimal byte data to a register. Execution speed 10 μs
LSQ WMOVR Transfers 5 digits of decimal word data to a register. Execution speed 10 μs
LSQ WBMOV Transfers blocks of word data. Execution speed 200 μs
LSQ CMPEQ Checks if value of data in block 1 = block 2. Execution speed 10 μs
LSQ CMPNEQ Checks if block 1 does not equal block 2 (!=) Execution speed 10 μs
LSQ CMPGT Checks if block 1 > block 2. Execution speed 10 μs
LSQ CMPGE Checks if block 1 >= block 2. Execution speed 10 μs
LSQ CMPST Checks if block 1 < block 2. Execution speed 10 μs
LSQ CMPSE Checks if block 1 <= block 2. Execution speed 10 μs
LSQ WBCD Converts binary data into BCD then stores result. Execution speed 10 μs
LSQ WBIN Converts BCD data into binary data then stores result.Execution speed 10 μs
LSQ WBSRL Shifts word data left or right “n” number of bits. Execution speed 10 μs
LSQ WUP Shifts word data up to a higher rank. Execution speed 200 μs
LSQ WDOWN Shifts word data up to a lower rank. Execution speed 200 μs
LSQ WBRST Resets bit position to zero (0). Execution speed 10 μs
LSQ USC Defines ON/OFF function of User Set Clock. Execution speed 10 μs
LSQ FLK Sets time frequency for turning ON→ OFF. Execution speed 10 μs
LSQ START Designates step where program execution starts. Execution speed 10 μs
LSQ + 8 bit data addition Execution speed 10 μs
LSQ W+ 16 bit data addition Execution speed 10 μs
LSQ - 8 bit data subtraction Execution speed 10 μs
LSQ W- 16 bit data subtraction Execution speed 10 μs
LSQ X 8 bit data multiplication Execution speed 10 μs

2-39
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

LSQ WX 16 bit data multiplication Execution speed 10 μs


LSQ / 8 bit data division Execution speed 10 μs
LSQ W/ 16 bit data division Execution speed 10 μs
LSQ AFLGCLR Sets clear mode for applied operation instruction flag Execution speed 2 μs
LSQ AFLGCLRN Deselects clear mode for applied operation instruction Execution speed 2 μs
flag

2-40
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ TMR, timer, timer value

Symbol
LSQ TMR TMR Timer Timer value

Number of steps 2
Execution Time 10 μs

Function
Starts the timer when the operation result before LSQ TMR is ON and turns ON the specified
device (&T0000-&T00FF) when the timer reaches the specified value.

Two types of timers can be used with LSQ TMR instruction:


1. Direct 100 ms Timer
Values is specified directly in constants in units of 100 ms.
2. Indirect 100 ms Timer
Values is specified by the values stored in the specified register. The values are in units of
100 ms.

Parameter
Timer
Specifies the timer.

Timer value
For direct timer, specifies the time to wait before timer turns ON in real numbers from 0.0 –
6553.5 seconds. Can be specified in increments of 0.1 s.

For indirect timer, specifies the register. The timer turns ON when the time value stored in
the specified register elapses.

Acceptable signal types


X Y M K T C D V Constant
Timer N/A N/A N/A N/A Yes N/A N/A N/A N/A
Timer values (Direct) N/A N/A N/A N/A N/A N/A N/A N/A Yes
Timer Values (Indirect) Yes Yes Yes Yes N/A N/A Yes N/A N/A

2-41
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

[ NOTE ]

A sampling time of 8 ms is used in the software calculation, thus if


the specified time value is not a multiple of eight, then the timer
actually turns ON earlier than the specified time. For example, if
100 ms is specified, timer turns ON at 96 ms, 4 ms earlier than set
time.

Example

Direct Timer
Turns ON Y0002 10 seconds after X0000 has been turned ON.

LSQ STR, &X0000 X0000


LSQ TMR, &T0001, 10.0 TMR T0001 10.0

LSQ STR, &T0001 T0001 Y0002


LSQ OUT, &Y0002

Indirect timer
The timer value is set by the value stored in D0005. Y0006 is turned ON when the time
value in D0005 elapses after X0003 has been turned ON.

LSQ STR, &X0003


X0003
LSQ TMR, &T0004, &D0005 TMR T0004 D0005
LSQ STR, &T0004
T0004 Y0006
LSQ OUT, &Y0006

2-42
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ TMRS, integrating timer, timer value

Symbol
TMR Integrating Timer Timer value
LSQ TMRS R

Number of steps 2
Execution Time 10 μs

Function
The timer runs while the operation result before this instruction is ON (=1). When the
integrated time reaches to the specified value, turns ON the specified device (&T0000 -
&T00FF).

The counter value (current value) is not reset until R (reset) input is turned ON.

There are two types of timers used with this instruction:


1. Direct 100 ms integrating timer, incremented in units of 100 ms
Timer value is specified directly in units of 100ms.
2. Indirect 100 ms integrating timer, incremented in units of 100 ms
Timer value is specified by the value stored in the specified register. The values are in units
of 100ms.

Parameter
Integrating Timer
Specifies the timer.

Timer value
For direct timer, specifies the time to wait before timer turns ON in real numbers from 0.0 –
6553.5 seconds. Can be specified in increments of 0.1 s.

For indirect timer, specifies the register. The timer turns ON when the time value stored in
the specified register elapses.

2-43
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Acceptable signal types


X Y M K T C D V Constant
Timer N/A N/A N/A N/A Yes N/A N/A N/A N/A
Timer values (Direct) N/A N/A N/A N/A N/A N/A N/A N/A Yes
Timer values (Indirect) Yes Yes Yes Yes N/A N/A Yes N/A N/A

[ NOTE ]

A sampling time of 8 ms is used in the software calculation, thus if


the specified time value is not a multiple of eight, then the timer
actually turns ON earlier than the specified time. For example, if
100 ms is specified, timer turns ON at 96 ms, 4 ms earlier than set
time.

Example

Direct integrating timer


Turns ON Y0003 if total accumulated total time since X0000 was turned ON reaches 12.5 sec,
and turns it OFF when X0001 is ON.

X0000
LSQ STR, &X0000
TMR T0002 12.5
LSQ STR, &X0001
LSQ TMRS, &T0002, 12.5 X0001
R
LSQ STR, &T0002
T0002 Y0003
LSQ OUT, &Y0003

Indirect integrating timer


Turns ON Y0008 if accumulated total time since X0004 was turned ON reaches the value
stored in register D0007, and turns it OFF if X0005 is ON.
X0004
LSQ STR, &X0004 TMR T0006 D0007
LSQ STR, &X0005
X0005
LSQ TMRS, &T0006, &D0007 R
LSQ STR, &T0006
T0006 Y0008
LSQ OUT, &Y0008

2-44
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ CNTH, counter, counter value

Symbol
CNT counter counter value
LSQ CNTH U/D
R

Number of steps 2
Execution Time 10 μs

Function
When R (reset) input is OFF and U/ D (up/ down) input is ON, the current counter value
decreases by increments of –1 each time CNT counter input turns ON. When both R(reset)
input and U/ D input are OFF, +1 is added to the counter each time the CNT input turns ON,
then the specified device is turned ON when the counter value exceeds the set value. When R
input is ON, the counter value is reset to 0 and the specified device is turned OFF.

Two types of counters are used with this instruction:


1. Direct Up/ Down counter
The counter value is specified directly using the entered constant.
2. Indirect Up/ Down counter
The counter value is set by the value stored in the specified register
(setting range: 0 – 65535).

Parameter
Counter
Specifies the Up/ Down counter.

Counter value
For direct counter, specifies the values in constants. Acceptable range: 0 – 65535.

For indirect counter, specifies the register.


Acceptable signal types
X Y M K T C D V Constant
Counter N/A N/A N/A N/A N/A Yes N/A N/A N/A

Counter value (Direct) N/A N/A N/A N/A N/A N/A N/A N/A Yes

Counter value (Indirect) Yes Yes Yes Yes N/A N/A Yes N/A N/A

2-45
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Example

Direct counter
Compares: A = number of times X0000 turns ON with X0002 OFF, and B = number of times
X0000 turns ON with X0002 is ON. If the result A-B equals or exceeds 5, then Y0004 is
turned ON. If X0001 is ON, Y0004 is turned OFF.

X0000
LSQ STR, &X0000
CNT C0003 5
LSQ STR, &X0002
LSQ STR, &X0001 X0002
U/D
LSQ CNTH, &C0003, 5
LSQ STR, &C0003 X0001
R
LSQ OUT, &Y0004
C0003 Y0004

Indirect counter
Compares: A = number of times X0005 turns ON with X0007 OFF, and B = number of times
X0005 turns ON with X0007 is ON. If the result A-B equals or exceeds the value stored in
D0009, then Y0010 is turned ON. If X0006 is ON, Y0010 is turned OFF.

X0005
LSQ STR, &X0005 CNT C0008 D0009
LSQ STR, &X0007
X0007
LSQ STR, &X0006 U/D
LSQ CNTH, &C0008, &D0009
X0006
LSQ STR, &C0008 R
LSQ OUT, &Y0010
C0008 Y0010

2-46
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ PTS
LSQ NTS

Symbol
PTS
LSQ PTS

NTS
LSQ NTS

Number of steps 1
Execution Time 10 μs

Function
LSQ PTS instruction turns the operation result ON (=1) for duration of 1 scan when the last
operation prior to this instruction resulted in OFF → ON.

LSQ NTS instruction turns the operation result ON (=1) for duration of 1 scan when the last
operation prior to this instruction resulted in ON → OFF.

In a single program, the sum number of taught LSQ PTS instructions plus number of taught
LSQ NTS instruction cannot exceed 255.

Example

LSQ STR, &X0000 X0000 PTS Y0001


LSQ PTS
LSQ OUT, &Y0001

LSQ STR, &X0002


LSQ NTS
X0002 NTS Y0003
LSQ OUT, &Y0003

2-47
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ MOVE, origin register, destination register
LSQ WMOVE, origin register, destination register

Symbol
LSQ MOVE MOVE origin register, destination register

LSQ WMOVE WMOVE origin register, destination register

Number of steps 2
Execution Time 10 μs

Function
Transfers data from the origin register to the destination register. The data in the origin
register is saved and remains unchanged.

LSQ MOVE transfers data in units of bytes.

LSQ WMOVE transfers data in units of words.

Parameter
Origin register
Specifies the address of the source register from which to transfer the data. Add “&” as the
first character of the signal number.

Destination register
Specifies the address of the register in which to store the data. Add “&” as the first character
of the signal number.

Acceptable signal types


X Y M K T C D V Constant

Origin register Yes Yes Yes Yes Yes Yes Yes N/A N/A

Destination register N/A Yes Yes Yes Yes Yes Yes N/A N/A

2-48
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Example
1-byte transfer (LSQ MOVE):
When X0000 changes from OFF to ON, transfers the lower 8 bits in the data register D0001 to
the upper 8 bits in data register D0002.

LSQ STR, &X0000


LSQ PTS X0000 PTS
MOVE D0001L D0002H
LSQ MOVE, &D0001L, D0002H

Word transfer (LSQ WMOVE):


When X0001 turns ON, transfers the data in register D0003 to registers Y0040 - Y004F.
X0001
LSQ STR, &X0001
WMOVE D0003 Y0004W
LSQ WMOVE, &D0003, &Y0004W

2-49
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ MOV, origin register, destination register
LSQ WMOV, origin register, destination register

Symbol
LSQ MOV MOV origin register, destination register

LSQ WMOV WMOV origin register, destination register

Number of steps 2
Execution Time 10 μs

Function
Transfers hexadecimal constant from the origin register to a destination register.

LSQ MOV transfers 2 digits of hexadecimal byte data


LSQ WMOV transfers 4 digits of hexadecimal word data.

Parameter
Origin register
Specifies the register from which the hexadecimal data is to be transferred. Acceptable range
for LSQ MOV is 0 – FF. Acceptable range for LSQ WMOV is 0 – FFFF. The transferred
data must be expressed as hexadecimal constant.

Destination register
Specifies the register in which to store the transferred data. Add “&” as the first character of
the signal number.

Acceptable signal types


X Y M K T C D V Constant
Origin register N/A N/A N/A N/A N/A N/A N/A N/A Yes
Destination register N/A Yes Yes Yes Yes Yes Yes N/A N/A

2-50
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Example
Transferring 2 digits of hexadecimal data (LSQ MOV):
When X0000 changes from OFF to ON, the hexadecimal data “2F” is transferred to the upper
8 bits field of data register D0002.

LSQ STR, &X0000


X0000 PTS
LSQ PTS MOV 2Fh D0002H
LSQ MOV, ^H2F, &D0002H

Transferring 4 digits of hexadecimal data (LSQ WMOV):


When X0001 is ON, the hexadecimal data “12AA” is transferred to registers Y0040 - Y004F.

LSQ STR, &X0001 X0001


LSQ WMOV, ^H12AA, &Y0004W WMOV 12AAh Y0004W

2-51
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ MOVR, origin register, destination register
LSQ WMOVR, origin register, destination register

Symbol
LSQ MOVR MOVR origin register, destination register

LSQ WMOVR WMOVR origin register, destination register

Number of steps 2
Execution Time 10 μs

Function
Converts the decimal constant in the origin register into binary data and transfers it to the
destination register.

LSQ MOVR transfers 3-digits decimal byte data.


LSQ WMOVR transfers 5-digits decimal word data.

Parameter
Origin register
Specifies the register from which the decimal data is to be transferred. Acceptable range for
LSQ MOVR is 0 – 255. Acceptable range for LSQ WMOVR is 0 – 65535.

Destination register
Specifies the register in which to store the transferred data. Add “&” as the first character of
the signal number.

Acceptable signal types


X Y M K T C D V Constant
Origin register N/A N/A N/A N/A N/A N/A N/A N/A Yes
Destination register N/A Yes Yes Yes Yes Yes Yes N/A N/A

2-52
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Example
Transferring 3-digit decimal byte data (LSQ MOVR):
When X0000 changes from OFF to ON, decimal data “255” (“FF” in hexadecimal) is
transferred to the lower 8 bits in the data register D0003.

LSQ STR, &X0000


LSQ PTS X0000 PTS
LSQ MOVR, 255, &D0003L MOVR 255 D0003L

Transferring 5-digit decimal word data (LSQ WMOVR):


If X0001 is ON, decimal data “4778” (“12AA” in hexadecimal) is transferred to data register
D0004.

LSQ STR, &X0001 X0001


LSQ WMOVR, 4778, &D0004 WMOVR 4778 D0004

2-53
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ WBMOV, origin register, destination register, number of words

Symbol
LSQ WBMOV WBMOV origin register destination register number of words

Number of steps 3
Execution Time 200 μs

Function
Transfers the specified number of words data from the origin register to a corresponding
amount of the memory area in the destination register. Transfers maximum of 64 words of
data.

Parameter
Origin register
Specifies the signal number representing the address of the first data in the range of data to be
transferred. Add “&” as the first character of the signal number.

Destination register
Specifies the signal number representing the address of the first data in the destination register
where the data is to be transferred. Add “&” as the first character of the signal number.

Number of words
Specifies the number of words of data to be transferred, in integer from 1 – 64.

Acceptable signal types


X Y M K T C D V Constant
Origin register Yes Yes Yes Yes Yes Yes Yes N/A N/A
Destination register N/A Yes Yes Yes Yes Yes Yes N/A N/A
Number of words N/A N/A N/A N/A N/A N/A N/A N/A Yes

Example
Indirect block transfer word data (LSQ WBMOV):
If X0001 is ON, transfers 12 words of data from D0000 to the area starting from D0020.

LSQ STR, &X0001 X0001


LSQ WBMOV, &D0000, &D0020, 12 WBMOV D0000 D0020 12

2-54
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ CMPEQ, signal number 1, signal number 2

Symbol
LSQ CMPEQ = signal number 1 signal number 2

Number of steps 2
Execution Time 10 μs

Function
Compares the two 16 bit data blocks, and if they are equal, turns ON (=1) the operation result.

Parameter
Signal number 1, 2
Specifies the signal number of the devices from which stored data is to be compared. Add
“&” as the first character of the signal number.

Acceptable signal types


X Y M K T C D V Constant
Signal number 1 Yes Yes Yes Yes Yes Yes Yes N/A N/A

Signal number 2 N/A Yes Yes Yes Yes Yes Yes N/A N/A

Example
Turns ON Y0001 when the values of the data in D0001 and D0003 are equal.

LSQ CMPEQ, &D0001, &D0003 Y0001


LSQ OUT, &Y0001 = D0001 D0003

2-55
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ CMPNEQ, signal number 1, signal number 2

Symbol
LSQ CMPNEQ <> signal number 1 signal number 2

Number of steps 2
Execution Time 10 μs

Function
Compares two 16 bit data blocks and if they are not equal, turns ON (1) the operation result.

Parameter
Signal number 1, 2
Specifies the signal numbers of the devices containing the data to be compared. Add “&” as
the first character of the signal number.

Acceptable signal types


X Y M K T C D V Constant
Signal number 1 Yes Yes Yes Yes Yes Yes Yes N/A N/A
Signal number 2 N/A Yes Yes Yes Yes Yes Yes N/A N/A

Example
Turns ON Y0001 when the values of data in D0001 and D0003 are not equal.

LSQ CMPNEQ, &D0001, &D0003 Y0001


<> D0001 D0003
LSQ OUT, &Y0001

2-56
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ CMPGT, signal number 1, signal number 2

Symbol
LSQ CMPGT > signal number 1 signal number 2

Number of steps 2
Execution Time 10 μs

Function
Compares the two 16 bit data blocks and if the value for signal number 1 is greater than the
value for signal number 2, turns ON (1) the operation result.

Parameter
Signal number 1, 2
Specifies the signal numbers of the devices for which stored data is to be compared. Add “&”
as the first character of the signal number.

Acceptable signal types


X Y M K T C D V Constant
Signal number 1 Yes Yes Yes Yes Yes Yes Yes N/A N/A
Signal number 2 N/A Yes Yes Yes Yes Yes Yes N/A N/A

Example
Turns ON Y0001 when the value of the data in D0001 is greater than the value of the data in
D0003.

LSQ CMPGT, &D0001, &D0003 Y0001


LSQ OUT, &Y0001 > D0001 D0003

2-57
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ CMPGE, signal number 1, signal number 2

Symbol
LSQ CMPGE >= signal number 1 signal number 2

Number of steps 2
Execution Time 10 μs

Function
Compares two 16 bit data blocks and turns ON (1) the operation result if the data value in the
register set by signal number 1 is greater than or equal to the value in the register set by signal
number 2.

Parameter
Signal number 1, 2
Specifies the devices from where data will be read and compared. Add “&” as the first
character of the signal number.
Acceptable signal types
X Y M K T C D V Constant
Signal number 1 Yes Yes Yes Yes Yes Yes Yes N/A N/A

Signal number 2 N/A Yes Yes Yes Yes Yes Yes N/A N/A

Example
Turns on Y0001 when the value of the data in D0001 is greater than or equal to the value of the
data in D0003.

LSQ CMPGE, &D0001, &D0003 Y0001


>= D0001 D0003
LSQ OUT, &Y0001

2-58
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ CMPST, signal number 1, signal number 2

Symbol
LSQ CMPST < signal number 1 signal number 2

Number of steps 2
Execution Time 10 μs

Function
Compares two 16 bit data blocks and turns ON (1) the operation result if the data value in the
register set by signal number 1 is smaller than the value in the register set by signal number 2.

Parameter
Signal number 1, 2
Specifies the devices from where data will be read and compared. Add “&” as the first
character of the signal number.

Acceptable signal types


X Y M K T C D V Constant
Signal number 1 Yes Yes Yes Yes Yes Yes Yes N/A N/A
Signal number 2 N/A Yes Yes Yes Yes Yes Yes N/A N/A

Example
Turns ON Y0001 when the value of the data in D0001 is smaller than the value of the data in
D0003.

LSQ CMPST, &D0001, &D0003 Y0001


< D0001 D0003
LSQ OUT, &Y0001

2-59
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ CMPSE, signal number 1, signal number 2

Symbol
LSQ CMPSE =< signal number 1 signal number 2

Number of steps 2
Execution Time 10 μs

Function
Compares two 16 bit data blocks and turns ON (=1) the operation result if the data value in the
register set by parameter is smaller than or equal to the value in the register set by signal
number 2.

Parameter
Signal number 1, 2
Specifies the devices from where data will be read and compared. Add “&” as the first
character of the signal number.

Acceptable signal types


X Y M K T C D V Constant
Signal number 1 Yes Yes Yes Yes Yes Yes Yes N/A N/A

Signal number 2 N/A Yes Yes Yes Yes Yes Yes N/A N/A

Example
Turns ON Y0001 when the value of the data in D0001 is less than or equal to the value of the
data in D0003.

LSQ CMPSE, &D0001, &D0003 Y0001


=< D0001 D0003
LSQ OUT, &Y0001

2-60
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ WBCD, origin register, destination register

Symbol
LSQ WBCD WBCD origin register destination register

Number of steps 2
Execution Time 10 μs

Function
Converts the binary 16 bits data in the origin register into BCD code, then stores the code in the
destination register.

Parameter
Origin register
Specifies the address of the register continuing the binary data to be converted into BCD data.
Add “&” as the first character of the signal number.

Destination register
Specifies the register to store the converted data. Add “&” as the first character of the signal
number.

Acceptable signal types


X Y M K T C D V Constant
Origin register Yes Yes Yes Yes Yes Yes Yes N/A N/A
Destination register N/A Yes Yes Yes Yes Yes Yes N/A N/A

Example
When X0000 is ON, this program converts the binary data stored in D0001 to BCD 4-digit
code data and then stores the code in D0002.

X0000
LSQ STR, &X0000
WBCD D0001 D0002
LSQ WBCD, &D0001, &D0002

If the value in D0001 is “1200”, then “4608” is stored in D0002.

2-61
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ WBIN, origin register, destination register

Symbol
LSQ WBIN WBIN origin register destination register

Number of Steps 2
Execution Time 10 μs

Function
Converts the BCD code data stored in the origin register into binary 16 bits data, and then stores
the result in the register specified as the destination.

Parameter
Origin register
Specifies the address of the register containing the BCD data to be converted to binary 16 bits
data. Add “&” as the first character of the signal number.

Destination register
Specifies the register that will store the converted data. Add “&” as the first character of the
signal number.

Acceptable signal types


X Y M K T C D V Constant
Origin register Yes Yes Yes Yes Yes Yes Yes N/A N/A
Destination register N/A Yes Yes Yes Yes Yes Yes N/A N/A

Example
When X0000 is ON, this program converts the 4 digit BCD data stored in D0001 into binary
16 bits data, and then stores the result in D0002.

LSQ STR, &X0000 X0000


LSQ WBIN, &D0001, &D0002 WBIN D0001 D0002

If the value of D0001 is “1200”, then “04B0” is stored in D0002.

2-62
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ WBSRL, signal number, shift amount

Symbol
L/R WBSRL signal number shift amount
LSQ WBSRL T

Number of steps 2
Execution Time 10 μs

Function
When L/R input is ON and T turns OFF to ON, this instruction shifts the contents of the
specified register leftward towards the highest bit by the ‘n’ number of bits set in shift amount
parameter. Doing so also sets 0 to an equal number of bits starting from the lowest (rightmost)
bit.

When L/R input is OFF and T turns OFF to ON, this instruction shifts the contents of the
specified register rightward towards the lowest bit by the ‘n’ number of bits set in shift amount
parameter. Doing so also sets 0 to an equal number of bits starting from the highest (leftmost)
bit.

Parameter
Signal number
Specifies the address of the register containing the data to be shifted. Add “&” as the first
character of the signal number.

Shift amount
Specifies the number of bits to shift. Acceptable range: 0 – 16.

Acceptable signal types


X Y M K T C D V Constant
Signal number N/A Yes Yes Yes Yes Yes Yes N/A N/A
Shift amount N/A N/A N/A N/A N/A N/A N/A N/A Yes

2-63
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Example
Assuming M0002 stores the L/R input and M0002 is OFF, when M0001 changes from OFF to
ON, D0003 is shifted 3 bits rightward. If the value of D0003 is “2000H” before this program
is executed, then after execution, the value becomes “0400H”.

LSQ STR, &M0002


LSQ STR, &M0001 M0002
LSQ PTS WBSRL D0003 3
LSQ WBSRL, &D0003, 3 M0001 PTS
T

2-64
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ WUP, signal number, shift amount

Symbol
LSQ WUP WUP signal number shift amount

Number of steps 2
Execution Time 200 μs

Function
Shifts the word data to a higher rank.

The shift amount is set by the parameter and counting starts from the address of the specified
register. The lowest rank data is 0.

Parameter
Signal number
Specifies the address of the register containing the data to be shifted. Add “&” as the first
character of the signal number.

Shift amount
Specifies the number of bits to shift. Acceptable range: 0 – 64.

Acceptable signal types


X Y M K T C D V Constant
Signal number N/A Yes Yes Yes Yes Yes Yes N/A N/A
Shift amount N/A N/A N/A N/A N/A N/A N/A N/A Yes

Example
When X0000 is turned ON, this program shifts register D0010 upward (leftward) in the
direction of the higher rank, 4 words starting from D0010 as shown below.

LSQ STR, &X0000 X0000 PTS


LSQ PTS WUP D0010 4

LSQ WUP, &D0010, 4


D0013 D0012 D0011 D0010
Before shift 0 1 2 3 4 5 6 7 8 9 A B C D E F

After shift 4 5 6 7 8 9 A B C D E F 0 0 0 0

2-65
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ WDOWN, signal number, shift amount

Symbol
LSQ WDOWN WDOWN signal number shift amount

Number of steps 2
Execution Time 200 μs

Function
Shifts the word data to a lower rank (i.e. the direction of smaller signal number).

The shift amount is set by the parameter and counting starts from the address of the specified
register. The lowest rank data is 0.

Parameter
Signal number
Specifies the address of the register containing the data to be shifted. Add “&” as the first
character of the signal number.

Shift amount
Specifies the number of bits to shift. Acceptable range: 0 - 2048.

Acceptable signal types


X Y M K T C D V Constant
Signal number N/A Yes Yes Yes Yes Yes Yes N/A N/A
Shift amount N/A N/A N/A N/A N/A N/A N/A N/A Yes*

Example
When X0000 is turned ON, this program shifts register D0010 downward (rightward) word in
the direction of the lower rank, 4 words starting from D0010.

LSQ STR, &X0000 X0000 PTS


LSQ PTS WDOWN D0010 4
LSQ WDOWN, &D0010, 4
D0013 D0012 D0011 D0010
Before shift 0 1 2 3 4 5 6 7 8 9 A B C D E F

After shift 0 0 0 0 0 1 2 3 4 5 6 7 8 9 A B

2-66
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ WBRST, bit, signal number

Symbol
LSQ WBRST WBRST bit signal number

Number of steps 2
Execution time 10 μs

Function
Resets to 0 the data of bit set in parameter “bit” in the register set in “signal number”. This
instruction affects only the lower 4 bits (0-15) of the parameter “bit” are valid; all bits than this
are unaffected.

Parameter
Bit
Specifies the location of the data to be reset. (0, 1, …..15)

Signal number
Specifies the register containing the bit to be reset.

Acceptable signal types


X Y M K T C D V Constant
Bit N/A Yes Yes Yes Yes Yes Yes N/A N/A
Signal number Yes Yes Yes Yes Yes Yes Yes N/A N/A

Example
Resets the 12th bit in D0020 when X0000 is ON.

LSQ STR, &X0000 X0000


MOVR 12 D0010L
LSQ MOVR, 12, &D0010L
LSQ WBRST, &D0010, &D0020
WBRST D0010 D0020

If the value of D0020 is “1234H” before executing this instruction, then the 12th bit is reset and
the value of D0020 becomes “234H” when the instruction is executed.

2-67
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ USC, clock number, ON scan number, OFF scan number

Symbol
LSQ USC USC clock number ON scan OFF scan

Number of steps 1
Execution Time 10 μs

Function
Sets the conditions for operating the USC (user set clock) 1 and 2 (V0002 and V0003), which
are special relays. The specified clock turns ON at specified times (“ON scan number”) and
turns OFF at specified times (“OFF scan number”). The clock turns ON/OFF at the first scan
following the execution of this instruction.

When 0 is specified for ON scan number, the clock turns OFF when the instruction is executed.

If ON scan number is set at a number other than 0 and OFF scan number is 0, the clock remains
ON.

The clock starts from OFF. 1 scan is 8 ms.

Parameter
Clock number
Specifies the clock number of the clock to be activated. Specify 1 or 2.

ON scan number
Specifies the number of ON scans as an integer, setting ranges: 0 - 255.

OFF scan number


Specifies the number of OFF scans as an integer, setting ranges: 0 - 255.

Example
When M0001 changes from OFF to ON, USC 1 turns ON for 4 scans, and turns OFF for 8
scans.

LSQ STR, &M0001 M000 PTS


LSQ PTS USC 1 4 8
LSQ USC, 1, 4, 8

2-68
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ FLK, time

Symbol
LSQ FLK FLK time

Number of steps 1
Execution Time 10 μs

Function
Turns ON/OFF at every specified time interval.

This instruction can be used up to 15 times in one program.

Parameter
Time
Specifies the interval between ON and OFF. Acceptable range is 0.0 - 6553.5 s, in increments
of 0.1 s.

Example
Turns ON/OFF Y0001 every 0.5 seconds.

LSQ FLK, 0.5 Y0001


FLK 0.5
LSQ OUT, &Y0001

2-69
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ START

Symbol
LSQ START START

Number of steps 1
Execution Time 10 μs

Function
Marks the beginning of the main sequence program. When the last step in the program is
reached, processing returns to this instruction and execution restarts. In other words,
instructions before LSQ START are executed only once, and instructions after this are executed
in cycles.

When a program is executed via LSQEXECUTE command, the program is executed from the
first step of the program. When the program contents have been overwritten via
LSQREWRITE command and program contains a LSQ START instruction, execution restarts
from the step after LSQ START and the program will reflect the modified contents.

Contacts cannot be added to this instruction. This instruction can be used only once in a
program.

Example

LSQ FST
START
LSQ START

[ NOTE ]
No change occurs in the sequence control by executing LSQ START.

2-70
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ +, signal number 1, signal number 2, signal number 3
LSQ W+, signal number 1, signal number 2, signal number 3

Symbol
LSQ + + signal number 1 signal number 2 signal number 3

LSQ W+ W+ signal number 1 signal number 2 signal number 3

Number of steps 3
Execution Time 10 μs

Function
Adds the contents of registers for signal number 1 and signal number 2 and stores the result in
the register for signal number 3. All the data are treated as binary data. If the result carries
over to the next digit, the register V0005 (carry flag) turns ON. If the result is 0, the register
V0007 (zero flag) turns ON.

LSQ + instruction carries out the addition in units of bytes (2-digits hexadecimal).
LSQ W+ instruction carries out the addition in units of words (4-digits hexadecimal).

Function
Signal number1, Signal number2
Specifies signal numbers for the registers that store the data to add. Add “&” as the first
character of the signal number.

Signal number3
Specifies signal numbers for the registers to store the result. Add “&” as the first character of
the signal number.

X Y M K T C D V Constant
Signal number1 Yes Yes Yes Yes Yes Yes Yes N/A N/A
Signal number2 Yes Yes Yes Yes Yes Yes Yes N/A N/A
Signal number3 N/A Yes Yes Yes Yes Yes Yes N/A N/A

2-71
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Example
Addition in units of bytes (LSQ+):
When X0000 is ON, the program below adds the values in registers D0001H and D0002H and
stores the result in register D0003H.

LSQ STR, &X0000 X0000


LSQ +, &D0001H, &D0002H, &D0003H + D0001H D0002H D0003H

Addition in units of words (LSQ W+):


When X0000 is ON, the program below adds the values in registers D0001 and D0002 and
stores the result in register D0003.

LSQ STR, &X0000 X0000


LSQ W+, &D0001, &D0002, &D0003 W+ D0001 D0002 D0003

2-72
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ -, signal number 1, signal number 2, signal number 3
LSQ W-, signal number 1, signal number 2, signal number 3

Symbol
LSQ - - signal number 1 signal number 2 signal number 3

LSQ W- W- signal number 1 signal number 2 signal number 3

Number of steps 3
Execution Time 10 μs

Function
Subtracts the value of registers for signal number 2 from the value of register for signal
number 1 and stores the result in the register for signal number 3. All the data are treated as
binary data. If there is a need to borrow from the next digit, the register V0006 (borrow flag)
turns ON. If the result is 0, the register V0007 (zero flag) turns ON.

LSQ - instruction carries out the subtraction in units of bytes (2-digits hexadecimal).
LSQ W- instruction carries out the subtraction in units of words (4-digits hexadecimal).

Parameter
Signal number1, Signal number2
Specifies signal numbers for the registers that store the data to subtract. Add “&” as the first
character of the signal number.

Signal number3
Specifies signal numbers for the registers to store the result. Add “&” as the first character of
the signal number.

X Y M K T C D V Constant
Signal number1 Yes Yes Yes Yes Yes Yes Yes N/A N/A
Signal number2 Yes Yes Yes Yes Yes Yes Yes N/A N/A
Signal number3 N/A Yes Yes Yes Yes Yes Yes N/A N/A

2-73
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Example
Subtraction in units of bytes (LSQ -):
When X0000 is ON, the program below subtracts the values of register D0002H from the
value in register D0001H and stores the result in register D0003H.

LSQ STR, &X0000 X0000


LSQ -, &D0001H, &D0002H, &D0003H - D0001H D0002H D0003H

Subtraction in units of bytes (LSQ W -):


When X0000 is ON, the program below subtracts the values of register D0002 from the value
in register D0001 and stores the result in register D0003.

LSQ STR, &X0000 X0000


W- D0001 D0002 D0003
LSQ W-, &D0001, &D0002, &D0003

2-74
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ X, signal number 1, signal number 2, signal number 3
LSQ WX, signal number 1, signal number 2, signal number 3

Symbol
LSQ X + signal number 1 signal number 2 signal number 3

LSQ WX

Number of steps 3
Execution Time 10 μs

Function
Multiples the contents of registers for signal number 1 and signal number 2 and stores the
result in the register for signal number 3. All the data are treated as binary data.

LSQ X instruction carries out the multiplication in units of bytes (2-digits hexadecimal).
LSQ WX instruction carries out the multiplication in units of words (4-digits hexadecimal).

Parameter
Signal number1, Signal number2
Specifies signal numbers for the registers that store the data to multiple. Add “&” as the first
character of the signal number.

Signal number3
Specifies signal numbers for the registers to store the result. Add “&” as the first character of
the signal number. Cannot specify 8 bits.

X Y M K T C D V Constant
Signal number1 Yes Yes Yes Yes Yes Yes Yes N/A N/A
Signal number2 Yes Yes Yes Yes Yes Yes Yes N/A N/A
Signal number3 N/A Yes Yes Yes Yes Yes Yes N/A N/A

2-75
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Example
Multiplication in units of bytes (LSQ X):
When X0000 is ON, the program below multiples the values in registers D0001H and D0002H
and stores the result in register D0003.

LSQ STR, &X0000


LSQ X, &D0001H, &D0002H, &D0003 X D0001H D0002H D0003

Multiplication in units of words (LSQ WX):


When X0000 is ON, the program below multiples the values in registers D0001 and D0002
and stores the result in register D0003.

LSQ STR, &X0000 X0000


LSQ WX, &D0001, &D0002, &D0003 WX D0001 D0002 D0003

2-76
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ /, signal number 1, signal number 2, signal number 3
LSQ W/, signal number 1, signal number 2, signal number 3

Symbol
LSQ / + signal number 1 signal number 2 signal number 3

LSQ W/

Number of steps 3
Execution Time 10 μs

Function
Divides the value of register for signal number 1 by the value in register for signal number 2
and stores the result in the register for signal number 3. The remainder is stored in the
register following the register specified by signal number 3. If the register specified by signal
number 3 is the last register, then the remainder is not stored. All the data are treated as
binary data. If the value of register for signal number 2 is 0, then the register V0008 (error
flag) is turned ON.

LSQ / instruction carries out the division in units of bytes (2-digits hexadecimal).
LSQ W/ instruction carries out the division in units of words (4-digits hexadecimal).

Function
Signal number1, Signal number2
Specifies signal numbers for the registers that store the data to divide. Add “&” as the first
character of the signal number.

Signal number3
Specifies signal numbers for the registers to store the result. Add “&” as the first character of
the signal number.

X Y M K T C D V Constant
Signal number1 Yes Yes Yes Yes Yes Yes Yes N/A N/A
Signal number2 Yes Yes Yes Yes Yes Yes Yes N/A N/A
Signal number3 N/A Yes Yes Yes Yes Yes Yes N/A N/A

2-77
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Example
Division in units of bytes (LSQ /):
When X0000 is ON, the program below divides the values of register D0001H by the value in
register D0002H and stores the result in register D0003H.

LSQ STR, &X0000 X0000


LSQ /, &D0001H, &D0002H, &D0003H / D0001H D0002H

Division in units of bytes (LSQ W/):


When X0000 is ON, the program below divides the values of register D0001 by the value in
register D0002 and stores the result in register D0003.

LSQ STR, &X0000 X0000


LSQ /, &D0001, &D0002, &D0003 W/ D0001 D0002

For instructions with +, W+, -, W-, X, WX, /, W/ ,


Parameter allocation for byte data instructions:
When data register (D: 16 bit data) is transmitted to signals 1,2,3
→ D0002H: Shows the upper 8 bit data of the register D0002.
D0002L: Shows the lower 8 bit data of the register D0002.

When X,Y,M,K,T,C,D (1 bit data) are transmitted to signals 1,2,3


→Y0000L: Shows from &Y0000 to &Y0007.
Y0000H: Shows from &Y0008 to &Y000F.

Parameter allocation for word data instructions:


When data register (D: 16 bit data) is transmitted to signals 1,2,3
→D0002:Shows register D0002.

When X,Y,M,K,T,C,D (1 bit data) are transmitted to signals 1,2,3


→Y0000W: Shows from &Y0000 to &Y000F.
Y0001W: Shows from &Y0010 to &Y001F.

2-78
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Program Instruction
LSQ AFLGCLR
LSQ AFLGCLRN

Symbol
LSQ AFLGLR + signal number 1 signal number 2 signal number 3

LSQ AFLGCLRN AFLGCLRN

Number of steps 1
Execution Time 2 μs

Function
LSQ AFLGCLR instruction enables the applied operation flag clear mode.
The following 4 flags used with applied operation instruction are cleared: carry flag, borrow
flag, zero flag and error flag.

LSQ AFLGCLRN instruction disables the applied operation flag clear mode.
The flags that were cleared via AFLGCLR instruction is not restored.

Example
In the program below, X0000 turns ON with the applied operation flag clear mode enabled.
The values of register D0001H and register D0002H is added and the result is stored in register
D0003H. Then, the applied operation flag clear mode is disabled. The addition of the
values of registers D0004 and D0005 is carried out, and its result is stored in D0006.

LSQ AFLGCLR AFLGCLR


LSQ STR, &X0000
X0000
LSQ +, &D0001H, &D0002H, &D0003H + D0001H D0002H
LSQ AFLGCLRN
LSQ W+, &D0004, &D0005, &D0006 AFLGCLR

W+ D0004 D0005

2-79
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.6.2 COMMANDS/ INSTRUCTIONS FOR NUMERIC OPERATION PART

2.6.2.1 MONITOR COMMAND

The following commands control the numeric operation program (numpg).

NUMEXECUTE Starts execution of numpg from the first step.

NUMABORT Stops numpg during execution.

NUMCONTINUE Resumes numpg after being stopped by NUMABORT.

NUMKILL Displays current progress of numpg.

NUMSTATUS Initializes the program stack containing numpg.

2-80
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Monitor Command
NUMEXECUTE

Function
Executes program for numeric operation part (numpg).

Explanation
Numeric operation program must always be named “numpg”. If program (numpg) cannot be
found or does not exist, error occurs:
(P1038) Program does not exist

If execution of numpg program has already been started, error occurs:


(P2055)[LSEQ] Program is being executed

Example >NUMEXECUTE

Monitor Command
NUMABORT

Function
Stops execution of the numeric operation program (numpg) currently being executed.

Example
>NUMABORT

2-81
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Monitor Command
NUMCONTINUE NEXT

Function
Restarts execution of numeric operation program (numpg) after it was aborted via
NUMABORT command.

Parameter
If NEXT is entered, execution resumes from the step following the step at which execution
stopped. If NEXT is not entered, execution resumes from the step at which execution
stopped. If the program is currently suspended via WAIT instruction, etc., the wait status is
canceled upon entering NEXT.

Example
>NUMCONTINUE

Monitor Command
NUMKILL

Function
Initializes the program stack that contains the numeric operation program (numpg).

Explanation
Releases the selection of the numeric operation program suspended via NUMABORT
command. However, after this command is executed, program cannot be restarted via
NUMCONTINUE command or any other commands.

2-82
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Monitor Command
NUMSTATUS

Function
Displays the execution status of the numeric operation part.

Explanation

1. NUM status : Program running.

2. Program Execution Time : 808 ms


Program Execution Time (Average): 808 ms

Program
3. NUMPG Exists
Program name Step No.
numpg 3 C=DREG(1)

1. NUM (eric operation program execution) status


Displays the current execution status of the numeric operation part. The message
displayed is “Program running” or “Program not running” accordingly.

2. Program execution time


Displays the elapsed execution time for the program being executed, and the average
execution time.

3. Program
Displays whether or not numeric operation program (numpg) exists or not. The message
displayed is “NUMPG exists” or “NUMPG does not exist” accordingly.

2-83
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

2.6.2.2 INSTRUCTIONS FOR INTERFACE BETWEEN BASIC AND NUMERIC


OPERATION PARTS

Data registers are used for interfacing between the basic operation part and numeric operation
part. Following commands are used to read or write data between data registers and the
numeric operation part.

DREG Writes one data item to a register.

DREG (register no.) Reads one data item from a register.

DREGS Writes a set of data to registers.

DREGR Reads a set of data from registers.

DREGINIT Clears the contents of all registers.

2-84
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Monitor Command/ Program Instruction


DREG data register number = value

Function
Writes data to data register.

Parameter
Data register number
0 - 2047 (corresponds to &D0000 - &D07FF)

Value
0 - 65535

Explanation
Substitutes the value specified in parameter “value” to the specified data register. For
specified value outside the acceptable range, the minimum value is substituted if the value is
below the lower limit; the maximum value is substituted if it exceeds the upper limit. The
value is rounded down to the nearest whole number.

Example

DREG 1=a

If a=256.1, then 256 is substituted to &D0001.

2-85
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Real Value Function


DREG (data register number)

Function
Reads data from data register.

Parameter
Data register number
0 – 2047 (corresponds to &D0000 - &D07FF)

Explanation
Returns the contents of the specified data register.

Example

c=DREG(b)

If b=2, then the contents of &D0002 are substituted to variable c.

2-86
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Monitor Command/ Program Instruction


DREGS data register number = string variable [element number], number of data

Function
Writes a set of data to the data registers.

Parameter
Data register number
0 - 2047 (corresponds to &D0000 - &D07FF)

String variable
Specifies the real value string that includes the data to be written to the data register.

Element number
Specifies the first element number in string variable to be written to the data register.

Number of data
Specifies the total number of elements to be written to the data registers, including the first
element.

Explanation
Substitutes the specified number of real values set in the string variable to a range of data
register starting from the specified data register number. If one of the real values in the string
variable is outside the acceptable range, the minimum value is substituted if the value is below
the lower limit; the maximum value is substituted if it exceeds the upper limit. The values are
rounded down to the nearest whole number.

Example

DREGS 5=a[2], 3

If a[2]=256.1, a[3]=123.4, a[4]=999.9,


Then 256 is substituted in &D0005,
123 is substituted in &D0006,
999 is substituted in &D0007

2-87
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Monitor Command/ Program Instruction


DREGR string variable [element number] = data register number, number of data

Function
Reads a set of data from a range of data registers.

Parameter
String variable
Specifies the real value string that will store the values read from the data registers.

Element number
Specifies the first element number in the string variable that will store the data read from the
data registers.

Data register number


0 - 2047 (corresponds to &D0000 - &D07FF) Represents the first data register in the range
of data registers to be read.

Number of data
Specifies the number of data item to read from the data registers.

Explanation
Reads from a continuous set of data registers and stores them in the specified string variable.

Example

DREGR a[1]=b,c

If b=2, c=3
then value of &D0002 is substituted to a[1],
value of &D0003 is substituted to a[2],
value of &D0004 is substituted to a[3].

2-88
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

Monitor Command
DREGINIT

Function
Clears the contents of all the data registers.

Explanation
Sets all data register to zero (0).

Attempting DREGINIT while the basic operation or numeric operation program is currently
being executed, errors like the one shown here will occur and this command will not be
executed.
(P1042) Numeric operation program is being executed

Example

>DREGINIT
Confirm! Execute? (Yes:1, No:0) 1
>

2-89
E Series Controller 2. KLogic
Kawasaki Robot KLogic / KLadder Operation Manual

MEMO

2-90
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.0 KLADDER

KLadder is a ladder programming application that runs in MS Windows and is designed to work
with KLogic in the controller. Ladder diagrams drawn using KLadder are converted into
sequence program for KLogic.

3.1 INSTALLATION AND CONNECTION

3.1.1 KLADDER HARDWARE REQUIREMENTS

Minimum hardware requirements for KLadder are as follows:


Hardware requirements
OS Windows 95 or higher

CPU Pentium or higher

Memory 16MB, 32MB or more recommended

3.1.2 KLADDER INSTALLATION PROCEDURE

KLadder comes in a floppy disk. Install the software into your PC. Follow the below
installation procedures.

1. Installation to hard drive:


Copy the following files from the floppy disk to a directory in your PC’s hard drive.
KCODECHG.DLL
KCONVERT.DLL
KLADDER.EXE
KLADDERENG.DLL
KLOGICCOMM.DLL
MSGEG.DLL
MSGJP.DLL

2. Creating a shortcut
Create a shortcut to KLADDER.EXE for easy access.

The display language is changed in [Option] – [Configuration] from the menu bar. Click on
[Language] tab in the dialog box that appears and select the desired language. The change
comes into effect from the next time KLadder is started. See 3.6.2.4 Language for details.

3-1
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.1.3 CONNECTING WITH E CONTROLLER

Connect the PC installed with the KLadder to the robot controller. There are two ports for
connection:
1. RS232C
2. Ethernet (TCPIP)

3.1.3.1 CONNECTING VIA RS232C

Connect via RS232C port on PC and the terminal port on the robot controller.

RS-232C port on PC

RS-232C

3-2
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.1.3.2 CONNECTING VIA ETHERNET

Connect Ethernet port on PC with Ethernet port located inside the robot controller. 1KN
daughter board is required in robot controller.

Inside of controller

ETHERNET
connector on PC

1TA board Front view of controller

3.1.4 SETTING COMMUNICATION MODULE

Select the module used to communicate between KLadder and RC (Robot Controller).

1. Start KLadder, and select [Setup] – [Setup Communication Module].

3-3
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

2. Set Parameter.
(1) For serial connection (RS232C):
Input in order of [Connecting port] [[Baud rate].
Ex. COM1 9600
(2) For Ethernet connection:
Input in order of TCP [IP Address].
Ex. TCP 192.168.0.2
Click <OK> after entering. The entered settings are reflected thereafter.

3-4
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.2 PROGRAMMING USING KLADDER

This section explains the procedures and methods for to programming using KLadder.

3.2.1 OPEN FILE

Start KLadder.

To create a new file, select [File] – [New file], or click .

START is automatically displayed in the new file. To cancel display of START, from [Option] –
[Configuration] in the menu bar, select [Operation] and remove the check from [Create START in
automatically when new file is open].

To open an existing file, select [File] – [Open], or click . Dialog box [Open File] appears, so
double click on the desired file.

3.2.2 CREATING A NEW CIRCUIT (INSERTING NEW BLOCK)

To start a new circuit, create a new block.

1. Click the desired position on which to make the new block. The cursor (yellow box) is placed
on that position.

2. On the keyboard, press Ctrl + Insert, or click on .

3-5
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

When a new block is inserted between existing blocks, it can be inserted before or after the
selected position. To set whether the new block is inserted before or after the cursor, select
[Option] – [Settings]. (See 3.6.2.2 Operation Settings.)

3.2.3 PLACING SYMBOLS

Follow the below procedures to place electric symbols on ladder diagrams.


1. Click the desired position to place the symbol. The cursor (yellow box) moves to that
position.
2. Click on the desired symbol on the tool bar, or press its corresponding function key on the
keyboard as shown below.
F11
F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F12

3. The selected symbol is placed on the diagram.


4. Move the cursor to the symbol and press Enter, or double click on the symbol. [Property]
dialog box is displayed as below.
Note: If [Activate Property Dialog when symbol is input.] is checked in [Option]-
[Configuration] - [Operation], then the [Property] dialog box is displayed
immediately after the symbol is placed.

3-6
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

5. Select the symbol to place, and input the signal number and comment in [Addr.(ess)] and
[Cmt. (Comment)] input lines. Available signals are as follows:

Type Format and Upper/ Lower limits Number


Input X0000-X07FF 2048
Output Y0000-Y07FF 2048
Internal Relay M0000-M07FF 2048
Keep Relay K0000-K01FF 512
Timer T0000-T00FF 256
Counter C0000-C00FF 256
Data Register D0000-D07FF 2048
Special Relay V0000-V00FF 256

[Address] is entered in capital letters regardless of Caps Lock. Also, it can be input abbreviated
as below:
Example: Input M1 for M0001
Input M3A for M003A.

[Comment] can be entered for either contacts or coils and thereafter comment is shown on both of
them.

3-7
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.2.3.1 LADDER DIAGRAM CONFIGURATION

It is recommended that the ladder diagram take the following configuration:

Input Logical Output


section section section

1. Input section
Devices that input signals to KLogic, such as push buttons, limit switches, etc. are written in
the Input section. Use “X” as signal identifier. Acceptable range: X0000-X07FF (2048
signals).

2. Logical section
Internal relay (dummy output)
Internal relays for solenoid valves, magnet switch and other temporary memories that do not
require activation as an external devices are programmed in the Logical section. Use “M”
as signal identifier. Acceptable range: M0000-M07FF (2048 signals).

Timer
Timers are written in the logical section. Use “T” as signal identifier. Following types of
timers are used. Acceptable range: T0000-T00FF (256 signals).

Timer Direct Units of 100ms


(LSQ TMR) Indirect Units of 100ms

Direct Units of 100ms


Integrating timer
(LSQ TMRS) Indirect Units of 100ms

Counter
Following types of counters are used. Use “C” as signal identifier. Acceptable range:
C0000-C00FF (256 signals).
Direct
Up/ Down Counter
(LSQ TMR)
Indirect

Keep Relay
This relay is used for conditions settings, etc. that must be kept in the memory even after
power is turned OFF. Keep relays are written in the logical section. Use “K” as signal
identifier. Acceptable range: K0000-K01FF (512 signal).

3-8
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

Special relay
Special relays are internal relays dedicated to uses shown in the table below. They are
mainly used for outputting the operation status of KLogic or the calculation result of an
applied instruction. Use “V” as signal identifier. Acceptable range: V0000-V00FF (256
signals).

Number Contents
V0000 Normally ON Always ON regardless of operation status
V0001 Normally OFF Always OFF regardless of operation status
V0002 User defined clock 1 Outputs result of LSQ USC1
V0003 User defined clock 2 Outputs result of LSQ USC2
V0004 Robot error Outputs robot error*
V0005 Carry flag Turns ON when result of LSQ+, LSQ W+ carries over
V0006 Borrow flag Turns ON when result of LSQ-, LSQ W- carries down
V0007 Zero flag Turns ON when result of LSQ+, W+ ,-, W-, X, WX, /, W/ is zero
V0008 Error flag Turns ON when the divided register is 0 in LSQ/, LSQ W/

3. Output section
Devices that respond to signlas that are output from KLogic are written in the output section.
Use “Y” as signal idetifier. Acceptable range: Y0000-Y07FF (2048 signals).

3.2.4 CHANGING SYMBOLS

Change the electric symbols placed on the ladder diagram by following the below procedures:

1. Double click the symbol to change or move the cursor to the symbol and press Enter.

2. [Property] dialogue box appears as shown below.

Select the desired symbol, enter an address or comment for the symbol, etc. After necessary
modifications are done, press Enter or click on <Apply>.

3-9
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.2.5 DRAWING PARALLEL CIRCUITS

3.2.5.1 ADDING A SECOND LINE TO A BLOCK

To draw a parallel (OR) circuit, a second column is added to a block.

1. Place the cursor (yellow box) at the place to add the second line by clicking on that place.

2. Press Shift + Insert on the keyboard or click . Or, select [Edit] - [New line insert]. A
new line is inserted below the line where the cursor is and the lines after that are shifted down
by one line.

3-10
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.2.5.2 MOVING SYMBOLS BY ONE COLUMN

Press Insert key to move the symbols on the diagram to the right by one column.

1. Place the cursor (yellow box) on the symbol to move by clicking on the symbol.

2. Press Insert. The symbol on the cursor and those to the right of the cursor moves to right by
one column. When there are more than the maximum symbols that can be placed on one line,
the line wraps automatically.

When Insert key is invalid


Insert key is invalid on the vertical line before a coil, as shown in the diagram below. In this
case, place the cursor on the coil and then press Insert. The line wraps automatically.

3.2.5.3 DRAWING OR DIAGRAM

To draw the vertical line for OR, click on on the tool bar or check the checkbox in
[Property] dialogue box.

1. Select the desired place by moving the cursor (yellow box) or by clicking.

3-11
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

2. Click or press Enter or double click to display [Property] dialogue box. Put a check on
[OR] checkbox. The OR line is inserted before the cursor.

3. To delete the OR line drawn in a diagram, move the cursor to the line and click or press
Enter or double click on the OR line. In the [Property] dialogue box that appears, remove the
check from [OR] check box.

3.2.6 MOVING/ COPYING DATA

Circuit data can be cut, copied and pasted. There are two ways to cut/ copy and paste data.

Using only the mouse


Right click at the beginning of the line, and drag to select the desired circuit. Release the right
button to display the menu. Select [Cut] to move the data, or [Copy] to copy the data. Move
the cursor (yellow box) to the destination. Right click and select [Paste] from the pop up menu.

Using shortcut keys on the keyboard


Click on the beginning of the line and drag to select the desired data. Press Ctrl+X to cut, or
Ctrl+C to copy. Move the cursor (yellow box) to the destination and press Ctrl+V to paste.

When data is pasted, it is inserted to the selected line and no data is overwritten.

3.2.7 CONVERTING DATA TO MNEMONIC

After a circuit is created/ edited as a ladder diagram, it is converted into mnemonic data. A red
circle is shown before lines that have not been converted. After successful conversion, the red
circle disappears. (See diagram below.)

To convert the data, select either [One block] or [Edited blocks] from [Convert] on the menu bar.

3-12
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

[One Block]
Converts only the block where cursor is placed. When an error occurs, corresponding error
message appears on the screen.

[Edited blocks]
Converts all edited blocks that have not been converted yet. If an error occurs, message
indicating where the error occurred appears and conversion stops. In this case, the blocks after
the error are not converted.

3.2.8 INPUTTING/ EDITING OF COMMENTS

Comments for coils, etc. can be input or edited via [Edit Comment] list box.
1. Click [Edit] – [Edit comment] from the menu bar. Dialog box as below appears.

3-13
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

2. Click the drop down arrow on [Device], and select the desired device. A list of signal
numbers (addresses) appears. Double click on the signal number to edit its comment.
[Change Comment] dialog box appears. Enter/ edit the comment and click on <OK>.

3.2.9 INPUT/ EDIT REGISTER

Set registers by following the below procedures.

1. Click [Edit] – [Edit Register Data] from the menu bar. Dialog box as below appears.

2. Display the desired register by selecting [Device] and [Area].


3. Double click on the desired signal number (address) to display the screen shown below.

4. Select whether the value is in hexadecimal, decimal, or octal notation and enter the value to set
in [Value]. Click <OK>.

3-14
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.2.10 BLOCK EDITING

3.2.10.1 EDITING ALL SIGNAL NUMBERS

All the signal numbers used for coils and contacts can be edited together. To change the signal
numbers used as operands in applied instructions (register and constants), see 3.2.10.2 Changing
Operands for Applied Instructions.

Modifying signal numbers for all programs


1. Select [Edit] - [Contact Change] - [I/O Address].

2. Click <Add>.

3. Set the devices to change.


Ex. To change M0000 to M0100:

3-15
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

4. Click on <OK>. The modified device is shown on the list.

5. Click <Execute> to validate the changes.

Changing the signal numbers in selected area


1. Select the area that includes the data to be modified. To select the area, click near the step
number and drag. The selected area is highlighted.

2. Select [Edit] - [Contact change] - [I/O Address].


3. [Selected Part] check box will be checked. Follow the procedures described above to change
the signal numbers.

3-16
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.2.10.2 CHANGING OPERANDS FOR APPLIED INSTRUCTIONS

All signal numbers used in applied instructions can be edited together. (See 2.6 AS Language
for more information on applied instructions.)

Modifying signal numbers for all programs


1. Select [Edit] - [Contact Change] - [Function Operand].

2. Click <Add>.

3. Select the operands to be modified.


Ex. To change signals D0000 - D0010 used as operands to M000W - M010W:

3-17
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

4. Click <OK>. The modified devices are shown on the list.

5. Click on <Execute> to validate the changes.

Changing the signal numbers in a selected area

1. Select the area that includes the data to be modified. To select an area, click near the step
number and drag. The selected area is highlighted.

2. Select [Edit] - [Contact change] - [Function Operand].


3. [Selected Part] radio button will be checked. Follow the procedures described above to
change the signal numbers.

3-18
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.2.10.3 REPLACING MAKE- AND BREAK- CONTACTS

Make-contacts (A contacts) and break-contacts (B contacts) of selected signal numbers can be


replaced together.

1. Select [Edit] - [Contact Change] - [AB Contact].

2. Enter the signal number and click <Execute>.

Changing the signal numbers in a selected area

1. Select the area that includes the data to be modified. To select an area, click near the step
number and drag. The selected area is highlighted.

2. Select [Edit] - [Contact change] - [AB Contact].


3. [Selected Part] radio button will be checked. Follow the procedures described above to
change the signal numbers.

3-19
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.2.11 BLOCK COMPARISON

Two data files can be compared to find different blocks or blocks that exist only in one file. This
function can be used in such case as to find the modified areas in edited programs. In this case,
save the program before editing and after editing under different names.

1. Display the two data files to be compared.


Select [Edit] - [Compare Programs]. Dialog box as below appears. Click <Comparison> to
start comparison of the two data.

2. [S] is shown for blocks that are the same, [D] for blocks that are different, and [N] for blocks
that exist only in one of the files. The values shown indicate the block numbers.

3-20
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3. Select the block number in the list and click < Block display >. The corresponding block is
shown highlighted in the ladder diagram. Double clicking the block number displays and
highlights the block.

4. Click on <Next> or <Previous> to display the next or previous block that is different or exists
only in one file.

3.2.12 SEARCH

Circuit shown in the active window can be searched to find a specific character string.

1. Select [View] - [Search]. The following menu appears.

2. Click [Coil/ Contact], [Function], or [Comment] tab depending on the item to be searched.
3. Check the box of the device type to be searched for in the [Object] section.
4. Enter the character string to be searched for in [Address] (or [Text]) input box and click on
<Prior> or <Next> to start searching.

Click <Bookmark All> to set bookmarks on all data that satisfy the search condition. (See
3.2.14 Jump Using Bookmarks.)

3-21
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.2.13 JUMP

Displays the specified circuit. Select [View] - [Jump] and specify the destination.

Step number Displays the circuit at the specified step number.

Block number Displays the circuit at the specified block number.

To top Displays the first circuit in the file.

To bottom Displays the last circuit in the file.

3.2.14 JUMP USING BOOKMARKS

Bookmarks can be used to move quickly to desired places in the diagram.

To set bookmarks

1. Place the cursor (yellow box) on the desired line.


2. Click on . A small, blue bookmark box is shown in front of the selected line. See far
left of diagram below.

3-22
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

To jump to bookmark

To jump to a bookmark below the cursor, click . To jump to a bookmark above the cursor,
click .

To remove bookmarks,
1. Bring the cursor (yellow box) to the line with the bookmark.
2. Click .

To remove all bookmarks, click .

Above operations can also be done via pull down menu in [View] - [Bookmark].

3.2.15 SIGNAL STATUS

Signal numbers (address) used in the file shown on the active window can be displayed in a list.

Select [View] - [Signal Numbers in Use], and select the device from the [Device] list box.

3-23
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.2.16 CONTACT TABLE

The position of coils and contacts can be specified by signal numbers and displayed in a list.
1. Select [View] - [Contact Table].

2. Enter the signal number to search for in [Address] input box and click <Search> or press Enter.
The search result is displayed in a list. The position of the signal is shown as “Block
number-step number-column number”.

3. Double click on the contact in the list. The cursor moves to that contact in the ladder diagram.

3-24
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.2.17 PROGRAM CHECK

The selected file can be checked for errors. Errors are displayed in a list. Double clicking an
error in the list moves the cursor to the point in the ladder diagram that was being processed at the
time of that error.

Select [Edit] - [Program Check]. [Program check result] dialog box is displayed.

When there is duplicated output in a program

1. When a signal number is used more than once in a program, the signal number is displayed in
[Duplication output list].

2. To display the duplicated signal in the ladder diagram, double click on the signal number in the
list.

3-25
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

When there is a format error


1. When there are syntax errors in the program, they are shown in the [Format error list].

2. To display the error in the ladder diagram, double click on the error shown in the list.

3-26
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.3 RC (ROBOT CONTROLLER) MENU

Operations such as writing/reading to/from robot controller (RC) and checking of the robot
motion status of the robot controller are done from this menu.

3.3.1 READING FILES FROM RC

Reads programs and comments saved in robot controller memory into the KLadder application.

3.3.1.1 READING PROGRAMS

1. Click [Read Data] – [Program] from RC menu.

2. Click <Yes> in the message box that appears.

3. Aft er the program is read into KLadder, the program is checked. The screen below appears
when the check completes. (See 3.2.17 Program Check.)

3-27
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.3.1.2 READING COMMENTS

Reads comments from the robot controller.

1. Select [RC]-[Read Data]-[Comment].

2. Click <OK> in the message box that appears.

3.3.2 WRITING INTO RC (ROBOT CONTROLLER)

Writes programs and comments created via KLadder into robot controller memory.

3.3.2.1 WRITING PROGRAM

Writes programs onto robot controller.


1. Select [RC] - [Write Data] - [Program].
2. Click <Yes>in the message box that appears.

3-28
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3. The message below is shown when the writing completes.

Confirmation message appears when writing a program while another program is running in the
robot controller.

If <Yes> is clicked, the newly written program is selected and executed immediately after
execution of the last step of the currently running program.

3.3.2.2 WRITING COMMENTS

Comments are written into RC.


1. Select [RC] - [Write Data] - [Comment].
2. Click <Yes> in the message that appears.

3. The message below is shown when the writing is completed.

3-29
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.3.3 RC OPERATION STATUS

Displays the current operation status of the robot controller.

1. Select [RC] - [RC Operation Status].


2. The current operation status of the robot controller is shown in a message box.

See 2.6.1.1 LSQSTATUS for more details on checking operation status.

3.3.4 STOPPING RC PROGRAM

Programs running in the robot controller can be stopped from KLadder.

1. Click [RC] - [Stop RC].


2. Click <Yes> in the message box that appears.

3. The message box below appears when the program execution halts.

3-30
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.3.5 STARTING RC PROGRAM

Programs in the robot controller can be executed via KLadder.

1. Select [RC]-[Start RC].


2. Click <Yes> in the message box that appears.

3. The message box below appears when execution of the program has started.

3.3.6 FORCING I/O SIGNALS ON/ OFF

I/O signals used in programs executed in robot controller can be forced ON/OFF via KLadder.

1. Select [I/O Forced ON/OFF] from [Setup] in the menu bar.

2. Set/ modify the signal numbers (addresses) in the dialog box that appears.

3-31
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

Setting Signal Numbers


Click <Add>.

Enter the signal number (address) in the dialog box that appears. Acceptable signal number
ranges:
Y0000 - Y07FF
M0000 - M07FF
K0000 - K01FF

Click and select ON or OFF.

Modifying signal number


Select the signal number to modify and click <Change>. Enter the signal number and select
ON or OFF in the dialog box that appears.

Deleting signal number


Select the signal number to delete and click <Delete>.

Clearing signal number


Click <Clear>. The following message appears. All signal numbers are deleted when
<Yes> is clicked.

3. Write the modified signals to the robot controller.

Click <Write to RC>. The modified signals are forced ON/ OFF depending on how they
were edited. The result is read from the robot controller and displayed in the [Result]
column.

3-32
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

Exception: During startup of the robot controller, signal states resulting from operation of the
sequence program take precedence over the signal states set here.

[ NOTE ]
This function forces signals to turn ON or OFF but it does not force the signal to keep the
same state in the program. Therefore, when a signal is forced ON/ OFF while a
program is running in the robot controller, its status may vary depending on the sequence
operation or refresh results.

3-33
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.4 MONITOR MENU

3.4.1 STARTING RC MONITOR

When a KLadder-installed PC is connected to robot controller via serial or Ethernet connection,


program execution status can be monitored while the program’s ladder diagram is displayed on
screen.

1. Select [RC] - [Read Data] - [Program] to read the program data from the robot controller.
2. Click [Monitor] - [Start RC-Monitor] to start monitoring.

A. Input and output symbols currently operating is shown in red.


B. The signal number for register currently operating is shown in blue.

3. Select [Monitor] - [Register + I/O Address Monitor] to display the selected register and I/O
signal number.

3-34
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.4.2 MONITORING REGISTERS AND I/O SIGNALS

Select [Start RC-Monitor] to display the registers and I/O signals being monitored.

<Add>
Click to enter another signal number to be monitored and shown on the display.

<Change>
Select a signal number and click on this button to make changes to that signal.

<Delete>
Select a signal number and click on this button to delete that signal from being monitored o n this
screen.

<Clear>
All signal numbers are no longer shown on this monitoring function screen.

3-35
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.5 PROGRAM FILE MANAGEMENT

3.5.1 SAVING DATA

Overwriting data
Select [File] - [Save] to overwrite the existing file. When the file is new, a dialog box for
entering the file name appears. Files can also be saved by clicking .

Saving data under new name


Select [File] - [Save as] to save the current file as a new file. The original file remains
unchanged.

3.5.2 BINARY COMPARISON OF FILE AND PROGRAM

Current file and a selected file are compared and the results are displayed. Select [File] –
[Compare Program and File].

3.5.3 IMPORTING COMMENTS

A selected comment file can be read into the file shown in the active window. Select [File] -
[Import Data] – [Comment].

This function is used when the names of the data file and comment file are different. When the
file names are the same, comments are read together with the data file (if
[Read comment together with program] box is checked for [When reading program] in the
[Option] – [Configuration] – [File] menu.)

3-36
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.6 OPTION MENU

3.6.1 CUSTOMIZE

KLadder screen display properties can be customized. Character font and size, color of display,
etc. can be changed. Select [Customize] from [Option] in the menu bar.

3.6.1.1 CUSTOMIZING FONT

The font and size of characters in the ladder diagram display and mnemonic display can be
changed. When the character size is changed, the display size of the ladder diagram changes
accordingly. Select [Customize] from [Option] in the menu bar. Click [Font] tab in the dialog
box that appears.

Click <Change>. Make desired settings in the [Font] dialog box as below appears.

3-37
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.6.1.2 CUSTOMIZING COLOR

Display color can be changed. Select [Customize] from [Option] in the menu bar. Click
[Color] tab in the dialog box that appears.

1. Select [Ladder] or [Mnemonic].

2. Click the item in the list to change the color.

3. Foreground and/ or background color of the selected item can be changed. Click on
<Foreground> or <Background>. Select the desired color in [Set color] dialog box that
appears and click <OK>.

Background (Ladder, Mnemonic)


Background color of data window. Click <Background> button to change this color.

Step/ Block No. (Ladder, Mnemonic)


Color of the step and block numbers (foreground) and their background color.

Symbols (Ladder)
Color of symbols. Click <Foreground> button to change this color.

Address/ Registers Text (Ladder)


Color of signal numbers and registers (foreground) and their background color.

Comment Text (Ladder, Mnemonic)


Color of comments and their background color.

3-38
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

Duplicated signals (Ladder)


Color of coil signal numbers that have duplicate numbers in the program (foreground) and its
background color.

Monitor Active Symbols (Ladder)


Color of input and output symbol being processed while monitoring RC. Click <Foreground>
button to change this color.

Monitor Active Address (Ladder)


Color of address (signal number) and set values being processed while monitoring RC
(foreground) and their background color.

3-39
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.6.1.3 CUSTOMIZING DISPLAY

The attributes of the display can be changed per below. Select [Customize] from [Option] in the
menu bar. Click [Display] tab in the dialog box that appears.

[Show as many characters as possible for the comments displayed above the contacts.]
When this option is checked and [View]-[Circuit Diagram]-[Circuit-Comment2] is selected from
the menu bar, comments are shown above the symbols as below. (Maximum of 30 characters).
(Displayable number of characters varies per font type/ size.)

[Display mnemonic with partition lines between blocks.]


A partition line is drawn between blocks, as shown below.

3-40
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.6.2 KLADDER SETTINGS

Settings for KLadder operation can be changed from [Option] – [Configuration].

3.6.2.1 FILE SETTINGS

Sets conditions for reading/ writing programs. Select [Option] - [Configuration] from the menu
bar and click on [File] tab in the dialog box that appears.

[When reading program]


Check [Read comment together with program] to include the comments file when reading a
program into KLadder.

[When writing program]


Check [Write comment together with program] to write also include the comments file when
writing a program from KLadder to the robot controller.

3-41
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.6.2.2 OPERATION SETTINGS

Operation settings for ladder diagram screen and circuit monitor are made in this menu. Select
[Option] - [Configuration] and click on [Operation] tab in the dialog box.

[Insert new block above the selected block.]


Check this box so that new blocks are inserted above the cursor’s on-screen position. New
blocks are inserted below cursor if this box is not checked.

[Activate Property Dialog when symbol is input.]


Check this box to show the Property dialog box automatically for entry of signal number,
comment, etc. every time a new symbol is placed on the circuit. (Property dialog box will be
displayed immediately after pressing a keyboard function key or one of the symbol icons on the
tool bar.) Property dialog box does not appear if this box is not checked.

[Close Property Dialog automatically after applying.]


Check this box so that the Property dialog box automatically closes after pressing its <Apply>
button.

[Create START automatically when a new file is open.]


Check this box to start all new files with START as the first command.

[Continue monitoring when communication error occurs.]


Check this box to continue monitoring even when an error occurs during monitoring. If this box
is not checked, monitoring stops whenever error occurs.

3-42
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

[Register indication]
Sets the format in which the contents of registers are displayed. Select from hexadecimal,
decimal, or octal.

[Sampling time]
Sets the sampling time for monitoring. Acceptable range is 50ms - 3000ms.
[ NOTE ]
Short sampling time puts greater demand on the robot’s CPU. This may
influence the processing speed of PC programs, so do not set the sampling time
unnecessarily short.

3.6.2.3 SETTING SHORTCUT KEYS

Shortcut keys can be defined for frequently used commands. Select [Option] - [Configuration]
from the menu bar and click on [Setting Shortcut Keys] tab in the dialog box that appears.

<Regist key>
Defines shortcut keys to the selected command.
1. From the list, select a command.
2. Click <Regist key>.
3. On the keyboard, type the key to be used as the shortcut for that command. Shortcut using
key combination with Shift and Ctrl keys can also be registered.

3-43
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

<Remove>
Deletes registered shortcut.
1. From the list, select the command to delete.
2. Click <Remove>.

3.6.2.4 LANGUAGE

Selects the language used in KLadder display. Select [Option] - [Configuration] from the menu
bar and click on [Language] tab in the dialog box that appears. Select the desired language.
Display language changes from the next time KLadder is started.

3-44
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.7 PRINTING FILES

3.7.1 PRINTING PROCEDURES

Contents of currently selected file can be printed out. Select [File] – [Print]. Select the items
to print from the menu that appears.

Following items can be printed:


• Circuit Diagram list
• Instruction List
• Signal no./ Comment list
• Contact Table List
• Signal List

3-45
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.7.2 CIRCUIT DIAGRAM LIST

Select [File] – [Print] – [Circuit Diagram List] to print the ladder diagram. Clicking on the
tool bar also prints ladder diagrams.

[All]
Prints the entire ladder diagram currently shown in active window.

[Selected part]
Prints only the selected (highlighted) area.

[Cover]
Prints cover. The maker, program name, and the date created set in <Cover setting> are printed
on the cover.

3-46
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

[Contact comment]
Prints comments above contact signal numbers. *1

[Contact reference]
Prints below the contact, the block number the coil exists. *2

[Coil comment]
Prints coil comments. *3

[Coil reference]
Prints the block number in which the corresponding contacts for each coil can be found. *4

[Output range]
Specifies the blocks to be printed.

[Start from page]


Enter the page number for the first page of the list.

3-47
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.7.3 INSTRUCTION LIST

Select [File] – [Print] – [Instruction List] to print a list of instructions used in the file. In the
dialog box that appears, set the necessary conditions and click <Print>.

[Cover]
Prints cover. The maker, program name, and the date created set in <Cover setting> are printed
on the cover.

[Address Comment]
Prints the comments attached to coils.

[Output Range]
Specifies printing area by step number. Invalid when [All] is selected for [Program].

[Start from page]


Enter the page number for the first page of the list.

3-48
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.7.4 ADDRESS COMMENT LIST

Select [File] – [Print] – [Signal no./ Comment List] to print a list of comments written to the
signals used in the file. In the dialog box that appears, set the necessary conditions and click
<Print>.

[Cover]
Prints cover. The maker, program name, and the date created set in <Cover setting> are printed
on the cover.

<All ON>
Selects all devices for printing.

<All OFF>
Removes checks from all devices, deselecting them from printing.

[Start from page]


Enter the page number for the first page of the list.

3-49
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.7.5 CONTACT TABLE LIST

Select [File] – [Print] – [Contact Table List] to print a list of contact positions used with the coils
in the file. In the dialog box that appears, set the necessary conditions and click <Print>.

[Cover]
Prints cover. The maker, program name, and the date created set in <Cover setting> are printed
on the cover.

<All ON>
Selects all devices for printing.

<All OFF>
Removes checks from all devices, deselecting them from printing.

[Start from page]


Enter the page number for the first page of the list.

3-50
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

3.7.6 SIGNAL LIST

Select [File] – [Print] – [Signal List] to print a list showing the status of signals. In the dialog
box that appears, set the necessary conditions and click <Print>.

[Cover]
Prints cover. The maker, program name, and the date created set in <Cover setting> are printed
on the cover.

<All ON>
Selects all devices for printing.

<All OFF>
Removes checks from all devices, deselecting them from printing.

[Start from page]


Enter the page number for the first page of the list.

3-51
E Series Controller 3. KLadder
Kawasaki Robot Klogic / KLadder Operation Manual

MEMO

3-52
Kawasaki Robot E Series Controller
KLOGIC/ KLADDER OPERATION MANUAL

April 2009: 1st Edition

Publication : KAWASAKI HEAVY INDUSTRIES, LTD.

90210-1083DEA

All rights reserved. Copyright © 2009 KAWASAKI HEAVY INDUSTRIES, LTD.

You might also like