LG Electronics Universal Remote 120S User Manual

User’s Manual  
LG Programmable Logic Controller  
MASTER-K 120S series  
LG Industrial Systems  
- When using LGIS equipment, thoroughly read this datasheet and associated  
manuals introduced in this datasheet. Also pay careful attention to safety and  
handle the module properly.  
- Keep this datasheet within easy reach for quick reference  
Download from Www.Somanuals.com. All Manuals Search And Download.  
SAFETY INSTRUCTIONS  
Design Precautions  
Warning  
Install a safety circuit external to the PLC that keeps the entire system  
safe even when there are problems with the external power supply or  
the PLC module. Otherwise, serious trouble could result from  
erroneous output or erroneous operation.  
- Outside the PLC, construct mechanical damage preventing interlock  
circuits such as emergency stop, protective circuits, positioning upper  
and lower limits switches and interlocking forward/reverse operation.  
When the PLC detects the following problems, it will stop calculation and  
turn off all output in the case of watchdog timer error, module interface  
error, or other hardware errors.  
However, one or more outputs could be turned on when there are  
problems that the PLC CPU cannot detect, such as malfunction of output  
device (relay, transistor, etc.) itself or I/O controller. Build a fail safe  
circuit exterior to the PLC that will make sure the equipment operates  
safely at such times. Also, build an external monitoring circuit that will  
monitor any single outputs that could cause serious trouble.  
Make sure all external load connected to output does NOT exceed the  
rating of output module.  
Overcurrent exceeding the rating of output module could cause fire, damage  
or erroneous operation.  
Build a circuit that turns on the external power supply when the PLC  
main module power is turned on.  
If the external power supply is turned on first, it could result in erroneous  
output or erroneous operation.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
SAFETY INSTRUCTIONS  
Design Precautions  
Caution  
Do not bunch the control wires or communication cables with the main  
circuit or power wires, or install them close to each other. They should  
be installed 100mm (3.94inch) or more from each other.  
Not doing so could result in noise that would cause erroneous operation.  
Installation Precautions  
Caution  
Use the PLC in an environment that meets the general specification  
contained in this manual or datasheet.  
Using the PLC in an environment outside the range of the general  
specifications could result in electric shock, fire, erroneous operation, and  
damage to or deterioration of the product.  
Completely turn off the power supply before loading or unloading the  
module.  
Not doing so could result in electric shock or damage to the product.  
Make sure all modules are loaded correctly and securely.  
Not doing so could cause a malfunction, failure or drop.  
Make sure I/O and extension connector are installed correctly.  
Poor connection could cause an input or output failure.  
When install the PLC in environment of much vibration, be sure to  
insulate the PLC from direct vibration.  
Not doing so could cause electric shock, fire, and erroneous operation.  
Be sure to there are no foreign substances such as conductive debris  
inside the module.  
Conductive debris could cause fires, damage, or erroneous operation.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
SAFETY INSTRUCTIONS  
Wiring Precautions  
Warning  
Completely turn off the external power supply when installing or  
placing wiring.  
Not doing so could cause electric shock or damage to the product.  
Make sure that all terminal covers are correctly attached.  
Not attaching the terminal cover could result in electric shock.  
Caution  
Be sure that wiring is done correctly be checking the product’s rated  
voltage and the terminal layout.  
Incorrect wiring could result in fire, damage, or erroneous operation.  
Tighten the terminal screws with the specified torque.  
If the terminal screws are loose, it could result in short circuits, fire, or  
erroneous operation.  
Be sure to ground the FG or LG terminal to the protective ground  
conductor.  
Not doing so could result in erroneous operation.  
Be sure there are no foreign substances such as sawdust or wiring  
debris inside the module.  
Such debris could cause fire, damage, or erroneous operation.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
SAFETY INSTRUCTIONS  
Startup and Maintenance Precautions  
Warning  
Do not touch the terminals while power is on.  
Doing so could cause electric shock or erroneous operation.  
Switch all phases of the external power supply off when cleaning the  
module or retightening the terminal or module mounting screws.  
Not doing so could result in electric shock or erroneous operation.  
Do not charge, disassemble, heat, place in fire, short circuit, or solder  
the battery.  
Mishandling of battery can cause overheating or cracks which could result in  
injury and fires.  
Caution  
Do not disassemble or modify the modules.  
Doing so could cause trouble, erroneous operation, injury, or fire.  
Switch all phases of the external power supply off before mounting or  
removing the module.  
Not doing so could cause failure or malfunction of the module.  
Use a cellular phone or walky-talky more than 30cm (11.81 inch) away  
from the PLC  
Not doing so can cause a malfunction.  
Disposal Precaution  
Caution  
When disposing of this product, treat it as industrial waste.  
Not doing so could cause poisonous pollution or explosion.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Revision History  
Date  
Code  
Revision history  
2002.7.  
2003.5.  
10310000380  
10310000380  
First edition is published  
A revised edition is published  
Main unit and expansion modules are added  
Built-in function are upgraded  
2003.9  
10310000380  
A revised edition is published.  
-
-
Main units are added  
Built-in functions are upgraded.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Contents ◎  
Chapter 1. General  
1.1 Guide to Use This Manual ················· 1 - 1  
1.2 Features ······················· 1 - 2  
1.3 Terminology ······················ 1 - 3  
Chapter 2. System Configuration  
2.1 Overall Configuration ··················· 2 - 1  
2.1.1 Basic System································································································ 2 - 1  
2.1.2 Cnet I/F System····························································································· 2 - 2  
2.2 Product Functional Model ················· 2 - 4  
2.2.1 Product Functional Block················································································· 2 - 4  
2.2.2 MASTER-K120S Series System Equipment Product ············································· 2 - 5  
Chapter 3. General Specifications  
3.1 General Specifications ·················· 3 - 1  
Chapter 4. Names of Parts  
4.1 Main Unit ······················· 4 - 1  
4.1.1 60 Points Main Unit (Standard) ········································································· 4 - 2  
4.1.2 40 Points Main Unit (Standard) ··········································································4 -3  
4.1.3 30 Points Main Unit (Standard) ········································································· 4 - 4  
4.1.4 20 Points Main Unit (Standard) ········································································· 4 - 5  
4.1.5 30 Points Main Unit (Economic) ········································································ 4 - 6  
4.1.6 20 Points Main Unit (Economic) ·········································································4 -7  
4.1.7 14 Points Main Unit (Economic) ········································································ 4 - 7  
4.1.8 10 Points Main Unit (Economic) ········································································ 4 - 7  
4.2 Expansion I/O Module··················· 4 - 8  
4.2.1 20 Point I/O Module························································································ 4 - 8  
4.2.2 10 Point I/O Module························································································ 4 - 8  
4.2.3 8 Point I/O Module ························································································· 4 - 9  
4.3 Special Module ····················  
4 - 10  
4.3.1 A/D·D/A Combination Module········································································4 - 10  
4.3.2 D/A Conversion Module··················································································4 - 11  
4.3.3 A/D Conversion Module··················································································4 - 11  
4.3.4 Analog Timer Module·····················································································4 - 12  
4.3.5 RTD Input Module·························································································4 - 12  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4.4 Communication I/F Module ················· 4 - 13  
4.4.1 Cnet I/F Module····························································································4 - 13  
4.4.2 Fnet I/F Module ····························································································4 - 13  
4.4.3 Pnet I/F Module····························································································4 - 14  
4.4.4 DeviceNet I/F Module ····················································································4 - 14  
4.5 Option Module ····················· 4 - 14  
Chapter 5. Power Supply / CPU  
5.1 Power Supply Specifications ················ 5 - 1  
5.1.1 Standard Type······························································································· 5 - 1  
5.3.2 Economic Type······························································································ 5 - 1  
5.2 CPU Specifications ···················· 5 - 2  
5.2.1 Standard Type······························································································· 5 - 2  
5.2.2 Economic Type······························································································ 5 - 4  
5.3 Operation Processing ··················· 5 -6  
5.3.1 Operation Processing Method··········································································· 5 - 6  
5.3.2 Operation Processing at Momentary Power Failure Occurrence······························· 5 - 7  
5.3.3 Scan Time···································································································· 5 - 8  
5.3.4 Scan Watchdog Timer····················································································· 5 - 8  
5.3.5 Timer Processing ························································································· 5 - 9  
5.3.6 Counter Processing·······················································································5 - 12  
5.4 Program························································································ 5 - 14  
5.4.1Classifications of Program ·············································································5 - 14  
5.4.2 Program Execution Procedure ·········································································5 - 14  
5.4.3 Interrupt Programs ························································································5 - 15  
5.4.4 Error Handling······························································································5 - 17  
5.5 Operation Modes ···················· 5 - 19  
5.5.1 RUN Mode ··································································································5 - 19  
5.5.2 STOP Mode·································································································5 - 20  
5.5.3 PAUSE Mode·······························································································5 - 20  
5.5.4 DEBUG Mode(Standard Type Only)··································································5 - 20  
5.5.5 Operation Mode Change ················································································5 - 21  
5.6 Function························ 5 - 23  
5.6.1 Self-diagnosis ······························································································5 - 23  
5.6.2 I/O Force On/Off function ··············································································5 - 24  
5.6.3 Direct I/O Operation function ···········································································5 - 27  
5.6.4 System error history ······················································································5 - 27  
5.7 Memory Configuration··················· 5 - 28  
5.8 I/O Address Allocation ··················· 5 - 29  
5.9 Built-in Cnet Selection switch ··························································· 5 - 30  
5.9.1 Structure·····································································································5 - 30  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5.9.2 Usage ········································································································5 - 30  
5.10 External Memory Module ················· 5 - 32  
5.10.1 Structure ···································································································5 - 32  
5.10.2 Usage·······································································································5 - 32  
5.11 RTC Module ······················ 5 - 34  
5.11.1 Structure ···································································································5 - 34  
5.11.2 Usage······································································································5 – 34  
Chapter 6. Input and Output Modules  
6.1 Input / Output Specifications ················ 6 - 1  
6.2 Digital Input Specifications ················· 6 - 2  
6.2.1 Main Unit ····································································································· 6 - 2  
6.2.2 Expansion Module ························································································· 6 - 5  
6.3 Digital Output Specification ················· 6 - 6  
6.3.1 Main Unit (Relay Output) ················································································· 6 - 6  
6.3.2 Main Unit (Tr Output :DRT/DT Type Only) ··························································· 6 - 9  
6.3.3 Expansion Module ························································································6 - 11  
Chapter 7. Usage of Various Functions  
7.1 Built-in Functions ···················· 7 - 1  
7.1.1 High Speed Counter Function··········································································· 7 - 1  
7.1.2 Pulse Catch Function·····················································································7 - 14  
7.1.3 Input Filter Function·······················································································7 - 16  
7.1.4 External Interrupt Function··············································································7 - 17  
7.1.5 PID Control Function(Standard Type Only) ·························································7 - 19  
7.2 Special Module ····················· 7 - 39  
7.2.1 A/D·D/A Combination Module········································································7 - 40  
7.2.2 A/D Conversion Module··················································································7 - 49  
7.2.3 D/A Conversion Module··················································································7 - 55  
7.2.4 Analogue Timer ··························································································7 - 61  
7.2.5 RTD input Module ·······················································································7 - 63  
7.3 Positioning Function(DRT /DTtype only) ············ 7 - 69  
7.3.1 Specification································································································7 - 69  
7.3.2 Positioning Function ······················································································7 - 72  
7.3.3 Positioning parameter and Operation Data ·························································7 - 85  
7.3.4 Instructions ································································································7 - 91  
7.3.5 Flag list and Error code ··············································································7 - 100  
7.3.6 Wiring with servo and stepping motor driver······················································7 - 104  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8. Communication Function  
8.1 Dedicated Protocol Communication ·············· 8 - 1  
8.1.1 Introduction ·································································································· 8 - 1  
8.1.2 System configuration method ··········································································· 8 - 2  
8.1.3 Frame Structure ···························································································· 8 - 5  
8.1.4 Lists of Commands ························································································ 8 - 7  
8.1.5 Data Type ···································································································· 8 - 8  
8.1.6 Execution of Commands ················································································· 8 - 9  
8.1.7 1:1, 1:n Built-in Communication between MASTER-K120Ss ································8 - 28  
8.1.8 Error Codes·································································································8 - 38  
8.2 User Defined Protocol Communication ············· 8 - 39  
8.2.1 Introduction ·································································································8 - 39  
8.2.2 Parameter Setting·························································································8 - 39  
8.2.3 Instruction ·································································································8 - 47  
8.2.4 Example of usage ·······················································································8 - 48  
8.3 Modbus Protocol Communication··············· 8 - 57  
8.3.1 Introduction ·································································································8 - 57  
8.3.2 Basic Specifications ······················································································8 - 57  
8.3.3 Parameter Setting·························································································8 - 60  
8.3.4 Instruction and examples ··············································································8 - 62  
8.4 No Protocol Communication ················ 8 - 67  
8.4.1 Introduction ·································································································8 - 67  
8.4.2 Parameter Setting·························································································8 - 68  
8.4.3 Instructions··································································································8 - 69  
8.4.4 Examples ··································································································8 - 71  
8.5 Remote Connection and Communication I/F module ········ 8 - 73  
8.5.1 Remote Connection·······················································································8 - 73  
8.5.2 Communication I/F Module ·············································································8 - 76  
Chapter 9. Installation and Wiring  
9.1 Installation ······················· 9 - 1  
9.1.1 Installation Environment ·················································································· 9 - 1  
9.1.2 Handling Instructions ······················································································ 9 - 3  
9.1.3 Connection of Expansion Module ······································································ 9 - 6  
9.2 Wiring ························ 9 - 7  
9.2.1 Power Supply Wiring ······················································································ 9 - 7  
9.2.2 Input and Output Devices Wiring ······································································· 9 - 8  
9.2.3 Grounding···································································································· 9 - 9  
9.2.4 Cable Specifications for wiring·········································································· 9 - 9  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 10. Maintenance  
10.1 Maintenance and Inspection ················ 10 - 1  
10.2 Daily Inspection ···················· 10 - 1  
10.3 Periodic Inspection ··················· 10 - 2  
Chapter 11. Troubleshooting  
11.1 Basic Procedure of Troubleshooting ············· 11 - 1  
11.2 Troubleshooting ············································································ 11 - 1  
11.2.1 Troubleshooting flowchart used when the power LED turns off ·····························11 - 2  
11.2.2 Troubleshooting flowchart used when the error LED is flickering ····························11 - 3  
11.2.3 Troubleshooting flowchart used when the RUN LED turns off································11 - 4  
11.2.4 Troubleshooting flowchart used when the I/O devices doesnt operate normally ········11 - 5  
11.2.5 Troubleshooting flowchart used when a program cant be written to the CPU············11 - 7  
11.3 Troubleshooting Questionnaire ························································· 11 - 8  
11.4 Troubleshooting Examples······························································· 11 - 9  
11.4.1 Input circuit troubles and corrective actions ·······················································11 - 9  
11.4.2 Output circuit troubles and corrective actions··················································· 11 - 10  
11.5 Error code list ··············································································11 - 12  
Appendix ··················································································································  
Appendix 1 System Definitions·······························································App1-1  
Appendix 2 Flag Lists···········································································App2-1  
Appendix 3 Dimensions········································································App3-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 1 General  
Chapter 1. General  
1.1 Guide to Use This Manual  
This manual includes specifications, functions and handling instructions for the MASTER-K120S series PLC.  
This manual is divided up into chapters as follows:  
No.  
Title  
Contents  
Chapter 1  
General  
Describes configuration of this manual, unit's features and terminology.  
Chapter 2  
System configuration  
Describes available units and system configurations in the MASTER-K120S series.  
Chapter 3  
Chapter 4  
Chapter 5  
Chapter 6  
General Specification  
Names of Parts  
Power Supply / CPU  
Input and Output  
Usage of Various  
Functions  
Describes general specifications of units used in the MASTER-K120S series.  
Describes each kind of manufacturing goods, titles, and main functions  
Describes each kind of manufactured goods' usage  
Chapter 7  
Chapter 8  
Chapter 9  
Communication Function Describes built-in communication functions  
Installation and Wiring  
Maintenance  
Describes installation, wiring and handling instructions for reliability of the PLC system  
Describes the check items and method for long-term normal operation of the PLC  
system.  
Chapter 10  
Chapter 11  
Appendix 1  
Appendix 2  
Appendix 3  
Troubleshooting  
System Definitions  
Flag List  
Describes various operation errors and corrective actions.  
Describes parameter setting for basic I/O and communications module  
Describes the types and contents of various flags.  
Dimensions  
Shows dimensions of the main units and expansion modules  
REMARK  
-. This manual does not describes the programming method. For their own functions, refer to the related user's  
manuals.  
1-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 1 General  
1.2. Features  
1) MASTER-K120S series is extremely compact, to fit a wide range of applications and have following features.  
(1) High speed processing  
High speed processing of 0.1~0.9µs/step with an general purpose processor included .  
(2) Various built-in functions  
The main unit can perform many functions without using separate modules. Therefore, It is possible to construct various  
systems just using the main unit.  
Fast Processing Applications  
- Pulse catch: Allows the main unit to read a pulse which has width as small as 10 .  
- High speed counter(Economic): Support high-speed counting up to 100(10)kHz for 1 phase, 50(5)kHz for 2 phase.  
- External interrupts : Using in applications that have a high-priority event which requires immediate responses.  
The input filter function help reduce the possibility of false input conditions from external noise, such as signal  
chattering. The filter time can be programmed from 0 to 1000ms.  
Using RS-232C and RS-485 built-in port, MASTER-K120S can connects with external devices, such as personal  
computers or monitoring devices and communicate 1:N with MASTER-K120S system.  
Using built-in PID control function, PID control system can be constructed without using separate PID module.  
Using built-in Positioning function, position control system can be constructed without using separate position control  
module.(only DRT/DT type has built-in positioning function)  
(3) Battery-less  
The users program can be saved permanently, because it is stored to EEPROM.  
(4) When program is edited during processing, it is stored to EEPROM automatically  
(5) Open network by use of communication protocols in compliance with international standard specifications.  
(6) Various special modules that enlarge the range of application of the PLC  
(7) It can easily do On/Off of the system, using RUN/STOP switch.  
(8) It can easily save the user program in EEPROM by simple manipulation in KGLWIN without using external memory.  
(9) Strong self-diagnostic functions  
It can detect the cause of errors with more detailed error codes.  
(10) It can prevent unintentional reading and writing, using password.  
(11)Debugging function(Standard type)  
On-line debugging is available when the PLC Operation mode is set to debug mode.  
y executed by one command.  
y executed by break-point settings.  
y executed by the condition of the device  
y executed by the specified scan time.  
(12) Various program execution function  
External and internal interrupt program as well as scan program can be executed by setting the execution condition.  
Therefore, user can set variously program execution mode.  
1-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 1 General  
1.3 Terminology  
The following table gives definition of terms used in this manual.  
Terms  
Definition  
Remarks  
Example)  
CPU module  
Power Supply module  
I/O module  
A standard element that has a specified function which configures the  
system. Devices such as I/O board, which inserted onto the mother board  
or base unit.  
Module  
A single module or group of modules that perform an independent  
Operation as a part of PLC system.  
Example)  
Main unit  
Unit  
A system which consists of the PLC and peripheral devices. A user program  
can control the system.  
PLC system  
A program and debugging tool for the MASTER-K series. It executes  
program creation, edit, compile and debugging(A computer software).  
KGLWIN  
A hand-held loader used for program creation, edit, compile and debugging  
for MASTER-K series.  
KLD-150S  
I/O Image Area Internal memory area of the CPU module which used to hold I/O statuses.  
Supervisors the pre-set execution times of programs and warns if a  
Watch Dog Timer  
program is not completed within the pre-set time.  
Abbreviation of the word Factory Automation Monitoring S/W’. It is used to  
call S/W packages for process supervision.  
FAM  
Fnet  
Fieldbus network  
Cnet  
RTC  
Computer network(RS-232C, RS-422/485)  
Abbreviation of Real Time Clock’. It is used to call general IC that  
contains clock function.  
1-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 1 General  
Terms  
Definition  
Remarks  
Current flows from the switch to the PLC input terminal if a input signal turns on.  
Sink Input  
Current flows from the PLC input terminal to the switch after a input signal turns  
on.  
Source  
Input  
Current flows from the load to the output terminal and the PLC output turn on.  
Output  
Contact  
Sink Output  
Current flows from the output terminal to the load and the PLC output turn on.  
Source  
Output  
Output Contact  
1-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 2 System Configuration  
Chapter 2. System Configuration  
The MASTER-K120S series has suitable to configuration of the basic, computer link and network systems.  
This chapter describes the configuration and features of each system.  
2.1 Overall Configuration  
2.1.1 Basic system  
expansion  
Main unit  
module  
expansion  
cable  
Total I/O points  
10-120 points  
Standard  
Economic  
2 modules  
Digital I/O module  
3 modules  
Maximum number  
of expansion  
modules  
A/D-D/A module  
Analog timer  
3 modules  
2 modules  
2 modules  
1 modules  
3 modules  
Cnet I/F module  
Economic  
1 module  
K7M-DR10/14/20/30UE  
K7M-DR//DRT/DT20/30/40/60U  
Main unit  
Standard  
Digital I/O module  
G7E-DR10A, G7E-DR20A, G7E-TR10A, G7E-DC08A, G7E-RY08A  
Expansion Analog I/O module  
G7F-ADHA, G7F-ADHB, G7F-AD2A, G7F-DA2I, G7F-DA2V  
module  
Analog timer  
G7F-AT2A  
Resistance Temperature Detactor G7F-RD2A  
Items  
Cnet I/F modules  
G7L-CUEB, G7L-CUEC  
Communic  
ation I/F  
module  
DeviceNet I/F module  
G7L-DBEA  
FieldBus I/F module  
Profibus I/F Module  
RTC  
G7L-FUEA  
G7L-PBEA  
G7E-RTCA  
G7M-M256B  
Option  
module  
Memory  
2-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 2 System Configuration  
2.1.2 Cnet I/F system  
Cnet I/F System is used for communication between the main unit and external devices using RS-232C/RS-422 Interface.  
The MK120S has a built-in RS-232C port, RS-485 port and has also G7L-CUEB for RS-232C, G7L-CUEC for RS-422. It is  
possible to construct communication systems on demand.  
1) 1:1 Communications system  
(1) 1:1 ratio of an external device (computer) to main unit using a built-in port  
MASTER-K120S  
Monitoring Device  
RS-232C  
RS-485  
(2) 1:1 ratio of an external device (monitoring unit) to main unit using a built-in RS-485 port  
RS-485  
MASTER-K120S  
MASTER-K120S  
Monitoring Device  
RS-232C  
2-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 2 System Configuration  
(3) RS-232C Communication over a long distance via modem by Cnet I/F modules  
MASTER-K120S  
G7L-CUEB  
G7L-CUEB  
MASTER-K120S  
Modem  
Modem  
MASTER-K120S  
G7L-CUEB  
Modem  
Modem  
2) 1:n Communications system  
This method can connect between one computer and multiple main units for up to 32 stations  
Can be connected Max. 32 stations  
RS-232C RS-422 Converter  
G7L-CUEC  
G7L-CUEC  
MASTER-K120S  
MASTER-K120S  
MASTER-K120S  
RS-232C RS-485  
Converter  
Built-in RS-485  
Built-in RS-485  
Built-in RS-485  
* Refer to chapter 8. communication function’ for details.  
2-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 2 System Configuration  
2.2 Product Functional Model  
The following describes functional model of the MASTER-K120Sseries.  
2.2.1 Product Functional Block  
Product function block for the K120S series is as follows.  
Main Unit  
Expansion Modules  
Input signal  
Power supply  
Input signal  
Input  
Power  
supply  
Input  
DC24V  
Power  
Special/communication  
modules  
supply  
CPU  
Output  
Output  
Comm. I/F  
Built-in  
RS-485  
Built-in RS-232C I/F  
Output signal  
Output signal  
Description  
Sub-system  
CPU  
Signal processing function  
-. Operating system function  
-. Application program storage / memory function  
-. Data storage / memory function  
-. Application program execution function  
Input  
The input signals obtained from the machine/process to appropriate signal levels for  
processing  
Output  
The output signals obtained from the signal processing function to appropriate signal  
levels to drive actuators and/or displays  
Power Supply  
Communication  
Interface  
Provides for conversion and isolation of the PLC system power from the main supply  
Provides the data exchange with other systems or PADT, such as KGLWIN, personal  
computers  
2-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 2 System Configuration  
2.2.2 K120S Series System Equipment Product  
1) Main Unit – Standard type  
I/O Point &  
Items  
Models  
Built-in Function  
Remark  
Power Supply  
12 DC inputs(24VDC)  
8 relay outputs  
Program capacity : 10 k steps  
K7M-DR20U  
Max. expansion : 3 modules  
85~264 VAC  
High-speed counter :  
18 DC inputs(24VDC)  
12 relay outputs  
- 1 Phase : 100 kHz 1channel, 20 kHz 2channel.  
- 2 Phase : 50 kHz 1channel, 10 kHz 1channel.  
Pulse catch : pulse width 10 2 points, 50 6 points,  
External interrupt: : 10 2 points, 50 6 points  
Input filter: 0 ~ 1000ms (can be designated with groups)  
PID control function  
K7M-DR30U  
K7M-DR40U  
K7M-DR60U  
85~264 VAC  
24 DC inputs(24VDC)  
16 relay outputs  
85~264 VAC  
36 DC inputs(24VDC)  
24 relay outputs  
RS-232C communication, RS-485 communication  
85~264 VAC  
12 DC inputs(24VDC)  
4/0 relay outputs  
4/8 TR outputs  
Program capacity : 10 k steps  
K7M-  
DRT/DT20U  
Max. expansion : 3 modules  
Main Unit  
High-speed counter :  
85~264 VAC  
- 1 Phase : 100 kHz 1channel, 20 kHz 2channel.  
- 2 Phase : 50 kHz 1channel, 10 kHz 1channel.  
Pulse catch : pulse width 10 - 2 points, 50 - 6 points,  
External interrupt: : 10 - 2 points, 50 - 6 points  
Input filter: 0 ~ 1000ms (can be designated with groups)  
PID control function  
18 DC inputs(24VDC)  
8/0 relay outputs  
4/12 TR outputs  
85~264 VAC  
K7M-  
DRT/DT30U  
24 DC inputs(24VDC)  
12/0 relay outputs  
4/16 TR outputs  
85~264 VAC  
K7M-  
DRT/DT40U  
RS-232C communication, RS-485 communication  
Positioning function  
- 2axes 100 kpps  
36 DC inputs(24VDC)  
20/0 relay outputs  
4/24 TR outputs  
85~264 VAC  
- Absolute / Incremental positioning method  
- Single / Repeat operation method  
K7M-  
DRT/DT60U  
- End / Keep / Continuous mode  
- Return to origin, JOG, PWM, velocity control  
2) Main Unit – Economic type  
I/O Point &  
Items  
Models  
Built-in Function  
Remark  
Power Supply  
6 DC inputs(24VDC)  
4 relay outputs  
85~264 VAC  
Program capacity : 2 k steps  
K7M-DR10UE  
Max. expansion : 2 modules  
Pulse catch : pulse width 50 4 points,  
High-speed counter :  
8 DC inputs(24VDC)  
6 relay outputs  
K7M-DR14UE  
K7M-DR20UE  
K7M-DR30UE  
- 1 Phase : 10 kHz 2channel.  
85~264 VAC  
Main Unit  
- 2 Phase : 5 kHz 1channel.  
12 DC inputs(24VDC)  
8 relay outputs  
External interrupt: : 50 4 points  
Input filter: 0 ~ 1000ms (can be designated with groups)  
RS-232C communication  
85~264 VAC  
18 DC inputs(24VDC)  
12 relay outputs  
RS-485 communication(K7M-DR10/14UE only)  
Built-in analog timer(K7M-DR10/14UE only)  
85~264 VAC  
2-5  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 2 System Configuration  
3) Expansion Modules  
Section  
Items  
Models  
Description  
Remark  
G7E-DR10A 6 DC inputs / 4 relay outputs  
G7E-DR20A 12 DC inputs / 8 relay outputs  
G7E-DC08A 8 DC inputs  
Slim Type  
Expansion  
module  
Digital I/O module  
G7E-TR10A 10 Transistor outputs  
G7E-RY08A 8 relay outputs  
Slim Type  
G7E-DR08A 4 DC Input, 4 Relay output  
G7F-ADHA  
G7F-ADHB  
G7F-AD2A  
G7F-DA2I  
A/D : 2 channel , D/A : 1 channel  
A/D : 2 channel , D/A : 2 channel  
A/D : 4 channel  
A/D-D/A  
Combination module  
Slim  
Type  
A/D conversion module  
D/A conversion module  
D/A : 4 channel(current output)  
D/A : 4 channel(voltage output)  
Slim  
Type  
G7F-DA2V  
G7F-AT2A  
G7F-RD2A  
G7L-CUEB  
G7L-CUEC  
G7L-DBEA  
G7L-FUEA  
G7L-PBEA  
G7E-RTCA  
Points : 4points  
Analog timermodule  
RTD module  
Digital output range : 0~200  
Resistance temperature detactor  
- 4 channel(Pt100, JPt100)  
Slim  
Standard  
Special  
module  
Type type only  
RS-232C : 1 channel  
RS-422 : 1 channel  
Communication I/F module  
DeviceNet I/F module (Slave)  
FieldBus I/F module  
Standard  
type only  
Profibus I/F module (Slave)  
Real Time Clock module  
RTC module  
External Memory  
G7M-M256B External Memory module  
* External memory G7M-M256 isnt supported in K120S series. Only G7M-M256B is available for K120S series.  
2-6  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 3 General Specifications  
Chapter 3. General Specifications  
3.1 General Specifications  
The following table shows the general specifications of the MASTER-K120S series.  
No.  
1
Item  
Specifications  
References  
Operating ambient  
Temperature  
Storage ambient  
Temperature  
Operating ambient  
Humidity  
0 ~ 55 °C  
2
3
4
25 ~ +70 °C  
5 ~ 95%RH, non-condensing  
5 ~ 95%RH, non-condensing  
Storage ambient  
Humidity  
Occasional vibration  
-
Frequency  
Acceleration  
Amplitude  
Sweep count  
0.075mm  
10 f < 57Hz  
57 f 150Hz  
9.8m/s2 {1G}  
Continuous vibration  
Acceleration  
5
6
Vibrations  
Shocks  
IEC 61131-2  
IEC 61131-2  
10 times for each  
X, Y, Z axis  
Frequency  
Amplitude  
0.035mm  
10 f < 57Hz  
57 f 150Hz  
4.9m/s2 {0.5G}  
Maximum shock acceleration: 147 m/s2 {15G}  
Duration time: 11ms  
Pulse wave: half sine pulse ( 3 shocks per axis, on X, Y, Z axis )  
Square wave  
Impulse noise  
LGISInternal  
Standard  
1,500 V  
IEC 61131-2,  
IEC 1000-4-2  
Electronic  
discharge  
Voltage: 4 kV ( Discharge by contact )  
Radiated  
electromagnetic  
field noise  
IEC 61131-2,  
IEC 1000-4-3  
27 ~ 500 MHz, 10 V/m  
7
Noise Immunity  
Digital I/O  
(less than24V)  
Analog I/O  
Interface  
Digital I/O  
(24V and up)  
Item  
Power supply  
2kV  
Fast transient &  
burst noise  
IEC 61131-2  
IEC 1000-4-4  
Voltage  
1kV  
0.25kV  
8
9
Atmosphere  
Altitude  
Free of corrosive gases and excessive dust  
Up to 2,000m  
10  
11  
2
Pollution degree  
Cooling method  
Air-cooling  
REMARK  
1) IEC (International Electrotechnical Commission): An international civilian institute who establishes international standards in area of electric  
and electronics.  
2) Pollution degree: An indicator, which indicates pollution degree, which determine insulation performance of equipment.  
* Pollution degree 2 : Normally, only non-conductive pollution occurs. Occasionally, however, a temporary conductivity caused by  
condensation shall be expected.  
3-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
Chapter 4. Names of Parts  
4.1 Main Unit  
BUILT_IN CNET  
OFF  
RUN  
PAU/REM  
STOP  
ON  
ROM MODE  
-
+
RS-485  
No.  
Name  
Description  
Indicates status of power supply to the system  
PWR LED  
RUN LED  
ERR LED  
y On : When the supplied power is normal  
y Off : When the supplied power is abnormal  
Indicates operating status of main unit  
y On : Indicates local key switch or remote running mode  
y Off : with the followings, LED turns off  
- When the supplied power to the main unit is abnormal.  
- While key switch is on stop mode  
CPU  
Condition  
LED  
- Detecting an error which makes operation stop  
Indicates operating status of CPU  
y Flickering : self-inspected error  
y Off: CPU is working normal.  
4 -1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
No  
Name  
Description  
I/O LED  
Indicates operating status of I/O  
Built-in RS-485 connector  
(Except K7M-DR10/14UE)  
2-pin connector for built-in RS-485 communications.  
Designates main units operation mode  
y RUN : Run program operation  
Key switch for mode creation  
.(Except economic type)  
y STOP: Stop program operation  
y PAU / REM: usage of each modules are as follows:  
- PAUSE : temporary stopping program operation  
- REMOTE : designates remote driving  
Dip-switch for Cnet I/F  
RS-232C connector  
See Chapter 5.  
9-pin DIN connector to connect with external devices like KGLWIN  
Connector cover to connect with expansion unit  
Protection cover for wiring of terminal block  
Private part hook for DIN rail  
Expansion connector cover  
Terminal block cover  
Private hook DIN rail  
4.1.1 60-points main unit (Standard)  
1) K7M-DR60U  
4 -2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
2) K7M-DRT60U  
3) K7M-DT60U  
4.1.2 40-points main unit (Standard)  
1) K7M-DR40U  
4 -3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
2) K7M-DRT40U  
3) K7M-DT40U  
4.1.3 30-points main unit (Standard)  
1) K7M-DR30U  
4 -4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
2) K7M-DRT30U  
3) K7M-DT30U  
4.1.4 20-points main unit (Standard)  
1) K7M-DR20U  
4 -5  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
2) K7M-DRT20U  
3) K7M-DT20U  
4.1.5 30-points main unit (Economic)  
1) K7M-DR30UE  
4 -6  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
4.1.6 20-points main unit (Economic)  
1) K7M-DR20UE  
4.1.7 14-points main unit (Economic)  
1) K7M-DR14UE  
4.1.8 10-points main unit (Economic)  
1) K7M-DR10UE  
4 -7  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
4.2 Expansion I/O Module  
4.2.1 20points I/O Module  
1) G7E-DR20A  
No.  
Names  
Input LED  
Output LED  
Input contact  
Input common terminal  
Output contact  
Output common terminal  
Expansion cable  
Expansion Cable Connecting Terminal  
4.2.2 10points I/O Module  
1) G7E-DR10A  
No.  
Names  
Input LED  
Output LED  
Input contact  
Input common terminal  
Output contact  
Output common terminal  
Expansion cable  
⑥ ⑤ ⑥ ⑤  
Expansion Cable Connecting Terminal  
1) G7E-TR10A  
No.  
Names  
Output LED  
Output contact  
Output common terminal  
External Power Supply Terminal (DC24V)  
Expansion cable  
Expansion Cable Connecting Terminal  
4 -8  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
4.2.3 8points I/O Module  
1) G7E-DC08A  
No.  
Names  
Input LED  
Input contact  
Input common terminal  
Expansion cable  
Expansion Cable Connecting Terminal  
2) G7E-RY08A  
No.  
Names  
Output LED  
Output contact  
Output common terminal  
Expansion cable  
Expansion Cable Connecting Terminal  
4 -9  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
4.3 Special Module  
4.3.1 A/D·D/A Combination Module  
1) G7F-ADHA  
Names  
No.  
RUN LED  
Analog Output Terminal  
Analog Input (Voltage/current) selecting jumper pin  
Analog Input Terminal  
External Power Supply Terminal (DC24V)  
Expansion Cable  
Expansion Cable Connecting Terminal  
2) G7F-ADHB  
Names  
No.  
RUN LED  
Analog Input Terminal  
Analog Output Terminal  
External Power Supply Terminal (DC24V)  
Expansion Cable  
Expansion Cable Connecting Terminal  
4 -10  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
4.3.2 D/A Conversion Module  
1) G7F-DA2I  
Names  
No.  
RUN LED  
Analog Output Terminal  
Expansion Cable  
Expansion Cable Connecting Terminal  
External Power Supply Terminal (DC24V)  
2) G7F-DA2V  
Names  
No.  
RUN LED  
Analog Output Terminal  
Expansion Cable  
Expansion Cable Connecting Terminal  
External Power Supply Terminal (DC24V)  
4.3.3 A/D Conversion Module  
No. Names  
24V 24G  
RUN LED  
Input  
Analog Input Terminal  
Analog Input (Voltage/current) selecting jumper  
pin  
Input  
Select  
CH0  
CH1  
CH2  
CH3  
V3 COM  
CH3  
CH2  
CH1  
CH0  
V0 COM V1 COM V2 COM  
I0  
I1  
I2  
I3  
External Power Supply Terminal (DC24V)  
·
·
·
·
Expansion Cable  
Expansion Cable Connecting Terminal  
4 -11  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
4.3.4 Analog timer Module  
Names  
No.  
RUN LED  
Analog Timer Volume Control Resistor  
Expansion Cable  
Expansion Cable Connecting Terminal  
4.3.5 RTD Input Module  
Names  
No.  
RUN LED  
Analog Timer Volume Control Resistor  
Expansion Cable  
Expansion Cable Connecting Terminal  
4 -12  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
4.4 Communication I/F Module  
4.4.1 Cnet I/F Module  
1) G7L-CUEB  
No.  
Names  
RS-232C connector  
Communication status LED  
Expansion cable  
Expansion cable connecting terminal  
TM/TC selecting dip switch  
2) G7L-CUEC  
No.  
Names  
RS-422/485 connector  
Power supply/Communication status LED  
Expansion cable  
Expansion cable connecting terminal  
4.4.2 Fnet I/F Module  
1) G7L-FUEA  
No.  
Names  
Station No. selecting switch  
Fnet cable connector 1 and 2  
Expansion cable  
Expansion cable connecting terminal  
Communication status LED  
4 -13  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4 Names of Parts  
4.4.3 Pnet I/F Module  
1) G7L-PBEA  
No.  
Names  
Station No. selecting switch  
Pnet cable connector  
Expansion cable  
Expansion cable connecting terminal  
Communication status LED  
4.4.4 DeviceNet I/F Module  
1) G7L-DBEA  
No.  
Names  
Station No. selecting switch(NA)  
DeviceNet cable connector  
Expansion cable  
Expansion cable connecting terminal  
Baud rate selecting switch  
Power supply/Communication status LED  
4.5 Option Module  
Option modules are attached the expansion slot of main unit or expansion unit, and supplies optional functions such as  
memory expansion or real time clock. MASTER-K120S series have two option modules – External memory module and RTC  
module.  
No.  
Names  
Option module  
Connector  
4 -14  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
Chapter 5. Power Supply / CPU  
5.1 Power Supply Specifications  
5.1.1. Standard Type  
Items  
K7M –  
DR/DRT/DT20U  
K7M –  
DR/DRT/DT30U  
K7M –  
K7M –  
DR/DRT/DT40U DR/DRT/DT60U  
Rated voltage  
Rated frequency  
Rated current  
Inrush current  
Efficiency  
85 ~ 264 VAC  
50 / 60 Hz (47 ~ 63 Hz)  
0.5A(110VAC)/0.25A(220VAC)  
Up to 30A  
0.6A(110VAC)/0.3A(220VAC)  
Up to 60A  
Input  
65% min.(rated input/maximum load)  
2A/AC250V (Time Lag Type)  
10 ms  
Input fuse  
Permitted Momentary  
power failure  
Output voltage  
Output current  
Output voltage  
Output current  
DC 5V  
Output(1)  
Output(2)  
1.2A  
2A  
DC 24V  
0.2A  
Power supply status indication  
5.1.2. Economic Type  
Items  
PWR LED On when power supply is normal  
K7M – DR10UE  
K7M – DR14UE  
K7M – DR20UE  
K7M – DR30UE  
Rated voltage  
Rated frequency  
Rated current  
85 ~ 264 VAC  
50 / 60 Hz (47 ~ 63 Hz)  
0.3A(110VAC) / 0.15A(220VAC)  
Up to 30A  
0.5A(110VAC) / 0.25A(220VAC)  
Inrush current  
Efficiency  
Input  
65% min.(rated input/maximum load)  
2A/AC250V (Time Lag Type)  
10 ms  
Input fuse  
Permitted Momentary  
power failure  
Output voltage  
Output current  
Output voltage  
Output current  
DC 5V  
Output(1)  
Output(2)  
0.5A  
1.2A  
DC 24V  
0.2A  
Power supply status indication  
PWR LED On when power supply is normal  
5-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.2 CPU Specifications  
The following table shows the general specifications of the MASTER-K120S series  
5.2.1. Standard Type  
Specifications  
Items  
Remarks  
K7M-DR/DRT/DT20U  
K7M-DR/DRT/DT30U  
K7M-DR/DRT/DT40U K7M-DR/DR`T/DT60U  
Program control method Cyclic execution of stored program, Time-driven interrupt, Process-driven interrupt  
I/O control method  
Program language  
Indirect mode(Refresh method), Direct by program command  
Instruction list, Ladder diagram  
Numbers of instructions Basic : 30, Application : 277  
Processing speed  
0.1µs/step  
10ksteps  
Program capacity  
I/O points  
20  
30  
40  
60  
P
M
K
L
P000 ~ P63F  
M000 ~ M191F  
K000 ~ K31F  
L000 ~ L63F  
F000 ~ F63F  
I/O relay,TR.  
Auxiliary relay  
Keep relay  
Link relay  
F
Special relay  
100msec : T000 ~ T191 (192 points)  
10msec : T192 ~ T250 (59 points)  
1msec : T251 ~ T255 (5 points)  
-. Adjustable by parameter setting  
C000 ~ C255  
Memory  
device  
T
Timer  
C
S
D
Counter  
S00.00 ~ S99.99  
Step controller  
Data register  
D0000 ~ D4999  
Operation modes  
RUN, STOP, PAUSE, DEBUG  
Self-diagnosis functions Detects errors of scan time, memory, I/O and power supply  
Data back-up method  
Max. expansion level  
Latch area back-up  
Up to 3 level  
(External memory or RTC module can be connected as 4th expansion module)  
5-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
(continued)  
Specifications  
Items  
Remarks  
K7M-DR/DRT/DT20U  
K7M-DR/DRT/DT30U  
K7M-DR/DRT/DT40U K7M-DR/DRT/DT60U  
Controlled by commands, Relay and PRC auto tuning,  
PWM output, manual output, adjustable operation scan time,  
Anti-windup, SV-Ramp, Delta MV, Position and Velocity algorithm  
Dedicated protocol support  
PID control function  
MODBUS protocol support  
User defined protocol support  
No protocol support  
RS-232C - 1port  
RS-485 - 1 port  
Cnet I/F Function  
Capacity  
1 phase : 100 kHz-2 channel, 20 kHz-2 channel  
2 phase : 50 kHz-1 channel, 10 kHz-1 channel  
4 different counter modes as following;  
-. 1 phase operation mode.  
High-  
speed  
counter  
Counter function  
-. 2 phase CW/CCW mode.  
-. 2 phase Pulse + Direction mode.  
-. 2 phase Multiplication mode(MUL4)  
Internal/External preset function  
Additional  
function  
Latch Counter function  
Built-in  
RPM function  
Function  
Comparison Output function  
N0. of control axis : 2 Axis  
Operation  
Control method : Point-to-Point, Speed Control  
Control unit : Pulse  
Specification  
Positioning data : 20 data / axis(Operation step N0. 1 ~ 20)  
Positioning method : Absolute / Incremental  
Operation method : Single / Repeat  
Operation mode : End / Keep / Continuous  
Address range : -2,147,483,648 ~ 2,147,483,647  
Speed : Max. 100kpps(setting range 5 ~ 100,000)  
Acceleration / Deceleration method : trapezoidal method  
Origin detection when approximate origin turns off  
Position-  
ing  
DRT / DT  
Positioning  
Type Only  
Return to Origin Origin detection after deceleration when approximate origin turns on.  
Origin detection by approximate origin.  
JOG  
Pulse catch  
Setting range : 5~100,000 ( High / Low speed)  
Minimum pulse width : 10 ( 2 points) and 50 (6 points)  
10 (2 points) and 50 (6 points)  
External interrupt  
Input filter  
0~1000ms(Adjustable)  
Weight (g)  
520  
540  
660  
850  
5-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.2.2. Economic Type  
Specifications  
K7M-DR14UE K7M-DR20UE  
Program control method Cyclic execution of stored program, Time-driven interrupt, Process-driven interrupt  
Items  
Remarks  
K7M-DR10UE  
K7M-DR30UE  
I/O control method  
Program language  
Indirect mode(Refresh method), Direct by program command  
Instruction list, Ladder diagram  
Numbers of instructions Basic : 30, Application : 269  
Processing speed  
0.4µs/step  
2ksteps  
Program capacity  
I/O points  
10  
14  
20  
30  
P
M
K
L
P000 ~ P63F  
M000 ~ M191F  
K000 ~ K31F  
L000 ~ L63F  
F000 ~ F63F  
I/O relay  
Auxiliary relay  
Keep relay  
Link relay  
F
Special relay  
100msec : T000 ~ T191 (192 points)  
10msec : T192 ~ T250 (59 points)  
1msec : T251 ~ T255 (5 points)  
-. Adjustable by parameter setting  
C000 ~ C255  
Memory  
device  
T
Timer  
C
S
D
Counter  
S00.00 ~ S99.99  
Step controller  
Data register  
D0000 ~ D4999  
Operation modes  
RUN, STOP, PAUSE  
Self-diagnosis functions Detects errors of scan time, memory, I/O and power supply  
Data back-up method  
Max. expansion level  
Latch area back-up  
Up to 2 level  
(External memory or RTC module can be connected as 3th expansion module)  
5-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
(continued)  
Specifications  
Items  
Remarks  
K7M-DR10UE  
K7M-DR14UE K7M-DR20UE K7M-DR30UE  
Dedicated protocol support  
MODBUS protocol support  
RS-485 is available  
on K7M-DR10/14UE  
only  
RS-232C - 1port  
Cnet I/F Function  
Capacity  
User defined protocol support RS-485 - 1 port  
No protocol support  
1 phase : 10 kHz-2 channel  
2 phase : 5 kHz-1 channel  
4 different counter modes as following;  
-. 1 phase operation mode.  
-. 2 phase CW/CCW mode.  
-. 1 phase Pulse + Direction mode.  
-. 2 phase Multiplication mode(MUL4)  
Internal/External preset function  
Latch Counter function  
Counter  
Built-in  
High-speed  
counter  
function  
Function  
Additional  
function  
RPM function  
Comparison Output function  
Minimum pulse width : 50 (4 points)  
50 (4 points)  
Pulse catch  
External interrupt  
Input filter  
0 ~ 1000ms(Adjustable)  
Weight (g)  
360  
370  
500  
510  
5-5  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.3 Operation Processing  
5.3.1 Operation Processing Method  
1) Cyclic operation  
A PLC program is sequentially executed from the first step to the last step, which is called scan. This sequential  
processing is called cyclic operation. Cyclic operation of the PLC continues as long as conditions do not change  
for interrupt processing during program execution. This processing is classified into the following stages:  
Stages  
Processing  
-
Operation Start  
• Stage for the start of a scan processing. it is executed only one  
time when the power is applied or reset is executed. It executes  
the following processing..  
Initialization  
I/O reset  
Execution of self-diagnosis  
Data clear  
Allocating I/O address and type  
Input conditions are read and stored into the input image area  
before starts processing.  
Input image area refresh  
Program is sequentially executed from the first step to the last step  
Program operation processing  
Program operation processing  
Program starts  
~
Program ends  
The contents stored in the output image area is output to output part  
when operation processing of a program is finished.  
Output image area refresh  
END processing  
Stage for return processing after the CPU part has finished 1 scan.  
The END processing following processing is executed.  
Self-diagnosis  
Change the present values of timer and counter, etc.  
Processing data communications between computer link module  
and communications module.  
Checking the switch for mode setting.  
5-6  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
2) Interrupt operation method  
If a situation occurs which is requested to be urgently processed during execution of a PLC program, this opera  
tion method processes immediately the operation, which corresponds to interrupt program. The signal, which infor  
ms the CPU of those urgent conditions is called interrupt signal. The MASTER-K120S CPU has three kind of int  
errupt operation methods, which are internal, external and high speed counter interrupt signal methods.  
5.3.2 Operation Processing at Momentary Power Failure Occurrence  
The momentary power failure occurs when the input line voltage to the power supply falls down below the rated  
voltage. When momentary power failure within 10ms occurs, the CPU maintain operation processing. But If is exceeds  
10ms, CPU stop processing and all output turns off. And The re-start process is executed as the power is re-applied.  
1) Momentary power failure within 10 ms  
The operation processing is maintained  
Input power  
Momentary power failure  
within 1Oms  
2) Momentary power failure exceeding 10 ms  
The re-start process is executed as the power is re-applied.  
Input power  
Power failure exceeding 1Oms  
REMARK  
1) Momentary power failure  
The PLC defining power failure is a state that the voltage of power has been lowered outside the allowable  
variation range of it. The momentary power failure is a power failure of short interval (several to tens ms).  
5-7  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.3.3 Scan Time  
The processing time from a 0 step to the 0 step of next scan is called scan time.  
1) Expression for scan time  
Scan time is the sum of the processing time of scan program that the user has written, of the task program processing time  
and the PLC internal processing time.  
(1) Scan time = Scan program processing time + Interrupt program processing time + PLC internal processing time  
• Scan program processing time = The processing time used to process a user program that is not specified  
to a task program.  
• Interrupt program processing time = Total of the processing times of interrupt programs executed during  
one scan.  
• PLC internal processing time = Self-diagnosis time + I/O refresh time + Internal data processing time  
+ Communications service processing time  
(2) Scan time differs in accordance with the execution or non-execution of interrupt programs and communications  
processing, etc.  
2) Flags  
Scan time is stored in the following system flag area.  
• F50 : Maximum scan time (unit: 1 ms)  
• F51 : Minimum scan time (unit: 1 ms)  
• F52 : Current scan time (unit: 1 ms)  
5.3.4 Scan Watchdog Timer  
1) Watchdog timer is used to detect a delay which is attributable to abnormal operation of sequence program  
(Watchdog time is set in menu of basic parameter of KGLWIN.)  
2) When watchdog timer detects an exceeding of preset watchdog time, the operation of PLC is stopped immediately  
and all output is off.  
3) If an exceeding of preset watchdog time is expected in sequence program, use ‘WDT’ instruction.  
‘WDT’ instruction make elapsed watchdog time as zero.  
4) In order to clear watchdog error, restarting the PLC or mode change to STOP mode are available.  
REMARK  
-. Setting range of watchdog : 10 ~ 6,000ms(unit : 10ms)  
5-8  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.3.5 Timer Processing  
The MASTER-K series use up count timer. There are 5 timer instructions such as on-delay (TON), off-delay (TOFF), integral  
(TMR), monostable (TMON), and re-triggerable (TRTG) timer.  
The measuring range of 100msec timer is 0.1 ~ 6553.5 seconds, 10msec timer is 0.01 ~ 655.35 seconds, and that of 1msec  
timer is 0.001 ~ 65.53 seconds. Please refer to the ‘MASTER-K programming manual’ for details.  
Preset value  
Timer output relay  
Timer type  
1) On delay timer  
The current value of timer starts to increase from 0 when the input condition of TON instruction turns on. When the  
current value reaches the preset value, the timer output relay turns on.  
When the timer input condition is turned off, the current value becomes 0 and the timer output relay is turned off.  
input condition  
t0  
t1  
t2 t3  
t4  
t5  
Output relay  
Pre value  
t0+PT  
t4+PT  
t5  
Current value  
t0  
t1  
t2  
t3  
t4  
t5  
2) Off delay timer  
The current value of timer set as preset value and the timer output relay is turned on when the input condition of TOFF  
instruction turns on. When the input condition is turned off, the current value starts to decrease. The timer output relay is  
turned off when the current value reaches 0.  
Timer input condition  
t3  
t2  
t4  
t5  
t0  
t1  
Timer output relay  
Preset value  
t1 + PT  
t5 + PT  
PT  
PT  
Current value  
5-9  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
3) Integral timer  
In general, its operation is same as on-delay timer. Only the difference is the current value will not be clear when the  
input condition of TMR instruction is turned off. It keeps the elapsed value and restart to increase when the input  
condition is turned on again. When the current value reaches preset value, the timer output relay is turned on.  
The current value can be cleared by the RST instruction only.  
Timer input condition  
t5  
t0 t1  
t2  
t4  
Timer output relay  
Preset value  
PT = (t1-t0)+(t3-t2)  
Current value  
t2 t3  
t0  
t1  
t5  
t5+PT  
Timer reset input  
4) Monostable timer  
In general, its operation is same as off-delay timer. However, the change of input condition is ignored while the timer is  
operating (decreasing). When current value reaches preset value the timer output relay is turned off and current value is  
cleared.  
Timer input condition  
t0  
t0  
t2  
t2  
t4  
t4  
t3  
t1  
Timer output relay  
Preset value  
t0+PT  
t2+PT  
t4+PT  
Current value  
t4  
t0  
t1  
t2  
5-10  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5) Retriggerable timer  
The operation of retriggerable timer is same as that of monostable timer. Only difference is that the retriggerable timer is  
not ignore the input condition of TRTG instruction while the timer is operating (decreasing). The current value of  
retriggerable timer will be set as preset value whenever the input condition of TRTG instruction is turned on.  
Timer input condition  
PT  
Timer output relay  
Preset value (PV)  
(On operation)  
Current value  
REMARK  
The Maximum timing error of timers of MASTER-K series is ‘1 scan time + the time from 0 step to timer instruction’  
5-11  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.3.6 Counter Processing  
The counter counts the rising edges of pulses driving its input signal and counts once only when the input signal is switched  
from off to on. MASTER-K series have 4 counter instructions such as CTU, CTD, CTUD, and CTR. The followings shows  
brief information for counter operation. Refer to the ‘MASTER-K Instruction Manual’ for details.  
1) Up counter (CTU)  
-. The counter output relay is turned on when the current value reaches the preset value.  
-. When the reset input is turned on, the counter output relay and current value is cleared as 0.  
2) Down counter (CTD)  
-. When the CPU is switched to the RUN mode, the current value is set as preset value.  
-. The current value is decreased by 1 with the rising edge of counter input signal.  
-. The counter output relay is turned on when the current value reaches 0.  
3) Up-down counter  
-. The current value is increased with the rising edge of up-count input signal, and decreased with the rising edge of  
down-count input signal.  
-. The counter output relay is turned on when the current value is equal or greater than the preset value otherwise off.  
5-12  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
4) Ring counter  
-. The current value is increased with the rising edge of the counter input signal, and the counter output relay is turned on  
when the current value reaches the preset value. Then the current value and counter output relay is cleared as 0 when  
the next counter input signal is applied.  
5) Maximum counting speed  
(1) The maximum counting speed of counter is determined by the length of scan time. Counting is possible only when the  
on/off switching time of the counter input signal is longer than scan time.  
n
1
where, n : duty (%), ts : scan time  
Maximum counting speed (Cmax) =  
×
(times/sec)  
100  
t
s
(2) Duty  
Duty is the ratio of the input signal’s on time to off time as a percentage.  
T1  
T2  
OFF  
ON  
OFF  
T1  
If T1 T2, n =  
×100 (%)  
T1+ T2  
T2  
If T1 > T2, n =  
×100 (%)  
T1+ T2  
5-13  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.4 Program  
5.4.1 Classifications of Program  
All functional elements need to execute a certain control process are called as a ‘program’. In MASTER-K120 series, a  
program is stored in the EEPROM mounted on a CPU module or flash memory of a external memory module. The following  
table shows the classification of the program.  
Program type  
Scan program  
Description  
The scan program is executed regularly in every scan  
Time-driven interrupt  
program (TDI)  
The TDI programs are executed with a constant time interval specified with parameter setting.  
Process driven interrupt  
program (PDI)  
The PDI programs are executed when external interrupt input is applied and the corresponding  
interrupt routine is enabled by EI instruction.  
High speed counter driven This interrupt programs are executed when comparison task signal is applied.  
interrupt program(HSCDI)  
(Standard Type only)  
The subroutine programs are executed when they are called by the scan program with a CALL  
instruction.  
Subroutine program  
5.4.2 Program Execution Procedure  
The following diagram shows that how the CPU module process programs when the CPU module is powered on or switched to  
RUN mode.  
Start processing  
Subroutine program  
PDI program  
Scan program  
TDI program  
HSCDI program  
END processing  
5-14  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
1) Scan program  
-. The scan program is executed regularly in every scan from 0 step to last step.  
-. When interrupts has occurred, CPU pauses scan program and executes corresponding interrupt program first.  
-. When this interrupt program finished, scan program is to resume.  
2) Interrupt program  
-. When an interrupt occurs, the CPU module will stop the current operation and execute the corresponding interrupt routine  
first. After finish the interrupt routine, the CPU resume the sequence program from the stopped step.  
-. MASTER-K102S series provides 3 types of interrupt.  
The TDI (Time driven interrupt) occurs with the constant period  
The PDI (Process driven interrupt) occurs with the status of external input.  
The HSCDI(High speed counter driven interrupt) occur with comparison task signal from high speed counter.  
(Standard type only)  
5.4.3 Interrupt Programs  
1) Usage of interrupt program  
(1) Before to use interrupt function in sequence program, the parameter setting should be done properly. Then the  
corresponding interrupt routine should be written after END instruction. (Refer chapter 4 for details) If interrupt routines  
are not matched with parameter settings, an error occurs and the operation of CPU will be stopped.  
(2) To execute an interrupt routine, use the EI instruction to enable the corresponding interrupt. The interrupt routine is not  
executed if an interrupt factor occurs before execution of an EI instruction. Once an interrupt is enabled with EI  
instruction.  
(3) When multiple interrupt factors occur simultaneously, interrupt routines are executed according to the priority given to  
the each interrupt. If an interrupt factor that has higher priority occurs while other interrupt that has lower priority are  
executing, the interrupt routine of lower priority will be stopped and the interrupt of higher priority will be executed first.  
Following figure show how CPU handles multiple interrupts  
1
Program starts  
1
Scan Program  
2
2
Interrupt 2 occurs  
7
3
Stop main program and execute interrupt routine 2  
4
5
Interrupt 1 occurs (higher priority)  
Stop routine 2 and run routine 1  
5
6
Interrupt routine 1  
Interrupt routine 2  
3
6
7
Finish routine 1 and return to routine2  
Finish routine 2 and return to main program  
4
5-15  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
2) parameter setting  
3) Time driven interrupt  
TDI occurs periodically with the constant interval assigned in parameter setting. The interrupt routine of TDI starts with the  
TDINT instruction and ends with the IRET instruction.  
When multiple interrupt factors occur simultaneously, interrupt routines are executed according to the priority given to the  
each interrupt. If an interrupt factor has higher priority occurs while other interrupt of lower priority is executing, the interrupt  
routine of lower priority will be stopped and the interrupt of higher priority will be executed first. In standard types of MK120S  
series, Available TDI is P000 ~ P007 (8 points) assigned in parameter setting and period can be designated for each other.  
In economic types, Available TDI is P000 ~ P003 (4 points) .  
4) Process driven interrupt  
In standard types of MK120S series, Available PDI is P000 ~ P007 (8 points) assigned in parameter setting.  
In the parameter setting window, TDINT indicates time driven interrupt and INT indicates process driven interrupt.  
PDI occurs when the input status of P000 ~ P007 is changed from Off to On or from On to Off or both.  
In economic types of MK120S series, Available PDI is P000 ~ P003 (4 points), and occurs when the input status of P000 ~  
P003 is changed from Off to On. It isn’t occurs falling edge of input condition.  
5) HSC driven interrupt  
HSCDI occurs when comparison task of HSC occurs and Available HSCDI is Ch0 ~ Ch4 (4 points) .  
5-16  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
REMARK  
Total available interrupt points is 8(In standard type).  
-. Time driven interrupt + process driven interrupt + high speed counter driven interrupt  
8 points  
Interrupt signal is ignored when self-interrupt occurs more than 2 times during interrupt processing is executing.  
ignored  
Interrupt executing time  
Interrupt signal (ex : rising edge)  
5.4.4 Error Handling  
1) Error Classification  
Errors occur due to various causes such as PLC system defect, system configuration fault or abnormal operation  
result. Errors are classified into fatal error mode, which stops system operation for system stability, and ordinary  
error mode, which continues system operation with informing the user of its error warning.  
The main factors that occurs the PLC system error are given as followings.  
PLC hardware defect  
System configuration error  
Operation error during execution of the user programs  
External device malfunction  
2) Operation mode at error occurrence  
In case of error occurrence, the PLC system write the error contents the corresponding flags and stops or conti  
nues its operation complying with its operation mode.  
(1) PLC hardware defect  
The system enters into the STOP state if a fatal error such as the CPU module defect has occurred, and  
continues its operation if an ordinary error such as operation error has occurred.  
(2) System configuration error  
This error occurs when the PLC hardware configuration differs from the configuration defined in the  
K120S series. The system enters into the STOP state.  
(3) Operation error during execution of the user programs  
It the numeric operation error of these errors occurs during execution of the user program, its contents are  
marked on the error flags and the system continues its operation. If operation time overruns the watchdog  
time or I/O modules loaded are not normally controlled, the system enters into the STOP state.  
5-17  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
(4) External device malfunction  
The PLC user program detects malfunctions of external devices. If a fatal error is detected the system ent  
ers into the STOP state, and if an ordinary error is detected the system continues its operation.  
REMARK  
1) In occurrence of a error, the state is to be stored in the representative system error flag F006.  
2) For details of flags, refer to Chapter 11. Troubleshooting.  
5-18  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.5 Operation Modes  
The CPU operates in one of the four modes - RUN, STOP, PAUSE and DEBUG mode. The following describes ope  
ration processing in each operation mode.  
5.5.1 RUN Mode  
In this mode, programs are normally operated.  
The first scan start in the RUN mode  
Initialize data area according to the preset  
restart mode.  
Check the program and determine it can be  
executed or not.  
Execute input refresh  
Execute programs and tasks  
Check the availability of expansion units  
Execute communication and internal service  
Execute output refresh  
No  
Operation mode is changed?  
Yes  
Operate with new mode  
1) Processing when the operation mode is changed.  
Initialization of data area is executed when the first scan starts and The possibility of execution of the program  
is decided with check on its effectiveness.  
2) Operation processing contents  
I/O Refresh and program operation are executed.  
(1) Interrupt programs are executed with the detection of their start-up conditions.  
(2) Normal or abnormal operation and mounting conditions of the loaded module are checked.  
(3) Communications service or other internal operations are processed.  
5-19  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.5.2 STOP mode  
In this mode, programs are not operated.  
1) Processing when the operation mode is changed.  
The output image area is cleared and output refresh is executed.  
2) Operation processing contents  
(1) I/O refresh is executed.  
(2) Normal or abnormal operation and mounting conditions of the loaded module are checked.  
(3) Communications service or other internal operations are processed.  
5.5.3 PAUSE mode  
In this mode, the program operation is temporarily stopped. If it returns to the RUN mode, the operation continu  
es from the state before the stop.  
1) Processing when the operation mode changes  
Data registers and input image areas are not cleared and the operating conditions just before the mode chang  
e is maintained.  
2) Operation processing contents  
(1) I/O refresh is executed.  
(2) Normal or abnormal operation and mounting conditions of the loaded module are checked.  
(3) Communications service or other internal operations are processed.  
5.5.4 DEBUG mode(Standard type only)  
In this mode, errors of a program are searched and the operation sequence is traced. Changing into this mode  
is only possible from the STOP mode. In this mode, a program can be checked with examination on its executi  
on state and contents of each data.  
1) Processing when the operation mode changes  
(1) Data area is initialized at the starting time of the mode change complying with the restart mode, which  
has been set on the parameters.  
(2) The output image area is cleared and input refresh is executed.  
2) Operation processing contents  
(1) I/O refresh is executed.  
(2) Debugging process is executed complying with setting.  
I
(3) I/O refresh is executed after debugging process has executed to end of the program  
(4) Normal or abnormal operation and mounting conditions of the loaded module are checked.  
(5) Communications service or other internal operations are processed  
5-20  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
3) Debug operation conditions  
following four operation conditions can be specified.  
Operation conditions  
executed by one  
command.  
Description  
When executed, Stop operation after executing one instruction  
executed by break-point  
settings.  
When executed, Stop operation at designated break-point  
executed by the  
When executed, Stop operation by condition of designated device’s status  
condition of the device  
executed by the  
When executed, Operates specified scan time.  
specified scan time  
4) Operation method  
(1) Execute the operation after the debug operation conditions have been set in the KGLWIN.  
(2) In interrupt programs, each task can be specified to operation enable/disable.  
For detailed operation method, refer to the KGLWIN User’s Manual Chapter 9.  
5.5.5 Operation Mode Change  
1) Operation mode change methods  
The following method is used to change the operation mode.  
(1) Change by the mode-setting switch of CPU module.(Standard type only)  
(2) Change by the KGLWIN connected with the CPU module communications port.  
(3) Change by the KGLWIN connected to the remote CPU module through Cnet I/F  
(4) Change by the ‘STOP’ instruction, during program execution.  
(5) Change by the KGLWIN connected to the remote CPU module through Fnet(Standard type only)  
2) Operation mode change by the mode-setting switch of CPU module.(Standard type only)  
The following shows the operation mode change by the mode-setting switch of CPU module.  
Mode setting switch position  
Operation mode  
Local RUN  
RUN  
STOP  
Local STOP  
Remote STOP  
Local RUN  
STOP  
PAU / REM  
RUN 1  
PAU / REM * 2  
STOP  
PAU / REM  
RUN  
Local PAUSE  
Local STOP  
PAU / REM  
REMARK  
-. If the operation mode changes from RUN mode to local RUN mode by the mode setting switch, the  
PLC operates continuously without stopping.  
5-21  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
3) Mode change Remote operation  
Remote operation mode change is available only when the operation mode is set to the remote STOP mode  
(i.e., the mode setting switch position is in the STOPPAU/REM’).  
Mode setting switch  
position  
Mode change by the  
KGLWIN  
Mode change using  
FAM or Cnet I/F, etc.  
Mode Change  
Remote STOP Æ Remote RUN  
Remote STOP Æ Remote PAUSE  
Remote STOP Æ DEBUG  
X
X
Remote RUN Æ Remote PAUSE  
Remote RUN Æ Remote STOP  
Remote RUN Æ DEBUG  
X
X
PAU / REM  
Remote PAUSE Æ Remote RUN  
Remote PAUSE Æ Remote STOP  
Remote PAUSE Æ Remote DEBUG  
DEBUG Æ Remote STOP  
X
X
DEBUG Æ Remote RUN  
X
X
X
X
DEBUG Æ Remote PAUSE  
5-22  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.6 Functions  
5.6.1 Self-diagnosis  
1) Functions  
(1) The self-diagnosis function permits the CPU module to detect its own errors.  
(2) Self-diagnosis is carried out when an error occurs during PLC power supply is turned on or operating process.  
If an error is detected, the system stops operation to prevent faulty PLC operation.  
2) WDT (Watch dog timer) function  
The watch dog timer is an internal timer of a PLC to detect the error of hardware and a sequence program. it is  
changeable with parameter setting.  
The CPU resets the watch dog timer before step 0 is executed (after the END processing is finished). When the END  
instruction has not been executed within the set value due to an error occurred in the PLC or the delay of a sequence  
program, the watch dog timer will times out. When a watch dog timer error is occurred, all outputs of the PLC are turned  
OFF, and the ERR LED of the CPU will flickers. (RUN LED will be turned OFF) Therefore, when use FOR ~ NEXT or  
CALL instruction, insert WDT instruction to reset the watch dog timer.  
Refer the MASTER-K programming manual for details on the parameter setting.  
0
WDT  
END  
0
END  
WDT Reset  
WDT Reset  
WDT Reset  
3) I/O module check function  
Mounting conditions of the loaded module are checked  
4) Error history  
When error occurs, Corresponding error code is stored in special relay F006.  
5-23  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.6.2 I/O Force On/Off function  
It is possible to input/output a designated data regardless of the program operation results. When used with OUTOFF  
instruction simultaneously, OUTOFF is prior to I/O Force On/Off.  
1) Forced I/O setting method.  
-. I/O Force on/off setting is applied to input area and output area.  
-. I/O Force on/off should be set for each input and output, the setting operates from the time that  
Force I/O setting enable’ is set.  
-. This setting can be done when I/O modules are not really loaded.  
-. Select the ’set forced I/O’ from KGLWIN  
Click  
-. Select the I/O area and then double click.  
5-24  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
Set ‘forced I/O data’ by bit  
Set ‘forced I/O data enable’ by bit  
-. When forced I/O set enables, forced I/O function is executing.  
Click  
5-25  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
2) Special data register for forced I/O  
The contents of forced I/O setting is registered to special data register as below.  
It is possible to use ‘forced I/O function’ to program.  
Items  
Special Device  
All Forced I/O enable  
Forced I/O enable by bit  
Forced I/O set data  
M1910  
D4700 ~ D4763  
D4800 ~ D4863  
3) Force on/ off Processing timing and method  
(1) Forced Input  
After data have been read from input modules, at the time of input refresh the data of the junctions which  
have been set to force on/off will be replaced with force setting data to change the input image area. And  
then, the user program will be executed with real input data and force setting data.  
(2) Forced output  
When a user program has finished its execution the output image area has the operation results. At the time  
of output refresh the data of the junctions which have been set to force on/off will be replaced with force se  
tting data and the replaced data will be output. However, the force on/off setting does not change the output  
image area data while it changes the input image area data.  
(3) Precautions  
y Turning the power off and on, changes of the operation mode or operation by reset switch does not change  
the previous force on/off setting data. They remain within the CPU module and operation is executed with  
the same data.  
y Forced I/O data will not be cleared even in the STOP mode.  
y When setting new data, disable every I/O settings using the setting data clear function and set the new data.  
REMARK  
-. For detailed operation, refer to the KGLWIN user’s Manual Chapter 7 ‘Force I/O setting.  
5-26  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.6.3 Direct I/O Operation function  
This function is useful when reads an input relay’s state directly during execution of a program and uses in the operation, or  
write the operation result directly to an output relay. Direct input/output is executed by the ‘IORF’ instruction. If this instruction is  
used, the input/output image area will be directly updated and applied to the continuing operations.  
REMARK  
-. For detailed operation, refer to the ‘MASTER-K Manual for instruction’.  
5.6.4 System error history  
When the system is stopped by error occurrence, the CPU stores the error occurrence time and error code to the special data  
register area. The most recent 16 error occurring times and error codes are stored in the special data register.  
1) Special data register for error history  
Data area  
Description  
The 1st error information,  
The 17th error information  
:
D4901 ~ D4904  
D4905 ~ D4908  
:
The 2nd error information  
:
Device  
D4961 ~ D4964  
The 16th error information  
2) Description of each word  
Data area  
Contents  
Description  
D4900  
D4901  
D4902  
D4903  
H0001  
H0305  
h2812  
h3030  
Error occurred point  
Year : 03, Month : 5  
Date : 28, Hour : 12  
Minute : 30, Second : 30  
D4904  
h0001  
Error code (h0001)  
3) Clear error data  
Use a ‘data clear’ function of KGLWIN.  
REMARK  
Refer to the KGLWIN user’s Manual Chapter 7, for details.  
5-27  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.7 Memory Configuration  
The CPU module includes two types of memory that are available by the user. One is program memory, which is  
used to store the user programs written to implement a system by the user. The other is data memory, which sto  
res data during operation.  
Bit Data Area  
Word Data Area  
User Program Area  
0
~
F
0000  
~
FFFF  
“D”  
P00  
D0000  
Parameter setting area  
I/O relay  
Data Register  
Word  
“P”  
P63  
M000  
D4500  
D4999  
Reserved for special usage  
Auxiliary relay  
(3,040 points)  
User Program Area  
(10ksteps)  
“M”  
M189  
M190  
T000  
(economic type : 2ksteps)  
Timer preset value  
(256 words)  
Special auxiliary relay  
(32 points)  
“M”  
“K”  
“F”  
“L”  
T255  
T000  
M191  
K00  
Keep relay  
Timer elapsed value  
(256 words)  
(512 points)  
K31  
F00  
T255  
C000  
Special relay  
(1,024 points)  
Counter preset value  
(256 words)  
F63  
L00  
C255  
C000  
Link relay  
Counter elapsed value  
(256 words)  
(1,024 points)  
C255  
L63  
T000  
S00  
S99  
StepController  
Timer (100ms)  
192 points  
(100 x 100 steps)  
“T”  
“T”  
T191  
T192  
“S”  
S00.00~S99.99  
Timer (10ms)  
59 points  
T250  
T251  
Timer (1ms)  
5 points  
“T”  
“C”  
T255  
C000  
Counter  
C255  
5-28  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.8 I/O Address Allocation  
I/O No. allocation means to give an address to each module in order to read data from input modules and output data to  
output modules.  
Max. 3 expansion module is available in standard type.  
Mounting module  
Expansion I/O module  
A/D, D/A conversion module  
Analog timer module  
Max. module can be mounted  
remark  
3
3
3
1
2 modules in economic type  
Not available on economic type  
Communication module  
1) I/O No. allocation method  
-. Basically, I/O allocation is fixed point method.(the area which is not used can be used internal relay)  
-. The special module is not allocated.  
Module  
Main  
I/O  
Allocation  
P000 ~ P03F  
P040 ~ P07F  
P080 ~ P08F  
P090 ~ P09F  
P100 ~ P10F  
P110 ~ P11F  
P120 ~ P12F  
P130 ~ P13F  
None  
Remark  
Fixed 64 points  
Fixed 64 points  
Fixed 16 points  
Fixed 16 points  
Fixed 16 points  
Fixed 16 points  
Fixed 16 points  
Fixed 16 points  
A/D,A/T,Communication  
Input  
Output  
Input  
Expansion #1  
Expansion #2  
Output  
Input  
Output  
Input  
Expansion #3  
Special  
Output  
5-29  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.9 Built-in Cnet Selection Switch  
5.9.1 Structure  
You can see dip switches as shown when you open I/O terminal block cover.  
BUILT_IN CNET  
OFF  
Terminal block cover  
ON  
ROM MODE  
5.9.2 Usage  
Dip switch position  
Description  
upper switch is for Cnet.  
Turn upper switch on to use built-in RS-232C communication  
OFF  
ROM MODE  
ON  
ON  
Upper switch is for Cnet.  
Turn upper off switch to use external communication modules.  
OFF  
ROM MODE  
*The lower switch is for O/S download setting. Dont handle this switch.  
5-30  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
Dip switch for Built-in Cnet is placed in deep place to prevent a mistaken operation caused by terminal block cover, etc. Use  
a small driver to operate it.  
Driver  
Dip switch  
Terminal block cover  
5-31  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.10 External Memory Module  
MK120S series supplies external memory module for the user to save programs safely or download a program on the  
system and use it in case of a program is damaged.  
5.10.1 Structure  
Installation connector  
5.10.2 Usage  
1) Saving the user’s program on the external memory module.  
(1) Turn the power of the base unit off.  
(2) Install the memory module.  
-. When only main unit is used : Connect to the expansion connector of the basic unit.  
-. When expansion units are used : Connect to the expansion connector of the last connected expansion unit.  
(3) Turn the power of the main unit on.  
(4) Connect KGLWIN and PLC.  
(5) Select Online –Read Information – I/O Information in menu, and the following message box will displayed  
5-32  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
(6) Select Online – Flash memory – Write to external memory in menu, and the following message box will displayed.  
(7) Turn the power of the main unit off.  
(8) Remove the external memory module.  
Through the above steps a user can save a program into the external memory module.  
2) Run the PLC with a program of external memory module  
(1) Turn the power of the main unit off.  
(2) Install the memory module  
- When only main unit is used, connect to the expansion connector of the main unit And when expansion unit is used,  
connect to the expansion connector of the last connected expansion unit.  
(3) Turn on the power of the main unit.  
Through the above steps the user can operate the PLC with program stored in the external memory module.  
REMARK  
1) When the PLC restarts, it always operated with the external memory module automatically if external memory is  
connected.  
2) Remove after writing is finished.  
5-33  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
5.11 RTC Module  
MK120S series supplies RTC(Real Time Clock) module for the time-scheduling control. To use RTC function with K120S series,  
the RTC operation module should be attached to the expansion slot of main unit or expansion module. Clock operation by the  
RTC function is continued with a super capacitor when the CPU is powered off.  
5.11.1 Structure  
Installation connector  
5.11.2 Usage  
1) Read RTC data  
(1) Read RTC data from KGLWIN  
-. Select Online –Write Information – Set PLC Clock in menu.  
-. Following message box will be displayed  
5-34  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 5 Power Supply / CPU  
(2) Read RTC data from special register  
Description  
Special register Area  
(Word)  
Data  
(BCD format)  
Upper byte  
Lower 2 digits of year  
Lower byte  
F053  
F054  
F055  
F056  
Month  
Hour  
Second  
H0207  
H2313  
H5020  
H2002  
Day  
Minute  
Higher 2 digits of year Date  
Example : 2002. 07. 23. 13:50:20, Tuesday  
2) Write RTC data  
There is two ways to write new RTC data to the CPU.  
The first one is using a graphic loader (KGLWIN). For detailed information, refer the user’s manual of KGLWIN.  
The second one is write sequence program. By switching a special bit on, user can replace the current RTC data with the  
reset data stored in a specified memory area. The followings are the memory address of preset data and an example  
program.  
Description  
Data register Area  
(Word)  
Data  
(BCD format)  
Upper byte  
Lower byte  
D4993  
D4994  
D4995  
D4996  
Lower 2 digits of year  
Month  
Hour  
H0207  
H1011  
h5324  
H2001  
Day  
Minute  
Second  
Higher 2 digits of year Date  
Example : 2002. 7. 10. 11:53:24, Monday  
* M1904 : RTC data change bit  
When the M1904 bit is switched on, the new data in D4993 ~ D4996 will be moved to F53 ~ F56. After data is  
moved, M1904 has to be switched off immediately because current data will be updated every scan while  
M1904 is on.  
3) Date expression  
Number  
Date  
0
1
2
3
4
5
6
Sunday Monday Tuesday Wednesday Thursday  
Friday  
Saturday  
REMARK  
1) If RTC stops or error occurs, write new data to the RTC then error is called off.  
2) There is no written clock data in the RTC when shipped.  
3) Before using RTC module, write clock data to the RTC first  
5-35  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 6 Input and Output Specification  
Chapter 6 Input and Output Specification  
6.1 Input / Output Specifications  
Digital input that offers to MASTER-K120S series are made to use both of electric current sink and electric current source.  
To keep use coil load as an output module, maximum opening and shutting frequency is 1 second on and 1 second off.  
The following diagram shows maximum life relay for relay output.  
100  
×
50  
30  
20  
10  
AC 125V r/load  
DC 30V r/load  
AC 250V r/load  
0.5  
5
10  
1
2
3
100(A)  
Opening/shutting of electric current  
6-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 6 Input and Output Specification  
6.2 Digital Input Specification  
6.2.1 Main unit  
1) Specification  
Model  
Main unit  
K7M-  
K7M-  
K7M-  
K7M-  
K7M-DR10UE  
K7M-DR14UE  
DR/DRT/DT20U DR/DRT/DT30U DR/DRT/DT40U DR/DRT/DT60U  
Specification  
K7M-DR20UE  
12 points  
K7M-DR30UE  
18 points  
K7M-DRT40U  
24 points  
K7M-DRT60U  
36 points  
Number of input points  
Insulation method  
6 points  
8 points  
Photo coupler  
DC 24V  
Rated input voltage  
Rated input current  
Operating voltage range  
7 mA (Standard Type P0~P3:9mA, Economic Type P0,P1:9mA)  
DC20.4 ~ 28.8V (ripple: less than 5%)  
Max. simultaneous input points 100% simultaneously On  
On voltage / On current  
Off voltage / Off current  
Input impedance  
DC19V or higher / 5.7 mA or higher  
DC6V or lower / 1.8 mA or lower  
Approx.3.3 k(Standard Type P0~P3:2.7 k, Economic Type P0,P1:2.7 k)  
0,1,2,5,10,20,50,100,200,500,1000ms (Default : 10ms)  
Off On  
On Off  
Response time  
0,1,2,5,10,20,50,100,200,500,1000ms (Default : 10ms)  
Common terminal  
Operating indicator  
6 points / COM 8 points/COM 12 points/COM 18 points/ COM 12points/COM 18points/COM  
LED turns on at ON state of input  
2) Circuit diagram  
R
Internal  
circuit  
Standard Type  
Economic Type  
P000 ~ P001  
None  
R C  
COM  
Standard Type  
Economic Type  
P002 ~  
P000 ~  
R
Internal  
circuit  
R
COM  
6-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 6 Input and Output Specification  
3) Input wiring  
Main unit’s wiring method is as follows. DC input specifications offered by MASTER-K120S is to be used for both electric  
current sink and electric current source.  
(1) Main unit  
DC24V  
DC24V  
6-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 6 Input and Output Specification  
4) Example of external devices.  
To connect with external device of DC output type into DC input module, wire depending on the type of the external device  
as shown.  
External device  
Input  
Relay  
IN  
7mA  
COM  
Power for  
sensor  
Sensor  
+
Output  
IN  
7mA  
0V  
COM +  
Same power for sensor  
and input  
+
Constant  
] current  
Output  
IN  
0V  
7mA  
Power for  
sensor  
+
COM +  
+
Power for  
sensor  
Output  
IN  
0V  
7mA  
COM -  
+
COM +  
IN  
Output  
0V  
Power for  
sensor  
6-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 6 Input and Output Specification  
6.2.2 Expansion Module  
1) Specifications  
Expansion Module  
G7E-DC08A  
Model  
Specification  
G7E-DR10A  
6 points  
G7E-DR20A  
12 points  
Number of input points  
8 points  
Insulation method  
Photo coupler  
Rated input voltage  
DC 24V  
7 mA  
Rated input current  
Operating voltage range  
Max. Simultaneous input points  
On voltage / On current  
Off voltage / Off current  
Input impedance  
DC 20.4 ~ 28.8V (ripple: less than 5%)  
100% simultaneously On  
DC19V or higher/ 5.7 mA or higher  
DC6V or lower / 1.8 mA or lower  
Approx. 3.3 kΩ  
Off On  
Response time  
0,1,2,5,10,20,50,100,200,500,1000ms (Default : 10ms)  
0,1,2,5,10,20,50,100,200,500,1000ms (Default : 10ms)  
On Off  
Common terminal  
Operating indicator  
6 points / com  
4 points / com  
12 points / com  
LED turns on at ON state of input  
2) Circuit diagram  
It’s the same with the one for the main unit.  
3) Input wiring  
DC24V  
DC24V  
6-5  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 6 Input and Output Specification  
6.3 Digital Output Specification  
6.3.1 Main unit (Relay Output)  
1) Specification  
(1) Standard type  
Model  
Main Unit  
K7M-DR40U  
K7M-DR20U  
Specifications  
K7M-DR30U  
(K7M-DRT30U)  
K7M-DR60U  
(K7M-DRT60U)  
(K7M-DRT20U)  
(K7M-DRT40U)  
Output point  
8 points(4 points)  
Relay insulation  
12 points(8 points)  
16 points(12 points)  
24 points(20 points)  
Insulation method  
Rated load voltage/current  
Min. load Voltage/current  
Max. load voltage/current  
Current leakage when off  
Max. On/off frequency  
Surge Absorber  
DC24V / 2A (r/load), AC220V / 2A (COS Ψ = 1)/1 point , 5A / 1COM  
DC5V / 1mA  
AC250V, DC110V  
0.1mA (AC220V, 60Hz)  
1,200 times/hr  
None  
Mechanical  
More than 20,000,000  
Rated on/off voltage/current load 100,000 or more  
AC200V / 1.5A, AC240V / 1A (COSΨ = 0.7) 100,000 or more  
AC200V / 1A, AC240V / 0.5A (COSΨ = 0.35) 100,000 or more  
DC24V / 1A, DC100V / 0.1A (L / R = 7ms) 100,000 or more  
10 ms or lower  
Life  
Electrical  
Response  
time  
Off On  
On Off  
12 ms or lower  
Operation indication  
LED is on at on status of output  
6-6  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 6 Input and Output Specification  
(2) Economic type  
Model  
Main Unit  
K7M-DR20UE  
Specifications  
K7M-DR10UE  
K7M-DR14UE  
6 points  
K7M-DR30UE  
Output point  
4 points  
8 points  
12 points  
Insulation method  
Relay insulation  
Rated load voltage/current  
Min. load Voltage/current  
Max. load voltage/current  
Current leakage when off  
Max. On/off frequency  
Surge Absorber  
DC24V / 2A (r/load), AC220V / 2A (COS Ψ = 1)/1 point , 5A / 1COM  
DC5V / 1mA  
AC250V, DC110V  
0.1mA (AC220V, 60Hz)  
1,200 times/hr  
None  
Mechanical  
More than 20,000,000  
Rated on/off voltage/current load 100,000 or more  
AC200V / 1.5A, AC240V / 1A (COSΨ = 0.7) 100,000 or more  
AC200V / 1A, AC240V / 0.5A (COSΨ = 0.35) 100,000 or more  
DC24V / 1A, DC100V / 0.1A (L / R = 7ms) 100,000 or more  
10 ms or lower  
Life  
Electrical  
Response  
time  
Off On  
On Off  
12 ms or lower  
Operation indication  
LED is on at on status of output  
2) Circuit  
L
Internal  
Relay  
circuit  
L
COM  
6-7  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 6 Input and Output Specification  
3) Output wiring  
(1) Main unit  
U
L L L  
L L  
L L  
L L  
L
L L  
L
L L  
L
L L  
L L  
L
L
L
L
DC5V DC24V  
AC110/220V  
DC24V DC24V  
6-8  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 6 Input and Output Specification  
6.3.2 Main unit (TR Output : DRT/DT type only)  
1) Specification  
Model  
Main Unit  
K7M-DRT/DT40U  
Specifications  
K7M-DRT/DT20U  
K7M-DRT/DT30U  
4 points / 12 point 4 points / 16 point  
K7M-DRT/DT60U  
4 points / 24 point  
Output point  
4 points / 8 point  
Photo coupler insulation  
DC12/24V  
Insulation method  
Rated load voltage  
Operation load Voltage  
Max. load current  
Current leakage when off  
Voltage drop when on  
Surge Absorber  
DC10.2 ~ 26.4V  
0.5A/1 point (DRT Type P40~P43: 0.1A/1point, DT Type P40~P41 0.1A/1point)  
Less than 0.1mA  
Less than DC0.3V  
Zener diode  
Inrush current  
Less than 4A, 10ms  
0.2 ms or lower  
Response  
time  
Off On  
On Off  
0.2 ms or lower  
Operation indication  
LED is on at on status of output  
P40,P41  
24V  
Internal  
Circuit  
TR1  
R2  
R
3
P42,P43  
24V  
P/C  
Internal  
Circuit  
TR1  
R2  
R
3
REMARK  
1) Output TR P000 ~ P003 of DRT Type(K7M-DRT20/30/40/60U) are for positioning function.  
2) They also can be used as general transistor output, but cant be used for AC load. When used for AC loads, they can be destroyed.  
6-9  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 6 Input and Output Specification  
2) Output wiring  
AC100-240V  
FG  
P40 P41 P42  
P
COM0  
COM1 COM2  
COM3  
P43  
L
L
L
L
DC12V/24V  
6-10  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 6 Input and Output Specification  
6.3.3 Expansion Module  
1) Specifications  
Expansion Module  
G7E-DR08A G7E-RY08A  
Model  
Specifications  
G7E-DR10A  
G7E-DR20A  
Output point  
4 points  
Relay insulation  
8 points  
Insulation method  
Rated load Voltage/current  
Min. load Voltage/current  
Max. load voltage/current  
Current leakage when off  
Max. on/off frequency  
Surge Absorber  
DC24V / 2A (Resistive load), AC220V / 2A (COS Ψ = 1) / 1 point 5A / 1COM  
DC5V / 1mA  
AC250V, DC110V  
0.1mA (AC220V, 60Hz)  
1,200 times/hr  
None  
Mechanical  
More than 20,000,000  
Rated on/off voltage/current load 100,000 or more  
AC200V / 1.5A, AC240V / 1A (COSΨ = 0.7) 100,000 or more  
AC200V / 1A, AC240V / 0.5A (COSΨ = 0.35) 100,000 or more  
DC24V / 1A, DC100V / 0.1A (L / R = 7ms) 100,000 or more  
10 ms or lower  
Life  
Electrical  
Off On  
Response time  
12 ms or lower  
On Off  
Operation indication  
LED is on at on status of output  
2) Circuit  
It’s the same with the output circuit of the main unit.  
3) Output wiring  
L
L
L L  
L
L
DC5V DC24V  
AC110/220V  
DC5V/24V AC110/220V  
6-11  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 6 Input and Output Specification  
Expansion Module  
G7E-TR10A  
Model  
Specifications  
Output point  
10 points  
Insulation method  
Photo coupler insulation  
DC12V/24V  
Rated load Voltage/current  
Operating load voltage range  
Max. load current  
DC10.2 ~ 26.4V  
0.5A/1 point, 4A/1COM  
0.1mA or lower  
Current leakage when off  
Max. inrush current  
Max. Voltage drop when on  
Surge Absorber  
4A/10ms or lower  
DC 1.5V or lower  
Clamp diode  
Off On  
Response time  
2 ms or lower  
On Off  
2 ms or lower  
Common method  
10 points/ 1COM,  
LED is on at on status of output  
Operation indication  
L
L L L L  
L L L L  
L
DC12/24V  
REMARK  
1) Refer to 7.2 Special Functions’ for the special modules  
6-12  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
Chapter 7. Usage of Various Functions  
7.1 Built-in Functions  
7.1.1 High-speed counter function  
This chapter describes the specification, handling, and programming of built-in high speed counter of MASTER-K120S. The  
built-in high speed counter of MASTER-K120S(hereafter called HSC) has the following features;  
Function  
Description  
Linear counter : Up/Down counter.  
Counter format  
Counting range is from -2,147,483,648 to 2,147,483,647  
Ring counter : Counter value rotates from 0 to (set value-1)  
4 counter functions as followings  
1-phase operation mode  
1-phase pulse + direction mode : Up / down is selected by direction pulse  
2-phase CW/CCW mode : Up / down is selected by CW or CCW pulse input  
2-phase multiplication mode : Up / down is automatically selected by the phase  
difference between A-phase and B.(multiplied by 4)  
Change current value to preset value.  
Counter mode  
Preset function  
Latch counter  
Latches current value.  
Additional  
function  
Comparison output When current value is equal to comparison value, turns on the output contact points or  
executes interrupt program  
RPM function  
Calculate the RPM(Rotates Per Minute) of input pulse  
1) Performance Specifications  
Items  
Specifications  
Standard Type  
1 phase : 4 points, 2 Phase : 2 points  
Economic Type  
1 phase : 2 points, 2 Phase : 1 points  
1-phase 100kHz/ 2-phase 50kHz ( Ch0, Ch1) 1-phase 10kHz/ 2-phase 5kHz  
Points  
Max. counting speed  
1-phase 20kHz/ 2-phase 10kHz ( Ch2, Ch3)  
( Ch0, Ch1)  
Input types  
Counting ranges  
1-phase  
A-Phase, B-Phase, Preset input  
from -2,147,483,648 to 2,147,483,647(Binary 32 bits)  
Up counter  
1-phase Pulse +  
direction input  
A-Phase : Input pulse, B-Phase : Direction pulse  
Up / Down  
selection  
2-phase  
CW/CCW mode  
2-phase  
A-Phase : Up counting pulse, B-Phase : Down counting pulse  
Auto-select by phase difference of A-phase and B  
multiplication mode  
Additional function  
Ring counter, Latch counter, Preset, Comparison output, RPM function  
2) Input specification  
Items  
Specifications  
24VDC (7mA)  
20.4 ~ 28.8VDC  
Items  
Specifications  
24VDC (7mA)  
Rated input  
Rated input  
On voltage  
Off voltage  
On voltage  
Off voltage  
20.4 ~ 28.8VDC  
6VDC or lower  
A / B phase  
Preset input  
On delay time  
Off delay time  
200 or lower  
200 or lower  
6VDC or lower  
7-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
3) Names of wiring terminals  
Input pulse  
Preset input  
④ ⑤ ⑥ ⑦ ⑧  
BUILT_IN CNET  
OFF  
ON  
ROM MODE  
P10  
P23  
COM1  
COM0  
P00 P02 P04 P06 P08  
P0F P11  
P01 P03  
P07  
P05  
24G 24V  
P22  
Terminal  
No.  
Names  
Usage  
No.  
1Phase  
2Phase  
1Phase  
2Phase  
P00  
P01  
Ch0 Input  
Ch1 Input  
Ch0 A Phase Input  
Ch0 B Phase Input  
Ch2 A Phase Input  
Ch2 B Phase Input  
Ch0 Preset 24V  
-
Counter input terminal A Phase Input terminal  
Counter input terminal B Phase Input terminal  
Counter input terminal A Phase Input terminal  
Counter input terminal B Phase Input terminal  
P02  
Ch2 Input  
P03  
Ch3 Input  
P04  
P05  
P06  
Ch0 Preset 24V  
Ch1 Preset 24V  
Ch2 Preset 24V  
Ch3 Preset 24V  
Preset input terminal  
Preset input terminal  
Preset input terminal  
Preset input terminal  
Preset input terminal  
-
Ch2 Preset 24V  
-
Preset input terminal  
-
P07  
COM0  
Input Common  
< Standard Type >  
Input common terminal  
Terminal  
No.  
Names  
Usage  
No.  
1Phase  
2Phase  
1Phase  
2Phase  
P00  
P01  
P02  
P03  
Ch0 Input  
Ch1 Input  
Ch0 A Phase Input  
Ch0 B Phase Input  
Ch0 Preset 24V  
Counter input terminal A Phase Input terminal  
Counter input terminal B Phase Input terminal  
Ch0 Preset 24V  
Ch1 Preset 24V  
Preset input terminal  
Preset input terminal  
Preset input terminal  
-
-
< Econnomic Type >  
7-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
4) External interface circuit  
Termi  
nal  
No.  
Signal name  
Operati  
on  
Input warranted  
voltage  
I/O  
Internal circuit  
1Phase  
2Phase  
Ch0  
Input  
pulse  
Ch0 A  
Phase  
Input  
On  
Off  
On  
Off  
On  
20.4~28.8V  
6V or lower  
20.4~28.8V  
6V or lower  
20.4~28.8V  
3.3 k  
P00  
P01  
P02  
Ch1  
Input  
pulse  
Ch0 B  
Phase  
Input  
3.3 kΩ  
Ch2  
Input  
pulse  
Ch2 A  
Phase  
Input  
Input  
3.3 kΩ  
Off  
On  
Off  
6V or lower  
20.4~28.8V  
6V or lower  
Ch3  
Input  
pulse  
Ch2 B  
Phase  
Input  
P03  
3.3 kΩ  
COM  
0
Common  
Ch0  
Preset  
input  
Ch0  
Preset  
input  
On  
Off  
On  
Off  
On  
20.4~28.8V  
6V or lower  
20.4~28.8V  
6V or lower  
20.4~28.8V  
3.3 kΩ  
P04  
P05  
P06  
Ch1  
Preset  
input  
3.3 kΩ  
-
Ch2  
Preset  
input  
Ch2  
Preset  
input  
Input  
3.3 kΩ  
Off  
On  
Off  
6V or lower  
20.4~28.8V  
6V or lower  
Ch3  
Preset  
input  
P07  
-
3.3 kΩ  
COM  
0
Common  
5) Wiring instructions  
A high speed pulse input is sensitive to the external noise and should be handled with special care. When wiring the built-in  
high speed counter of MASTER-K120S, take the following precautions against wiring noise.  
(1) Be sure to use shielded twisted pair cables. Also provide Class 3 grounding.  
(2) Do not run a twisted pair cable in parallel with power cables or other I/O lines which may generate noise.  
(3) Before applying a power source for pulse generator, be sure to use a noise-protected power supply.  
(4) For 1-phase input, connect the count input signal only to the phase A input; for 2-phase input, connect to phases A and B.  
7-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
6) Wiring example  
(1) Voltage output pulse generator  
24V  
Pulse Generator  
A
B
COM  
24VG  
(2) Open collector output pulse generator  
24V  
COM  
A
Pulse Generator  
B
24VG  
7-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7) Instruction(HSCST)  
HSCAST  
High speed counter  
Flag  
Zero  
(F111) (F112)  
Available device  
No. of  
steps  
Error  
(F110)  
Carry  
Instruction  
M
P
K
L
F
T
C
S
D
#D integer  
S
7/9  
SV  
CV  
○ ○ ○ ○ ○ ○ ○  
○ ○ ○ ○ ○ ○  
○ ○  
○ ○  
Designation  
Flag set  
S
Channel which is designated at parameter(0~3)  
Error  
Set value (binary 32 bits)  
Error flag turns on when designating area is over  
SV  
(F110)  
Range : (-2,147,483,648 ~ 2,147,483,647)  
CV Current value of HSC stored area  
HSCST S SV CV  
(1) Functions  
When input condition turns on, corresponding high speed counter is enabled.  
When input condition turns off, high speed counter stop counting and turns output point off . The current value is retained.  
The high speed counter can counts from -2,147,483,648 to 2,147,483,647(binary 32bits).  
When current value is greater than set value, output point F17*(* is channel number) turns on and it turns off when current  
value is less than set value.  
If current value is greater than 2,147,483,647, carry flag F18* turns on and and it turns off when input condition turns off.  
If HSC designated as ring counter, carry flag is set when current value reaches set value.  
If current value is smaller than -2,147,483,648, borrow flag F19* turns on and and turns off when input condition turns off  
If designated as ring counter, if current value is 0, borrow flag is set at next pulses rising edge and current value goes set  
value –1(in down counter mode)  
(2) Error code  
Code  
Error  
Corrective Actions  
When Ch0 is set as 2-Phase, Ch 1 cant be used and Ch3 cant be  
used if Ch2 is set to 2-Phase.  
H’10  
Mode setting error  
H’11  
H’12  
Ring counter setting error  
SV2 setting error  
Adjust the range of ring counter within 2 ~ 2,147,483,647.  
Set SV2 greater than SV1 if zone comparison set is selected.  
Adjust the range of ring counter within 2 ~ 2,147,483,647 Set SV2  
greater than SV1if zone comparison set is selected  
H’13  
Ring counter and SV2 setting error  
7-5  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
8) Parameter Setting  
(1) Format setting  
(a) Linear counter  
If HSC is designate as Linear counter, it can counts from -2,147,483,648 to 2,147,483,647.  
The carry flag F18*(* is channel number) turns on when the current value of high speed counter is overflow during up  
counting and HSC stop counting.  
The borrow flag F19*(* is channel number) turns on when the current value of high speed counter is underflow during  
down counting and HSC stop counting.  
Carry and borrow flags can be reset by preset operation and HSC can re-starts its operation.  
Carry occurs  
2,147,483,647  
Current value  
0
Decreasing  
Increasing  
-2,147,483,648  
Borrow occurs  
(b) Ring counter  
If HSC is designate as Ring counter, it can counts from 0 to set value.  
The carry flag turns on when the current value of high speed counter reaches set value during up counting and current  
value is changed to 0.  
The borrow flag turns on when the current value of high speed counter is reaches 0 during down counting and current  
value is changed to set value –1.  
When set value is out of range(2 ~ 2,147,483,647), Ring counter setting error(h11) occurs and HSC operates as linear  
counter.  
When current value is changed to out of range(2 ~ 2,147,483,647) by preset operation, Ring counter setting error(h11)  
occurs and HSC operates as linear counter.  
The ring counter setting error can be corrected by re-start of instruction(HSCST) only.  
Carry occurs  
Current value  
0
Decreasing  
Borrow occurs  
Increasing  
7-6  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(2) Mode setting  
(a) 1-phase operation mode  
- Current value increases by 1 at the rising edge of input pulse.  
A-phase input pulse  
Current value  
1
2
3
4
5
(b) 1-phase pulse + direction mode  
- Current value increases by 1 at the rising edge of A-Phase pulse when B-phase is low’ state.  
- Current value decreases by 1 at the rising edge of A-Phase pulse when A-phase is High’ state.  
A-phase input pulse  
High  
Low  
B-phase input pulse  
Current value  
10  
11  
10  
9
8
(c) 2-phase CW/CCW mode  
- Current value increases by 1 at the rising edge of A-Phase pulse when B-phase is low’ state.  
- Current value increases by 1 at the rising edge of B-Phase pulse when A-phase is low’ state.  
A-phase input pulse  
B-phase input pulse  
Current value  
10  
11  
12  
11  
10  
7-7  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(d) 2-phase multiplication mode (MUL4)  
- Up or Down is set automatically by the phase difference between A and B phase.  
Up counter  
- At the rising edge of A-Phase pulse when B-phase is low’.  
- At the falling edge of A-Phase pulse when B-phase is high.  
- At the rising edge of B-Phase pulse when A-phase is high.  
- At the falling edge of B-Phase pulse when A-phase is low’.  
Up counter  
- At the rising edge of A-Phase pulse when B-phase is high.  
- At the falling edge of A-Phase pulse when B-phase is low’.  
- At the rising edge of B-Phase pulse when A-phase is low’.  
- At the falling edge of B-Phase pulse when A-phase is high.  
A-phase input pulse  
B-phase input pulse  
Current value  
10 11 12 13 14 15 16 17 18  
17 16 15 14 13  
(3) Preset setting  
(a) Internal Preset  
- Set internal preset area and preset value.  
- Current value of high speed counter is replaced with preset value at the rising edge of internal preset device.  
(b) External Preset  
- Set external preset area and preset value.  
- External devices are fixed as following  
Ch0 : P4, Ch1 : P5, Ch2 : P6, Ch3 : P7  
- Current value of high speed counter is replaced with preset value at the rising edge of external preset device.  
7-8  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(4) Latch Counter setting  
If this function is enabled, Current value of high speed counter is always retained.  
Current value  
- When power supply is off.  
- When is Stop’ or Pause’  
- When input condition of  
‘HSCST’ is off  
0
Time  
Latches CV  
Latches CV  
(5) Comparison Output setting  
(a) Comparison set  
- When current value of HSC is equal to SV1, corresponding output point turns on.  
- P40 ~ P47 are available for comparison output point.  
Input pulse  
Output Contact  
Current value  
98  
99  
100  
101  
102  
7-9  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(b) Zone Comparison Set  
- When current value of HSC isnt less than SV1 and more than SV2. corresponding output point turns on.  
- P40 ~ P47 are available for comparison output point.  
- If SV2 is less than SV1, SV2 setting error(h12) occurs and zone comparison set is disabled.  
Input pulse  
Output point  
Current value  
999  
1000  
2000  
2001  
(c) Comparison Task  
- If Comparison Task is selected in parameter window, corresponding interrupts is enabled.  
- When current value of HSC is equal to SV1, corresponding interrupt program is executed.  
- For the details about programming, refer to KGLWIN Users Manual.  
7-10  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(6) RPM setting  
- Can calculates RPM of input pulse  
- RPM is stored in designated device.  
- The RPM is expressed as:  
(CurrentValue- LastValue)× 60,000  
Pulsesper rotate× refreshcycle[ms]  
RPM =  
(a) Examples of Program  
- Refresh cycle : 1000ms, Pulses per rotate : 60, RPM save area : D0  
Input pulse  
Current value  
1000  
2000  
2001  
4000  
D0, D1  
Time  
ⓑ 1000  
ⓒ 2000  
3000ms  
ⓐ 500  
1000ms  
2000ms  
Last value = 500(Assumption), Current value = 1000  
RPM = { (1000 – 500) * 60,000} / {60 * 1000} = 500  
Last value = 1000, Current value = 2000  
RPM = { (2000 – 1000) * 60,000} / {60 * 1000} = 1000  
Last value = 2000, Current value = 4000  
RPM = { (4000 – 2000) * 60,000} / {60 * 1000} = 2000  
7-11  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
9) Programming example  
(1) Parameter setting  
Channel : Ch0  
Counter format : Ring counter ( 0 ~ 100,000)  
Counter mode : 2-phase multiplication mode  
- P0 : A-phase pulse input, P1 : B-phase pulse input  
Preset  
- Preset type : internal preset (M100)  
- Preset value : 0  
Last counter setting  
- None  
Comparison output  
- Output mode : Zone comparison set  
- SV1 : 10,000 SV2 : 20,000  
- Output point : P43  
RPM setting  
- Refresh cycle : 100(*10ms)  
- Pulses per rotate : 60  
- RPM save area : D100  
7-12  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(2) Programming  
When M0 turns on, HSC starts its operation  
If current value is not less than 50,000, F170 turns on.  
Current value is saved in D0(double word).  
Remark  
The contact point which is designated as HSC input cant be used for pulse catch or external interrupt.  
Duplicated designation may cause faults.  
7-13  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.1.2. Pulse Catch Function  
In the main unit, 4(economic type) or 8(standard type) points of pulse catch input contact points are internalized. Through using  
this contact point, short pulse signal short can be taken which can not be executed by general digital input.  
1) Usage  
When narrow width of pulse signal is input, a trouble occurs which can not be detected by general digital input, so the  
operation does not perform as user's intention. But in this case through pulse catch function even narrow interval of pulse  
signal as 10 min. can be detected.  
2) Minimum input pulse width.  
Type  
10 ㎲  
50 ㎲  
Standard  
Economic  
None  
2 points (P0, P1)  
6 points (P2 ~ P7) 4 points (P0 ~ P3)  
3) Operating Explanation  
10 ㎲  
input signal  
input image data  
scan 1  
scan 2  
scan 3  
step  
executing contents  
CPU senses input when pulse signal, min. 10 , is input, then saves the status.  
used to turn on the region of input image  
scan1  
scan2  
scan3  
used to turn off the region of input image  
4) using method  
(1) click twice the basic parameter on the project window of KGLMIN  
(2) Select no. to use for pulse catch input of the basic parameter window.  
For details of KGLWIN refers to the manual.  
7-14  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
Remark  
1) Pulse catch input contact points operate as general digital input if they are not designated as pulse catch input.  
2) Do not designate HSC input points as pulse catch input.  
7-15  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.1.3 Input Filter Function  
External input of MASTER-K120S selects input on/off delay time from the range of 0-1000ms of KGLWIN. Credibility  
secured system may be established by adjustment of input correction no. through using environment.  
1) Usage  
Input signal status affects to the credibility of system in where noise occurs frequently or pulse width of input signal affects  
as a crucial factor. In this case the user sets up the proper input on/off delay time, then the trouble by miss operation of input  
signal may be prevented because the signal which is shorter than set up value is not adopted.  
2) Operating Explanation  
Input on/off delay time.(filter time)  
input signal  
input image data  
time  
input signal  
input image data  
narrower width pulse than input correction no. is not considered as input signal  
3) Using method  
(1) Click twice the basic parameter on the project window of KGLWIN.  
(2) The value of filter can be set up as one of 0,1,2,5,10,20,50,100,200,500,1000ms to the input on/off delay time of the  
basic parameter window.(Input on/off delay time is set up as default value of 10ms)  
(3) Set up input on/off delay time is conformed to all input is used.  
The range of 0-1000ms  
7-16  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.1.4 External Interrupt Function  
MASTER-K120S Series can perform max 4(economic) or 8(standard) points of external contact interrupt by using input of  
main unit without special interrupt module.  
1) Usage  
This function is useful to execute a high speed execution regardless of scan time.  
2) Minimum processing time.  
Type  
10 ㎲  
50 ㎲  
Standard  
Economic  
None  
2 points (P0, P1)  
6 points (P2 ~ P7) 4 points (P0 ~ P3)  
3) Operating explanation  
External input signal  
Scan program  
Scan program  
External contact  
In case of occurrence of external  
End the interrupt program  
process then resume to  
execute scan program  
interrupt signal pause being executed  
scan program and process interrupt  
program  
interrupt program.  
4) Function  
(1) Max. 8 points can be used to external interrupt input within P000 ~ P007.(P000~P003 for economic type)  
(2) The no. of external interrupt is decreased by using other interrupt (time driven interrupt and HSC driven task)  
(3) The execution conditions of external interrupt is divided into following 3 kinds.  
- Rising edge : Interrupt occurs at rising edge of external Interrupt contact point.  
- Falling edge : Interrupt occurs at falling edge of external Interrupt contact point.  
- Rising & falling edge : Interrupt occurs at both edge of external Interrupt contact point.  
(4) In the economic type, falling edge and rising & falling edge interrupt are not available.  
7-17  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
5) Usage  
(1) Click twice the parameter on the project window of KGLWIN.  
(2) Designate contact point, no. of priority and movement condition of the task program which is moved by interrupt inputting.  
Time driven Interrupt  
execution periodic set  
interrupt input executing condition  
◎ Rising  
interrupt input contact No.  
◎ Falling  
◎ Rising/Falling  
(3) For the details , refer to KGLWIN manual.  
7-18  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.1.5 PID control function(Standard type only)  
1) Introduction  
This chapter will provide information about the built-in PID (Proportional Integral Derivative) function of MASTER-K120S  
main unit. The MASTER-K120S series does not have separated PID module like MASTER-K300S and MASTER-  
K1000S series, and the PID function is integrated into the main unit.  
The PID control means a control action in order to keep the object at a set value (SV). It compares the SV with a sensor  
measured value (PV : Present Value) and when a difference between them (E : the deviation) is detected, the controller  
output the manipulate value (MV) to the actuator to eliminate the difference. The PID control consists of three control  
actions that are proportional (P), integral (I), and derivative (D).  
Manual MV  
Manipulation  
value  
MV  
SV  
PV  
Control  
object  
D/A  
converting  
module  
Set Value  
P I D  
calculation  
Automated MV  
Present Value  
A/D converting  
module  
Sensor  
The characteristics of the PID function of MASTER-K120S is as following;  
the PID function is integrated into the CPU module. Therefore, all PID control action can be performed with  
instruction (PID8,PID8AT) without any separated PID control module.  
P operation, PI operation, PID operation and On/Off operation can be selected easily.  
PWM(Pulse Width Modulation) output is available.  
The manual output (the user-defined forced output) is available.  
By proper parameter setting, it can keep stable operation regardless of external disturbance.  
The operation scan time (the interval that PID controller gets a sampling data from actuator) is changeable for  
optimizing to the system characteristics.  
SV Ramp and Delta MV function are available.  
7-19  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
2) Specification  
(1) Control operation  
(a) Proportional operation (P operation)  
P action means a control action that obtain a manipulate value which is proportional to the deviation  
(E : the difference between SV and PV)  
The deviation (E) is obtained by difference between SV and PV and the formula of deviation is as following;  
where, Kp : the proportional constant (gain), SV: set value, PV: present value  
MV = Kp ×  
[
SV PV  
]
When E happens, MV by P operation is like Fig.7.1  
: Deviation  
: Manipulating value  
Deviation(E)  
Manipulate value (MV)  
Time  
Fig 7.1 MV by P operation  
If the Kp is too large, the PV reaches to the SV swiftly, but it may causes a bad effect like oscillations.  
If the Kp is too small, oscillation will not occur. However, the PV reaches to the SV slowly and an offset may  
appear between PV and SV shown in the Fig. 7.2.  
The manipulation value (MV) varies from 0 to 4,000. User can define the maximum value of MV (MV_MAX) and  
minimum value (MV_MIN) within the range 0 ~ 4,000.  
When an offset remains after the system is stabilized, the PV can be reached to the SV by adding a certain value.  
This value is called as bias value, and user can define the bias value  
: Kp is too large  
: Kp is too small  
Oscillation  
PV  
SV  
Offset  
Time  
Fig. 7.2 The relation between Proportional constant (Kp) and prosent value (PV)  
7-20  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(b) Integral operation (I operation)  
With integral operation, the manipulate value (MV) is increased or decreased continuously in accordance time in  
order to eliminate the deviation between the SV and PV. When the deviation is very small, the proportional  
operation can not produce a proper manipulate value and an offset remains between PV and SV. The integral  
operation can eliminate the offset value even the deviation is very small.  
The period of the time from when the deviation has occurred in I action to when the MV of I action become that of  
P action is called Integration time and represented as Ti.  
Integral action when a constant deviation has occurred is shown as the following Fig. 7.3.  
Fig. 7.3 The integral action with constant deviation  
The expression of I action is as following;  
Kp  
MV =  
Edt  
Ti  
As shown in the expression, Integral action can be made stronger or weaker by adjusting integration time (Ti) in  
I action. That is, the more the integration time (the longer the integration time) as shown in Fig. 7.4, the lesser the  
quantity added to or subtracted from the MV and the longer the time needed for the PV to reach the SV.  
As shown in Fig. 7.5, when the integration time given is short the PV will approach the SV in short time since the  
quantity added or subtracted become increased. But, If the integration time is too short then oscillations occur,  
therefore, the proper P and I value is requested.  
Integral action is used in either PI action in which P action combines with I action or PID action in which P and D  
actions combine with I action.  
7-21  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
Fig. 7.4 The system response when a long integration time given  
Fig. 7.5 The system response when a short integration time given  
(c) Derivative operation (D action)  
When a deviation occurs due to alteration of SV or external disturbances, D action restrains the changes of the  
deviation by producing MV which is proportioned with the change velocity (a velocity whose deviation changes at  
every constant interval) in order to eliminate the deviation.  
D action gives quick response to control action and has an effect to reduce swiftly the deviation by applying a large  
control action (in the direction that the deviation will be eliminated) at the earlier time that the deviation occurs.  
D action can prevent the large changes of control object due to external conditions.  
The period of time from when the deviation has occurred to when the MV of D action become the MV of P action is  
called derivative time and represented as Td.  
7-22  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
The D action when a constant deviation occurred is shown as Fig. 7.6  
Fig. 7.6 Derivative action with a constant deviation  
The expression of D action is as following;  
dE  
MV = Kp ×Td  
dt  
Derivative action is used only in PID action in which P and I actions combine with D action.  
(d) PID action  
PID action controls the control object with the manipulation quantity produced by (P+I+D) action  
PID action when a given deviation has occurred is shown as the following Fig. 7.7.  
Fig. 7.7 PID action with a constant deviation  
7-23  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(e) Integral windup  
All devices to be controlled, actuator, has limitation of operation. The motor has speed limit, the valve can not flow over  
the maximum value. When the control system has wide PV range, the PV can be over the maximum output value of  
actuator. At this time, the actuator keeps the maximum output regardless the change of PV while the PV is over the  
maximum output value of actuator. It can shorten the lifetime of actuator.  
When the I control action is used, the deviation term is integrated continuously. It makes the output of I control action  
very large, especially when the response characteristic of system is slow.  
This situation that the output of actuator is saturated, is called as windup’. It takes a long time that the actuator returns to  
normal operating state after the windup was occurred.  
The Fig. 7.8 shows the PV and MV of PI control system when the windup occurs. As shown as the Fig. 7.8, the actuator  
is saturated because of the large initial deviation. The integral term increase until the PV reaches to the SV (deviation =  
0), and then start to decrease while the PV is larger than SV (deviation < 0). However, the MV keeps the saturated status  
until the integral term is small enough to cancel the windup of actuator. As the result of the windup, the actuator will  
output positive value for a while after the PV reached to the SV, and the system show a large overshoot. A large initial  
deviation, load disturbance, or miss-operation of devices can cause windup of actuator.  
There are several methods to avoid the windup of actuator. The most popular methods are adding another feedback  
system to actuator, using the model of actuator and stop integrating when actuator is saturated.  
PV  
SV  
10  
시간  
MV  
Integral  
Term  
시간  
Fig. 7.8 Example of integral windup  
.
7-24  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(2) Realization of PID control on the PLC  
In this chapter, it will described that how to get the digitized formula of the P, I, and D terms.  
(a) P control  
The digitized formula of P control is as following;  
P(n) = K  
[
SV (n) PV (n)  
]
n : sampling number K : proportional gain constant  
b : reference value SV : set value PV : present value  
(b) I control  
The continuous formula of I control is as following;  
t e(s)ds  
K
: integral term  
I(t) =  
0
Ti  
K : proportional gain constant Ti : integral time  
e(s) : deviation value  
By derivation about t, we can obtain;  
dI  
K
=
e
where, e = (SV – PV) : deviation value  
dt Ti  
The digitized formula is as following;  
I(n +1) I(n)  
K
=
e(n)  
where, h : sampling period  
h
Ti  
Kh  
I(n +1) = I(n) +  
e(n)  
Ti  
(c) D control  
The continuous formula of derivative term is as following;  
Td  
N
d
dy  
dt  
×
D + D = −KTd  
dt  
N : high frequency noise depression ration  
y : the object to be controlled (PV)  
(3) Instruction and parameter setting  
For the PID operation of MASTER-K120S, following 2 instruction are included in the KGLWIN software.  
No.  
1
Name  
PID8  
Description  
Perform the PID operation  
Perform the auto tuning operation  
2
PID8AT  
7-25  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(4) parameter setting and explanation  
(a) PID8 instruction parameter setting and explanation.  
Scan time  
Scan time is the period of reading data (sampling), and also 10 times scaled up. The range of sampling time is  
0.1 ~ 10 seconds, and actual input range is 0 ~ 100. Generally, Scan time of Digital PID control should be less  
than 1/10 of time constant of system response for better performance. Time constant is the time taken the  
systems step response reaches to the 63% of steady state.  
Operation mode  
Select automatic or manual operating mode  
Manual operate range  
When manual operation is designates , manual operation value designates.(input range : 0 ~ 4000)  
Output limit value  
Designate minimum and maximum values of available manipulate value.(range : 0 ~ 4000)  
High frequency noise removal ratio  
high frequency noise removal ratio is used for derivative control operation, and shows the ratio of high  
frequency noise depression. If there is a lot of high frequency noise in the control system, select the value as  
higher value.  
Otherwise, leave the 1. The range of parameter is 0 ~ 10 and it is not scaled up, so input the designated value  
directly.(it is possible that parameter value designates D’ area also)  
.
7-26  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
Proportional gain  
The MASTER-K120S can handle only integer, not the floating point type. Therefore, to enhance the accuracy of  
PID operation, the PID8 instruction is designed to input the P_GAIN data as the 100 times scaled up. For  
example, if the designated P_GAIN is 98, actual input data of P_GAIN should be 9800. If the designated  
P_GAIN is 10.99, input 1099 to the P_GAIN.  
Derivative time and integral time  
I_TIME and D_TIME are 10 times scaled up. For example, input 18894 if the designated I_TIME value is 1889.4.  
The range of actual input is 0 ~ 20000. (it is possible that parameter value designates D’ area also)  
Mode command set  
In MASTER-K120S, only the following 7 operation modes are available. Other operation modes, such as PD or I,  
are not permitted.  
No.  
1
EN_P  
EN_I  
EN_D  
PWM output  
0 (disable)  
Operation  
1 (enable) 0 (disable) 0 (disable)  
1 (enable) 1 (enable) 0 (disable)  
1 (enable) 1 (enable) 1 (enable)  
1 (enable) 0 (disable) 0 (disable)  
1 (enable) 1 (enable) 0 (disable)  
1 (enable) 1 (enable) 1 (enable)  
0 (disable) 0 (disable) 0 (disable)  
P operation  
PI operation  
2
3
PID operation  
4
P operation/PWM output  
PI operation/PWM output  
PID operation/PWM output  
On/Off operation  
1 (enable)  
0 (disable)  
5
6
7
PWM set  
PWM(Pulse Width Modulation) is a output method which changes on-off duty of output pulses by calculated  
manipulation value. Fig 7.9 shows example of PWM output. Using PWM output, PID control system can be  
constructed easily without D/A conversion module and power regulator.  
When PWM is designates , scan time’ item is disabled and PWM’ items can be designated. In this case, scan  
time is set to designated PWM output period. The range of PWM output period is 1 ~ 10 seconds, and actual  
input range is 10 ~ 100. PWM output point is only available for output contact of main unit.  
Example) PWM output period : 1s, Output contact : P40, MV limit range : 0~4000  
MV = 2000  
0.5s  
MV = 1000  
0.25s  
0.75s  
0.5s  
On  
P40  
Time  
7-27  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
SV Ramp  
If a large amount of SV changes during PID operation, The deviation(E) changes rapidly. Then manipulation  
value(MV) is changed rapidly also. This can cause damage on load or actuator. To prevent this situation, SV can  
be changed step by step by parameter setting.  
Setting range is 1~4000(Default value is 1). Setting value represents the number of time which taken from  
starting set value to last set value.  
For example, if SV-ramp is set to 1000 and SV changed from 1000 to 3000 during operation, it changes 2 every  
scan and reach 3000 after 1000 scan time.  
SV Ramp = 1  
Changed SV  
SV Ramp is designates  
SV Ramp * Scan time  
Current SV  
Time  
Delta MV  
This is useful when wants to limit maximum change of manipulation value.  
Setting range is 0 ~ 4000 and default value is 4000.  
Bias  
The Bias data is used for the compensation of offset in the proportional control. The range of input is 0 ~ 4000.  
Be cautious that The actual range of Bias is –2000 ~ 2000. namely, 0~2000 represents 0 ~ +2000 and 2001 ~  
4000 represents -1 ~ -2000.  
Example> If offset(SV-PV) is 100 Bias should be 100.  
If offset(SV-PV) is -100 Bias should be 2100.  
SV(Target) and PV(Current)  
SV (setting value : the designated value) and PV (process value : present value) of MK120S PID operation have  
the range 0 ~ 4000. The range is set with the consideration of the resolution of A/D and D/A module of MK120S  
series (12bits) and offset value.  
PID Algorithm  
In MASTER-K120S, two type of PID algorithm is available, The velocity form(Speed) and positioning form.  
Velocity form(Speed) operates incremental manners. Namely, It calculates the change(n) required from  
previous manipulate value(MVn-1), But positioning form calculates an absolute manipulate value(MVn) every  
sampling steps. Generally, The velocity form is suit for the system whichs load change is slow like temperature  
control system, and positioning form is useful for system whichs load change is fast.  
7-28  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(b) PID8AT instruction parameter setting and explanation.  
Scan time  
S_TIME is the period of reading data (sampling), and 10 times scaled up for more precious operation.  
The range of sampling time is 0.1 ~ 10 seconds, and actual input range is 0 ~ 100.  
Control target(SV)  
SV (set value : the designated value) and PV (process value : present value) of MASTER-K120S PID operation  
have the range 0 ~ 4000. The range is set with the consideration of the resolution of A/D and D/A module of  
MASTER-K120S series (12 bits) and offset value. When setting the SV or PV, please be careful convert the  
analog value of control object (temperature, velocity, etc.) to digital value that are the output of A/D convert  
module.  
When using sensor and A/D conversion module  
Assume that PID control is used for temperature control with Pt100 (operation range : -200 °C ~ 600 °C),  
and the goal value is 100 °C. The equivalent digital output of A/D module (current input range : 4 ~ 20mA) is  
1500 if the A/D module outputs 0 (4mA) with -200 °C, and 4000(20mA) with 600 °C. Therefore, the input of  
SV should be 1500, not 100.  
When using sensor and RTD module(G7F-RD2A)  
Assume that PID control is used for temperature control with Pt100 (operation range : -200 °C ~ 600 °C),  
and the goal value is 100 °C. The digital output of RTD module is calculated as below.  
Temp.×10 + 2000  
DigitalOutput =  
2
Therefore, SV should be 1500,  
Tuning method  
The MASTER-K120S perform auto-tuning operation in two methods. One is relay response method and the  
other is process reaction curve method.  
7-29  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
Relay response method.  
PID parameters are obtained by On/Off operation during 1 cycle of PV variation.  
PID parameters are obtained by amplitude and period of oscillation  
The On/Off operation will be occur at the SV value.  
MV  
Period  
SV  
Amplitude  
Process reaction curve method(PRC method).  
PID parameters are obtained by step response of process.  
It is useful fo r time 1st order time delay system expressed as following  
eLs  
K
Ts +1  
Obtained parameters may not accurate if the process cant approximated to 1st order system, In this  
case, use relay response method.  
Time delay(L)  
4000  
MV  
80% of SV  
63% of SV  
Time constant(T)  
7-30  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
5) instruction  
(1) PID8  
PID8  
PID Control  
Flag  
Zero  
Available device  
No. of  
Steps  
Error  
Carry  
Instruction  
M
P
K
L
F
T
C
S
D
#D integer  
(F110) (F111) (F112)  
n
5
S1  
Designation  
Flag set  
n
Registration No. at parameter(0~7)  
Execution status registration area  
Error flag turns on when designating area is over  
and the instruction isnt executed.  
Error  
(F110)  
S1  
PID8  
n
S1  
a) Usage  
when the condition of execution is on, PID operation executes.  
n’ is registration No.at parameter( 0 ~ 7)  
b) Example program  
When the input condition M0 turns on, PID operation executes at no.2 parameter.  
PID execution status registrate D0000 and the output value of control result registrate D0001  
If SV Ramp is designated, current SV is registrate D0005  
bF bE bD bC bB bA b9 b8 b7 b6 b5 b4 b3 b2 b1 b0  
D0000  
Done : normal execution signal  
7-31  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(2) PID8AT  
PID8AT  
PID Auto Tuning  
Flag  
Zero  
Available device  
No. of  
steps  
Error  
Carry  
Instruction  
M
P
K
L
F
T
C
S
D
#D integer  
(F110) (F111) (F112)  
n
5
S1  
Designation  
Flag set  
n
Registration No. at parameter(0~7)  
Execution status registration area  
Error flag turns on when designating area is over  
and the instruction isnt executed.  
Error  
(F110)  
S1  
PID8AT  
a) Usage  
n
S1  
when the condition of execution is on, PID auto tuning operation executes and calculates P,I,D constant  
n’ is registration No.at parameter( 0 ~ 7)  
S1 is execution status and P,I,D constant registration area  
b) Example program  
When the input condition M0 turns on, PID operation executes at no.2 parameter.  
PID execution status stores D0000 and the output value of control result stores D0001 and P,I,D constant sequentially  
store D002(P),D003(I),D004(D)  
bF bE bD bC bB bA b9 b8 b7 b6 b5 b4 b3 b2 b1 b0  
D0000  
Auto tuning end bit  
Done : normal execution signal  
7-32  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
6) Program Example  
(1) System configuration  
G7F-  
G7F-DA2I  
MASTER-K120S  
RD2A  
RS-232C  
(PV : temperature)  
KGL-WIN  
V3.5 above  
(MV: 4~20mA)  
Electric Oven  
Heater  
TPR  
(2) In case of using PID function only  
When PWM set is selected, Scan time parameter  
is disabled and this value is ignored  
When PWM is designated, this window is activated and  
PID function operates by PWM period  
7-33  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
a) PID operation explanation (without A/T function)  
Measure current temperature (-200~600°C) by RTD module then digital conversion value(0 ~ 4000) is stored to  
D4780  
PID8 instruction will calculate manipulate value (MV : 0 ~ 4000) based on PID parameter settings (P_GAIN,  
I_TIME, D_TIME, etc.) and PV from RTD module. Then, the calculated MV is output to the channel 0 of D/A  
module.  
D/A module will convert the MV to analog signal and output to the actuator (power converter).  
b) operation parameters  
Scan time : S_TIME=5 (sampling time = 0.5 seconds)  
Auto / Manual operation setting : Auto  
Output limit : Max. = 4000, Min = 0  
High frequency noise removal ratio : 10  
SV setting : 1300(60°C ),1350(70°C ),1400(80°C ),1500(100°C)  
Current value setting : D4780(Digital value of RTD module Ch0)  
BIAS setting : 0 (If only P control is used, input proper value other 0)  
EN_P, EN_I, EN_D setting: input proper values  
PWM setting : If enabled, input proper values.  
SV Ramp setting : Input proper values.  
Delta MV setting : Input proper values.  
PID Algorithm setting : Select proper algorithm.  
c) RTD module setting  
Channel setting : use channel 0  
RTD Type setting : Pt100  
Digital conversion data registration area : D4780  
d) D/A module setting  
Channel setting : use channel 0  
output range setting: DC 4 ~ 20 mA  
D/A conversion data registration area : D4980  
7-34  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
e) Program Explanation  
When the input condition M0 turns on, PID operation executes at no.0 parameter.  
PID execution status registrate D0000 and the output value of control result registrate D0001  
If SV Ramp is designated, current SV is registrate D0005  
D/A module converts the MV to analog signal and output to the actuator (power converter).  
When the input condition M0 turns off, output 0 to the D/A conversion module.  
When M0 turns on,  
PID operation executes at no.0 parameter  
The manipulated value is out to D/A module  
When M0 turns off,  
CPU stop PID operation and output 0 to D/A module  
(3) In case of using combined function of PID operation and Auto tuning.  
a) PID operation explanation (with A/T function)  
Measure current temperature (-200~600°C) by RTD module then digital conversion value(0 ~ 4000) is stored to  
D4780  
PID8AT instruction will calculate manipulate value (MV : 0 ~ 4000) based on the SV and PV from RTD module.  
Simultaneously, the PID8AT instruction will calculate P,I and D parameters.  
The END bit of auto tuning status device will be 1 when the auto tuning is completed. Then, MASTER-K120S  
will start PID operation with PID parameters that are calculated by A/T module.  
b) Auto tuning parameters  
Scan time : S_TIME=5 (sampling time = 0.5 seconds)  
SV setting : 1300(60°C ), 1350(70°C ),1400(80°C ),1500(100°C)  
Current value setting : D4780(Digital value of RTD module Ch0)  
Identification method setting : Select PRC Method  
When selected, the scan time  
fixed to 1 sec.  
7-35  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
c) operation parameters  
Scan time : S_TIME=5 (sampling time = 0.5 seconds)  
Auto / Manual operation setting : Auto  
Output limit : Max. = 4000, Min = 0  
High frequency noise removal ratio : 10  
SV setting : 1300(60°C ),1350(70°C ),1400(80°C ),1500(100°C)  
Current value setting : D4780(Digital value of RTD module Ch0)  
BIAS setting : 0 (If only P control is used, input proper value other 0)  
EN_P, EN_I, EN_D setting: input proper values  
PWM setting : If enabled, input proper values.  
SV Ramp setting : Input proper values.  
Delta MV setting : Input proper values.  
PID Algorithm setting : Select proper algorithm.  
As a result of PID8AT execution, Proportional gain(P),Derivative time(D),  
Integral time(I) are stored D0102,D0103,D0104.  
d) RTD module setting  
Channel setting : use channel 0  
RTD Type setting : Pt100  
Digital conversion data registration area : D4780  
e) D/A module setting  
Channel setting : use channel 0  
output range setting: DC 4 ~ 20 mA  
D/A conversion data registration area : D4980  
7-36  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
f) Program Explanation  
When the input condition M2 turns on, PID auto tuning operation executes at no.0 parameter.  
When auto tuning finished, PID operation executes with calculated P,I,D parameter.  
PID execution status registrate D0000 and the output value of control result registrate D0001  
If SV Ramp is designated, current SV is registrate D0005  
D/A module converts the MV to analog signal and output to the actuator (power converter).  
When the input condition M2 turns off, output 0 to the D/A conversion module  
When auto tuning ends,  
M0001 turns on and PID control starts.  
When M0002 turns off,  
Output 0 to D4980  
When M0002 turns on, auto tuning starts.  
Calculated P,I,D parameters are saved to D0002, D0003, D0004  
7-37  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
6) Error code list  
(1) PID8AT  
Error Code  
Description  
Corrective action  
H0100  
H0200  
Scan time setting range error  
PV setting range error  
Set scan time to available setting range  
Set PV setting to available setting range  
Set SV to available setting range SV  
H0300  
SV setting range error  
If PRC identification method is selected, check current PV is  
less than SV.(SV should be greater than PV)  
(2) PID8  
Error Code  
Description  
Corrective action  
H0100  
H0200  
Scan time setting range error  
Manual operation range error  
Set scan time to available setting range  
Setmanual opration value to available setting range  
Set minimum output limit value to available setting range and  
Set it less than maximum output limit value  
Set maximum output limit value to available setting range and  
Set it greater than minimum output limit value  
Set this parameter to available setting range  
Available mode command set are P, PI, PID(PWM for each),  
On-Off only.  
H0300  
Output limit value error(Min.)  
H0400  
H0500  
H0600  
Output limit value error(Max.)  
High frequency noise removal ratio setting error  
Mode command set error  
H0700  
H0800  
H0900  
H0A00  
H0B00  
H0C00  
H0D00  
H0E00  
H0F00  
H1000  
H1100  
PWM period setting error  
P gain setting error  
I time setting error  
Set PWM period to available setting range  
Set P gain period to available setting range  
Set I time period to available setting range  
Set D time period to available setting range  
Set Bias to available setting range  
D time setting error  
Bias setting error  
PV setting range error  
Set PV to available setting range  
SV setting range error  
Set SV to available setting range  
SV Ramp setting error  
Delta MV setting error  
Set SV Ramp to available setting range  
Set Delta MV to available setting range  
Check PID algorithm setting  
PID algorithm setting error  
Operation mode setting error  
Available operation mode is 0 or 1  
7-38  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7. 2 Special module  
The special module and allocated data registers are as followings.  
Item  
A/D  
Analog  
timer  
RTD input  
module  
Data  
Combination module  
Conversion  
module  
D/A Conversion module  
Expansion  
Register  
G7F-ADHA G7F-ADHB G7F-AD2A G7F-DA2I  
G7F-DA2V  
G7F-AT2A  
G7F-RD2A  
CH0  
CH0  
CH0  
CH0  
CH0  
CH0  
CH0  
D4980  
D4981  
D4982  
D4983  
D4984  
D4985  
D4986  
D4987  
D4988  
D4989  
D4990  
D4991  
A/D value  
A/D value  
A/D value  
D/A value  
D/A value  
A/T value  
Temperature  
CH1  
CH1  
CH1  
CH1  
CH1  
CH1  
CH1  
A/D value  
A/D value  
A/D value  
D/A value  
D/A value  
A/T value  
temperature  
#1  
CH0  
CH0  
CH2  
CH2  
CH2  
CH2  
CH2  
D/A value  
D/A value  
A/D value  
D/A value  
D/A value  
A/T value  
temperature  
CH1  
CH3  
CH3  
CH3  
CH3  
CH3  
-
D/A value  
A/D value  
D/A value  
D/A value  
A/T value  
temperature  
CH0  
CH0  
CH0  
CH0  
CH0  
CH0  
CH0  
A/D value  
A/D value  
A/D value  
D/A value  
D/A value  
A/T value  
temperature  
CH1  
CH1  
CH1  
CH1  
CH1  
CH1  
CH1  
A/D value  
A/D value  
A/D value  
D/A value  
D/A value  
A/T value  
temperature  
#2  
CH0  
CH0  
CH2  
CH2  
CH2  
CH2  
CH2  
D/A value  
D/A value  
A/D value  
D/A value  
D/A value  
A/T value  
temperature  
CH1  
CH3  
CH3  
CH3  
CH3  
CH3  
-
D/A value  
A/D value  
D/A value  
D/A value  
A/T value  
temperature  
CH0  
CH0  
CH0  
CH0  
CH0  
CH0  
CH0  
A/D value  
A/D value  
A/D value  
D/A value  
D/A value  
A/T value  
temperature  
CH1  
CH1  
CH1  
CH1  
CH1  
CH1  
CH1  
A/D value  
A/D value  
A/D value  
D/A value  
D/A value  
A/T value  
temperature  
#3  
CH0  
CH0  
CH2  
CH2  
CH2  
CH2  
CH2  
D/A value  
D/A value  
A/D value  
D/A value  
D/A value  
A/T value  
temperature  
CH1  
CH3  
CH3  
CH3  
CH3  
CH3  
-
D/A value  
A/D value  
D/A value  
D/A value  
A/T value  
temperature  
RTD input module store digital conversion value of temperature value to data registers as below  
Temperature  
Digital conversion value  
Expansion  
Ch 0  
Ch 1  
Ch 2  
Ch 3  
Ch 0  
Ch 1  
Ch 2  
Ch 3  
#1  
#2  
#3  
D4980  
D4984  
D4988  
D4981  
D4985  
D4989  
D4982  
D4986  
D4990  
D4983  
D4987  
D4991  
D4780  
D4784  
D4788  
D4781  
D4785  
D4789  
D4782  
D4786  
D4790  
D4783  
D4787  
D4791  
Remark  
1) Offset/gain value cant be changed, it is fixed.  
2) Analog inputting is set the current since this is manufactured.  
3) Extend to use max.3 Modules  
7-39  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.2.1 A/D·D/A Combination module  
1) Performance specification  
The performance specification of the analog mixture module are following.  
Specifications  
Item  
G7F-ADHA  
G7F-ADHB  
Voltage DC 010V (input resistance more than 1 )  
DC 020 (input resistance 250)  
Input range  
Current  
DC 420 (input resistance 250)  
Classified by parameter  
12Bit( 0~4000)  
Digital output  
1.Setting by jumper pin for V/I selection 1.Setting by dipswitch for V/I selection  
Analog Input  
on upper part of product  
on left side of product  
Voltage/Current  
selection  
(Up: voltage, Down: Current)  
(Left voltage, Right: Current)  
2. Voltage/current selected by KGLWIN parameter  
3. When current input is used, short the V and I terminal  
2 Channels/ 1 module  
No. of channel  
Voltage DC +12V  
Absolute max. input  
Current DC +24 ㎃  
Voltage DC 010V (External load resistance 2 ㏀∼1 )  
DC 020 (External load resistance 510)  
Output range  
Current  
DC 420 (External load resistance 510)  
Classified by parameter  
12Bit( 0~4000)  
Digital Input  
Voltage/Current  
selection  
Analog output  
Separated from terminal  
No. of channel  
1Channel / 1 module  
1Channel / 2 module  
Voltage DC +12V  
Current DC +24 ㎃  
Absolute max. output  
Voltage DC010V : 2.5 (1/4000)  
DC020 : 5 (1/4000 )  
Current  
Max. resolution  
Accuracy  
DC420 : 6.25 (1/3200 )  
±0.5% [Full scale ]  
Max. conversion  
speed  
1 /CH + scan time  
Photo coupler insulation between I/O terminals and PLC power supply  
(No isolation between channels)  
Isolation  
Common  
Connect terminal 9 Points terminals *2  
8 Points terminals *2  
Internal current  
Consumption  
20 ㎃  
DC 21.6 26.4V  
External power  
80 ㎃  
95 ㎃  
supply  
Weight  
240g  
180g  
Remark  
1) Offset/gain value cant be changed, it is fixed.  
2) Analog inputting is set the current since this is manufactured.  
3) Extend to use max.3 Modules  
7-40  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
2) Names of parts and functions  
Explain about names of parts and functions  
(1) G7F-ADHA  
No  
Contents.  
RUN LED  
Indicate the operating status the G7F-ADHA  
Analog input terminal  
Voltage Input  
Current input  
CH0 (INPUT)  
V0 I0 COM0  
CH0 (INPUT)  
V0 I0 COM0  
When current input is used, short the V and I terminal.  
Jumper pin of analog input  
Input  
Voltage Input  
Current Input  
Select  
CHO CH1  
Right is CH.1selecting  
left is CH. 0 selecting  
Connect upper  
parts by jumper  
pins  
Connect lower parts by  
jumper pins.  
Analog output terminal  
Voltage output  
Current output  
V+ V- I+ I-  
OUTPUT  
V+ V- I+ I-  
OUTPUT  
Only one type of output (Current or Voltage)is available on a module  
External power input terminal  
External voltage 24VDC needs to this terminal.  
Extension cable  
This cable is used to connect while analog mixture module is used.  
.
Extension cable connector  
The connector connects extension cable when extended module is  
used.  
7-41  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(2) G7F-ADHB  
No  
Contents.  
RUN LED  
Indicate the operating status the G7F-ADHB  
Analog input terminal  
Voltage Input  
Current input  
C
CH0 (INPUT)  
V0 I0 COM0  
V0 I0 COM0  
When current input is used, short the V and I terminal.  
Dip switch of analog input  
V0+  
V0-  
I0+ V1+ I1+  
I0- V1- I1-  
OUTPUT  
CH0  
CH1  
Input Select  
C
h0  
C
G7F-ADHB  
PROGRAMMABLE  
LOGIC  
1
Right : current input  
Left : voltage input  
CONTROLLER  
PWR  
Analog output terminal  
INPUT  
Input  
CH0  
CH1  
24V V0 COM0 I1  
Current output  
Voltage output  
24G I0  
V1 COM1  
V+ V- I+ I-  
OUTPUT  
V+ V- I+ I-  
OUTPUT  
Only one type of output (Current or Voltage)is available on a module  
External power input terminal  
External voltage 24VDC needs to this terminal.  
Extension cable  
This cable is used to connect while analog mixture module is used.  
.
Extension cable connector  
The connector connects extension cable when extended module is  
used.  
7-42  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
3) Parameter setting  
(1) Scaling function  
This function convert automatically range when the inout/output range is not matched.  
In case that input/output is current , this function is useful that external equapment’ range is not matched each other.  
(MASTER-K120S series converts range automatically as following : 0 ~ 20mA 4 ~ 20mA)  
4000  
4000  
800  
0
0
0㎃  
20㎃  
20㎃  
4㎃  
-1000  
Resolution : 20 /4000 = 5 ㎂  
Resolution : 20 /3200 = 6.25 ㎂  
Conversion method is as below  
scaling conversion value (A/D conversion) = [(data of 0 ~ 20 ) – 800] x 4000/3200  
example) in case of8 input at range 0 ~ 20 ㎃  
before the scaling conversion : 8 / 5 = 1600  
after the scaling conversion : (1600 –800) x 1.25 = 1000  
scaling conversion value (D/A conversion) = [(data of 4 ~ 20 ) x 3200/4000] + 800  
example) in case of 1000’ output at range 4 ~ 20 ㎃  
current output value before the scaling conversion : 1000 x 5 = 5 ㎃  
current output value after the scaling conversion : (1000 x 0.8) + 800 = 1600  
1600 x 5 = 8 ㎃  
7-43  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
4) Wiring  
(1) Caution for wiring  
Make sure that external input signal of the mixture module of AC and analog I/O is not affected by induction noise or occurs  
from the AC through using another cable.  
Wire is adopted with consideration about peripheral temperature and electric current allowance. Thicker than Max. size of  
wire AWG22 (0.3 ) is better.  
If wire is put near to high temp. radiated device or contacted with oil for a long time, it may cause of electric leakage so that  
it gets broken or miss-operation during wiring.  
Be sure to connect with care of polarity while connecting to external 24V DC power supply.  
In case of wiring with high voltage line or generation line, it makes induction failure so then it may cause of miss-operation  
and out of order.  
(2) Wiring example  
a) Analog input  
Voltage input  
Current input  
Terminal  
V1  
Terminal  
V0  
+
+
input  
input  
I0  
I1  
COM0  
COM1  
*1  
*1  
b) Analog output  
Voltage output  
V+  
2K~1 ㏁  
V−  
*1  
GND  
Current output  
Less than  
I+  
510Ω  
I−  
*1  
GND  
*1 : Be sure to use two-core twisted shield wire.  
* Be careful to use that analog output is 1 channel.  
7-44  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
5) I/O converstion characteristics  
(1) Analog input characteristics  
a) Voltage input  
4000  
2004  
2003  
2002  
2001  
2000  
2000  
0
0V  
5V  
10V  
Analog input voltage  
Input Voltage  
A/D conversion characteristics (voltage input)  
In voltage input, digital amount 0 is output by 0V input and 4,000 is output by 10V input. Therefore input 2.5mV equals to  
digital amount 1, but value less than 2.5mV cant be converted.  
b) Current input  
4000  
2004  
2003  
2002  
2001  
2000  
2000  
0
0 ㎃  
10 ㎃  
20 ㎃  
Input Current  
Analog input current  
A/D conversion characteristics (Current input)  
Current input 0mA becomes output 0, 10mA does 2000 and 20mA does 4000. therefore input 5 equals to digital  
amount 1, but value less tan 5 cant be converted. So abandon it.  
7-45  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(2) Analog output characteristics  
a) Voltage output  
10V  
5V  
0V  
2.5 ㎷  
5.0025  
5V  
2000 20012002 200 200 200  
Digital input  
0  
2000  
4000  
Digital input value  
D/A conversion characteristic (voltage output)  
Input of digital amount 0 outputs analog amount 0V, 4000 does 10V.Digital input 1 equals to 2.5mV of analog amount.  
b) Current output  
20 ㎃  
10 ㎃  
5 ㎂  
10.005  
10.000  
2000 20012002 200 200 200  
0 ㎃  
Digital input  
0  
2000  
4000  
Digital input value  
D/A conversion characteristic (Current output)  
In current output, digital amount 0 exchanges to 0mA, and 4,000 does 20mA.  
Analog amount of digital input 1 equals to 5 .  
7-46  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
6) Program example  
(1) Distinction program of A/D conversion value  
a) Program explanation  
- When digital value of channel 0 is less than 2000, P090 is on.  
- when digital value of channel 0 is more than 3000, P091 is on.  
- When digital value of channel 0 is more or same than 2000 or lesser than 3000, P092 is on.  
b) System configuration  
Main Unit A/D·D/A combination module Expansion module  
I/O allocation  
Main unit input : P000 ~ P03F  
Main unit output : P050 ~ P07F  
Expansion module input : P080 ~ P08F  
Expansion module output : P090 ~ P09F  
c) Program  
7-47  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(2) Program which controls speed of inverter by analog output voltage of 5 steps  
a) Program explanation  
-.When P80 becomes On, 2000 (5V) is output.  
-. When P81 becomes On, 2400 (6V) is output.  
-.When P82 becomes On, 2800 (7V) is output.  
-.When P83 becomes On, 3200 (8V) is output.  
-.When P84 becomes On, 3600 (9V) is output.  
b) System configuration  
Main Unit A/D·D/A combination module Expansion module  
c) Program  
7-48  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.2.2 A/D Conversion module  
1) Performance specifications  
The performance specifications of the analog input module are following.  
Item  
Specifications  
010VDC ( input resistance 1 )  
Voltage  
Current  
DC 420 ( input resistance 250)  
DC 020 ( input resistance 250))  
-.Setting by input terminal  
Analog  
input  
Voltage/Current  
Selection  
(When current input is used, short the V and I terminal)  
- Voltage/Current is selected by KGLWIN parameter  
12bit binary (04000)  
Digital output  
010VDC  
DC 020 ㎃  
DC 420 ㎃  
2.5 (1/4000)  
Maximum  
resolution  
5 (1/4000)  
5 (1/3200)  
Overall accuracy  
±0.5% [Full Scale]  
Max. conversion speed  
Max. absolute input  
1 /CH + scan time  
Voltage : ±15V, Current : ±25 ㎃  
4channels/1module  
Number of analog input point  
Between input terminal and PLC power supply  
: Photo coupler isolation  
Isolation  
(No isolation between channels)  
2 points/16 points terminal block  
Terminal connected  
Current  
+5V  
Consumption  
100mA  
Voltage  
DC 21.6 ~ 26.4V  
100 ㎃  
External Power  
Current  
consumption  
supply  
Weight  
300g  
Remark  
Offset/Gain value cant be changed, because it is fixed  
Analog inputting is set the current since this is manufactured.  
It is possible to use to extend max.3 modules  
7-49  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
2) Names of parts and functions  
The Names of parts and functions of the analog input module are following.  
No  
Contents  
RUN LED  
Indicate the operating status the G7F-AD2A  
Analog input terminal  
Voltage input  
Current input  
CH0  
COM0  
V0  
CH0  
COM0  
V0  
·
·
I0  
I0  
24V 24G  
Input  
When current input is used, short the V and I terminal.  
Jumper pin of analog input  
Voltage input  
Current input  
Input  
Select  
Input  
Select  
CH3  
CH2  
CH1  
CH0  
CH0  
CH1  
CH2  
CH3  
V3 COM  
CH  
CH  
CH  
3
CH  
CH  
CH  
3
CH  
CH  
CH  
CHO  
3
2
V0 COM V1 COM V2 COM  
2
2
1
1
1
I0  
·
I1  
·
I2  
·
I3  
·
CHO  
CHO  
I
V
Connect left parts  
by jumper pins  
Connect right parts  
by jumper pins  
External power input terminal  
External voltage 24VDC needs to this terminal.  
Extension cable  
This cable is used to connect while analog input module is  
used.  
Extension cable connector  
The connector connects extension cable when extended  
module is used.  
.
7-50  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
3) Parameter setting  
(1) Scaling function  
The scaling function is the same that of A/D, D/A combination module.  
4) Wiring  
(1) Caution for wiring  
Make sure that external input signal of the mixture module of AC and analog I/O is not affected by induction noise or  
occurs from the AC through using another cable.  
Wire is adopted with consideration about peripheral temperature and electric current allowance. Thicker than Max. size  
of wire AWG22 (0.3 ) is better.  
If wire is put near to high temp. radiated device or contacted with oil for a long time, it may cause of electric leakage so  
that it gets broken or miss-operation during wiring.  
Be sure to connect with care of polarity while connecting to external 24V DC power supply.  
In case of wiring with high voltage line or generation line, it makes induction failure so then it may cause of miss-  
operation and out of order.  
(2) Wiring  
Current  
Voltage  
Terminal  
V0  
Terminal  
V1  
Analog  
Input  
Analog  
Input  
I0  
I1  
COM0  
COM1  
*1  
*1  
*1 : Be sure to use two-core twisted shield wire.  
7-51  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
5) Analog/Digital conversion characteristics  
(1) Analog input characteristics  
a) Voltage input  
4000  
2004  
2003  
2002  
2001  
2000  
2000  
0
0V  
Voltage Input  
5V  
10V  
Analog Input Voltage  
A/D Conversion Characteristics (Voltage Input)  
In voltage input, digital amount 0 is output by 0V input and 4,000 is output by 10V input. Therefore input 2.5mV equals  
to digital amount 1, but value less than 2.5mV cant be converted.  
b) Current input  
4000  
2004  
2003  
2002  
2001  
2000  
2000  
0
0 ㎃  
10 ㎃  
20 ㎃  
Current Input  
Analog Input Current  
A/D Conversion Characteristics (Current Input 020 )  
Current input 0mA becomes output 0, 10mA does 2000 and 20mA does 4000. therefore input 5 equals to digital  
amount 1, but value less tan 5 cant be converted. So abandon it.  
7-52  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
6) Program example  
(1) Distinction program of A/D conversion value(Analog input range: DC420 , 0~10VDC)  
(a) Program explanation  
When digital value of channel 0 is the same or more than 2000 and the same or less than 3000, P090 is on.  
When digital value of channel 1 is the same or more than 2000 and the same or less than 3000, P091 is on.  
When digital value of channel 2 is the same or more than 2000 and the same or less than 3000, P092 is on.  
When digital value of channel 3 is the same or more than 2000 and the same or less than 3000, P093 is on.  
(b) System configuration  
Analog input  
channel 0, “1” : Voltage input (010VDC)  
channel 2, “3” : Current input (DC 420 )  
Parameter setting  
System configuration  
Main Unit A/D conversion module Expansion module  
I/O allocation  
Main unit input : P000 ~ P03F  
Main unit output : P050 ~ P07F  
Expansion module input : P080 ~ P08F  
Expansion module output : P090 ~ P09F  
7-53  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(c) Program  
7-54  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.2.3 D/A Conversion module  
1) Performance specifications  
The performance specifications of the analog output module are following.  
Specifications  
Item  
G7F-DA2I  
G7F-DA2V  
DC 020 ( Load resistance 510)  
Output Range  
DC 420 ( Load resistance 510)  
Classified by parameter  
12bit (04000)  
DC 0 ~ 10V(Lod resistance 2 ㏀∼1 )  
Digital Output  
Number of output  
Max. absolute output  
Maximum  
4channels/1module  
DC +24 ㎃  
DC 12V  
DC 020 : 5 (1/4000)  
DC 420 : 6.25 (1/3200)  
±0.5% [Full Scale]  
2.5 (1/4000)  
resolution  
Overall accuracy  
Max. conversion speed  
0.5 /CH + scan time  
1 /CH + scan time  
Between input terminal and PLC power supply: Photo coupler isolation  
(No isolation between channels)  
Isolation  
Terminal connected  
Current  
16 points terminal block  
8 points terminal block * 2  
20mA  
15mA  
Consumption  
Voltage  
DC 21.6 ~ 26.4V  
80 ㎃  
External  
Power supply  
Current  
consumption  
90 ㎃  
Weight  
280g  
160g  
7-55  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
2) Names of parts and functions  
The Names of parts and functions of the analog input module are following.  
24V 24G  
Inpu  
G7F-DA2I  
PROGRAMMABLE  
LOGIC  
G7F-DA2V  
PROGRAMMABLE  
LOGIC  
CONTROLLER  
CONTROLLER  
24V CH0 CH1 CH2 CH3  
PWR  
24V  
I+  
I+  
I+  
I+  
24G  
I-  
I-  
I-  
I-  
·
V0+ V1+ V2+ V3+  
V0- V1- V2- V3-  
G7F – DA2I  
G7F – DA2V  
RUN LED  
Indicate the operating status the G7F-DA2I  
Analog output terminal  
Current output  
External power input terminal  
External voltage 24VDC needs to this terminal.  
Extension cable  
This cable is used to connect while analog output module is used.  
Extension cable connector  
.
The connector connects extension cable when extended module is used.  
7-56  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
3) Parameter setting  
1) Specify the kind of special module  
2) Set Output type of each channel  
7-57  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
5) Scaling function  
The scaling function is the same that of A/D, D/A combination module.  
6) Wiring  
(1) Caution for wiring  
Make sure that external input signal of the mixture module of AC and analog I/O is not affected by induction noise or occurs  
from the AC through using another cable.  
Wire is adopted with consideration about peripheral temperature and electric current allowance. Thicker than Max. size of wire  
AWG22 (0.3 ) is better.  
If wire is put near to high temp. radiated device or contacted with oil for a long time, it may cause of electric leakage so that it  
gets broken or miss-operation during wiring.  
Be sure to connect with care of polarity while connecting to external 24V DC power supply.  
In case of wiring with high voltage line or generation line, it makes induction failure so then it may cause of miss-operation  
and out of order.  
(2) Wiring  
CH0  
I+  
510Ω  
I−  
*1  
GND  
CH3  
I+  
Less than  
510Ω  
I−  
*1  
GND  
*1 : Be sure to use two-core twisted shield wire.  
Remark  
The common grounding with other devices is permitted when D/A conversion module is used as current  
output type.  
.
CH 0  
Devices  
5
6
D/A  
CH 3  
11  
12  
D/A  
+15V  
DC +24V  
1
2
DC/DC  
AGND  
DC 0V  
Converter  
-15V  
7-58  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7) Digital/Analog conversion characteristics  
(1) G7F-DA2I  
a) 0~20mA output  
20㎃  
10㎃  
5㎂  
10.005㎃  
10.000  
2000 2001 2002 2003 2004 2005  
0㎃  
0  
Digital input  
2000  
4000  
Digital input  
D/A conversion characteristics(Current output)  
Digital amount 0 outputs analog amount 0mA, 4000 does 20mA.Digital input 1 equals to 5 of analog amount.  
b) 4~20mA output  
20mA  
12mA  
6.25 ㎂  
12.006  
12.000  
2000 2001 2002 2003 2004 2005  
4mA  
Digital input  
0  
2000  
4000  
Digital nput  
D/A conversion characteristics(Current output)  
Digital amount 0 outputs analog amount 4mA, 4000 does 20mA.Digital input 1 equals to 6.25 of analog amount.  
7-59  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
8) Program example  
(1) Program which controls speed of inverter by analog output voltage of 5 steps(0 ~ 20mA output)  
a) Program explanation  
When P80 becomes On, 2000 (10mA) is output.  
When P81 becomes On, 2400 (12mA) is output.  
When P82 becomes On, 2800 (14mA) is output.  
When P83 becomes On, 3200 (16mA) is output.  
When P84 becomes On, 3600 (18mA) is output.  
b) System configuration  
Main Unit  
D/A conversion module Expansion module  
I/O allocation  
Main unit input : P000 ~ P03F  
Main unit output : P040 ~ P07F  
Expansion module input : P080 ~ P08F  
Expansion module output : P090 ~ P09F  
c) Program  
7-60  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.2.4 Analog timer  
1) Performance specification  
The performance specification of the analog timer module are following.  
Item  
Number of channels  
Specification  
4
Output value range  
Setting type  
8 Bit (Digital output range: 0 200)  
Setting by variable resistance  
±2.0% (Accuracy about max. value)  
Storing data register automatically  
50 ㎃  
Accuracy of timer  
Operation method  
Internal current consumption  
Number of module installment  
Weight  
Max 3 modules  
200g  
2) Names of parts and functions  
No.  
Name  
Contents  
Indicate the operating status the G7F-AT2A.  
RUN LED  
On: normal operating  
Off: DC 5V power off or the G7F-AT2A module fault  
Setting up the length of timer through variable resistance to every  
channel.  
Channel  
Extension cable  
Extension cable connection terminal  
7-61  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
3) Program example  
(1) Program explanation  
Program which controls on-delay time of output contact point within 0 to 20 sec. By analog timer module.  
(2) System configuration  
Main Unit  
Analog timer module  
(3) Program  
A/T conversion data is moved D000 always  
7-62  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.2.5 RTD input module(Standard type only)  
1) Performance specification  
The performance specification of the RTD input module are following.  
Item  
Specification  
Pt 100 (JIS C1640-1989, DIN 43760-1980)  
JPt100 (KS C1603-1991, JIS C1604-1981)  
Pt 100 : -200 ~ 600(18.48 to 313.59)  
JPt100 : -200 ~ 600(17.14 to 317.28)  
Digital conversion value : 0 to 4,000  
Connectable RTD  
Temperature input range  
Digital output  
Detected temperature value : -2000 to 6000 (one digit after point * 10)  
Each of three wires at every channel has detection function.  
±0.5% [Full Scale]  
Burn out detection  
Accuracy  
Maximum conversion  
speed  
Number of temperature  
input device points  
40 scan / 1 module  
4Channel / 1module  
Photo-coupler insulation between the input terminal and the PLC power  
supply (non-insulation between channels)  
Insulation method  
Connection terminal block  
Current consumption  
8-point terminal block * 2  
25 ㎃  
DC21.6 26.4V  
70 ㎃  
Voltage  
Current  
External power  
supply  
Weight  
240g  
2) Names of parts and functions  
No  
Name  
Contents  
RUN LED  
RTD input  
terminal  
Indicate the operating status the G7F-RD2A  
24V  
24G  
Input  
A
b
B
B
A
b
Terminal which connects Pt100 or JPt100  
External voltage 24VDC needs to this terminal  
CH2  
CH3  
External power  
input terminal  
G7F-RD2A  
PROGRAMMABLE  
LOGIC  
This cable is used to connect while RTD input  
module is used  
CONTROLLER  
Extension cable  
PWR  
CH0  
A
B
CH1  
Extension cable The connector connects extension cable when  
connector extended module is used.  
b
A
b
B
·
·
Explain about names of parts and functions  
7-63  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
3) Parameter setting  
4) Digital conversion value register  
Detected  
Ch.  
Digital conversion  
Data register  
Remark  
Temperature value  
value  
D4780  
D4781  
D4782  
D4783  
D4784  
D4785  
D4786  
D4787  
D4788  
D4789  
D4790  
0
1
2
3
0
1
2
3
0
1
2
D4980  
D4981  
D4982  
D4983  
D4984  
D4985  
D4986  
D4987  
D4988  
D4989  
D4990  
D4880  
D4881  
D4882  
D4883  
Special module  
#1  
Special module  
#2  
D4884  
D4885  
Special module  
#3  
5) Error code ( D4880D4885 )  
bF bE bD bC bB bA b9 b8 b7 b6 b5 b4 b3 b2 b1 b0  
D4880  
CH1  
CH0  
Error code  
0
Description  
Normal run status  
Corrective action  
16(10h)  
17(11h)  
A disconnection detected Fix the A disconnection between RTD input module and RTD.  
B disconnection detected Fix the A disconnection between RTD input module and RTD  
b disconnection detected,  
Fix the A disconnection between RTD input module and RTD. Or,  
A and B disconnection  
detected simultaneously.  
18(12h)  
19(13h)  
Fix the A and B disconnection.  
Temperature outside the Correctly specify the type of the RTD, or use the temperature within  
range  
the range (-200.0°C ~ 600.0°C)  
7-64  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
6) Temperature conversion characteristics  
The RTD input module, as shown below, linearlizes the non-linear characteristic resistance input of the RTD  
7) Digital conversion value  
The RTD input module, as shown below, outputs digital converted value of detected temperature value.(Range 0 ~ 4000)  
Digital conversion value  
4000  
Detected temp. value  
-2000  
0
6000  
Digital Conversion value = (Detected Temp. value+2000)/2  
Example) Assume that Detected temperature value(D4980) is 2345, then real temperature = 234.5, and Digital  
conversion value(D4770) is (2345+2000)/2 = 2172.  
7-65  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
8) Burn-out detection function  
The RTD input module has the function of burn-out detection on the Pt100, JPt100 or cable.  
As shown below, if disconnection occurs in the RTD or cable then a voltage outside the measurable range voltage is  
inputted by the internal burn-out detection circuit and burn-out detection error code is generated.  
The RTD input module can detect disconnection for each channel. But, burn-out detection is possible only in the  
channels enabled.  
If disconnection is detected in two or more wires, first, disconnection error code is generated by band then  
disconnection error code is generated by A’ or bsequentially. If disconnection is detected simultaneously in A’ and  
‘B, only disconnection error code is generated by b.  
Connection  
Method  
2-wire  
Connection Example  
Remark  
burn-out detection area  
- In 4-wire type, only all wires marked '2'  
connected to the terminal block A are all  
detected as disconnection then the A  
disconnection error can be detected.  
type  
3-wire  
type  
burn-out detection area  
4-wire  
type  
burn-out detection area  
*1 : Pt  
No wiring  
*2: Shield wire  
7-66  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
9) Wiring  
(1) Caution for wiring  
Make sure that external input signal of the mixture module of AC and analog I/O is not affected by induction noise or occurs  
from the AC through using another cable.  
Wire is adopted with consideration about peripheral temperature and electric current allowance. Thicker than Max. size of  
wire AWG22 (0.3 ) is better.  
If wire is put near to high temp. radiated device or contacted with oil for a long time, it may cause of electric leakage so that it  
gets broken or miss-operation during wiring.  
Be sure to connect with care of polarity while connecting to external 24V DC power supply.  
In case of wiring with high voltage line or generation line, it makes induction failure so then it may cause of miss-operation  
and out of order.  
(2) Wiring example  
Number of method of connection between Pt and RTD input module are three, that is, 2-wired type, 3-wired type and 4-w  
wired type.  
The resistance of the wires used to connect Pt to RTD input module should be 10 or less per wire.  
The same wire (in thickness, length, and kind, etc.) should be used for each channel.  
Connection  
Method  
Connection Example  
Wire Conditions  
2-wired type  
wire resistance10  
wire resistance10Ω  
wire resistance10Ω  
3-wired type  
4-wired type  
The difference between the resistance values  
of the wires and : 1or less  
The difference between the resistance values  
of the wires and : 1or less  
The difference between the resistance values  
of the wires and : 1or less  
Method of Connection between Pt and RTD Input Module  
*1: RTD (Pt100 or JPt1000)  
*:2: Shielded wire - The shields of the RTD and shields of wire should be connected to the FG of the RTD input module.  
REMARK  
The difference between the resistance values of the wires used should be 1 or less, or the accuracy shown  
in 1) performance specification could not be satisfied.  
7-67  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
10) Program example  
(1) A program for output of detected temperature value as a BCD value  
a) Program explanation  
The present A/D conversion value of the detected temperature value which is detected from the temperature-measuring  
resistor Pt 100 is displayed on the BCD digital display by use of channel 0 of the temperature-measuring resistor input  
module. The lamp turns on when the detected temperature value is a negative number and turns off when it is a positive  
number  
b) System configuration and parameter setting  
RTD input module  
COM0  
Input condition  
(P0000)  
Detected temperature  
Turns on when temperature  
value is negative  
BCD segment  
( P0040 ~ P004F )  
Main unit input contact : P000 ~ P023  
Main unit output contact: P040 ~ P057  
c) Program  
7-68  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.3 Positioning Function(DRT/DT type only)  
The DRT/DT type of MASTER-K120S series support 2 axes of positioning function. The purpose of positioning function is to  
transfer the moving objects by setting speed from the current position and stop them on the setting position correctly. And it also  
control the position of high precision by positioning pulse string signal as it is connected to various servo running devices or  
stepping motor control running devices.  
Pulse  
M
Direction  
Motor  
Driver  
K7M-DRT/DTxxU  
7.3.1 Specification  
1) Performance Specification  
Items  
Specification  
No. of control axis  
Control method  
Control unit  
2 axes  
PTP(Point-To-Point), speed control  
Pulse  
20 data per each axis( Operation step No. : 1 20)  
Positioning data  
Positioning method  
Address range  
Absolute / Incremental method  
-2,147,483,648 2,147,483,647  
Max. 100kpps  
,
Speed setting range : 5 100,000pps(unit of pulse)  
Speed  
Operation pattern : Trapezoidal method  
Acceleration/  
Positioning  
Acceleration time : 0 10,000 (unit of 1ms)  
Deceleration time : 0 10,000 (unit of 1ms)  
Deceleration method  
Backlash compensation 0 ~ 1,000 Pulse  
5 100,000pps  
Bias speed  
Speed limit  
5 100,000pps  
Operation mode  
Operation method  
End, Keep, Continuous operation  
Single, Repeated operation  
Speed setting range: 5 100,000pps  
Speed setting range: 5 100,000pps  
Setting range : 010,000 ㎳  
High speed  
Speed  
Low speed  
Return to  
origin  
Dwell time  
1
Origin detection when approximate origin turns off  
Origin detection after deceleration when approximate origin turns on.  
Origin detection by approximate origin  
Method  
2
3
Speed setting range: 5 100,000pps  
High speed  
JOG  
Speed  
Speed setting range: 5 100,000pps  
Period setting range: 1 20,000 ㎳  
Duty setting range: 0 100%  
Low speed  
PWM Output  
7-69  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
2) Output Specification(P40, P41)  
Signal Name  
Positioning  
Rated load voltage  
DC 12/24V  
Load voltage range  
Max. load current  
Max. voltage drop during On  
DC 0.3V  
DC 10.226.4V  
100 ㎃  
Forward direction  
Reverse direction  
CW/Pulse  
CCW/Directio  
n
3) Names of wiring terminal  
AC220V  
FG  
P40  
P41  
P42  
P
P44  
COM3  
Stepping motor  
COM0 COM1 COM2 P43  
Motor driver  
⑤ ①  
⑤ ②  
③④  
Direction pulse  
COM  
Pulse output  
No.  
Terminal No.  
P040  
Name  
Usage  
Positioning(Ch0)  
Positioning(Ch1)  
Pulse output terminal  
Pulse output terminal  
P041  
P042  
P043  
Direction pulse(Ch0)  
Direction pulse(Ch1)  
Common  
Direction output terminal  
Direction output terminal  
Common terminal  
COM0,COM1,COM2  
P
24V  
External 24V supply terminal  
Remark  
Positioning function is sensitive to the external noise and should be handled with special care.  
1) Be sure to use shielded twisted pair cables. Also provide Class 3 grounding  
2) Do not run a twisted pair cable in parallel with power cables or other I/O lines which may generate noise  
3) Before applying a power source for pulse generator, be sure to use a noise-protected power supply  
7-70  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
4) Internal circuit and wiring example  
P - Power supply(DC 12/24V)  
P40 – pulse output(Ch0)  
R
COM0 – Output common 0  
P41 – pulse output(Ch1)  
R
Internal  
COM1 – Output common 1  
P42 – Direction pulse(Ch0)  
circuit  
R
R
P43 – Direction pulse(Ch1)  
COM2 – Output common 2  
Motor driver  
For Ch0  
(24V)  
P
P40 pulse output(Ch0)  
R
R
R
COM0 Output common 0  
P41 pulse output(Ch1)  
R
COM1 Output common 1  
P42 Direction pulse(Ch0)  
P43 Direction pulse(Ch1)  
Internal  
Motor driver  
For Ch1  
(24V)  
circuit  
R
R
R
R
COM2 Output common 2  
+
-
DC 24V  
7-71  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.3.2 Positioning function  
1) Positioning function  
Positioning Control includes position control, speed control.  
(1) Position control  
Positioning control from start address (present stopped position) to goal address (transfer amount) for the assigned axis  
A) Control by Absolute method (Absolute coordinate)  
Positioning control from start address to goal address (the address assigned by positioning data).  
Positioning control is carried out based on the address assigned (origin address) by return to origin.  
Transfer direction shall be determined by start address and goal address.  
Start address < Goal address : forward direction positioning  
Start address > Goal address : reverse direction positioning  
Example] When Start address is 1000 and goal address is 8000, this will be forward direction and transfer amount  
shall be 7000 (7000=8000-1000).  
0
1000  
8000  
Transfer amount :7000  
Start address  
Goal address  
Parameter setting  
Dwell time(  
)  
Items of positioning data Step No. Coordinate Operation mode Operation method  
Setting Absolute End Single  
Goal address  
8,000  
Speed(pps)  
5,000  
1
100  
B) Control by Incremental method (Relative coordinate)  
Positioning control as much as the goal transfer amount from start address.  
Transfer direction shall be determined by the sign of transfer amount.  
When transfer direction is (+) or no sign : forward direction (address increase) positioning  
When transfer direction is (-) : reverse direction (address decrease) positioning  
Start Address  
Normal  
Reverse  
Transfer direction when transfer amount (-)  
Transfer direction when transfer amount (+)  
Example) When start address is 5000 and goal address is -7000, this will be reverse direction and positioning will be at  
the point of 2000  
-2000  
0
5000  
Reverse positioning control (transfer amount-7000)  
Goal address  
Start address  
Parameter setting  
Items of positioning data  
Setting  
Dwell time(  
)  
Step No. Coordinate  
Operation mode Operation method  
End Single  
Goal address  
-7,000  
Speed(pps)  
5,000  
1
Incremental  
100  
7-72  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(2) Speed Control (Uniform Speed Operation)  
This controls the speed by the setting speed until deceleration stop command(POSCTR) is entered after execution by  
POSVEL command..  
The speed can be changed by the speed override instruction(POSSOR)  
Speed control contains 2 types of start method : Forward direction start and Reverse direction start.  
- Forward direction : when position address is positive number (+) (“0” included)  
- Reverse direction : when position address is negative number (-)  
Forward direction  
Reverse direction  
Set second operand of POSVEL instruction to 0 Set second operand of POSVEL instruction to 1  
Timing diagram  
Speed  
Setting speed  
Dwell time  
Time  
On  
Speed control command  
(POSVEL)  
On  
Deceleration stop command  
(POSCTR)  
Remark  
Please refer to the ‘7.3.4 Instruction’ for details.  
7-73  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
2) Operation pattern  
Operation pattern describes various configuration for how to operate the positioning data using several operation step no  
and how to determine the speed of position data.  
Operation mode types are as follows  
Operation mode  
End  
Remark  
One operation step is executed with one start command  
Keep  
When one operation step has over, executes next operation step without additional start command  
When one operation step has over, executes next operation step without Deceleration.  
Continuous  
Operation methods are as follows.  
Operation method  
Remark  
Single  
When one operation step is over, executes next operation step No. automatically  
When one operation step is over, executes assigned step No. repeatedly  
Repeat  
Step No. can be assigned within 1 ~ 20  
Operation  
mode  
Operation  
method  
Dwell time  
Step No. Coordinate  
Address  
Speed(pps)  
Items of parameter  
(
)
End  
Keep  
Continuous  
-2.147,483,648  
~
2,147,483,647  
5
~
0
~
Absolute  
1 ~ 20  
Single  
Repeat  
Setting  
Incremental  
100,000  
10,000  
7-74  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
3) Operation Mode  
(1) End Operation  
A) With one time start command(rising edge of POSIST command), the positioning to the goal position is executed and  
the positioning shall be completed at the same time as the dwell time proceeds.  
B) This operation mode can be used as last positioning data of pattern operation.  
C) Operation direction shall be determined by position address.  
D) Operation action is trapezoid type operation that has acceleration, constant, deceleration section according to the  
setting speed and position data.  
Speed  
Dwell time  
Time  
On  
Start command  
(POSIST)  
[Example] End operation  
Speed  
Operation  
step no.: 3  
Operation  
step no.: 1  
Operation  
step no.: 2  
Operation  
step no.: 4  
Time  
On  
Start command  
Parameter setting  
No. of program  
start command  
1
Step  
Operation  
Operation  
method  
Single  
Speed  
(pps)  
Dwell time  
Coordinate  
Goal address  
()  
No.  
1
mode  
End  
Absolute  
Absolute  
Absolute  
Absolute  
10,000  
20,000  
30,000  
40,000  
50,000  
0
2
3
4
2
3
4
End  
End  
End  
Single  
Single  
Single  
20,000  
50,000  
20,000  
0
0
0
7-75  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(2) Keep Operation  
A) With one time Start command(POSIST), the positioning to the goal position of operation step is executed and the  
positioning shall be completed at the same time as dwell time proceeds and without additional start command, the  
positioning of operation step for (current operation step no. +1) shall be done.  
B) Keep operation mode is available to execute several operation step in order.  
C) Operation direction shall be determined by position address.  
[ Example ] Keep operation  
Speed  
Operation step 1  
Operation step 1  
Operation step 2  
Operation step 2  
Time  
On  
Start command  
(POSIST)  
Dwell time  
Dwell time  
Parameter setting  
No. of program  
start command  
1
Step  
No.  
1
Operation  
mode  
Operation  
method  
Single  
Speed  
(pps)  
Dwell time  
Coordinate  
Goal address  
()  
Absolute  
Absolute  
Absolute  
Absolute  
Keep  
10,000  
20,000  
30,000  
40,000  
50,000  
10  
2
3
4
Keep  
End  
Single  
Single  
Single  
20,000  
50,000  
20,000  
10  
0
2
End  
0
7-76  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(3) Continuous Operation  
A) With one time Start command, the positioning for operation step set by continuous operation mode is executed to the  
goal position without stop and the positioning shall be completed at the same time as dwell time proceeds.  
B) If you want to operate with the position and speed of next step before the operation step that is active currently  
reaches the goal position, the operation by Next Move continuous operation command is available.  
C) With Next Move continuous operation command, the operation in the acceleration, constant speed, deceleration  
section of Continuous operation is available.  
D) Operation direction shall be determined by position address and should be same direction. If operation direction is not  
same, error occurs(Refer to 7.3.5 error flags)  
[ Example ] Continuous operation  
Speed  
Operation step 2  
Time  
Operation step1  
On  
Start command  
(POSIST)  
Parameter setting  
No. of program  
start command  
1
Step  
No.  
1
Operation  
mode  
Operation  
method  
Single  
Speed  
(pps)  
Dwell time  
Coordinate  
Goal address  
()  
Absolute  
Absolute  
Continuous  
10,000  
20,000  
50,000  
10  
10  
2
End  
Single  
20,000  
7-77  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
4) Operation Method  
(1) Repeat Operation  
A) With one time start command, the positioning to the goal position is executed and the positioning shall be completed at  
the same time as the dwell time proceeds.  
B) The operation type of Repeat operation mode is same as that of Single operation but the different thing is to determine  
next operation by operation step no. assigned by repeat step no. change command after positioning completion of  
Repeat operation mode.  
C) Operation direction shall be determined by position address.  
[Example] Repeatpattern  
Speed  
Operation step 1  
Operation step 1  
Operation step 2  
Operation step 2  
Time  
On  
Start command  
(POSIST)  
Parameter setting  
No. of program  
start command  
1,3  
Step  
No.  
1
Operation  
mode  
Operation  
Speed  
(pps)  
Dwell time  
Coordinate  
Goal address  
()  
method  
Single  
Incremental  
Incremental  
Absolute  
End  
10,000  
20,000  
30,000  
40,000  
50,000  
0
2,4  
2
3
4
End  
End  
End  
Repeat 1  
Single  
20,000  
50,000  
20,000  
0
0
0
Absolute  
Single  
In this case, Operation step 3, 4 does not start.  
7-78  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
5) Positioning start  
(1) Direct start(POSDST)  
This is used to operate directly by setting the axis, goal position address, operation speed without parameter setting.  
Refer to the ‘7.3.4 Instruction’ for details.  
(2) Indirect start(POSIST)  
This is used to operate by setting the operation step no. by parameter.  
Refer to the ‘7.3.4 Instruction’ for details.  
(3) Speed control start(POSVEL)  
This is used to operate directly by setting the axis, direction, operation speed without parameter setting.  
The speed can be changed by the speed override instruction(POSSOR)  
Refer to the ‘7.3.4 Instruction’ for details.  
6) Positioning stop  
(1) Deceleration stop(POSCTR)  
If encounters deceleration stop command during operation, it stop operation after deceleration.  
In case of deceleration stop by deceleration stop command in acceleration or constant speed section, starts to operate  
current operation step again by Start command and operation step  
In case of deceleration stop by deceleration stop command in deceleration speed section, starts to operate ‘current  
operation step+1’ again by Start command and operation step  
Refer to the ‘7.3.4 Instruction’ for details.  
(2) Emergency stop(POSCTR)  
If encounters emergency stop command during operation, it stops operation without deceleration.  
When emergency stop has occurs, emergency stop error and output disable flag are set.  
Error and output disable flag should be reset by error reset command of POSCTR for re-start operation  
Refer to the ‘7.3.4 Instruction’ for details.  
7-79  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7) Return to Origin(POSORG : Rising edge )  
Return to Origin (homing) is carried out to confirm the origin of the machine when applying the power.  
In case of Return to Origin, it is required to set Return to Origin parameter for each axis.  
If the origin position is determined by origin return, the origin detection signal is not recognized during positioning operation.  
(1) Origin return method  
Method by approximate origin (approach DOG)  
- Origin return processing method by approximate origin (approach DOG) has 3 kinds of method as follows.  
(A) Origin detection when approximate origin turns off  
(B) Origin detection after deceleration when approximate origin turns on  
(C) Origin detection by approximate origin  
The items that effects to the origin return from parameter are as follows.  
(A) Origin return speed (high speed, low speed)  
(B) Origin return dwell time  
(2) Origin Detection when Approximate origin turns off  
This is the method using the approximate origin and origin signal and the action by origin return command(POSORG) is as  
follows.  
(A) It accelerates to the setting origin return direction and acts by origin return high speed.  
(B) In this case, if approximate origin as external input is entered, it decelerates and acts by origin return low speed.  
(C) If origin signal as external input is entered after the approximate origin signal has changed from ”On” to “Off”, it stops.  
Speed  
Deceleration when approximate return “ON”  
Origin return high speed  
Origin return low speed  
Time  
Transfer amount after approximate origin “ON”  
While the approximate origin “ON”,  
Approximate origin signal  
the origin will not be determined by  
the origin signal.  
Origin signal  
1 rotation of SERVO motor (PG1 rotation)  
Origin return  
command  
7-80  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(3) Origin Detection after Deceleration when Approximate origin turns on  
This is the method using the approximate origin and origin signal and the action by origin return command is as follows.  
(A) It accelerates to the setting origin return direction and acts by origin return high speed.  
(B) In this case, if approximate origin as external input is entered, it decelerates and acts by origin return low speed.  
(C) If encounters the origin signal as external input signal while the origin return low speed is active, the origin shall be  
determined and it stops.  
Speed  
Deceleration when approximate return “ON”  
Origin return high speed  
Origin return low speed  
Time  
Transfer amount after approximate origin “ON”  
Approximate  
origin signal  
When origin return speed decelerates  
by approximate origin, the origin will  
not be determined by the origin signal.  
Origin signal  
1 rotation of SERVO motor (PG1 rotation)  
Origin return  
command  
(4) Origin Detection by approximate origin  
This is the method using the approximate origin signal only.  
Normal rotation  
Direction conversion at the rising edge of approximate origin signal  
Direction conversion at the falling edge of approximate origin signal  
Origin return high speed  
Origin return low speed  
Time  
Origin determination  
Reverse rotation  
External input high limit  
Origin return  
command  
Origin determined  
state  
7-81  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
8) JOG Operation (POSJOG : Level input)  
(1) JOG operation  
Carries out the positioning control by Jog command(POSJOG).  
Carries out the monitoring when the positioning acts by JOG command and the position address is changed.  
This is used when acting without origin determination.  
(2) Acceleration/Deceleration Processing and Jog speed  
(A) The acceleration/deceleration processing is controlled based on the setting time of JOG acceleration/ deceleration  
time from parameter setting.  
Jog high speed operation : operation pattern with acceleration/deceleration  
Speed  
Time  
Jog low speed operation : operation pattern without acceleration/deceleration  
Speed  
Time  
(B) If speed operand of POSJOG command as device not constant, JOG speed can be changed from low speed to high  
speed or high speed to low speed during operation  
(C) If Jog speed is set out of the setting range, error will occur and the operation does not work.  
5100,000 pps  
Jog high speed operation  
Jog low speed operation  
Setting range  
(Setting unit :1pps)  
5100,000 pps  
9) Speed Override Command(POSSOR : Rising edge ))  
This is used to change the operation speed from operation data of step no. in operation of each axis  
This command is used only in Acceleration and Constant speed section from operation pattern.  
Setting range is 5 ~ 100,000  
This command can be used in position control and speed control.  
Remark  
If POSSOR is executed in deceleration section, error code H44 will occur and continues operation  
7-82  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
10) External Input Stroke High/Low Limit  
External input stroke limit includes External input high limit signal and External input low limit signal.  
This is used to stop the positioning function promptly before reaching Stroke limit/Stroke End of the Driver by installing the  
stroke limit inside Stroke limit/Stroke end of the Driver.  
If it deviates the high limit, Error H53 will occur and if it deviates the low limit, Error H54 will occur.  
External input stroke limit can be set in KGLWIN parameter  
High/Low limit input contact point is fixed to P0,P1 for ch0 and P2,P3 for ch1.  
High  
Low  
The range available to positioning  
Stopper  
Stopper  
Transfer direction  
Transfer direction  
Start  
Start  
Immediate stop when  
Detecting the high limit  
Immediate stop when  
Detecting the low limit  
Limit switch  
Limit switch  
K120S  
Driver  
If positioning module stops out of the range available to control, the positioning operation does not work.  
If it stops by external input stroke limit detection, move within the range of positioning module available to control by  
manual operation (Jog operation).  
As external input stroke high/low limit error is detected by the edge of positioning module, it is available to release the  
output prohibit out of stroke range and carry out manual operation.  
The flags related with external input stroke limit are as followings.  
- F284(Ch0) Off : External input stroke Low limit has not detected, On : External input stroke Low limit has detected  
- F285(Ch0) Off : External input stroke High limit has not detected, On : External input stroke High limit has detected  
- F304(Ch1) Off : External input stroke Low limit has not detected, On : External input stroke Low limit has detected  
- F305(Ch1) Off : External input stroke High limit has not detected, On : External input stroke High limit has detected  
Point  
If external input stroke High/Low limit signal is occur during origin return, it stops operation immediately,  
Then, changes direction and continues origin return operation.  
11) M Code function(After Mode)  
This function made to set “M Code Set” bit, if “M Code Enable“ bit was “On” when positioning was completed.  
And Then “M code Set” bit must reset for run to the next step.  
Used special relay.  
Device  
M1911  
M1912  
M1913  
M1914  
Description  
Remark  
M Code Enable Bit(Ch0)  
M Code Set Bit(Ch0)  
M Code Enable Bit(Ch1)  
M Code Set Bit(Ch1)  
On : Set up ”M Code” function  
If positioning complete then “set”  
On : Set up a “M Code” function  
If positioning complete then “set”  
7-83  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
Timing diagram  
1) Unused the M Code Output  
Continues  
End  
Positioning  
Indirect start  
Completed Flag  
Current step  
M-th step  
N-th step  
2) Use the M Code  
Continues  
End  
Positioning  
Indirect start  
Completed Flag  
Current step  
M1911  
M-th step  
N-th step  
M1912  
Reset in the program  
Reset in the program  
12) Error and Output Prohibition  
Error includes Light failure error and Heavy failure error.  
If light failure error occurs, the positioning operation will continue and only error will occur.  
In case of heavy failure error, if the error is not cleared, it is not available to carry out the positioning operation. And if the  
heavy failure error occurs during operation, the operation will stop.  
If external high/low limit, external emergency stop during the positioning operation are detected during the positioning  
operation, it stops promptly and becomes the pulse output prohibition status. Thus it is required to release the pulse  
output prohibition by Error reset command(POSCTR)  
For further information, please refer to Error code list .  
7-84  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.3.3 Positioning parameter and operation data  
1) Positioning parameter  
Positioning parameter setting  
Parameter should be assigned for each axis  
Basic parameter  
(1) Basic parameter  
(A) Acceleration/Deceleration time  
This is applied at the starting/ending point of positioning operation, return to origin high speed, and JOG high speed  
operation  
The setting range is 0 10,000 (unit: 1ms) for each axis.  
When set to zero, operates constant speed.  
Acceleration time : the time required to reach from speed “0”(stop state) to the speed limit which is set by  
parameter. In case of using BIAS, it is the time required to reach from the bias speed to the speed limit which is  
set by parameter.  
Deceleration time : the time required to reach from the speed limit set by parameter to the speed “0”(stop state).  
In case of using BIAS, it is the time required to reach from the speed limit set by parameter to the setting bias  
speed.  
Speed limit  
- Speed limit : max. speed available  
to set for positioning operation at  
the parameter of KGLWIN.  
Speed  
- Setting speed : speed value of  
operation data that position data  
operates actually.  
Setting speed  
Actual  
deceleration time  
- Actual acceleration time : the time  
required to reach from speed  
“0”(stop state) to the speed value  
which is set by operation data.  
- Actual deceleration time : the time  
required to reach from the speed  
value set by operation data to  
speed  
Actual acceleration time  
Time  
Deceleration  
time  
Acceleration  
time  
7-85  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(B) Backlash Compensation Amount  
The tolerance that the machine does not work by the wear when the rotation direction changes in case that a gear,  
screw etc is combined to run at the motor axle, is called as ‘Backlash”.  
Therefore, when you change the rotation direction, it is required to add the backlash compensation amount to the  
positioning amount for output.  
The setting range is 0 1,000(unit: Pulse) at each axis.  
If the position moved 1m to the right and again 1m to the left, it is not possible to reach the original position by  
backlash. At this time, it is required to add backlash compensation amount.  
Gear  
1m movement right side (normal)  
Direction change  
1m movement left side (reverse)  
Backlash  
Transfer amount including Backlash compensation amount  
Backlash  
(C) Bias Speed  
As the stepping motor has unstable torque near zero speed, the start speed shall be set in the beginning of operation  
in command to smooth the rotation of motor and reduce the positioning time. The speed to be set at this time is called  
“Bias Speed”.  
The setting range is 510,000(unit: 1pps) at each axis.  
Bias speed shall be used for the main axis of  
positioning operation by setting command,  
origin return operation,  
JOG operation.  
Speed  
Speed limit  
Bias speed  
setting action  
Positioning speed  
Origin return speed  
JOG Speed  
Bias speed not-setting  
action  
Interpolation operation  
speed  
Bias speed  
Time  
Acceleration  
time  
Deceleration  
time  
(D) Speed Limit  
max. Speed available to set for positioning operation.  
The setting range is 5~100,000 (unit : 1pps).  
The operation speed of positioning operation, origin return speed and Jog operation speed is influenced by speed  
limit and if they are set as higher value than speed limit, error will occur.  
7-86  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(2) Origin return parameter  
(A) Origin return method  
For the details, please refer to ‘7) Return to Origin’ in chapter 7.3.2  
(B) DOG, origin signal  
Ch 0  
Ch 1  
DOG  
P0005  
P0007  
P0006  
Origin  
P0004  
(C) Origin return speed  
The speed when returning to the origin by origin return command : high speed and low speed  
When setting the origin return speed, it should be “speed limit origin return high speed origin return low  
speed bias speed”.  
Origin return high speed  
The speed that acts to the constant speed section via acceleration section by origin return command.  
Origin return-high speed setting range : 5 100,000(unit: 1pps)  
Origin return-Low speed  
The speed that acts to the constant speed section via deceleration section by origin return command.  
Origin return-low speed setting range : 5 100,000(unit: 1pps)  
Remark  
When setting the origin return speed, it is recommended to set the origin return-low speed as low speed as  
possible. If setting the low speed as “too fast”, it may cause the incorrect origin signal detection.  
(D) Dwell Time  
This is the time needed to maintain the precise stop accuracy of SERVO motor when using the SERVO motor for  
positioning.  
Practically, Dwell time is the time needed to remove the residual pulse of deviation counter after completion of  
positioning and especially Dwell time when returning to the origin is called as “origin return dwell time”.  
Setting range of Origin return dwell time : 0 10,000(unit: 1 )  
7-87  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(3) JOG speed  
(A) JOG High Speed  
JOG high speed operation has operation pattern as acceleration, constant speed, deceleration section. Therefore,  
acceleration section and deceleration section is controlled by JOG acceleration/deceleration time.  
JOG high speed setting range : 5 100,000(unit: 1pps)  
(notices when setting the high speed : Bias speed Jog high speed Speed limit)  
(B) JOG Low Speed  
JOG low speed operation has only constant speed operation pattern.  
JOG low speed setting range : 5100,000 (unit: 1pps)  
2) Positioning parameter  
Here describes Positioning parameter  
(1) Step No.  
The setting range of positioning data as serial no. is 1 20.  
Remark  
If step No. set to 0, operating step increase to next step automatically when current operation step finished  
7-88  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(2) Coordinate  
The coordinate of position data includes Absolute and Incremental  
(A) Absolute Coordinate (Control by Absolute method)  
This carries out the positioning control from the current position to the goal position (the goal position assigned by  
positioning data).  
Positioning control is carried out based on the assigned position of origin return or POSPRS command  
(origin address).  
Transfer direction shall be determined by the current position and goal position.  
- Start position < Goal position : forward direction positioning  
- Start position > Goal position : reverse direction positioning  
(B) Relative Coordinate (Control by Incremental method)  
This carries out the positioning control as much as goal transfer amount from the current position.  
Transfer direction shall be determined by the sign of transfer amount.  
- When transfer direction is (+) or no sign : normal direction positioning (position increase direction)  
- When transfer direction is ( - ) : reverse direction positioning (position decrease direction)  
Current position  
Reverse  
Normal  
Transfer direction when transfer amount is (+)  
Transfer direction when transfer amount is (-)  
(3) Operation Mode (End / Keep / Continuous)  
Operation Mode is divided into following three kinds.  
For the details, please refer to ‘3) Operation mode’ in chapter 7.3.2  
Control method  
Position control  
Operation mode  
End  
Keep  
Continuous  
(4) Operation Method (Single/Repeat)  
Select operation method : Single operation or Repeat operation.  
For the details, please refer to ‘4) Operation method’ in chapter 7.3.2  
Control method  
Operation method  
Single  
Position control  
Repeat  
(5) Positioning Address  
This is the area to set the transfer amount of position data as “positioning address”.  
The setting range is –2,147,483,648 2,147,483,647(setting unit: Pulse).  
The change of position address value is available when assigned by D area  
7-89  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
(6) Speed  
Operation speed can be assigned for each operation step No.  
Setting range of operation speed : 5 ~ 100,000( Setting unit: 1pps )  
The change of speed value is available when assigned by D area  
(7) Dwell Time  
This is the waiting time before carrying out the next positioning operation after completing one positioning operation.  
Setting range is 0 10,000 (setting unit : 1 ).  
Especially, in case of using SERVO motor, this is the data to set the waiting time by the stable stop state as positioning  
module is in the stop state but actual SERVO motor does not reach to the goal position or in transition state.  
7-90  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.3.4 Instructions  
1) Positioning Indirect start(POSIST)  
POSIST  
Positioning Indirect Start  
Flag  
Available device  
No. of  
steps  
Instruction  
Error  
(F110)  
Zero  
(F111)  
Carry  
(F112)  
M
P
K
L
F
T
C
S
D
#D  
integer  
S
n
5
○ ○ ○ ○ ○ ○ ○  
○ ○  
Designation  
Flag set  
S
n
Channel which is designated at parameter(0~1)  
Starting step No.(0~20)  
Error  
Error flag turns on when designating area is over  
and the instruction isn’t executed  
(F110)  
When designated as 0, starting step is increased  
automatically  
POSIST  
S
n
(1) Functions  
When input condition turns on, corresponding positioning control starts from assigned step No.  
Positioning operation is edge triggered.  
(2) Example program  
When input condition turns on, Ch.0 starts positioning from Step no.1  
7-91  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
2) JOG Operation(POSJOG)  
POSIST  
Positioning Indirect Start  
Flag  
Available device  
No. of  
steps  
Error  
(F110)  
Zero  
(F111)  
Carry  
(F112)  
Instruction  
M
P
K
L
F
T
C
S
D
#D  
integer  
S
7
n1  
n2  
○ ○ ○ ○ ○ ○ ○  
○ ○ ○ ○ ○ ○ ○  
Designation  
Flag set  
S
Ch. for JOG operation(0~1)  
Error flag turns on when designating area is over  
and the instruction isn’t executed  
Error  
Direction( 0 : Forward, 1: Backward)  
n1  
n2  
(F110)  
Speed (0 : Low speed,1: High speed)  
POSJOG  
S
n1 n2  
(1) Functions  
When input condition turns on, corresponding Ch. Starts JOG operation.  
If input condition turns off, corresponding Ch stops JOG operation.  
The speed can be changed during operation but the direction can’t be changed.  
(2) Example program  
When input condition M0000 turns on, Ch.1 starts JOG operation by designated direction(M0001) and speed(M0002)  
When input condition turns off, Ch.1 stops JOG operation.  
7-92  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
3) Positioning Control Instruction(POSCTR)  
POSCTR  
Positioning control instruction  
Flag  
Available device  
No. of  
steps  
Instruction  
Error  
(F110)  
Zero  
(F111)  
Carry  
(F112)  
M
P
K
L
F
T
C
S
D
#D  
integer  
S
5
n1  
○ ○ ○ ○ ○ ○ ○ ○ ○ ○  
Designation  
Flag set  
S
Channel designation(0~1)  
Error  
Control instruction designation  
Error flag turns on when designating area is over  
(F110)  
n1  
0: Deceleration stop. 1:Emergency stop.  
2: Error reset  
POSCTR  
S
n1  
(1) Functions  
Operates designated control operation at the rising edge of input condition.  
- Deceleration stop : Stops positioning after deceleration  
- Emergency stop : Stops positioning immediately without deceleration  
- Error Reset : Resets occurred error and output prohibition signal.  
(2) Example program  
When input condition M0000 turns on, Ch.1 stops positioning after deceleration.  
7-93  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
4) Current position preset (POSPRS)  
POSPRS  
Current position preset  
Flag  
Available device  
No. of  
steps  
Instruction  
Error  
(F110)  
Zero  
(F111)  
Carry  
(F112)  
M
P
K
L
F
T
C
S
D
#D  
integer  
S
5/7  
SV1  
○ ○ ○ ○ ○ ○ ○ ○ ○ ○  
Designation  
Flag set  
S
Channel designation(0~1)  
Error  
Error flag turns on when designating area is over  
Preset value designation  
(F110)  
SV1  
(-2,147,483,648 ~ 2,147,483,647)  
POSPRS  
S
SV1  
(1) Functions  
Current address is changed to preset value at the rising edge of input condition.  
(2) Example program  
When input condition M0000 turns on, Address of Ch.0 is changed to 100,000.  
7-94  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
5) PWM output (PWM)  
PWM  
PWM(Pulse Width Modulation) output  
Flag  
Available device  
No. of  
steps  
Instruction  
Error  
(F110)  
Zero  
(F111)  
Carry  
(F112)  
M
P
K
L
F
T
C
S
D
#D  
integer  
S
7
SV1  
SV2  
○ ○ ○ ○ ○ ○ ○  
○ ○ ○ ○ ○ ○ ○  
○ ○  
○ ○  
Designation  
Flag set  
S
Ch. for PWM output(0~1)  
Error flag turns on when designating area is over  
and the instruction isn’t executed  
Error  
PWM output period( 1 ~ 20000)[ms]  
Off Duty(0 ~ 100%)  
SV1  
SV2  
(F110)  
PWM  
S
SV1 SV2  
(1) Functions  
When input condition turns on, Output pulses which have period as SV1.  
Duty ratio of pulses is assigned by SV2.  
When input condition turns off, PWM operation stops  
(2) Example program  
When input condition turns on, Output pulses as below  
Positioning Ch 1(P41)  
50ms  
450ms  
Input condition(M0000)  
500ms  
7-95  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
6) Speed control operation (POSVEL)  
POSVEL  
Speed control operation  
Flag  
Available device  
No. of  
steps  
Instruction  
Error  
(F110)  
Zero  
(F111)  
Carry  
(F112)  
M
P
K
L
F
T
C
S
D
#D  
integer  
S
7/9  
n1  
SV  
○ ○ ○ ○ ○ ○ ○ ○  
○ ○ ○ ○ ○ ○ ○  
○ ○  
Designation  
Flag set  
S
Ch. for speed control(0~1)  
Error flag turns on when designating area is over  
and the instruction isn’t executed  
Error  
Operation direction(0:Forward, 1:Reverse)  
Speed (5 ~ 100,000pps)  
n1  
SV  
(F110)  
POSVEL  
S
n1 SV  
(1) Functions  
When input condition turns on(Rising edge), Corresponding Ch. Starts speed control by designated direction and speed.  
(2) Example program  
When input condition(M0000) turns on, Ch. 0 starts speed control by designated direction(M0001) and 10kpps.  
Speed can be changed by POSSOR instruction.  
Operation stops after deceleration by POSCTR instruction.  
7-96  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7) Speed override (POSSOR)  
POSSOR  
Instruction  
Speed override instruction  
Flag  
Available device  
No. of  
steps  
Error  
(F110)  
Zero  
(F111)  
Carry  
(F112)  
M
P
K
L
F
T
C
S
D
#D  
integer  
S
5/7  
SV  
○ ○ ○ ○ ○ ○ ○  
○ ○  
Designation  
Flag set  
S
Ch. for speed override(0~1)  
Speed (5 ~ 100,000pps)  
Error  
Error flag turns on when designating area is over  
and the instruction isn’t executed  
(F110)  
SV  
POSSOR  
S
SV  
(1) Functions  
When input condition turns on(Rising edge), Operation speed of corresponding Ch. changed to designated speed.  
This instruction is valid to current operating channel only  
Speed changing within deceleration section is not available.  
(2) Example program  
When input condition(M0000) turns on, Operation speed of Ch. 0 is changed to 10kpps.  
7-97  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
8) Positioning direct start(POSDST)  
POSDST  
Positioning direct start  
Flag  
Available device  
No. of  
steps  
Instruction  
Error  
(F110)  
Zero  
(F111)  
Carry  
(F112)  
M
P
K
L
F
T
C
S
D
#D  
integer  
S
n1  
○ ○ ○ ○ ○ ○ ○ ○  
○ ○ ○ ○ ○ ○ ○  
○ ○ ○ ○ ○ ○ ○  
9/11/13  
SV1  
SV2  
○ ○  
○ ○  
Designation  
Flag set  
S
Ch. for positioning direct start(0~1)  
Absolute/Incremental coordinate designation  
(0:Absolute, 1:Incremental)  
Positioning address  
n1  
Error  
Error flag turns on when designating area is over  
and the instruction isn’t executed  
(F110)  
SV1  
SV2  
( -2,147,483,648 ~ 2,147,483,647)  
Positioning speed (0 ~ 100,000pps)  
POSDST  
S
n1 SV1 SV2  
(1) Functions  
When input condition turns on(Rising edge), corresponding Ch. starts positioning by designated coordinate, address and speed  
(2) Example program  
When input condition(M0000) turns on, Ch. 0 outputs 100,000 pulses by designated coordinate(M0001), forward  
direction and speed of 10kpps.  
Acceleration/deceleration time is applied by corresponding parameter  
7-98  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
9) Return to origin(POSORG)  
POSORG  
Return to origin  
Flag  
Available device  
No. of  
steps  
Instruction  
Error  
(F110)  
Zero  
(F111)  
Carry  
(F112)  
M
P
K
L
F
T
C
S
D
#D  
integer  
S
7
n1  
SV  
플래그 Set  
영역설정  
S
Ch. for origin return(0~1)  
Error flag turns on when designating area is over  
and the instruction isn’t executed  
Error  
Operation direction(0:Forward, 1:Reverse)  
Address (5 ~ 100,000pps)  
n1  
(F110)  
SV  
POSORG  
S
n1 SV  
(1) Functions  
When input condition turns on, corresponding origin return operation starts(Rising edge trigger)  
After operation, Current address is preset to designated origin address  
(2) Example program  
When input condition(M0000) turns on, Ch. 0 operates return to origin function by designated direction and address  
After return to origin operation, position address become the value in D0002 and D0003.  
7-99  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.3.5 Flag list and Error codes  
1) Flag list  
Device  
Function  
Description  
F0280  
F0281  
F0282  
F0283  
F0284  
F0285  
F0286  
F0287  
F0288  
F0289  
F028A  
F028B  
F028C  
F0290  
F0291  
F0292  
F0293  
F0294  
F0295  
F0300  
F0301  
F0302  
F0303  
F0304  
F0305  
F0306  
F0307  
F0308  
F0309  
F030A  
F030B  
F030C  
Operating flag  
Operation status of Ch0 (0: stop, 1:Busy)  
Error status of Ch0 (0: normal, 1: error)  
Indicates end of operation for Ch0 (0: operating, 1: End) *1Scan On  
Indicates end of origin return operation of Ch0(0:operating, 1: End)  
Indicates stroke low limit detection of Ch0  
Indicates stroke high limit detection of Ch0  
Indicates emergency stop status Ch0 (0: enable, 1: Disable)  
Output prohibition of Ch0 (0: enable, 1: disable)  
Operation direction of Ch0 (0: Forward, 1: Backward)  
Accelerating Ch0  
Error status  
End of positioning  
End of Origin return  
Low limit detection  
High limit detection  
Emergency stop status  
Output prohibition  
Direction  
Acceleration  
Constant speed  
Deceleration  
Constant speed operation of Ch0  
Decelerating Ch0  
Dwelling  
Dwelling Ch0  
Position control  
Speed control  
Position control operation of Ch0  
Speed control operation of Ch0  
Return to origin  
JOG low speed  
JOG high speed  
PWM operation  
Operating flag  
Error status  
Return to origin operation of Ch0  
JOG low speed operation of Ch0  
JOG high speed operation of Ch0  
PWM output operation of Ch0  
Operation status of Ch1 (0: stop, 1:Busy)  
Error status of Ch1 (0: normal, 1: error)  
Indicates end of operation for Ch1 (0: operating, 1: End) *1Scan On  
Indicates end of origin return operation of Ch1(0:operating, 1: End)  
Indicates stroke low limit detection of Ch1  
Indicates stroke high limit detection of Ch1  
Indicates emergency stop status Ch1(0: enable, 1: Disable)  
Output prohibition of Ch1(0: enable, 1: disable)  
Operation direction of Ch1(0: Forward, 1: Backward)  
Accelerating Ch1  
End of positioning  
End of Origin return  
Low limit detection  
High limit detection  
Emergency stop status  
Output prohibition  
Direction  
Acceleration  
Constant speed  
Deceleration  
Constant speed operation of Ch1  
Decelerating Ch1  
Dwelling  
Dwelling Ch1  
7-100  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
Device  
Function  
Description  
F0310  
F0311  
Position control  
Position control operation of Ch1  
Speed control  
Return to origin  
JOG low speed  
JOG high speed  
PWM operation  
Current Step No.  
Error code  
Speed control operation of Ch1  
Return to origin operation of Ch1  
JOG low speed operation of Ch1  
JOG high speed operation of Ch1  
PWM output operation of Ch1  
Current step No. of Ch0  
F0312  
F0313  
F0314  
F0315  
F0320~ F032F  
F0330~ F033F  
F0340~ F035F  
F0360~ F037F  
F0400~ F040F  
F0410~ F041F  
F0420~ F043F  
Error code of Ch0  
Current address  
Current speed  
Current Step No.  
Error code  
Current position address of Ch0  
Current speed of Ch0  
Current step No. of Ch0  
Error code of Ch0  
Current address  
Current position address of Ch0  
F0440~ F045F  
M1911  
Current speed  
Current speed of Ch0  
M Code Enable Bit(Ch0)  
On : Set up ”M Code” function  
M1912  
M1913  
M1914  
M Code Set Bit(Ch0)  
M Code Enable Bit(Ch1)  
M Code Set Bit(Ch1)  
If positioning complete then “set”  
On : Set up a “M Code” function  
If positioning complete then “set”  
7-101  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
2) Error code  
Error  
Operation  
Condition  
code  
Corrective action  
H10  
H11  
Acceleration time of basic parameter is out of range  
Deceleration time of basic parameter is out of range  
Stop  
Stop  
Set Acceleration time within 0~10,000 range  
Set Deceleration time within 0~10,000 range  
Set speed limit within 5~ 100,000 range.  
H12  
H13  
H14  
H15  
H16  
H17  
H18  
H19  
H20  
Speed limit of basic parameter is out of range  
Bias speed of basic parameter is out of range  
Backlash compensation of basic parameter is out of range  
JOG high speed of parameter is out of range  
JOG low speed of parameter is out of range  
Stop  
Stop  
Stop  
Stop  
Stop  
Stop  
Stop  
Stop  
Set bias speed within 5 ~ 100,000 range.  
Set backlash compensation within 0~ 1,000 range  
Set JOG high speed within bias speed ~ speed limit  
Set JOG high speed within 5 ~ JOG high speed  
Set Origin return high speed within bias speed ~ speed limit  
Set Origin return low speed within bias speed ~ Origin return high speed  
Set Dwell time within 0 ~ 10000.  
Origin return high speed of parameter is out of range  
Origin return low speed of parameter is out of range  
Dwell time of parameter is out of range  
Operation speed of positioning parameter is out of range  
Set Operation speed within bias speed ~ speed limit  
Set Dwell time of pulse out parameter within 0 ~ 10000  
Stop  
Stop  
H21  
H30  
Dwell time of pulse out parameter is out of range  
POSIST command can’t be executed during operation  
Operating  
Check if positioning operation is executing when POSIST signal occur.  
Check if output is prohibited when POSIST signal occur. Output can be  
enabled by POSCTR command.  
H31  
H32  
POSIST command can’t be executed when output is prohibited  
Stop  
Stop  
POSIST command can’t be executed when origin is not  
determined  
Check if origin is not designated when POSIST signal occur.  
Origin can be designated by POSORG or POSPRS command.  
H33  
H34  
Step No. of POSIST command can’t be over 20  
Set step No. within 0~20  
Stop  
POSDST command can’t be executed during operation  
POSDST command can’t be executed when output is  
prohibited  
Operating  
Check if positioning operation is executing when POSDST signal occur.  
Check if output is prohibited when POSDST signal occur. Output can be  
enabled by POSCTR command.  
H35  
H36  
Stop  
Stop  
POSDST command can’t be executed when origin is not  
determined  
Check if origin is not designated when POSDST signal occur.  
Origin can be designated by POSORG or POSPRS command.  
H37  
H38  
Operation speed of POSDST command is out of range  
Set Operation speed within 5 ~ speed limit  
Stop  
POSVEL command can’t be executed during operation  
POSVEL command can’t be executed when output is  
prohibited  
Operating  
Check if positioning operation is executing when POSVEL signal occur.  
Check if output is prohibited when POSVEL signal occur. Output can be  
enabled by POSCTR command.  
H39  
Stop  
H3A  
H3B  
Operation speed of POSVEL command is out of range  
Set Operation speed within 5 ~ speed limit  
Stop  
POSJOG command can’t be executed during operation  
POSJOG command can’t be executed when output is  
prohibited  
Operating  
Check if positioning operation is executing when POSJOG signal occur.  
Check if output is prohibited when POSJOG signal occur. Output can be  
enabled by POSCTR command.  
H3C  
Stop  
H3D  
H3E  
Direction can’t be changed in JOG operation  
Change direction after JOG operation end.  
Operating  
Operating  
PWM command can’t be executed during operation  
Check if positioning operation is executing when PWM signal occur.  
Check if output is prohibited when PWM signal occur. Output can be enabled  
by POSCTR command.  
H3F  
H40  
PWM command can’t be executed when output is prohibited  
PWM period of PWM command is out of range  
Stop  
Stop  
Set period within 1 ~ 20,000  
H41  
H42  
H43  
Off duty of PWM command is out of range  
Set duty within 0 ~ 100  
Stop  
Stop  
POSSOR command is available during operating only  
Speed override value of POSSOR command is out of range  
Check if positioning operation is not executing when POSSOR signal occur.  
Set override value within 5 ~ speed limit  
Operating  
7-102  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
Error  
Operation  
Condition  
code  
Corrective action  
Check if positioning is in the decelerating section when POSSOR signal  
occur.  
H44  
H45  
H46  
POSSOR command can’t be executed during decelerating  
Operating  
Operating  
Stop  
POSORG command can’t be executed during operation  
POSORG command can’t be executed when output is  
prohibited  
Check if positioning operation is executing when POSORG signal occur.  
Check if output is prohibited when POSORG signal occur. Output can be  
enabled by POSCTR command.  
H47  
H48  
POSCTR setting error  
Check control command is within 0~3  
-
Check if positioning operation is not executing when deceleration stop  
command occur  
Deceleration stop command is available during operating only  
Stop  
H49  
H50  
H51  
POSORG command can’t be executed when JOG operating  
POSPRS command can’t be executed during operation  
Direction can’t be changed in continuous operation  
Check if JOG operation is executing when deceleration stop command occur  
Check if positioning operation is executing when POSPRS signal occur  
Set operation mode as end or keep mode  
Operating  
Operating  
Stop  
Remove the causes of emergency stop and clear error by POSCTR  
command  
Stop  
H52  
H53  
Emergency stop error  
Stroke high limit error  
Get rid of the external upper limit signal range by POSJOG command and  
then carry out POSCTR command and clear the error. Output prohibit shall  
be released by POSCTR command as output prohibit release option  
Get rid of the external lower limit signal range by POSJOG command and then  
carry out RST command and clear the error. Output prohibit shall be released  
by POSCTR command as output prohibit release option.  
Stop  
Stop  
Stop  
H54  
H55  
Stroke low limit error  
Install the upper limit detection sensor in the direction that the current  
position increases and the lower limit detection sensor in the direction that the  
current position decreases  
The position of High/Low limit detection Sensor has been changed.  
7-103  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
7.3.6 Wiring with servo and stepping motor driver (Open Collector)  
1) Wiring with stepping motor driver(DC 5V)  
* 4  
Max : 2m  
K7M-DRT**U  
Stepping Motor Driver  
Signal name Ch0 Ch1  
Pulse  
P40 P41  
COM0 COM1  
P42 P43  
CW-  
Common  
Direction  
Common  
Input +24V  
CW+  
* 2  
CCW-  
CCW+  
COM2 COM2  
DC5V  
P
P
* 1  
TIMING  
COM  
Origin  
P04 P06  
P05 P07  
P00 P02  
P01 P03  
Input Point  
DOG  
Low limit  
High Limit  
Emergency stop  
*3  
DC5V  
Common  
COM0(Input)  
2) Wiring with stepping motor driver (DC 24V)  
*4  
Stepping Motor Driver  
Max : 2m  
K7M-DRT**U  
Signal name Ch0 Ch1  
Pulse  
P40 P41  
COM0 COM1  
P42 P43  
CW-  
Common  
Direction  
Common  
Input +24V  
2K, 1/2W  
CW+  
*2  
CCW-  
CCW+  
COM2 COM2  
2K, 1/2W  
DC24V  
P
P
* 1  
TIMING  
COM  
Origin  
P04 P06  
P05 P07  
P00 P02  
P01 P03  
Input Point  
DOG  
Low limit  
High Limit  
Emergency stop  
*3  
DC24V  
Common  
COM0(Input)  
Remark  
1 ) In case of VEXTA RK series, TIMMING output turns on when a motor rotates at every 7.2 degree.  
For exact ‘return to origin’, we suggest you to configure ‘AND’ operation using TIMMING output and DOG  
sensor. It may be different to each system features to return to origin by the DOG sensor without TIMMING  
output signal (The rated input for the origin of K120S is DC 24V.)  
2) Using DC 24V, wire a proper resistor to driver in series.  
3) Input points for origin, approximate origin point, and upper/lower limit signal are fixed but, if they’re not used you  
able to use them general input point. You can use emergency stop with the command(POSCTR)  
4) Positioning phase of K120S is as follow: Set the input mode of a step mode driver to 1 phase input mode  
because motor operation mode is determined by rotating direction input.  
7-104  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
3) Wiring with servo motor driver(MR-J2/J2S-A)  
HC-MF HA-FF  
Series motor  
MR-J2S-  
TE11  
A
NF  
MC  
U
V
L1  
U
Power  
3Phase 200VAC  
SM  
L2  
L3  
V
W
E
W
L11  
L21  
PE  
PE  
EMG  
B1  
B2  
CTE2  
D
electronic brake  
detector  
P
24VDC  
OPP of Servo ON signal  
Cutoff by alarm signal  
CN1A  
Max: 2m  
K7M-DRT**U  
CN2  
Signal  
Pulse  
Ch0 Ch1  
P40 P41  
* 3  
PP  
SG  
NP  
3
10  
2
Common  
Direction  
Common  
Input +24V  
COM0 COM1  
P42 P43  
COM2 COM2  
P
P
OPC  
COM  
11  
9
* 1  
Origin  
P04 P06  
P05 P07  
P00 P02  
P01 P03  
Input point  
OP  
LG  
SD  
14  
1
DOG  
CN3  
Low Limit  
High Limit  
Emergency  
Plate  
RD  
SD  
12  
TxD  
RxD  
LG  
* 3  
2
1
GND  
Personal  
computer  
GND  
RS  
11  
5
LG  
DC24V  
Common  
COM0(Input)  
LG  
CS  
15  
LG  
CN1E  
EMG  
SON  
RES  
PC  
DR  
Outer emergency stop  
15  
5
ER  
Servo : ON  
Reset  
14  
8
Monitor output  
A
PID  
4
3
GND  
RS  
Torque Limit  
10k  
10k  
Max 10mA  
TL  
9
*3 Forward direction position limit  
Reverse direction position Limit  
*3  
A
LSP  
LSN  
SG  
16  
17  
10  
20  
3
14  
CS  
13  
DR  
Plate  
ER  
SG  
Within 2m  
VDD  
COM  
ALM  
ZSP  
TLC  
13  
18  
19  
6
RA1  
failure  
zero speed detection  
in torque limit  
RA2  
RA3  
P15R  
TLA  
LG  
11  
12  
Analog torque limit  
+10V/max. current  
1
SD  
Plate  
Within 2m  
Remark  
1) The rated input for the origin of K120S is DC 24V.  
2) Input points for origin, approximate origin point, and upper/lower limit signal are fixed but, if they’re not used you  
able to use them general input point. You can use emergency stop with the command(POSCTR)  
3) Positioning phase of K120S is as follow: Set the input mode of a step mode driver to 1 phase input mode is  
determined by rotating direction input.  
7-105  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 7 Usage of Various Functions  
4) Wiring with Servo motor driver(FDA-5000 AC Servo Driver)  
* 4  
K7M-DRT**U  
Max 2m  
FDA-5000  
* 3  
Signal name  
Pulse  
Ch0 Ch1  
P40 P41  
COM0 COM1  
P42 P43  
COM2 COM2  
10  
11  
12  
9
PFIN  
PPFIN  
PRIN  
1.5K,1/2W  
1.5K,1/2W  
Common  
Direction  
Common  
Input +24V  
Origin  
24G  
P24V  
PPRIN  
P
P
5
PZO+  
PZO-  
RDY  
P04 P06  
SSR  
*1  
30  
21  
22  
47  
48  
20  
45  
19  
44  
24  
25  
18  
38  
15  
40  
39  
38  
41  
14  
INPOS  
DOG  
P05 P07  
P00 P02  
P01 P03  
Input point  
0 SPEED  
BRAKE  
ALARM  
A_CODE0  
A_CODE1  
A_CODE2  
GND24  
GND24  
SVONEN  
CLR  
Low Limit  
High Limit  
Emergency Stop  
* 2  
Common  
COM0(Input)  
P24V  
CCWLIM  
CWLIM  
ESTOP  
ALMRST  
P/P1  
24G  
TLIM  
49  
+24VIN  
Remark  
1) The rated input for the origin of K120S is DC 24V. Linedriver output, wire a DC SSR and return to origin by DOG  
signal or using a origin sensor of original signal.  
2) Input points for origin, approximate origin point, and upper/lower limit signal are fixed but, if they’re not used you  
able to use them general input point. You can use emergency stop with the command(POSCTR)  
3) Using DC 24V, wire a proper resistor(1.5K, 1/2W) to driver in series.  
4) Positioning phase of K120S is as follow: Set the input mode of a step mode driver to 1 phase input mode  
because motor operation mode is determined by rotating direction input.  
7-106  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Chapter 8. Communication Functions  
8.1 Dedicated Protocol Communication  
8.1.1 Introduction  
MASTER-K120Ss built-in Cnet communication uses only MASTER-K120S main unit for a dedicated communication. That is, it  
doesnt need a separate Cnet I/F module to facilitate the user-intended communication system by utilizing reading or writing of  
any area in CPU, and monitoring function.  
MASTER-K120S main unit serves as follows:  
Individual/continuous reading of device  
Individual/continuous writing of device  
Reading CPU status  
Monitor devices registration  
Executing monitoring  
1:1 connection (link between MASTER-Ks) system configuration (MASTER-K120S main unit : RS-232C)  
Remark  
MASTER-K120S built-in communication function supports Cnet communication without any separate Cnet I/F module.  
It must be used under the following instructions.  
1) Channel 0 of MASTER-K120S main unit supports 1:1 communication only. For 1:N system having master-slave  
Format, use RS-485 communication in channel 1 or MASTER-K120S main unit with G7L-CUEC module connected.  
G7L-CUEC module supports RS-422/485 protocol.  
2) RS-232C communication cable for MASTER-K120S main unit is different from RS-232C cable for KGLWIN in pin  
arrangement and from the cable for Cnet I/F module, too. The cable cant be used without any treatment. For the  
detailed wiring method, refer to 8.1.2.  
It’s possible to set baud rate type and station No. in KGLWIN.  
8-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.1.2 System configuration method  
According to the method of connection, the system using MASTER-K120S built-in communication can be composed.  
1) Connecting system configuration (link between MASTER-Ks)  
(1) 1:1 connection with general PC  
a) Communication program made by C or BASIC computer language on the users computer, or utility program like  
FAM or CIMON can be used.  
MASTER-K120S main unit  
RS-232C interface  
b) Wiring method  
MASTER-K120S main  
PC  
unit  
Pin assignment And direction  
Pin No.  
Pin No.  
Signal  
5V  
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
RXD1  
TXD1  
RXD2  
SG  
1
2
3
4
5
6
7
8
9
5V  
TXD2  
SG  
Female Type  
SG  
TXD1, RXD1 are for loader communication and TXD2, RXD2 are for Cnet  
8-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(2) 1:1 connection with a monitoring device like PMU  
PMU(LGIS)  
MASTER-K120S main unit  
RS-485 interface  
RS-232C interface  
MASTER-K120S main  
unit  
PMU  
Pin assignment and direction  
Pin No.  
Pin no.  
Signal  
5V  
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
1
RXD1  
TXD1  
RXD2  
SG  
6
7
8
9
2
3
4
5
5V  
TXD2  
SG  
Female Type  
SG  
PMU  
485+  
485-  
Connection method and signal direction  
MASTER-K120S main unit  
485+  
485-  
8-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
.
(3) 1:1 connection with other MASTER-K120S  
MASTER-K120S main unit  
MASTER-K120S main unit  
RS-232C interface  
RS-485 interface  
MASTER-K120S  
MASTER-K120S main unit  
main unit  
Pin no.  
Pin assignment and direction  
Pin no.  
Signal  
5V  
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
RXD1  
TXD1  
RXD2  
SG  
5
4
3
2
9
8
7
6
1
5V  
TXD2  
SG  
Male Type  
SG  
MASTER-K120S main unit Connection method and signal direction MASTER-K120S main unit  
485+  
485-  
485+  
485-  
8-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.1.3 Frame Structure  
1) Base Format  
(1) Request frame(external communication device MASTER-K120S main unit), (Max. 256 Bytes)  
Header Station  
(ENQ) number  
Tail  
Frame check  
(BCC)  
Command Command type  
Structurized data area  
(EOT)  
(2) ACK Response frame (MASTER-K120S main unit external communication device, when receiving data normally)  
(max. 256 Bytes)  
Header Station  
(ACK) number  
Command  
type  
Tail  
Frame check  
(BCC)  
Command  
Structurized data area or null code  
(ETX)  
(3) NAK Response frame (MASTER-K120S main unit external communication device,  
when receiving data abnormally) (max. 256 Bytes)  
Header Station  
(NAK) number  
Tail  
Frame check  
(BCC)  
Command  
Command type  
Error code (ASCII 4 Byte)  
(ETX)  
Remark  
1) Used control codes are as follows. Be familiar with the following control codes. Because they are importantly  
used for communication.  
Codes  
ENQ  
ACK  
NAK  
EOT  
ETX  
Hex value  
H05  
Name  
Enquire  
Contents  
Request frame initial code  
ACK response frame initial code  
NAK response frame initial code  
Request frame ending ASCII code  
Response frame ending ASCII code  
H06  
Acknowledge  
Not Acknowledge  
End of Text  
End Text  
H15  
H04  
H03  
8-5  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Remark  
1) The numerical data of all frames are ASCII codes equal to hexadecimal value, if theres no clear statement.  
The terms in hexadecimal are as follows.  
Station No.  
When the main command is R(r) or W (w) and the command type is numerical (means a data type)  
All of the terms indicating size of all data in the Formatted data area.  
Monitoring registration and command registration number of execution commands.  
All contents of data  
2) If it is hexadecimal, H is attached in front of the number of frames like H01, H12345, H34, H12, and H89AB  
2) Sequence of command frame  
(1) Sequence of command request frame  
ENQ Station No. Command Fomatted data EOT BCC  
(PLC ACK response)  
ACK Station No. Command Data or null ETX BCC  
NAK Station No. Command Error code ETX BCC  
(PLC NAK response)  
8-6  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.1.4 List of commands  
Classification  
Command  
Main command Command type  
Treatment  
Items  
Code ASCII code Code ASCII code  
H72  
Reads data from device of Bit, Byte, Word type.  
Individual r(R)  
Continuous r(R)  
Individual w (W)  
Continuous w(W)  
SS  
SB  
SS  
SB  
ST  
5353  
5342  
5353  
5342  
5354  
Reading  
device  
(H52)  
H72  
Reads device Word in block unit.  
(Continuous reading Bit is unavailable)  
(H52)  
H77  
Writes data to device of Bit, Byte and Word type.  
Writing  
device  
(H57)  
H77  
Writes data to Byte and Word type in block unit.  
(Continuous reading Bit is unavailable)  
(H57)  
CPU  
Status reading  
H73  
(H53)  
Reads flag list like PLC operation status and error  
information.  
r(R)  
Command  
Classification  
Main command  
Register No.  
Register  
no.  
Treatment  
Item  
Code ASCII code  
ASCII code  
Monitoring variable  
register  
H78  
x(X)  
H58  
H00~H09 3030 ~ 3039 Register device to monitor.  
Execution of  
monitoring  
H79  
y(Y)  
H00~H09 3030 ~ 3039 Execute registered device to monitor.  
(H59)  
Remark  
MASTER-K120S main unit identifies capitals or small letters for main commands, but not for the others.  
8-7  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.1.5 Data type  
It’s possible to read and write device in built-in communication. When device is used, be aware of data type.  
1) Data type of variable  
Available types of device  
Device Name  
Explanation  
Input/Output relay  
Auxiliary relay  
Link relay  
Read/Write  
Available  
Available  
Available  
Available  
Available  
Available  
Available  
Available  
Read Only  
Bit/Byte/Word Assignment  
P
M
L
K
C
T
D
S
All  
All  
All  
Keep relay  
Counter  
All  
All(Current value when Word)  
All(Current value when Word)  
Byte, Word  
Timer  
Data Register  
Step relay  
Byte, Word  
F
Special relay  
All  
When variable is used, attach %’(25H) in front of the marking characters.  
Data type  
Bit  
Marking characters  
X(58H)  
Examples  
%PX000, %MX000, %LX000, %KX000, %CX000, %TX000, %FX000  
%PB000, %MB000, %LB000, %KB000, %CB000, %TB000, %FB000  
%PW000, %MW000, %LW000, %KW000, %CW000, %TW000,  
%FW000, %DW000, %SW000  
Byte  
B(42H)  
Word  
W(57H)  
Remark  
1) Timer/Counter used in bit command means contact point values.(word command means current values.)  
2) Data register and Step relay can uses only word or byte commands.  
3) In byte type commands, address is doubled  
For example, D1234 is addressed to %D1234’ in word type, and is addressed to %2468’ in byte type.  
8-8  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.1.6 Execution of commands  
1) Individual reading of device(R(r)SS)  
(1) Introduction  
This is a function that reads PLC device specified in accord with memory data type. Separate device memory can be read  
up to 16 at a time.  
(2) PC request format  
Station  
No.  
Command  
type  
Number  
of blocks  
H01  
Device  
length  
Frame  
check  
BCC  
Format name  
Header  
Command  
Device name  
Tail  
......  
Ex. of frame ENQ  
H20  
R(r)  
SS  
H06  
%MW100  
EOT  
H04  
ASCII value  
H05  
H3230 H52(72)  
H5353  
H3031  
H3036  
H254D57313030  
1 block(setting can be repeated up to max. 16 blocks)  
Item  
BCC  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from ENQ to EOT is converted into ASCII and added to BCC. For  
example, the BCC of the above frame is gotten as below:  
H05+H32+H30+H72+H53+H53+H30+H31+H30+H36+H25+H4D+H57+H31+H30+H30+H04  
=H03A4 Therefore BCC value is A4.  
This specifies how much of the blocks composed of "[device length][device name]" are in this  
request format. This can be set up to 16. Therefore, the value of [Number of blocks] must be  
set between H01(ASCII value:3031)-H10(ASCII value:3030).  
Number of  
Blocks  
This indicates the number of name's characters that means device, which is allowable up to 16  
characters. This value is one of ASCII converted from hex type, and the range is from  
H01(ASCII value:3031) to H10(ASCII value:3130). For example, if the device name is %MW0,  
it has 4 characters to be H04 as its length. If %MW000 characters to be H06.  
Device length  
(Length of  
device name)  
Address to be actually read is entered. This must be ASCII value within 16 characters, and in  
this name, digits, upper/lower case, '%' only is allowable to be entered.  
Device name  
Remark  
‘H’ of example frame represents hex value, and is unnecessary during preparing real frame.  
8-9  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(3) Response format (ACK response)  
Station  
Command  
type  
Number of  
blocks  
Number  
of data  
H02  
Frame  
check  
BCC  
Format name  
Header  
Command  
data  
Tail  
......  
No.  
Ex. of frame  
ASCII value  
ACK  
H06  
H20  
R(r)  
SS  
H01  
HA9F3  
ETX  
H04  
H3230  
H52(72)  
H5353  
H3031  
H3032  
H41394633  
1 block(max. 16 blocks possible)  
Item  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from ACK to ETX is converted into ASCII and added to BCC, and  
sent.  
BCC  
Number of data means byte number of hex type, and is converted into ASCII. This number  
is determined according to data type(X,B,W) included in device name of computer request  
Format.  
Number of data in accordance with its data type is as follows:  
Number of data  
Data type  
Bitl(X)  
Available variable  
%(P,M,L,K,T,C,F)X  
Number of data  
1
Byte(B)  
%(P,M,L,K,T,C,D,S,F)B  
%(P,M,L,K,T,C,D,S,F)W  
1
2
Word(W)  
Data  
In data area, there are the values of hex data converted to ASCII code saved.  
Ex.1  
The fact that number of data is H04(ASCII code value:H3034) means that there is hex data of 4 bytes in data .  
Hex data of 4 bytes is converted into ASCII code in data.  
Ex.2  
If number of data is H04 and the data is H12345678, ASCII code converted value of this is "31 32 33 34 35 36 37  
38," and this contents is entered in data area. Name directly, highest value is entered first, lowest value last.  
Remark  
1) If data type is Bit, data read is indicated by bytes of hex. Namely, if Bit value is 0, it indicated by H00,  
and if 1, by H01.  
8-10  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(4) Response format (NAK response)  
Error code  
(Hex 2 Byte)  
H1132  
Format name  
Header  
Station No.  
Command  
Command type  
Tail  
Frame check  
Ex. of frame  
ASCII value  
NAK  
H15  
H20  
R(r)  
SS  
ETX  
H03  
BCC  
H3230  
H52(72)  
H5353  
H31313332  
Item  
BCC  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1  
Byte each to ASCII values from NAK to ETX is converted into ASCII and added to BCC.  
Hex and 2 bytes(ASCII code, 4 bytes) indicate error type. For the details, see 8.1.8 Error  
codes.  
Error code  
(5) Example  
K120S main unit  
This example supposes when 1 WORD from M20 and 1 WORD from P001 address of station No.1 are read and BCC value  
is checked. Also it is supposed that H1234 is entered in M20, and data of H5678 is entered in P001.  
Computer request format (PC MASTER-K120S main Unit)  
Command Number of  
Variable  
length  
H05  
Format  
name  
Device  
length  
H06  
Frame  
check  
Format name Header Station No. Command  
Format name  
Tail  
type  
blocks  
Ex. of frame ENQ  
ASCII value H05  
H01  
r
SS  
H02  
%MW20  
H254D57  
3230  
%PW001 EOT BCC  
H25505730  
H04  
3031  
H3031  
H72  
H5353 H3032  
H3035  
H3036  
For ACK response after execution of command(PC MASTER-K120S main Unit)  
Command Number of Number of  
Number of  
data  
Frame  
Format name  
Header Station No. Command  
Data  
Data  
Tail  
type  
SS  
blocks  
H02  
data  
check  
Ex. of frame ACK  
ASCII value H06  
H01  
r
H02  
H1234  
H02  
H5678  
ETX BCC  
H3031  
H72  
H5353  
H3032  
H3032 H31323334 H3032 H35363738 H03  
8-11  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
For NAK response after execution of command(PC MASTER-K120S main Unit)  
Format name  
Ex. of frame  
ASCII value  
Header  
NAK  
H15  
Station No.  
H01  
Command  
Command type  
SS  
Error code  
Tail  
Frame check  
r
Error code (2 bytes)  
Error code (4 bytes)  
ETX  
H03  
BCC  
H3031  
H72  
H5353  
2) Continuous reading(R(r)SB) of device  
(1) Introduction  
This is a function that reads the PLC device memory directly specified in accord with memory data type. With this, data is  
read from specified address as much as specified continuously.  
(2) PC request format  
Number of data  
(Max. 128 Bytes)  
H05  
Station  
No.  
Command  
type  
Device  
length  
H06  
Frame  
check  
BCC  
Format name  
Header  
Command  
Device  
Tail  
H10  
SB  
%MW100  
Ex. of frame ENQ  
R(r)  
EOT  
H04  
H3130  
H5342  
H3036 H254D57313030  
H3035  
ASCII value  
H05  
H52(72)  
Remark  
1) Number of data specifies the number to read according to the type of data. Namely, if the data type of device  
is word and number is 5, it means that 5 words should be read.  
2) Max. of %MW in number of data can be used up to 120(240bytes).  
3) Protocol of RSB doesn't have number of blocks.  
4) R(r)SB command of bit devices is not available.  
Item  
BCC  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from ENQ to EOT is converted into ASCII and added to BCC.  
This indicates the number of name's characters that means device, which is allowable up to  
16 characters. This value is one of ASCII converted from hex type, and the range is from  
H01(ASCII value:3031) to H10(ASCII value:3130).  
Device length  
(Length of  
device name)  
Address to be actually read is entered. This must be ASCII value within 16 characters, and in  
this name, digits, upper/lowercase, and '%' only are allowable to be entered.  
Device name  
8-12  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(3) MASTER-K120S Main unit response format (MASTER-K120S of ACK response)  
Command  
type  
Number of  
blocks  
Number of  
data  
Frame  
check  
BCC  
Format name  
Header  
Station No.  
Command  
data  
Tail  
ACK  
H06  
H10  
R(r)  
SB  
H01  
H02  
H1122  
EOT  
Ex. of frame  
ASCII value  
H3130  
H52(72)  
H5342  
H3031  
H3134  
H31313232 H03  
Item  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from ACK to ETX is converted into ASCII and added to BCC, and  
sent.  
BCC  
It means byte number of hex type, and is converted into ASCII. This number is determined  
by multiplying the data number of computer request Format by the data size(in below  
table) according to memory type(B,W,D) included in variable name of computer request  
Format.  
Number of data  
Data type  
WORD(W)  
Available device  
%(P,M,L,K,F,T,C,D,S)W  
Data size  
2
Data  
.In data area, there are the values of hex data converted to ASCII code saved.  
Ex.1  
When memory type included in variable name of computer request Format is W(Word), and data number of  
computer request Format is 03, data number of PLC ACK response after execution of command is indicated by  
H06(2*03 = 06 bytes)Byte and ASCII code value 3036 is entered in data area.  
Ex.2  
In just above example, when data contents of 3 words are 1234, 5678, and 9ABC in order, actual ASCII code  
converted values are 31323334 35363738 39414243, and the contents are entered in data area.  
8-13  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(4) Response format (NAK response)  
Error code  
(Hex 2 Byte)  
H1132  
Format name  
Header  
Station No.  
Command  
Command type  
Tail  
Frame check  
NAK  
H15  
H10  
r
SB  
ETX  
H03  
BCC  
Ex. of frame  
ASCII value  
H3130  
H72  
H5342  
H31313332  
Item  
BCC  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from NAK to ETX is converted into ASCII and added to BCC, and sent.  
Hex and 2 bytes(ASCII code, 4 bytes) indicate error type. For the details, see 8.1.8 Error  
codes.  
Error code  
(5) Example  
This example supposes that 2 WORDs from M000 of station No. 10 is read and BCC value is checked. Also it is supposed  
that data in M000 and in M001 is as follow:  
M000 = H1234  
M001 = H5678  
Computer request format (PC MASTER-K120S Main Unit)  
Command  
Device length  
H06  
Device name  
Number of data  
H02  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
ENQ  
H05  
Station No.  
H0A  
Command  
type  
r
SB  
%MW000  
H254D5730  
3030  
EOT  
H04  
BCC  
H3041  
H72  
H5342  
H3036  
H3032  
For ACK response after execution of command(PC MASTER-K120S Main Unit)  
Number of  
data  
Command  
type  
Data  
Tail  
Frame check  
Format name  
Header  
Station No.  
Command  
Frame (Example)  
ACK  
H06  
H0A  
r
SB  
H04  
12345678  
ETX  
03  
BCC  
ASCII value  
H3041  
H72  
H5342  
H3034 H3132333435363738  
For NAK response after execution of command(PC MASTER-K120S Main Unit)  
Error code  
Tail  
BCC  
Format name  
Frame (Example)  
Header  
Station No>  
Command  
Command type  
NAK  
H0A  
r
SB  
Error code  
Error code  
(2Byte)  
(4Byte)  
ETX  
H03  
BCC  
ASCII value  
H15  
H3041  
H72  
H5342  
8-14  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
3) Individual writing of device(W(w)SS)  
(1) Introduction  
This is a function that writes the PLC device memory directly specified in accord with memory data type.  
(2) PC request format  
Frame  
check  
Command  
type  
Number of  
blocks  
Device  
Length  
H06  
Tail  
Format name  
Header  
ENQ  
H05  
Station No.  
H20  
Command  
W(w)  
Device Name  
Data  
.....  
Frame (Example)  
ASCII  
SS  
H01  
%MW100  
H00E2  
EOT  
H04  
BCC  
H254D5731 H30304  
3030 532  
H3230  
H57(77)  
H5353  
H3031  
H3036  
value  
1 block(setting can be repeated up to max. 16 blocks)  
Explanation  
Item  
BCC  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from ENQ to EOT is converted into ASCII and added to BCC.  
This specifies how much of the blocks composed of "[device length][device name]" are in  
Number of blocks this request Format. This can be set up to 16. Therefore, the value of [Number of blocks]  
must be set between H01(ASCII value:3031)-H10(ASCII value:3030).  
Device  
This indicates the number of name's characters that means device, which is allowable up to  
16 characters. This value is one of ASCII converted from hex type, and the range is from  
length(Name  
length of device) H01(ASCII value:3031) to H10(ASCII value:3130).  
Address to be actually read is entered. This must be ASCII value within 16 characters, and  
device  
Data  
in this name, digits, upper/lower case, and '%' only are allowable to be entered.  
If the value to be written in %MW100 area is H A, the data Format must be H000A. If the  
value to be written in %MW100 area is H A, the data Format must be H000A. In data area,  
the ASCII value converted from hex data is entered.  
Ex.1  
If type of data to be currently written is WORD, the data is H1234, ASCII code converted value of this is  
"31323334" and this content must be entered in data area. Namely, most significant value must be sent first, least  
significant value last.  
Remark  
1) Device data types of each block must be the same.  
2) If data type is Bit, the data to be written is indicated by bytes of hex. Namely, if Bit value is 0, it must be  
indicated by H00(3030), and if 1, by H01(3031).  
8-15  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(3) Response format (ACK response)  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
ACK  
H06  
Station No.  
H20  
Command  
W(w)  
Command type  
SS  
ETX  
H03  
BCC  
H3230  
H57(77)  
H5353  
Item  
BCC  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from ACK to ETX is converted into ASCII and added to BCC, and sent.  
(4) Response format (NAK response)  
Frame  
check  
Error code  
(Hex 2 Byte)  
H4252  
Tail  
Format name  
Header  
Station No.  
Command  
Command type  
Frame (Example)  
NAK  
H15  
H20  
W(w)  
SS  
ETX  
H03  
BCC  
ASCII value  
H3230  
H57(77)  
H5353  
H34323532  
Item  
BCC  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from NAK to ETX is converted into ASCII and added to BCC, and sent.  
Hex and 2 bytes(ASCII code, 4 bytes) indicate error type. For the details, see 8.1.8 Error  
codes.  
Error code  
8-16  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(5) Example  
This example supposes that "HFF" is written in M230 of station No. 1 and BCC value is checked.  
Computer request format (PC MASTER-K120S main unit)  
Frame  
check  
BCC  
Command  
type  
Number of  
blocks  
Tail  
Format name  
Header Station No. Command  
Device Length Device Name  
Data  
Frame (Example) ENQ  
H01  
w
SS  
H01  
H06  
%MW230  
H254D5732  
3330  
H00FF  
EOT  
ASCII value  
H05  
H3031  
H77  
H5353  
H3031  
H3036  
H30304646 H04  
For ACK response after execution of command(PC MASTER-K120S main unit)  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
ACK  
H06  
Station No.  
H01  
Command  
w
Command type  
SS  
ETX  
H03  
BCC  
H3031  
H77  
H5353  
For NAK response after execution of command(PC MASTER-K120S main Unit)  
Error code  
Error code (2)  
Error code (4)  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
NAK  
H15  
Station No.  
H01  
Command  
w
Command type  
SS  
ETX  
H03  
BCC  
H3031  
H77  
H5353  
8-17  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
4) Continuous writing of device(W(w)SB)  
(1) Introduction  
This is a function that directly specifies PLC device memory and continuously writes data from specified address as much as  
specified length.  
(2) Request format  
Number of data  
(Max.128 Byte)  
Frame  
check  
Format  
name  
Station  
No.  
Comman  
d
Comma  
nd type  
Device  
Length  
Data  
Tail  
Header  
Device  
Frame  
ENQ  
H10  
W(w)  
SB  
H06  
%MW100  
H02  
H11112222 EOT  
BCC  
(Example)  
ASCII  
value  
H254D57  
313030  
H31313131  
H04  
32323232  
H05 H3130 H57(77) H5342 H3036  
H3032  
Remark  
1) Number of data specifies the number according to the type of device. Namely, if the data type of  
device is WORD, and number of data is 5, it means that 5 WORDs should be written.  
2) Number of data can be used up to 240Bytes(120 Words).  
Item  
BCC  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from ENQ to EOT is converted into ASCII and added to BCC.  
Device  
This indicates the number of name's characters that means device, which is allowable up to  
length(Name length 16 characters. This value is one of ASCII converted from hex type, and the range is from  
of variable)  
H01(ASCII value:3031) to H10(ASCII value:3130).  
Address to be actually read. This must be ASCII value within 16 characters, and in this  
name, digits, upper/lower case, and '%' only are allowable to be entered.  
device  
8-18  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(3) Response Format (ACK response)  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
ACK  
H06  
Station No.  
H10  
Command  
W(w)  
Command type  
SB  
ETX  
H03  
BCC  
H3130  
H57(77)  
H5342  
Item  
BCC  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from ACK to ETX is converted into ASCII and added to BCC, and  
sent.  
(4) Response Format (NAK response)  
Error code  
(Hex 2 Byte)  
H1132  
Frame  
check  
BCC  
Tail  
Format name  
Header  
Station No.  
Command  
Command type  
Frame (Example)  
ENQ  
H05  
H10  
W(w)  
SB  
EOT  
H03  
ASCII value  
H3130  
H57(77)  
H5342  
H31313332  
Item  
BCC  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from NAK to ETX is converted into ASCII and added to BCC, and  
sent.  
Hex and 2 bytes(ASCII code, 4 bytes) indicate error type. For the details, see 8.1.8 Error  
codes.  
Error code  
8-19  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(5) Example  
This example supposes that 2 byte H’AA15 is written in D000 of station No. 1 and BCC value is checked.  
Computer request Format (PC MASTER-K120S main unit)  
Frame  
check  
BCC  
Station  
No.  
Command  
type  
Device  
Length  
H06  
Number of  
data  
Data  
Tail  
Format name  
Header  
Command  
w
Device  
Frame (Example) ENQ  
H01  
SB  
%DW0000  
H01  
HAA15056F EOT  
H414131353  
H04  
0353646  
ASCII value H05 H3031  
H77  
H5342  
H3036 H254457303030 H3031  
For ACK response after execution of command (PC MASTER-K120S main unit)  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
ACK  
H06  
Station No.  
H01  
Command  
W
Command type  
SB  
ETX  
H03  
BCC  
H3031  
H77  
H5342  
For NAK response after execution of command(PC MASTER-K120S main unit)  
Error code  
Error code (2)  
Error code (4)  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
NAK  
H15  
Station No.  
01  
Command  
W
Command type  
SB  
ETX  
H03  
BCC  
H3031  
H77  
H5342  
8-20  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
5) Monitor register(X##)  
(1) Introduction  
Monitor register can separately register up to 10 in combination with actual variable reading command, and carries out the  
registered one through monitor command after registration.  
(2) PC request Format  
Frame  
Registration No.  
Registration Format  
Tail  
Format name  
Header  
Station No.  
Command  
check  
Frame (Example)  
ENQ  
H05  
H10  
X(x)  
H09  
Refer to registration Format  
EOT  
H04  
BCC  
ASCII value  
H3130  
H58(78)  
H3039  
[]  
Item  
BCC  
Explanation  
When command is lowercase(x), only one lower byte of the value resulted by adding 1 byte  
each to ASCII values from ENQ to EOT is converted into ASCII, added to BCC.  
This can be registered up to 10(0 to 9, H00-H09), and if an already registered No. is  
registered again, the one currently being executed is registered.  
Register No.  
This is used to before EOT in command of Formats of separate reading of variable,  
continuous reading, and named variable reading.  
Register Format  
Register Format : Register Format of request Formats must select and use only one of the followings.  
Individual reading of device  
RSS  
Number of blocks(2 Byte)  
Device length (2 Byte)  
Device name (16 Byte)  
...  
1 block(max. 16 blocks)  
Continuous reading of device  
RSB  
Device length (2 Byte)  
Device name (16 Byte)  
Number of data  
8-21  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(3) Response Format (ACK response)  
Registration No.  
H09  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
ACK  
H06  
Station No.  
H10  
Command  
X(x)  
ETX  
H03  
BCC  
H3130  
H58(78)  
H3039  
Item  
BCC  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from ACK to ETX is converted into ASCII and added to BCC, and  
sent.  
(4) Response Format (NAK response)  
Registration  
No.  
Error code  
(Hex 2Byte)  
H1132  
Frame  
check  
BCC  
Tail  
Format name  
Header  
Station No.  
Command  
Frame (Example)  
ACK  
H06  
H10  
X(x)  
H09  
ETX  
H03  
ASCII value  
H3130  
H58(78)  
H3039  
H31313332  
Item  
BCC  
Explanation  
When command is one of lower case(r), only one lower byte of the value resulted by adding  
1 Byte each to ASCII values from NAK to ETX is converted into ASCII and added to BCC,  
and sent.  
Hex and 2 bytes(ASCII code, 4 bytes) indicate error type. For the details, see 8.1.8 Error  
codes.  
Error code  
8-22  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(5) Example  
This example supposes that device M000 of station NO. 1 is monitor registered.  
Computer request Format (PC MASTER-K120S main unit)  
Registration Format  
Registration  
No.  
Tail  
Frame check  
Format name  
Header Station No. Command  
Number of  
blocks  
R##  
Device length Device name  
Frame (Example)  
ENQ  
H05  
H01  
x
H01  
RSS  
H01  
H06  
%MW000 EOT  
BCC  
H255457  
H04  
303030  
ASCII value  
H3031  
H78  
H3031 H525353  
H3031  
H3036  
For ACK response after execution of command(PC MASTER-K120S main unit)  
Registration No.  
H01  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
ACK  
H06  
Station No.  
H01  
Command  
x
ETX  
H03  
BCC  
H3031  
H78  
H3031  
For NAK response after execution of command (PC MASTER-K120S main unit)  
Registration No.  
H01  
Error code  
Error code (2)  
Error code (4)  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
NAK  
H15  
Station No.  
H01  
Command  
x
ETX  
H03  
BCC  
H3031  
H78  
H3031  
8-23  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
6) Monitor execution(Y##)  
(1) Introduction  
This is a function that carries out the reading of the variable registered by monitor register. This also specifies a registered  
number and carries out reading of the variable registered by the number.  
(2) PC request Format  
Registration No.  
H09  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
ENQ  
H05  
Station No.  
H10  
Command  
Y(y)  
EOT  
H03  
BCC  
H3130  
H59(79)  
H3039  
Item  
Explanation  
Register No. uses the same number registered during monitor register for monitor execution.  
It is possible to set from 00-09(H00-H09).  
Register No.  
When command is lower case(y), only one lower byte of the value resulted by adding 1 byte  
each to ASCII values from ENQ to EOT is converted into ASCII, added to BCC.  
BCC  
(3) Response Format(ACK response)  
In case that the register Format of register No. is the Individual reading of device  
Registratio Number of  
Number of  
data  
Frame  
check  
BCC  
Station  
No.  
Data  
Tail  
Format name  
Frame (Example)  
ASCII value  
Header  
ACK  
H06  
Command  
n No.  
Blocks  
H10  
Y(y)  
H09  
H01  
H04  
H9183AABB  
H3931383341  
414242  
ETX  
H03  
H3130 H59(79)  
H3039  
H3031  
H3034  
In case that the register Format of register No. is the continuous reading of device  
Registration  
No.  
Frame  
check  
BCC  
Station  
No.  
Number of data  
Data  
Tail  
Format name  
Header  
Command  
Frame (Example)  
ACK  
H06  
H10  
Y(y)  
H09  
H04  
H9183AABB  
ETX  
H03  
ASCII value  
H3130 H59(79)  
H3039  
H3034  
H3931383341414242  
8-24  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(4) Response Format (NAK response)  
Registration  
No.  
Error code  
(Hex 2Byte)  
H1132  
Tail  
Frame check  
Format name  
Header  
Station No.  
Command  
Frame (Example)  
NAK  
H15  
H10  
Y(y)  
H09  
ETX  
H03  
BCC  
ASCII value  
H3130  
H59(79)  
H3039  
H31313332  
Item  
BCC  
Explanation  
When command is lowercase(y), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from NAK to ETX is converted into ASCII and added to BCC, and  
sent.  
Hex and 2 bytes (ASCII code, 4 bytes) indicate error type. For the details, see 8.1.8 Error  
codes.  
Error code  
(5) Example  
This example supposes that registered device No. 1 of station No. 1 is read. and BCC value is checked. And it is supposed  
that device M000 is registered and the number of blocks is 1.  
Computer request Format (PC MASTER-K120S Main Unit)  
Registration No.  
H01  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
ENQ  
H05  
Station No.  
H01  
Command  
y
EOT  
H04  
BCC  
H3031  
H79  
H3031  
For ACK response after execution of command (PC MASTER-K120S Main Unit)  
Registration  
No.  
Number of  
data  
Frame  
check  
Number of Blocks  
H01  
Data  
Tail  
Format name  
Frame (Example)  
ASCII value  
Header  
ACK  
H06  
Station No.  
H01  
Command  
y
H01  
H04  
H23422339 ETX BCC  
H3233343232  
H03  
333339  
H3031  
H79  
H3031  
H3031  
H3034  
For NAK response after execution of command (PC MASTER-K120S Main Unit)  
Registration No.  
H01  
Error code  
Error code (2)  
Error code (4)  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
NAK  
H15  
Station No.  
H01  
Command  
y
ETX  
H03  
BCC  
H3031  
H79  
H3031  
8-25  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
7) Reading PLC Status(RST)  
(1) Introduction  
This is a function that reads flag list including operating status of PLC and error information.  
(2) PC request Format  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
ENQ  
H05  
Station No.  
H0A  
Command  
R(r)  
Command type  
ST  
EOT  
H04  
BCC  
H3041  
H52(72)  
H5354  
Item  
BCC  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from ENQ to EOT is converted into ASCII and added to BCC.  
(3) Response Format (ACK response)  
PLC status data  
(Hex 20 Byte)  
Frame  
check  
Command  
type  
Tail  
Format name  
Header  
Station No.  
Command  
Frame (Example)  
ACK  
H06  
H0A  
R(r)  
ST  
Status data Format  
[1]  
ETX  
H03  
BCC  
ASCII value  
H3041  
H52(72)  
H5354  
Item  
BCC  
Explanation  
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte  
each to ASCII values from ACK to ETX is converted into ASCII and added to BCC, and sent.  
1 PLC status data: data Format is 20 bytes in hex Format and converted into ASCII code. Its contents are constituted as  
below table after converting ASCII code into hex data.  
1
2
3
4
5
6
7
8
9
10 11 12 13 14 15 16 17 18 19 20  
Null  
Null  
CPU Ver. CPU null connection  
Type No. Mode  
CPU Type  
CPU Type  
Code  
K120S  
42  
K80S  
41  
K200SA  
3A  
K200SB  
3B  
K200SC  
3C  
K300S  
33  
K1000S  
32  
Version No.  
Ex) Bit  
0
-
0
0
-
0
1
0
0
0
0
0
1
0
Version 1.2  
CPU Mode  
Connection  
Ex) Bit  
Ex) Bit  
-
-
-
-
-
-
-
-
0
0
Bit 1  
Stop  
Mode Mode  
Bit 2  
Bit 3  
Bit 4  
Bit 0  
Local  
connection  
Bit 1  
Remote  
connection  
Run PAUSE DEBUG  
Mode Mode  
8-26  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(4) Response Format ( NAK response)  
Error code  
(Hex 2 Byte)  
H1132  
Tail  
Frame check  
Format name  
Header  
Station No.  
Command  
Command type  
Frame (Example)  
NAK  
15  
H0A  
3041  
R(r)  
ST  
ETX  
03  
BCC  
ASCII value  
5272  
5354  
31313332  
* When command is one of lower case(r), only one lower byte of the value resulted by adding 1 Byte each to ASCII values  
from NAK to ETX is converted into ASCII and added to BCC, and sent.  
* Hex and 2 bytes(ASCII code, 4 bytes) indicate error type. For the details, see 8.1.8 Error codes.  
(5) Example  
This example supposes that the status of MASTER-K120S Main unit of station No. 1 is read.  
Computer request Format (PC MASTER-K120S Main Unit)  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
ENQ  
H05  
Station No.  
H01  
Command  
R(r)  
Command type  
ST  
EOT  
H04  
BCC  
H3031  
H52(72)  
H5354  
For ACK response after execution of command (PC MASTER-K120S Main Unit)  
Status data  
See status data  
Format  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
ACK  
H06  
Station No.  
H01  
Command  
R(r)  
Command type  
ST  
ETX  
H03  
BCC  
H3031  
H52(72)  
H5354  
For NAK response after execution of command (PC MASTER-K120S Main Unit)  
Error code  
Error code (2)  
Error code (4)  
Tail  
Frame check  
Format name  
Frame (Example)  
ASCII value  
Header  
NAK  
H15  
Station No.  
H01  
Command  
R(r)  
Command type  
ST  
ETX  
H03  
BCC  
H3031  
H52(72)  
H5354  
8-27  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.1.7 1:1, 1:n Built-in communication between MASTER-K120S's  
1) Introduction  
1:1 built-in communication between MASTER-K120S's is that which constitutes a built-in communication system with the  
method of 1(master) : 1(slave). Setting Base parameter and communication parameter in KGLWIN can easily constitute this  
system. Communication protocol currently applied is the same with Cnet I/F used for MASTER-K. Main functions are following.  
It can organize device area into 64 data access blocks by WORD unit, and set a communication time-out limit for each  
block.  
It can reestablish flag in relation with error codes and slave PLC operating mode according to parameter setting.  
It can reset flag related with error codes and sending/receiving error frequency of each parameter.  
It monitors communication status, using monitoring function of KGLWIN.  
MASTER-K120S  
main unit  
MASTER-K120S  
main unit  
G7E-DR10A  
(Slave: station No. 31)  
(Master: station no. 1)  
1:1 built-in communication between MASTER-K120S  
This communication cabling map is the same for (3) 1:1 Connecting with other MASTER-K120S in 8.1.2 "System configuration  
method using built-in communication."  
8-28  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
2) Parameter setting  
(1) Communication Parameter Setting  
Open a new project file from KGLWIN  
- MASTER-K120S must be selected as PLC type.  
After selecting communication parameter from KGLWIN and clicking twice, this window comes up.  
(a) When uses Ch.0 : Built-in RS-232C or External Cnet I/F module  
(b) When uses Ch.1 : Built-in RS-485  
8-29  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Set according to the following table  
Item  
Contents  
Station No.  
Baud rate  
Data bit  
Sets one of station from 0 to 31.  
Sets one of 1200, 2400, 4800, 9600, 19200, 38400, 57600 bps  
Sets one of 7 or 8 Bits  
Parity bit  
Stop bit  
Sets one of none, Even, Odd  
Sets one of 1 or 2 Bit(s)  
RS232C null modem or RS422/485: can be selected as a communication channel when communication is  
processed by built-in functions of MASTER-K120S Main unit or Cnet I/F module (G7L-CUEC).  
RS232C dedicated modem : can be selected when communication is processed by Cnet I/F module (G7L-  
CUEC).  
Communication  
channel  
RS232C dial-up modem: can be selected when common modem communication calling the opponent station  
is processed by Cnet I/F module (G7L-CUEC).  
* Notes: RS232C dedicated modem and RS232C dial-up modem communication can be processed only by  
Cnet I/F module (G7L-CUEC) supporting RS-232C, not Cnet I/F module (G7L-CUEC) supporting RS-  
422/485.  
It’s an interval waiting after sending request frame from Master MASTER-K120S before receiving a  
response.  
Timeout  
in  
default value is 500ms.  
Master Mode  
Setting must be done in consideration of maximum interval of sending and receiving cycle of a master PLC.  
If the time out is less than the maximum interval of the s/r cycle, error can occur.  
Dedicated  
Master MASTER-K120S can read from and write on Slave MASTER-K120S.  
Master/Slave  
Read status of can be select especially when you read Slave MASTER-K120S for monitoring, but not for the other purposes,  
slave PLC lest it may cause decreasing communication speed.  
(2) Setting registration list  
Click 'master' from 'exclusive use' in 'protocol and sending mode' then 'List' button will be activated.  
8-30  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Click the ‘List’ button to open the registration list window.  
Total 64 data blocks can be assigned. But it's not possible to set a register number.  
Sending and receiving data size can be set up to 60 Words.  
Set device area  
- Sending: reading device area P,M,L,K,T,C,D,S  
- Receiving : reading device area P,M,L,K,T,C,D,S  
saving device area : P,M,L,K,T,C,D,S  
saving device area : P,M,L,K,T,C,D,S  
Designate station no., size, mode, area in following windows.  
- Station no. : set the number of the slave or opponent station.  
- Mode : click 'send' for writing data on the slave station, or 'receive' for reading from it.  
- Size : data size for reading and writing of the master station can be specified up to 60 words.  
- Area:  
Item  
Sending mode  
Receiving mode  
that is in the master station to temporarily that is in the slave station for the data to  
Area(from)  
save the data to be written.  
be read.  
that is in the master station to temporarily  
save the data to be read.  
Area(to)  
that is in the slave station to write the data.  
8-31  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
3) Flag related with operating status  
(1) Sending/receiving error count for each station (total 32 stations)  
Error code is saved following area according to station  
Remarks  
Station  
Device  
Station  
Device  
0,1  
2,3  
4,5  
6,7  
8,9  
10,11  
12,13  
14,15  
D4400  
D4401  
D4401  
D4403  
D4404  
D4405  
D4406  
D4407  
16,17  
18,19  
20,21  
22,23  
24,25  
26,27  
28,29  
30,31  
D4408  
D4409  
D4410  
D4411  
D4412  
D4413  
D4414  
D4415  
Each device contains the Information of 2 station  
The information of each station is saved in 1byte.  
Error code  
Error code  
Contents  
Remarks  
1
2
Timeout error for response  
Received NAK  
(2) Sending/receiving error contents of each station (total 32 stations)  
Error count number is saved following area according to station  
Station  
0,1  
2,3  
4,5  
6,7  
Device  
D4416  
D4417  
D4418  
D4419  
D4420  
D4421  
D4422  
D4423  
Station  
16,17  
18,19  
20,21  
22,23  
24,25  
26,27  
28,29  
30,31  
Device  
D4424  
D4425  
D4426  
D4427  
D4428  
D4429  
D4430  
D4431  
Remarks  
Each device contains the Information of 2 station  
The information of each station is saved in 1byte.  
8,9  
10,11  
12,13  
14,15  
(3) Slave PLC mode and error contents of each station (total 32 stations)  
Error Information of PLC is saved following area according to station  
Station  
0,1  
2,3  
4,5  
6,7  
Device  
D4432  
D4433  
D4434  
D4435  
D4436  
D4437  
D4438  
D4439  
Station  
16,17  
18,19  
20,21  
22,23  
24,25  
26,27  
28,29  
30,31  
Device  
D4440  
D4441  
D4442  
D4443  
D4444  
D4445  
D4446  
D4447  
Remarks  
Each device contains the Information of 2 station  
The information of each station is saved in 1byte.  
8,9  
10,11  
12,13  
14,15  
8-32  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Error bit  
b7  
b6  
b5  
b4  
b3  
b2  
b1  
b0  
Error status of slave PLC  
1 : Error  
0 : Normal  
Reserved  
Operation mode of slave PLC  
b4 : STOP  
b5 : RUN  
b6 : PAUSE  
b7 : DEBUG  
(4) Status flag of the master PLC  
Status Information of master PLC is saved in D4448  
b15  
b3  
b2  
b1  
b0  
D4448  
- - - - - - - - - - -  
b1 : be set in case station is duplicated  
b2 : be set in case device area over  
(5) Max/min/current sending/receiving cycle of set parameter  
Contents: the interval between after sending and before receiving  
Saved area (Channel 0)  
Saved area(Channel 1)  
Max.  
Min.  
D4449 – D4450  
D4451 – D4452  
D4453 – D4454  
D4349 – D4350  
D4351 – D4352  
D4353 – D4354  
Current  
8-33  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
4) Example  
MASTER-K120S main unit  
(Slave : Station No. 31)  
MASTER-K120S main unit  
(Master : Station No. 0)  
G7E-DR10A  
1:1 built-in communication between MASTER-K120S  
Device M000 is increased by program per 1 second.  
Writing M000 to output area P004 of slave  
Reading slaves output area P004  
Writing it to masters output area P009  
The following example uses the above diagram to explain the operation of MASTER-K120S main unit.  
The data of the master MASTER-K120S main unit is increased by INCP instruction and sent to be written on the output  
contact point P004 of the slave MASTER-K120S main unit. And in return, the master MASTER-K120S main unit reads  
the data that is written on the output contact point of the slave MASTER-K120S to write them on the output contact  
point of extended digital input/output module, G7E-DR10A.  
(1) Setting communication parameter of the master station and its program  
Work on the master station 0.  
Open a new project file and a new program for the master station.  
Double click parameter item for parameter settings. If you click the Comm. button in parameter window in KGLWIN,  
you can see the following window of the communication parameter.  
8-34  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Set parameters as the following table.  
Protocol  
Communication Method  
and mode  
Comm-  
Station no.  
0
Baud rate  
19200  
Data bit  
8
Parity bit  
None  
Stop bit  
1
Communication channel  
Timeout  
Dedicated  
Master  
unication  
RS232C null modem or  
RS422/485  
Enable  
500ms  
Click ‘List’ button to activate registration list window  
double click list number 0’ in ‘List’ window , then following window for ‘Private 1 item 0 edit’ is open  
Set parameters like the following table and click OK’ button.  
Station No.  
31  
Size  
1
Mode  
Send  
Area to read(From)  
Area to save(to)  
P004 (See the above)  
M000 (See the above)  
8-35  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
The registration list 0’ registered in the registration list can be confirmed through a window like the following.  
Double click the No. 1 for receive parameter setting and Set parameters like the following table and click OK’ button.  
Station No.  
31  
Size  
1
Mode  
Area to read(From)  
Area to save(to)  
Receive  
P004 (See the above)  
P009 (See the above)  
8-36  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(2) Program  
(2) Parameter setting for slave station.  
Set parameters as the following table.  
Protocol  
Communication Method  
and mode  
Commu-  
nication  
Station no. Baud rate Data bit Parity bit Stop bit  
Communication channel  
Timeout  
Dedicated  
slave  
RS232C null modem or  
RS422/485  
Enable  
31  
19200  
8
None  
1
-
Slave station does not need program.  
Baud rate, parity bit, data bit, stop bit setting must be same with master station.  
8-37  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.1.8 Error code  
Error code  
Error type  
Error condition and causes  
Interface with PLC is impossible.  
Treatment  
H0001 PLC system error  
Off/On the power  
Check if other letters than capitals/small letters,  
numbers, and (%’,_,.) in device and data, correct  
and execute again.  
Errors occurred when exchanging ASCII  
data to numbers.  
H0011 Data error  
Set a wrong device memory that is to use  
H0021 Command error  
Check commands.  
commands other than w(W), r(R), x(X), y(Y), s(S)  
Wrong command type that is to use characters  
H0031 Command type error like wSS, wSB using other letters from SS” or Check command type  
SB”  
Set wrong device memory other than  
H1132 Device memory error  
H1232 Data size error  
Check device type  
P,M,L,K,T,C,F,D,S  
Correct length of data  
The number of data in execution is 0 or bigger  
than 128 bytes.  
(If data type is bite, the number of data  
must be from 1 ~ 128.)  
When use other characters than x (X), w (W)  
at MASTER-K120S. When use b (B), d (D) at  
MASTER-K120S.  
H2432 Data type error  
Check data type and execute again.  
Ex1) Use commands like %DB or %DD.  
Device request  
H7132  
When omit %.  
Check Format, correct and execute again.  
Format error  
When exceed assigned area.  
Ex1) MX2000 or %DW5000  
Correct the size within the assigned area and execute  
H2232 Area exceeding error  
again.  
Monitor execution  
Rearrange the monitor register no. not to go over than  
9 and reset.  
H0190  
error  
Exceeding limit of register No.  
Rearrange the monitor register no. not to go over than  
9 and reset.  
H0290 Monitor register error Exceeding limit of register No.  
When use commands that arent supported.  
Ex1) When use device  
Be familiar with the manual.  
Check if the system stopped.  
reset  
H6001 Syntax error  
H6010 Syntax error  
H6020 Syntax error  
like %MX100 in RSB command  
OVER-RUN, FRAME error  
Be familiar with the manual.  
Confirm the setting of the communication ports of RS-  
232C.  
TIME_OUT error  
reset  
H6030 Syntax error  
H6040 Syntax error  
H6050 Syntax error  
Syntax error in commands  
When a FRAME text exceeds over 256 bytes.  
BCC error  
Check if each sends frame has ENQ, EOT.  
Rearrange send frame not to go over 256 bytes.  
Check if BCC is right.  
8-38  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.2 User Defined Protocol Communication  
8.2.1 Introduction  
User Defined Protocol Communication allows users who do communication between MASTER-K120S main unit and other kind  
of device to define the other companys protocol at MASTER-K PLC. Therere a number of kinds of protocols made by many  
companies, that its difficult to have all protocols in it. So if a user defines a protocol that can be applied to his/her purpose,  
MASTER-K120S main unit executes the communication with the other kind of device through the defined protocol.  
For this, protocol frame must be defined in KGLWIN (Version 2.0 or higher). And exact knowledge about the contents of the  
protocol defined by the user is vital in making the communication possible. KGLWIN can download a user defined protocol  
frame into MASTER-K120S main unit and it is saved. it is not erased by powers off/on. For using user-defined mode, he/she  
should program with instruction controlling sending of PLC as well as edit frames. This section explains User Defined Protocol  
Communication setting & usage.  
8.2.2 Parameter Setting  
1) Setting Communications Parameter  
(1) Open a new project file from KGLWIN and select K120S as PLC type  
(2) After setting communication parameter at KGLWIN. Double click it to activate this window.  
(3) Set according to the following table.  
Communication Method  
Protocol and mode  
Communi  
-cation  
Station  
no.  
Baud  
rate  
Data  
bit  
Parity  
bit  
Communication  
channel  
User  
Timeout  
defined  
Stop bit  
1
RS232C null modem  
or RS422/485  
Enable  
0
19200  
8
None  
500ms  
Master  
8-39  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
2) Setting frame  
(1) Click List” button to activate the following window.  
(2) Select one of 115 in frame list to open the following window.  
Frame specification  
Header  
- Used in [Header] type.  
- Possible characters, as headers are 1 alphabet letter, 1 numeric number, or control characters as below.  
Available Control Code  
NUL(H00) SOH(H01)  
STX(H02)  
LF(H0A)  
ETX(H03)  
VT(H0B)  
EOT(H04)  
FF(H0C)  
DC4(H14)  
FS(H1C)  
ENQ(H05)  
CR(H0D)  
NAK(H15)  
GS(H1D)  
ACK(H06)  
SO(H0E)  
SYN(H16)  
RS(H1E)  
BEL(H07)  
S1(H0F)  
ETB(H17)  
US(H1F)  
BS(H08)  
HT(H09)  
DLE(H10)  
CAN(H18)  
DEL(H7F)  
DC1(H11) DC2(H12)  
EM(H19) SUB(H1A)  
DC3(H13)  
ESC(H1B)  
8-40  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Example 1) [NUL] , [ENQ] , [1] , [A] : Possible  
Example 2) NUL, ENQ , [12] , [ABC] : impossible  
Example 4) [A][NUL][ENQ][STX] : impossible  
- It is allowed to be only 3 consecutive characters.  
Example 3) [ENQ][STX][NUL] : Possible  
Send / Receive  
- Not defined : It is the initial value that doesnt declare a frame format.  
- Send : It is that declares send frame.  
- Receive : It is that declares receive frame.  
- When Frame 0 window is activated, Tx/Rx term is set as Not defined,” and all the segments are not in  
activation.  
Segment (1-8): Enter segment by segment to separate fixed sending data area (CONSTANT) and device  
area (Array).  
Item  
Contents  
To set a segment type, therere NONE (not defined), CONST (fixed data  
area), ARRAY (Device area). CONST declares commands and fixed data  
that are used for communication frame and ARRAY is used to input and save  
the data needed for interactive communication. ARRAY type must be always  
set by byte.  
This field is to declare commands and fixed data that will be used in communication  
frame and constant data to be declared by inputting. ASCII input must be done  
within 10 characters and hex within 20 characters. If the number exceeds the limit,  
set the next segment as the same type and continue to input there. As an  
dedicated protocol communication, 10RSB06%MW10006 is a frame to execute  
reading 6 word data from M100 at the slave station no. 16.  
Ex1) 10RSB06%MW10006  
If the segment is declared as ARRAY type, designate transmitting device (P,M,L,K,  
F,T,C,D) and number of transmitting. The unit is byte  
Ex2) If you want to transmit D000 ~ D003, the setting is as below.  
(transmitting device : D000 , number of transmitting : 6 bytes)  
8-41  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Item  
Contents  
It is a radio button to select the input type of commands. Therere 2 kinds as hex or  
ASCII value.  
Ex1) ASCII : 1 0 R S B 0 6 % M W 1 0 0  
Ex2) Hex : 31 30 52 53 42 30 36 25 57 44 31 30 30  
If ARRAY is set, it asks whether it would convert data to ASCII to send (at send  
frame), or convert to hexadecimal to receive(at receive frame).  
If ARRAY is set, the size of area is to be set by byte. The unit is a byte.  
Tail  
- Used in [Tail] type.  
- Possible characters as headers are 1 alphabet letter, 1 numeric number, or control characters as below  
Available Control Code  
NUL(H00) SOH(H01)  
STX(H02)  
LF(H0A)  
ETX(H03)  
VT(H0B)  
EOT(H04)  
FF(H0C)  
DC4(H14)  
FS(H1C)  
ENQ(H05)  
CR(H0D)  
NAK(H15)  
GS(H1D)  
ACK(H06)  
SO(H0E)  
SYN(H16)  
RS(H1E)  
BEL(H07)  
S1(H0F)  
ETB(H17)  
US(H1F)  
BS(H08)  
HT(H09)  
DLE(H10)  
CAN(H18)  
DEL(H7F)  
DC1(H11) DC2(H12)  
EM(H19) SUB(H1A)  
DC3(H13)  
ESC(H1B)  
Example 1) [NUL] , [ENQ] , [1] , [A] : Possible  
Example 2) NUL, ENQ , [12] , [ABC] : impossible  
- It is allowed to be only 3 consecutive characters.  
Example 3) [ENQ][STX][NUL] : Possible  
Example 4) [A][NUL][ENQ][STX] : impossible  
- It’s possible to use BCC that can detect errors. BCC must be set as [BCC] to be used. To set BCC contents,  
click BCC Setting” button on the right side.  
Example 5)  
8-42  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
BCC setting: set BCC when it is needed.  
Item  
Contents  
ASCII adds 2 bytes BCC value in ASCII type to frame. Hex adds 1 byte BCC value in Hex type to  
frame. For the detailed setting BCC, refer to 8.1.6 Execution of Commands.  
Data Type  
It is that sum all the data from 2nd data to the data before the data marked as [BCC] and input the  
result to the [BCC] area  
Default  
SUM 1  
SUM 2  
XOR 1  
XOR 2  
MUL 1  
MUL 2  
BCC method uses sum like defaults, but the user can set the BCC area.  
BCC method is the same with SUM 1, but it’s used when the user masks any value to the last BCC  
value.  
BCC method is OR (Exclusive OR).  
BCC method is the same with XOR 1, but it’s used when the user masks any value to the last BCC  
value.  
BCC method is MULTIPLY that is, multiplication.  
BCC method is the same with MUL 1, but its used when the user masks any value to the last BCC  
value.  
H signifies header, S is for segment, and T is for tail.  
Range  
Ex1) When header is set as [ENQ][STX], tail is set as [EOT][ETX], and the range of setting  
BCC is to be from [STX] to [ETX], then set as H [1]~T [1].  
It is to set whether not to take complement number or to take the complement number of 1 or 2 at  
[BCC] value. If mask setting is done after taking a complement number, the user can set any value to  
do masking.  
Complement  
Sets any value and method of masking.  
Ex1) When masking by XOR method, using a value, HFF : ^FF  
Ex2) When masking by OR method, using a value, HFF : |FF  
When masking by AND method, using a value, HFF : &FF  
Mask  
8-43  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Frame size  
- ASCII communication : max. 128 bytes  
- Hex communication : max. 256 bytes  
Link relay (L)  
- It’s a flag to indicate whether a user defined frame is received in the order set by the user.  
- If the received frame is matched with the declared frame in frame list number 3, L003 starts blinking  
(0 1 0).  
When frame receiving is done, MASTER-K120S main unit check if theres any match between the received frame  
and the declared frame in frame list. If there is, let the Link relay L(n) flag blink and save the received data in the  
assigned area.  
BCC calculation example> When frame is set as below, the result of calculation is as follow.  
(1) Default setting  
8-44  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
The last transmitting frame  
BCC Type setting  
The kinds of  
The value of sum check  
Input segment  
ASCII Type  
Hex Type  
05 31 32 33 34 04 CE  
05 12 34 04 4A  
ASCII Input  
Hex Input  
31 + 32 +33 +34 +04 = CE  
12 + 34 +04 = 4A  
05 31 32 33 34 04 43 41  
05 12 34 04 34 41  
(2) SUM 1 , XOR 1 or MUL 1 setting.  
SUM 1  
The last transmitting frame  
BCC Type setting  
The kinds of  
The value of sum check  
segment input  
ASCII Type  
Hex Type  
05 31 32 33 34 04 D3  
05 12 34 04 4F  
ASCII Input  
Hex Input  
05 + 31 + 32 +33 +34 +04 = D3  
05 + 12 + 34 +04 = 4F  
05 31 32 33 34 04 44 33  
05 12 34 04 34 46  
XOR 1  
The last transmitting frame  
BCC Type setting  
The kinds of  
The value of sum check  
segment input  
ASCII Type  
Hex Type  
05 31 32 33 34 04 05  
05 12 34 04 27  
ASCII Input  
Hex Input  
05 ^ 31 ^ 32 ^ 33 ^ 34 ^ 04 = 05  
05 ^ 12 ^ 34 ^ 04 = 27  
05 31 32 33 34 04 30 35  
05 12 34 04 32 37  
MUL 1  
The last transmitting frame  
BCC Type setting  
The kinds of  
The value of sum check  
segment input  
ASCII Type  
Hex Type  
05 31 32 33 34 04 60  
05 12 34 04 20  
ASCII Input  
Hex Input  
05 x 31 x 32 x 33 x 34 x 04 = 60  
05 x 12 x 34 x 04 = 20  
05 31 32 33 34 04 36 30  
05 12 34 04 32 30  
8-45  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Complement setting : Complement calculation as below  
example> 1s and 2s Complements of D3  
bit 7  
1
bit 0  
1
= h D3(sum check value)  
1
0
0
0
1
1
1
0
0
0
1
1
0
1
1
1
0
0
bit 7  
0
bit 0  
0
1’ complement = h 2C(the last sum check value)  
2’ complement = 1’ complement + 1 = h 2D(the last sum check  
bit 7  
0
bit 0  
1
Mask setting : Masking method is as below  
bit 7  
1
bit 0  
1
= h D3 (sum check value)  
= hFF (masking value)  
AND masking = hD3  
1
1
1
1
0
0
1
0
0
1
1
1
1
1
0
0
1
0
0
1
0
1
0
0
1
1
1
1
1
0
bit 7  
1
bit 0  
1
bit 7  
1
bit 0  
1
bit 7  
1
bit 0  
1
OR masking = hFF  
bit 7  
0
bit 0  
0
Exclusive OR masking = h2C  
8-46  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.2.3 Instruction  
1) User defined communication instruction(SNDCOM)  
User defined communication instruction  
SNDCOM  
Instruction  
Available Device  
Flag  
No. of  
steps  
Error  
Zero  
Carry  
(F112)  
M
P
K
L
F
T
C
S
D
#D integer  
(F110)  
(F111)  
Ch  
n1  
D
7
○ ○ ○ ○ ○ ○ ○  
○ ○ ○ ○  
○ ○ ○  
○ ○  
Flag Set  
Designation  
Ch Designated communication channel  
n1 Frame lists which is designated at parameter  
Device which the communication status is stored  
Error  
(F110)  
Error flag turns on when designating area is  
over and the instruction isnt executed  
D
SNDCOM Ch n1 D  
(1) Function  
When the execution condition is on, the communication starts with protocol at parameter which is designated early.  
Ch’ is communication channel and n’ is a frame number at parameter which is designated  
D’ is a device which the communication status is stored.  
(2) example of program  
When input condition is on, channel 1 stars communication with protocol at user defined parameter rnumber 3.  
The communication state is stored M000 and the format of M000 Iis as below  
bit15  
bit8  
bit1 bit0  
Error bit  
Done bit  
Error code (1 byte)  
Done bit : When transfer is completed normally, this bit turns on during 1 scan.  
Error bit : When communication error occurs, ,this bit turns on.  
Error code : When error bit turns on, the error code is stored.  
8-47  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
3) Error code  
Code  
06  
Error type  
Slave Device Busy  
Parameter Error  
explanation  
It’s sending or waiting to receive  
09  
Communication parameter setting error, Link enable setting error  
Frame does not setting or frame does not sending’  
10  
Frame Type Error  
8.2.4 Example of Usage  
This example is supposed that theres a communication between MASTER-K120Ss by the user-defined protocol. The system  
configuration is as follows and the cable is the same with the one of 1:1 dedicated protocol communication.  
MASTER-K120S main unit  
MASTER-K120S main unit  
(Slave: Station No. 1)  
(Master: Station no. 0)  
1:1 dedicated protocol communication cable  
The data in M area of the master station is sent to the slave station and the slave station saves received data in M area, output as direct  
variable, and sends the data back to the master. This process repeats between the master and the slave.  
1) The Programming and setting communication parameter of the master station  
Select the communication parameter and then select communication method and communication channel.  
Select user Defined’ at protocol and mode item(list item is activated), then Click the list’  
8-48  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Double click the number 0’  
Designate the header, segment, send/receive , tail as below and then click the BCC Setting  
8-49  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Designate BCC Setting as below and Click the OK button, then you can see the frame list window which is designated  
8-50  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Double click the number 1 frame  
BCC Setting method is same frame 0.  
After the frame setting and BCC setting completes, click the OK button.  
You can see the frame list window which is designated as below.  
8-51  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Program  
When the data is received at frame no. 1, link relay L001 turns on during 1 scan. At that moment, M000 increases and the  
value of M000 moves output relay P004.  
The new value of M000 is sending again every 1 second period (F092 is 1second period flag)  
The number of sending normally stores D000.  
When error occurs, the number of sending error stored in D001.  
2) Setting and program of slave station  
Make the new project file and setting new parameter.  
Click the list after set the communication method and communication channel.  
8-52  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Double click the frame list number 0’  
Click the BCC Setting after set the header , segment , tail as below.  
8-53  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Click the OK button after BCC setting as below. Then you can see the frame list which is designated.  
8-54  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Set the frame number 1’ as below and click the BCC Setting  
BCC Setting method is same as master station.  
8-55  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
After the frame setting and BCC setting completes, click the OK button.  
You can see the frame list window which is designated as below  
Program  
When the data is received at frame no. 0, link relay L000 turns on during 1 scan. At that moment P004 increases and  
the value of P004 moves M000.  
The new value of P004 is sending again every 1 second period (F092 is 1second period flag)  
The number of sending normally is stored in D000.  
When error occurs the number of sending error is stored in D001.  
8-56  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.3 Modbus Protocol Communication  
8.3.1 Introduction  
MASTER-K120S built-in communication supports Modbus, the Modicon products communication protocol. It supports ASCII  
mode, using ASCII data and RTU mode using Hex data. Function code used in Modbus is supported by instruction and  
especially function code 01, 02, 03, 04, 05, 06, 15 and 16. Refer to "Modicon Modbus Protocol Reference Guide"  
8.3.2 Basic Specification  
1) ASCII mode  
(1) It communicates, using ASCII data.  
(2) Each frame uses ': (colon : H3A)', for header, CRLF (Carriage Return-Line Feed : H0D H0A), for tail.  
(3) It allows Max. 1 second interval between characters.  
(4) It checks errors, using LRC.  
(5) Frame structure (ASCII data)  
Item  
Size  
Header  
1 byte  
Address  
2 bytes  
Function code  
2 bytes  
Data  
LRC  
Tail(CR/LF)  
2 bytes  
n bytes  
2 bytes  
2) RTU mode  
(1) It communicates, using hex data.  
(2) There's no header and tail. It starts with address and finishes frame with CRC.  
(3) It has at least 3.5 character times between two frames.  
(4) It ignores the current frame when 1.5 character times elapse between characters.  
(5) It checks errors, using 16 bit CRC.  
(6) Frame structure (hex data).  
Item  
Size  
Address  
1 byte  
Function code  
1 bytes  
Data  
CRC  
n bytes  
2 bytes  
REMARK  
1) The size constituting 1 letter is 1 character. So 1 character is 8 bits that is 1 byte.  
2) 1 character time means the time lapsed for sending 1 character.  
Ex) Calculation of 1 character time at 1200 bps.  
1200 bps means that it takes 1 second to send 1200 bits. To send 1 bit, 1 sec/1200 bits = 0.83 ms.  
Therefore 1 character time is 0.83ms * 8 bits = 6.64ms.  
3) 584, 984 A/B/X executes frame division, using intervals of more than 1 sec without LRC in processing internally.  
8-57  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
3) Address area  
(1) Setting range is available from 1 to 247, but MASTER-K120S supports from 0 to 31.  
(2) Address 0 is used for broadcast address. Broadcast address is all slave device recognize and respond to like the self-  
address, which can't be supported by MASTER-K120S.  
4) Function code area  
(1) MASTER-K120S supports only 01, 02, 03, 04, 05, 06, 15, and 16 among Modicon products' function codes.  
(2) If the response format is confirm+(ACK), it uses the same function code.  
(3) If the response format is confirm-(NCK), it returns as it sets the 8th bit of function code as 1.  
Ex) If function code is 03, (we write here only function code part. Because only function codes are different.)  
[Request]  
[Confirm+]  
[Confirm-]  
0000 0011 (H03)  
0000 0011 (H03)  
1000 0011 (H83)  
It returns as it sets the 8th bit of  
function code of request frame.  
5) Data area  
(1) It sends data, using ASCII data(ASCII mode) or hex (RTU mode).  
(2) Data is changed according to each function code.  
(3) Response frame uses data area as response data or error code.  
6) LRC Check/CRC Check area  
(1) LRC (Longitudinal Redundancy Check) : It works in ASCII mode. It takes 2’ complement from sum of frame except  
header or tail to change into ASCII code,  
(2) CRC (Cyclical Redundancy Check): It works in RTU mode. It uses 2-byte CRC check rules.  
REMARK  
1) All numerical data can use hexadecimal, decimal, and binary type. If we convert decimal 7 and 10 into each type:  
Hexadecimal : H07, H0A or 16#07, 16#0A  
Decimal : 7, 10  
Binary : 2#0111, 2#1010  
8-58  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
7) Function code types and memory mapping  
Modicon PLC  
Data address  
Code  
01  
Function code name  
Read Coil Status  
Remark  
Read bits  
Read bits  
Read words  
Read words  
Write bit  
0XXXX(bit-output)  
1XXXX(bit-input)  
02  
Read Input Status  
03  
Read Holding Registers  
Read Input Registers  
Force Single Coil  
4XXXX(word-output)  
3XXXX(word-input)  
0XXXX(bit-output)  
4XXXX(word-output)  
0XXXX(bit-output)  
4XXXX(word-output)  
04  
05  
06  
Preset Single Register  
Force Multiple Coils  
Preset Multiple Registers  
Write word  
Write bits  
15  
16  
Write words  
MASTER-K120S Mapping  
Bit area  
Word area  
Data area  
Address  
h0000  
h1000  
h2000  
h3000  
h4000  
h5000  
h6000  
Data area  
Address  
h0000  
h1000  
h2000  
h3000  
h4000  
h5000  
h6000  
h7000  
h8000  
P area  
M area  
L area  
K area  
F area  
T area  
C area  
P area  
M area  
L area  
K area  
F area  
T area(current value area)  
C area(current value area)  
S area  
D area  
8) Modbus addressing rules  
MASTER-K120S main unit starts its address from 0 and matches with 1 of Modicon products' data address. So MASTER-  
K120S's address n matches n+1 of Modicon products' address. This means that the output contact point 1 (0001) of  
Modicon products is marked as communication address 0 and the input contact point 1 (0001) of Modicon products is  
marked as communication address 0 in MASTER-K120S.  
9) The size of using data  
As for data size, MASTER-K120S main unit supports 128 bytes in ASCII mode and 256 bytes in RTU mode. The maximum  
size of the Modicon products is different from each other kind. So refer to "Modicon Modbus Protocol Reference Guide."  
8-59  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
10) Map of wiring  
MASTER-  
K120S  
main unit  
Quantum (9PIN)  
Connecting no. and direction  
Pin no.  
Pin no.  
Signal  
CD  
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
5
9
4
8
RXD  
TXD  
DTR  
SG  
3
7
6
2
1
DSR  
RTS  
CTS  
Male Type  
Use RS-485 connector when using channel 2.  
8.3.3 Parameters Setting  
1) Setting communication parameter  
(1) Open a new project file at KGLWIN.  
K120S should be selected in PLC types.  
Open a new project file for each of the master and the slave.  
(2) Select a communication parameter at KGLWIN and double click to open the following window.  
If communication mode is ASCII, Be sure to set 7bit  
8-60  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
(3) Set the contents as follows.  
Item  
Setting contents  
Set a number between 0 to 31 (Don’t assign no. 0 as broadcasting station lest it may be a cause  
for mistaken operation)  
Set one from 1200, 2400, 4800, 9600, 19200, 38400, or 57600 bps.  
Set 7 or 8.  
Station No.  
Baud Rate  
Data Bit  
Parity Bit  
Stop Bit  
ASCII mode: Set as 7 bits.  
RTU mode: Set as 8 bits.  
Set as one of None, Even, or Odd.  
Set 1 or 2 bit(s).  
When parity bit is set: Set as 1 bit.  
When parity bit isnt set: Set as 2 bits.  
RS232C Null Modem or RS422/485 : Its a communication channel for the communication,  
using MASTER-K120S main units built-in communication and Cnet I/F module (G7L-CUEC).  
RS232C Modem (Dedicated Line) : It’s to be selected for the communication, using an  
dedicated modem with Cnet I/F module (G7L-CUEB).  
S232C Dial Up Modem : Its to be selected for the general communication connecting through  
the telephone line by dial up modem and Cnet I/F module (G7L-CUEB).  
Note : Using Cnet I/F module (G7L-CUEB) supporting RS232C, RS232C dedicated or dial-up  
modem communication can be done, but not through Cnet I/F module (G7L-CUEC)  
supporting RS422/485.  
Communication  
Channel  
It’s the time waiting a responding frame since the master MK80S main unit sends a request  
frame.  
Time out in Master The default value is 500ms.  
Mode  
It must be set in consideration of the max. periodical time for sending/receiving of the master  
PLC.  
If it’s set smaller than the max. send/receive periodical time, it may cause communication error.  
Modbus Master/ If it is set as the master, its the subject in the communication system. If its set as the slave, it  
Slave  
Transmission  
Mode  
only responds to the request frame of the master.  
Select ASCII mode or RTU mode.  
8-61  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.3.4 Instruction and example  
1) MODBUS communication instruction(MODCOM)  
MODCOM  
MODBUS communication  
Available device  
Flag  
No. of  
steps  
Instruction  
Error  
(F110)  
Zero  
(F111)  
Carry  
(F112)  
M
P
K
L
F
T
C
S
D
#D integer  
Ch  
S1  
S2  
S3  
○ ○ ○ ○ ○ ○ ○  
○ ○  
○ ○  
○ ○  
7
○ ○ ○ ○  
○ ○ ○ ○  
○ ○  
○ ○  
Designation  
Flag  
Ch Designated communication channel  
S1 Device which is registered communication parameter  
S2 Device which stored communication data  
S3 Device which stored communication status  
Error  
Error flag turns on when designating area is over  
and the instruction isnt executed  
(F110)  
MODCOM Ch S1 S2 S3  
(1) Example program  
Designate slave station No. , function code,.address, No. of reading  
When input condition(M0020) turns on, MODBUS communication starts.  
Receiving data are stored D1000, and communication status is stored to M100  
When operates as slave, MASTER-K120S responses to master station without commands. And When operates as master,  
MASTER-K120S sends data in S1 with MODBUS protocol at rising edges of execution condition.  
8-62  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
S3 format is as below.  
bit 15  
bit 8  
bit 1 bit 0  
NDR bit  
Error bit  
Error code  
NDR : when the communication ends normally, this bit turns on during 1 scan.  
Error bit : when communication error occurs, this bit turns on during 1 scan. At that time error code stores bit 8 ~ bit 15.  
Error code is as follow  
Code  
01  
Error type  
Illegal Function  
Meaning  
Error in inputting function code in instruction.  
02  
Illegal Address  
Error of exceeding the area limit of reading/writing on the slave station.  
Error when the data value to be read from or write on the slave station isnt  
allowed.  
03  
04  
Illegal Data Value  
Slave Device Failure  
Error status of the slave station.  
It’s a responding code of the slave station for the master station to prevent the  
master station time-out error, when request command processing takes time.  
The master station marks an error code and waits for a certain time without  
making any second request.  
05  
Acknowledge  
Error when request command processing takes too much time. The master  
should request again.  
06  
07  
Slave Device Busy  
Time Out  
Error when exceeds the time limit of the communication parameter as it  
communicates.  
08  
09  
Number Error  
Errors when data is 0 or more than 256 bytes  
Error of setting parameters (mode, master/ slave)  
Parameter Error  
Error when the station number of itself and the station number set by the  
S1 of instruction are the same.  
10  
Station Error  
Remark  
-. In MASTER-K120S series, the MODBUS’ command which has been used in MK80S series can be used.  
In this case, communication channel is fixed to channel 0.  
8-63  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
2) Example program 1  
It’s supposed that MASTER-K120S main unit is the master and it reads Coil Status of the station no. 17, a Modicon product.  
The master reads status of the Coil 00020 ~ 00056 of the slave station no. 17. The Coil of the slave station is supposed to  
be as follows and the data that are read is saved in D1000  
Coil  
Status  
Hex  
59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40  
X
X
X
1
1
0
1
1
0
0
0
0
1
1
1
0
1
0
1
1
1
B
0
E
B
Coil  
39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20  
Status  
Hex  
0
0
1
0
0
1
1
0
1
0
1
1
1
1
0
0
1
1
0
1
2
6
B
C
D
The status of Coil 57, 58, 59 are redundancy.  
Data is sent starting from the low bit by byte unit. If the deficient bit of a byte is filled with 0. An example of sending the  
above data is as Following example 1.  
Example 1) CD B2 0E 1B  
It designates slave station and function code (No. of station : h11(17) , function code : h01)  
Address setting  
- Address 0’ at MODBUS protocol means address 1’ actually .So if you want to designate address 20’ , write  
address 19’  
Reading number setting ( Reading number is 37 from 20 to 56.)  
This is MODBUS Communication instruction.  
- Data is sent starting from the low bit by byte unit. If the deficient bit of a byte is filled with 0. An example of sending  
the above data is as follows.  
- The data transmission starts lower byte. The remnant part of byte is filled with 0’  
Stored data at D1000,D1001,D1002 are :  
Device  
D1000  
D1001  
D1002  
Stored data  
h
CD 6B  
B2 CE  
00 1B  
h
h
8-64  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
3) Example program 2  
It’s supposed that MASTER-K120S main unit is the master and it reads Coil Status of the station no. 17, a Modicon product.  
The master reads status of the input contact 10197 ~ 10218 of the slave station no. 17.  
The input contact of the slave station is supposed to be as follows and the data that are read is saved in M015.  
Input 10220 10219 10218 10217 10216 10215 10214 10213 10212 10211 10210 10209  
Status  
Hex  
X
X
1
1
0
1
0
1
1
1
0
1
3
5
D
Input 10208 10207 10206 10205 10204 10203 10202 10201 10200 10199 10198 10197  
Status  
Hex  
1
0
1
1
1
0
1
0
1
1
0
0
B
A
C
The status of input contact 10219,10220 are redundancy.  
Data is sent starting from the low bit by byte unit. If the deficient bit of a byte is filled with 0. An example of sending the  
above data is as follows.  
Example 2) AC DB 35  
① : It designates slave station and function code ( No. of station : h11(17) , function code : h02 )  
: Address setting  
Address 0 at MODBUS protocol means address 1’ actually .So if you want to designate address 10197’ ,  
write address 10196’  
③ : Reading number setting ( Reading number is 22 from 10197 to 10220.)  
④ : This is MODBUS Communication instruction.  
The data transmission starts lower byte. The remnant part of byte is filled with 0’  
Stored data at D200,D201 are :  
Device  
D200  
D201  
Stored data  
h
AC DB  
00 35  
h
8-65  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
4) Example program 3  
The master writes data D1000 ~ D1003 to contact 40000 of the slave station no. 10.  
① : It designates slave station and function code ( No. of station : h0A(10) , function code : h10 )  
: Address setting  
Address 0 of function code 16’ at MODBUS protocol means address 40000’ actually.  
③ : Writing number setting ( Writing number is 4)  
④ : This is MODBUS Communication instruction.  
5) Example program 4  
The master writes data in D1000 to contact 40000 of the slave station no. 10.  
① : It designates slave station and function code ( No. of station : h0A(10) , function code : h06 )  
: Address setting  
Address 0 of function code 16’ at MODBUS protocol means address 40000’ actually.  
③ : Writing number setting ( Writing number is 1)  
④ : This is MODBUS Communication instruction.  
8-66  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.4 No Protocol Communication  
8.4.1 Introduction  
No protocol communication is useful when communication between MASTER-K120S main unit and other kind of devices  
with user defined protocol is impossible. User defined protocol is very convenient when there are enough interval between  
frames or a kind of frame is less than 16. But, When the kind of frame is greater than 16 or frames are continued without  
interval, user defined protocol is not available.  
When the kinds of frame are more than 16, they cant be registered in parameter area, therefore MASTER-K120s cant  
transfer these frames. Also, if there are no interval between frame, MASTER-K120S cant find end of frame.  
To overcome these defects of user defined protocol, MASTER-K120S provide No Protocol Communication .  
In the No Protocol Communication, frames are designated by commands, not by parameter setting. So Max. 128 frames can  
be designated when using this communication mode. This section explains No protocol Communication setting & usage.  
1) Sending Data  
Command : DSND  
Sends stored data in designated device at the rising edge of input condition.  
Data and the number of character must be stored in designated device before they are sent.  
Operands  
(a) First operand – Designates communication channel  
(b) Second operand – Number of data to sending (Unit of byte)  
(c) Third operand – Starting address of devices which stores sending data  
(d) Fourth operand – Device address which indicates communication status.  
2) Receiving Data  
Command : DRCV  
Saves received data to pre-defined receiving devices when designated ending condition is occurs.  
The ending condition can be designated by following two kinds.  
- By number of character which is received.  
- By designated last byte. It is useful when there is no interval between received frames.  
Supports hexdecimal type.  
Operands  
(a) First operand – Designates communication channel  
(b) Second operand – Designates receiving format  
(c) Third operand – Starting address of devices which stores receiving data  
(d) Fourth operand – Device which indicates end of receiving  
8-67  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Receiving format can be designated as below.  
Upper byte(hex)  
Lower byte(hex)  
H00(Receiving by Length of frame)  
H03 (Receives when length of frame data is 3)  
H01(Receiving by last byte)  
H03 (Receives when last frame data is 03(ETX))  
- When designated as length of frame : Stores received data to devices when number of received byte is equal to designated  
lower byte value of receiving format.(setting range : 1~255)  
- When designated last byte : Stores received data to devices when receives designated ending byte.  
8.4.2 Parameter setting  
1) Setting Communications Parameter  
(1) Open a new project file from KGLWIN and select MK120S as PLC type  
(2) After selecting communication parameter at KGLWIN. Double click it to activate this window  
(3) Set the communication methods and channel (Refer to Chapter 8.1.7 for details.)  
(4) Click ‘No protocol’, then parameter setting is finished  
8-68  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.4.3 Instructions  
1) No protocol receive(DRCV)  
DRCV  
No protocol receive  
Available Device  
Flag  
No. of  
step  
Instruction  
Error  
(F110)  
Zero  
(F111)  
Carry  
(F112)  
M
P
K
L
F
T
C
S
D
#D Integer  
Ch  
Cw  
D
○ ○ ○ ○ ○ ○ ○  
○ ○ ○  
○ ○  
9
○ ○ ○ ○  
○ ○ ○ ○  
○ ○  
○ ○  
SS  
○ ○  
Flag  
Designation  
Designated communication channel  
Ch  
CW  
D
Designated format of receiving frame  
Error  
(F110)  
Error flag turns on, when designating area is over.  
Device address which is stored communication data  
Device address which is displayed communication  
status  
SS  
DRCV  
Ch  
Cw  
D
SS  
(1) Function  
When the execution condition is on, the communication starts with No protocol.  
Received data is stored in device D’  
If received data is not match to the designated format by Cw’, data is not saved to D’  
The communication status is saved in SS’ .  
(2) Example program  
When the execution condition M0000 is on, the communication starts with channel 1  
When EXT(h’03)’ is received, Received frames are saved to D0100  
When NDR is on, the length of received frames is saved to M010 by byte.  
Length of received data  
error bit Done  
8-69  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
1) No protocol send(DSND)  
DSND  
No protocol send  
Available Device  
Flag  
No. of  
step  
Instruction  
Error  
(F110)  
Zero  
(F111)  
Carry  
(F112)  
M
P
K
L
F
T
C
S
D
#D Integer  
Ch  
n
○ ○ ○ ○ ○ ○ ○  
○ ○ ○  
○ ○  
9
S
○ ○ ○ ○  
○ ○ ○ ○  
○ ○  
○ ○  
SS  
○ ○  
Designation  
Flag  
Ch Designated communication channel  
n
S
Number of data to sending by bytes  
Error  
(F110)  
Error flag turns on, when designating area is over.  
Device address which is stored communication data  
Device address which is displayed communication  
status  
SS  
DSND  
Ch  
n
S
SS  
(1) Function  
When the execution condition is on, the No protocol communication starts  
n’ represents the number of data to send (unit of byte) and Sending data is stored in device D’  
Ch’ is designated communication channel and Communication status is saved in SS.  
(2) Example program  
When the execution condition P0040 is on, the communication starts with channel 1  
Length of sending data which is stored in D0100 is 10 byte and the communication status is stored in M000.  
Length of sent data  
Error  
error bit Done  
(3) Error code  
Code  
Description  
Communication parameter setting error  
06  
08  
09  
Parameter Error  
Slave Device Busy  
Frame Type Error  
Slave device is busy  
Size of sending byte is out of range  
8-70  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.4.4 Examples  
Assume that a electrical weighing machine sends data which has unfixed size continuously. MASTER-K120S can communicates with it  
using no protocol.  
MASTER-K120S Main unit  
Electrical weighing machine  
For no protocol communication, one of following ending condition is designated. One is size of received data and the other is whether it  
has some pre-defined data.  
In this example, assume that received data is as following.  
ENQ(1Byte) + Station No.(1Byte’) + Data(1~10 Words) + EOT(1Byte)”  
When above frame is received, Received framed is saved to designated device If designated Receiving Format(Cw)’ is h0104. and  
decides if use these data or not. After that, sends data which is in sending device if required.  
Assume that the sending data format is as following.  
ACK(1Byte) + Station No.(1Byte) + OK(2Bytes) + EOT(1Byte)”  
In this example the size of received data is 1 word.  
8-71  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
1) Communication Parameter Setting  
Open a new project file from KGLWIN  
- K120S must be selected as PLC type.  
After selecting communication parameter from KGLWIN and clicking twice, this window comes up.  
Designate baud rate, data bit, parity bit, stop bit, and protocol.  
2) Program  
Save sending data to D0100 : ack + 0 + OK + ETX”  
If h’04(EOT) is received, h3004 is saved to D0000, and Weight data to D0111(1 Word)  
Sending 5bytes in D0100 using DSND instruction  
8-72  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.5 Remote connection and communication I/F module  
8.5.1 Remote connection  
MASTER-K120S series can connect to other PLC by built-in Cnet interface or communication I/F modules.  
1) Remote connection by built-in Cnet I/F  
Remote connection by built-in Cnet I/F is available by dedicated communication protocol only.  
If KGLWIN and Master station is connected physically, it can connect to each slave station using remote connection  
function.  
KGLWIN  
Local connection  
Ch.0 Slave, station #1 G7L-CUEC  
G7L-CUEC  
Master station  
RS-422/485 I/F  
Ch.1 Slave, station #2  
Ch0, Slave station#2  
Ch0, Slave station#31  
RS-485 I/F  
Ch.1 Slave, station #31  
Ch.0 RS-422/485 multi-drop system  
Using G7L-CUEC  
Ch.1, RS-485 multi-drop system  
Using built-in Cnet  
8-73  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Open a new project file from KGLWIN  
After selecting menu-project-option, click connection option’  
Click ‘Remote 1’ in depth of connection  
-. Type : Select GLOFA Cnet.  
-. Base : Select 0.  
-. Clot : set to 0 when uses channel 0, and 1’ when uses channel 1  
-. Station No. : Input slave station number to connect  
Click ‘OK’  
Remote connection is available by dedicated protocol only  
2) Remote connection by modem  
Remote connection by modem is available by G7L-CUEB I/F module.  
In this time, TM/TC switch of G7L-CUEB module must be set to On’.  
G7L-CUEB  
G7L-CUEB  
Modem  
Modem  
8-74  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Dedicated modem and dial-up modem are both available and Set connection option of KGLWIN as below.  
3) Remote connection by Fnet I/F module  
G7L-FUEA  
G7L-FUEA  
Remote connection by Fnet interface is available by setting connection option of KGLWIN as below  
8-75  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
8.5.2 Communication I/F module  
MASTER-K120S series supports various kinds of communication I/F module.  
In this time, Built-In Cnet in main unit must be set to Off’ as below and only one communication module can be extended  
BUILT_IN CNET  
ON  
OFF  
Must be off  
ROM MODE  
1) Usage of G7L-CUEB  
Using G7L-CUEB, MASTER-K120S can connect to other PLC by dedicated modem or dial-up modem  
TM/TC Switch  
Set TM/TC switch to ‘On’ when uses remote connection function  
Set TM/TC switch to ‘Off’ when uses data communication function  
Data communication and remote connection function are not allowed simultaneously  
Data communication mode supports every communication protocol but In remote connection function supports dedicated  
protocol only.  
2) Usage of G7L-CUEC  
Channel 0 can be used as RS-422/485 I/F by using G7L-CUEC I/F module  
Operating method is same as built-in Cnet interface and wiring is as below  
RDA  
RDB  
SDA  
SDB  
SG  
RDA  
RDB  
SDA  
SDB  
SG  
RDA  
RDB  
SDA  
SDB  
SG  
RDA  
RDB  
SDA  
SDB  
SG  
Terminating  
resistor  
Slave  
Slave  
Slave  
Master  
Wiring Example : RS-422 I/F  
8-76  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
RDA  
RDB  
SDA  
SDB  
SG  
RDA  
RDB  
SDA  
SDB  
SG  
RDA  
RDB  
SDA  
SDB  
SG  
RDA  
RDB  
SDA  
SDB  
SG  
Master  
Slave  
Wiring Example : RS-485 I/F  
Slave  
Slave  
3) Usage of G7L-FUEA/RUEA  
G7L-FUEA and G7L-RUEA are Field Bus Interface module of LGIS and they support High speed link communication  
service by parameter setting. But communication by command(Read, Write) are not available  
Station number setting switch  
After selecting communication parameter from KGLWIN and select FIELDBUS MASTER as below  
8-77  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 8 Communication Functions  
Clicking List button then this window comes up.  
Designate self-station No. and set link items after double clicking entry list  
For the details, refer to Users manual of Fnet I/F module  
4) Usage of G7L-PBEA/DBEA  
G7L-PBEA support profibus slave function only and G7L-DBEAsupports DeviceNet slave interface function only.  
After selecting communication parameter from KGLWIN and select FIELDBUS slave as below  
Clicking List button then this window comes up.  
After double clicking entry list 0, designate from/to area  
Pnet For maximum Sending/Receiving data size is 244 byte and that of DeviceNet are 30/32 byte.  
For the details, refer to corresponding Users manual  
8-78  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 9 Installation and Wiring  
Chapter 9. Installation and wiring  
9.1 Installation  
9.1.1 Installation Environment  
This unit has high reliability regardless of its installation environment, but be sure to check the following for system reliability.  
1) Environment requirements  
Avoid installing this unit in locations which are subjected or exposed to:  
(1) Water leakage and dust.  
(2) Continuous shocks or vibrations.  
(3) Direct sunlight.  
(4) Dew condensation due to rapid temperature change.  
(5) Higher or lower temperatures outside the range of 0 to 55℃  
(6) Relative humidity outside the range of 5 to 95℃  
(7) Corrosive or flammable gases  
2) Precautions during installing  
(1) During drilling or wiring, do not allow any wire scraps to enter into the PLC.  
(2) Install it on locations that are convenient for operation.  
(3) Make sure that it is not located on the same panel that high voltage equipment located.  
(4) Make sure that the distance from the walls of duct and external equipment be 50mm or more.  
(5) Be sure to be grounded to locations that have good ambient noise immunity.  
3) Heat protection design of control box  
(1) When installing the PLC in a closed control box, be sure to design heat protection of control box with consideration of the  
heat generated by the PLC itself and other devices.  
(2) It is recommended that filters or closed heat exchangers be used.  
(3) The following shows the procedure for calculating the PLC system power consumption.  
9-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 9 Installation and Wiring  
4) Power consumption block diagram of PLC systems  
Main Unit  
I5V  
5VDC line  
Expansion  
module  
power  
supply  
part  
Input  
special  
module  
output part  
(transistor)  
input part  
Output part  
(Transistor)  
Input part  
CPU part  
AC power  
Supply  
Output Current.  
(IOUT)×Vdrop  
Input Current  
(IIN)×Vdrop  
Output Current.  
(IOUT)×Vdrop  
Input Current  
(IIN)×Vdrop  
I24V  
Input  
Current  
(IOUT)  
Output  
Current  
Input  
Current  
Output  
Current  
(IOUT)  
24VDC line  
(IOUT)  
(IOUT)  
Load  
Load  
External  
24VDC  
power  
Supply  
5) Power consumption of each part  
(1) Power consumption of a power supply part  
Approximately 65% of the power supply module current is converted into power 35% of that 65% dissipated as heat,  
i.e., 3.5/6.5 of the output power is actually used.  
W = 3.5 / 6.5 {(I5V x 5) + (I24V x 24)} (W)  
pw  
where, l5v:5VDC circuit current consumption of each part  
l24v: 24VDC circuit average current consumption of output part (with points simultaneously switched ON).  
Not for 24VDC power supplied from external or power supply part that has no 24VDC output.  
(2) Total 5VDC power consumption  
The total power consumption of all modules is the power of the 5VDC output circuit of the power supply part.  
W5V = I5V × 5 (W)  
(3) Average DC24V power consumption (with points simultaneously switched ON)  
The total power consumption of all modules is the average power of the DC24V output circuit of the power supply part.  
W24V = I24V × 24 (W)  
(4) Average power consumption by voltage drop of output part (with points simultaneously switched ON)  
Wout = Iout × Vdrop × output points × the rate of points switched on simultaneously (W)  
Iout : output current (actual operating current) (A)  
Vdrop : voltage dropped across each output load (V)  
(5) Average power consumption of input parts (with points simultaneously ON)  
Win = lin ×E × input points × the rate of points switched on simultaneously (W)  
Iin : input current (effective value for AC) (A)  
E : input voltage (actual operating voltage) (V)  
9-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 9 Installation and Wiring  
(6) Power consumption of the special module  
WS = I5V X 5 + I24V X 24 (W)  
(7) The sum of the above values is the power consumption of the entire PLC system.  
W = WPW + W5V + W24V + Wout + Win + Ws (W)  
(8) Check the temperature rise within the control panel with calculation of that total power consumption(W).  
The temperature rise in the control panel is expressed as:  
T=W/UA[°C]  
W : Power consumption of the entire PLC system(obtained as shown above)  
2
A : Control panel inside surface area [m ]  
U : if the control panel temperature is controlled by a fan, etc  
if control panel air is not circulated  
6
4
9.1.2 Handling Instructions  
Do not drop it off, and make sure that strong shock should not be applied.  
Do not unload the PCB from its case. It can cause faults.  
During wiring, be sure to check any foreign matter like wire scraps should not enter into the upper side of the PLC. If any  
foreign matter has entered into it, always eliminate it.  
1) Main unit or Expansion Module handling instructions  
The followings explains instructions for handling or installing the Base unit or Expansion Module.  
(1) I/O specifications re-check  
Re-check the input voltage for the input part. if a voltage over the maximum switching capacity is applied, it can cause  
faults, destruction or fire.  
(2) Used wire  
Select the wire with due consideration of ambient temperature and rated current. Its minimum specifications should be  
AWG24(0.18 ) or more.  
(3) Environment  
When wiring the I/O part, if it locates near a device generating an cause short circuit, destruction or malfunction.  
(4) Polarity  
Before applying the power to part that has polarities, be sure to check its polarities.  
(5) Terminal block  
Check its fixing. During drilling or wiring, do not allow any wire scraps to enter the PLC. It can cause malfunction and fault.  
9-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 9 Installation and Wiring  
(6) Wiring  
Wiring I/O wires with high voltage cable or power supply line can cause malfunction or disorder.  
Be sure that any wire does not pass across during input LED(I/O status will not be clearly identified).  
If an inductive load has been connected to output part, connect parallel surge killer or diode to a load. Connect the cathode of  
diode to the +’ part of the power supply.  
Inductive load  
Surge Killer  
OUT  
Output part  
Output part  
COM  
OUT  
Inductive load  
Diode  
+
-
COM  
(7) Be cautious that strong shock does not applied to the I/O part.  
(8) Do not separate the PCB from its case.  
2) Mounting instructions  
The following explains instructions for mounting the PLC onto the control panel.  
(1) Allow sufficient distance from upper part of the Unit for easy module replacement and ventilation.  
(2) Make sure that MASTER-K120S is installed in figure below for most effective heat radiation.  
K7M-DR30U  
(3) Do not mount the base board together with a large-sized electromagnetic contact or no-fuse breaker, which produces vibration,  
on the same panel. Mount them on different panels, or keep the unit or module away from such a vibration source  
9-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 9 Installation and Wiring  
(4) Mount the wire duct as it is needed.  
If the clearances are less than those in Fig below, follow the instructions shown below  
If the wire duct is mounted on the upper part of the PLC, make the wiring duct clearance 50 or less for good  
ventilation. Also, allow the distance enough to press the hook in the upper part from the upper part of the PLC.  
If the wire duct is mounted on the lower part of the PLC, make optic or coaxial cables contact it and consider the  
minimum diameter of the cable.  
(5) To protect the PLC from radiating noise or heat, allow 100 or more clearances between it and parts. Left or right  
clearance and clearance from other device in the left or right side should be 100 or more.  
80mm or more  
80mm or more  
High voltage  
device  
Other  
device  
100mm or more  
Heat generating device  
(6) MASTER-K120S has hooks for DIN rail in the base unit and expansion modules.  
DIN rail  
K7M-DR30U  
9-5  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 9 Installation and Wiring  
9.1.3 Connection of expansion module  
The following explains the Connection of expansion modules to the main unit.  
(1) Open the connector cover of the main unit.  
(2) Insert the connector of the expansion module to the connector of the base unit.  
:Main unit  
:Connector cover  
:expansion module  
:expansion cable  
(3) Close the connector cover of the main unit.  
9-6  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 9 Installation and Wiring  
9.2 Wiring  
The followings explains the wiring instructions for use of the system.  
9.2.1 Power Supply Wiring  
(1) When voltage fluctuations are larger than the specified value, connect a constant-voltage transformer.  
(2) Use a power supply which generates minimal noise across wire and across PLC and ground. (When excessive noise is  
generated, connect an insulating transformer)  
AC100-240V  
MASTER-K120S  
FG  
main unit  
Constant-voltage transformer  
(4) When wiring, separate the PLC power supply from those for I/O and power device as shown below.  
Main power  
PLC power  
PLC  
AC220V  
T1  
T2  
I/O power  
Main circuit  
T1,T2 : constant voltage transformer  
I/O device  
Main circuit device  
(5) To minimize voltage drop, use the thickest (max. 2 ) wires possible  
(6) Do not bundle the 100 VAC and 24VDC cables with main-circuit (high voltage, large current) wires or the I/O signal wires.  
If possible, provide more than 80 distance between the cables and wires.  
9-7  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 9 Installation and Wiring  
(7) As a measure against very large surge(e.g. due to lightening),connect a surge absorber as shown below.  
PLC  
E1  
E2  
Surge absorber for lightening  
(8) Use a insulating transformer or noise filter for protection against noise.  
(9) Twist every input power supply wires as closely as possible. Do not allow the transformer or noise filter across the duct.  
Remark  
1) Ground the surge absorber(E1) and the PLC(E2) separately from each other.  
2) Select a surge absorber making allowances for power voltage rises.  
9.2.2 Input and Output Devices Wiring  
(1) Applicable size of wire to the terminal block connector is 0.18 to 2 . However, it is recommended to use wire of 0.5 for  
convenience.  
(2) Separate the input and output lines.  
(3) I/O signal wires must be at least 100 (3.94 in) away from high voltage and large current circuit wires.  
(4) When the I/O signal wires cannot be separated from the main circuit wires and power wires, ground on the PLC side with batch-  
shielded cables. Under some conditions it may be preferable to ground on the other side.  
PLC  
Shielded cable  
Input  
RA  
DC  
(5) If wiring has been done with of piping, ground the piping.  
(6) Separate the 24VDC I/O cables from the 110VAC and 220VAC cables.  
(7) If wiring over 200m or longer distance, trouble can be caused by leakage currents due to line capacity.  
Refer to the section 11.4 Troubleshooting Examples.’  
9-8  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 9 Installation and Wiring  
9.2.3 Grounding  
(1) This PLC has sufficient protection against noise, so it can be used without grounding except for special much noise. However,  
when grounding it should be done conforming to below items.  
(2) Ground the PLC as independently as possible. Class 3 grounding should be used (grounding resistance 80or less).  
(3) When independent grounding is impossible, use the joint grounding method as shown in the figure below (B).  
PLC  
Other device  
Other device  
Other device  
PLC  
PLC  
Class 3 grounding  
Class 3 grounding  
(B) Joint grounding : Good  
(A)Independent grounding : Best  
(C) Joint grounding : Not allowed  
(4) Use 2 (14AWG) or thicker grounding wire. Grounding point should be as near as possible to the PLC to minimize the  
distance of grounding cable.  
9.2.4 Cable Specifications for wiring  
The specifications for wiring is as follows:  
Cable Specifications ()  
Kinds of external connection  
Minimum  
Maximum  
Digital Input  
0.18 (AWG24)  
1.5 (AWG16)  
Digital Output  
Analog Input / Output  
Communication  
Main power  
0.18 (AWG24)  
0.18 (AWG24)  
0.18 (AWG24)  
1.5 (AWG16)  
1.5 (AWG16)  
2.0 (AWG14)  
1.5 (AWG16)  
1.5 (AWG16)  
2.5 (AWG12)  
2.5 (AWG12)  
Grounding  
Be sure to use solderless terminal for power supply and I/O wiring.  
Be sure to use M3 type as terminal screw.  
Make sure that terminal screw is connected by 69 ㎏·㎝ torque..  
Be sure to use fork shaped terminal screw as shown below.  
cable solderness terminal (fork shaped)  
less than 6.2mm  
9-9  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 10 Maintenance  
Chapter 10 Maintenance  
Be sure to perform daily and periodic maintenance and inspection in order to maintain the PLC in the best conditions.  
10.1 Maintenance and Inspection  
The I/O module mainly consist of semiconductor devices and its service life is semi-permanent. However, periodic inspection is  
requested for ambient environment may cause damage to the devices. When inspecting one or two times per six months, check  
the following items.  
Check Items  
Temperature  
Judgment  
0 ~ + 55°C  
Corrective Actions  
Adjust the operating temperature and humidity with the  
defined range.  
Ambient  
Humidity  
Vibration  
5 ~ 95%RH  
environment  
Use vibration resisting rubber or the vibration prevention  
method.  
No vibration  
Play of modules  
No play allowed  
No loose allowed  
15% to 10%  
Securely enrage the hook.  
Retighten terminal screws.  
Hold it with the allowable range.  
Connecting conditions of  
terminal screws  
Change rate of input voltage  
Check the number of  
Spare parts and their  
Store conditions  
Spare parts  
Cover the shortage and improve the conditions  
10.2 Daily Inspection  
The following table shows the inspection and items which are to be checked daily.  
Corrective  
Actions  
Check Items  
Check Points  
Judgement  
Retighten  
Screws  
Connecting conditions check for loose mounting screws  
Screws should not be loose  
of terminal block or  
Check the distance between solderless  
extension cable  
Proper clearance should be provided Correct  
terminals  
PWR LED  
Run LED  
ERR LED  
Check that the LED is ON  
ON(OFF indicates an error)  
ON (flickering indicates an error)  
OFF(ON indicates an error)  
See chapter 11  
Check that the LED is ON during Run  
Check that the LED is OFF during Run  
See chapter 11  
See chapter 11  
LED  
status  
ON when input is ON,  
OFF when input is off  
ON when output is ON,  
OFF when output is off  
Input LED  
Check that the LEO turns ON and OFF  
See chapter 11  
See chapter 11  
Output LED Check that the LEO turns ON and OFF  
10-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 10 Maintenance  
10.3 Periodic Inspection  
Check the following items once or twice every six months, and perform the needed corrective actions.  
Check Items  
Checking Methods  
Judgment  
Corrective Actions  
Ambient  
0 ~ 55 °C  
temperature  
-. Measure with thermometer and  
hygrometer  
Adjust to general standard  
(Internal environmental standard of  
control section)  
Ambient  
Ambient Humidity  
5 ~ 95%RH  
Environment  
-. measure corrosive gas  
There should be no  
corrosive gases  
Ambience  
The module should be move  
the unit  
The module should be  
mounted securely.  
Looseness, Ingress  
PLC  
Retighten screws  
Conditions  
dust or foreign  
material  
Visual check  
Re-tighten screws  
Visual check  
Visual check  
No dust or foreign material  
Loose terminal  
screws  
Screws should not be loose Retighten  
Proper clearance Correct  
Connectors should not be Retighten connector mounting  
Distance between  
terminals  
Connecting  
conditions  
Loose connectors  
loose.  
screws  
Measure voltage between input  
terminals  
*85 ~ 264V AC  
*20~28V DC  
Line voltage check  
Change supply power  
If fuse melting disconnection,  
change the fuse periodically  
because a surge current can cause  
heat  
Fuse  
Visual check  
No melting disconnection  
10-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 11 Troubleshooting  
Chapter 11 Troubleshooting  
The following explains contents, diagnosis and corrective actions for various errors that can occur during system operation.  
11.1 Basic Procedures of Troubleshooting  
System reliability not only depends on reliable equipment but also on short downtimes in the event of faults.  
The short discovery and corrective action is needed for speedy operation of system.  
The following shows the basic instructions for troubleshooting.  
1) Visual checks  
Check the following points.  
Machine operating condition (in stop and operating status)  
Power On/Off  
- Status of I/O devices  
- Condition of wiring (I/O wires, extension and communications cables)  
- Display states of various indicators (such as POWER LED, RUN LED, ERR. LED and I/O LED).  
After checking them, connect peripheral devices and check the operation status of the PLC and the  
program contents.  
2) Trouble Check  
Observe any change in the error conditions during the following.  
Switch to the STOP position, and then turn the power on and off.  
3) Narrow down the possible causes of the trouble where the fault lies, i.e.:  
Inside or outside of the PLC?  
I/O module or another module?  
PLC program?  
11.2 Troubleshooting  
This section explains the procedure for determining the cause of troubles as well as the errors and corrective actions.  
Flowchart used when the POWER LED is turned OFF  
Flowchart used when the ERR LED is flickering  
Flowchart used when the RUN turned OFF.  
Is the power LED turned OFF?  
Is the ERR LED flickering?  
Are the RUN LED turned OFF?  
I/O module doesnt operate properly  
Flowchart used when the output load of the output module  
doesnt turn on.  
Flowchart used when a program cant be written to the PLC  
Program cannot be written  
11-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 11 Troubleshooting  
11.2.1 Troubleshooting flowchart used when the POWER LED turns OFF.  
The following flowchart explains corrective action procedure used when the power is supplied or the power led turns off during  
operation.  
Power LED is turned OFF  
Supply the power.  
Is the power supply operating?  
No  
Yes  
Yes  
No  
Does the power led turn on?  
No  
See the power supply be within  
AC 85-264 V.  
Is the voltage within the rated  
power?  
Yes  
Yes  
Yes  
No  
No  
Does the power led turn on?  
Replace the fuse.  
Yes  
Is the fuse blown?  
No  
Does the power led turn on?  
No  
Is the power supply cable  
connected?  
Connect the power cable correctly.  
Does the power led turn on?  
Yes  
Yes  
No  
Yes  
Over current protection device  
activated?  
1)Eliminate the excess current  
2)Switch the input power OFF then  
ON  
No  
Yes  
No  
Does the power led turn on?  
Write down the troubleshooting  
questionnaire and contact  
the nearest service center  
Complete  
11-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 11 Troubleshooting  
11.2.2 Troubleshooting flowchart used when the ERR LED is flickering  
The following flowchart explains corrective action procedure use when the power is supplied starts or the ERR LED is flickering during  
operation.  
ERR LED goes flickering.  
Check the error code, with connected  
KGLWIN.  
Yes  
See App-2 System Warning Flag”  
Warning error?  
and remove the cause of the error.  
No  
Yes  
Is ERR LED still flicking  
No  
Write down the Troubleshooting  
Complete  
Questionnaires and contact the nearest  
service center.  
REMARK  
Though warning error appears, PLC system doesnt stop but corrective action is needed promptly. If not, it may cause the  
system failure.  
11-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 11 Troubleshooting  
11.2.3 Troubleshooting flowchart used when the RUN LED turns off.  
The following flowchart explains corrective action procedure to treat the lights-out of RUN LED when the power is supplied,  
operation starts or operation is in the process.  
RUN LED is off.  
Turn the power unit off and on.  
No  
Is RUN LED off?  
Yes  
Contact the nearest service center.  
Complete  
11-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 11 Troubleshooting  
11.2.4 Troubleshooting flowchart used when the I/O part doesnt operate normally.  
The following flowchart explains corrective action procedure used when the I/O module doesnt operate normally.  
When the I/O module doesnt work normally.  
No  
Is the indicator LED of  
the P40 on?  
Yes  
Measure the voltage of power  
supply in P40  
Replace the connector of the  
terminal board  
Check the status of P40 by  
KGLWIN  
Correct wiring.  
No  
No  
No  
Yes  
Is the  
terminal connector  
connector appropriate?  
Is the  
Is it normal condition?  
No  
Is the output  
voltage of power supply for load  
applied?  
wiring correct?  
Yes  
Yes  
Yes  
Separate the external wiring than check the condition of  
output module.  
Yes  
No  
Continue  
Is it normal condition?  
Check the status of P40  
Replace the Unit  
11-5  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 11 Troubleshooting  
Continue  
No  
Are the indicator LED of the  
switch 1 and 2 on?  
Yes  
Check the status of the switch  
1and 2  
Check the status of the switch  
1and 2  
Is the  
Yes  
terminal screw tighten  
securely?  
Is input wiring correct?  
Is input wiring correct?  
No  
No  
NO  
Yes  
Yes  
Is the condition  
of the terminal board connector  
appropriate?  
Yes  
Is input wiring correct?  
No  
No  
Separate the external wiring witch then  
check the status by forced input  
Correct wiring  
Replace the terminal  
board connector  
Retighten the terminal  
screw  
Correct the wiring  
Yes  
No  
Unit replacement is  
needed  
Check the status of the switch  
1 and 2  
Unit replacement is  
needed  
Check from the beginning  
11-6  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 11 Troubleshooting  
11.2.5 Troubleshooting flowchart used when a program cannot be written to the CPU part  
The following flowchart shows the corrective action procedure used when a program cannot be written to the PLC module.  
Program cannot be written to the PC CPU  
Switch to the remote STOP mode  
and execute the program write.  
No  
Is the mode-setting switch set the re  
mote STOP?  
Yes  
After reading error code by using peripheral  
Yes  
device, correct the contents.  
Is ERR. LED blinking?  
No  
Complete  
11-7  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 11 Troubleshooting  
11.3 Troubleshooting Questionnaire  
When problems have been met during operation of the MASTER-K120S series, please write down this Questionnaires and contact the  
service center via telephone or facsimile.  
y For errors relating to special or communication modules, use the questionnaire included in the Users manual of the unit.  
1. Telephone & FAX No  
Tell)  
FAX)  
2. Using equipment model:  
3. Details of using equipment  
CPU model: .(  
)
OS version No.(  
)
)
Serial No.(  
)
KGLWIN version No. used to compile programs: (  
4.General description of the device or system used as the control object:  
5. The kind of the base unit:  
Operation by the mode setting switch (  
),  
),  
Operation by the KGLWIN or communications (  
External memory module operation  
(
),  
6. Is the ERR. LED of the CPU module turned ON? Yes(  
7. KGLWIN error message:  
), No(  
)
8. Used initialization program: initialization program (  
)
9. History of corrective actions for the error message in the article 7:  
10. Other tried corrective actions:  
11. Characteristics of the error  
y Repetitive( ): Periodic( ), Related to a particular sequence( ), Related to environment(  
y Sometimes( ): General error interval:  
)
12. Detailed Description of error contents:  
13. Configuration diagram for the applied system:  
11-8  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 11 Troubleshooting  
11.4 Troubleshooting Examples  
Possible troubles with various circuits and their corrective actions are explained.  
11.4.1 Input circuit troubles and corrective actions  
The followings describe possible troubles with input circuits, as well as corrective actions.  
Cause  
Condition  
Corrective Actions  
Leakage current of external device  
(Such as a drive by non-contact switch)  
y Connect an appropriate register and capacity,  
which will make the voltage lower across the  
terminals of the input module.  
Input signal  
doesnt turn off.  
AC input  
C
Leakage current  
AC input  
R
C
R
~
External device  
~
Leakage current of external device  
(Drive by a limit switch with neon lamp)  
Input signal  
doesnt turn off.  
(Neon lamp  
y CR values are determined by the leakage current  
value.  
AC input  
Recommended value C : 0.1 ~ 0.47  
C
Leakage current  
may be still on)  
R: 47 ~ 120 (1/2W)  
R
Or make up another independent display circuit.  
~
External device  
Leakage current due to line capacity of wiring cable.  
Input signal  
y Locate the power supply on the external device  
doesnt turn off.  
side as shown below.  
AC input  
AC input  
Leakage current  
~
~
External device  
External device  
Leakage current of external device (Drive by switch with  
LED indicator)  
Input signal  
y Connect an appropriate register, which will make  
doesnt turn off.  
the voltage higher than the OFF voltage across the  
DC input  
input module terminal and common terminal.  
DC input  
Leakage current  
R
R
External device  
y Sneak current due to the use of two different power  
supplies.  
Input signal  
y Use only one power supply.  
doesnt turn off.  
y Connect a sneak current prevention diode.  
DC input  
DC input  
L
E1  
E1  
E2  
L
E
y E1 > E2, sneaked.  
11-9  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 11 Troubleshooting  
11.4.2 Output circuit troubles and corrective actions  
The following describes possible troubles with input circuits, as well as their corrective actions.  
Condition  
Cause  
Corrective Action  
y Connect registers of tens to hundreds Kacross the  
load in parallel.  
When the output is  
off, excessive  
yLoad is half-wave rectified inside (in some cases, it is true  
of a solenoid)  
yWhen the polarity of the power supply is as shown in ,  
C is charged. When the polarity is as shown in , the  
voltage charged in C plus the line voltage are applied  
across D. Max. voltage is approx. 22.  
voltage is applied to  
the load.  
R
D
C
D
~
C
R
Load  
~
R
Load  
*) If a resistor is used in this way, it does not pose a  
problem to the output element. But it may make the  
performance of the diode (D), which is built in the load,  
drop to cause problems.  
The load doesnt  
turn off.  
y Leakage current by surge absorbing circuit, which is y Connect C and R across the load, which are of registers  
of tens K. When the wiring distance from the output  
connected to output element in parallel.  
module to the load is long, there may be a leakage current  
Output  
Load  
due to the line capacity.  
C
C
R
R
~
Leakage current  
R
Load  
Load  
When the load is  
y Leakage current by surge absorbing circuit, which is y Drive the relay using a contact and drive the C-R type  
C-R type timer, time connected to output element in parallel.  
timer using the since contact.  
constant fluctuates.  
y Use other timer than the CR contact some timers have  
half-ware rectified internal circuits therefore, be cautious.  
Output  
Load  
C
Timer  
T
~
R
Leakage current  
X
Output  
~
The load does not  
turn off.  
y Sneak current due to the use of two different power y Use only one power supply.  
supplies. y Connect a sneak current prevention diode.  
Output  
Output  
Load  
Load  
E
E1  
E
E2  
If the load is the relay, etc, connect a counter-electromotive  
voltage absorbing code as shown by the dot line.  
E1<E2, sneaks. E1 is off (E2 is on), sneaks.  
11-10  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 11 Troubleshooting  
Output circuit troubles and corrective actions (continued).  
Condition  
Cause  
Corrective actions  
The load off  
y Over current at off state [The large solenoid current y Insert a small L/R magnetic contact and drive the load  
response time fluidic load (L/R is large) such as is directly driven with using the same contact.  
is long.  
the transistor output.  
Output  
Output  
Off current  
Load  
E
Load  
y The off response time can be delayed by one or  
more second as some loads make the current flow  
across the diode at the off time of the transistor  
output.  
Output  
Surge current of the white lamp  
y To suppress the surge current make the dark current  
transistor  
destroyed.  
is  
of 1/3 to 1/5 rated current flow.  
Output  
Output  
E
R
E1  
Sink type transistor output  
A surge current of 10 times or more when turned on.  
Output  
R
E
Source type transistor output  
11-11  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 11 Troubleshooting  
11.5 Error code list  
Error  
Code  
Message  
CPU state  
Message  
Cause  
Corrective Actions  
Internal system  
error  
Fault of some area of operating ROM,  
or H/W defect  
0001h  
Stop  
Stop  
Stop  
Stop  
Stop  
System Error  
Contact the service center.  
Contact the service center.  
Contact the service center.  
Contact the service center.  
Contact the service center.  
0002h OS ROM error  
0003h OS RAM error  
OS ROM Error  
OS RAM Error  
DATA RAM Error  
PGM RAM Error  
Internal system ROM is defected  
Internal system RAM is defected  
Data RAM is defected  
0004h Data RAM error  
Program RAM  
0005h  
Program RAM is defected  
error  
Defect of dedicated LSI for sequence  
instruction processing  
0006h Gate array error  
Sub rack power  
Stop  
Stop  
G/A Error  
Contact the service center.  
Check the power of the  
extension rack  
Sub Power Error  
Extension Rack Power down or Error  
0007h  
down error  
Turn the power off and  
restart the system.  
Contact the service center.  
0008h OS WDT error  
Stop  
Stop  
OS WDT Error  
CPU OS watch dog error  
Common RAM  
0009h  
error  
Common RAM Error Common RAM interface error  
Contact the service center.  
Check the fuse LED of the  
unit. Turn the power off  
and replace the fuse.  
Continue  
(stop)  
Break of fuse used in output units or  
000Ah Fuse break error  
I/O Fuse Error  
Mixed I/O  
Instruction code  
Instructions unreadable by the CPU  
OP Code Error  
000Bh  
error  
Stop  
Stop  
Contact the service center.  
are included. (during execution)  
Flash memory  
000Ch error(during  
execution)  
Read to/Write from the inserted Flash  
User Memory Error  
Check and replace the  
flash memory.  
memory is not performed.  
Turn the power off and  
mount the unit firmly, and  
restart the system.  
Replace the I/O unit or  
extension cable.  
Mounting/dismounting of I/O units  
during operation, or connection fault  
I/O unit defect or extension cable  
defect  
0010h I/O slot error  
Stop  
Stop  
I/O Slot Error  
Points of mounted I/O units overrun  
the maximum I/O points. (FMM  
mounting number over error,  
Maximum I/O  
0011h  
error  
MAX I/O Error  
Replace the I/O unit.  
MINI_MAP over)  
Special card  
0012h  
Stop  
Stop  
Stop  
Special I/F Error  
FMM 0 I/F Error  
FMM 1 I/F Error  
Special Card Interface error  
FMM 0 I/F Error  
Contact the service center.  
Contact the service center.  
Contact the service center.  
interface error  
0013h FMM 0 I/F error  
0014h FMM 1 I/F error  
FMM 1 I/F Error  
0015h FMM 2 I/F error  
0016h FMM 3 I/F error  
Stop  
Stop  
FMM 2 I/F Error  
FMM 3 I/F Error  
FMM 2 I/F Error  
FMM 3 I/F Error  
Contact the service center.  
Contact the service center.  
A written parameter has changed, or  
checksum error  
Correct the content of the  
parameter.  
0020h Parameter Error  
Stop  
Parameter Error  
When the power is applied or RUN  
starts, I/O unit reservation information  
differs from the types of real loaded  
I/O units.  
Correct the content of the  
parameter, or reallocate or  
replace the I/O unit.  
I/O Parameter  
Stop  
(continue)  
0021h  
Error  
I/O Parameter Error  
The point of the reserved I/O  
information or real loaded I/O units  
overruns the maximum I/O point.  
Maximum I/O  
Correct the content of the  
parameter.  
0022h  
Over  
Stop  
I/O PARA Error  
FMM 0 Parameter  
0023h  
Error  
Stop  
Stop  
Stop  
FMM 0 PARA Error  
FMM 1 PARA Error  
FMM 2 PARA Error  
FMM 0 Parameter Error  
FMM 1 Parameter Error  
FMM 2 Parameter Error  
Correct the parameter.  
Correct the parameter.  
Correct the parameter.  
FMM 1 Parameter  
0024h  
Error  
FMM 2 Parameter  
0025h  
Error  
11-12  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 11 Troubleshooting  
(continued)  
Error  
Code  
Error  
CPU state  
Message  
Cause  
Corrective Actions  
FMM 3 Parameter  
Error  
0026h  
Stop  
Stop  
FMM 3 PARA Error  
FMM 3 Parameter Error  
Correct the parameter.  
A digit of other than 0 to 9 has met  
during BCD conversion.  
Correct the content of the  
error step.  
0030h  
0031h  
Operation Error  
WDT Over  
Operation Error  
WDT Over Error  
An operand value is outside the  
defined operand range.  
Check the maximum scan  
time of the program and  
modify the program or  
insert programs.  
Continue  
(stop)  
Scan time has overrun the watch dog  
time.  
Program replacement has  
not been completed during  
run. (JMP ~ JME, FOR ~  
NEXT, CALLx and SBRTx  
…)  
Error of Program  
Change during  
run.  
An error has occurred at program  
change during run. (NO SBRT, JME  
and END …)  
0032h  
Stop  
PGM Change Error  
Program Check  
Error  
An error has occurred while checking  
a program.  
0033h  
0040h  
Continue  
Code Check Error  
Code Check Error  
Correct the error.  
An instruction unreadable by the CPU  
is included.  
Code Check Error Stop  
Correct the error step.  
Missing the END  
instruction in the  
program.  
Insert the END instruction  
at the bottom of the  
program.  
The program does not have the END  
instruction.  
0041h  
0042h  
Stop  
Stop  
Miss END Error  
Miss RET Error  
Missing the RET  
instruction in the  
program.  
Insert the END instruction  
at the bottom of the  
program.  
The subroutine does not has the RET  
instruction at its bottom.  
Missing the SBRT  
instruction in the  
subroutine  
The subroutine does not has the  
SBRT instruction.  
Insert the SBRT  
instruction.  
0043h  
Stop  
Miss SBRT Error  
program.  
The JMP ~ JME  
instruction error  
Correct the JMP ~ JME  
instruction.  
0044h  
0045h  
Stop  
Stop  
JMP(E) Error  
The JMP ~ JME instruction error  
The FOR ~ NEXT instruction error  
The FOR ~ NEXT  
instruction error  
Correct the FOR ~ NEXT  
instruction.  
FOR~NEXT Error  
The MCS ~  
MCSCLR  
instruction error  
MCS~MCSCLR  
Error  
Correct the MCS ~  
MCSCLR instruction.  
0046h  
0047h  
Stop  
The MCS ~ MCSCLR instruction error  
The MPUSH ~ MPOP instruction error  
The MPUSH ~  
MPOP instruction Stop  
error  
MPUSH ~ MPOP  
Error  
Correct the MPUSH ~  
MPOP instruction  
0048h  
0049h  
Dual coil error  
Stop  
DUAL COIL Error  
Syntax Error  
Timer or counter has been duplicated. Correct timer, counter.  
Input condition error, or too much use  
of LOAD or AND(OR) LOAD.  
Check and correct the  
program.  
Syntax error  
Stop  
11-13  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 1 System Definitions  
Appendix 1. System Definitions  
1) Option  
(1) Connect Option  
You should set the communication port (COM14) to communicate with PLC.  
Select the Project-Option-Connection Option in menu.  
Default Connection is RS-232C interface.  
For the detail information about Connection Option, refer to KGLWIN Manual.  
App1-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 1 System Definitions  
(2) Editor option  
Monitor display type  
- Select the desired type in the monitor display type(4 types).  
Source File Directory :  
- You can set directories for the files to be created in KGLWIN.  
- In Source Directory, KGLWIN saves source program files of program, parameter etc.  
Auto save  
- This function is to set the time interval for Auto saving (Range : 0 ~60 min)  
- Automatically saved file is saved in the current directory.  
- The file is automatically deleted when the program window is closed. Therefore if a program cannot be saved by  
"Program Error" before program is not saved, you can recover some program by loading auto saved file.  
- This function is to set the time interval for Auto saving.  
- When set to 0, auto save function is disabled.  
App1-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 1 System Definitions  
(3) Page setup  
You can select print option when the project print out .(margin, cover, footer)  
App1-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 1 System Definitions  
2) Basic Parameters  
The basic parameters are necessary for operation of the PLC.  
Set the Latch area, ‘Timer boundary’ , ‘Watchdog timer, ‘PLC operation mode, ‘Input setting, ‘Pulse catch’  
(1) Latch area setting  
Set the retain area on the inner device.  
(2) Timer boundary setting  
Set the 100ms/10ms/1ms timer boundary.  
( If 100ms and 10ms timer are set, the rest of timer area is allocated 1ms automatically)  
(3) Watchdog timer setting  
For the purpose of the watch of normal program execution ,.  
This parameter is used to set the maximum allowable execution time of a user program in order to supervisor its  
normal or abnormal operation.(Setting range is 10ms ~ 6000ms)  
(4) Input setting  
set the input filter constant and input catch contact point  
(5) Remote access control setting  
When this parameter is set, the operation mode of PLC system can be changed by remote access with FAM or  
communication module.  
App1-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 2 Flag List  
Appendix 2. Flag List  
1) Special relay (F)  
This flag is useful to edit user program.  
Relay  
F0000  
Function  
Description  
RUN mode  
Program mode  
Pause mode  
Turns on when the CPU in the RUN mode.  
Turns on when the CPU in the Program mode  
Turns on when the CPU in the Pause mode  
Turns on when the CPU in the Debug mode  
Turns on when the CPU in the Remote mode  
F0001  
F0002  
F0003  
Debug mode  
F0006  
Remote mode  
Unused  
F0007~F000B  
F000C  
User memory installation  
RTC installation  
Unused  
Turns on when a user memory is installed.  
Turns on when a RTC module is installed.  
F000D  
F000E  
F000F  
Execution of the STOP instruction Turns on when the STOP instruction is being operated.  
F0010  
Always On  
Always Off  
1 Scan On  
1 Scan Off  
Scan toggle  
Unused  
Always On  
Always Off  
1 Scan On  
1 Scan Off  
Scan toggle  
F0011  
F0012  
F0013  
F0014  
F0015 to F001F  
F0020  
1 step run  
Turns on when the 1 step run is operated in the Debug mode.  
F0021  
Breakpoint run  
Turns on when the breakpoint run is operated in the Debug  
mode.  
F0022  
F0023  
Scan run  
Turns on when the scan run is operated in the Debug mode.  
Coincident contact value run  
Turns on when the coincident contact run is operated in the  
Debug mode.  
F0024  
Coincident word value run  
Turns on when the coincident word run is operated in the Debug  
mode.  
F0025 to F002F  
F0030  
Unused  
Fatal error  
Turns on when a fatal error has occurred.  
F0031  
Ordinary error  
WDT Error  
Turns on when an ordinary error has occurred.  
Turns on when a watch dog timer error has occurred.  
Turns on when an I/O error has occurred.  
F0032  
F0033  
I/O combination error  
(When one or more bit(s) of F0040 to F005F turns on)  
F0034 to F0038  
F0039  
Unused  
Normal backup operation  
RTC data error  
Turns on when the data backup is normal.  
F003A  
Turns on when the RTC data setting error has occurred.  
Turns on during program edit while running the program.  
F003B  
Program editing  
Turns on when a program edit error has occurred while running  
the program.  
F003C  
Program edit error  
Unused  
F003D to F003F  
App2-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 2 Flag List  
(Continued)  
Relay  
Function  
I/O error  
Description  
When the reserved I/O module (set by the parameter) differs  
from the real loaded I/O module or a I/O module has been  
mounted or dismounted, the corresponding bit turns on.  
F0040 to F005F  
F0060 to F006F  
F0070 to F008F  
F0090  
Storing error code  
Unused  
Stores the system error code, (See Section 2.9)  
20-ms cycle clock  
100-ms cycle clock  
200-ms cycle clock  
1-sec cycle clock  
2-sec cycle clock  
10-sec cycle clock  
20-sec cycle clock  
60-sec cycle clock  
Unused  
Turning On/Off is repeated with a constant cycle.  
On Off  
F0091  
F0092  
F0093  
F0094  
F0095  
F0096  
F0097  
F0098 to F009F  
F0100  
User clock 0  
User clock 1  
User clock 2  
User clock 3  
User clock 4  
User clock 5  
User clock 6  
User clock 7  
Unused  
Turning On/Off is repeated as many times as the scan specified  
by Duty instruction.  
F0101  
DUTY F010x N1 N2  
F0102  
F0103  
N2 scan Off  
F0104  
F0105  
N1 scan Off  
F0106  
F0107  
F0108 to F010F  
F0110  
Operation error flag  
Zero flag  
Turns on when an operation error has occurred.  
Turns on when the operation result is 0.  
F0111  
F0112  
Carry flag  
Turns on when a carry occurs due to the operation.  
Turns on when an output instruction is executed.  
Turns on when an operation error has occurred.(Latch)  
Turns on when overflow has occurred.  
F0113  
All outputs off  
Operation error flag (Latch)  
Overflow error flag  
Unused  
F0115  
F0116  
F0117 to F011F  
F0120  
LT flag  
Turns on if S1 < S2 when using the CMP instruction.  
Turns on if S1 S2 when using the CMP instruction.  
Turns on if S1 = S2 when using the CMP instruction.  
Turns on if S1 > S2 when using the CMP instruction.  
Turns on if S1 S2 when using the CMP instruction.  
Turns on if S1 S2 when using the CMP instruction.  
F0121  
LTE flag  
F0122  
EQU flag  
F0123  
GT flag  
F0124  
GTE flag  
F0125  
NEQ flag  
F0126 to F013F  
F0140 to F014F  
Unused  
FALS No.  
The error code generated by FALS instruction is stored to this  
flag.  
F0150 to F016F  
F0170 to F173  
F0180 to F183  
Unused  
HSC output bit  
Carry flag for HSC  
Turn on when the current value of HSC reaches setting value  
Turn on when carry is occurred on the HSC current value  
App2-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 2 Flag List  
(Continued)  
Relay  
Function  
Borrow flag for HSC  
Unit ID  
Description  
F190 to F193  
F200 to F20F  
Turn on when borrow is occurred on the HSC current value  
F0210 to F021F  
F0220 to F022F  
F0230 to F023F  
F0240 to F024F  
F0250 to F027F  
F0280 to F045F  
F0500 to F050F  
F0510 to F051F  
F0520 to F052F  
F0530 to F053F  
F0540 to F054F  
F0550 to F055F  
F0560 to F056F  
F0570 to F058F  
F0590 to F059F  
F0600 to F063F  
HSC error code  
HSC error code  
HSC error code  
HSC error code  
Unused  
Stores error of HSC Ch0  
Stores error of HSC Ch1  
Stores error of HSC Ch2  
Stores error of HSC Ch3  
Positioning flags  
Maximum scan time  
Minimum scan time  
Present scan time  
Clock data (year/month)  
Clock data (day/hour)  
Clock data (minute/second)  
Clock data (day of the week)  
Unused  
Refer to 7.3.5 Flag list and error code  
Stores the maximum scan time.  
Stores the minimum scan time.  
Stores the present scan time.  
Clock data (year/month)  
Clock data (day/hour)  
Clock data (minute/second)  
Clock data (day of the week)  
Storing error step  
Unused  
Stores the error step of the program.  
2) Internal relay (M)  
Relay  
M1904  
M1910  
Function  
Write Time  
Description  
Write time to RTC when this bit turns on  
Enables forced I/O  
Forced I/O enable  
App2-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 2 Flag List  
3) Data relay (D)  
When communication function is used, its status are stored in D register, and they can be monitored. And If correspond  
communication function is unused, these flags can be used as general data register.  
(1) When FNET module is connected  
Relay  
Keyword  
Function  
Description  
Indicates the number which is set on communications module station  
switch.  
D4500 _C0STNOL  
D4502 _C0STNOH  
Communications module  
station No.  
Fnet : Station switch No. marked on the front of communications module.  
Increments by one whenever sending error of communications frame  
occurs.  
Communications frame  
sending error  
D4504 _C0TXECNT  
D4505 _C0RXECNT  
D4506 _C0SVCFCNT  
Connection condition of network is evaluated by this value.  
Increments by one whenever receiving error of communications frame  
occurs.  
Communications frame  
receiving error  
Connection condition of network is evaluated by this value.  
Increments by one whenever communications service fails. Connection  
condition of network and overall communication quantity and program  
stability can be evaluated by this value.  
Communications service  
processing error  
Maximum communications Indicates the maximum time that is spent until every station connected to  
D4507 _C0SCANMX  
D4508 _C0SCANAV  
D4509 _C0SCANMN  
scan time (unit : 1 ms)  
Average communications  
scan time (unit : 1 ms)  
Minimum communications  
scan time (unit : 1 ms)  
Communications module  
system information  
network has the token at least one time and sends a sending frame.  
Indicates the average time that is spent until every station connected to  
network has the token at least one time and sends a sending frame.  
Indicates the minimum time that is spent until every station connected to  
network has the token at least one time and sends a sending frame.  
D4510 _C0LINF  
Indicates operation state of communications module with a word.  
Indicates communications module hardware or system O/S error.  
Indicates that service cannot be offered due to insufficient common RAM.  
Indicates that interface with communications modules has been stopped.  
D4510.B _C0CRDER  
D4510.C _C0SVBSY  
D4510.D _C0IFERR  
D4510.E _C0INRING  
System error (error = 1)  
Insufficient common RAM  
(Insufficient = 1)  
Interface error (error = 1)  
Indicates that the communications module can communicates with other  
station or not.  
In-ring (IN_RING = 1)  
Indicates that operation mode of communications module is in the normal  
operation mode or test mode.  
D4510.F _C0LNKMOD  
Operation mode (RUN=1)  
App2-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 2 Flag List  
(2) When communication mode is dedicated master mode (Channel 0)  
Relay  
D4400  
Function  
Relay  
Function  
Communication Error Code of station 0 and1  
D4432  
D4433  
D4434  
D4435  
D4436  
D4437  
D4438  
D4439  
D4440  
D4441  
D4442  
D4443  
D4444  
D4445  
D4446  
D4447  
Mode and Error of Slave station 0 and 1  
Mode and Error of Slave station 2 and 3  
Mode and Error of Slave station 4 and 5  
Mode and Error of Slave station 6 and 7  
Mode and Error of Slave station 8 and 9  
Mode and Error of Slave station 10 and 11  
Mode and Error of Slave station 12 and 13  
Mode and Error of Slave station 14 and 15  
Mode and Error of Slave station 16 and 17  
Mode and Error of Slave station 18 and 19  
Mode and Error of Slave station 20 and 21  
Mode and Error of Slave station 22 and 23  
Mode and Error of Slave station 24 and 25  
Mode and Error of Slave station 26 and 27  
Mode and Error of Slave station 28 and 29  
Mode and Error of Slave station 30 and 31  
D4401  
D4401  
D4403  
D4404  
D4405  
D4406  
D4407  
D4408  
D4409  
D4410  
D4411  
D4412  
D4413  
D4414  
Communication Error Code of station 2 and 3  
Communication Error Code of station 4 and 5  
Communication Error Code of station 6 and 7  
Communication Error Code of station 8 and 9  
Communication Error Code of station 10 and 11  
Communication Error Code of station 12 and 13  
Communication Error Code of station 14 and 15  
Communication Error Code of station 16 and 17  
Communication Error Code of station 18 and 19  
Communication Error Code of station 20 and 21  
Communication Error Code of station 22 and 23  
Communication Error Code of station 24 and 25  
Communication Error Code of station 26 and 27  
Communication Error Code of station 28 and 29  
Communication Error Code of station 30 and 31  
Error count of station 0 and 1  
D4415  
D4416  
D4417  
D4418  
D4419  
D4420  
D4421  
D4422  
D4423  
D4424  
D4425  
D4426  
D4427  
D4428  
D4429  
Error count of station 2 and 3  
Error count of station 4 and 5  
Error count of station 6 and 7  
Error count of station 8 and 9  
Error count of station 10 and 11  
Error count of station 12 and 13  
Error count of station 14 and 15  
Error count of station 16 and 17  
Error count of station 18 and 19  
Error count of station 20 and 21  
Error count of station 22 and 23  
Error count of station 24 and 25  
Error count of station 26 and 27  
D4430  
D4431  
Error count of station 28 and 29  
Error count of station 30 and 31  
App2-5  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 2 Flag List  
(3) When communication mode is dedicated master mode (Channel 1)  
Relay  
D4300  
Function  
Relay  
Function  
Communication Error Code of station 0 and1  
D4332  
D4333  
D4334  
D4335  
D4336  
D4337  
D4338  
D4339  
D4340  
D4341  
D4342  
D4343  
D4344  
D4345  
D4346  
D4347  
Mode and Error of Slave station 0 and 1  
Mode and Error of Slave station 2 and 3  
Mode and Error of Slave station 4 and 5  
Mode and Error of Slave station 6 and 7  
Mode and Error of Slave station 8 and 9  
Mode and Error of Slave station 10 and 11  
Mode and Error of Slave station 12 and 13  
Mode and Error of Slave station 14 and 15  
Mode and Error of Slave station 16 and 17  
Mode and Error of Slave station 18 and 19  
Mode and Error of Slave station 20 and 21  
Mode and Error of Slave station 22 and 23  
Mode and Error of Slave station 24 and 25  
Mode and Error of Slave station 26 and 27  
Mode and Error of Slave station 28 and 29  
Mode and Error of Slave station 30 and 31  
D4301  
D4301  
D4303  
D4304  
D4305  
D4306  
D4307  
D4308  
D4309  
D4310  
D4311  
D4312  
D4313  
D4314  
Communication Error Code of station 2 and 3  
Communication Error Code of station 4 and 5  
Communication Error Code of station 6 and 7  
Communication Error Code of station 8 and 9  
Communication Error Code of station 10 and 11  
Communication Error Code of station 12 and 13  
Communication Error Code of station 14 and 15  
Communication Error Code of station 16 and 17  
Communication Error Code of station 18 and 19  
Communication Error Code of station 20 and 21  
Communication Error Code of station 22 and 23  
Communication Error Code of station 24 and 25  
Communication Error Code of station 26 and 27  
Communication Error Code of station 28 and 29  
Communication Error Code of station 30 and 31  
Error count of station 0 and 1  
D4315  
D4316  
D4317  
D4318  
D4319  
D4320  
D4321  
D4322  
D4323  
D4324  
D4325  
D4326  
D4327  
D4328  
D4329  
Error count of station 2 and 3  
Error count of station 4 and 5  
Error count of station 6 and 7  
Error count of station 8 and 9  
Error count of station 10 and 11  
Error count of station 12 and 13  
Error count of station 14 and 15  
Error count of station 16 and 17  
Error count of station 18 and 19  
Error count of station 20 and 21  
Error count of station 22 and 23  
Error count of station 24 and 25  
Error count of station 26 and 27  
D4330  
D4331  
Error count of station 28 and 29  
Error count of station 30 and 31  
App2-6  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 2 Flag List  
(4) D register for Forced I/O setting  
I/O  
Forced I/O designation register  
Forced I/O data register  
P000  
P001  
P002  
P003  
P004  
P005  
P006  
P007  
P008  
P009  
P010  
P011  
P012  
P013  
P014  
P015  
P016  
P017  
P018  
P019  
P020  
P021  
P022  
P023  
P024  
P025  
P026  
P027  
P028  
P029  
P030  
D4700  
D4701  
D4702  
D4703  
D4704  
D4705  
D4706  
D4707  
D4708  
D4709  
D4710  
D4711  
D4712  
D4713  
D4714  
D4715  
D4716  
D4717  
D4718  
D4719  
D4720  
D4721  
D4722  
D4723  
D4724  
D4725  
D4726  
D4727  
D4728  
D4729  
D4730  
D4800  
D4801  
D4802  
D4803  
D4804  
D4805  
D4806  
D4807  
D4808  
D4809  
D4810  
D4811  
D4812  
D4813  
D4814  
D4815  
D4816  
D4817  
D4818  
D4819  
D4820  
D4821  
D4822  
D4823  
D4824  
D4825  
D4826  
D4827  
D4828  
D4829  
D4830  
P031  
P032  
D4731  
D4732  
D4831  
D4832  
P063  
D4763  
D4863  
App2-7  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 2 Flag List  
(5) System error history(when RTC module is attached)  
Relay  
D4900  
D4901  
D4902  
D4903  
D4904  
Description  
Error pointer  
Year, Month  
Day, Time  
Minute, Second  
Error code  
(6) Clock data  
Relay  
D4990  
D4991  
D4992  
D4993  
Description  
Year, Month  
Day, Time  
Minute, Second  
Day of week, Century  
App2-8  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 3 External Dimensions  
Appendix 3 External Dimensions (unit: mm)  
1) Main unit  
Model  
A
B
K7M-DR10/14UE  
K7M-DR20/30UE  
K7M-DR(T)20/30U  
K7M-DR(T)40U  
K7M-DR(T)60U  
85  
95  
135  
145  
105 115  
95  
165  
215  
175  
225  
A
B
73  
2) Extension module  
(1) Standard type  
95  
105 115  
5
95  
73  
App3-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix 3 External Dimensions  
(2) Slim type(G7E-DC08A,G7E-RY08A,G7F-ADHB,G7F-DA2V,G7F-RD2A)  
App3-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  

La Crosse Technology Clock WT 8008U User Manual
LG Electronics Washer WP 570N User Manual
Lightolier Work Light TU Series User Manual
Lincoln Electric Welder 250 GXT User Manual
Lincoln Electric Welding Consumables CAN F15 User Manual
Linksys Network Router WRT54GX2 User Manual
Magnavox TV Converter Box TB100MG9 User Manual
M Audio Music Mixer NRV10 User Manual
Maytag Refrigerator M1BXXGMYB User Manual
MidiLand Portable Speaker MLI 452 User Manual