LG MASTER-K 120S Series User manual

User’s Manual
LG Pro
g
rammable Lo
g
ic Controlle
r
MASTER-K 120S series
LG Industrial S
y
stems
- 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

SAFETY INSTRUCTIONS
To Prevent injury and property damage, follow these instructions.
Incorrect operation due to ignoring instructions will cause harm or
damage, the seriousness of which is indicated by the following symbols.
■The meaning of each symbol in this manual and on your equipment is
as follows
.
WARNING
CAUTION
This s
y
mbol indicates the possibilit
y
of
death or serious injury
This s
y
mbol indicates the possibilit
y
of
injury or damage to property.
This is the safet
y
alert s
y
mbol.
Read and follow instructions carefull
y
to avoid dan
g
erous
situation.
This s
y
mbol alerts the user to the presence of “dan
g
erous
voltage” inside the product that mi
g
ht cause harm or electric
shock.

SAFETY INSTRUCTIONS
Design Precautions
Install a safety circuit external to the PLC that keeps the entire system
safe even when there are problems with the external power supply o
r
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 uppe
r
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.
Warnin
g

SAFETY INSTRUCTIONS
Design Precautions
Installation Precautions
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.
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.
Caution
Caution

SAFETY INSTRUCTIONS
Wiring Precautions
Completely turn off the external power supply when installing o
r
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.
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, o
r
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.
Warnin
g
Caution

SAFETY INSTRUCTIONS
Startup and Maintenance Precautions
Disposal Precaution
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 solde
r
the battery.
Mishandling of battery can cause overheating or cracks which could result in
injury and fires.
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 o
r
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.
When disposing of this product, treat it as industrial waste.
Not doing so could cause poisonous pollution or explosion.
Warnin
g
Caution
Caution

Revision History
Date Code Revision history
2002.7. 10310000380 First edition is published
2003.5. 10310000380 Arevised edition is published
– Main unit and expansion modules are added
– Built-in function are upgraded
2003.9 10310000380 Arevised edition is published.
- Main units are added
- Built-in functions are upgraded.

◎ 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.1A/D·D/ACombination Module········································································4 - 10
4.3.2 D/AConversion Module··················································································4 - 11
4.3.3A/D Conversion Module··················································································4 - 11
4.3.4Analog Timer Module·····················································································4 - 12
4.3.5 RTD Input Module·························································································4 - 12

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/OAddressAllocation··················· 5 - 29
5.9 Built-in Cnet Selection switch ···························································5 - 30
5.9.1 Structure·····································································································5 - 30

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/DTType 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.1A/D·D/ACombination Module········································································7 - 40
7.2.2A/D Conversion Module··················································································7 - 49
7.2.3 D/AConversion Module··················································································7 - 55
7.2.4Analogue 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

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-K120S’s ································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

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 doesn’t operate normally ········11 - 5
11.2.5 Troubleshooting flowchart used when a program can’t 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

Chapter 1 General
1-1
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 General Specification Describes general specifications of units used in the MASTER-K120S series.
Chapter 4 Names of Parts Describes each kind of manufacturing goods, titles, and main functions
Chapter 5 Power Supply / CPU
Chapter 6 Input and Output
Chapter 7 Usage of Various
Functions
Describes each kind of manufactured goods' usage
Chapter 8 Communication Function Describes built-in communication functions
Chapter 9 Installation and Wiring Describes installation, wiring and handling instructions for reliability of the PLC system
Chapter 10 Maintenance Describes the check items and method for long-term normal operation of the PLC
system.
Chapter 11 Troubleshooting Describes various operation errors and corrective actions.
Appendix 1 System Definitions Describes parameter setting for basic I/O and communications module
Appendix 2 Flag List Describes the types and contents of various flags.
Appendix 3 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.

Chapter 1 General
1-2
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 user’s 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.
yexecuted by one command.
yexecuted by break-point settings.
yexecuted by the condition of the device
yexecuted 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.

Chapter 1 General
1-3
1.3 Terminology
The following table gives definition of terms used in this manual.
Terms Definition Remarks
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.
Example)
CPU module
Power Supply module
I/O module
Unit A single module or group of modules that perform an independent
Operation as a part of PLC system. Example)
Main unit
PLC system A system which consists of the PLC and peripheral devices. A user program
can control the system.
KGLWIN A program and debugging tool for the MASTER-K series. It executes
program creation, edit, compile and debugging(A computer software).
KLD-150S A hand-held loader used for program creation, edit, compile and debugging
for MASTER-K series.
I/O Image Area Internal memory area of the CPU module which used to hold I/O statuses.
Watch Dog Timer Supervisors the pre-set execution times of programs and warns if a
program is not completed within the pre-set time.
FAM Abbreviation of the word ‘Factory Automation Monitoring S/W’. It is used to
call S/W packages for process supervision.
Fnet Fieldbus network
Cnet Computer network(RS-232C, RS-422/485)
RTC Abbreviation of ‘Real Time Clock’. It is used to call general IC that
contains clock function.

Chapter 1 General
1-4
Terms Definition Remarks
Sink Input
Current flows from the switch to the PLC input terminal if a input signal turns on.
Source
Input
Current flows from the PLC input terminal to the switch after a input signal turns
on.
Sink Output
Current flows from the load to the output terminal and the PLC output turn on.
Source
Output
Current flows from the output terminal to the load and the PLC output turn on.
Output
Contact
Output Contact

Chapter 2 System Configuration
2-1
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
Total I/O points •10-120 points
Standard Economic
Digital I/O module •3 modules •2 modules
A/D-D/A module •3 modules •2 modules
Analog timer •3 modules •2 modules
Maximum number
of expansion
modules
Cnet I/F module •1 module •1 modules
Economic •K7M-DR10/14/20/30UE
Main unit Standard •K7M-DR//DRT/DT20/30/40/60U
Digital I/O module
•
G7E-DR10A, G7E-DR20A, G7E-TR10A, G7E-DC08A, G7E-RY08A
Analog I/O module •G7F-ADHA, G7F-ADHB, G7F-AD2A, G7F-DA2I, G7F-DA2V
Analog timer •G7F-AT2A
Expansion
module
Resistance Temperature Detactor •G7F-RD2A
Cnet I/F modules •G7L-CUEB, G7L-CUEC
DeviceNet I/F module •G7L-DBEA
FieldBus I/F module •G7L-FUEA
Communic
ation I/F
module Profibus I/F Module •G7L-PBEA
RTC •G7E-RTCA
Items
Option
module Memory •G7M-M256B
Main unit expansion
module
expansion
cable

Chapter 2 System Configuration
2-2
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
(2) 1:1 ratio of an external device (monitoring unit) to main unit using a built-in RS-485 port
RS-485
MASTER-K120S
RS-232C
RS-485
MASTER-K120S MASTER-K120S
RS-232C
Monitoring Device
Monitoring Device

Chapter 2 System Configuration
2-3
(3) RS-232C Communication over a long distance via modem by Cnet I/F modules
2) 1:n Communications system
This method can connect between one computer and multiple main units for up to 32 stations
Modem
Modem
Modem Modem
G7L-CUEB G7L-CUEB
G7L-CUEB
MASTER-K120S MASTER-K120S
MASTER-K120S
RS-232C ⇔RS-422 Converter
Can be connected Max. 32 stations
G7L-CUEC
G7L-CUEC
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.
MASTER-K120S
MASTER-K120S

Chapter 2 System Configuration
2-4
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
Power supply Input signal Input signal
Built-in RS-232C I/F Output signal Output signal
Sub-system Description
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 •Provides for conversion and isolation of the PLC system power from the main supply
Communication
Interface
•Provides the data exchange with other systems or PADT, such as KGLWIN, personal
computers
Built-in
RS-485
Special/communication
modules
Power
supply
Comm. I/F
Input
Output
Input
Output
CPU
•
DC24V
Power
supply
Table of contents
Other LG Controllers manuals

LG
LG PBACNBTR1A User manual

LG
LG PC Central Controller User manual

LG
LG PACP4B000 Instruction Manual

LG
LG GLOFA-GM Series User manual

LG
LG Becon PREMTA000 Product guide

LG
LG MultiSITE CRC2 Series User manual

LG
LG MASTER-K Series User manual

LG
LG PC Central Controller User manual

LG
LG MASTER-K200S User manual

LG
LG LKD1000 User manual