0% found this document useful (0 votes)
9 views

Protocol Studio Man KT

Uploaded by

Thanapol Uraisin
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Protocol Studio Man KT

Uploaded by

Thanapol Uraisin
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 156

Communication Macro Support Software KV-H1RW User's Manual

Communication Macro Support Software

KV-H1RWE

User's Manual
Please read this Manual before use.
Keep this Manual in a safe place for later reference.

©KEYENCE CORPORA TION, 2005 KV -1000-NM 0014-1 Pr inted in J apan


Preface
PROTOCOL STUDIO is a easy-to-operate software for programming protocols and communication
macros flexibly.
This manual describes how to use PROTOCOL STUDIO and its functions.
Be sure to thoroughly read and fully understand this manual before installing. In addition, store this
manual in a safe place so that you can retrieve it whenever necessary.

■ PROTOCOL STUDIO Related Manuals


Please refer to the following manuals when using PROTOCOL STUDIO.
If you require these manuals, contact your agent.

Type of Manual Description of Manual


Installation Manual for Ladder
Support Software This manual describes how to install KV STUDIO and KV BUILDER .
KV STUDIO / KV BUILDER
Ladder Support Software
KV STUDIO This manual describes how to operate KV STUDIO.
User's Manual
Ladder Support Software
KV-H1W This manual describes how to operate KV BUILDER.
User's Manual
Multi-communication unit
This manual describes the specifications of the KV-L20R, integrated
KV-L20R
functions, and methods of operation.
User's Manual
Communication Macro Support
Software As shown in the left figure.
KV-H1RW This manual describes how to operate PROTOCOL STUDIO.
User's Manual
Safety Precautions
This Manual describes how to install PROTOCOL STUDIO, operating procedures and the precautions
to follow.
Please read this manual thoroughly in order to take full advantage of PROTOCOL STUDIO, and use
the product only after fully understanding it.

Store this manual in a safe place so that you can retrieve it whenever necessary.
Please handover this manual to the end-users who are going to use the KV-1000 Series.

■ Symbols
This document contains notices which you should observe to ensure your own personal safety, as well
as to protect the product and connected equipment.

Danger
Indicates that death or severe personal injury will result if proper precautions
are not taken.

Warning Indicates that death or severe personal injury can result if proper precautions
are not taken.

Caution
Indicates that damage to property can result if proper precautions are not
taken.

Import
Indicates that an undesirable result or status can occur if the relevant notice is
ignored.

Note
Describes cautions for easily mistaken operations.

TIP Indicates useful information or information that aids understanding of text descriptions.

Indicates a reference item or page to be referred to in this manual and other manuals.

1
■ General Precautions
• Verify that the KV-700/1000 CPU unit and multi-communication unit KV-L20R function correctly when
using the PROTOCOL STUDIO.
• Verify that this device functions correctly at startup and during operation.
• Provide a safety circuit that by passes PLC to enable failsafe operation of the entire system in the
event that the PLC fails.
• Internal circuit malfunctions sometimes prevent control from being performed normally. Be sure to
provide a safety circuit in control systems where circuit malfunction may lead to fire or other serious
accidents.
• Proceed with care when modifying the KV-L20R, or when using it in a manner that falls outside of the
ranges indicated in its specifications, since KEYENCE is unable to guarantee device functionality or
performance in such situations.
• Use this product in combination with other devices only after careful consideration, since the product
may fail to satisfy its functionality and performance capabilities as a result of the conditions and
environment in which it is used.
• Do not use the product with the purpose of protecting human beings.

■ Caution
When using this device under the following conditions or operating environments, please consult with
your KEYENCE agents in addition to implementing safety measures such as product operation that
allows redundancy with respect to ratings and functions and use of failsafe provisions.
• Use of the product under conditions not described in this manual.
• Use of the product in nuclear power generation control, railroad facilities, aviation facilities, vehicles,
combustion devices, medical equipment, entertainment machinery, safety equipment, etc.
• Use in applications where a major influence to human life and property is anticipated, and where
safety in particular is required

2
Software License Agreement
Before you use this software, be sure to read the terms of this agreement.
Once you have started to use these softwares, it is assumed that you have consented to these terms,
and an agreement is established between KEYENCE CORPORATION and the user.

Terms
1. Rights of Use
KEYENCE CORPORATION shall permit the user the non-exclusive rights to use this software in
accordance with the terms of this agreement.

2. Copyright
Copyright relating to this software and manual shall belong to KEYENCE CORPORATION, and the
user shall not have rights other than the rights of use.

3. Forbidden Items
The user shall not be able to copy this software, nor be able to sell or distribute it to a third party. The
user, however, shall be able to copy this software for the purpose of making backups for the user's
own use.

4. Exemption of LiabilitiesKEYENCE CORPORATION shall not be subject to liability with respect to


damage on the part of the user or a third party as a result of having operated this software.

5. Cancellation of Agreement
Should the user have violated any terms of this agreement, KEYENCE CORPORATION shall
immediately be able to cancel this agreement, and the user shall destroy or return this software and
copies to KEYENCE CORPORATION.

• Microsoft, Windows, Windows NT, Windows XP are registered trademarks or trademarks of Microsoft
Corporation in the United States or other respective countries.
• IBM is a registered trademark of IBM Corporation in the United States.
• Other company names, product names, and model names used in this manual are trademarks or
registered trademarks of their respective companies.

3
MEMO

4
Configuration of This Manual

1Chapter Before Using This chapter describes how to check the content of the package and how 1
to install the software.
2
PROTOCOL This chapter describes the features and overview of PROTOCOL
2Chapter STUDIO Overview STUDIO. 3
DETAILED
4
This chapter describes the features and overview of PROTOCOL
3Chapter FUNCTION
DESCRIPTION
STUDIO. 5
6
Making the Ladder This chapter describes how to make the ladder program for controlling the
4Chapter Program receive/send timing when using PROTOCOL STUDIO. Appe

Tracing/Monitoring This chapter describes the overview of tracing/monitoring function and


5Chapter how to perform these functions.

USING PRINT This chapter describes how to print communication macro setting file and
6Chapter FUNCTION print preview.

These appendices present a list of error messages, device No. items and
Appendix
index.

5
Contents
Preface
Safety Precautions •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1
Software License Agreement ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3
How This Manual Is Organized ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 5
Contents •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 6
Conventions Used In This Manual •••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 9
Page Configuration and Symbols•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 9
Terminology •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 9

Chapter 1 PREPARATIONS
1-1 Checking the Contents of the Package••••••••••••••••••••••••••••••••••••••••••••••••••••1-2
1-2 Operating Environment ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-3
Operating Environment of the PROTOCOL STUDIO••••••••••••••••••••••••••••••••••••••••••••••1-3
1-3 Installing the Software •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-4
Preparing for Installation ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-4
Precautions in Windows 2000/XP •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-4
Installing PROTOCOL STUDIO ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-5
Uninstalling Software•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-7
1-4 Precautions Upon Using ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-8

Chapter 2 PROTOCOL STUDIO OVERVIEW


2-1 Features of PROTOCOLSTUDIO•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••2-2
2-2 PROTOCOL STUDIO Configuration ••••••••••••••••••••••••••••••••••••••••••••••••••••••••2-5
Procedures for Using PROTOCOL STUDIO ••••••••••••••••••••••••••••••••••••••••••••••••••••••••2-5
What is Communications Macro Setting File? ••••••••••••••••••••••••••••••••••••••••••••••••••••••2-6
Communication Modes Possible on PROTOCOL STUDIO ••••••••••••••••••••••••••••••••••••••2-7

Chapter 3 DETAILED FUNCTION DESCRIPTION


3-1 Setup Flow ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••3-2
3-2 Setting Items on Unit Editor ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••3-4
Setting up KV-L20R Unit ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••3-4
Verify the Contents of Settings •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••3-4
3-3 Operations When Creating Macros •••••••••••••••••••••••••••••••••••••••••••••••••••••••••3-6
Start PROTOCOL STUDIO from KV STUDIO/KV BUILDER•••••••••••••••••••••••••••••••••••••3-6
Starting PROTOCOL STUDIO from Start menu in Windows •••••••••••••••••••••••••••••••••••••3-7
Selecting Devices to be Connected •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••3-9
Names and Functions of Communication Macro Setup Area •••••••••••••••••••••••••••••••••• 3-11
Newing Communication Macro Setting File ••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-12
Opening Communication Macro Setting File •••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-14
Opening and Importing File ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-14
Saving Communication Macro Setting File •••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-15
Naming and Saving Communication Macro Setting File •••••••••••••••••••••••••••••••••••••••• 3-15
Writing Communication Macro Setting into Memory Card •••••••••••••••••••••••••••••••••••••• 3-16
Setting up the Attribute of Communication Macro Setting File••••••••••••••••••••••••••••••••• 3-16
6
Exiting PROTOCOL STUDIO •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-17
Adding Communication Macro ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-18
Deleting Communication Macro•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-20
Adding Response ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-21
Deleting Response ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-22
Moving up Macro or Response •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-23
Moving down Macro or Response ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-24
Setting up Default Send Frame •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-25
Setting up Default Receive Frame••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-25
Setting Number of Retries and Timeout Time ••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-26
Undo••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-28
Redo••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-28
Copying/Pasting Macro and Response••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-29
Displaying/Hiding Setup Toolbar and Status bar ••••••••••••••••••••••••••••••••••••••••••••••••• 3-30
Displaying System Device List ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-31
Displaying Macro Device List••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-32
Setting Options •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-33
Transferring Communication Macro to CPU Unit ••••••••••••••••••••••••••••••••••••••••••••••••• 3-33
Reading Communication Macro from CPU Unit •••••••••••••••••••••••••••••••••••••••••••••••••• 3-34
Verifying Communication Macro in CPU Unit ••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-35
Setting PC Communication Port ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-36
Displaying Help•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-36
Displaying Version Information ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-37
3-4 Setting up Send/Receive Frames ••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-38
Setting General (Send Frame) ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-38
Setting Response Name (Receive Frame) •••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-38
Setting up Configuration••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-39
Setting up Header •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-40
Setting up Station No. •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-41
Setting Data Length •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-42
Setting up Send data••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-43
Setting up Data to be Received •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-47
Setting Check Code •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-57
3-5 Restrictions When Creating Macros ••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-64
Restrictions when the communication mode is
"Send + Continuous receive" or "Only receive" ••••••••••••••••••••••••••••••••••••••••••••••••••• 3-64
Item Sequence in "Frame Configuration" •••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-64
Setting up "Receive ASCII variable (variable digits)" •••••••••••••••••••••••••••••••••••••••••••• 3-64
Setting up "Receive ASCII variable (variable number of data)"•••••••••••••••••••••••••••••••• 3-64
Setting up "ASCII constant"••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-65
Setting up the "Receive BIN variable (variable data length)"••••••••••••••••••••••••••••••••••• 3-65
Setting up "ASCII variable" ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-65
3-6 About Value Range•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-66
For DEC/Unsigned ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-66
For DEC/signed ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-66
For HEX •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-67

7
Chapter 4 MAKING LADDER PROGRAM
4-1 Setting Example for Reference Ladder Diagram••••••••••••••••••••••••••••••••••••••••4-2
4-2 Precautions when Making Ladder Program••••••••••••••••••••••••••••••••••••••••••••••4-3
4-3 Send + Receive type ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••4-4
4-4 Send + Continous receive type ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••4-7
4-5 Only Send type ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 4-14
4-6 Only Receive type ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 4-17
4-7 Verifying and Clearing Error•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 4-20

Chapter 5 TRACING/MONITORING
5-1 Tracing Function Overview •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••5-2
5-2 Names and Functions of Tracing Screen •••••••••••••••••••••••••••••••••••••••••••••••••5-4
5-3 Tracing/Monitoring ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••5-6
Switch to Tracing Screen••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••5-6
Switch to Edit Screen ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••5-8
Start tracing ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••5-8
Close tracing•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••5-8
Run PLC ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••5-9
Stop PLC •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••5-9
Start monitoring •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••5-9
End monitoring •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 5-10
Setting the Tracing Condition••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 5-10
Save the log data as a CSV file •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 5-11

Chapter 6 PRINTING
6-1 Setting Printer ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••6-2
6-2 Display Print Preview•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••6-3
6-3 Opening Communication Macro Setting File ••••••••••••••••••••••••••••••••••••••••••••6-4

APPENDICES
1 Error Message List ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• A-2
Error Messages Displayed When Programming Communication Macros •••••••••••••••••••• A-2
Error Messages Displayed When Tracing and Monitoring the Operations ••••••••••••••••••• A-7
Error Messages Displayed When the PROTOCOL STUDIO Starts ••••••••••••••••••••••••••• A-8
Error Messages Related to PLC Communication ••••••••••••••••••••••••••••••••••••••••••••••••• A-9
2 List of the device No. •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••A-10
Relay List ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• A-10
DM List•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• A-13
3 Index ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••A-15

8
How to Use This Manual
The following shows how pages are configured, and the symbols and terminology used in this Manual.

Page Configuration and Symbols

Headline.
3-3 Operation When Creating Macros
Chapter title.
This section describes the operations for creating macro setting file and the procedures to follow to use The firm product name.
PROTOCOL STUDIO. Indicated by "()".

Start PROTOCOL STUDIO from KV STUDIO/KV BUILDER.


Index. Mid-heading.
Added in each chapter.
3 Indicates the main
Start PROTOCOL STUDIO by the following procedures.
content of the chapter.
DETAILED FUNCTION DESCRIPTION

1
Chapter title.
Select [Tool(T)] [PROTOCOL STUDIO(P)] from KV BUILDER/
KV STUDIO edit screen.

Operational
Other procedure
• Click button.
procedure. • Press + key. Operational screen.
Other operational
procedure.
Describe the methods
to achieve the same Ƶ Open existing communication macro setting file. Sub-heading.
results using othe 1 Click
procedures. "Open(O)" button on "Select external devices"
dialog box.
"Open File" dialog box appears.

Tip
Reference page/manual Indicates the detailed
The page or manual TIP For communication ports, see description of related
containing the related KV BUILDER User's Manual, ì7-4 Communication with PLCî and items and reference
KV STUDIO User's Manual, ì9-1 About Functions of Monitor/Simulatorî
information. .
information
Provides additional
Note
The command or response can only be copied/pasted line by line. information on proper
operation.Be sure to read.
Precautions.
Failure to observe the CAUTION
Data can not be written into the occupied DM other than used by
caution described here communication macros set in PROTOCOL STUDIO.
may result in product When changing the data in system reserved area, the macro data will be

trouble. damaged, KV-L20R error occurs and receiving/sending data can not be
performed.

3-6

* This page was made for the purpose of explaining page components, and differs from an actual page.

Terminology

This manual uses the following terminology excluding some instances.


Terminology Description
CPU Unit KV-700/1000 series PLC products produced by Keyence Ltd.
KV-700/1000,
This refers to KV series.
KV-700/1000 Series
PLC This refers to Programmable Logic Controller.
Stands for personal computer.
PC
IBM PC and compatible PC/AT (DOS/V)
KV STUDIO KV STUDIO Ladder Support Software.
KV BUILDER Ladder Support Software KV-H1W
Ladder program The program made by Ladder Support Software.

9
MEMO

10
1

BEFORE USING
BEFORE USING
This chapter describes how to check the content of the package and how to
install the software.

1-1 Checking the Content of the Package ••••••••••••••••• 1-2


1-2 Operating Environment ••••••••••••••••••••••••••••••••••• 1-3
1-3 Installing the Software••••••••••••••••••••••••••••••••••••• 1-4
1-4 Safety Precautions••••••••••••••••••••••••••••••••••••••••• 1-8

1-1
1-1 Checking the Contents of the Package
1 The package contains the following items. Before using, make sure that the package contains
everything that it is supposed to contain.
PREPARATIONS

■ PROTOCOL STUDIO Master Disk


It includes PROTOCOL STUDIO programs and installers.
Keep this disk in a safe place when you have finished installing PROTOCOL STUDIO.

Note
We recommend backing up the CD-ROM in case it is damaged.

■ PROTOCOL STUDIO User's Manual

User's Manual, 1X

As shown in the left figure.

The required cables shall be available additionally when connecting KV-700/1000 with PC.
Prepare the required cables to match the PC you are using.
KV BUILDER User's Manual, "1-3 Preparations".
KV STUDIO User's Manual, "1-3 Preparations".

1-2
1-2 Operating Environment
This section describes the operating environment of the PROTOCOL STUDIO.
Be sure to read this section before using.
1

PREPARATIONS
Operating Environment of the PROTOCOL STUDIO

The following environment is required for operation of PROTOCOL STUDIO.


Make sure that the system you are using meets the following conditions and is equipped with the
required devices.

Compatible PC
A PC, installed with Windows98/98SE/Me/2000/Windows NT4.0
(SP5 or later) or Windows XP, equipped with a RS-232C or USB
port. (For the PC with an USB port, only pre-installed with
Windows Windows98SE/Me/2000/WindowsXP.)
• IBM PC and compatible PC (DOS/V)

CD-ROM drive

CPU memory capacity


Pentium 133 MHz or more (Pentium 200 MHz or more
recommended)
Expanded memory 64MB or more

Operation System
• Windows98SE • WindowsMe
• Windows2000 • WindowsNT4.0(SP5 or later) • WindowsXP

Free Space Available on Hard Disk


10MB or more

To enable use of monitor functions or transfer of programs on the KV-700/1000 CPU Unit, the PC must first
be connected to the respective unit (e.g. KV-700/1000 CPU Unit).
KV BUILDER User's Manual, "1-3 Preparations".
KV STUDIO User's Manual, "1-3 Preparations".

1-3
1-3 Installing the Software
This section briefly describes how to install PROTOCOL STUDIO on the PC's hard disk.
1
BEFORE USING

Preparing for Installation

Check the following before you start to install it.

Note
We recommend backing up the master disk in case it is damaged.

■ Free Space Available on Hard Disk


PROTOCOL STUDIO can be installed only on hard disks
with at least 10 Mbytes of free space. If there is not enough free space, clean up the hard disk so that
there is enough space.

■ Windows Environment and Installation Directory


PROTOCOL STUDIO should be installed and operate on Windows.
Before you install PROTOCOL STUDIO, make sure that
Windows98/98SE/Me/2000/XP 丄WindowsNT4.0(SP5 or later) is installed on the PC you are using, and
that the OS is functioning properly.

■ USB (USB port)


To transfer ladder programs or the setting file of communication macros to KV-700/1000 CPU unit or
use the monitor functions via USB port on the PC, the USB port must be enabled for use. For details on
how to set, refer to the manual for the PC you are using.
For how to install the installer, please refer to KV STUDIO/KV BUILDER User'S Manual.

■ RS-232C (serial port)


To transfer ladder programs or the setting file of communication macros to KV-700/1000 CPU unit or
use the monitor functions via RS-232C port on the PC, the RS-232C port must be enabled for use. For
details on how to set, refer to the manual for the PC you are using.

Precautions in Windows 2000/XP

■ User Rights
Set access rights as follows when PROTOCOL STUDIO is installed on the standard folder (C:\Program
files\Keyence\PROTOCOL STUDIO\).
• Assign "Power User" rights or higher to users using PROTOCOL STUDIO.

1-4
1-3 Installing the Software

Installing PROTOCOL STUDIO 1

BEFORE USING
We will take following drive configuration as an example to describe how to install software on a PC.
If the driver letters in your current PC differ from the following, specify the drive to install the software
according to the actual PC configuration.

C : Hard drive
E : CD-ROM drive

1 Turn the PC ON, and boot up Windows.


Close any applications that are already started up.

Note
When installing KV STUDIO on Windows 2000/XP, only the user with "Power User"
rights or higher can log in.

2 Insert the PROTOCOL STUDIO master disk into the CD-ROM drive on the PC.
The autorun function on the PC will start up the installer program.
If failed to start up the installer program, please select "specified file name" from Start menu, and type
"E:\setup" in "Specified file name" dialog box, then click "OK".

Installing the PROTOCOL STUDIO

Installing the PROTOCOL STUDIO.

1 Click "Next" button.


To stop the installation, click the "Cancel"
button.

2 Check the installation directory, and click "Next" button.


By default, PROTOCOL STUDIO will be
installed into C:\Program
files\Keyence\PROTOCOL STUDIO\.
To change the installation directory, click the
"Browse" button and specify the drive name
and folder.

1-5
1-3 Installing the Software

1 3 Click "Next" button.


Installation starts.
BEFORE USING

4 Click the "Finish" button.

This completes the installation of PROTOCOL STUDIO.

1-6
1-3 Installing the Software

Uninstalling Software 1

BEFORE USING
PROTOCOL STUDIO can be unistalled when PROTOCOL STUDIO is not used.
Uninstall the software as follows.

1 Turn the PC ON, and boot up Windows.

Note
When uninstalling the software on Windows 2000/XP, only the user with
"Administrator" rights can log in.

2 Select [Start] [Settings(S)] [Control Panel(C)] from menu.


Display the control panel.

3 Double-click the "Add/Remove programs" icon.


The "Add/Remove Programs Properties" dialog
box is displayed.

4 Select the application (PROTOCOL STUDIO), and click the "Add/Remove(R)" button or "Change/
Remove(C)" button (in the case of Windows
2000/XP).
The Confirm Window is displayed.
Windows 98SE Windows 2000 Windows XP

5 Click "Yes" button.


The selected program is deleted.

1-7
1-4 Safety Precautions
This section describes the precautions to follow when using PROTOCOL STUDIO. Be sure to read
1 carefully.
BEFORE USING

Confirmation of PC settings
Before you start using a PC, first make sure that USB or RS-232C port has been set.
If these ports are not set, a communications error will occur during Monitor operation, and the Monitor
cannot be operated correctly.
For details on how to set, refer to the manual for the PC you are using.

When tracing or monitoring


When tracing or monitoring, communication will be abnormal if CPU powers off or the connected cable
is pulled out. This abnormal operation is not allowed before exiting Monitor.

Display resolution
After installing PROTOCOL STUDIO, please set display solution to a setting higher than 800 x 600 pixels,
256 colors or more, small fonts.
Also, it will be comfortable to operate if setting a higher display solution. (1280 x 1024 pixels or more
recommended)

Precautions when using USB


For a USB connection, directly connect to the USB port on the PC without connecting via a USB hub.
Communications may be disrupted if noise or other factors cause unstable communications. If
communications is disrupted, re-insert the USB cable.
For this, please use shielded cable and a common mode ferrite core with both wires and the cable
shield passing through the core.

1-8
2

PROTOCOL STUDIO OVERVIEW


PROTOCOL STUDIO OVERVIEW
This chapter describes the features and overview of PROTOCOL STUDIO.

2-1 Features of PROTOCOL STUDIO •••••••••••••••••••••• 2-2


2-2 PROTOCOL STUDIO Configuration ••••••••••••••••••• 2-5

2−1
2-1 Features of PROTOCOL STUDIO
PROTOCOL STUDIO is a communication macro support software for multi-communication unit KV-
L20R or external device communication.
When using PROTOCOL STUDIO, the following programs are not required compared with when you
2 use the non-procedural mode to define communications protocols (procedures) in ladder programs:
• Program for processing ASCII text strings
PROTOCOL STUDIO OVERVIEW

• Program for calculating check codes (checksum, CRC check, etc.)


• Program for performing retry processing when a communications error occurs
For this reason, ladder programs can be simplified, and the number of man-hours required for
programming can be reduced.
Compared with non-procedural mode, the required processing items and methods for PROTOCOL
STUDIO mode are as follows when communicating with external devices.
Communication processing
Non-procedural mode PROTOCOL STUDIO mode
item
Defining the receive and send data by communication macro support
by ladder programming
format (ASCII string) software
converted automatically by multi-
ASCII '3f BIN conversion by ladder programming
communication unit
calculated automatically by multi-
Calculating data length by ladder programming
communication unit
calculated automatically by multi-
Calculating the check code by ladder programming
communication unit
by ladder programming (ON/OFF
Receive and send timing by ladder programming
relay)
verified automatically by multi-
Verifying the received data by ladder programming
communication unit
Retry processing when a controlled automatically by multi-
by ladder programming
communications error occurs communication unit

When using PROTOCOL STUDIO, the ladder program can communicate with external devices merely
by controlling (turning relays ON/OFF) the timing of transmission/reception.

2-2
2-1 Features of PROTOCOL STUDIO

■ Difference between PROTOCOL BUILDER and PROTOCOL STUDIO


Both PROTOCOL BUILDER and PROTOCOL STUDIO are the communication macro support software
for multi-communication unit KV-20. The difference between them are as follows: 2
PROTOCOL PROTOCOL

PROTOCOL STUDIO OVERVIEW


Item
BUILDER STUDIO
Supported multi-communication unit KV-L20 KV-L20R
Number of communication macros max. 32 max. 32
Number of responses per communication macro 1 max. 16,*1
1 for all 1 per
Number of send end relays, receive data read request relay or
communication communication
receive data read end relay
macros (common) macro (individual)
6630 words (1630
Number of DMs for macro data and variable 572 word
words)*2
BIN '3f ASCII conversion when sending data ○ ○
ASCII '3f BIN conversion when receiving data ○ ○
only comma any character
Data separator for ASCII '3f BIN conversion
support support
Calculating data length automatically X ○
Calculating check code (checksum, LRC, CRC) automatically X ○
Retry function when communications error occurs X ○
Setting the send dwell time X ○
Setting the receive dwell timeout time X ○
Setting the receive end timeout time X ○
Sending/Receiving BIN data X ○
Sending the break signal X ○
Monitoring function ○ ○ *3
Save the monitored results(log) as a CSV file ○ ○
Function for recording the monitored data in Microsoft Excel
○ X
format directly
Specifying the monitor interrupt when receiving and sending text
○ X
strings
Monitoring the status of control line (DR, CS, CD, ER, RS) X ○
Function for pasting the devices (relay/DM) assigned for system
relays or macros devices to Ladder Support Software by dragging ○ X
& dropping
Display function for macro device list X ○
Setting screen display color ○ X

*1 Up to 48 responses can be set.


*2 When setting up KVL20R unit by using Unit Editor, 6630 words if "Details" is set to "Large"(Number of
used DMs: 7000) and 1630 words if "Standard"( Number of used DMs: 2000).
*3 For the monitoring function of PROTOCOL BUILDER, screens will be updated in real time and
displayed; for the tracing function of PROTOCOL STUDIO, screens will be updated only after tacing is
completed when setting conditions are established (the traced data capacity or number of executed
macros reachs to the setting, or communication error occurs).

2-3
2-1 Features of PROTOCOL STUDIO

Note
About compatibility between PROTOCOL BUILDER and PROTOCOL STUDIO data
• Compatibility between communications macro setting files
2 Communications macro setting files made in PROTOCOL BUILDER and PROTOCOL
STUDIO are not compatible.
PROTOCOL STUDIO OVERVIEW

PROTOCOL BUILDER file (*.pbs) can not be opened by PROTOCOL STUDIO, vice
versa.
• Ladder program compatibility
Ladder programs created for the KV-L20 (PROTOCOL BUILDER mode)
cannot be used for the KV-L20R (PROTOCOL STUDIO mode).
Ladder programs created for the KV-L20 (PROTOCOL STUDIO mode) cannot be used
for the KV-L20R (PROTOCOL BUILDER mode).

TIP KV-L20 can be available only after connecting to KV-700 CPU unit, not be connected to KV-
1000 CPU unit.
KV-L20R can be connected to KV-700/1000 CPU unit.

2-4
2-2 PROTOCOL STUDIO Configuration
This section describes the procedures for performing communications between the KV-L20R
(PROTOCOL STUDIO mode) and external devices using PROTOCOL STUDIO.

2
Procedures for Using PROTOCOL STUDIO

PROTOCOL STUDIO OVERVIEW


The following describes the procedures for performing communications between the KV-L20R
(PROTOCOL STUDIO mode) and external devices using PROTOCOL STUDIO.

① Set the KV-L20R unit by using Unit Editor of KV BUILDER/KV STUDIO.


② Read the information of the relays and data memories to be used in PROTOCOL STUDIO from the
KV-L20R unit settings (PROTOCOL STUDIO mode) that was set in (1).
③ Create the receive/send data (communication macros) to be used in communications with external
devices by using PROTOCOL STUDIO.
④ Transfer the communication macros that were created in (3) to the CPU Unit. Communication
macros are saved in data memories (occupied by the KV-L20R) on the CPU Unit.
⑤ Make the ladder program for controlling receive/send timing by using Editor of KV BUILDER/KV
STUDIO.
⑥ Transfer the ladder program that was created in (5) to the CPU Unit.
⑦ Communication between the KV-L20R with external devices is performed by the communication
macros transferred in (4) that are controlled by the ladder program transferred in (6).

2-5
2-2 PROTOCOL STUDIO Configuration

What is Communications Macro Setting File?

2 The "communications macro setting file" that is created on PROTOCOL STUDIO defines the following:
send (command) data/response data to send/receive between the KV-L20R and external devices, the
PROTOCOL STUDIO OVERVIEW

relays that control this transmission/reception, data memories that store the variables contained in the
send (command) data/response data, and the various associations between all this information.
Individual relays and data memories are automatically assigned in macro No. order for each macro.

The KV-L20R can communicate with external devices merely by turning relays ON/OFF by the ladder
program to control the communication macros.

2-6
2-2 PROTOCOL STUDIO Configuration

Communication Modes Possible on PROTOCOL STUDIO

Communication macros created on PROTOCOL STUDIO are compatible with the following four 2
communication modes:

PROTOCOL STUDIO OVERVIEW


• Send + Receive type
• Send type
• Receive type
• Send+Continuous receive type

■ Send + Receive type


With this type, when a single item of send data (command) is sent from the KV-L20R, a single item of
response data is returned from the external device.

■ Send type
With this type, a single item of send data (command) is only sent from the KV-L20R, and no response
data is returned from the external device.

■ Receive type
With this type, no send data (command) is sent from the KV-L20R, and data to be sent from the
external device is only received.

2-7
2-2 PROTOCOL STUDIO Configuration

■ Send+Continuous receive type


With this type, when a single item of send data (command) is sent from the KV-L20R, multiple response
2 data is returned from the external device.
PROTOCOL STUDIO OVERVIEW

MEMO

2-8
3

DETAILED FUNCTION DESCRIPTION


DETAILED FUNCTION
DESCRIPTION
This chapter describes the features and overview of PROTOCOL STUDIO.

3-1 Setup Flow •••••••••••••••••••••••••••••••••••••••••••••••••• 3-2


3-2 Setting Items on Unit Editor •••••••••••••••••••••••••••••• 3-4
3-3 Operation When Creating Macros •••••••••••••••••••••• 3-6
3-4 Setting up Send and Receive Frames ••••••••••••••• 3-38
3-5 Restrictions When Creating Macros•••••••••••••••••• 3-64
3-6 About Value Range •••••••••••••••••••••••••••••••••••••• 3-66

3-1
3-1 Setup Flow

"3-2 Setting Items on Unit


Editor"(page 3-4)
3
DETAILED FUNCTION DESCRIPTION

"3-3 Operations When Creating


Macros"(page 3-6)

"3-4 Setting up Send and Receive


Frames"(page 3-38)

"3-4 Setting up Send and Receive


Frames"(page 3-38)

"3-3 Operations When Creating "3-3 Operations When Creating


Macros"(page 3-6) Macros"(page 3-6)

"3-3 Operations When Creating


Macros"(page 3-6) "3-3 Operations When Creating
Macros"(page 3-6)

3-2
3-1 Setup Flow

DETAILED FUNCTION DESCRIPTION


"3-3 Operations When Creating "3-3 Operations When Creating
Macros"(page 3-6) Macros"(page 3-6)

"3-3 Operations When Creating Macros"(page 3-6)

"Chapter 4 MAKING THE LADDER PROGRAM"(page 4-1)

"Chapter 4 MAKING THE LADDER PROGRAM"(page 4-1)

"Chapter 5 TRACING/MONITORING"(page 5-1)

3-3
3-2 Setting Items on Unit Editor
The section describes the setting items on Unit Editor of KV BUILDER/KV STUDIO before starting
PROTOCOL STUDIO.

Setting up KV-L20R Unit


3
Check whether or not the setting of KV-L20R unit is correct.
DETAILED FUNCTION DESCRIPTION

1 Start Unit Editor of KV BUILDER/KV STUDIO.


KV BUILDER User's Manual, "5-9 Operating Unit Editor"
See KV STUDIO User's Manual, "3-9 Operating Unit Editor".

2 In Edit mode - Unit Editor, click "Unit


configuration" tab, and check the
unit configuration in screen against
actual unit configuration.

3 If mismatch, reset again.


KV BUILDER User's Manual, "5-9 Operating Unit Editor"
See KV STUDIO User's Manual, "3-9 Operating Unit Editor".

Verify the Contents of Settings

1 Start Unit Editor of KV BUILDER/KV STUDIO.

2 Select "KV-L20R" on the unit configuration area.

Set every item according to the communication specification of external devices.

3-4
3-2 Setting Items on Unit Editor

3 Click "Unit setup (3)" tab, verify that the used port mode is
"PROTOCOL STUDIO" mode.

DETAILED FUNCTION DESCRIPTION


The settings are as follows.
Contents to be set
Item
When using port 1 When using port 2
KV-700 (without expansion memory) 0 to 19999
Leading DM No. KV-700 (with expansion memory) 0 to 39999
KV-1000 0 to 64999
Number of
X
occupied DMs
Leading relay No.
1000乣59915
(set by channel)
Number of
X
occupied relays
Station No. *
Operation mode PROTOCOL STUDIO mode
Standard (Number of occupied DMs: 2000)
Description
Large (Number of occupied DMs: 7000)
RS-232C
Port RS-232C RS-422A/RS-485 (4-wire)
RS-485 (2-wire)
Baudrate 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 bps
Data bit length 7 bits, 8 bits
Start bit 1 bit
Stop bit 1 bits, 2 bits
Parity none, even, odd
Checksum None
RS/CS control Y/N X

* Not available in the PROTOCOL STUDIO mode.


Please set a value 0 to 9.

3-5
3-3 Operations When Creating Macros
This section describes the operations for creating macro setting file and the procedures to follow to use
PROTOCOL STUDIO.

Start PROTOCOL STUDIO from KV STUDIO/KV BUILDER


3
Start PROTOCOL STUDIO by the following procedures.
DETAILED FUNCTION DESCRIPTION

1 Select [Tool(T)] [PROTOCOL STUDIO(P)] from KV BUILDER/


KV STUDIO edit screen.
Other procedure
• Click button.
• Press + key.

PROTOCOL STUDIO starts, and "Select


external devices" dialog box appears.

■ Open Existing Communication Macro Setting File

1 Click "Open(O)" button on "Select external


devices" dialog box.
"Open File" dialog box appears.

2 Select file, and click "Open".


Existing communication macro setting file is
opened.

3-6
3-3 Operations When Creating Macros

■ Reading Communication Macro from PLC

1 Click "Cancel" button on "Select external devices" dialog box.

2 Select [Communication(C)] [Read communication macro from


PLC(D)] from menu. 3

DETAILED FUNCTION DESCRIPTION


Begin reading and display "Reading macro".

After the read operation is finished, the read communication macros


are displayed in macro setup area.

Starting PROTOCOL STUDIO from Start menu in Windows

1 Select from Start menu in Windows [Program] [KEYENCE Applications] [PROTOCOL


STUDIO].

2 "Select CPU Unit" dialog box appears.


In connection with KV-700, if KV-700/KV-700+M is to be connected
with KV-1000, select "KV-1000" and click "OK".

"Select unit setting information" dialog box appears.

3 When using the unit setting information of saved project


file
=>"Obtain from project file(P)".

When reading the unit setting information from CPU unit


=>Select "Read from PLC(C)".

3-7
3-3 Operations When Creating Macros

• When "Obtain from project file(P)” is


selected, click "Browse(B)”, "Browse folders"
dialog box will appear. Select the required
project file and click "OK".
Click "OK” on "Select unit setting
3 information" dialog box, and "Select external
devices" dialog box appears.
DETAILED FUNCTION DESCRIPTION

• When "Read from PLC(C)” is selected, click


"Set(S)”, "Communication setting" dialog
box will appear. Select the required
communication port.

The settings are as follows.


Communication Contents to
Setting Item
Port be set
Port No. COM1*
9600
Serial port 19200
Baudrate
38400
57600
USB port No item
Input IP address.
IP address
(Default: 192.168.0.10)
Ethernet port
Input point No..
Port No.
(Default: 8500)
* The displayed contents will be different depending on the used PC.

After selecting, click "OK” and return to "Select unit setting information" dialog box.

TIP For communication ports, see:


KV BUILDER User's Manual, “7-4 Communication with PLC”
KV STUDIO User's Manual, “9-1 About Functions of Monitor/Simulator".

4 Click "OK" button on "Select unit setting information" dialog box.


Begin reading and display "Reading unit setting information".
After reading, "Select external device" dialog box appears.

3-8
3-3 Operations When Creating Macros

Selecting Devices to be Connected

1 Click the icon for the required external


devices on "Select external devices"
dialog box if any. Otherwise, select
3

DETAILED FUNCTION DESCRIPTION


"Manual setup" icon, and click "Next".
Click "Cancel" button and set up again.

2 When the icon for external device is


selected, "Send frame - Configuration" or
"Receive frame-Configuration" will be set
automatically and "Adding
Communication Macro"(page 3-18) appears.
When the icon for "Manual setup" is
selected, "Send frame-Configuration" dialog
box appears.

3 When sending data to external devices, select "Send from KV-L20R to external devices".
The items in "Select items of send frame to be configured" become selectable.

4 For "Send frame - Configuration", see


"3-4 Setting up Send and Receive
Frames"(page 3-38).
When setup is completed, "Send frame-
Verify" dialog box appears.

5 Verify the setting, and click "Finish" if correct.


Click "Back(B)" and set up again.

3-9
3-3 Operations When Creating Macros

6 Click "Finish" and "Receive frame-


Configuration" dialog box appears.
When receiving responses from external
devices, select "Receive data (response)
from external devices to KV-120R".
3 The items in "Select items of receive frame
to be configured" become selectable.
DETAILED FUNCTION DESCRIPTION

7 For "Receive frame-Configuration", see


"3-4 Setting up Send and Receive
Frames"(page 3-38).
When setup is completed, "Receive frame-
Verify" dialog box appears.

8 Verify the setting, and click "Finish" if correct.


Click "Back(B)" and set up again.

3-10
3-3 Operations When Creating Macros

Names and Functions of Communication Macro Setup Area

The following describes names and functions of communication macro setup area.

Communication macro information Communication macro relay 3


Display communication macro No., Display the relay No.s used by

DETAILED FUNCTION DESCRIPTION


macro name and communication mode. communication macros.

Send data format Response data format "Detailed" button


By double clicking, "Send frame" By double clicking, "Receive Click this button and
dialog box appears and frame" dialog box appears and display the detailed
communication items can be communication items can be contents of every
verified and set. verified and set. macro.

3-11
3-3 Operations When Creating Macros

Newing Communication Macro Setting File

Create a new communication macro setting file.

3 1 Select [File(F)] [New(N)] from menu.


Other procedure
• Click button.
DETAILED FUNCTION DESCRIPTION

• Press + key.

2 Click the icon for the required external


devices on "Select external devices" dialog
box if any. Otherwise, select "Manual
setup" icon, and click "Next".
Click "Cancel" button and set up again.

3 When the icon for external device is


selected, "Send frame - Configuration" or
"Receive frame - Configuration" will be set
automatically and "Adding
Communication Macro"(page 3-18)appears.
When the icon for "Manual setup" is selected,
"Send frame-Configuration" dialog box
appears.

4 When sending data to external devices, select "Send from KV-L20R to external devices".
The items in "Select items of send frame to be configured" become selectable.

3-12
3-3 Operations When Creating Macros

5 For "Send frame - Configuration", see


"3-4 Setting up Send and Receive
Frames"(page 3-38).
When setup is completed, "Send frame-Verify"
dialog box appears.
3

DETAILED FUNCTION DESCRIPTION


6 Verify the setting, and click "Finish" if correct.
Click "Back(B)" and set up again.

7 Click "Finish" and "Receive frame-


Configuration" dialog box appears.
When receiving responses from external
devices, select "Receive data (response) from
external devices to KV-120R".
The items in "Select items of receive frame to
be configured" become selectable.

8 For "Receive frame-Configuration", see


"3-4 Setting up Send and Receive
Frames"(page 3-38).
When setup is completed, "Receive frame-
Verify" dialog box appears.

9 Verify the setting, and click "Finish" if correct.


Click "Back(B)" and set up again.

3-13
3-3 Operations When Creating Macros

Opening Communication Macro Setting File

Open an existing communication macro setting file.

3 1 Select [File(F)] [Open(O)] from the menu.


Other procedure
• Click button.
DETAILED FUNCTION DESCRIPTION

• Press + key.
"Open File" dialog box appears.

2 Select the communication macro setting file


to be read.

3 Click "Open(O)" button.


Read the communication macro setting file specified.

Opening and Importing File

To copy communication macros in other communication macro setting file.

1 Select [File(F)] [Import(I)] from the menu.


"Open File" dialog box appears.

2 Select the communication macro setting file to be opened,


and click "Open".

Add communication macros in the imported communication macro setting file to the currently created
communication macro file.

3-14
3-3 Operations When Creating Macros

Saving Communication Macro Setting File

Save the new communication macro setting file.

1 Select [File(F)] [Save(S)] from the menu.


3
Other procedure
• Click button.

DETAILED FUNCTION DESCRIPTION


• Press + key.
The file will be saved.

Naming and Saving Communication Macro Setting File

Name and save the new communication macro setting file.

1 Select [File(F)] [Save as(A)] from the menu.


"Save as" dialog box appears.

2 Select the save location, and input the "file


name".
Click "Save(S)" button after inputting the
name.
The file will be saved into the location selected.

3-15
3-3 Operations When Creating Macros

Writing Communication Macro Setting into Memory Card

Write the setting of communication macros into memory card.


For writing memory card, see:
3 KV BUILDER User's Manual, "4-2 Setting Memory Card to Enabled". See
KV STUDIO User's Manual, "4-1 About File Functions".
DETAILED FUNCTION DESCRIPTION

Write memory card by the following procedures.

1 Connect memory card to PC.

2 Select [File(F)] [Write Memory Card(C)] from the menu.


The "Memory Card” dialog box appears.

3 Select folder for saving data.

4 Click the "OK" button.

Save to memory card.

Setting up the Attribute of Communication Macro Setting File

Display and set up the attributes information of communication macro setting file.

1 Select [File(F)] [Property(I)] from the menu.


"Properties of macro file" dialog box appears.

2 Click the items to be set in "User information", "Port information" or "Connected device" tab.

3 Click the item to set and input characters from keyboard.

4 After setting up, click "OK" button.

3-16
3-3 Operations When Creating Macros

The settings are as follows.


Tab name Item Description
Title Add a title for the communication macro setting file.
Add a creator name for the communication macro
User Creator information
setting file.
information
Memo
Add comments for the communication macro 3
setting file.

DETAILED FUNCTION DESCRIPTION


Unit No. Display the connected KV-L20R unit No..
Display the port No. of KV-L20R of connected
Unit Port
external devices.
setting
Display the range of relay No. occupied by KV-
information Relay assignment range
L20R.
Port
DM assignment range Display the range of DM No. occupied by KV-L20R.
information*1
Baudrate
Bit length
Serial port Display the communication specification set in KV-
Start bit
information L20R.
Stop bit
Parity
Connected Name of connected device Display the name of the connected device.
device*2 Comments Display the comments of the connected device.
*1 Setting can't be changed. Please change the setting by using the Edit Editor of KV BUILDER/KV
STUDIO. "3-2 Setting Items on Unit Editor"(page 3-4)
*2 Setting can't be changed. The connected device depends on the operation of "Select external device".
"Selecting Devices to be Connected"(page 3-9)

Exiting PROTOCOL STUDIO

Exit PROTOCOL STUDIO.

1 Select [File(F)] [Exit (X)] from the menu.


Exit PROTOCOL STUDIO.

3-17
3-3 Operations When Creating Macros

Adding Communication Macro

Add macros.
TIP Up to 32 macros can be newed.
3 1 Select [Macro(M)] [Add macro(A)] from the menu.
Other
DETAILED FUNCTION DESCRIPTION

• Click button.
• Press + key.

"General" dialog box appears.


Input macro name and select communication
mode.

2 After setting up, click "OK" button.


By clicking "Cancel", adding macros will be canceled.

3 After clicking "OK", macros will be added from the bottom.

3-18
3-3 Operations When Creating Macros

The settings are as follows.


Contents to be set
Item Description
Value Unit
Macro name - Set up the macro comments.
Send + Receive

Communication
Send + Continuous Receive Set up communication mode. For detail, please refer to 3
Only Send "Communication Modes Possible on PROTOCOL

DETAILED FUNCTION DESCRIPTION


mode
Only Receive STUDIO"(page 2-7).
Break send
Receive buffer Selected when clearing the received data saved in the
*1
-
clear internal buffer (capacity: 2k bytes) of the KV-L20R.
1msec The break signal can be sent to external devices from
10msec the KV-L20R to initialize their communication settings.
Break send time*2 1 to 9
100msec * For the setting of break send time, see the related
1sec instruction manual of external devices.

*1 Receive buffer


Set when the communication mode is "Send + Continuous receive" or "Only receive".
For the macro with communication mode "Send + Receive" or "Send + Continuous receive", KV-L20R clears
the buffer before sending; for "Only receive", KV-L20R clears the receive buffer when macro start relay is
turned ON.
Read the received data to the receive buffer and receive read request relay is turned ON when
consistent.
In this case, write the received data in receive buffer into DMs of CPU unit and then clear receive buffer.
When the KV-L20R receives data, it will read it into receive buffer.
The capacity of receive buffer is 2K bytes. The receive buffer overflow relay is turned ON when the read
data is out of this capacity.

The receive buffer can clear the data that is read into receive buffer at the down edge of receive read end
relay to prevent the receive buffer overflowing.

Note
When no header in response data format and using receive buffer, after enabling
macros, verify when receiving the first delimiter and clear the receive buffer when
receiving the next delimiter (verifying is not performed) in order to ensure the data
reliability. So, verifying is performed only once for two data receiving operations.
The header should be set when using receive buffer.

*2 Break send time


Break send time should be set when the communication mode is "Break send".
The break signal can be used to initialize communication settings of external devices connected with KV-
L20R.
For the setting of break send time, see the related instruction manual of external devices.

3-19
3-3 Operations When Creating Macros

Deleting Communication Macro

Delete selected macros.

3 1 Click macros (line) to be deleted.


The macro (line) clicked will be inversely displayed.
DETAILED FUNCTION DESCRIPTION

2 Select [Macro(M)] [Delete macro(D)] from the menu.


Other procedure
• Click button.

"Delete macro?" dialog box pops up.

3 Click "Yes" and the selected contents will be deleted.


Click "No" button and cancel deletion.

3-20
3-3 Operations When Creating Macros

Adding Response

Add response.
TIP A response will be created after adding a macro.
Up to 16 responses can be set per one macro. Up to 48 responses can be set in one communication 3
macro file.

DETAILED FUNCTION DESCRIPTION


1 Click the macro to be added responses.
The macro (line) or response (line) clicked will be displayed inversely.

2 Select [Macro(M)] [Add response(P)] from the menu.


The response is added in existing macro file.
Other procedure
• Click button.
• Press + key.

3-21
3-3 Operations When Creating Macros

Deleting Response

Delete the selected responses.

3 1 Click responses (line) to be deleted.


The responses (line) clicked will be displayed inversely.
DETAILED FUNCTION DESCRIPTION

2 Select [Macro(M)] [Delete response(E)] from the menu.


Other procedure
• Click button.

"Delete response?" dialog box pops up.

3 Click "Yes(Y)" and delete the selected responses.


Click "No" button and cancel deletion.

3-22
3-3 Operations When Creating Macros

Moving up Macro or Response

Move the selected macro or response one line up.


The response will be moved when moving a macro.
A response can only be moved in the same macro. A macro in which only one response is set can's be 3
moved.

DETAILED FUNCTION DESCRIPTION


1 Click the macro (line) or response (line) to be moved.
The macro (line) or response (line) clicked will be displayed inversely.

2 Select [Macro(M)] [Move up] from the menu.


Other procedure
• Click button.
• Press + key.

The selected macro or response will be moved one line up.

3-23
3-3 Operations When Creating Macros

Moving down Macro or Response

Move the selected macro or response one line down.


The response will be moved when moving a macro.
3 A response can only be moved in the same macro. A macro in which only one response is set can's be
moved.
DETAILED FUNCTION DESCRIPTION

1 Click the macro (line) or response (line) to be moved.


The macro (line) or response (line) clicked will be displayed inversely.

2 Select [Macro(M)] [Move down] from the menu.


Other procedure
• Click button.
• Press + key.

The selected macro or response will be moved one line down.

3-24
3-3 Operations When Creating Macros

Setting up Default Send Frame

Set up items of configuration send frame.

DETAILED FUNCTION DESCRIPTION


1 Select [Macro(M)] [Default send frame(S)] from the menu.
"Send frame-Configuration" dialog box appears.

For "Send frame-Configuration", see "3-4 Setting up Send and


Receive Frames"(page 3-38).

2 After setting up, click "OK" button.


Click "Cancel" and cancel the setup operation.

Setting up Default Receive Frame

Set up items of configuration receive frame.

1 Select [Macro(M)] [Default receive frame(S)] from the menu.


"Receive frame-Configuration" dialog box appears. For "Receive frame-
Configuration",see "3-4 Setting up Send and Receive Frames"(page
3-38).

2 After setting up, click "OK" button.


Click "Cancel" and cancel the setup operation.

3-25
3-3 Operations When Creating Macros

Setting Number of Retries and Timeout Time

Set up the number of retries and timeout time.

3 1 Select [Macro(M)] [System setting] from the menu.


DETAILED FUNCTION DESCRIPTION

The "System setting" dialog box appears.

2 After setting up, click "OK" button.


The settings are as follows. The value in "()" is default.
Item Contents to be set Description
Repeat to send specified times before errors are
Number of Input value. Setting range: 0 to
stopped when transmission and reception with
Retries*1 255. (0)
external devices are abnormal.
10ms, 100ms, Set the dwell time after the macro start relay is turned
Send dwell time*2 0 to 9(0)
1s(default:1s) ON and before KV-L20R starts sending data.
Set the monitoring time after KV-L20R becomes
Receive dwell 100ms, 1s,
0 to 9(3)*3 "Receive dwell" status and before receiving the initial
timeout time 10s(default:1s)
response data.
Receive end 100ms, 1s, Set the monitoring time after KV-L20R receives
0 to 9(3)*3
timeout time 10s(default:1s) response data and before receiving is completed.
*1: Enabled only when the communication mode is "Send + Receive" or "Send + Continuous receive".
*2: Disabled when the communication mode is "Receive".
*3: When "0" is set, the timeout monitoring is not performed.

TIP About Number of Retries


• Retry operation will be performed when the following errors occur.
Receive dwell timeout error
Receive end timeout error
Stop bit error
Parity error
Overrun error
Receive block error
Receive verify mismatch
• Retry operation will not be performed when the following errors occur.
Receive buffer overrun error
Macro execution error
Macro data error
• The errors that occur during performing retry are saved. After retrying, the error relay is turned ON.
3-26
3-3 Operations When Creating Macros

TIP About send dwell time


• Set the dwell time after the macro start relay is turned ON and before KV-L20R starts
sending data.

KV-L20R Send data

DETAILED FUNCTION DESCRIPTION


Macro start relay˖ t t˖Sand wait time

TIP About receive dwell timeout time


• Set the monitoring time after KV-L20R becomes "Receive dwell" status and before receiving
the initial response data.
• The receive dwell timeout error relay is turned ON after the monitoring time is up.
• The monitor timing may be different depending to the communication mode.

"Send + Receive type”


Monitor the time between data send completion and receiving response data.
External equipment Response data
KV-L20R Send data
t t˖Receive wait end timeout time

"Receive type"
First, monitor the time between the macro start relay ON and receiving response data,
then the time between response data receive completion and receiving the next
response data.
External equipment Response data Response data Response data
KV-L20R
t: Receive wait end timeout time

Macro start relay:


t t t

"Send + Continuous receive type"


First, monitor the time between the data send completion and receiving the response
data, then the time between response data receive completion and receiving the next
response data.
External equipment Response data Response data Response data
KV-L20R Send data

t: Receive wait end timeout time


t t t

TIP About receive end timeout time


• Monitor the time after KV-L20R receives response data and before receiving response data
is completed.
• The receive end timeout error relay is turned ON after the monitoring time is up.
External equipment Response data
KV-L20R Send data
t t: Receive complete end timeout time

3-27
3-3 Operations When Creating Macros

Undo

Redo the Undo operation.

3 1 Select [Edit(E)] [Redo(U)] from the menu.


Other procedure
• Click button.
DETAILED FUNCTION DESCRIPTION

• Press + key.

Cancel the last operation, and return to the previous state.

Redo

Redo the Undo operation.

1 Select [Edit(E)] [Redo(U)] from the menu.


Other procedure
• Click button.
• Press + key.

Redo the Undo operation.

3-28
3-3 Operations When Creating Macros

Copying/Pasting Macro and Response

Copy/Paste the selected macros and responses.

1 Click the macro or response to be copied.


3
The macro (line) or response (line) clicked will be displayed inversely.

DETAILED FUNCTION DESCRIPTION


2 Select [Edit(E)] [Copy(C)] from the menu.
Other procedure
• Click button.
• Press + key.

The selected macro is copied to the edit buffer.

3 Click the macro or response to be pasted.


The macro (line) or response (line) clicked will be displayed inversely.

4 Select [Edit(E)] [Paste (P)] from the menu.


Other procedure
• Click button.
• Press + key.

5 Paste the copied macro or response.

Note
The command or response can only be copied/pasted line by line.

3-29
3-3 Operations When Creating Macros

Displaying/Hiding Setup Toolbar and Status bar

Display/hide setup toolbar.

Select [View(V)] [Toolbar(T)] from the menu.


3
DETAILED FUNCTION DESCRIPTION

Toolbar is not displayed on screen.

Select [View(V)] [Toolbar(T)] from the menu.

Toolbar is displayed on screen.

Setup display/hide of status bar.

Select [View(V)] [Status bar(S)] from the menu.

Status bar is not displayed on screen.

Select [View(V)] [Status bar(S)] from the menu.

Status bar is displayed on screen.

3-30
3-3 Operations When Creating Macros

Displaying System Device List

Display the system device list.

1 Select [View(V)] [System device list] from the menu.


3
Other procedure
• Click button.

DETAILED FUNCTION DESCRIPTION


"System device list" dialog box appears.
The name of system device and the occupied devices (relay/DM)
are displayed.

For the system device, see "2 List of the device No."(page A-12).

3-31
3-3 Operations When Creating Macros

Displaying Macro Device List

Display the macro device list.

3 1 Select [View(V)] [Macro device list] from the menu.


Other procedure
• Click button.
DETAILED FUNCTION DESCRIPTION

"Macro device list” dialog box appears.

2 Select the macro to be displayed from "Select macro" pull-down menu.


The name of macro device and the occupied devices (relay/DM)
are displayed.

For the macro device, see "2 List of the device No."(page A-12).

3-32
3-3 Operations When Creating Macros

Setting Options

The macro device (relay/DM) is auto-numbered continuously when newing a communication macro.
When adding, deleting or moving a macro or response, the assignment of macro devices will be
changed. 3
You can set whether or not the warning screen is displayed * Warning screen displayed when performing a

DETAILED FUNCTION DESCRIPTION


operation that may change the assignment of
when performing a operation that may change the assignment macro devices.
of macro devices. *

1 Select [View(V)] [Options(O)] from the menu.


"Option" dialog box appears.

2 When the warning screen needs to be displayed when


performing a operation that may change the assignment of
macro devices, "Display warning when assignment of
variable DM changes" should be selected. Otherwise,
deselected.

3 After setting up, click "OK" button.


Click "Cancel" and cancel the setup operation.

Transferring Communication Macro to CPU Unit

Transfer the new communication macro to CPU Unit.

1 Verify the connection between PC and CPU.


For the connection between PC and CPU, see
KV BUILDER User's Manual, "1-3 Preparations" and
KV STUDIO User's Manual, "1-3 Preparations".

2 Select [Communication(C)] [Send macro to PLC(U)] from


menu.
Other procedure
• Click button.
• Press + key.

Start transferring and display "Sending macro".


This dialog box will disappear after transferring is completed.

3-33
3-3 Operations When Creating Macros

Reading Communication Macro from CPU Unit

Read the communications macro from CPU Unit to PROTOCOL STUDIO.

3 1 Verify the connection between PC and CPU.


For the connection between PC and CPU, see
KV BUILDER User's Manual, "1-3 Preparations" and
DETAILED FUNCTION DESCRIPTION

KV STUDIO User's Manual, "1-3 Preparations".

2 Select [Communication(C)] [Read communication macro


from PLC(D)] from menu.
Other procedure
• Click button.
• Press + key.

Begin reading and display "Reading macro".

The verify screen will be displayed when communication macro


exists.
Click "Yes(Y)" and overwrite communication macro.
Click "No(N)" and cancel reading when communication macro can not
be overwritten. Perform the procedure 2 after naming and saving the
communication macro setting file.

After the read operation is finished, the read communication macros are displayed in macro setup area.

3-34
3-3 Operations When Creating Macros

Verifying Communication Macro in CPU Unit

Verify new and existing communication macros in CPU unit.

1 Verify the connection between PC and CPU.


3
For the connection between PC and CPU, see
KV BUILDER User's Manual, "1-3 Preparations" and

DETAILED FUNCTION DESCRIPTION


KV STUDIO User's Manual, "1-3 Preparations".

2 Select [Communication(C)] [Verify macro agaist PLC(V)]


from the menu.

Start verifying and display "Reading macro".

3 Display the verified result after the verifying is completed.


"Consistent macro data" dialog box appears when their contents
are consistent.

"Inconsistent macro data" dialog box appears when their contents are
not consistent.

Click "OK" and verifying finishes.

3-35
3-3 Operations When Creating Macros

Setting PC Communication Port

Set up communication ports of PC connected with the CPU Unit.

3 1 Select [Communication(C)] [Set communication at PC


side(C)] from the menu.
DETAILED FUNCTION DESCRIPTION

Other procedure
• Click button.

The "PC side communication setup" appears.

The settings are as follows.


Contents to
Communication Port Setting Item
be set
Port No. COM1
9600
Serial port 19200
Baudrate
38400
57600
USB port No item
IP address Input IP address. (Default: 192.168.0.10)
Ethernet port
Port No. Input point No.. (Default: 8500)

TIP For PC communication ports, see


KV BUILDER User's Manual, "7-4 Communication with PLC" and
KV STUDIO User's Manual, "9-1 About Functions of Monitor/Simulator".

2 After setting up, click "OK" button.

Displaying Help

Display the help information of PROTOCOL STUDIO.

1 Select [Help(H)] [PROTOCOL STUDIO Help] from the menu.


Other procedure
• Click button.
• Press key.

Display help information.

3-36
3-3 Operations When Creating Macros

Displaying Version Information

Display the version information of PROTOCOL STUDIO.

1 Select [Help(H)] [Version information(A)] from the menu.


3

DETAILED FUNCTION DESCRIPTION


"Version information" dialog box appears.

3-37
3-4 Setting up Send and Receive Frames
To set up transmission format for the communication with external devices according to the
communication protocol of external devices.
The configuration of send and receive frames is as follows.

3 Header Station No. Data length Data Check code Delimiter

Sent or received frame


DETAILED FUNCTION DESCRIPTION

TIP The configuration sequences of send and receive frames can be changed freely.
Please follow the communications specifications of connected external devices.
But the restrictions on frame configuration should be considered. Refer to
"3-5 Restrictions When Creating Macros"(page 3-64).

Setting General (Send Frame)

To set up the name of communication macro


and communication mode.

Setting Response Name (Receive Frame)

To set up the response name in receive


(response) frame.

3-38
3-4 Setting up Send and Receive Frames

Setting up Configuration

To set up transmission format configuration for the communication with external devices.
The above checkbox is selected when sending and receiving data to or from external devices.
3

DETAILED FUNCTION DESCRIPTION


Select the items required to configurate the communication frame. And then set up.

Note
• Items of the frame to be configurated should be selected when sending and
receiving data to or from external devices.
• Data block must be set when "Data" is selected in items of the frame to be
configurated.

3-39
3-4 Setting up Send and Receive Frames

Setting up Header

It is set when the special code is used in the start part of newed communication protocol.

3
DETAILED FUNCTION DESCRIPTION

The settings are as follows.


Type Value
Control code STX(02H), ACK(06H), NAK(15H)
ASCII code ASCII characters can be input by keyboard directly. Up to 4 bytes can be set.
BIN code Input binary coded hexadecimal number directly. Up to 4 bytes can be set.

Setting Example The settings are as follows when the header is set to ASCII codes "STX", "@"
or "AB".
Type STX @ AB
Control code selectable unselectable unselectable
ASCII code unsettable @ AB
BIN code 02H 40H 4142H

3-40
3-4 Setting up Send and Receive Frames

Setting up Station No.

It is set when two or more external devices are connected in a multi-drop mode or the created
communication protocol uses station No.s.
3

DETAILED FUNCTION DESCRIPTION


The settings are as follows.
Item Type Value/Size
ASCII ASCII characters can be input by keyboard directly. Up to 2 bytes can be set.
Constants
BIN code Input binary coded hexadecimal number directly. Up to 2 bytes can be set.
ASCII (HEX) Converting the value stored in occupied DM into ASCII code in HEX format.
Variable ASCII (DEC) Converting the value stored in occupied DM into ASCII code in DEC format.
BIN code Converting the value stored in occupied DM in binary coded hexadecimal format.

Setting Example The settings are as follows when the station No. is set to ASCII codes "2",
"02", "10" or "A".
• In the case of constants
Type 2 02 10 A
ASCII 2 02 10 A
BIN code 32H 3032H 3130H 41H

• In the case of variable


Values stored in occupied DMs
Type 2 02 10 A
Size 1 byte 2 bytes 2 bytes 1 byte
ASCII (HEX) 0002H 0002H 0010H 000AH
ASCII (DEC) #00002 #00002 #00010 unsettable
BIN code 0032H 3032H 3130H 0041H

3-41
3-4 Setting up Send and Receive Frames

Setting Data Length

The data length can be calculated and added to send data according to the calculation formula set in
KV-L20R when sending the frame setting.
3 The data of above calculated data length acts as the data to be received when receiving the frame
setting.
DETAILED FUNCTION DESCRIPTION

The settings are as follows.


Item Contents to be set Description
ASCII (HEX) Converting the data length into ASCII code in HEX format.
ASCII (DEC) Converting the data length into ASCII code in DEC format.
Type
Converting the data length in binary coded hexadecimal
BIN code
format.
Size 1 to 4 bytes Setting the digits of data length
Calculating Header, station No., data length,
Selecting the required items for calculating the data length.
item data, check code, delimiter

Note
The bytes of set size from lower bit are valid and others ignored when the digits of
calculated data length is larger than the size setting (1 to 4 bytes).
Example When the calculated data length is "123" and the size is set to 2 bytes

1 2‫ޓ‬3

Disable Enable (processing as data length)

3-42
3-4 Setting up Send and Receive Frames

Setting Example The setting is as follows when header, data length, data, check code and
delimiter are selected in calculation items.

Header Data length Data Delimiter Total = Data length


1 1 6 1 9 bytes
2 10 bytes 3
3 Setting in the item with 11 bytes

DETAILED FUNCTION DESCRIPTION


4 the size of data length 12 bytes

Size
1 byte 2 bytes 3 bytes 4 bytes
Type
00B 000C
ASCII (HEX) 9 (39H) 0A (30 41H)
(30 30 42H) (30 30 30 43H)
011 0012
ASCII (DEC) 9 (39H) 10 (31 30H)
(30 31 31H) (30 30 31 32H)
BIN code 09H 000AH 00000BH 0000000CH

Setting up Send Data

Set up the data contents to be sent to external


devices.

Click "Add" and "Type of data block" dialog box will appear.

Select the type of data block to be added from the pull-down list.
The following items can be selected:
• ASCII variable
• ASCII constants
• Binary variable
• Binary constants
Click "OK" after selecting.
Display dialog boxes of every item.

3-43
3-4 Setting up Send and Receive Frames

■ Sending ASCII variable


Converting the BIN value stored in variable DM into ASCII code
and send.

3
DETAILED FUNCTION DESCRIPTION

The settings are as follows.


Item Contents to be set Description
Display the leading No. of variable DMs for storing send
Send leading DM -
data.
DEC Convert the data in variable DM in DEC format.
DEC/HEX setting
HEX*2 Convert the data in variable DM in HEX format.
1 word Use 1-word variable DM.
Number of
Use 2 words of variable DM, including send leading DM
occupied DMs 2 words
(low) and send leading DM+1 (high).
unsigned Send data without sign.
Signed/Unsigned
signed Send data with sign.
+, 0, half-width space, Setting up how to process plus characters when
Signed character
unsigned character "signed" is set.
When number variable digits, Setting the digits of data to be sent.
of occupied 1 to 5 (HEX), Fixed digits: 1 to 5 digits (for DEC and 1 word)
DMs is 1 word 1 to 4 (HEX) 1 to 4 digits (for HEX and 1 word)
Digits*1
When number variable digits, 1 to 10 digits (for DEC and 2 words)
of occupied 1 to 10 (HEX), 1 to 8 digits (for HEX and 2 words)
DMs is 2 words 1 to 8 (HEX) Variable digits: send the data as variable length.
Setting characters entering into higher bits when
0
Digit character sending the data less than the digits of data.
half-width space
Characters can not be sent for variable digits.
When number Set when sending the data with decimal point. Set digits
no decimal,
of occupied after the decimal point.
1 to 4 digits
DMs is 1 word * The decimal point can be processed only at the fixed
Decimal place
When number position. Decimal place can not be changed. The
no decimal,
of occupied decimal point can not be sent for variable digits or HEX
1 to 9 digits
DMs is 2 words number.
The sent data is suffixed with the half-width comma (,)
half-width comma (,)
as data separator.
Separator The sent data is suffixed with the half-width space as
half-width space
data separator.
no separator The sent data is suffixed with nothing.
Display example - Display examples for sending data.
*1 Digits does not symbols and decimal places.
*2 The data with sign and decimal place can not be sent for HEX number.
3-44
3-4 Setting up Send and Receive Frames

Setting Example Setting Example for Send ASCII Variable

Header 㧘 Data 1 㧘 Data 2 㧘 Data 3 㧘 Data 4 Delimiter


123 001234 㧙‫ޓ‬1.23456 㧗012.3456

Item Data 1 Data 2 Data 3 Data 4


DEC/HEX setting DEC DEC DEC DEC 3
Number of
1 word 2 words 2 words 2 words

DETAILED FUNCTION DESCRIPTION


occupied DMs
Signed/Unsigned unsigned unsigned signed signed
Signed character - (no setting) - (no setting) + +
Digits 4 6 7 7
Digit character half-width space 0 half-width space 0
Decimal place no decimal no decimal 5 digits 4 digits
Separator half-width comma (,) half-width comma (,) half-width comma (,) no separator
* half-width space

Setting Example About Digits Setting and Sent Values


The value of variable DM is 12345 and digit characters is "0"
Digits Value to be sent
1 5
When the value of variable DM larger than digits,
2 45
the value with corresponding digits will be sent
3 345
from lower bit.
4 2345
5 12345
6 012345
7 0012345 When the value of variable DM smaller than digits,
8 00012345 the value will be sent after the higher bits are filled
9 000012345 with digit characters.
10 0000012345

The value of variable DM is -6789 and digit characters is "half-width space"


Digits Value to be sent
1 -9
When the value of variable DM larger than digits
2 -89
, the value with corresponding digits will be sent
3 -789
from lower bit.
4 -6789
5 - 6789
6 - 6789
When the value of variable DM smaller than digits,
7 - 6789
the value will be sent after the higher bits are filled
8 - 6789
with digit characters.
9 - 6789
10 - 6789

■ Sending ASCII constants


Convert the input character string into ASCII code and send.

Input the character string to be sent.


The characters that can be input are half width
alphanumeric (ASCII code 20H to 7FH).

3-45
3-4 Setting up Send and Receive Frames

■ Sending binary variable


Send the data in variable DM in BIN format.
This is used for sending character string data.

3
DETAILED FUNCTION DESCRIPTION

The settings are as follows.


Item Contents to be set Description
Send leading DM - Display the leading No. of DM for storing send data.
When data storage 1 to 2048
Length of sent unit is byte unit bytes
Setting the send data length (bytes).
data When data storage 1 to 1024
unit is word unit bytes
Send the 16-bit (2 bytes) data of variable DM in the
Data storage byte unit
higher bit/lower bit sequence.
unit
word unit Send only lower 8-bit (1 byte) data of variable DM.

Setting Example When sending character string data (variable) stored in variable DM
When data storage unit is byte unit
Character string to be sent
Item
A AB ABC ABCD ABCDE
Length of sent data 1 byte 2 bytes 3 bytes 4 bytes 5 bytes
Send leading DM 4100H 4142H 4142H 4142H 4142H
Data stored in
Send leading DM+1 - - 4300H 4344H 4344H
variable DM
Send leading DM+2 - - - - 4500H
*Variable DM with "-" not used.

When data storage unit is word unit


Character string to be sent
Item
A AB ABC ABCD ABCDE
Length of sent data 1 byte 2 bytes 3 bytes 4 bytes 5 bytes
Send leading DM 0041H 0041H 0041H 0041H 0041H
Send leading DM+1 - 0042H 0042H 0042H 0042H
Data stored in
Send leading DM+2 - - 0043H 0043H 0043H
variable DM
Send leading DM+3 - - - 0044H 0044H
Send leading DM+4 - - - - 0045H
* Variable DM with "-" not used.

■ Sending binary constants


Send the input binary data.

Input the binary data to be sent in HEX format (0 to 9, A to F).

3-46
3-4 Setting up Send and Receive Frames

Setting up Data to be Received

Set up the data contents to be received from


external devices.
3

DETAILED FUNCTION DESCRIPTION


Click "Add" and "Type of data block" dialog box will appear.

Select the type of data block to be added from the pull-down list.
The following items can be selected:
• ASCII variable
• ASCII variables (variable number of data)
• ASCII constants
• Binary variable
• Binary constants
Click "OK" after selecting.
Display dialog boxes of every item.

3-47
3-4 Setting up Send and Receive Frames

■ Receiving ASCII variable


Converting the received BIN value stored in variable DM into
ASCII code and send.
BIN value can not be stored in variable DM in order to verify the
3 data inconsistency when the received data do not meet the data
format that has been set.
DETAILED FUNCTION DESCRIPTION

Note
• The following restrictions should be accepted
when the receive ASCII variable with variable
digits is used. Otherwise, the response data can
not be received correctly.
• The delimiter or separator should be set.

The settings are as follows.


Item Contents to be set Description
Receive leading Display the leading No. of variable DMs for storing the
-
DM received and BIN-converted data.
DEC Process the value of received ASCII code in DEC format.
DEC/HEX setting
HEX*1 Process the value of received ASCII code in HEX format.
1 word Use 1-word variable DM.
Number of
Use 2 words variable DM, including receive leading DM
occupied DMs 2 words
(low) and receive leading DM+1 (high).
When number variable digits, Setting the digits of value of received ASCII code.
of occupied 1 to 5 (HEX), Fixed digits: 1 to 5 digits (for DEC and 1 word)
DMs is 1 word 1 to 4 (HEX) 1 to 4 digits (for HEX and 1 word)
Digits*2
When number variable digits, 1 to 10 digits (for DEC and 2 words)
of occupied 1 to 10 (HEX), 1 to 8 digits (for HEX and 2 words)
DMs is 2 words 1 to 8 (HEX) Variable digits: data part of variably-received ASCII code. *3
Setting characters entering into higher bits when
0,
Digit character receiving the data less than the digits of data.
half-width space
Digit characters can not be set for variable digits.
When number
no decimal, Set when receiving the data with decimal point. Set
of occupied
1 to 4 digits digits after the decimal point.
DMs is 1 word
Decimal place *The decimal point can be processed only at the fixed
When number
no decimal, position. "Digits" should be set "variable digitsî when
of occupied
1 to 9 digits decimal place is variable.
DMs is 2 words
The receive data is suffixed with the half-width comma
half-width comma (,)
(,) as data separator.
The receive data is suffixed with the half-width space
Separator half-width space
as data separator.
For the receive data suffixed without the half-width
no separator
comma (,) or space as data separator.
Display example - Display examples for receiving data.
*1 The data with sign and decimal place can not be sent for HEX number.
*2 Digits does not symbols and decimal places.
*3 The decimal place needs to be stored when the variable digits is set. So, 2 words of variable DMs are
occupied when "Number of occupied DMs" is 1 word and 4 words when "Number of occupied DMs" is 2
words.
3-48
3-4 Setting up Send and Receive Frames

Setting Example Setting Example for Receive ASCII Variable

Header 㧘 Data 1 㧘 Data 2 㧘 Data 3 㧘 Data 4 Delimiter


123 001234 㧙‫ޓ‬1.23456 㧗012.3456

Setting Item
DEC/HEX setting DEC
Data 1
DEC
Data 2
DEC
Data 3
DEC
Data 4 3
Number of occupied DMs 1 word 2 words 2 words 2 words

DETAILED FUNCTION DESCRIPTION


Digits 4 6 7 7
Digit character half-width space 0 half-width space 0
Decimal place no decimal no decimal 5 digits 4 digits
half-width half-width half-width
Separator no separator
comma (,) comma (,) comma (,)

Setting Example Storing examples for receiving data with the decimal place

For fixed digits


Setting for Receive ASCII Variable
Item Setting
DEC/HEX setting DEC
Number of occupied DMs 1 word
Digits 5
Digit character 0
Decimal place 2 digits
Separator no separator

Receive data
Item
12.34 123.45 01.234 001.23
Receive leading DM X #12345 X #123
* "X" indicates inconsistent verification and data not stored.

For variable digits (number of DMs: 1 word)


Setting for Receive ASCII Variable
Item Setting
DEC/HEX setting DEC
Number of occupied DMs 1 word
Digits variable digits
Digit character -
Decimal place -
Separator no separator

Receive data
Item
12 123.45 1.2345 0012.3
Receive leading DM #12 #12345 #12345 #123
Receive leading DM+1 #1 #100 #10000 #10
*The decimal place is stored in the leading receive DM+1.

3-49
3-4 Setting up Send and Receive Frames

For variable digits (number of DMs: 2 words)


Setting for Receive ASCII Variable
Item Setting
DEC/HEX setting DEC

3 Number of occupied DMs 2 words


Digits variable digits
Digit character -
DETAILED FUNCTION DESCRIPTION

Decimal place -
Separator no separator

Receive data
Item
1234567 1.234567 001.23456 000012.3
Receive leading DM(low)
Receive leading DM 1 #1234567 #1234567 #123456 #123
(high)
Receive leading DM+2
(low)
#1 #1000000 #100000 #10
Receive leading DM 3
(high)
*The decimal place is stored in the receive leading DM +2(low) and DM+3 (high).

3-50
3-4 Setting up Send and Receive Frames

■ Receiving ASCII variables (variable number of data)


It is set when receiving ASCII code data separated by half-width
comma (,) or space and the number of data is variable.
The received ASCII code data is converted into BIN value and
stored in continuous variable DMs. 3
BIN value can not be stored in variable DM in order to verify the

DETAILED FUNCTION DESCRIPTION


data inconsistency when the received data do not meet the data
format that has been set.

Note
• The following restrictions should be accepted when the receive ASCII variable with
variable number of data. Otherwise, the response data can not be received
correctly.
• Data block can not be added after receive ASCII variable (variable number of data).
• The delimiter must be set.
• Other elements can not be set between data block and the delimiter.

Data block
Data block Data block Receiving ASCII variables Delimiter
(variable number of

Data

• One receive ASCII variable (variable number of data) is available for one response data.
• When the number of received data does not reach max. number, "0" is stored in
variable DMs after the received data.

The settings are as follows.


Item Contents to be set Description
Receive leading Display the leading No. of variable DMs for storing receive
-
DM data.
Max. number of
1 to 999 Set max. number of data to be received.
data*1
DEC Process the value of received ASCII code in DEC format.
DEC/HEX setting
HEX*2 Process the value of received ASCII code in HEX format.
Number of 1 word 1 word of variable DM is used for 1 data.
occupied DMs 2 words 2 words of variable DM (high/low) are used for 2 data.
When number variable digits, Setting the digits of value of received ASCII code.
of occupied 1 to 5 (HEX), Fixed digits: 1 to 5 digits (for DEC and 1 word)
DMs is 1 word 1 to 4 (HEX) 1 to 4 digits (for HEX and 1 word)
Digits*3 1 to 10 digits (for DEC and 2 words)
When number variable digits,
1 to 8 digits (for HEX and 2 word)
of occupied 1 to 10 (HEX),
Variable digits: data part of variably-received ASCII
DMs is 2 word 1 to 8 (HEX)
code. *4
Setting characters entering into higher bits when
0,
Digit character receiving the data less than the digits of data.
half-width space
Digit characters can not be set for variable digits.

3-51
3-4 Setting up Send and Receive Frames

Item Contents to be set Description


When number
no decimal, Set when receiving the data with decimal point. Set
of occupied
1 to 4 digits digits after the decimal point.
DMs is 1 word
Decimal place *The decimal point can be processed only at the fixed
3 When number
of occupied
no decimal,
1 to 9 digits
position. "Digits" should be set "variable digits" when
decimal place is variable.
DMs is 2 words
DETAILED FUNCTION DESCRIPTION

half-width comma (,) The half-width comma (,) is set as data separator.
Separator
half-width space The half-width space is set as data separator.
Display example - Display examples for receiving data.
*1 BIN value can not be stored in variable DM in order to verify the data inconsistency when the number of
received data exceeds max. number of data.

*2 The data with sign and decimal place can not be sent for HEX number.
*3 Digits does not symbols and decimal places.
*4 The decimal place needs to be stored when the variable digits is set. So, 2 words of variable DMs are
occupied when "Number of occupied DMs" is 1 word and 4 words when "Number of occupied DMs" is 2
words.
Setting Example Examples for storing the received data of receive ASCII variable (variable number
of data)
Examples for storing data in variable DM when max. number of data is set to 3

For fixed digits


Setting up receive ASCII variable (variable number of data)
Item Setting
Max. number of data 3
DEC/HEX setting DEC
Number of occupied DMs 1 word
Digits 4
Digit character 0
Decimal place 2 digits
Separator half-width comma (,)

When the receive data uses the following format


Header 01.23,45.67,00.89 Delimiter

Receive leading Receive leading Receive leading


Variable DM
DM DM+1 DM+2
Data stored in variable DM #123 #4567 #89

When the receive data uses the following format


Header 07.09,15.15 Delimiter

Receive leading Receive leading Receive leading


Variable DM
DM DM+1 DM+2
#0
Data stored in variable DM #709 #1515
(no data)

3-52
3-4 Setting up Send and Receive Frames

When the receive data uses the following format


Header 91.98 Delimiter

Receive leading Receive leading Receive leading


Variable DM
DM DM+1 DM+2
Data stored in variable DM #9198 #0(no data) #0(no data) 3
For variable digits

DETAILED FUNCTION DESCRIPTION


Setting up receive ASCII variable (variable number of data)
Item Setting
Max. number of data 3
DEC/HEX setting DEC
Number of occupied DMs 1 word
Digits variable digits
Digit character -
Decimal place -
Separator half-width comma (,)

When the receive data uses the following format


Header 1.23,4.567,89 Delimiter

Receive Receive Receive Receive Receive Receive


Variable DM leading leading leading leading leading leading
DM DM+1 DM+2 DM+3 DM+4 DM+5
Data stored in variable DM #123 #100 #4567 #1000 #89 #1

To store decimal place

When the receive data uses the following format


Header 70.9,0.1515 Delimiter

Receive Receive Receive Receive Receive Receive


Variable DM leading leading leading leading leading leading
DM DM+1 DM+2 DM+3 DM+4 DM+5
#0
Data stored in variable DM #709 #10 #1515 #10000 #1
(no data)

To store decimal place

When the receive data uses the following format


Header 9.198 Delimiter

Receive Receive Receive Receive Receive Receive


Variable DM leading leading leading leading leading leading
DM DM+1 DM+2 DM+3 DM+4 DM+5
#0 #0
Data stored in variable DM #9198 #1000 #1 #1
(no data) (no data)

To store decimal place

3-53
3-4 Setting up Send and Receive Frames

■ Receiving ASCII constants


To verify by comparing the received data with the
character string for verifying input in advance or
the number of received characters (bytes) with
3 the number of characters for verifying input in
advance.
DETAILED FUNCTION DESCRIPTION

The settings are as follows.


Item Contents to be set Description
not verified Received data is not verified.
Verify contents of Verify by comparing the received data with character string for
Verify type
character string verifying.
Only verify number of Verify by comparing the number of received data characters with
characters the number of characters for verifying.
Input the character string for comparing when "Verify character
Verify character
- string" is set. The characters that can be input are half width
string
alphanumeric (ASCII code 20H to 7FH).
Verify number Input the number of characters (bytes) for comparing when "Verify
-
of characters number of charactersî is set.

Note
• The following restrictions should be accepted when the receive ASCII constants
not verified is used. Otherwise, the response data can not be received correctly.
• Do not add a data block after the ASCII constant that is set to "not verified".
• Data length is set before data in the receive frame configuration. When data length is
not set, the delimiter must be set. Other elements can not be set between delimiters
when only delimiter is set. In addition, the delimiter should be set as other than ASCII
characters (half width alphanumeric and sign, ASCII code 20H to 7FH).
Data block
Data length Data block Data block Receive ASCII constant
(not verified)

Data
Or
Data block
Data block Data block Receive ASCII constant Delimiter
(not verified)

Data

• One response can use only 1 delimiter.

Setting Example Examples for verified results of the receive ASCII constant

Receive data
Verify type
ABC 12A 12ab 123A
not verified ○ ○ ○ ○
Verify contents of character string (Verify character string: ABC) ○ X X X
Only verify character string (number of verified characters: 3) ○ ○ X X
○: Consistent, X: Inconsistent

3-54
3-4 Setting up Send and Receive Frames

■ Receiving binary variable


The received data is stored in DM directly.

DETAILED FUNCTION DESCRIPTION


The settings are as follows.
Contents to
Item Description
be set
Receive leading DM - Display the leading No. of variable DMs for storing receive data.
Fixed data length Set when the length of data to be received is fixed.
Data length type Variable data
Set when the length of data to be received is variable.
length
Data length/ 1 to 2048 For fixed data length: to set up the length of data to be received (bytes). *1
Max. data length bytes For variable data length: to set up the max. length of data to be received (bytes).*2
*1 Data can not be stored in variable DM in order to verify the data inconsistency when receiving the data with
other than specified data length.
*2 Data can not be stored in variable DM in order to verify the data inconsistency when receiving the data that
exceeds max. data length.

Note
• The following restrictions should be accepted when the receive BIN variable with
variable data length is used.
Otherwise, the response data can not be received correctly.
• Data length should be set before data in the receive frame configuration.
• In addition, in the responses for which a receive binary variable with variable data length
is set, do not use data block of the ASCII variable, ASCII variable (variable number) and
the ASCII constant with "not verified".
• One response can use only 1 delimiter.
• When the data length (bytes) of received data is smaller than the number of bytes set
in data length/max. data length, ì0î is stored in variable DMs after the received data.

Setting Example Examples for storing received data of receive BIN variable
Examples for storing data in variable DM when the data length/max. data length is set to 5

In the case of fixed data length


Setting for Receive ASCII Variable
Item Setting
Data length type Fixed data length
Data length/Max. data length 5

Receive data
Item 4142434445H 41424344H 414243444546H
(ABCDE) (ABCD) (ABCDEF)
Receive leading DM 4142H X X
Data stored in
Receive leading DM+1 4344H X X
variable DM
Receive leading DM+2 4500H X X
* "X" indicates inconsistent verification and data not stored.
3-55
3-4 Setting up Send and Receive Frames

For variable data length


Setting for Receive ASCII Variable
Item Setting
Data length type Variable data length

3 Data length/Max. data


length
5
DETAILED FUNCTION DESCRIPTION

Receive data
Item 4142434445H 41424344H 414243444546H
(ABCDE) (ABCD) (ABCDEF)
Receive leading DM 4142H 4142H X
Data stored in
Receive leading DM+1 4344H 4344H X
variable DM
Receive leading DM+2 4500H 0000H X
* "X" indicates inconsistent verification and data not stored.

■ Receiving binary constants


Verify by comparing the received data with BIN data
input in advance.

Input the binary data to be compared in HEX format (0 to 9, A to F).

3-56
3-4 Setting up Send and Receive Frames

Setting Check Code

To set up the code for verifying whether or not errors exist in send/receive data.
When sending, KV-L20R can calculate the data within calculation item range automatically according to
the specified calculation formula and add it to data to be sent. 3
When receiving, KV-L20R can calculate the data within calculation item range automatically according

DETAILED FUNCTION DESCRIPTION


to the specified calculation formula and compare it with the check code received by external devices to
verify errors.

Sand side

Data Check code

• The data is sent after adding Reception side


the check code. Data Check code

• To compare the result calculated based on the received


data with the received check code.
If they match, the received data is correct, and saved in
receive buffer.
Otherwise, the received data is incorrect and ignored.
Error occurs (receive block error).

Check codes can be set as follows.


• LRC (horizontal parity): Total value of the results obtained by XORing a byte of data.
LRC value refers to the total value of the results obtained by XORing target data.
• Checksum: The result obtained by adding a byte of data.
The checksum value is the result obtained by adding target data in binary
format.
• CRC-CCITT: For the value obtained by XORing the CRC register value and (receive/
send) data, the following operations are performed repeatly in byte unit.
Shift 1 bit to left.
If the carry flag is ON, it will be XORed with the generated polynomial.
Repeat above operations until the final data.
• CRC-16: For the value obtained by XORing the CRC register value and (receive/
send) data, the following operations are performed repeatly in byte unit.
Shift 1 bit to right.
If the carry flag is ON, it will be XORed with the generated polynomial.
Repeat above operations until the final data.

3-57
3-4 Setting up Send and Receive Frames

The settings are as follows.


Item Contents to be set Description
ASCII (HEX) Converting the check code into ASCII code in HEX format.
Type ASCII (DEC) Converting the check code into ASCII code in DEC format.

3
BIN code Converting the check code in binary coded hexadecimal format.
Size 1 to 4 bytes Setting the number of bytes of check code.
Header, station No.,
DETAILED FUNCTION DESCRIPTION

Calculating item data length, data, Selecting the required items for calculating the check code.
delimiter
LRC (horizontal parity) Total value of the results obtained by XORing a byte of data.
Checksum The result obtained by adding a byte of data.
For the value obtained by XORing the CRC register value and
(receive/send) data, the following operations are performed
repeatly in byte unit.
CRC-CCITT Shift 1 bit to left.
If the carry flag is ON, it will be XORed with the generated
polynomial.
Calculating way
Repeat above operations until the final data.
For the value obtained by XORing the CRC register value and
(receive/send) data, the following operations are performed
repeatly in byte unit.
CRC-16 Shift 1 bit to right.
If the carry flag is ON, it will be XORed with the generated
polynomial.
Repeat above operations until the final data.
no complement
Take the calculated value as the check code directly.
calculation
Complement Take the value obtained by inverting all bits of the calculated
One's complement
calculation value as the check code.
Take the value obtained by inverting all bits of the calculated
Two's complement
value and adding "1" as the check code.
Take the value obtained by exchanging the higher bytes (8 to
Yes
Byte replacement *1 15 bits) and lower bytes (0 to 7 bits) as the check code.
No Take the calculated value as the check code directly.
Yes Invert the bit sequence of the calculated value bytewise.
CRC bitwise invert*2 To calculate without inverting the bit sequence of the
No
calculated value.
*2 0XFFFF Set the default value of CRC register to FFFFH.
CRC default
0X0000 Set the default value of CRC register to 0000H.
*1 It is set when the size is set to "2 bytes" or "4 bytes".
*2 It is set when the calculation way is set to "CRC-CCITT" or "CRC-16".

3-58
3-4 Setting up Send and Receive Frames

Example
How to Calculate the LRC (horizontal parity)

㧬 0 0 S C 0 J LRC CR

Calculation range 3
XOR @ 40H 0100 0000

DETAILED FUNCTION DESCRIPTION


0 30H 0011 0000
0 30H 0011 0000
S 53H 0101 0011
C 43H 0100 0011
0 30H 0011 0000
J 4AH 0100 1010
Result (BIN) 0010 1010
Result (HEX) 2 A

The values of check code are as follows when the calculated LRC result is "2AH".
• In the case of "no complement calculation"
("2AH" is equal to "42" in decimal format).
Size
1 bytes 2 bytes 3 bytes 4 bytes
Type
ASCII (HEX) A (41H) 2A (32 41H) 02A (30 32 41H) 002A (30 30 32 41H)
ASCII (DEC) 2 (32H) 42 (34 32H) 042 (30 34 32H) 0042 (30 30 34 32H)
BIN code 2AH 002AH 00002AH 0000002AH

• In the case of "One's complement (bitwise invert)"


(One's complement of 002AH is "FFD5H". "FFD5H" is equal to "65493" in decimal format).
Size
1 bytes 2 bytes 3 bytes 4 bytes
Type
ASCII (HEX) 5 (35H) D5 (44 35H) FD5 (46 44 35H) FFD5 (46 46 44 35H)
ASCII (DEC) 3 (33H) 93 (39 33H) 493 (34 39 33H) 5493 (35 34 39 33H)
BIN code D5H FFD5H FFFFD5H FFFFFFD5H

• In the case of "Two's complement (bitwise invert+1)"


(Two's complement of 002AH is "FFD6H". "FFD6H" is equal to "65494" in decimal format).
Size
1 bytes 2 bytes 3 bytes 4 bytes
Type
ASCII (HEX) 6 (36H) D6 (44 36H) FD6 (46 44 36H) FFD6 (46 46 44 36H)
ASCII (DEC) 4 (34H) 94 (39 34H) 494 (34 39 34H) 5494 (35 34 39 34H)
BIN code D6H FFD6H FFFFD6H FFFFFFD6H

3-59
3-4 Setting up Send and Receive Frames

Example
How to Calculate the Checksum

F F B R 2 0 5 Verify CR

3 Calculation range

Sum F 46H
DETAILED FUNCTION DESCRIPTION

F 46H
B 42H
R 52H
2 32H
0 30H
5 35H
Result (HEX) 1B7H

The values of check code are as follows when the calculated result of checksum is "1B7H".
• In the case of "no complement calculation"
("1B7H" is equal to "439" in decimal format).
Size
1 bytes 2 bytes 3 bytes 4 bytes
Type
ASCII (HEX) 7 (37H) B7 (42 37H) 1B7 (31 42 37H) 01B7 (30 31 42 37H)
ASCII (DEC) 9 (39H) 39 (33 39H) 439 (34 33 39H) 0439 (30 34 33 39H)
BIN code B7H 01B7H 0001B7H 000001B7H

• In the case of "One's complement (bitwise invert)"


(One's complement of 01B7H is "FE48H". "FE48H" is equal to "65096" in decimal format).
Size
1 bytes 2 bytes 3 bytes 4 bytes
Type
ASCII (HEX) 8 (38H) 48 (34 38H) E48 (45 34 38H) FE48 (46 45 34 38H)
ASCII (DEC) 6 (36H) 96 (39 36H) 096 (30 39 36H) 5096 (35 30 39 36H)
BIN code 48H FE48H FFFE48H FFFFFE48H

• In the case of "Two's complement (bitwise invert+1)"


(One's complement of 01B7H is "FE49H". "FF49H" is equal to "65097" in decimal format).
Size
1 bytes 2 bytes 3 bytes 4 bytes
Type
ASCII (HEX) 9 (39H) 49 (34 39H) E49 (45 34 39H) FE49 (46 45 34 39H)
ASCII (DEC) 7 (37H) 97 (39 37H) 097 (30 39 37H) 5097 (35 30 39 37H)
BIN code 49H FE49H FFFE49H FFFFFE49H

3-60
3-4 Setting up Send and Receive Frames

Example
How to Calculate the CRC(CRC-CCITT, CRC-16)
Calculate the CRC(CRC-CCITT, CRC-16) by the following procedures.

1 The value (FFFFH or 0000H) set in "CRC default" is stored in CRC register.

2 XOR the first 1 byte (8 bits) of data in CRC register and data to be verified and
3

DETAILED FUNCTION DESCRIPTION


return the result to CRC register.

3 Carry CRC register(16-bit) by a bit.


For CRC-CCITT : shift to left
For CRC-16 : shift to right

4 In this case, if the carry flag is ON, CRC register will be XORed with the
generated polynomial and the result is returned to CRC register.

5 Repeat steps 3 and 4 until 8 shifts (1 byte) are completed.

6 After shifting, XOR the first 1 byte (8 bits) of the result with the next data to be
verified and return the result to CRC register. (Step 2)

7 Repeat steps (2) to (5) for all data to be verified.

8 Take the final value in CRC register as check code.

3-61
3-4 Setting up Send and Receive Frames

Calculation Flow of CRC (CRC-CCITT, CRC-16)

Save the CRC default value in the CRC register.

3 XOR the first 1 byte (8 bits) of data in CRC register and data to
DETAILED FUNCTION DESCRIPTION

be verified and return the result to CRC register.

Turn n to "0".

Shift CRC register by a bit.

No
Carry flag =1

YES

XOR the CRC register with the generated polynomial

and the result is returned to CRC register.

Add "1" to n and return to n.

No
n㧪7

YES

No
All data to be verified are completed.

YES

Take the value in CRC register as the check code.

3-62
3-4 Setting up Send and Receive Frames

■ Setting up the delimiter


It is set when the special code is used in the end part of newed communication protocol.

DETAILED FUNCTION DESCRIPTION


The settings are as follows.
Type Value
Control code ETX(03H), CR(0DH), CR+LF(0D0AH), ACK(06H), NAK(15H)
ASCII ASCII characters can be input by keyboard directly. Up to 4 bytes can be set.
BIN code Input binary coded hexadecimal number directly. Up to 4 bytes can be set.

Setting Example The settings are as follows when the delimiter is set to "ETX", "@" or "CD".

Type ETX @ CD
Control code selectable unselectable unselectable
ASCII unsettable @ CD
BIN code 03H 40H 4344H

3-63
3-5 Restrictions When Creating Macros
Restrictions when creating macros are as follows,
which should be accepted. Otherwise, the data can not be received or sent correctly.

Restrictions when the Communication mode is "Send + Continuous receive" or "Only receive".
3
• The header or delimiter should be set in the receive frame configuration.
DETAILED FUNCTION DESCRIPTION

• When there is no header in the receive frame configuration, other item can not be set after the
delimiter.
• The same frame configuration should be used and the same header and delimiter should be set
when multiple responses are set for 1 macro.
• The items other than the header and delimiter can not be set in binary format.

Item Sequence in "Frame Configuration"

• The header should be set at the start position.


• The items other than the check code can not be set after the delimiter.
• Data length should be set before data.

Setting up "Receive ASCII Variable (variable digits)"

• The delimiter or separator should be set.

Setting up "Receive ASCII Variable (variable number of data)"

• Data block can not be added after receive ASCII variable (variable number of data).
• The delimiter must be set.
• Other elements can not be set between data block and the delimiter.

Data block
Data block Data block Receiving ASCII variables Delimiter
(variable number of variables)

Data

• One response can use only 1 delimiter.


• When the number of received data does not reach max. number, ì0î is stored in variable DMs after
the received data.

3-64
3-5 Restrictions When Creating Macros

Setting up "ASCII Constant"

• The characters that can be set are half width alphanumeric (ASCII code 20H to 7FH).
• Do not add a data block after the ASCII constant that is set to "not verified".
• Data length is set before data in the receive frame configuration when using the receive ASCII 3
constants that is set to "not verified". When data length is not set, the delimiter must be set. Other

DETAILED FUNCTION DESCRIPTION


elements can not be set between delimiters when only delimiter is set. In addition, the delimiter
should be set as other than ASCII characters (half width alphanumeric and sign, ASCII code 20H to
7FH).

Data block
Data length Data block Data block Receive ASCII constant
(not verified)

Data
Or
Data block
Data block Data block Receive ASCII constant Delimiter
(not verified)

Data

• Only 1 receive ASCII constants that is set to "not verified" is set for 1 repsonse data.

Setting up the "Receive BIN Variable (variable data length)"

• Data length should be set before data in the receive frame configuration.
• In addition, in the responses for which a receive binary variable with variable data length is set, do
not use data block of the ASCII variable, ASCII variable (variable number of data) and the ASCII
constant that is set to"not verified".
• One response can use only 1 delimiter.
• When the data length (bytes) of received data is smaller than the number of bytes set in data length/
max. data length, ì0î is stored in variable DMs after the received data.

Setting up "ASCII Variable"

• The values that can be set are HEX numbers (0 to 9, A to F).

3−65
3-6 About Value Range
This section describes the value ranges that the variable can process.

For DEC/Unsigned

3 When "1 word" is set, 0 to 65535 (1 to 5 bits)


When "2 word" is set, 0 to 4294967295 (1 to 10 bits)
DETAILED FUNCTION DESCRIPTION

.
Value range
Data (DEC) Number of occupied DMs Digits Signed/Unsigned
0 to 9 1
00 to 99 2
000 to 999 3
0000 to 9999 1 word (2 words) 4
00000 to 65535 5
variable digits (1
0 to 65535
word)
00000 to 99999 5 unsigned
000000 to 999999 6
0000000 to 9999999 7
00000000 to 99999999 8
2 words
000000000 to 999999999 9
0000000000 to 4294967295 10
variable digits (2
0 to 4294967295
words)

For DEC/Signed

When "1 word" is set, -32768 to +32767 (1 to 5 digits)


When "2 words" is set, -2147483648 to +2147483647 (1 to 10 digits).
Value range
Data (DEC) Number of occupied DMs Digits Signed/Unsigned
-9 to *9 1
-99 to *99 2
-999 to *999 3
-9999 to *9999 1 word (2 words) 4
5
-32768 to *32767 variable digits (1
word) signed
-99999 to *99999 5 *Characters with
-999999 to *999999 6 sign.
-9999999 to *9999999 7
-99999999 to *99999999 8
2 words
-999999999 to *999999999 9
10
-2147483648 to *2147483647 variable digits (2
words)

3-66
3-6 About Value Range

For HEX

When "1 word" is set, 0 to FFFF (1 to 4 digits)


When "2 words" is set, 0 to FFFFFFFF (1 to 8 digits)
. 3
Value range

DETAILED FUNCTION DESCRIPTION


Data (HEX) Number of occupied DMs Digits
O to F 1
00 to FF 2
000 to FFF 3
1 word (2 words)
0000 to FFFF 4
variable digits (1
0 to FFFF
word)
00000 to FFFFF 5
000000 to FFFFFF 6
0000000 to FFFFFFF 7
2 words
00000000 to FFFFFFFF 8
variable digits (2
0 to FFFFFFFF
words)

3-67
3-6 About Value Range

MEMO

3
DETAILED FUNCTION DESCRIPTION

3-68
4

MAKING THE LADDER PROGRAM


MAKING THE LADDER
PROGRAM
This chapter describes how to make the ladder program for controlling the
receive/send timing when using PROTOCOL STUDIO, and for verifying and
clearing communication errors.

4-1 Setting Example for Reference Ladder Diagram •••• 4-2


4-2 Precautions when Making Ladder Program •••••••••• 4-3
4-3 Transmission + reception type••••••••••••••••••••••••••• 4-4
4-4 Transmission + continuous reception type •••••••••••• 4-7
4-5 Only Send type ••••••••••••••••••••••••••••••••••••••••••• 4-14
4-6 Only Receive type ••••••••••••••••••••••••••••••••••••••• 4-17
4-7 Verify Error and Clear Error •••••••••••••••••••••••••••• 4-20

4-1
4-1 Setting Example for Reference Ladder Diagram
This section describes the ladder program examples for the following timings.

Connect a KV-L20R and an external device.


The send data uses the variable DM for the send data block, and the response data uses the variable
DM for the receive data block.
CPU unit KV-L20R External equipment

4 Port 1
MAKING THE LADDER PROGRAM

Settings on Unit Editor


Item Contents to be set
Leading DM No. DM10000
Leading relay No. (set by
30000
channel)
Operation mode PROTOCOL STUDIO mode
Standard (Number of occupied
Description
DMs: 2000)

4-2
4-2 Precautions When Making Ladder Program
This section describes the precautions to follow when making the ladder program for communication in
PROTOCOL STUDIO mode.

Note
Data can not be written into the occupied DM other than used by communication
macros set in PROTOCOL STUDIO.
When changing the data in system reserved area, the macro data will be damaged,
KV-L20R error occurs and receiving/sending data can not be performed. 4

MAKING THE LADDER PROGRAM


N :DM No. set in Unit Editor.
W :number of DMs occupied by DM No. + port 1 set in Unit Editor.

In the case of PROTOCOL STUDIO Standard mode


DM No. Name
N +000 (common to port 1 and port 2) Error No.
Port 1 Port 2 X
N +001 W +001 Receive data length
N +002 to N +257 W +002 to W +257 Receive buffer area
N +258 to N +259 W +258 to W +259 Reserved for system
N +260 to N +589 W +260 to W +589 Macro variable area
N +590 to N +2000 W +590 to W +2000 Reserved for system

In the case of PROTOCOL STUDIO Large mode


DM No. Name
N+000 (common to port 1 and port 2) Error No.
Port 1 Port 2 X
N +001 W +001 Receive data length
N +002 to N +257 W +002 to W +257 Receive buffer area
N +258 to N +259 W +258 to W +259 Reserved for system
N +260 to N +2259 W +260 to W +2259 Macro variable area
N +2260 to N +7000 W +2260 to W +7000 Reserved for system

Data can not be written into the DMs with by the ladder program.

• In the ladder program, macro execution error will occur and all communication macro will b stopped
when multiple macro start relays ( n +000 to n +115) are turned ON.

(Including the macro start relay unused by communication macros)


n : Leading relay No. set in Unit Editor.
• During executing communication macros, communication macros are stopped when the macro start
relay is turned OFF.
But it must keep ON during macro execution.

4-3
4-3 Transmission + Reception Type
In this communication mode, one response data can be returned for one send data.
It is used when communicating with an external device by SHAKE.

CPU unit KV-L20R External equipment


Send
Send data

Response data
4 Receive
MAKING THE LADDER PROGRAM

Send data Send data

Response Response
data A match data B Mismatch

Operation enable relay


㧔 n +400㧕
(1)

Operation ready relay


㧔 n +1200㧕
(2)

(3) Send variable DM


㧔 N +260~㧕

Macro start relay㧔 n 㧕


(3) (6) (8) (13)

Sand end relay㧔 n +1000㧕 (4) (7) (9)

Detection relay
㧔 n +500㧕 (5) (7)

Receive mismatch request relay


㧔 n +1208㧕 (10) (12)

Receive data read request relay


㧔 n +800㧕 (5) (7)

Receive variable DM
㧔 N +260~㧕(5)

Error clear request relay


㧔 n +401㧕 (11) (13)

Error clear complete relay


㧔 n +1201㧕 (12) (14)

* n : Leading relay No.


≅ N : Leading DM No.

4-4
4-3 Transmission + Reception Type

(1) Ladder program The operation enable relay is turned ON before communication macros are
executed.
(2) KV-L20R The operation ready relay is turned ON when the operation enable relay is ON.
(3) Ladder program When the send data uses variable DMs, variables will be stored and the macro
start relay is turned ON (including in the same scan), data is sent from KV-L20R
to external devices (when the send dwell time is set, begin sending after this
time).
(4) KV-L20R The send complete relay is turned ON after sending data is completed. 4
(5) KV-L20R Verify the received response data against the response data format. If they

MAKING THE LADDER PROGRAM


match, the verify relay is turned ON, data will be stored in the variable DMs of
receive data block, and the receive read request relay is turned ON.
(6) Ladder program When the receive data block uses variable DMs, the macro start relay is turned
OFF by the data processed and stored by the ladder program.
(7) KV-L20R When the macro start relay is turned OFF, the send complete relay, verify relay and
receive read request relay are turned OFF. *
(8) Ladder program When the send data uses variable DMs, variables will be stored and the macro
start relay is turned ON (including in the same scan), data is sent from KV-L20R to
external devices (when the send dwell time is set, begin sending after this time).
(9) KV-L20R The send complete relay is turned ON after sending data is completed.
(10) KV-L20R Verify the received response data against the response data format. If mismatch,
the receive verify mismatch relay is turned ON, an error occurs.
(11) Ladder program Turn the error clear request relay ON to clear errors.
(12) KV-L20R After clearing errors, the error clear complete relay is turned ON and the receive
verify mismatch relay OFF.
(13) Ladder program When the error clear complete relay is ON, the error clear request relay and
macro start relay are turned OFF.
(14) KV-L20R When the error clear request relay is OFF, the error clear complete relay is
turned OFF.

Note
When the macro start relay is turned OFF during executing macros, the received
response data will be discarded and the communication macro is finished forcibly.

* when the received response data exceeds 512 bytes, the verify relay will not be turned OFF before
all the response data have been saved into the DM of the receive buffer area.

4-5
4-3 Transmission + Reception Type

Reference

CR2002 R30400
0001
Always ON Operation
enable relay

R31200 MOV
0002 #12345 DM10260
4 Operation
ready relay
Send start
Send variable DM
MAKING THE LADDER PROGRAM

R30000
0003 SET
Macro 1 start relay

R30800 R30500 MOV


0004 DM10261 DM00000
Receive data Response
read request relay detection relay Receive variable DM

R30000
0005 RES
Macro 1 start relay

R30000 R31208 R30401


0006 SET
Macro 1 Receive mismatch
Error clear request relay
start relay request relay

R31201 R30401 R30000


0007 RES RES
Error clear end relay Error clear Macro 1
request relay start relay

END
0008

ENDH
0009

* In KV-700, the relay No. is not prefixed with "R".

4-6
4-4 Transmission + Continuous Reception Type
In this communication mode, the response data is returned continuously from external devices for one
send data.
Since the response data is returned continuously, the receive buffer of KV-L20R may be overrun for the
faster data interval.
In this case, the overrun frequency of the receive buffer can be reduced by using the receive buffer.

CPU unit KV-L20R


Send
Send data
External equipment
4

MAKING THE LADDER PROGRAM


Response data

Response data

Response data
Continuous reception

Other than "Clear the receive buffer"


KV-L20R clears the receive buffer at the up edge of the macro start relay.
When receiving the response data, the received data will be stored into the receive buffer of KV-L20R
(2K bytes) and the receive read request relay is turned ON. When receiving the response data during
receiving, KV-L20R will save this data into the receive buffer and process in the next receive
processing. But, when the external device sends the response data at the faster interval, the receive
buffer will overrun (in this case, the receive buffer overrun relay is turned ON).

"Clear the receive buffer"


When receiving the response data and the next response data during receiving, this data will be
discarded and not be stored in the receive buffer. After the read request relay of the initially-received
response data is turned OFF, it will become the status that allows receiving the next response data.
So, the receive buffer will not overrun.

4-7
4-4 Transmission + Continuous Reception Type

Other than "Clear the receive buffer"


Clear receive buffer

Send data

Response Response
data A Match Mismatch
4 data B
MAKING THE LADDER PROGRAM

Operation enable rela


㧔 n +400㧕
(1)

Operation ready relay


㧔 n +1200㧕
(2)

(3) Send variable DM


㧔 N +260~㧕

Macro start relay


㧔n㧕
(3) (14)

(4) Sand end relay


㧔 n +1000㧕 (15)

Detection relay
㧔 n +500㧕 (5) (7)

Receive mismatch request relay


㧔 n +1208㧕 (9) (11)

Receive data read request relay㧔 n +800㧕(5) (7)

Reception read end relay


㧔 n +200㧕 (6) (8)

㧔 N +260~㧕(5)
Receive variable DM

Error clear request relay


㧔 n +401㧕 (10) (12)

Error clear end relay


㧔 n +1201㧕 (11) (13)

* n : Leading relay No.


≅ N : Leading DM No.

4-8
4-4 Transmission + Continuous Reception Type

(1) Ladder program The operation enable relay is turned ON before communication macros are
executed.
(2) KV-L20R The operation ready relay is turned ON when the operation enable relay is ON.
(3) Ladder program When the send data uses variable DMs, variables will be stored and the macro
start relay is turned ON (including in the same scan), data is sent from KV-L20R
to external devices (when the send dwell time is set, begin sending after this
time).
(4) KV-L20R The send complete relay is turned ON after sending data is completed. 4
(5) KV-L20R Verify the received response data against the response data format. If they

MAKING THE LADDER PROGRAM


match, the verify relay is turned ON, data will be stored in the variable DMs of
receive data block, and the receive read request relay is turned ON.
(6) Ladder program When the receive data block uses variable DMs, the receive read relay complete
relay is turned ON by the data processed and stored by the ladder program.
(7) KV-L20R When the receive read complete relay is turned ON, the verify relay and receive
read request relay are turned OFF.
(8) Ladder diagram When the receive read request relay is turned OFF, the receive read complete
relay is turned OFF.
(9) KV-L20R Verify the received response data against the response data format. If mismatch,
the receive verify mismatch relay is turned ON, an error occurs.
(10) Ladder program Turn the error clear request relay ON to clear errors.
(11) KV-L20R After clearing errors, the error clear complete relay is turned ON and the receive
verify mismatch relay OFF.
(12) Ladder program When the error clear complete relay is ON, the error clear request relay is turned
OFF.
(13) KV-L20R When the error clear request relay is OFF, the error clear complete relay is
turned OFF.
(14) Ladder diagram When stopping to receive the response data, the macro start relay is turned
OFF.
(15) KV-L20R When the macro start relay is OFF, the send complete relay is turned OFF.

Note
When the macro start relay is turned OFF during executing macros, the received
response data will be discarded and the communication macro is finished forcibly.

4-9
4-4 Transmission + Continuous Reception Type

Reference Ladder Program

CR2002 R30400
0001
Always ON Operation
enable relay

R31200 MOV
0002 #12345 DM10260
4 Operation
ready relay
Send start
Send variable DM
MAKING THE LADDER PROGRAM

R30000
0003 SET
Macro 1
start relay

R30800 R30500 MOV


0004 DM10261 DM00000
Receive data read Response 1
request relay detection relay Receive variable DM

R30200
0005 SET
Reception read
end relay

R30800 R30200
0006 RES
Receive data Reception read
read request relay end relay

R30000 R31208 R30401


0007 SET
Macro 1 Receive mismatch Error clear
start relay request relay request relay

R31201 R30401
0008 RES
Error clear Error clear
complete relay request relay

R30000
0009 RES
Receiving stop Macro 1
start relay

END
0010

ENDH
0011

* In KV-700, the relay No. is not prefixed with "R".

4-10
4-4 Transmission + Continuous Reception Type

"Clear the receive buffer"


Clear receive buffer Clear receive buffer

Send data Damaged Damaged Damaged

Response Response Response Response Response


Match data A data B data C data D data E Mismatch

MAKING THE LADDER PROGRAM


㧔 n +400㧕
Operation enable relay
(1)

Operation ready relay


㧔 n +1200㧕
(2)

(3) Send variable DM


㧔 N +260~㧕

Macro start relay


㧔n㧕
(3) (14)

(4) Sand end relay


㧔 n +1000㧕 (15)

Detection relay
㧔 n +500㧕 (5) (7)

Receive mismatch request relay


㧔 n +1208㧕 (9) (11)

Receive data read request relay㧔 n +800㧕(5) (7)

Receive data read end relay


㧔 n +200㧕 (6) (8)

Receive variable DM (5)


㧔 N +260~㧕

Error clear request relay


㧔 n +401㧕 (10) (12)

Error clear complete relay


㧔 n +1201㧕 (11) (13)

* n : Leading relay No.


≅ N : Leading DM No.

4-11
4-4 Transmission + Continuous Reception Type

(1) Ladder program The operation enable relay is turned ON before communication macros are
executed.
(2) KV-L20R The operation ready relay is turned ON when the operation enable relay is ON.
(3) Ladder program When the send data uses variable DMs, variables will be stored and the macro
start relay is turned ON (including in the same scan), data is sent from KV-L20R
to external devices (when the send dwell time is set, begin sending after this
time).
4 (4) KV-L20R The send complete relay is turned ON after sending data is completed.
(5) KV-L20R Verify the received response data against the response data format. If they
MAKING THE LADDER PROGRAM

match, the verify relay is turned ON, data will be stored in the variable DMs of
receive data block, and the receive read request relay is turned ON.
(6) Ladder program When the receive data block uses variable DMs, the receive read relay complete
relay is turned ON by the data processed and stored by the ladder program.
(7) KV-L20R When the receive read complete relay is turned ON, the verify relay and receive
read request relay are turned OFF.
(8) Ladder diagram When the receive read request relay is turned OFF, the receive read complete
relay is turned OFF.
(9) KV-L20R Verify the received response data against the response data format. If mismatch,
the receive verify mismatch relay is turned ON, an error occurs.
(10) Ladder program Turn the error clear request relay ON to clear errors.
(11) KV-L20R After clearing errors, the error clear complete relay is turned ON and the receive
verify mismatch relay OFF.
(12) Ladder program When the error clear complete relay is ON, the error clear request relay is turned
OFF.
(13) KV-L20R When the error clear request relay is OFF, the error clear complete relay is
turned OFF.
(14) Ladder diagram When stopping to receive the response data, the macro start relay is turned
OFF.
(15) KV-L20R When the macro start relay is OFF, the send complete relay is turned OFF.

Note
When the macro start relay is turned OFF during executing macros, the received
response data will be discarded and the communication macro is finished forcibly.

4-12
4-4 Transmission + Continuous Reception Type

Reference Ladder Program

CR2002 R30400
0001
Always ON Operation
enable relay

R31200 MOV
0002 #12345 DM10260
Operation
ready relay
Send start
Send variable DM
4

MAKING THE LADDER PROGRAM


R30000
0003 SET
Macro 1
start relay

R30800 R30500 MOV


0004 DM10261 DM00000
Receive data read Response 1
request relay detection relay Receive variable DM

R30200
0005 SET
Reception
read end relay

R30800 R30200
0006 RES
Receive data read Reception read
request relay end relay

R30000 R31208 R30401


0007 SET
Macro 1 Receive mismatch Error clear
start relay request relay request relay

R31201 R30401
0008 RES
Error clear Error clear
end relay request relay

R30000
0009 RES
Receiving stop Macro 1
start relay

END
0010

ENDH
0011

* In KV-700, the relay No. is not prefixed with "R".

4-13
4-5 Only Send Type
In this communication mode, data is only sent to external devices.

CPU unit KV-L20R External equipment

Send
Send data

4
MAKING THE LADDER PROGRAM

Send data Send data

Operation enable relay㧔 n +400㧕(1)

Operation ready relay㧔 n +1200㧕(2)

Send variable DM㧔 N +260~㧕 (3) (7)

Macro start relay㧔 n 㧕


(3) (5) (7) (9)

Sand end relay㧔 n +1000㧕 (4) (6) (8) (10)

* n : Leading relay No.


≅ N : Leading DM No.

4-14
4-5 Only Send Type

(1) Ladder program The operation enable relay is turned ON before communication macros are
executed.
(2) KV-L20R The operation ready relay is turned ON when the operation enable relay is ON.
(3) Ladder program When the send data uses variable DMs, variables will be stored and the macro
start relay is turned ON (including in the same scan), data is sent from KV-L20R
to external devices (when the send dwell time is set, begin sending after this
time).
(4) KV-L20R The send complete relay is turned ON after sending data is completed. 4
(5) Ladder diagram When the send complete relay is ON, the macro start relay is turned OFF.

MAKING THE LADDER PROGRAM


(6) KV-L20R When the macro start relay is OFF, the send complete relay is turned OFF.
(7) Ladder program When the send data uses variable DMs, variables will be stored and the macro
start relay is turned ON (including in the same scan), data is sent from KV-L20R to
external devices (when the send dwell time is set, begin sending after this time).
(8) KV-L20R The send complete relay is turned ON after sending data is completed.
(9) Ladder diagram When the send complete relay is ON, the macro start relay is turned OFF.
(10) KV-L20R When the macro start relay is OFF, the send complete relay is turned OFF.

Note
When the macro start relay is turned OFF during executing macros, sending of data
will be canceled and the communication macro is finished forcibly.

4-15
4-5 Only Send Type

Reference Ladder Program

CR2002 R30400

Always ON Operation
enable relay

R31200 MOV
#12345 DM10260
4 
Operation
ready relay
Send start 1
Send variable DM
MAKING THE LADDER PROGRAM

R30000
 SET
Macro 1
Send start

MOV
 #00777 DM10260
Send start 2
Send variable DM

R30000
 SET
Macro 1 start relay

R31000 R30000
 RES
Sand end relay Macro 1 start relay

END


ENDH


* In KV-700, the relay No. is not prefixed with "R".

4-16
4-6 Only Receive Type
In this communication mode, only the response data from external devices can be received.
Since the response data is returned continuously, the receive buffer of KV-L20R may be overrun for the
faster data interval.
In this case, the overrun frequency of the receive buffer can be reduced by using the receive buffer.
For clearing the receive buffer, see "4-4 Transmission + continuous reception type"(page 4-7).

CPU unit KV-L20R External equipment


4
Response data

MAKING THE LADDER PROGRAM


Reception

Clear receive buffer

Response Response
data A Match data B Mismatch

Operation enable relay


㧔 n +400㧕
(1)

Operation ready relay


㧔 n +1200㧕
(2)

Macro start relay


㧔n㧕
(3) (13)

Detection relay
㧔 n +500㧕 (4) (6)

Receive mismatch request relay


㧔 n +1208㧕 (8) (10)

㧔 n +800㧕(4)
Receive data read request relay (6)

Receive data read request relay


㧔 n +200㧕 (5) (7)

Receive variable DM
㧔 N +260~㧕(4)

Error clear request relay


㧔 n +401㧕 (9) (11)

Error clear complete relay


㧔 n +1201㧕 (10) (12)

* n : Leading relay No.


≅ N : Leading DM No.

4-17
4-6 Only Receive Type

(1) Ladder program The operation enable relay is turned ON before communication macros are
executed.
(2) KV-L20R The operation ready relay is turned ON when the operation enable relay is ON.
(3) Ladder diagram When the macro start relay is turned ON, it will become the status that allows
receiving the data sent from external devices.
(4) KV-L20R Verify the received response data against the response data format. If they
match, the verify relay is turned ON, data will be stored in the variable DMs of
4 receive data block, and the receive read request relay is turned ON.
(5) Ladder program When the receive data block uses variable DMs, the receive read relay complete
MAKING THE LADDER PROGRAM

relay is turned ON by the data processed and stored by the ladder program.
(6) KV-L20R When the receive read complete relay is turned ON, the verify relay and receive
read request relay are turned OFF.
(7) Ladder diagram When the receive read request relay is turned OFF, the receive read complete
relay is turned OFF.
(8) KV-L20R Verify the received response data against the response data format. If mismatch,
the receive verify mismatch relay is turned ON, an error occurs.
(9) Ladder program Turn the error clear request relay ON to clear errors.
(10) KV-L20R After clearing errors, the error clear complete relay is turned ON and the receive
verify mismatch relay OFF.
(11) Ladder program When the error clear complete relay is ON, the error clear request relay is turned
OFF.
(12) KV-L20R When the error clear request relay is OFF, the error clear complete relay is
turned OFF.
(13) Ladder diagram When stopping to receive the response data, the macro start relay is turned
OFF.

Note
When the macro start relay is turned OFF during receiving responses, the received
response data will be discarded and the communication macro is finished forcibly.

4-18
4-6 Only Receive Type

Reference Ladder Program

CR2002 R30400
0001
Always ON Operation
enable relay

R31200 R30000
0002 SET
Operation
ready relay
Receive start Macro 1
start relay
4

MAKING THE LADDER PROGRAM


R30800 R30500 MOV
0003 DM10260 DM00000
Receive data Response 1
Receive variable DM
read request relay detection relay

R30200
0004 SET
Reception
read end relay

R30800 R30200
0005 RES
Receive data Reception
read request relay read end relay

R30000 R31208 R30401


0006 SET
Macro 1 Receive mismatch Error clear
start relay request relay request relay

R31201 R30401
0007 RES
Error clear end relay Error clear
request relay

R30000
0008 RES
Receiving stop Macro 1
start relay

END
0009

ENDH
0010

* In KV-700, the relay No. is not prefixed with "R".

4-19
4-7 Verify Error and Clear Error
This section describes the ladder program for clearing errors when errors occur.

Relay in error‫*ޓ‬ (1) (3)

Error clear request relay㧔 n +401㧕 (2) (4)

4 Error clear end relay㧔 n +1201㧕 (3) (5)


MAKING THE LADDER PROGRAM

(1) KV-L20R When errors occur, the related relays will be turned ON.
(2) Ladder program Verify the error contents and turn the error clear request relay ON.
(3) KV-L20R After clearing errors, the error clear complete relay is turned ON.
(4) Ladder program When the error clear complete relay is ON, the error clear request relay is turned
OFF.
(5) KV-L20R When the error clear request relay is OFF, the error clear complete relay is
turned OFF.

* There are following type of error relays.


• Receive dwell timeout error relay ( n +1202)
• Receive complete timeout error relay ( n +1203)
• Stop bit error relay ( n +1204)
• Parity error relay ( n +1205)
• Overrun error relay ( n +1206)
• Receive ASCII error relay ( n +1207)
• Receive verify inconsistency error relay ( n +1208)
• Receive butter overrun relay ( n +1209)
• Macro execution error relay ( n +1210)
• Macro data error relay ( n +1211)→ Note Please refer to
* n : Leading relay No.

Note
When the macro data error relay is turned ON, the status of communication macro is
incorrect. So, errors can no be released during the operation of the error clear
request relay or error clear complete relay. At this moment, the KV-L20R is in unit
error state, and the red light of the direct access switch lights up.
When the macro data error relay is ON, the operation enable relay ( n +400) first turns
OFF. Press the direct access switch of the KV-L20R, check the error code in the
access window of the CPU unit, then clear the cause of the error.
See KV-L20R User's Manual, "3 KV-L20R Unit Error Code".

For the error information, see "Error Message List"(page A-2).

4-20
4-7 Verify Error and Clear Error

Reference Ladder Program

CR2002 R30400
0001
Always ON Operation
enable relay

R31202 R30401
0002 SET
Receive wait
timeout error
relay
Error clear
request relay 4

MAKING THE LADDER PROGRAM


R31203
0003
Receive complete
timeout error relay

R31204
0004
Framing
error relay

R31205
0005
Parity error
relay

R31206
0006
Overshoot
error relay

R31207
0007
Reception block
error relay

R31208
0008
Receive mismatch
request relay

R31209
0009
Receive buffer
overrun relay

R31210
0010
Macro execution
error relay

R31201 R30401
0011 RES
Error clear end relay Error clear
request relay

END
0012

ENDH
0013

* In KV-700, the relay No. is not prefixed with "R".

4-21
4-7 Verify Error and Clear Error

MEMO

4
MAKING THE LADDER PROGRAM

4-22
5
TRACING/MONITORING

TRACING/MONITORING
This chapter describes the overview of tracing/monitoring function and how to
perform these functions.

5-1 Tracing Function Overview••••••••••••••••••••••••••••••• 5-2


5-2 Names and Functions of Tracing Screen•••••••••••••• 5-4
5-3 Tracing/Monitoring ••••••••••••••••••••••••••••••••••••••••• 5-6

5-1
5-1 Tracing Function Overview
This section provides an overview of tracing function.

PC CPU unit KV-L20R


Send
PROTOCOL Send data
STUDIO

Response data
Receive External equipment

5 The receive/send data is transferred


to PC via tracing data area (DM in
Store the receive/send
data into the internal
CPU unit) when the tracing finish buffer of KV-L20R
TRACING/MONITORING

condition is met. temporally.

KV-L20R can store the receive/send data from /to external devices into the internal buffer temporally
before meeting the tracing finish condition.
When the tracing finish condition is met, KV-L20R can send the tracing data stored in the internal buffer
temporally into PC via the tracing data area of CPU unit (PROTOCOL STUDIO).

Note
The new tracing can not be performed when the tracing finish condition is met and
during the period that PC (PROTOCOL STUDIO) receives the tracing data.
So, it can not trace the receive/send data when PC (PROTOCOL STUDIO) receives the
tracing data.

Example When "Trace repeatly" is selected

This data can not be traced

KV-L20R Send data Send data Send data Send data

External equipment Response data Response data Response data Response data

Tracing in progress PC is receiving the tracing data. Tracing in progress


Start next tracing

End tracing

Start tracing

KV-L20R starts to transfer the The next tracing is


tracing data to PC when the started when KV-L20
tracing finish condition is met. completes to transfer
the tracing data to PC.

5-2
5-1 Tracing Function Overview

About Tracing Operation Mode


• Tracing Capacity Specification Mode
The tracing will be finished when sending/receiving the data of specified bytes.
The tracing capacity (bytes) should be set between 1 to 2048 bytes.
For "Trace repeatlyî, the next tracing will be started automatically when the tracing finishes and
sending the tracing data to PC completed.

• Number of Macros Specification Mode


The tracing will be finished when the macros of specified number are executed.
The number of macros should be set between 1 to 99. 5
But in this case, when the received/sent data exceeds 2048 bytes, the contents of newest 2048 bytes

TRACING/MONITORING
from the tracing finishing are displayed.

Example When number of macros is "99"

1 2 98 99
Send Send Send Send Send
KV-L20R
data data data data data
Response Response Response Response Response
External equipment data data data data data

Up to 2048 bytes

It can not be traced.

The tracing will be finished when the


macros of specified number are executed.

• Error Detection Mode


The tracing will be performed continuously until the set error occurs.
When errors occur, the tracing will be finished and the received/sent data including errors displayed
(up to 2048 bytes).

When error occurs, tracing finished

KV-L20R Send data Send data Send data Send data

External equipment Response data Response data Response data ERR

Up to 2048 bytes

5-3
5-2 Names and Functions of Tracing Screen
This section describes the name and function of each part of the tracing screen.

Display the operation status of KV-L20R


Display the communications status of KV-L20R.

Display the status of control line Display macro No. and name
Display the status of the control line of Display the No.s and names of com-
connected serial cables (valid for port 1). munication macros to be executed.

5
TRACING/MONITORING

Tracing display adjustment bar Display Verify Relay


The tracing display interval Display No. of the verify relay that
can be adjusted in 3 levels. is ON.

Display idle time Display the received data Display error


Display the communi- Display the received Display"ERR" when a communi-
cation standby time in data in HEX format and cations error occurs. The error can
0.1s unit. ASCII code. be displayed in details by clicking.

Display send data


Display the send data in
HEX format and ASCII
code.

5-4
5-2 Names and Functions of Tracing Screen

The display contents of every item are as follows.


Item Display contents Description
This refers to the input signal from the external device
DR (data setup ready signal)
to KV-L20R.
CS (send ready signal)
Red LED lit: high level
CD (carrier detection signal)
Display the status LED off: low level
of control line This refers to the output signal from KV-L20R to the
ER (data terminal ready signal) external device.
RS (send request signal) Green LED lit: high level
LED off: low level 5
Stopping in progress
Display the

TRACING/MONITORING
Command sending in progress
operation status of
Receive response dwell Display the operation status of KV-L20R.
KV-L20R
Response receiving in
progress
Display all contents such as idle time, receive/send
large data (HEX, ASCII) or verify relay No. in character
format.
Tracing display
Display the macro name and the receive/send data
adjustment bar middle
(ASCII) in character format.
Used when verifying the position that errors occur. No
small
characters will be displayed.
Display macro No. Display the No.s of communication macros to be executed.
Display macro
Display names of communication macros to be executed.
name
Display idle time Display the communication standby time. (in 0.1 s unit)
Display the data to be send to external devices from
HEX
KV-L20R in HEX format.
Display send data
Display the data to be send to external devices from
ASCII
KV-L20R in character format.
Display the data received from external devices to KV-
HEX
Display the L20R in HEX format.
received data Display the data received from external devices to KV-
ASCII
L20R in character format.
Display Verify Verify the receive data and the response data format and display the consistent verify
Relay relay No..
Display"ERR" when a communications error occurs. The error can be displayed in
Display error
details by clicking.

5-5
5-3 Tracing/Monitoring

Switch to Tracing Screen

Switch to the tracing screen from edit screen.


Then, tracing and monitoring starts automatically.

Note
PROTOCOL STUDIO and CPU unit should be in the
communication enable status before switching to the tracing

5 screen.
When communications disabled, the dialog box shown in
TRACING/MONITORING

right figure is displayed, tracing and monitoring do not start.

1 Select [Tracing(T)] [Switch to tracing screen(T)] from the menu.


Other procedure
• Click button.

The "Set tracing condition" dialog box appears.

2 Set the condition for closing the tracing by the following mode.
• Tracing Capacity Specification Mode
• Number of Macros Specification Mode
• Error Detection Mode

5-6
5-3 Tracing/Monitoring

After setup, click "OK".


Switch to the tracing screen.

TRACING/MONITORING
The settings are as follows.
Item Contents to be set
Tracing data capacity Setting the number of bytes of receive/send data when
Tracing capacity
(1 to 2048 bytes) closing the tracing.
specification
It is selected when closing the tracing and the next tracing
mode Trace repeatly
starts automatically.
Setting the number of macros for closing the tracing.
Number of Number of tracing macros * In this case, when the received/sent data exceeds 2048
Macros (1 to 99) bytes, the contents of newest 2048 bytes from the
Specification tracing closing.
Mode It is selected when closing the tracing and the next tracing
Trace repeatly
starts automatically.
Receive dwell timeout error Verifying the error condition for closing the tracing.
Receive end timeout error For the error information, see "Error Message
Stop bit error
List"(page A-2).
Parity error
Error detection * The tracing will be performed continuously until the set
Overrun error
mode error occurs.
Receive block error
When errors occur, the tracing will be finished and the
Verify inconsistency error
Buffer overrun error received/sent data including errors displayed (up to 2048
Macro execution error bytes).

5-7
5-3 Tracing/Monitoring

Switch to Edit Screen

Close tracing and return back to the edit screen.


After returning to the edit screen, the receive/send data that is traced will be cleared. So, switch to the
edit screen after saving the CSV file when receive/send data needs to be stored.
Refer to "Save the log data as a CSV file"(page 5-11).

1 Select [Tracing(T)] [Switch to edit screen(T)] from the menu.

5
Other procedure
• Click button.
TRACING/MONITORING

Close tracing screen and return back to the edit screen.

Start tracing

Start tracing after closing the tracing screen.


It can be selected only during monitoring in the tracing screen.

1 Select [Tracing(T)] [Start tracing(S)] from the menu.


Other procedure
• Click button.

Start tracing.

Close tracing

Close tracing, and read the receive/send data that is traced previously to PROTOCOL STUDIO.
It is selected only on the tracing screen.

1 Select [Tracing(T)] [Close tracing(C)] from the menu.


Other procedure
• Click button.

The tracing is closed and the receive/send data that is traced previously is displayed.

5-8
5-3 Tracing/Monitoring

Run PLC

This command switches the KV-700/1000 CPU unit to RUN mode when it is in PROGRAM mode.
It is selected only on the tracing screen.

1 Select [Tracing(T)] [PLC mode-RUN] from the menu.


Other procedure
• Click button.
• Press + key.
5

TRACING/MONITORING
Switch PLC from PROGRAM mode to RUN mode.

Stop PLC

This command switches the KV-700/1000 CPU unit to PROGRAM mode when it is in RUN mode.
It is selected only on the tracing screen.

1 Select [Tracing(T)] [PLC mode-PROG] from the menu.


Other procedure
• Click button.
• Press + key.

Switch PLC from RUN mode to PROGRAM mode.

Start monitoring

Monitor can be started after stopping monitoring.


It is selected only on the tracing screen.

1 Select [Tracing(T)] [Start monitor] from the menu.


Other procedure
• Click button.
• Press key.

Start monitoring.

5-9
5-3 Tracing/Monitoring

End monitoring

Monitor can be stopped during monitoring.


The tracing will also be stopped when stopping monitoring during tracing.
It is selected only on the tracing screen.

1 Select [Tracing(T)] [Stop monitor] from the menu.


Other procedure

5 • Click
• Press
button.
key.
TRACING/MONITORING

Stop monitor and close tracing.

Setting the Tracing Condition

Setting up the condition for closing the tracing.

1 Select [Tracing(T)] [Setup tracing condition(O)] from the


menu.

"Tracing condition settings" dialog box appears.

2 Setting up the condition for closing the tracing.


For information on every mode, see "Switch to
Tracing Screen"(page 5-6).

3 After setup, click "OK".

5-10
5-3 Tracing/Monitoring

Save the log data as a CSV file

Save the log data (receive/send data) that has been traced in CSV format.
It is selected only on the tracing screen.

1 Select [Tracing(T)] [Save tracing log] from the menu.


Other procedure
• Click button.

TRACING/MONITORING
"Save as" dialog box appears.

The settings are as follows.


Item Description
Save position Select folder for saving log data.
File name Input the log data name that is to be saved.
File type Specify the CSV file (*.csv).

2 Select the save folder, and input the "file name".

3 After the setup, Click "Save(S)".


Click "Cancel" and set up again.
Save the log data as shown in the following figure.

5-11
5-3 Tracing/Monitoring

MEMO

5
TRACING/MONITORING

5-12
6
USING PRINT FUNCTION

USING PRINT FUNCTION


This chapter describes how to print communication macro setting file and print
preview.

6-1 Set printer ••••••••••••••••••••••••••••••••••••••••••••••••••• 6-2


6-2 Display Print Preview•••••••••••••••••••••••••••••••••••••• 6-3
6-3 Opening Communication Macro Setting File ••••••••• 6-4

6-1
6-1 Setting Printer
Set up the paper size and print format.
Set up the printer by the following steps.

1 Select [File(F)] [Set printer(R)] from the menu.

Display "Print setting" dialog box.


6
PRINTING

2 If necessary, click "Properties(P)" to set up printers.


After setup, click "OK".

6-2
6-2 Display Print Preview
Preview the print contents of communication macro setting file.
Display print preview in the following steps.

1 Select [File(F)] [Print Preview(V)] from the menu.


Other procedure
• Click button.

Display "Print Setting" dialog box.


Select the items to be printed and then set up. 6

PRINTING
2 Click "OK" to display the print preview.

Print. Close print preview.

Display next page. Zoom in.

Display previous page. Zoom out.

Specify the number of pages that can be displayed


one time on the screen by print preview.

TIP Click "Print" to print the displayed contents.

6-3
6-3 Opening Communication Macro Setting File
Print the contents of communication macro setting file.
Print by the following procedures.

1 Select [File(F)] [Print(P)] from the menu.


Other procedure
• Click button.
• Press + key.

6 Display "Print Setting" dialog box.


Select the items to be printed and then set up.
PRINTING

2 Click the "OK" button.


Display "Print" dialog box.

If necessary, click "Properties(P)" to set up


printers.

3 Click "OK" to print.

The print settings are as follows.


Item Description
System print setting Print the system setting contents of communication macro setting file.
Print all macros Print the detailed contents of all communication macros.
Print macro Print the macro
details with the Print the detailed contents of the macro with specified No.
specified No.
Default page No. Set the default page No. that is added when printing.
Page break per macro Print every communication macro by page break.

6-4
6-3 Opening Communication Macro Setting File

System setting contents to be printed are as follows.


Reference
Item Description
page
This refers to the title of "Properties" user information of the
Title page 3-16
communication macro setting file.
This refers to the maker information of "Properties" user
made by page 3-16
information of the communication macro setting file.
This refers to the comments of "Properties" user information of
Comments page 3-16
the communication macro setting file.
Unit No.
Port
Communica Relay
tion port assignment
This refers to the unit setting information of "Properties" port
page 3-16
6
information of the communication macro setting file.

PRINTING
information range
DM assignment
range
This refers to the connected device name of "Properties"
Name of connected device page 3-16
connected device of the communication macro setting file.
System device System device list. page 3-31
Number of
Retries
Send dwell time
Communica
setting
tion system Communication system setting. page 3-26
Receive dwell
setting
timeout time
Receive end
timeout time
Default send frame setting Contents of items of configuration send frame. page 3-38
Default Receive Frame
Contents of items of configuration receive frame. page 3-38
setting

Maco contents that can be printed are as follows.


Print the contents of all communication macros.
Reference
Item Description
page
Macro name Macro name set for communication macro. page 3-38
Communications mode Communication mode set for communication macro. page 3-39
Macro relay Relay used for communication macro. -
Command Data send format set for communication macro. -
Response Data response format set for communication macro. -

6-5
6-3 Opening Communication Macro Setting File

■ Print Example

System setting Macro List

6
PRINTING

Macro Details

6-6
APPENDICES

1 Error Message List •••••••••••••••••••••••••••••••••••••••••••A-2


2 List of the Device No. ••••••••••••••••••••••••••••••••••••••••A-9
3 Index •••••••••••••••••••••••••••••••••••••••••••••••••••••••••• A-15

A-1
1 Error Message List
This section describes the error messages displayed during operation and how to handle the error
messages when they are displayed.

Error Messages Displayed When Programming Communication Macros

Error Message Causes Remedy


Click the "Finish" button directly when no
No option for the configuration send frame "Send data to peripherals from the KV- data are sent from the KV-L20R to its
has been selected. Therefore, when L20R" is selected in the "Send frame/ peripherals. When data are to be sent from
entering into the next step, the KV-L20R will configuration", but you go to the next step KV-L20R to its external devices, return back
not send data to its peripherals. Select at without selecting any configuration send to "Send frame/configuration", select "Send
least one option when you want the KV- frame (the "Send data to peripherals from data to peripherals from the KV-L20R",
L20R to send data to its peripherals, and go the KV-L20R" will be deselected select at least one option for the
to the next step. automatically). configuration send frame, then go to the
next step.
APPENDICES

The "Receive data (responses) from Click the "Finish" button directly when no
No option for the configuration receive
peripherals through the KV-L20R" has been data are received from the peripherals.
frame has been selected. Therefore, when
selected in the "Receive frame/ When data (responses) are to be received
entering into the next step, the KV-L20R will
configuration", but you go to the next step from the peripherals, select the "Receive
not receive data from its peripherals. Select
without selecting any configuration receive data (responses) from peripherals through
at least one option when you want the KV-
frame (the "Receive data (responses) from the KV-L20R" again, select at least one
L20R to receive data from its peripherals,
peripherals through the KV-L20R" will be option for the configuration receive frame,
and go to the next step.
deselected automatically). then go to the next step.
When you change the communication
mode to "Send only" or "Break send" in the
Macros with the communication mode of
"Send frame/regular" or send data to
The default send frame is not set. Click the "Send + receive", "Send + continuous
peripherals from the KV-L20R, select "Send
"Details" button to set the send frame of the receive" or "Send only" are added, but no
data to peripherals from the KV-L20R" in
macro. option for the configuration send frame has
the "Send frame/configuration", and select
been set.
at least one option for the configuration
send frame.
When you change the communication
mode to "Send only" or "Break send" in the
Macros with the communication mode of
"Receive frame/regular" or receive data
The default receive frame is not set. After "Send + receive", "Send + continuous
from the peripherals, select "Receive data
adding the responses, click the "Details" receive" or "Send only" are added, but no
(responses) from peripherals through the
button to set the receive frame. option for the configuration receive frame
KV-L20R" in the "Receive frame/
has been selected.
configuration", and select at least one
option for the configuration receive frame.
The upper limit of the number of macros
Maximal number of macros that can
that can register is 32 macros. The upper When adding macros, first delete the
register has been set by the PROTOCOL
limit of the number of macros that can undesired macros from the macros that
STUDIO (32 macros), in this state, new
register has been reached. No macros can have registered.
macros are to be added.
be added further.

A-2
1 Error Message List

Error Message Causes Remedy


The upper limit of the number of responses
Maximal number of responses that can
that can register is 48 responses. The When adding responses, first delete the
register has been set by the PROTOCOL
upper limit of the number of responses that undesired responses from the responses
STUDIO (48 responses), in this state, new
can register has been reached. No that have registered.
responses are to be added.
responses can be added further.
The upper limit of the number of responses
that can register into one macro is 16 Maximal number of responses that can
When adding responses, first delete the
responses. The upper limit of the number of register into one macro has been set (16
undesired responses from the responses
responses that can register has been responses), in this state, new responses
that have registered.
reached. No responses can be added are to be added.
further.
Among the options for the configuration
The value of the header/delimiter should be frame, the "Header" option or "Delimiter" The "Type" option and "Value" option
set. option has been set, but the "Type" and should be set.
"Value" option are not set.

APPENDICES
The "Station No." option has been set in the
The station No. should be set. options for the configuration frame, but the The "Value" should be set.
"Value" is not set in the "Constant".
The "Data length" option has been set in the When setting the "Data length" option in the
The calculation items of the data length
options for the configuration frame, but no options for the configuration frame, at least
should be set.
calculation item is selected. one calculation item should be selected.
The "Check code" option has been set in When setting the "Check code" option in the
The calculation items for the check code
the options for the configuration frame, but options for the configuration frame, at least
should be set.
no calculation item is selected. one calculation item should be selected.
The DMs of the CPU unit used for storing
the macros that are programmed through
The devices used for the macro are full.
the PROTOCOL STUDIO are full. The When it is "Standard", it should be changed
Delete some macro data, or exit the
number of DMs occupied by the KV-L20R in to "Large". Delete the undesired macros
PROTOCOL STUDIO and change to
the ROTOCOL STUDIO mode is as follows. and responses.
"LARGE" in the Unit Editor.
Standard: 2000 words
Large: 7000 words
States of macro data are present in the Click the "Yes" button to save. Click the
The macro settings will be saved. Is it
macro edit screen, and macro data are "No" button to stop the read operation
possible?
being read from the PLC. without saving.
Not the macro file of the PROTOCOL Files with an extension other than "*.psm" Please verify the extension of the file to be
STUDIO. Files can not be opened. are opened. opened.
Click the "Yes" button when you ignore the
The assignment information of the current You want to open a communication macro unit setting of the communication macro
relay /DM is not consistent with that in the setting file with settings that are different setting file and open the file according to the
file. The information in the file will be from the current unit setting information of current unit setting information of the
changed as follows, is it possible? the PROTOCOL STUDIO. PROTOCOL STUDIO. Click the "No"
button to stop.
In the "Data" option of the receive frame, When setting "ASCII variable" to "Variable
When setting a receive ASCII variable with
the "ASCII variable" has been set to digits" in the "Data" option of the receive
a variable number of digits, you should add
"Variable digitsî, but the "SeparatoR" or frame, you should set the "SeparatoR" or
a separator or delimiter at the end of it.
"DelimiteR" option is not set after it. "DelimiteR" option after it.

A-3
1 Error Message List

Error Message Causes Remedy


In the "Data" option of the receive frame, When setting the "ASCII variable (variable
When setting the ASCII variable (variable the "ASCII variable (variable digits)" has digits)î in the "Data" option of the receive
digits), you should set a delimiter after it. been set, but the "SeparatoR" or frame, you should set the "SeparatoR" or
"DelimiteR" option is not set after it. "DelimiteR" option after it.
When setting a receive binary variable with
variable data length, you should set the When setting the "Binary variable" to
In the "Data" option of the receive frame,
data length before the data. In addition, in "Variable data lengthî in the "Data" option of
the "Binary variable" has been set to
the responses for which a receive binary the receive frame, you should set the "Data
"Variable data length", but the "Data lengthî
variable with variable data length is set, do lengthî option in the options for the the
option is not set in the options for the
not set the ASCII variable, ASCII variable configuration frame. In addition, in the same
configuration frame. Or, in the "Data" option,
(variable digits) and the ASCII constant with response, do not use "ASCII variableî for
the "ASCII variable" and "ASCII constantî
no verification. For the responses, only one the "Data" option, and do not use "Without
have been set to "Without verification".
receive binary variable with variable data verificationî for the "ASCII constantî.
length should be set.
In the options for the configuration receive
APPENDICES

An option other than the check code has frame, an option other than the "Check Verify the options for the configuration
been set after the delimiter of the response. code" option is set after the "DelimiteR" receive frame again.
option.
In the options for the configuration receive
The data length of the response has been Verify the options for the configuration
frame, the "Data lengthî option has been set
set after the data. receive frame again.
after the "Data" option.
In the options for the configuration receive
The header of the response has been set to Verify the options for the configuration
frame, the "HeadeR" option has been set to
a position other than the start position. receive frame again.
a position other than the start position.
Multiple responses have been set in the When multiple responses have been set in
receive frames with a communication mode the receive frames with a communication
The responses contain headers and of "Send + continuous receive" or "Receive mode of "Send + continuous receive" or
delimiters with different settings. onlyî, but the settings of the "HeadeR" "Receive only", the settings of the
option or the "DelimiteR" option are "HeadeR" option or the "DelimiteR" option
different. should be same.
The "Data" option has been set in the When the "Data" option is set in the options
Data have been set, but the data block is
options for the configuration frame, but the for the configuration frame, the data block
not set.
data block is not set. should be set.
"Send + continuous receive" or "Receive When "Send + continuous receive" or
When the communication mode is "Send +
only" has been set as the communication "Receive only" has been set as the
continuous receive" or "Receive only", the
mode, but the "HeadeR" option or the communication mode, the "HeadeR" option
"HeadeR" option or "DelimiteR" option or
"DelimiteR" option is not set in the options or the "DelimiteR" option should be set in
both should be set.
for the configuration frame. the options for the configuration frame.
"Send + continuous receive" or "Receive
When "Send + continuous receive" or
only" has been set as the communication
When the communication mode is "Send + "Receive only" is set as the communication
mode, but in the options for the
continuous receive" or "Receive only" and mode, and the "HeadeR" option is not set in
configuration frame, the "HeadeR" option
no header option exists, the "Delimiter" the options for the configuration frame, the
does not exist, or the "DelimiteR" option is
should be set as the last option. "DelimiteR" option should be set as the last
not set as the last option for the
option for the configuration frame.
configuration frame.

A-4
1 Error Message List

Error Message Causes Remedy


In the "Data" option of the receive frame,
In the "Data" option of the receive frame, a
Do not add a data block after the ASCII when setting the "ASCII constantî to
data block exists after the "ASCII constant"
constant without verification. "Without verification", do not add a data
is set to a data block "Without verification".
block after it.
No option for the configuration frame has At least one option for the configuration
The setting is not complete. The options for been selected in the "Send frame/ frame should be selected in the "Send
the configuration frame are not present. configuration" or "Receive frame/ frame/configuration" or "Receive frame/
configuration". configuration".
"Send + continuous receive" or "Receive When "Send + continuous receive" or
When the communication is "Send + only" has been set as the communication "Receive only" is set as the communication
continuous receive" or "Receive onlyî, do mode, but in the options for the mode, in the options for the configuration
not set the option with binary data, except configuration receive frame, besides the receive frame, do not set other options that
for "Headerî and "Delimiter". "Headerî and "DelimiteR" option, there are contain binary data, except for the
also other options that contain binary data. "HeadeR" option and "DelimiteR" option.
The following macros or responses contain When the macro data are sent to the PLC,

APPENDICES
Check the contents that are displayed, and
incorrect setting. The KV-L20R may not be in the options for the configuration frame,
correct the options for the configuration
able to receive and verify normally. Send or there are warning messages when the
frame.
not? settings are incorrect.
It is not possible to copy and paste multiple
Copy and paste multiple macros and Select one line of macro or response, and
lines. You can only select one line first, then
responses in the macro edit screen. copy and paste.
copy and paste.
Copy the macro with a communication
It is not possible to copy a command of the It is not possible to copy a macro with the
mode of "Receive only" in the macro edit
"Receive only" type. "Receive only" communication mode.
screen.
Paste a macro to the response in the macro You should copy and paste a macro to a
Paste a macro in the response. Can't paste.
edit screen. macro when copying and pasting.
Paste a command in the response. Can't Paste a response to a macro in the macro You should copy and paste a response to a
paste. edit screen. response when copying and pasting.
A macro with the "Receive only" or A macro with the "Receive only" or
Paste all commands for a macro. Can't
"Interruption send" communication mode "Interruption send" communication mode
paste.
has been copied and pasted. can not be copied and pasted.
Multiple responses can not be pasted Paste multiple responses simultaneously in Only one line of response can be selected
simultaneously. the macro edit screen. and to be copied and pasted.
When the communication mode is set to In the macro edit screen, change the
"Interruption send", other settings of the communication mode of the current macro
macro will be cleared. Is it possible? to "Interruption send".
When the communication mode is set to In the macro edit screen, change the When changing the communication mode,
"Send only", the receive settings of the communication mode of the current macro click the "OK" button. When it is not to be
macro will be cleared. Is it possible? to "Send only". changed, click "Cancel" button.
When the communication mode is set to In the macro edit screen, change the
"Receive only", the send settings of the communication mode of the current macro
macro will be cleared. Is it possible? to "Receive only".
The "ASCII constantî has been set to "Only
check the number of characters" in the
The number of check characters should be
"Data" option for the receive frame, but the It should be set between 1 to 255.
set between 1 to 255.
number of characters is not set out of
range.

A-5
1 Error Message List

Error Messages Displayed When Tracing and Monitoring the Operations

Error message Causes Remedy


The "Tracing data capacity specifying
mode" has been selected in the "Tracing The tracing data capacity should be set
The tracing data capacity is out of range.
condition setting", but the tracing data between 1 to 2048(bytes).
capacity is set out of range.
The "Number of macros specifying mode"
The number of tracing macros is out of has been selected in the "Tracing condition The number of executing macros should be
range. setting", but the number of executing set between 1 to 99.
macros is set out of range.
The "Error detection mode" has been
The error type for the tracing condition is not
selected in "Tracing condition setting", but At least one error item should be selected.
set.
no error item is selected.
APPENDICES

The tracing data do not exist, but an


Perform the tracing operation first to obtain
Tracing data do not exist. operation of saving the tracing log has been
the tracing data.
performed.
The ladder diagram program etc. has
The tracing data are corrupt. Please Do not operate the DM reserved for the
occupied the DM of the system space
perform the tracing operation again. system in the ladder diagram program.
(tracing data area).
A file can not be opened in the tracing
A macro setting file has been opened in the Return back to the edit screen, then open
screen. Return back to the edit screen, then
tracing screen. the macro setting file.
open the file.
The software can not be exited in the
The "PROTOCOL STUDIO" has been Return back to the edit screen first, then exit
tracing screen. Return back to the edit
exited in the tracing screen. the "PROTOCOL STUDIO.
screen, then exit it.
An error has occurred, and tracing is not
possible. The causes are as follows. The unit setting information of the Start the Unit Editor, and check the unit
Tracing data do not exist. The unit setting PROTOCOL STUDIO is not consistent with setting information of the PROTOCOL
information of the PROTOCOL STUDIO is that of the PLC. The user's ladder diagram STUDIO and PLC. Do not operate the
not consistent with that of the PLC. The program etc. has used the relays reserved relays reserved for system in the ladder
system-reserved relays of the KV-L20R for the system. diagram program.
have turned ON/OFF.
The data should be saved after the write
It is not possible to save the tracing log to a The file for saving the tracing data is write
protection of the file for saving the tracing
file. protected.
data is cancelled.

A-6
1 Error Message List

Error Messages Displayed When the PROTOCOL STUDIO Starts

Error message Causes Remedy


The PROTOCOL STUDIO has
The PROTOCOL STUDIO has Please use the PROTOCOL
started. The PROTOCOL STUDIO
started. STUDIO that has started.
can not be started twice.
The unit setting information file is There is no unit setting information Specify a folder that contains the
not found. in the specified folder. unit setting information.
Start the Unit Editor, add the "Multi-
The selected unit setting function communication unit KV-
The KV-L20R is not defined in the information does not contain the L20Rî, and set the operation mode
unit setting information. "Multi-function communication unit of the KV-L20R port to
KV-L20R". PROTOCOL STUDIO mode, then
start the PROTOCOL STUDIO.
In the selected unit setting Start the Unit Editor, and set the

APPENDICES
The KV-L20R with a PROTOCOL information, the operation mode of operation mode of the "Multi-
STUDIO mode setting port is not the "Multi-function communication function communication unit KV-
present. unit KV-L20R" has not been set to L20Rî to PROTOCOL STUDIO
PROTOCOL STUDIO mode. mode.
Read register failed. Reinstall the The hard-drive of the PC on which
Install the "KV BUILDER Ladder
"KV BUILDER Ladder Diagram the "KV BUILDER Ladder Diagram
Diagram ER" on another PC.
ER". ER" is installed is corrupt.
The "KV BUILDER Ladder
Diagram ER" has been started on a A PC on which the "KV BUILDER
DLL not found. Reinstall the "KV
PC on which the "KV BUILDER Ladder Diagram ER" has been
BUILDER Ladder Diagram ER".
Ladder Diagram ER" is not installed should be used.
installed.
The icon file of the device is
corrupt. Reinstall the PROTOCOL
The hard-drive of the PC on which
STUDIO. Install the PROTOCOL STUDIO on
the PROTOCOL STUDIO is
The configuration file of the another PC.
installed is damaged.
PROTOCOL STUDIO is corrupt.
Please reinstall.
Memory space falls in short. Exit
If unnecessary applications have
several applications, and restart
The system source that remains is been started, they should be
the PROTOCOL STUDIO.
not enough. stopped. Or, exit the PROTOCOL
The PROTOCOL STUDIO can not
STUDIO and restart the PC.
be started.
The hard-drive of the PC on which
Read register failed. Reinstall the Install the "KV STUDIO Ladder
the "KV STUDIO Ladder Diagram
KV STUDIO. Diagram ER" on another PC.
ER" is installed is corrupt.
It can not be started directly from a
The PROTOCOL STUDIO can not Start the PROTOCOL STUDIO file. A file should be opened after
be started from a file. directly from a macro setting file. the PROTOCOL STUDIO is
started.

A-7
1 Error Message List

Error Messages Related to PLC Communication

Error message Causes Remedy


The PROTOCOL STUDIO does Please check the currently
not support a PLC other than the The model of the PLC that is connected PLC model, model KV-
K V- 7 0 0 / K V- 7 0 0 + M / K V- 1 0 0 0 . connected to the KV-L20R is not 700 or KV-1000 should be
Please check the model of the PLC KV-700 or KV-1000. connected when the model is
that is currently connected. wrong.
The communication cable is not Please check the connection to the
Can't start communication. Please
connected to the PLC, or the power PLC. Please check the power of
check the connection to the PLC.
of the PLC is disconnected. the PLC.
PLC data are read from the PLC,
No macro data are present in the Error when sending macro data to
but no macro data are present in
PLC. the PLC.
the PLC.
The user's ladder diagram program Do not operate the DM reserved for
The macro data of the PLC are
APPENDICES

etc. has used the DM reserved for the system in the ladder diagram
corrupt. Please resend.
the system (macro data area). program.

A-8
2 List of the Device No.
The following describes lists of the relays and DMs used by the PROTOCOL STUDIO.

Relay List

■ Number of occupied relays in operation mode


The number of occupied relays by the KV-L20R will vary with the operation mode.
In the PROTOCOL STUDIO mode, the number of occupied relay channels is 14ch (224 points).
Number of occupied relay
Operation mode
channels (number of points)
KV mode (host link) 1 (16 points)
KV mode (send and receive text data) 2 (32 points)
KV BUILDER/KV STUDIO mode 1 (16 points)
PROTOCOL STUDIO mode 14 (224 points)
Non-procedural mode 2 (32 points)
Link mode 1 (16 points)

APPENDICES
Protocol mode 1 1 (16 points)
Protocol mode 4 1 (16 points)
Modem setup mode 3 (48 points)
Modem operation mode 3 (48 points)

■ List of output relays


The names and contents of the output relays used by the PROTOCOL STUDIO are as follows.
( n : Leading relay No.)
Relay No. Name Description
For the communication macros, the relays will be assigned individually.
OFF→ON : Starts data receive/send.
Enabled when the operation ready relay is ON and all the error
n +000 to
Macro start relay relays are OFF.
n +115
ON : Should be kept ON during macro execution.
ON→OFF : Stops data receive/send.
Stops data receive/send when turning OFF during macro execution.
For the communication macros, the relays will be assigned individually.
OFF→ON : Turns ON when the processing of the response data that are
n +200 to Receive read end received is complete.
n +315 relay ON→OFF : Should be set to OFF when the receive read request relay turns OFF.
Used when the communication macro with the "Receive only" or
"Send + continuous receive" communication mode is executed.
OFF→ON : Enables data receive/send.
Operation enable ON : Should be kept ON during macro execution.
n +400
relay ON→OFF : Disable data receive/send.
Stops data receive/send when turning OFF during macro execution.
Error clear OFF→ON : Clears the error.
n +401
request relay ON→OFF : Should be set to OFF when the error clear end relay turns ON.
ON : Sets the data terminal dwell signal of port 1 to "Low" state.
ER OFF request
n +402 OFF : Sets the data terminal dwell signal of port 1 to "High" state.
relay
It is reserved for system (can not be used by user) when port 2 is used.
n +403 to Reserved for
Can not be used by user
n +415 system

A-9
2 List of the Device No.

■ List of input relays


The names and contents of the input relays used by the PROTOCOL STUDIO are as follows.
( n : Leading relay No.)
Relay No. Name Description
For the responses, the relays are assigned individually.
OFF→ON : Checks the responses received from the peripherals and the
data format of the responses, and turns ON when the results
are consistent.
n +500 to ON→OFF : Set to OFF when the receive read end relay turns ON or the
Check relay*1
n +715 macro starts relay turns OFF.
However, when the size of the response data that are
received exceeds 512 bytes, it will not turn OFF before all
the response data have been saved into the DM of the
receive buffer.
For the communication macros, the relays are assigned individually.
APPENDICES

n +800 to Receive read OFF→ON : Turns ON when receiving the response data.
n +915 request relay*1 ON→OFF : Set to OFF when the receive read end relay turns ON or the
macro starts relay turns OFF.
For the communication macros, the relays are assigned individually.
n +1000 to Send end
OFF→ON : Turns ON when the send data have been sent.
n +1115 relay*'3f1
ON→OFF : Turns OFF when the macro start relay turns OFF.
ON : It is possible to perform data receive/send when the
Operation
n +1200 operation enable relay turns ON.
enable relay*1
OFF : It is not possible to perform data receive/send.
OFF→ON : Turns ON when the error clear request relay turns ON and
Error clear
n +1201 after the standby release error is complete.
*1
end relay
ON→OFF : Turns OFF when the error clear request relay turns OFF.
n +1212 to Reserved for
Can not be used by user
n +1215 system
ON : Sets the data terminal dwell signal of port 1 to "High" state.
n +1300 ER state relay *2
OFF : Sets the data terminal dwell signal of port 1 to "Low" state.
ON : The carrier detection signal of port 1 is in "High" state.
n +1301 CD state relay*2
OFF : The carrier detection signal of port 1 is in "Low" state.
*2
ON : The data setup dwell signal of port 1 is in "High" state.
n +1302 DR state relay
OFF : The data setup dwell signal of port 1 is in "Low" state.
ON : The send request signal of port 1 is in "High" state.
n +1303 RS state relay*2
OFF : The send request signal of port 1 is in "Low" state.
ON : The send ready signal of port 1 is in "High" state.
n +1304 CS state relay*2
OFF : The send ready signal of port 1 is in "Low" state.
n +1305 to Reserved for
Can not be used by user
n +1315 system

*1 Turns OFF when the operation enable relay turns OFF.


*2 It is reserved for system (can not be used by user) when port 2 is used.

A-10
2 List of the Device No.

■ List of error relays


The names and contents of the error relays used by the PROTOCOL STUDIO are as follows.
( n : Leading relay No.)
Relay No. Name Description
Receive dwell OFF→ON : Turns ON after the time set in the "Receive dwell timeout" is
n +1202 timeout error exceeded in the response dwell state of the peripherals.
relay ON→OFF : Turns OFF when the error clear end relay turns ON.

Receive end OFF→ON : Turns ON after beginning to receive responses from the peripherals
until completion, and after the time set in the "Receive end timeout"
n +1203 timeout error
is exceeded.
relay
ON→OFF : Turns OFF when the error clear completion relay turns ON.
OFF→ON : Turns ON when an error occurs in the stop bit during
Stop bit error
n +1204 receiving response data.
relay
ON→OFF : Turns OFF when the error clear completion relay turns ON.
Parity error OFF→ON : Turns ON when a parity error occurs during receiving response data.
n +1205
relay ON→OFF : Turns OFF when the error clear completion relay turns ON.

APPENDICES
OFF→ON : Turns ON when an overflow error occurs during receiving
Overrun
n +1206 response data.
error relay
ON→OFF : Turns OFF when the error clear completion relay turns ON.
OFF→ON : Turns On when the check code of the response data
Receive block received from the peripherals is different from that calculated
n +1207
error relay by the KV-L20R.
ON→OFF : Turns OFF when the error clear completion relay turns ON.
Receive check OFF→ON : Turns ON when responses that are consistent with the
n +1208 inconsistency response data received from the peripherals are not present.
error relay ON→OFF : Turns OFF when the error clear completion relay turns ON.

Receive butter OFF→ON : Turns ON when the size of the response data received from
the peripherals exceeds the receive buffer capacity of the
n +1209 overflow error
KV-L20R (2K bytes).
relay
ON→OFF : Turns OFF when the error clear completion relay turns ON.

Macro OFF→ON : Turns ON when multiple macro start relays turn ON, when the
macro start relay of the communication macro with no data
n +1210 execution
format set turns ON, and when the macro can not be executed.
error relay
ON→OFF : Turns OFF when the error clear completion relay turns ON.
OFF→ON : Turns ON when the data of the communication macro are
corrupt, and the macro can not be executed.
ON→OFF : When this error occurs, it can not be cleared when the error
clear request relay or error clear completion relay operates. At
Macro data this moment, the KV-L20R is in unit error state, and the red
n +1211
error relay light of the direct access switch lights up. When the macro
data error relay is ON, the operation enable relay ( n +400)
first turns OFF. Press the direct access switch of the KV-L20R,
check the error code in the access window of the CPU unit,
then clear the cause of the error.

Note
Stop sending data and stop the macro operation when an error occurs during sending
the send data.
Stop receiving data and stop the macro operation when an error occurs in the
response data that are received.

A-11
2 List of the Device No.

DM List

■ Number of occupied DM in operation mode


The number of occupied DM by the KV-L20R will vary with the operation mode.
In the PROTOCOL STUDIO mode, the DMs will occupy 2000 words in standard mode, and will occupy
7000 words in Large mode.
Name Number of Occupied DMs
KV mode (host link) 0
KV mode (send and receive text
200
data)
KV BUILDER/KV STUDIO mode 0
PROTOCOL Standard 2000
STUDIO mode Large 7000
Non-procedural mode 600
APPENDICES

Link mode 0
Protocol mode 1 0
Protocol mode 4 0
Modem setup mode 100
Modem operation mode 100

■ DM List
The names and contents of the DMs used by the PROTOCOL STUDIO are as follows.
• Standard mode
N : Leading DM No.
W : Leading DM No. + number of occupied DMs of port 1

DM No. Name Description


Saves the error code of the error that occurs on the
N (common to port 1, port 2) Error No.
KV-L20R.
Port 1 Port 2 X
Receive data The number of bytes of the part for storing "Data" in
N +001 W +001
length the response data received from the peripherals.
N +002 to W +002 to Receive buffer The area for storing "Data" in the response data
N +259 W +259 area received from the peripherals.
The area used for the variable DM assigned when
programming a macro. Stores data when the send
N +260 to W +260 to Macro variable data use the variable DM. Checks the response data
N +589 W +589 area format when the response data use the variable DM,
and stores data in the variable DM when the format is
consistent.
N +590 to W +590 to Reserved for
Can not be used by user
N +2000 W +2000 system

A-12
2 List of the Device No.

• Large mode
N : Leading DM No.
W : Leading DM No. + number of occupied DMs of port 1

DM No. Name Description


Saves the error code of the error that occurs on the
N (common to port 1, port 2) Error No.
KV-L20R.
Port 1 Port 2 X
Receive data The number of bytes of the part for storing "Data" in
N +001 W +001
length the response data received from the peripherals.
N +002 to W +002 to Receive buffer The area for storing "Data" in the response data
N +259 W +259 area received from the peripherals.
The area used for the variable DM assigned when
programming a macro. Stores data when the send
N +260 to W +260 to Macro variable data use the variable DM. Checks the response data
N +2259 W +2259 area format when the response data use the variable DM,
and stores data in the variable DM when the format is
consistent.

APPENDICES
N +2260 to W +2260 to Reserved for
Can not be used by user
N +7000 W +7000 system

A-13
3 Index
This index of terms used in this Manual is assigned by alphabet.
Delete Response •••••••••••••••••••••••••••••••••••• 3-22
Delimiter••••••••••••••••••••••••••••••••••••••••••••••• 3-63
A
Detection relay ••••••••••••••••••••••••••••••••••••••• A-11
Difference with PROTOCOL BUILDER ••••••••??2-3
Add macro •••••••••••••••••••••••••••••••••••••••••••3-18
Digit character••••••••••••••••••••••••••• 3-44,3-48,3-51
Add Response••••••••••••••••••••••••••••••••••••••••3-21
DM List •••••••••••••••••••••••••••••••••••••••••••••••• A-13
ASCII constants ••••••••••••••••••••••••••••••• 3-45,3-54
ASCII variable ••••••••••••••••••••••••••••••••• 3-44,3-48
ASCII variables (variable number of data) ••••••3-51 E
Attribute (Macro files) ••••••••••••••••••••••••••••••3-16
End monitoring••••••••••••••••••••••••••••••••••••••• 5-10
Error clear••••••••••••••••••••••••••••••••••••••••••••• 4-20
B
Error confirmation ••••••••••••••••••••••••••••••••••• 4-20
Error Detection Mode (Tracing)•••••••••••••••••••••5-7
Binary constants •••••••••••••••••••••••••••••• 3-46,3-56
Error message (Communication with PLC) ••••• A-9
APPENDICES

Binary variable••••••••••••••••••••••••••••••••• 3-46,3-55


Error message (tracing or monitoring) ••••••••••• A-7
Break send ••••••••••••••••••••••••••••••••••••••••••••3-19
Error message (When creating
Byte replacement (Check code) ••••••••••••••••••3-58
communication macros)•••••••••••••••••••••••••• A-2
Error message (When starting) •••••••••••••••••••• A-8
C
F
Cancel••••••••••••••••••••••••••••••••••••••••••••••••••3-28
Check code •••••••••••••••••••••••••••••••••••••••••••3-57
Features of PROTOCOL STUDIO •••••••••••••••••2-2
Checksum •••••••••••••••••••••••••••••••••••••••••••••3-60
Frame configuration••••••••••••••••••••••••••••••••• 3-38
Close tracing ••••••••••••••••••••••••••••••••••••••••••• 5-8
Communicating setting at PC side •••••••••••••••3-36
Communication macro setup area•••••••••••••••• 3-11 G
Communication mode•••••••••••••••••••••••••••••••• 2-7
Communications Macro Setup File•••••••••••••••• 2-6 General (Send Frame) ••••••••••••••••••••••••••••• 3-38
Communications standard •••••••••••••••••••••••••• 2-7
Complement calculation (check code) •••••••••••3-58
H
Configuration (Send and receive frame) ••••••••3-39
Copy/(Macro and Response) ••••••••••••••••••••••3-29
Header••••••••••••••••••••••••••••••••••••••••••••••••• 3-40
CRC-16 •••••••••••••••••••••••••••••••••••••••••••••••3-61
How the PROTOCOL STUDIO Mode Works ••••2-5
CRC-CCITT •••••••••••••••••••••••••••••••••••••••••••3-61
How to Exit ••••••••••••••••••••••••••••••••••••••••••• 3-17
How to Start ••••••••••••••••••••••••••••••••••••••••••••3-6
D
I
Data (Receive) •••••••••••••••••••••••••••••••••••••••3-47
Data (Send ) ••••••••••••••••••••••••••••••••••••••••••3-43
Info on version ••••••••••••••••••••••••••••••••••••••• 3-37
Data bit length ••••••••••••••••••••••••••••••••••••••••3-42
Data range ••••••••••••••••••••••••••••••••••••••••••••3-66
Decimal place••••••••••••••••••••••••••••3-44,3-48,3-52 L
Default Receive Frame •••••••••••••••••••••••••••••3-25
Default Send Frame •••••••••••••••••••••••••••••••••3-25 List of relays •••••••••••••••••••••••••••••••••••••••••• A-10
Delete Macro •••••••••••••••••••••••••••••••••••••••••3-20 List of the device No. ••••••••••••••••••••••••••••••• A-10
A-14
3 Index

LRC (horizontal parity) ••••••••••••••••••••••••••••••3-59 Receive read completion relay ••••••••••••••••••• A-10
Receive read request relay •••••••••••••••••••••••• A-11
Response Name••••••••••••••••••••••••••••••• 3-11,3-38
M
Restrictions ••••••••••••••••••••••••••••••••••••••••••• 3-64

Macro Device List••••••••••••••••••••••••••••••••••••3-32


Macro name•••••••••••••••••••••••••••••••••••• 3-11,3-18 S
Macro start relay •••••••••••••••••••••••••••••••••••• A-10
Manual setup •••••••••••••••••••••••••••••••••••••••••• 3-9 Save as (Communication
Move/(Macro and Response)••••••••••••••• 3-23,3-24 Macro Setting File) ••••••••••••••••••••••••••••••• 3-15
Save tracing log ••••••••••••••••••••••••••••••••••••• 5-11
Select Devices to be Connected •••••••••••••••••••3-9
N
Send completion relay•••••••••••••••••••••••••••••• A-11
Send wait time ••••••••••••••••••••••••••••••••••••••• 3-26
New (Communication Macro Setting File) ••••• 3-12
Separator •••••••••••••••••••••••••••••••• 3-44,3-48,3-52
Number of Macros
Set up the printer ••••••••••••••••••••••••••••••••••••••6-2

APPENDICES
Specification Mode (Tracing) •••••••••••••••••••• 5-7
Setting Items on Unit Editor •••••••••••••••••••••••••3-4
Number of Retries •••••••••••••••••••••••••••••••••••3-26
Setup Flow••••••••••••••••••••••••••••••••••••••••••••••3-2
Signed character •••••••••••••••••••••••••••••••••••• 3-44
O Start monitoring ••••••••••••••••••••••••••••••••••••••••5-9
Start tracing•••••••••••••••••••••••••••••••••••••••••••••5-8
Opening Communication Macro Setting File •••3-14 Station No. •••••••••••••••••••••••••••••••••••••••••••?3-41
Opening input files Status bar ••••••••••••••••••••••••••••••••••••••••••••• 3-30
(Communication Macro Setting File) ••••••••••3-14 Switch to Edit Screen •••••••••••••••••••••••••••••••••5-8
Operating Environment •••••••••••••••••••••••••••••••• -3 Switch to Tracing Screen ••••••••••••••••••••••••••••5-6
Operation enable relay••••••••••••••••••••••••••••• A-10 System device list ••••••••••••••••••••••••••••••••••?3-31
Operation ready relay •••••••••••••••••••••••••••••••A-11
Option ••••••••••••••••••••••••••••••••••••••••••••••••••3-33
T
Overwrite and save
(Communication Macro Setting File) •••••••••3-15
Tool bar•••••••••••••••••••••••••••••••••••••••••••••••• 3-30
Tracing condition settings••••••••••••••••••••• 5-6,5-10
P Tracing Data Capacity
Specification Mode (Tracing) •••••••••••••••••••••5-7
Package contents••••••••••••••••••••••••••••••••••••• 1-2 Tracing Function•••••••••••••••••••••••••••••••••••••••5-2
Paste (Macro/response) ••••••••••••••••••••••••••••3-29 Transfer macros to PLC•••••••••••••••••••••••••••• 3-33
PLC running•••••••••••••••••••••••••••••••••••••••••••• 5-9
Print preview ••••••••••••••••••••••••••••••••••••••••••• 6-3
U
Print•••••••••••••••••••••••••••••••••••••••••••••••••••••• 6-4

R Undo ••••••••••••••••••••••••••••••••••••••••••••••••••• 3-28


Unit Setup•••••••••••••••••••••••••••••••••••••••••••••••3-4
Unload •••••••••••••••••••••••••••••••••••••••••••••••••••1-7
Read from PLC•••••••••••••••••••••••••••••••••••••••3-34
Receive ASCII constants (not verified) ••••••••••3-54
Receive buffer ••••••••••••••••••••••••••••••••••••••••• 4-7 V
Receive check inconsistency error relay ••••••• A-12
Receive dwell timeout time ••••••••••••••••••••••••3-26 Verify characters No.
Receive end timeout time ••••••••••••••••••••••••••3-26
A-15
3 Index

(Receive ASCII constants) ••••••••••••••••••••••3-54


Verify process type (Receive ASCII constants) 3-54
Verify strings (Receive ASCII constants) ••••••••3-54
Verifying PLC macros •••••••••••••••••••••••••••••••3-35

Write memory card


(Communication Macro Setting File) •••••••••3-16
APPENDICES

A-16
Revision History
Printing Date Version Details of Revision

October 2005 Initial version


WARRANTIES AND DISCLAIMERS:
(1) KEYENCE warrants the Products to be free of defects in materials and
workmanship for a period of one (1) year from the date of shipment. If
any models or samples were shown to Buyer, such models or samples
were used merely to illustrate the general type and quality of the
Products and not to represent that the Products would necessarily
conform to said models or samples. Any Products found to be defective
must be shipped to KEYENCE with all shipping costs paid by Buyer or
offered to KEYENCE for inspection and examination. Upon examination
by KEYENCE, KEYENCE, at its sole option, will refund the purchase
price of, or repair or replace at no charge any Products found to be
defective. This warranty does not apply to any defects resulting from any
action of Buyer, including but not limited to improper installation,
improper interfacing, improper repair, unauthorized modification,
misapplication and mishandling, such as exposure to excessive current,
heat, coldness, moisture, vibration or outdoors air. Components which
wear are not warranted.

(2) KEYENCE is pleased to offer suggestions on the use of its various


Products. They are only suggestions, and it is Buyer's responsibility to
ascertain the fitness of the Products for Buyer's intended use. KEYENCE
will not be responsible for any damages that may result from the use of
the Products.

(3) The Products and any samples ("Products/Samples") supplied to Buyer


are not to be used internally in humans, for human transportation, as
safety devices or failsafe systems, unless their written specifications
state otherwise. Should any Products/Samples be used in such a
manner or misused in any way, KEYENCE assumes no responsibility,
and additionally Buyer will indemnify KEYENCE and hold KEYENCE
harmless from any liability or damage whatsoever arising out of any
misuse of the Products/Samples.

(4) OTHER THAN AS STATED HEREIN, THE PRODUCTS/SAMPLES ARE


PROVIDED WITH NO OTHER WARRANTIES WHATSOEVER. ALL
EXPRESS, IMPLIED, AND STATUTORY WARRANTIES, INCLUDING,
WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
OF PROPRIETARY RIGHTS, ARE EXPRESSLY DISCLAIMED. IN NO
EVENT SHALL KEYENCE AND ITS AFFILIATED ENTITIES BE LIABLE
TO ANY PERSON OR ENTITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
PUNITIVE, SPECIAL OR CONSEQUENTIAL DAMAGES (INCLUDING,
WITHOUT LIMITATION, ANY DAMAGES RESULTING FROM LOSS OF
USE, BUSINESS INTERRUPTION, LOSS OF INFORMATION, LOSS OR
INACCURACY OF DATA, LOSS OF PROFITS, LOSS OF SAVINGS,
THE COST OF PROCUREMENT OF SUBSTITUTED GOODS, SERVICES
OR TECHNOLOGIES, OR FOR ANY MATTER ARISING OUT OF OR IN
CONNECTION WITH THE USE OR INABILITY TO USE THE PRODUCTS,
EVEN IF KEYENCE OR ONE OF ITS AFFILIATED ENTITIES WAS
ADVISED OF A POSSIBLE THIRD PARTY'S CLAIM FOR DAMAGES
OR ANY OTHER CLAIM AGAINST BUYER. In some jurisdictions, some
of the foregoing warranty disclaimers or damage limitations may not
apply.

BUYER'S TRANSFER OBLIGATIONS:


If the Products/Samples purchased by Buyer are to be resold or
delivered to a third party, Buyer must provide such third party with a copy
of this document, all specifications, manuals, catalogs, leaflets and
written information provided to Buyer pertaining to the Products/Samples
Communication Macro Support Software KV-H1RWE User's Manual
Communication Macro Support Software

KV-H1RWE

User's Manual
Please read this Manual before use.
Keep this Manual in a safe place for later reference.

©KEYENCE CORPORATION, 2005 KV-H1RWE-UM 0105-1 Pr inted in Japan

You might also like