You are on page 1of 288

Quality assurance

offers the quality assurance for this product.

Considerations for quality assurance


Assurance contents
We guarantee 1 year after service from the date of purchasing this product. If this
product has any troubles or errors within such a period, you can receive free service from
ED customer support center.

Expenses covered by customers


The necessary services shall be offered at a minimum cost of customers in the
following cases.
1) If the warranty period expires.
However, it shall be valid for 5 years after the warranty period expires.
2) If the product has any troubles due to customers' negligence or Act of God.
They shall be handled at a charge of customers even during the warranty period.

Not guaranteed
Any deliberate disassembly of this product for improving the performance cannot be
covered by the manufacturer's warranty responsibility.

Service guide
Please, contact our customer support center for service application and consultation.
Customer support center: +82-31-730-7525 FAX : +82-31-730-7313

For the safe and correct use of this product, please make sure to read the user's
manual carefully before using it and follow the guidelines on how to handle and use this
product.

Notice for equipment changes


This product is subject to change without prior notice to improve its appearance,
specifications and performance.
Caution
1. Keep the Manuals
This manual provides basic information on ED-4260 System, the PLC experiment
training device, along with directions for use. Before proceeding, it should be
mentioned that the main unit of PLC under discussion is "GLOFA-GM4"manufactured
by LS Industrial Systems(http://eng.lsis.biz). Therefore, one should refer to the manual
provided with the product for basic instructions on usage. This manual focuses on
how to use the peripherals and option module for PLC training, and it should also be
noted that all manuals provided with ED-4260 should be kept with care. Manuals of
other optional equipments should be kept too.

2. Manual
* Programmable Logic Controller (ED-4260 Experimental Manual)

Manuals for each option module is provided with the equipment.


(This training book provides directions for using option modules)

3. Be Acquainted
(1) The caution and the rest of the content of each manual must be read prior to
using the equipment.

(2) Read the information on functions of each module and the instructions for using
the equipment before use.

(3) Know in advance the functions and the usage of the power supply and the I/O
ports in the ED-4260 frame, as well as the basic module (3 types).
The basic modules are as follows :
* PLC Input Controller (IM-4260-2)
* PLC Output Simulator (OM-4260-3)
* Count & Position Simulator (PM-4260-4)
(4) The input of this PLC is DC 12V~24V type. Therefore, one must never give the
power over DC 24V to the PLC input port. (between input terminal and the
com(common) terminal).

(5) The maximum allowed amount current for the output contact of the PLC output
module is 2A. For more that 1A load at AC 250V, a another auxiliary relay is
required.

(6) Care should be taken not to store or use the device under conditions below:
* Humidity
* Heat
* Vibration
* Dust
* Direct sunlight
Table of Contents

The Basics of PLC (Programmable Logic Controller) 1

Chapter 1 Introduction to PLC 3


1-1. Control Elements 3
1-2. Definition of PLC 3
1-3. History of PLC 4
1-4. Standards and Characteristics of PLC 5
1-5. Selection and Application of PLC 8

Chapter 2 The Structure of PLC 10


2-1. Hardware Structure 10
2-2. Input and Output Structure of PLC 12
2-3. Software Structure 15

Chapter 3 PLC Program (GMWIN) Setup 21


3-1. PC Requirements 21
3-2. Installing GMWIN 22

Chapter 4 Programming Tool (GMWIN) 25


4-1. Launching GMWIN 25
4-2. User Interface 30
4-3. Project Structure 31
4-4. LD Edit 33
4-5. Upload 34
4-6. Menu 36
4-7. Toolbar 43
4-8. Files Created by GMWIN 47
4-9. Opening Files 48
4-10. Saving Files 50
Chapter 5 Data Representation 52
5-1. Variable Representation 52

Chapter 6 Execution 61
6-1. Scan Time 61
6-2. I/O Refresh 62
6-3. I/O Image Area 62
6-4. Operation Mode 62
6-5. Changing the Operation Mode 64
6-6. Restart Mode 66

Chapter 7 Programming Basics 69


7-1. Using the Toolbar 69
7-2. Sequence Operators 106
7-3. List of Functions 107
7-4. List of Function Blocks 118

Chapter 8 Basic Sequence Circuits 120

8-1. AND Circuit 120


8-2. OR Circuit 121
8-3. NOT Circuit 122
8-4. Self Holding Circuit 123
8-5. Interlock Circuit 124
8-6. On-Delay Circuit 126
8-7. Off-Delay Circuit 127
8-8. One Shot Circuit 128

Appendix Glossary 129

ED-4260 PLC Trainer 133

Chapter 1 Introduction of ED-4260 PLC Trainer 135


1-1. Introduction of ED-4260 135
1-2. Basic Components of ED-4260 PLC Trainer System 136
1-3. Option System 137
1-4. ED-4260 Specifications 138
Chapter 2 Usage of ED-4260 140
2-1. The Demonstration Frame 140
2-2. I/O Module and its Connection 146
2-3. Position Control Module 152

Chapter 3 Option Modules 156


3-1. A/D Converter(AD-4260-5) 156
3-2. D/A Converter(DA-4260-6) 160
3-3. Temperature Sensor Module(SU-4260-9) 164
3-4. Photo Control SCR Circuit(PC-4260-10) 168
3-5. Power & Terminal Transfer Unit(PT-4260-7) 172
3-6. Potentiometer & Meter Unit(PM-4260-8) 175

PLC Training Using the ED-4260 Trainer 177

Exercise 1 PLC I/O(ED-4260 TRAINER) Practice 179


Exercise 2 Program Practice using Subroutine Commands 191
Exercise 3 Motor's Start/Stop Circuit Practice 197
Exercise 4 Motor's Forward/Reverse Control Program Practice 203
Exercise 5 Program Practice using SET & RESET 209
Exercise 6 Positive/Negative Transition Sensing Pulse Coil Program 215
Exercise 7 3-Phase Induction Motor's Y- Start Circuit Program 220
Exercise 8 Program Practice using Counter(UP) 227
Exercise 9 Program Practice using Branch JUMP Command 234
Exercise 10 Program Practice using Return Command 239
Exercise 11 Program Practice using Transmission(MOVE) Command 243
Exercise 12 Motor's Upper/Lower Limit Linear Movement Circuit
Practice 249
Exercise 13 Stepping Motor Circuit Practice using Timer 254
Exercise 14 Applied Practice (Quiz Program Practice) 259
Exercise 15 Applied Practice (Electronic Timer Program Practice) 262
Exercise 16 Applied Practice (Lamp Shift Lighting Program Practice) 265
Exercise 17 Applied Practice (Timer External Control Program
Practice) 268
Exercise 18 Applied Practice (Timer External Control Program
Practice ) 272
Exercise 19 Applied Practice (Die Program Practice) 275
Exercise 20 Applied Practice (ONE-SHOT Circuit Practice using TP
Timer) 278
www.ed.co.kr

CH1. Introduction to PLC / 3


CH2. The Structure of PLC / 10
CH3. PLC Program (GMWIN) Setup / 21
CH4. Programming Tool (GMWIN) / 25
CH5. Data Representation / 52
CH6. Execution / 61
CH7. Programming Basics / 69
CH8. Basic Sequence Circuits / 120
Appendix Glossary / 129
The Basics of PLC

Chap. 1 Introduction to PLC

1-1. Control Elements


Input device: Composed of sensor, which converts physical signal into electric
signal, and a converter, which transfers the signal to the controller.
Output device: Converts the control signal generated by the device to operational
signals to stimulate the actuator.
Control device: Sends output signals by executing the appropriate control method
and control algorithm depending on the input condition. It is categorized into
programmable controller, which has the control algorithm stored in memory as
software to enabling easy modification, and hardware system, where once the
control algorithm is set, it cannot be modified.

Input element Control element Output element


Measurement Processing Operation
(Control Device)
(Algorithm)
(Transducer) (Controller) (Actuator)

[Figure 1-1] Elements of control system

1-2. Definition of PLC


PLC(Programmable Logic Controller) replaces functions such as relay, timer, counter
used in old controller with semi-conductor component such as IC and transistor, adding
computation abilities to the basic controlling function to make programmed control
possible. National Electrical Manufacturers Association (NEMA) defines PLC as "a digi-
tal oriented electronic device which uses programmable memory to perform special func-
tions such as logic, sequencing, timing, counting, and computation through digital or an-
alog input/output module, and which controls variety of machines and processors."

www.ed.co.kr
The Basics of PLC

1-3. History of PLC


The development of the industrial society led each manufacturing process to become
larger in scale, and more advanced and complex, requiring many different forms of con-
trol systems. A lot of time and money is needed to organically interconnect and modify
these control systems. Up to now, control systems for automation were connected to re-
lated electronic components, such as relay, controller, timer, counter, etc, depending on
the circuit layout, which led to problems such as difficulty in the wiring process and
need large amount of space for sequence control, also has a limitation of processing
speed of operation.
Recognizing these problems, in 1968, General Motors, the American automobile manu-
facturer, suggested 10 conditions for PLC, as shown in [Table 1-1], which became the
starting point of PLC development. [Table 1-2] is a brief history of PLC.

[Table 1-1] 10 conditions suggested by GM

(1) Should be easy to implement and modify program and sequence system.
(2) Maintenance and repair must be easy and must be plug-in type.
(3) Should be more reliable than relay controller.
(4) Output should be able to be connected to higher level computer.
(5) Should be smaller in size than relay controller.
(6) Should be more cost-effective than relay controller.
(7) Input should be supplied with AC115[V].
(8) Should be output AC115[V], 2[A].
(9) Should be expandable without making much modification of the entire system.
(10) Should be equipped with programmable memory, which is expandable to at least
4k words.

www.ed.co.kr
The Basics of PLC

[Table 1-2] History of PLC


Year Progress
1968 The birth of the concept of PLC
Introduction of logic control, 1k memory capacity and 128 I/O point
1970
handler
Timer, counter, arithmetic operations, 12k memory capacity, and 1024
1974
I/O point handling
1976 Introduction of remote I/O system (first standard created by the US)
1977 Introduction of microprocessor PLC
Introduction of high performance I/O module, high performance
1980 communication device. high functional software; started to use
microcomputer as programming tool
1983 Introduction of inexpensive small-size PLC
Standardization, distributed and hierarchical control made possible by
1985
networking with computer
1991 Fuzzy logic implemented by fuzzy module and fuzzy-only package

1-4. Standards and Characteristics of PLC


1) IEC Standard Language
Until now, engineers who wished to work with PLC faced difficulties because the
language and communication networks were different for many PLC makers. In order
to fix this problem and bring more convenience to the user, IEC (International
Electrotechnical Commission) drew up an international standard specification (IEC
1131) which, as shown in [Table 1-3], is composed of 5 parts.

[Table 1-3] IEC 1131


Part Description
Part 1 Basic features of PLC and definition of terms
Part 2 Required functions and testing conditions of the facility
Part 3 Programming language
Part 4 Notice to users
Part 5 Communication and network

www.ed.co.kr
The Basics of PLC

Some important features introduced by IEC are as follows:


Support for many data types
Components such as function, function block, program, etc, which made both top
-down and bottom-up design and structured implementation possible
User programs can be made into libraries to be used in other environment
Support for multiple languages, from which user can choose the most optimal
language for use.
The standard PLC language suggested by IEC consists of two graphic languages,
two text-based languages, and SFC.

(1) Graphic Language


LD (Ladder Diagram) : Originates from ladder in the U.S. Input and output are
combined to form a program, which is a type of relay logic representation.
FBD (Function Block Diagram) : Program represented by connecting the block
functions.

(2) Text-Based Language


IL (Instruction List) : Used in Europe. Command type language similar to assembly
language.
ST (Structured Text) : A high-level language developed to be used for real-time ap
plications and is based on Pascal and C.
SFC (Sequential Function Chart) : Sequentially describes the flow and conditions of
manufacturing process, where time, event, etc are defined as control sequence
blocks.

www.ed.co.kr
The Basics of PLC

2) Characteristics of PLC
[Table 1-4] lists the characteristics of PLC and other control devices, showing the
strength and weakness of each.

[Table 1-4] Comparison of Controllers

Category Relay Controller Digital Logic Computer PLC


Very
Price Inexpensive Expensive Inexpensive
inexpensive
Size Large Very small Moderate Very small
Speed Slow Very fast Very fast Fast
Noise Good Fair Excellent Fair
Much time for Very much
Much time for
Control design and time for Simple
designing
integration programming
Complex
None Supported Supported Supported
Functions
Usage
Very difficult Difficult Very simple Very simple
Modification
Maintenance Very difficult Difficult Very simple Very simple

Characteristics of PLC
- Wide variety of functions
- High functionality of program (easy to design control circuit)
- Easy to control
- Easy to maintain
- Reliable
- Easy to install

www.ed.co.kr
The Basics of PLC

1-5. Selection and Application of PLC


1) Selecting PLC
In order to select PLC, it is necessary to have a thorough understanding of the sub-
ject of control, especially about the features, price, scalability, maintenance, whether the
model will continue to exist in the market, and the user.

(1) Figuring the "Input Points"


Combine the number of signal inputs, such as push button switch, limit switch, etc,
with the number of sensors, such as proximity sensor, photo sensor, reed switch, to de-
rive the input points and select a reasonable capacity. In addition, select input module
with the appropriate specifications (AC or DC and voltage), taking into consideration the
voltage requirements of the sensors, etc.

(2) Figuring the "Output Points"


Sum up the number of power indicators, operation indicators, overload indicators,
bells, etc. to derive the output points. Combine modules in point units of 8, 16, 32, etc,
to derive the module count. In addition, since there are relay contact type, TR output
type, SSR output type, etc, the voltage specification must be taken into account.

Relay contact output type, which is not restricted by the output voltage, is
generally used.

(3) CPU and Support for Special Modules


Generally, support for analog I/O and special cards (HSC, POP, PID, etc), in addition
to digital I/O, should be taken into consideration, along with the characteristics of the
CPU.

www.ed.co.kr
The Basics of PLC

2) Application of PLC
The applied area of PLC is expanding as facilities are challenged to be automated
more efficient. Specifically, the demand for PLC due to factory automation and FMS has
added to the old role of PLC of replacing the relay controller, the role in small manu-
facturing machines to large scale system facilities, as the current trend is for large scale
and high functionality. [Table 1-5] shows applications of PLC, organized by the subject
of control.

[Table 1-5] Application of PLC

Field Subject of Control

Food Conveyer master control, automated production line control

Cargo control, raw material transport control, rolling machine


Steel Production
control
Fiber &
Cargo control, conveyer control, dyeing machine control
Chemical
Automobile
Transfer line control, automated assembly control
Manufacturing
Industrial robot control, manufacturing machine control, water
Machine Industry
pump control
Water & Sewage Filtration plant control, sewage disposal plant control, water
Services pump control
Automated warehouse control, cargo facility control, return line
Logistics
control
Factory
Compressor control, etc
Equipment
Pollution
Automated incinerator control, pollution prevention control
Reduction

www.ed.co.kr
The Basics of PLC

Chapter 2 The Structure of PLC

2-1. Hardware Structure


PLC is composed of the CPU, which is composed of microprocessor and memory,
and is analogous to the human brain, the input and output part which takes connection
with external peripheral devices, the power supply, and peripheral device which writes
the program to the PLC memory. [Figure 2-1] shows the PLC structure as a whole.

Input Device Loader Output Device






Memory O
Limit Switch I Magnetic Contactor
u
n
t
p
Proximity Sensor p Solenoid
u u
t
t
Photo Sensor Microprocessor Pilot Lamp

[Figure 2-1] The Overall Structure of PLC

1) CPU of PLC
Correspond to the role of the PLC brain, which fetches programs stored in memory
one by one and decodes and executes each one. This process is repeated very rapidly
and all data is processed in binary form.

www.ed.co.kr
The Basics of PLC

2) The Memory of PLC CPU


(1) Types of memory
There are two types of IC memory, namely ROM and RAM. ROM is read only
memory, as it stands for, whose content cannot be modified, and, therefore, used to
store fixed data. This type of memory is said to be involatile, for it retains its content
even when the power is cut off. On the other hand, it is possible to read data from and
write data to RAM at any time. RAM is used to temporarily store data, but any data it
contains will be lost if the power is cut off, making it a volatile type of memory, al-
though it is possible to save a part of the RAM by using a small amount of battery
power, to utilize it as involatile section of memory.

(2) Memory content


The memory of PLC is divided into user program memory, data memory, and system
memory. User program memory contains the program created by the user to suit the
specification of the subject for control. Since user program must be able to be stored in
the course of the development and need for modifications may arise later, user programs
are stored in RAM. When the development of the program has been completed and the
program becomes fixed, it can be stored in ROM for ROM operation. Data memory
stores data such as contact status of input and output relay, auxiliary relay, and the set-
ting & current value of the timer and counter, etc. which is subject to change dynam-
ically, so it is stored in RAM.
System memory is used to store system program provided by the PLC manufacturer.
Since this kind of system program is a critical factor to determine the functionality and
performance of the PLC, it is written to ROM by the PLC manufacturer.

www.ed.co.kr
The Basics of PLC

2-2. Input and Output Structure of PLC

The input and output part of PLC is connects directly to the peripherals(input/output
elements) at site. Although the internal circuit of PLC uses DC +5(V) power (TTL lev-
el), the input and output part operates on a different voltage(DC 24V, AC 220V etc.),
therefore we must consider the interface between the inside and the outside of the PLC
is a critical factor for ensuring system stability. Following is the requirements for the in-
put and output part:

It must match with the external device in its electronic specifications.


Noise from the external device must not reach or affect the CPU.
(use photocoupler)
Connection to external device must be easy.
It must be possible to monitor the status of each contact of input and output
(add LED)

[Table 2-2] shows the external device connected to the input and output part.

[Table 2-2] Input and Output Devices

I/O Category Installation Point External Device

Push-Button Switch
Selector Switch
Control Part and
Contact Type Toggle Switch
Operation Part
Level Switch(contact type)
Input Limit Switch
Reed Switch
Contactless Photo Sensor
Mechanical Device
Type Level Sensor
Proximity Switch
Control Part and Pilot Lamp
Indicator
Operation Part Bell(Buzzer)
Electromagnetic Valve(solenoid)
Output Electromagnetic Clutch
Actuator Mechanical Device Electromagnetic Brake
Electromagnetic Switch
(magnetic contact)

www.ed.co.kr
The Basics of PLC

1) Input Part
Transfers signal from external devices to the arithmetic logic unit of the CPU.
There are DC 24[V], AC 110/220[V] inputs, as well as other inputs module such as
analog input (A/D) module, high speed counter module, etc. [Figure 2-3] represent an
example of the input part circuit.

Device Device

[Figure 2-3] Input part circuit

2) Output Part
Transfers results of internal computation to external devices such as magnetic contactor
or solenoid to drive them. Types of output includes relay output, transistor output, and
SSR (Solid State Relay), and for other output modules, there are analog output (D/A)
module and position control module(POP). [Figure 2-4] shows an example of transistor
output module.

www.ed.co.kr
The Basics of PLC

+24V

Diode
Indication LED
Internal Device External Device

Load

Photo Coupler
[Figure 2-4] Transistor Output Module

[Table 2-3] PLC Types of Output Module


Switch Component
Supply Voltage Less type contact
Type contact
(Semiconductor)
Direct Current (DC) Relay Transistor
Alternating Current (AC) Relay SSR

As shown in [Table 2-3], relay output can be used for both DC and AC, but consid-
ering the limit in the durability of mechanical components, it is recommended to use a
contactless element as below SSR output in AC or the transistor output in DC.

Special modules
Position control module
Process rapid contact output at the designated frequency range and voltage level.
PID control module
Computes raw data received from analog input modules to reach the desired
value, using optimal conditions, and outputs the result to analog output module.
Desired value control
Control the desired value by repeatedly increasing, decreasing and sustaining the
current value within predetermined amount of time.
Etc.
Communication module, network module and specific control module.

www.ed.co.kr
The Basics of PLC

2-3. Software Structure


1) Introduction to Programming
There is no fundamental difference between PLC control sequence and using relay,
timer as done in the past. In order to understand and make the sequence program, the
user must have knowledge in following 3 areas.
Characteristics of the subject of control, that is electric condition of the goal of
controlling, operation method, behavior, etc.
Characteristics of the controlling device, such as relay and PLC, etc.
Must be aware of the rules PLC imposes for designing sequence, namely the rules
concerning the symbols for diagram, device number, status, etc.

There is no difference between using a PLC and relay/timer, regarding the above two
issues. Therefore, in order to understand PLC control sequence, it is important that one
have knowledge about the characteristics of PLC and how to use it. For example, there
are hardware specifications such as nominal voltage and the number of contacts, and
software aspects such as logic operation, timer, and counter. This kind of information
can generally be found in the specification section of the catalog. In short, selecting the
correct feature out of the many features PLC provides is the key to good design.

2) Hard-wired and Soft-wired


Previous methods of relay control relied on laying out the flow of tasks on the circuit
diagram and adding necessary controlling device, occasionally requiring lead wiring. This
method is called hardwired logic.
In hardwired logic, the hardware and the software is coupled as one, so any need for
change required modifying both the hardware and the software. Consequently, much ef-
fort has been put to separating the hardware and the software, which lead to the in-
troduction of the computer model. Computer cannot operate solely with hardware. It can
do any work only if a set of instructions, i.e. a program, is loaded in its memory. The
process of loading the program in the memory is called programming, which can be
thought of as the equivalent of the wiring task. This method is called soft-wired logic,
and PLC uses this method.

www.ed.co.kr
The Basics of PLC

3) The difference between relay sequence and PLC program


As PLC is a collection of electronic components such as LSI, it contains no contact
such as relay sequence, or coil, and any operation requiring these components are han-
dled in a software manner, activity of which is not visible. In addition, unlike relay se-
quence which is activated if the contact closes due to the induction in the coil, PLC has
the program stored in memory and scans the content sequentially, and operates
accordingly. This way, the user can modify the program in any way, to fit the control
logic.

(1) Serial Processing and Parallel Processing


The most fundamental difference between PLC control and relay sequence is serial
processing and parallel processing, as shown in [Figure 2-5]. PLC takes the form of se-
rial processing, where the program stored in the memory is sequentially computed, in re-
lay sequence, many circuits operate simultaneously, which is called parallel processing.
Therefore, PLC is doing only one thing at any moment.

(a) Serial Processing (a)

(b) Parallel Processing (b)

[Figure 2-5] Computation Method [Figure 2-6] Sequence Diagram

www.ed.co.kr
The Basics of PLC

First of all, the operational difference between PLC and relay will be discussed, refer-
ring to the sequence diagram in [Figure 2-6(a)].
In relay sequence, if power is supplied and contacts A and B, and D and E
closes at the same time, output C and F is activated and whichever was quicker to
react is activated first. In contrast, C will be activated prior to F according to the
execution order in PLC.
To further looking at the difference between PLC and relay, refer to Figure 2-6(b),
where supply of power closes the contact J, which activates H and blocks activation
of I in Relay sequence. In PLC, however, closure of G causes I to become active
and closure of J causes H to become active on the first execution. In the second
execution, the output of I is cleared by H, which has been activated during the first
execution.

(2) Restriction on the number of contacts used


Generally, relay has a limit in the number of contacts per relay. Consequently, one
must be economical in the use of contacts when designing a relay sequence. In contrast,
PLC does not impose any limit in the number of contact to use, because it stores the
information of each contact (ON/OFF state) in the memory and refers to the data on ex-
ecution of the program.

(3) Restriction on the location of contact and coil


PLC introduces restrictions, or rules, which does not exist in relay sequence, one of
which is prohibiting of putting any contacts after the coil, this restriction means that the
output coil must be aligned at the right side. In addition, PLC is configured to always
carry its signal from left to right, prohibiting signal flow in any other direction, which
is possible in relay sequence.
[Figure 2-7] shows the rules imposed by PLC.

www.ed.co.kr
The Basics of PLC

[Figure 2-7] Rules in PLC Sequence

(4) Cautions for configuring PLC


In case of relay circuits, the effect of malfunction of a part is restricted and other
parts continue to work, but in PLC, failure of a part affects the whole system. In this
light, it is not always wise to depend solely on PLC for controlling the whole system,
and vital circuits, such as circuits for voltage control should be configured out of the
PLC. Also, it may be dangerous if the output unit becomes ON at the moment PLC is
powered up, so measures should be taken as shown below:

www.ed.co.kr
The Basics of PLC

PLC Power Supply 1. The input unit, lamp output


ON Input Unit
unit must be connected in front
of the emergency stop circuit, in
OFF
order to monitor the stop status
of operation.
2. The output unit retains its
Output Unit ON/OFF state right before
stopping. In this case, the lamp
stays on if keeping relay which
retains data during power failure
is used. We can also make the
Emergency Operation PLC Stop Output lamp stays on with general rely
Stop Ready
THR
using self-holding circuit.
MC

3. Stop Output

4. Interlock Circuit: In case


Interlock
of opposing set of operations
Output Unit
THR such as cw and ccw rotation
MC1 and the mishandle can cause
THR damage to both machinery
MC2
and men need a interlock.
circuit for safety

www.ed.co.kr
The Basics of PLC

(5) Sequence of PLC Programming

Start

Decide Memory capacity and


System Design
the # of input and output units .

Operation Flow

I/O Allocation

Independent Module Test Ladder Design

I/O Device and PLC Wiring Programming

Modify Program & Reiwiring

NG
Review
Test

OK
Store in floppy disk, PROM,Type
HDD.flash Memory Store Program

Operation

www.ed.co.kr
The Basics of PLC

Chapter 3. PLC Program (GMWIN) Setup

3-1. PC Requirements
The following is the hardware and software required to run GMWIN.

1) Computer and memory


PC with CPU Intel Pentium or later, and minimum of 128 Megabytes of memory.

2) Serial Port
In order to utilize the full functionality of GMWIN and connect with PLC, there
needs to be at least two serial ports available.

3) Hard disk drive


Minimum of 20 Megabytes of space must be available in the hard disk to install all
the GMWIN related files and to run GMWIN smoothly.

4) Floppy disk drive


If you choose to GMWIN from floppy disks or save data on floppy disks, a floppy
disk drive is required. (CD drive recommended)

5) Mouse
A Microsoft Windows compatible mouse is required in order to use all the features of
GMWIN.

6) Printer
A Microsoft Windows compatible printer is required in order to print in GMWIN.

7) Microsoft Windows
Windows 95/98 or a later version is required.

www.ed.co.kr
The Basics of PLC

3-2. Installing GMWIN


1) Installation Procedures
Insert the CD-ROM in the CD-ROM drive.
Click[PLC] in PRODUCT INFO GLOFA-GM Software GMWIN
GMWIN 4.1

The File Download dialog box appears, and click [Open].

www.ed.co.kr
The Basics of PLC

A setup dialog box with a welcome message appears. Any other application is
recommended to be closed during the installation process.

Click to move to the next step.

www.ed.co.kr
The Basics of PLC

A dialog appears, showing the path of the folder where the program will be
installed. To install at a different folder, click the button to choose an
other folder. To stop the installation procedure, press the button at any
stage of the installation. In this case, GMWIN will not be able to be launched
since the installation was aborted. Click to move to next step.

Files will start to be copied from the CD-ROM to the hard disk.

The GMWIN is successfully installed.

Before you can use the GMWIN, you must restart your computer.

www.ed.co.kr
The Basics of PLC

Chapter 4. Programming Tool (GMWIN)

4-1. Launching GMWIN


1) From the Windows Start menu, choose Programs - [LGIS], [GMWIN 4], [GMWIN
4.0]. A window in [Figure 4-1] will appear.

[Figure 4-1] GMWIN Program Window

www.ed.co.kr
The Basics of PLC

2) GMWIM start window will appear as below. Click New Project in Project menu as
in [Figure 4-2].

[Figure 4-2] GMWIN Project Window

3) Project
In the New Project window, project file name is the name specified by the user and
if it is not specified, it takes the default project name automatically. PLC type should be
set to the type of PLC which will be used. In addition, Writer and Comment are only
auxiliary information of the project, so they can be omitted. Refer to [Figure 4-3].

www.ed.co.kr
The Basics of PLC

[Figure 4-3] GMWIN New Project Window

4) Define Program
[Figure 4-4] shows the Define Program window. Although the user can specify a
name for the program, but since cases may arise that the remembering the instance
name to open the file for executing, therefore we recommend to use the default name.
The task button of the select condition for run is used do define the condition under
which the execution should take place, and Scan program, which executes regardless of
the condition, should be selected in this case. It is convenient to give the same name
for the program file as the project name, and for existing program, click the Find button
and choose the desired file. (Files with different extension are generated during compila-
tion and it is difficult to distinguish the files if the project name and the program name
differ.)

www.ed.co.kr
The Basics of PLC

[Figure 4-4] GMWIN Define Program Window

www.ed.co.kr
The Basics of PLC

5) Program
[Figure 4-5] shows the window for selecting the language used in the program, where
the most convenient one of SFC, LD, and IL should be selected. In this chapter, LD
(Ladder Diagram) will be used.

[Figure 4-5] GMWIN Add Program Window

www.ed.co.kr
The Basics of PLC

4-2. User Interface


The GMWIN user interface is composed of Program Window, Toolbar, Project win-
dow, as shown in [Figure 4-6]. The Program Window and the Toolbar will be covered
later.

-----Menu
--Toolbar

LD Program
Window

Project
Window

[Figure 4-6] GMWIN User Interface

www.ed.co.kr
The Basics of PLC

4-3. Project Structure


Project is the most basic element of program of GLOFA PLC, and normally there
should be one Project per PLC system.
Project can be divided into configuration part, parameter part, and inserted library
files, where the configuration part is used to define software element such as global var-
iable, access variable, resource content, and the parameter part has hardware related defi-
nitions such as basic parameters, I/O parameters, and link parameters. In addition, li-
braries can be added or removed in the inserted library files. Project structure is shown
in [Figure 4-7], and functions are described in [Table 4-8].

[Figure 4-7] Project Structure

www.ed.co.kr
The Basics of PLC

[Table 4-8] Project Hierarchy


Hierarchy item Description

Project defines the overall PLC system.

Configuration configures several definitions for the PLC program.

Configuration Global Variable variable list used over the configuration.

Access Variable variable list that different configurations can access.

Resource corresponds to the CPU module.

Resource Global Variable variable list used over one resource.

Task Definitions defines the running conditions of the program.

Define Program describes each program and its running condition.

Direct Variables Comments comments list used for the Direct Variables.

Parameter defines the hardware contents of the PLC system.

Basic Parameters defines basic hardware parameters.

I/O Parameters describes the contents of the input/output modules.

High Speed Link Parameters describes the contents of the high speed link parameters.

Inserted Library Files list of current library files being inserted.

www.ed.co.kr
The Basics of PLC

4-4. LD Edit
LD program displays PLC program with graphic symbols used in relay logic diagrams.
As shown in the figure below, 'rung comment' contains the description of the corre-
sponding rung. Rung refers to the vertically linked line formed by consecutive rows, as
Row 1 to Row 4 in the example figure below, which form a rung, and row 5, is also
forms a another rung.

Function Block
Label Rung Comment Function
Row No.

Coil

Rung
Subroutine
Call
Contact

Vertical Link

Horizontal Link Jump Label

Subroutine
Program

In the above figure, the {END} in Row 7 serves to mark the end of the main
program. The rung named Abnomal process is a form of a subprogram(subroutine pro-
gram), and the subroutine is called in Row 5.
Selecting any element form the toolbar will change the mouse cursor to the same
shape as the chosen element. Move the mouse pointer to the desired point and click to
create a element for LD program.

www.ed.co.kr
The Basics of PLC

4-5. Upload
Upload the program to the GMWIN from the PLC after storing the compressed proj-
ect file and source file in the RAM or flash memory of the PLC.

1) Making the upload file


Select in the option to make upload file when making and proceeding with make in
the menu will cause to generate the upload file.
Upload file contains the project, the program, and the functions and function blocks
used in the program.
Choose Project - Options in the menu to bring up the Option dialog box.
Select Upload Program from the dialog box and click OK. It is not necessary to
select the variable table (an option used to monitor variables using a separate
device later).

PLC execution file and upload program will be generated.

www.ed.co.kr
The Basics of PLC

2) Writing to PLC
Choose the upload program when writing to PLC.
Choose Online - Write from the menu.
In the write dialog, choose the parameter, the program and upload program.

Do the following depending on the program size.

Program size Program storage location

executable program size + upload program


It is stored in the RAM on the CPU
size < program RAM size

If flash memory is installed, it is


Program RAM size > executable program
stored in the flash memory after
size + upload program size
asking the user for confirmation.

www.ed.co.kr
The Basics of PLC

3) Reading from PLC (Upload)


Choose Project - 'Load from PLC' in the menu.
Open the project after creating the project, the program file, and the user libraries by
loading the upload file from PLC.
If a project with the same name already exists in GMWIN, overwrite it, or save it at
another directory or save as another name as specified by the user.

4-6. Menu
1) Project
Command Description
New Project Creates a project.
Open Opens a existing project.

Upload Project From PLC Uploads a project and program in the PLC.

Save Saves the project. (program is not saved)


Save As Saves the project as a different name.
Close Closes the project.

Import Proiect Bundle Opens project bundle file.

Export Proiect Bundle Bundles all files connected to the project as one file.

Adds new items to the project.


Add Item
(Define program, Resource Task, Library)
M Area Edit Edits M area or saves it.
Preview Show the contents which will be printed.
Print Project Prints the contents of each corresponding point.
Print Program Prints the contents of the activated window.
Printer Setup Sets the print options.
Option Sets the options for the GMWIN.
Exit Exits the GMWIN.

www.ed.co.kr
The Basics of PLC

2) Program
Command Description
New Program (N) Creates a program.
Open (O) Opens a existing program.
Save (S) Saves the program.
Save As Saves the program as a different name.
Close Closes the program.
Properties Changes the programs properties.
Local Variables Edits local variables.
For functions and function blocks, edits input/output
In/Out variables
Variables.

3) Edit
Command Description
Cancels the last action at the program edit window,
Undo (Ctrl+Z)
and returns back to the previous screen.
Redo (Y) Restores the edit-canceled action again.
Deletes the selected item, and copies it to the
Cut (X)
clipboard.
Copy (C) Copies the selected item to the clipboard.
Paste (V) Copies the clipboard contents to the edit window.
Delete (Del) Deletes the selected item.
Find (F) Finds out the desired string.
Finds out the desired string, and replaces it to new
Replace (H)
one.

Replace Direct Variables Replace the whole desired direct variables.

Find Next (F3) Repeats the previous Find or Replace operation.


Go To Moves the cursor to the desired location.
Screen Size Controls the view size.
Delete Line Deletes a line.
Insert Line Inserts a line.
Insert Cell Inserts a cell.
Toolbox Uses the edit tool for each program.

www.ed.co.kr
The Basics of PLC

4)View

Command Description
Tool Bar The user defines the toolbox.
Status Bar Shows or hides the status line.
Enlarges the scope to indicate the program windows to
Full Screen
the overall screen.
Project Shows or hides the project window.
Result Shows or hides the result window.
Variable Monitor Shows or hides the variable monitor window.
I/O Monitor Shows or hides I/O monitor window.
Link Parameter Shows or hides link parameter window.
Zoom Enlarges or reduces the screen.

Show Memory/ Comments Shows or hides the variable comments.

Shows the registration information of the currently


Properties
selected items.
Monitor Array Selects array no. Of the variable declared as array.

5) Compile

Command Description
Compile Compiles the program.
Compiles all the programs in the project, and create a
Compile All
PLC execution file.
Allows users to see the used global and direct
Memory Reference
variables.
Show Used I/O Shows I/O use global variable or direct variable.
Check Double Coils Shows the used doubles coil.
Previous Message Moves to the previous message position.
Next Massage Moves to the next message position

www.ed.co.kr
The Basics of PLC

6) Online
Command Description
Connect + Write + Connects to the PLC specified through the GMWIN
Run + Monitor On and options, writes the program a user creates to the
[Ctrl+R] PLC and changes to the monitoring mode.
Connects to the PLC specified through the GMWIN
Connect
and options.
Read Reads the PLCs data.
Write Writes the GMWINs program to the PLC.
monitor On/Off Start/finishes program monitoring.
Run Converts PLC mode.
Stop
PLC Sleep
Monitor Debug
Master
Convert Converts CPU to communicate in GM1.
Data Clear Clears PLC data as "0".
Reset Resets PLC.
Reset
Overall
Resets all data of CPU.
Reset
Read Reads flash memory type information installed in CPU
Type or writes data to flash memory.
Write
Flash Program
memory
Set Mode is only available in GM4-cpu. If the mode is
Set Mode set executing code is written in flash memory.

System Shows PLC information.


Error/
Warning
History
PLC Info I/O
Module
Fault

Base
Units

www.ed.co.kr
The Basics of PLC

Command Description
I/O Info Shows/Writes PlC I/O Configuration Status.
Matches PlC I/O Configuration With Project & PLC
I/O
Modules I/O
Synchronization

I/O Input Sets Forced I/O Value/Execution Allowance.


Forcing Output
Enable
Shows Link Module Type, Installed Slot, Station No.
Link
Link
Shows Network Information.
Network Status

Mnet
Inputs Mnet Parameter.
Parameter

Comm unication Info Shows Sending/Receiving Information


Start
Starts To Edit Function.
Online Write Writes The Edit Contents while running.
Edit
Cancel Cancels The Edit Function.

FSM Sets The Emergency Data Of F-Net Slave Module.


I/O Skip Sets I/O To Skip.
Fault Mask Sets Failure Mask.
Initialize Speacial
Initializes Special Module.
Module

www.ed.co.kr
The Basics of PLC

7) Debug

Command Description
Changes to the debug mode, (Begin debugging the
Begin/End Debug
program / Stops debugging the program.)
Go(Ctrl+F9) Run to the break point.

Step Over(Ctrl+F8) Run step by step.

Step In Debugs functions and function blocks.


While debugging functions and function blocks, escape
Step Out
the present block.
Pause Pauses the Run.

Run to Cursor(Ctrl+F2) Runs to the cursor location.

Insert / Remove Breakpoint


Inserts or removes the breakpoint.
(Ctrl+F5)

Shows the list of the breakpoints you have set, and


Breakpoint List/Condition
enables you to set the break condition.

Task Enable Enables you to change the task while debugging.

8) Tools
Command Description
Library Manager Edits library.

Start Simulation Starts simulator.

Data Share Shares monitor values with excel.

www.ed.co.kr
The Basics of PLC

9) Windows
Command Description
New Window Opens New Window Against Current Window.
Cascade Cascades The Several Windows Of The GMWIN.
Tile Horizontally Tiles The Several Windows Of The GMWIN Horizontally.
Tile Vertically Tiles The Several Windows Of The GMWIN Vertically.
Arrange Icons Arranges Icons In The GMWIN.
Close All Closes All The Windows In The GMWIN.

10) Help

Command Description
GMWIN Help Opens GMWIN helpdesk.
Connects to LG industrial systems homepage by
LGIS Homepage
internet.
About GMWIN Displays GMWIN information.

www.ed.co.kr
The Basics of PLC

4-7. Toolbar
The following is the GMWIN toolbar.

GMWIN provides frequently used features as toolbar. Choosing the desired tool with
the mouse will execute the feature, as described in the chart below.

Icon Command Description


- create a new project.
New Project
- select Menu - Project - New Project
- opens a existing project.
Open Project
- select Menu - Project - Open
- saves the created project file.
Save Project
- select Menu - Project - Save
- is used to open one or more programs included in a
New Program project.
- select Menu - Program New Program
- opens a program selected from the menu.
- select Menu - Program - Open
[Note]
Open - At the editing/debugging mode, two or more instances
Program for one program are not available.
For the monitor mode, you can open two or more
instances for each program to monitor different
positions of a long program.
Save - saves the created program file.
Program - select Menu - Program - Save
- It allows you to edit local variables corresponding to
the enabled program window.
Local
- select Program Local Variables
Variables
- Add/delete/edit each variable, and click the Close
button.
- cancels the last editing action during writing the
Undo(Ctrl+Z) program.
- select Menu Edit - Undo
- specifies the item to be cut as a block.
Cut(Ctrl+X)
- select Menu Edit-Cut
- specifies the item to be copied as a block.
Copy(Ctrl+C)
- select Menu Edit- Copy

www.ed.co.kr
The Basics of PLC

Icon Command Description


- position the cursor to a location to be pasted, after
Paste
performing the Cut or Copy.
(Ctrl+V)
- select Menu Edit - paste
- specifies a item to be deleted with the block-specifying
Delete
icon, and deletes the item using the Delete icon.
- searches an instruction or operand in the enabled program.
- select Menu Edit - Find
- enter a desired string to the string input column in the
Find dialog box.
- select one of the following options, and press the OK
button.
1) Both Text and contact/coil : selects the type of the
desired string.
2) Range : selects the range of the search.
- From Cursor : searches it from the present location
Search
of the cursor.
- Entire Scope : searches it over the program.
3) Direction : selects the direction of the search.
- Forward : searches it downward.
- Backward : searches it upward.
4) Word : selects the match percent of the desired word.
- Match whole word : searches 100% percent matching
word.
- Match partial word : searches any percent matching
word.
- Invoke the Replace dialog box, by selecting Menu Edit -
Replace
- Enter text to be replaced to the New text textbox.
- Select a LD program component to replace at the
Contact/Coil to find box.
Replace
- Enter the desired text to the new name textbox.
- Select a LD program component to replaced at the New
Contact/Coil box.
- For other options, select those equal to the options for
Find, and press the OK button.
- When you have already done with the Find/Replace
Find Next operation before, it repeats the Find/Replace operation with
(Ctrl+F3) the conditions equal to Find/Replace.
- select Menu - Edit- Find Next
- only complies the program in the enabled program
window, and produces an object file.
Compile - select Menu Compile
[Note] If you only compile a program, its execution file is
not created.

www.ed.co.kr
The Basics of PLC

Icon Command Description


Make
- compiles only the programs needed to be compiled in the
Create
project programs, and creates an execution file.
execution
- select Menu Compile - Make
file
Connect + - This is a macro command to execute the written program
Write+ with one menu operation.
Run + - With this command, you can connect, write a program,
Monitor change the mode change(Run), and start monitoring with
On one operation.

- establishes the connection between GMWIN and PLC.


Connect
- select Menu - Online - Connect

- RUN mode : Mode to execute a program properly.


Run
- select Menu - Online Change Mode - Run
- STOP mode : Mode to stop the program, without operating
Stop it.
- select Menu - Online Change Mode - Stop
- PAUSE mode : Mode to pause to operate the program.
Pause
- select Menu - Online Change Mode - Pause

Begin - DEBUG mode : Mode to find out errors on the program


or to trace the operating process.
Debug - select Menu - Online Change Mode -Begin Debug

Go runs to the break point.

Over Step runs the program step by step.

Step In debugs functions and function blocks.


While debugging functions and function blocks,
StepOut
escape the present block.

Pause pauses the Run.

Run to
runs to the cursor location.
Cursor
Insert/
Remove inserts or removes the breakpoint.
Breakpoint

www.ed.co.kr
The Basics of PLC

Icon Command Description

- releases the connection between GMWIN and PLC.


Disconnect
- select Menu - Online - Disconnect

- writes parameters and programs of the GMWIN to the


PLC.
- invoke the Write dialog box, by selecting Menu Online
Write. (after establishing the connection)
- If the PLC state is on Run mode, the following screen
appears.
- Basic Parameters : reads only basic parameters from
the PLC.
- I/O Parameter : reads only I/O parameters from the PLC.
Write
- High speed Link Parameters : reads only high speed link
parameters from the PLC.
- Duplication Parameters : reads only duplication parameters
from the PLC. (enabled only when selecting the
Duplication)
- Program : reads only programs from the PLC.
- Parameters and Programs : reads both parameters and
programs from the PLC.
- Upload : reads upload programs from the PLC.

- GMWIN allows users to monitor the status of the PLC on


operation.
- Online - Monitor Monitor On
Monitor Program Monitoring
On/Off I/O Monitoring
Variable Monitoring
Time Chart Monitoring
Link Parameter Monitoring

www.ed.co.kr
The Basics of PLC

4-8. Files created by GMWIN

The following types of files are created when the user generates PLC executable file
by creating a project and editing a program.
* . PRJ : The project file created by the user
* . BN0 : PLC executable file
* . MON: File containing the information for monitoring
* . CR0 : Generated when PLC executable file is created.
* . SRC : Program file created by the user
* . ASV : Periodical auto-save file of the program
* . OP? : Generated on program compilation (Program block)
* . OB? : Generated on program compilation (Function block)
* . OF? : Generated on program compilation (Function)

www.ed.co.kr
The Basics of PLC

4-9. Opening Files


The user must open an existing project in order to create a program.

1) Opening a project
Select Project - Open from menu.

2) Opening a program
Select Program - Open from menu.
Choose the drive and directory in order to find the location of the file in the list
box.
Enter the file name directly or choose from the list box.
Choose the types of files to show from the File Type.
Project File : .PRJ Program File: .SRC
Click the Open button.

www.ed.co.kr
The Basics of PLC

www.ed.co.kr
The Basics of PLC

4-10. Saving Files


1) Saving a new file
Saving a file that has never been saved.

2) Saving a project
Select Project - Save from menu.

3) Saving a program.
(1) Select Program - Save from the menu.
(2) Choose from the list box the drive and directory location to save the file.
(3) Enter the desired file name in the file name field.
Enter PRJ for proiect files and SRC for program files as the extension.
(4) Click the Save button.

4) Saving while working


(1) Saving project
Choose Project - Save from menu.
(2) Saving program
Choose Program - Save from menu.

5) Saving by different name


Changing the project name or the program name.
(1) Saving Project
Choose Project - Save As from menu.
(2) Saving Program
Choose Program - Save As from menu.
Choose from the list box the drive and directory location at which to save the
program.
Enter the file name in the file name field.
Enter PRJ for project files and SRC for program files as the extension.
Click the Save button.

www.ed.co.kr
The Basics of PLC

6) Closing File
(1) Method 1: Double-click the adjustment menu at the top-left corner of the win
dow to close.
(2) Method 2
Closing Project
Choose Project - Close from menu.
Closing Program
Choose Program - Close from menu.

www.ed.co.kr
The Basics of PLC

Chapter 5. Data Format

5-1. Variable Representation


Data used in a program has values, which can be divided into ones that change dur-
ing the course of the execution and ones that stay constant. In order to use variables in
program block, function, function block, etc, the representation method of the variable
must first be determined. Variables are categorized into direct variables and named
variables.

Direct variables: Do not need to be declared(conventional Method)


Named variables: Declaration necessary

In the first method of direct variables, the user does not need to name the variable,
but a memory location identifier predefined by the maker is used, where as in the sec-
ond method of named variables, the user assigns the name to be used as the identifier

1) Direct Variables
There are %I, %Q input and output variables and %M internal memory variables for
direct variables.
Direct variables always starts with the percent character(%), followed by location pre-
fix and size prefix and one or more unsigned integer, delimited by periods.

(1) Examples of direct variable


Input variable assignment: %I0.0.0, %I0.0.1, %I0.0.2 etc.
Output variable assignment: %Q0.2.0, %Q0.2.1, %Q0.2.2 etc.
Internal memory variable assignment: %M0, %M1, %M2 etc.

www.ed.co.kr
The Basics of PLC

(2) Location prefix


No. Prefix Meaning
1 I Input Location
2 Q Output Location
3 M Internal Memory Location

(3) Size Prefix


No. Prefix Meaning
1 X 1 bit (the X is omittable)
2 B 1 byte (8 bits)
3 W 1 word (16 bits)
4 D 1 double word (32 bits)
5 L 1 long word (64 bits)

Input and output representation of direct variables


% [Location Prefix] [Size Prefix] [Base Number]. [Slot Number]. [Contact Point
Number]

www.ed.co.kr
The Basics of PLC

Input % I X 0. 0. 0
Output % Q X 0. 3. 0
Represents the contact point number of the I/O module
Takes value between 0 and 63.
Represents the slot number of the slot on which the I/O
module is installed. Takes value between 0 and 7.
Base number : Takes value between 0 and 3.

Size prefix: X represents 1 bit.

Location prefix: I(input), Q(output), M(internal memory)

Reserved word for direct variable

EX) %IX0.0.3 : Direct variable, input, 1 bit, base 0, slot 0, contact point 3
%QX0.2.7 : Direct variable, output, 1 bit, base 0, slot 2, contact point 7

(4) Internal memory


NO. Internal Memory Meaning
1 %MX0 Represents the contact point at location 0 in bit.
2 %MB1 Represents memory location 1 in byte.
3 %MD48 Represents the memory location 48 in double words.
Represents the third bit at the memory location 20 in
4 %MW20.3
words.

www.ed.co.kr
The Basics of PLC

(5) Internal Memory M


b b b b b b b b b b b b b b b b
%MW0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WORD
(16Bit)
%MW99
Address
%MW100 %MB201 %MB200
%MW101

%MB200
Byte(8bit) Address 7 6 5 4 3 2 1 0

%MX1603
Bit Address %MB200.3
%MW100.3

2) Named Variable
The user needs to declares the name and the type of the named variable when using.
The name of the variable can be up to 16 characters in length(English), in case of
KOREAN & characters are available.
KOREAN Alphanumeric characters and underscore(_) can be used together.
There is no distinction between capital and lower case letters and all characters
are considered to be capital letters. The name may not contain spaces.

(1) Examples of named variables

Type Usage Example


Alphanumeric
AGV_DRIVE_COMP, MOTOR2_ON, BCD_VALUE, VAL2,
Characters and
AUTO_EJECT_SOL
Underscore

www.ed.co.kr
The Basics of PLC

(2) Types of Named Variable

No. Variable Type Meaning

1 VAR General type for reading and writing


Variable which retains its value even in the case of
2 VAR_RETAIN
power failure
3 VAR_CONSTANT Variable for reading only

4 VAR_EXTERNAL Variable to assign external variable (VAR_GLOBAL)

(3) Data Type of Named Variables (Represents the property of the data)
Data types are categorized into numerical type (ANY_NUM) and bit state
(ANY_BIT).
The most common numerical type is the integer (INT) which can be used for
counting and arithmetic operations.
Examples of integer includes the current value of a counter and A/D (analog input)
conversion value.
Bit state includes BOOL(Boolean: 1 bit), BYTE(8 bits), WORD(16 bits), which
represents ON/OFF state and is used for logical operations.
Examples of bit state includes the ON/OFF state of input switch, the illumination
state of output lamp.
Since BCD is 4-bit binary code representation of decimal number, it is essentially
bit state (ANY_BIT).
Arithmetic operations cannot be done on bit state type as it is, but it is possible,
using type conversion function.

www.ed.co.kr
The Basics of PLC

(4) Basic Data Types

Data Size
Category Type Meaning (bits) Range

SINT Short Integer 8 -128 ~ 127


INT Integer 16 -32768 ~ 32767
DINT Double Integer 32 -2147483648 ~ 2147483647
18 18
LINT Long Integer 64 -9.223710 ~ 9.223710
Unsigned Short
USINT 8 0 ~ 255
Integer
Numerical UINT Unsigned Integer 16 0 ~ 65535
(ANY_
NUM) Unsigned Double
UDINT Integer 32 0 ~ 4294967295

ULINT Unsigned Long 64 0 ~ 1.84410


19
Integer
-3.4028231038 ~ -1.40129810-45
REAL Real Numbers 32
40129810-45 ~ 3.4028231038

-1.797693110308 ~ -4.940656410-324
LREAL Long Real Numbers 64
4.940656410-324~1.797693110308

Time TIME Duration 32 T#0S ~ T#49D17H2M47S295MS


DATE Date 16 D#1984-01-01 ~ D#2163-6-6
TIME_O TOD#00:00:00 ~
F_DAY Time Of Day 32 TOD#23:59:59.999
Date
DATE_A Date And Time Of DT#1984-01-01-00:00:00 ~
ND Day 64 DT#2163-12-31-23:59:59.999
_TIME
Character STRING Character String 30*8 -
String
BOOL Boolean 1 0,1
Bit String Of
BYTE 8 16#0 ~ 16#FF
Length 8
Bit State Bit String Of
WORD 16 16#0 ~ 16FFFF
(ANY_ Length 16
BIT)
Bit String Of
DWORD 32 16#0 ~ 16FFFFFFFF
Length 32

LWORD Bit String Of 64 16#0 ~ 16FFFFFFFFFFFFFFFF


Length 64

www.ed.co.kr
The Basics of PLC

(5) Data Type Hierarchy


Data types used in GLOFA PLC can be graphically represented as the tree below.
ANY

ANY_NUM ANY_BIT ANY STRING ANY_DATE TIME


LWORD(GM 1,2) DATE_AND_TIME
DWORD DATE
ANY_REAL ANY_INT WORD TIME_OF_DAY
(GM 1,2) LINT(GM1,2) BYTE
LREAL DINT BOOL
REAL INT
SINT
ULINT(GM1,2)
UDINT
UINT
USINT

ANY_REAL(LREAL, REAL) and LINT, ULINT, LWORD are applicable only to


GM1 and GM2.
From now on, it is implied that data type of ANY_NUM includes LREAL, REAL,
LINT, DINT, INT, SINT, ULINT, UDINT, UINT, USINT, as shown in the
hierarchy.
For example, if a type is said to be ANY_BIT in GM3, any of DWORD,
WORD, BYTE, BOOL can be used.

www.ed.co.kr
The Basics of PLC

(6) Initial Value


(If no value is specified, the variable is initialized to a value according to the follow-
ing table.)

Data Type Initial Value


SINT, INT, DINT, LINT, USINT, UINT, UDINT,
0
ULINT
BOOL, BYTE, WORD, DWORD, LWORD 0
REAL, LREAL 0.0
TIME T#0s
DATE D#1984-01-01
TIME_OF_DAY TOD#00:00:00
DATE_AND_TIME DT#1984-01-01-00:00:00
STRING "(empty string)"

Since the declaration of VAR_EXTERNAL only indirectly designates an externally


declared variable, it cannot be given an initial value.
Variables allocated using %I or %Q in declaration cannot be given initial values.
Because those are Input and Output variables.

(7) Memory Allocation of Named Variables


Named variables can be allocated either automatically or manually.

(8) Automatic Allocation


Compiler automatically allocates the address for the variable in the memory.
For example, if a variable called VALVE_1 is declared to be automatically allo-
cated, the memory location of this variable is determined only after the compilation of
the program is done, so there is no need to worry about the location of the variable.
Once declared, a variable serves, regardless of input or output, to relay signals during
the computation process, temporarily save signal state(internal data), assignment of the
name (the instance of the function block) of contact for timer or counter, etc.

www.ed.co.kr
The Basics of PLC

(9) User Definition


The user manually defines the location, using direct variables (%I, %Q, %M). The de-
clared variable is used as input and output (%I, %Q) variables and communication varia-
bles, which will be used as communication parameters.

As Data type is a very important issue, it will be covered in more detail with
some examples. Much caution should be taken in using these data types for
sequence control, arithmetic operation and logical comparison and conversion, etc.

www.ed.co.kr
The Basics of PLC

Chapter 6. Process of operation

6-1. Scan time


PLC is first executed from the beginning of the program to the end in a sequential
manner, starting at a state where the input has been refreshed, and then the output is
refreshed. This process is repeated very rapidly, which is why it is called repeated ex-
ecution method, and the time it takes for one execution is called 1 scan time.

Operation Start

Input image area Contact status of


refresh input module

Scan program start


Execute task

program
1 Scan
Scan program end

Output image area Contact status of


refresh output module

END

www.ed.co.kr
The Basics of PLC

6-2. I/O Refresh


I/O refresh is the process consists of acquiring the status of the contacts from the in-
put module and saving it in the input image area, and writing the output image altered
by the program execution to the output module after the program execution is
completed.

6-3. I/O Image Area


GLOFA PLC executes program in a repeated fashion, so it does not change the I/O
state in the course of the program execution, but performs I/O refresh on every scan.
The state of each contact which change during the execution is stored in memory of the
PLC, and this is called the I/O image area.

6-4. Operation Mode


1) RUN Mode
Runs the program in a normal manner.

(1) Mode Change Procedure


Data is initialized on the first scan.

(2) Execution Procedure


Performs input/output refresh and program execution.

2) PAUSE Mode
The execution of the program is paused. If the mode is changed back to RUN mode,
the operation continues after the state is restored to the state immediately before
stopping.

www.ed.co.kr
The Basics of PLC

(1) Mode Change Procedure


The initialization of the data area and clearing of the I/O image area are skipped, and
operation state is preserved as it was before the operation..

(2) Execution Procedure


I/O refresh is performed.

3) STOP Mode
The program execution is stopped. Only in remote STOP mode is program transfer by
GMWIN possible.

(1) Mode Change Procedure


Clears the output image area and performs an output refresh.

(2) Execution Procedure


Performs I/O refresh to check for any problems in operation, installation, and commu-
nication service, and operation status, and other internal procedures are carried out.

4) DEBUG Mode
Used to find bugs in the program or follow the line of execution. Switching to this
mode is only possible at the STOP state. The execution status and data content can be
verified in this mode.

(1) Mode Change Procedure


Data area is initialized as specified in the restart mode, which is set in as parameters
at the beginning of the mode switch, output image area is cleared, and input refresh is
performed.

www.ed.co.kr
The Basics of PLC

(2) Execution Procedure


Input refresh is performed.
Debug operation is performed according to the setting.
When the debug has reached the end the program, output refresh is performed.
The installed module is checked for correct operation and whether it is
installed correctly.
Communication and other services are performed.

6-5. Changing the Operation Mode


1) Different ways to change the mode
(1) Use mode key in the CPU module
(2) By connecting GMWIN to the communication port of the CPU module
(3) By connecting GMWIN to other CPU module on the F-net
(4) Issue user command through FAM, computer link, etc.
(5) Use STOP Function during program execution

2) Changing the mode using the mode key

Mode key position Mode

RUN Local RUN

STOP Local STOP

STOP PAU/REM Remote STOP

PAU/REM RUN * Local RUN

RUN PAU/REM Local PAUSE

PAU/REM STOP Local STOP

PLC continues to operate without any delay, when switching from remote RUN mode
to local run mode by the mode key.

www.ed.co.kr
The Basics of PLC

3) Remote mode change


Remote mode change is possible only if the mode key is set to remote STOP.
(If the mode key is at STOP PAU/REM)
Mode change
Location Mode change
using FAM,
of the Mode Transition using
computer link,
mode key GMWIN
etc.
Remote STOP Remote RUN
Remote STOP Remote PAUSE
Remote STOP DEBUG
Remote RUN Remote PAUSE
Remote RUN Remote STOP
Remote RUN DEBUG
PAU/REM
Remote PAUSE Remote RUN
Remote PAUSE Remote STOP
Remote PAUSE Remote DEBUG
DEBUG Remote STOP
DEBUG Remote RUN
DEBUG Remote PAUSE

4) Remote operation mode change permission


In order to protect the system, a part of operation mode change source has been made
unmodifiable, and when remote operation mode change has been disallowed, mode can
be change using mode key or GMWIN. Options can be set in the Allow PLC control
through communication of the basic parameter area.

www.ed.co.kr
The Basics of PLC

6-6. Restart Mode


Restart mode determines how to initialize the variables and the system before operat-
ing in RUN mode, when the power has been supplied again or after a mode change. It
can be cold, warm, or hot type, and execution condition of each type is as follows.

1) Cold Restart
(1) Executed if the parameter restart mode is set to cold restart.
(2) All data is cleared to be 0, while variables with specified initial values are
initialized to the preset value.
(3) Even if the parameter is set to warm restart, the first run after any change has
been made to the program will cause to restart in cold mode.
(4) If the manual reset button is pressed while operation (same as issuing a reset
command through GMWIN), a cold restart takes place regardless of the parameter
setting.

2) Warm Restart
(1) Executed if the parameter restart mode is set to warm restart.
(2) Variables declared to preserve previous value retains the current value, while
variables with only initial values specified is initialized to the value. All other
variables are initialized to 0, clearing any previous content.
(3) Even if the parameter is set to warm restart, the first operation after a program
download or a halt caused by error is always a cold restart.
(4) Even if the parameter is set to warm restart, a cold restart will take place in case
the data has any abnormality (data is not preserved in case of power failure).
For variables with the option set to retain value in case of power failure
(VAR_RETAIN), the following set of rules is followed.
Parameter must be set as warm restart, in order to retain the value in case of
power failure.
If parameter is set as cold restart, it is initialized to the user-defined initial value
or to the basic default initial value.
Variables that is not declared VAR_RETAIN is always initialized to the
user-defined initial value or to the basic default initial value, for both cold
and warm restart.

www.ed.co.kr
The Basics of PLC

3) Hot Restart
(1) If and it is the run mode when power comes back on after being cut off during
a normal operation. the interval between the power off and on is shorter than the
maximum allowed time for hot restart, hot restart is performed.
(2) Execute after restoring all data and program execution elements to their previous
state.
(3) Since the program is executed in the state just before the power went off, the
continuity of program execution is ensured, even in cases of momentary power
failure.
(4) If the time exceeds the maximum allowed time for hot restart, it is restarted, cold
or warm, as defined in the parameter.
(5) In case of abnormal data (data is not preserved during power failure), a cold
restart is performed.

4) Data initialization depending on restart mode


Each variable is initialized for each restart mode as shown in the chart below:

Variable
COLD WARM HOT
Mode
Retain
Default Initialize to 0 Initialize to 0
previous value
Retain
Retain Initialize to 0 Retain previous value
previous value
Initialize to user Retain
Initialize Initialize to user set value
set value previous value
Retain & Retain
Initialize to user set value Retain previous value
Initialize previous value

www.ed.co.kr
The Basics of PLC

Power On

STOP
Operation Mode STOP Mode

Abnormal
Operation Mode

timeout
Operation Mode

Within time

Cold Restart
Operation Mode

Warm Restart

Hot Restart Warm Restart Cold Restart

Hot Restart

[Flowchart for restart mode when power is resupplied during operation]

www.ed.co.kr
The Basics of PLC

Chapter 7. Programming Basics

7-1. Using the toolbar


Frequently used functions, such as program editing, variable monitoring, time chart,
and I/O monitoring can be accessed through toolbar.
In addition, the position of the toolbar on the screen can be changed by selecting
Toolbar - Toolbar Form from the menu, elements of toolbar is represented in [Figure5-1].

[Figure 5-1] Toolbar

1) Arrow ( )

Use arrow to move, edit, or delete contacts, coil, functions, function blocks etc.

2) Block Selection ( )

Use to perform edit actions such as delete or copy on multiple rows.


Click the block selection icon and move the cursor to the place to edit, and left
button click and drag to select and edit multiple rows.

3) Normally Open Contact ( )

Normally open contact, which can be thought of as the a contact in sequence


control. (Shortcut key: F2)
After clicking the icon, and move the cursor to the desired position and left click.

www.ed.co.kr
The Basics of PLC

4) Normally Closed Contact ( )

Normally closed contact, which can be thought of as the b contact in sequence


control. (Shortcut key: F3)
After clicking the icon, and move the cursor to the desired position and left click.

[Note] , cannot be placed at the right end. (rule)

5) Positive Transition Detection Contact ( )

Positive Transition detection contact detects the change of 0 to 1 and connects for
the duration of one scan. (Shortcut key + )
Click the icon for positive transition detection contact and move the cursor to
the desired place for editing and left click.

6) Negative Transition Detection Contact ( )

Negative Transition detection contact detects the change of 0 to 1 and connects


for the duration of one scan. (Shortcut key + )
Click the icon for negative transition detection contact and move the cursor to
the desired place for editing and left click.

7) Horizontal and Vertical Lines ( , )

The horizontal and vertical lines are used to establish connection between two con-
tacts, contact and coil, or branch circuits, horizontally and vertically. (Shortcut key ,
)

8) Coil and Reverse Coil ( , )

Coil represents the output which is magnetized if the input from the left is ON, and
demagnetized if it is OFF. Reverse coil work in the opposite way, being magnetized if
the input from the left is OFF and demagnetized when the input is ON.

www.ed.co.kr
The Basics of PLC

If the left circuit input is ON If the left circuit input is OFF


Coil Magnetized Demagnetized
Reverse
Demagnetized Magnetized
Coil

Directions for use and function description


Below is a comparison between the case of coil and reverse coil:
Coil: If %I0.0.0 is 1 then the output of the coil %Q0.2.0 produces 1
If %I0.0.0 is 0 then the output of the coil %Q0.2.0 produces 0
Reverse coil is the opposite:
If %I0.0.0 is 1the output of the reverse coil %Q0.3.0 produces 0
If %I0.0.0 is 0the output of the reverse coil %Q0.3.0 produces 1

9) Set Coil and Reset Coil ( , )

In setting coil, the state of the boolean variable becomes ON when the input at the
left becomes ON and remains set state until it is reset by the RESET coil.
Reset coil is use to reset a coil which is at ON on state. (Shortcut key +, +
)

www.ed.co.kr
The Basics of PLC

Directions for use and function description


If the contact signal is ON, the output %Q0.2.0 becomes ON and remains at
the magnetized state even if all the contacts are OFF.
By turning the reset contact ON, the output %Q0.2.0 becomes OFF and
the output becomes demagnetized.

10) Positive and Negative Transition Detection Coil ( , )

Positive Transition detection coil stays ON for one scan after the rising edge of input
going from OFF to ON in the previous scan. Negative Transition detection coil stays
ON for one scan after the falling edge of input going from ON to OFF in the previous
scan.

Directions for use and function description


Positive Transition detection coil M1 stays On for one scan from the moment the
input switch %I0.0.1 becomes ON, as shown in the time chart below. It stops
operating after that, so self holding circuit has been added.
The magnetized output %Q0.2.1 is demagnetized by the input switch %I0.0.0.
Negative Transition detection coil M2 is activated when the switch %I0.0.2 has
been released after being pressed and stays magnetized by the output coil %Q0.2.2.

www.ed.co.kr
The Basics of PLC

[Positive Transition Detection Coil] [Negative Transition Detection Coil]

11) Function ( )

Basic functions include move function, type Transition function, comparison function,
arithmetic function, logical function, bit shift function, etc.

(1) Function immediately outputs the result of computation in one scan, and there is
only one result.

www.ed.co.kr
The Basics of PLC

(2) IN and OUT variables of the move function can have all kind of data types, but
the types of data must be a same type.
(3) IN1, (IN2), and OUT variables of arithmetic functions (ADD, MUL, etc) can only
take the numeric data type (ANY_NUM), and all data types must be the same.
(4) IN1, (IN2), and OUT variables of logical functions (AND, OR, etc) must be the
bit data type (ANY_BIT), and all types must be the same.
(5) IN and OUT variables of type Transition functions (INT_TO_BCD, BCD_TO_INT,
etc) is bound to be the assigned data type and the functions are placed in libraries
for use.
(6) Usage of the move function:

MOVE (Data Transfer)

Function Description

Input EN: If 1, the function is computed.


IN: Data to transfer
Output ENO: Same as EN
OUT: Data transferred
Data types of IN and OUT must be a same type.
ex) if IN is %IB0.0.0, then OUT must be %QB0.2.0.

A. Program application example 1


If the execution condition (%I0.0.8) becomes ON, the MOVE function is
executed and the ON/OFF information of the byte (8 bits) at 0.0.0~0.0.7 is
copied to the corresponding bits in 0.2.0~0.2.7. (moved in units of byte)

www.ed.co.kr
The Basics of PLC

LD confirmation using a simulator

www.ed.co.kr
The Basics of PLC

B. Program application example 2


If one of the three switches 0, 1, 2 is set to ON, the MOVE function is
executed and the code value is transferred to %QW0.3.0.

LD confirmation using a simulator


Turning ON the 16#0000 (%IX0.0.0) of the first IN1 is the command to put a
hexadecimal code of 0000 at the output %QW0.3.0 (hex).
Turning ON the 16#1111 (%IX0.0.1) of the second IN1 is the command to put a
hexadecimal code of 1111 at the output %QW0.3.0 (hex).
Turning ON the 16#FFFF (%IX0.0.2) of the third IN1 is the command to put a
hexadecimal code of FFFF at the output %QW0.3.0 (hex).

www.ed.co.kr
The Basics of PLC

(7) Types and usages of type Transition functions


A. BCD_TO_*** (Converts BCD to integer)

Function Description

Input EN: If 1, the function is computed.


IN: ANY_BIT Input value encoded in BCD
Output ENO: Same as EN
OUT: Type converted data

A) Function
Converts the INPUT type and writes the output on OUT.

FUNCTION Input Type Output Type Content

BCD_TO_SINT BYTE SINT

BCD_TO_INT WORD INT


Converted correctly only if the input
BCD_TO_DINT DWORD DINT is encoded in BCD.
BCD_TO_USIN (If the input data type is WORD,
BYTE USINT the conversion is valid only for
T
values in the range of 0~16#9999)
BCD_TO_UINT WORD UINT
BCD_TO_UDIN
DWORD UDINT
T

If IN contains data which is not a valid BCD value, the output is set to 0 and
_ERR (Arithmetic error flag) and _LER (Arithmetic error latch flag) are set to ON.

B) Program Application
Providing the BCD value 3333 as the input using %IW0.1.0 and setting
%IX0.0.0 to ON will cause to produce the integer converted value on the
output.

www.ed.co.kr
The Basics of PLC

LD confirmation using a simulator

www.ed.co.kr
The Basics of PLC

B. INT_TO_*** (INT type conversion)

Function Description

Input EN: If 1, the function is computed.


IN: Integer input
Output ENO: 1 if there is no error
OUT: Type converted data

A) Function
Converts the type of IN and writes the output on OUT.
Data
FUNCTION Content
Type
Appropriately converted If the input is in the
INT_TO_SINT SINT range -128~127, but for values out of this range
will cause error.
INT_TO_DINT DINT Convert to DINT type.
Appropriately converted If the input is in the
INT_TO_USINT USINT range 0~255, but for values out of this range will
cause error.
Appropriately converted If the input is in the
INT_TO_UINT UINT range 0~65535, but for values out of this range
will cause error.
Appropriately converted If the input is in the
INT_TO_UDINT UDINT range 0~4294967295, but for values out of this
range will cause error.
Takes the lowest 1 bit and converts it to BOOL
INT_TO_BOOL BOOL
type.
Takes the lowest 8 bits and converts it to BYTE
INT_TO_BYTE BYTE
type.
Convert to WORD type without modifying any
INT_TO_WORD WORD
bits.
Convert to WORD type by filling the highest bits
INT_TO_DWORD DWORD
with 0's.
Convert to LWORD type by filling the highest
INT_TO_LWORD LWORD
bits with 0's.
Appropriately converted If the input is in the
INT_TO_BCD WORD range 0~9999, but for values out of this range
will cause error.

www.ed.co.kr
The Basics of PLC

B) Error
In case of conversion error, _ERR (Arithmetic error flag), _LEE (Arithmetic
error latch flag) is set to ON.

C) Program Application
If forced variable 6666 is fed as the integer value when the input switch of
%I0.0.0, the BCD value for the 6666 is written to %QW0.2.0 and if the maximum
allowed integer value of 9999 or 16#270F is inputted to the INT_TO_BCD
function, the BCD value of 16#9999 is written to %QW0.2.1.

www.ed.co.kr
The Basics of PLC

LD confirmation using a simulator

C. GT (Greater than Comparision)

Function Description

Input EN: If 1, the function is computed.


IN1: Value to compare
IN2: Value to compare
The number of inputs can be expanded to
up to 8.
IN1, IN2,... must be the same type.
Output ENO: same as EN
OUT: the result of the comparison

A) Function
If the condition IN1 IN2 IN3... INn holds true for the inputs, 1 is
produced for OUT. If not, OUT becomes 0,

www.ed.co.kr
The Basics of PLC

B) Program Application
(a) If the execution condition %IX0.0.0 is ON, GT function executes.
(b) If the input variables carry the values IN1=300, IN2=200, IN3=100, IN1 IN2
IN3 is true, so the output %QX0.3.0 becomes 1.

D. GE (Greater than or equal to comparison)

Function Description

Input EN: If 1, the function is computed.


IN1: Value to compare
IN2: Value to compare
The number of inputs can be expanded to up to 8.
IN1, IN2,... must be the same type.
Output ENO: same as EN
OUT: the result of the comparison

www.ed.co.kr
The Basics of PLC

A) Function
If the relationship IN1 IN2 IN3... INn (n: the number of inputs) holds true
for the inputs, OUT is set to 1. Otherwise, OUT is set to 0.

B) Program Application
(a) GE function operates if the activation condition %IX0.0.0 is set to ON.
(b) Assuming the inputs are set to IN1=300, IN2=%IW0.0.1, IN3=100, the output
%QX0.3.0 is set to 1, since result of the comparison checks that IN1 IN2
IN3 holds true, that is, if the value of IN2 is greater than or equal to 100, or
if it is less than or equal to 300, %QX0.3.0 is set to 1.

C) LD confirmation using a simulator

www.ed.co.kr
The Basics of PLC

E. EQ (Equal to comparison)
Function Description

Input EN: If 1, the function is computed.


IN1: Value to compare
IN2: Value to compare
The number of inputs can be expanded to up to 8.
IN1, IN2,... must be the same type.
Output ENO: same as EN
OUT: the result of the comparison

A) Function
If the condition IN1 = IN2 = IN3... = INn (where n is the number of inputs)
holds true for the inputs, OUT becomes 1. If not, OUT becomes 0.

B) Program Application
If BCD_TO_INT function is executed when %IX0.0.0 is ON, and %QX0.3.0
becomes 1 only if IN3 (%IW0.0.1) within is 300.

LD confirmation using a simulator

www.ed.co.kr
The Basics of PLC

F. LE (Less than or equal to comparison)


Function Description

Input EN: If 1, the function is computed.


IN1: Value to compare
IN2: Value to compare
The number of inputs can be expanded to up to 8.
IN1, IN2,... must be the same type.
Output ENO: same as EN
OUT: the result of the comparison

A) Function
If the condition IN1 IN2 IN3... INn (where n is the number of inputs)
holds true for the inputs, OUT becomes 1. If not, OUT becomes 0.

B) Program Application
If BCD_TO_INT function is executed when %IX0.0.0 is ON, and %QX0.3.0
becomes 1 only if IN2 (%IW0.0.1) is between 100 and 300 inclusive.

www.ed.co.kr
The Basics of PLC

LD confirmation using a simulator

G. LT (Less than comparison)


Function Description

Input EN: If 1, the function is computed.


IN1: Value to compare
IN2: Value to compare
The number of inputs can be expanded to up to 8.
IN1, IN2,... must be the same type.
Output ENO: same as EN
OUT: the result of the comparison

A) Function
If the condition IN1 IN2 IN3... INn (where n is the number of inputs)
holds true for the inputs, OUT becomes 1. If not, OUT becomes 0.

www.ed.co.kr
The Basics of PLC

B) Program Application
If BCD_TO_INT function is executed when %IX0.0.0 is ON, and %QX0.3.0 be
comes 1 only if IN2 (%IW0.0.1) is between 101 and 299 exclusive.

C) LD confirmation using a simulator

www.ed.co.kr
The Basics of PLC

H. NE (Not equal comparison)


Function Description

Input EN: If 1, the function is computed.


IN1: Value to compare
IN2: Value to compare
The number of inputs can be expanded to up to 8.
IN1, IN2,... must be the same type.
Output ENO: same as EN
OUT: the result of the comparison

A) Function
If IN1 and IN2 is not compute to be equal, OUT becomes 1. If they are equal,
OUT becomes 0.

B) Program Application
If BCD_TO_INT function is executed when %IX0.0.0 is ON, and %QX0.3.0
becomes 0 only if IN2 (%IW0.0.1) is 300, and becomes "0" otherwise.

www.ed.co.kr
The Basics of PLC

C) LD confirmation using a simulator

www.ed.co.kr
The Basics of PLC

12) Function Block ( )

Since function block produces output accumulated through many scans, it requires
memory to hold the intermediate results during the computation. Consequently, instance
variable must declared for function block, similar to variables. Instance variable is the
collection of variables, and the most general types of function blocks are timer and
counter.
The user can creat function block and the created function block is added to
the collection of user functions.

(1) Basic Function Block Reference


Counter

NO Function Block Functions


1 CTU Up Counter
2 CTD Down Counter
3 CTUD Up Down Counter

Timer

NO Function Block Functions


1 TON On Delay Timer
2 TOF Off Delay Timer
3 TP Pulse Timer

www.ed.co.kr
The Basics of PLC

(2) Descriptions of basic function blocks and program usage


A. CTU
Up Counter
Function Description

Input CU: Input condition of Up Counter Pulse


R: Reset
PV: Preset Value
Output Q: Up Counter Output
CV: Current Value

A) Function
(a) When the pulse input CU changes from 0 to 1 (rising edge), the value of
CV is incremented by one.
(b) However, CV never exceeds the integer value of 32767.
(c) If the reset input R is set to 1, CV becomes 0, that is, it is cleared.
(d) Output Q gives 1 if CV is greater than PV.

B) Time Chart

R(Reset Input)
Maximum Coefficient (32767)
CU(Up Count Input)
PV (Preset Value)
CV(Current Value)

Q(Counter Output)

C) Program Example
(a) Since CTU is a function block, instance variable must be declared in order to
hold the intermediate results.

www.ed.co.kr
The Basics of PLC

(b) On declaration of a CTU instance variable in the program, theinstance


name.Qfor counter output Q, and instance name.CVcurrent value are
automatically created in this operation.
(c) Choose and select CTU from the windows of function block list.
(d) There is no restriction on the name of the variable, but use C1 for convenience
and leave other windows as default values.
(e) If rising edge pulse is introduced through the toggle switch 0(%IX0.0.0), the
current value of input increments.
(f) %QW0.0.2.0 on the right will show the current value as the output.
(g) If the current value exceeds 10, the counter Output (C1.Q) becomes 1 and the
lamp (%QX0.3.0) lights up.
(h) If the toggle switch 1(%IX0.0.1) is turned ON, the current value and the counter
output is resetted to become 0, "Zen".
(i) If the current value (C1.CV) goes out of range of between 0 and 9999, the
_ERR, _LER flags are turned on by the INT_TO_BCD function.
(j) In the program below, the outputs %QX0.3.0 and %QX0.3.1 perform the same
operation.
However, %QX0.3.1 show how the operation of the counter is driven by the
value of C1, Q.

www.ed.co.kr
The Basics of PLC

LD confirmation using a simulator

B. CTD
Down Counter
Function Description

Input CD: Input condition of Down Counter


Pulse
LD: Load Input
PV: Preset Value
Output Q: Down Counter Output
CV: Current Value

A) Function
(a) When the pulse input CD changes from 0 to 1 (rising edge), the value of CV
is decremented by one, where the smallest possible integer value CV is allowed to
take is -32768.
(b) If the load input LD is set to 1, the preset value in PV is loaded into CV.
(d) Output Q gives 1 if CV is less than or equal to 0.

www.ed.co.kr
The Basics of PLC

B) Time Chart

LD (Load Input)

CD (Down CountI nput)


PV
CV (Current Value) (Preset Value)

Q (Counter Output) Miinimum


Coefficient (-32768)

C) Program Example
(a) Since CTD is a function block, instance variable must be declared in order to
hold the intermediate results.
(b) On declaration of a CTD instance variable in the program, the variablesinstance
name Qfor counter output, andinstance name, CVfor current value are
automatically created in this operation.
(c) Declares the instance variable of (CTD (for Example, C2).
(d) Preset value is set to 10.
(e) On the initial pressing of %IX0.0.2, LD becomes 1 and PV(preset valve) is
loaded to current value.
(f) If rising edge pulse is introduced into CD by the toggle switch 0(%IX0.0.1), the
current value of input is decremented.
(g) If the current value is less than 0, the counter Output (C2.Q) becomes 1 and
the lamp (%QX0.3.0) lights up.
(h) If the toggle switch 1(%IX0.0.2) is turned ON, LD becomes 1 and the preset
value is loaded to CV again.

www.ed.co.kr
The Basics of PLC

LD confirmation using a simulator

C. CTUD
Up Down Counter
Function Description

Input CU: Up Counter Pulse Input


CD: Down Counter Pulse Input
R: Reset Input
LD: Load Value
PV: Preset Value
Output QU: Up Counter Output
QD: Down Counter Output
CV: Current Value

A) Function
(a) CTUD is a counter where the current value CV increments by one if the CU
goes from 0 to 1 and decrements by one if the CD goes from 0 to
1, where the current value CV must be between the integer values -32768
and 32767.
(b) If the load input contact LD becomes 1, the PV is loaded to current value CV.
(CV=PV)
(c) If 1 is asserted on the reset input R, the current value CV is cleared to 0.
(CV=0)

www.ed.co.kr
The Basics of PLC

(d) Output QU is set to 1 if CV is greater or equal to PV and QD is set to


1 if CV is less than or equal to 0.
(e) For each input signals, the operation is down in the order RLDCUCD,
and if multiple signals are asserted simultaneously, the only the one with the
highest priority is processed.

A) Time Chart

LD(Load Input)
R(Reset Input)
CU(Up Count Input)
CD(Down Count Input)
PV(Preset Value)
CV(Current Value)
QU(Count Up Output)
QD(Count Down Output)

C) Program Example
(a) Since CTUD is a function block, instance variable must be declared in order to
hold the intermediate results.
(b) On declaration of a CTUD instance variable in the program, the instance variables
automatically created:(instance name).QUfor the up count,(instance name).
QDfor down count, and(instance name).CVfor current value.
(c) Declares the instance variable of CTD(for Example, C3).
(d) Preset value is set to 10.
(e) If rising edge pulse is introduced into CU using the toggle switch %IX0.0.0, the
current value of input is increased.
(f) If rising edge pulse is introduced into CD using the toggle switch %IX0.0.1, the
current value of input is decremented.
(g) If the current value is greater than or equal to PV(preset value), C3, QU be
comes 1 and %QX0.3.0 is set to 1.

www.ed.co.kr
The Basics of PLC

(h) If the current value is less than or equal to 0, C3, QD becomes 1.


(i) If %IX0.0.2 is set to ON, the current value is cleared to 0.
(j) If %IX0.0.3 is set to ON, LD becomes 1 and the preset value is loaded
into the current value.

D. TON (ON Delay Timer)


Function Description

Input IN: Timer Activation Condition


PT: Preset Time
Output Q: Timer Output
ET: Elapsed Time

A) Function
(a) The time elapsed after IN became 1 is output to ET.
(b) If IN becomes before the ET reaches the preset time, ET is set to 0.
(c) If IN becomes 0 after Q becomes 1, Q is set to 0.

www.ed.co.kr
The Basics of PLC

B) Time Chart

IN

Q
PT
Preset Time

ET

C) Program Example
(a) Since TON is a function block, instance variable must be declared in order to
hold the intermediate results.
(b) On declaration of a TON instance variable in a program, variables are automati
cally created:(instance name).Q, for the timer output and(instance name).
ETfor elapsed time.
(c) Declare a instance variable for TON, for example named T1.
(d) Set the PT preset timer for T1 as 5 seconds (T#5S).
(e) If the activation switch %IX0.0.0 is turned ON, the elapsed time (T1.ET) is
displayed on the digital indicator.
(f) If the elapsed time T1.ET reaches 5 seconds, the timer output T1.Q becomes ON,
making the outputs %Q0.2.0 "1" and %Q0.2.1 0.
(g) After switching T1.Q ON, switching OFF the activation switch (%IX0.0.0)
makes T1.Q OFF.

www.ed.co.kr
The Basics of PLC

E. TOF (OFF Delay Timer)


Function Description

Input IN: Timer Activation Condition


PT: Preset Time
Output Q: Timer Output
ET: Elapsed Time

A) Function
(a) Asserting 1 for IN sets Q to 1 and the time elapsed since IN becoming 0
exceeds the time set in PT, Q becomes 0.
(b) The time elapsed since IN becoming 0 is output to ET.
(c) If IN becomes 1 before ET reaches the preset time, elapsed time is reset to 0.

B) Time Chart

IN

Q
PT
Preset
Time

ET

www.ed.co.kr
The Basics of PLC

C) Program Example
(a) Since TOF is a function block, instance variable must be declared in order to hold
the intermediate results.
(b) On declaration of a TON instance variable in a program, variables are automati
cally created:(instance name).Q, for timer output and(instance name).ETfor
elapsed time.
(c) Declare a TOF instance variable, for example named T2.
(d) Set the timer T2 to 3 seconds (T#3S).
(e) Setting the activation switch %IX0.0.0 to ON makes the timer output T2.Q
to become ON.
(f) Setting the activation switch %IX0.0.0 to OFF causes the elapsed time T2.ET to
be displayed on the digital indicator.
(g) If the elapse time T2.ET reaches the preset time of 3 seconds, timer output
T2.Q becomes OFF.

www.ed.co.kr
The Basics of PLC

F. TP (Pulse Timer)
Function Description

Input IN: Timer Activation Condition


PT: Preset Time
Output Q: Timer Output
ET: Elapsed Time

A) Function
(a) Asserting 1 for IN sets Q to 1 for the preset amount of time and goes back
to 0 when ET reaches PT.
(b) Elapsed time ET starts increment when IN becomes 1 and remains still once it
reaches PT until it is reset to 0 as IN becomes 0.
(c) Even if IN changes to 0 and back to 1, it will have no effect while ET
is being incremented.

B) Time Chart

IN

Q
PT
Preset Time PT

ET

C) Program Example
(a) Since TP is a function block, instance variable must be declared in order to hold
the intermediate results.

www.ed.co.kr
The Basics of PLC

(b) On declaration of a TP instance variable in a program, variables are automatically


created:(instance name).Q, for the timer output and(instance name).ETfor
elapsed time.
(c) Declare a TP instance variable for example named T3.
(d) Set the timer T3 to 3 seconds (T#3S).
(e) Setting the activation switch %IX0.0.0 to ON makes the timer output T3.Q
to become ON and stays that way for 3 seconds.
(f) Setting the activation switch to OFF has no effect while T3.ET is increasing.
(g) Timer output T3.Q becomes OFF after 3 seconds.

D) Program Example

13) Return ( )

[Return] is the command to terminate execution if encountered during the execution,


effectively blocking the execution of any statements to follow. (Shortcut key +
)

(1) Function Description


USE UOUSE

Choose from the toolbar.


Move the mouse cursor to the desired position in the LD program window and
left click.
USE KEY BOARD
Move the cursor to the location to return in the LD Program.
Choose Return from Toolbar in the menu (Shift-F7).

www.ed.co.kr
The Basics of PLC

(2) Programming Application


As shown below, execution will continue up to the [Return] mark on the second row.
Since encountering [Return] while executing terminates the execution, the statement in
row 2 is not executed.

14) Branch (JUMP) ( )

Jump is a way to go to the desired (labeled) location for branching in an LD


program. Destination is represented by a label. The jump in the main program must be
provided a label within main program as a input, and the jump in the subroutine do-
main can only branch to labels within the subroutine.
Program Example

Choose from the toolbar.


Move the mouse cursor to the desired position in the LD program window and
left click.

Double-click the icon and enter ABC for the label name.

www.ed.co.kr
The Basics of PLC

15) Subroutine (CALL) ( )

In LD program, the execution is terminated on encountering an END command.


However, there are cases when some program which exist after the END command must
be evoked, in which case the subroutine can be convenient.

Program Example
(1) Subroutine
Choose from the toolbar.
Move the mouse cursor to the desired position in the LD program window and
left click.
Choose and double-click the created subroutine LD and enter ABC as the
label name.

(2) END Command


Place the cursor at the last row of the program or desired row, for example row
2) and double-click.
In the Label / Rung Description / End of Main Program dialog box, select Show
the end of the main program.

(3) Label
Place the cursor at the location to be called after the END command and
double-click.
Choose the label in the Label / Rung Description / End of Main Program dialog
box.
Name the label as ABC in the Add Label dialog. (Maximum label length: 16
characters)

www.ed.co.kr
The Basics of PLC

(4) Program Description


The circuit shows how even if the contact of %I0.1.1 and %I0.1.2 activates, %Q0.2.0
can stay not active. This is because the call to the subroutine is located after the END
command and so the call does not occur.
In this circuit, if the %I0.0.1 contact activates, ABC is called by the subroutine, and
after %I0.1.1 and %I0.1.2 contact activates, the output %Q0.2.0 becomes active.

16) Time Chart for Operations

Arithmetic
Switch Input Result
(Assumption)

Normally Open Coil


Contact

Normally Reverse Coil


Closed Contact

Positive
1 scan Positive 1 scan
Transition
Transition
Detection
Detection Coil
Contact

Negative Negative
Transition 1 scan 1 scan
Transition
Detection Detection Coil
Contact

Input/Output Time Chart of Operations

www.ed.co.kr
The Basics of PLC

7-2. Sequence Operators

Category Command Symbol Function Description Notes


Normally
Open Contact operation A Contact
Contact
Normally
Closed Contact operation B Contact
Contact
Positive
Transition Contact on for I scan since
Detection rising edge
Contact
Negative
Transition Contact on for I scan since
Detection falling edge
Contact

Coil Computation Result Output

Computation Result Reverse


Reverse Coil
Output
Sequence Positive
Operators Transition Contact on for 1 scan since
Detection rising edge
Coil
Negative
Transition Contact on for 1 scan since
Detection falling edge
Coil

Setting Coil Computation result set output

Computation result reset


Reset Coil
output

Jump Jump to label

Terminate current program


on encountering RETURN
Program command
Termination Terminate current program
on encountering END
command

www.ed.co.kr
The Basics of PLC

7-3. List of Functions

Category Command Symbol Function Description Notes

Data transfer
Move
MOVE IN 1: data source (any type)
Function
OUT: data line (any type)

Data type conversion functions


IN 1: data source LINT
OUT: data line ULINT
Types of data type conversion LWORD
functions REAL
SINT_TO_INT and 14 others LREAL
INT_TO_SINT and 14 others Only
DINT_TO_SINT and 14 others GM1,GM
LINT_TO_SINT and 14 others 2 allowed
USINT_TO_SINT and 14 others for
UINT_TO_SINT and 14 others related
UDINT_TO_SINT and 14 others function
ULINT_TO_SINT and 14 others
BYTE_TO_SINT and 14 others
***_TO_*** WORD_TO_SINT and 14 others
DWORD_TO_SINT and 14
Conversion others
Functions LWORD_TO_SINT and 14
others
BCD_TO_SINT and 7 others
REAL_TO_SINT and 7 others
LREAL_TO_SINT and 7 others
STRING_TO_SINT and 18
others
NUM_TO_STRING
TIME_TO_UDINT and 2 others
DATE_TO_UINT and 2 others
TOD_TO_UDINT and 2 others
DT_TO_DATE and 2 others

Convert real numbers to


integers Only for
TRUNC IN 1: data source (REAL, GM1,GM
LREAL) 2
OUT: data line (DINT, LINT)

www.ed.co.kr
The Basics of PLC

Category Command Symbol Function Description Notes

Add function
ADD IN1 ~ IN8: operands (Any_INT)
OUT: result (Any_INT)

Subtract function
IN1: value to be subtracted from
SUB (Any_INT)
IN2: subtracting value (Any_INT)
OUT: result (Any_INT)

Multiply function
MUL IN1 ~ IN8: operands (Any_INT)
OUT: result (Any_INT)

Arithmetic Division (result)


Operation IN1: dividend (Any_INT)
Functions DIV
IN2: divisor (Any_INT)
OUT: result (Any_INT)

Division (remainder)
IN1: dividend (Any_INT)
MOD
IN2: divisor (Any_INT)
OUT: remainder (Any_INT)

Exponential function
Only for
IN1: base (Any_REAL)
EXPT GM1,GM
IN2: exponent (Any_REAL)
2
OUT: result (Any_REAL)

Absolute value
ABS IN1: integer (Any_INT)
OUT: result (Any_INT)

www.ed.co.kr
The Basics of PLC

Category Command Symbol Function Description Notes

Square root Only for


SQRT IN1: operand (Any_REAL) GM1,GM
OUT: result (Any_REAL) 2

Natural logarithm Only for


LN IN1: operand (Any_REAL) GM1,GM
Arithmetic OUT: result (Any_REAL) 2
Operation
Functions Common logarithm Only for
LOG IN1: operand (Any_REAL) GM1,GM
OUT: result (Any_REAL) 2

Natural exponential function Only for


EXP IN1: operand (Any_REAL) GM1,GM
OUT: result (Any_REAL) 2

Sine Only for


SIN IN1: operand (Any_REAL) GM1,GM
OUT: result (Any_REAL) 2

Cosine Only for


COS IN1: operand (Any_REAL) GM1,GM
OUT: result (Any_REAL) 2

Tangent Only for


Trigonometric TAN IN1: operand (Any_REAL) GM1,GM
Functions OUT: result (Any_REAL) 2

Arch sine Only for


ASIN IN1: operand (Any_REAL) GM1,GM
OUT: result (Any_REAL) 2

Arch cosine Only for


ACOS IN1: operand (Any_REAL) GM1,GM
OUT: result (Any_REAL) 2

www.ed.co.kr
The Basics of PLC

Category Command Symbol Function Description Notes

Arch tangent Only for


Trigonometric
ATAN IN1: operand (Any_REAL) GM1,GM
Functions
OUT: result (Any_REAL) 2

Bit shift left


IN: data source(Any_BIT)
SHL
N: number of bits to shift (INT)
OUT: data line (Any_BIT)
Shift
Functions
Bit shift right
IN : data source(Any_BIT)
SHR
N : number of bits to shift (INT)
OUT: data line (Any_BIT)

Bit rotate left


IN: data source(Any_BIT)
ROL
N: number of bits to rotate (INT)
OUT: data line (Any_BIT)
Rotate
Functions
Bit rotate right
IN: operand (Any_BIT)
ROR
N: number of bits to rotate(INT)
OUT: data line (Any_BIT)

Logical AND
AND IN1 ~ IN8: operand (Any_BIT)
OUT: result (Any_BIT)

Logical
Operators

Logical OR
OR IN1 ~ IN8: operand (Any_BIT)
OUT: result (Any_BIT)

www.ed.co.kr
The Basics of PLC

Category Command Symbol Function Description Notes

Exclusive OR
XOR IN1 ~ IN8: operand (Any_BIT)
OUT: result (Any_BIT)
Logical
Operators

Logical Negation
NOT IN1, IN2: operand (Any_BIT)
OUT: result (Any_BIT)

Select from 2
G : output selector (BOOL)
IN1: value to be chosen when
SEL G is off (Any)
IN1: value to be chosen when
G is on (Any)
OUT: output value (Any)

Maximum
IN1~IN8: candidate values
MAX
(Any_NIT)
OUT: maximum value (Any_INT)
Selection
Functions
Minimum
IN1~IN8: candidate values
MIN
(Any_NIT)
OUT: minimum value (Any_INT)

Lower and upper bound


MN: lower bound (Any_NIT)
LIMIT IN : data source (Any_INT)
MX: upper bound (Any_NIT)
OUT: output value (Any_INT)

www.ed.co.kr
The Basics of PLC

Category Command Symbol Function Description Notes

Select one of 7 values


K: selector value
IN0: data source 0 (Any)
IN1: data source 1 (Any)
Selection IN2: data source 2 (Any)
MUX
Functions IN3: data source 3 (Any)
IN4: data source 4 (Any)
IN5: data source 5 (Any)
IN6: data source 6 (Any)
OUT: output value (Any)

Comparison function
IN1 ~ IN8: data to compare
(Any)
GT(>)
OUT: output (BOOL)
If IN1>IN2>...IN7>IN8 is
satisfied, OUT is set to ON

Comparison function
IN1 ~ IN8: data to compare
(Any)
GE()
OUT: output (BOOL)
If IN1IN2...IN7IN8 is
satisfied, OUT is set to ON
Comparison
Functions
Comparison function
IN1 ~ IN8: data to compare
(Any)
EQ()
OUT: output (BOOL)
If IN1IN2...IN7IN8 is
satisfied, OUT is set to ON

Comparison function
IN1 ~ IN8: data to compare
(Any)
LE()
OUT: output (BOOL)
If IN1IN2......IN7IN8 is
satisfied, OUT is set to ON

www.ed.co.kr
The Basics of PLC

Category Command Symbol Function Description Notes

Comparison function
IN1 ~ IN8: data to compare
(Any)
LT(<)
OUT: output (BOOL)
If IN1<IN2<...<IN7<IN8 is
satisfied, OUT is set to ON
Comparison
Functions
Comparison function
IN1 ~ IN8: data to compare
(Any)
NE()
OUT: output (BOOL)
If IN1IN2 is satisfied, OUT is
set to ON

String length
LEN IN1: input string (STRING)
OUT: string length (INT)

Extract substring from the left


IN: input string (STRING)
LEFT
L: length to extract (INT)
OUT: string output (STRING)

String
Functions Extract substring from the right
IN: input string (STRING)
RIGHT L: length to extract (INT)
OUT: string output (STRING)

Extract substring from the


middle
IN: input string (STRING)
MID
L: length to extract (INT)
P: start position (INT)
OUT: string output (STRING)

www.ed.co.kr
The Basics of PLC

Category Command Symbol Function Description Notes

String concatenation
Sequentially concatenates the
input strings
CONCAT
IN1 ~ IN8: input strings
(STRING)
OUT: string output (STRING)

Insert string
IN1: string input (STRING)
INSERT IN2: string to insert (STRING)
P: insert position (INT)
OUT: string output (STRING)

Delete string
IN1: string input (STRING)
DELETE L: string to delete (INT)
String P: delete position (INT)
Functions OUT: string output (STRING)

Replace string
IN1: string input (STRING)
IN2: string to be replaced with
REPLACE
(STRING)
P: replace position (INT)
OUT: string output (STRING)

Find string
IN1: string input (STRING)
FIND
IN2: search string (STRING)
OUT: string output (INT)

www.ed.co.kr
The Basics of PLC

Category Command Symbol Function Description Notes

Time Addition
IN1: Time of day or time
(TIME, TOD, TD)
ADD_TIME
IN2: Time to subtract (TIME)
OUT: Result time of day or time
(TIME, TOD, TD)

Time Subtraction
IN1: Time of day or time
(TIME, TOD, TD)
SUB_TIME
IN2: Time to subtract (TIME)
OUT: Result time of day or time
(TIME, TOD, TD)

Date Subtraction
IN1: Date (DATE)
SUB_DATE IN2: Date to subtract (DATE)
OUT: Result Time(TIME)
Date and
Time
Functions
Time of Day Subtraction
IN1: Time of day (TIME OF
DAY)
SUB_TOD
IN2: Time of day to subtract
(TIME OF DAY)
OUT: Result Time(TIME)

Date & Time Subtraction


IN1: Time of day (DATE&TIME)
SUB_DT IN2: Time of day to subtract
(DATE&TIME)
OUT: Result Time (TIME)

Time Multiplication
IN1: Input Time(TIME)
MUL_TIME
IN2: Multiplier (INT)
OUT: Result Time(TIME)

www.ed.co.kr
The Basics of PLC

Category Command Symbol Function Description Notes

Time Division
IN1: Input Time(TIME)
DIV_TIME
IN2: Divisor (INT)
OUT: Result Time (TIME)
Date and
Time
Functions
Concatenate date and time
IN1: Input date(DATE)
CONCAT_
IN2: Input time of dat (TOD)
TIME
OUT: Result Date Time (DT)

Block interrupt
DI REQ: Request for block (BOOL)
OUT: Confirm block (BOOL)

Allow interrupt
REQ: Request for allowance
EI
(BOOL)
OUT: Confirm allowance (BOOL)

Request PLC stop


STOP REQ: Requet for stop (BOOL)
OUT: Confirm stop (BOOL)
System
Control
Request PLC emergency stop
Functions
ESTOP REQ: Requet for stop (BOOL)
OUT: Confirm stop (BOOL)

Input Data Immediate Update


BASE: Base module number
SLOT: Input module slot
position
MASK_L: Select bits not for
update from the lower 32 bits GM5
DIREC_IN
(DWORD) excluded
MASK_H: Select bits not for
update from the upper 32 bits
(DWORD))
OUT: Execution complete
(BOOL)

www.ed.co.kr
The Basics of PLC

Category Command Symbol Function Description Notes

Input Data Immediate Update


MODL: Input module number
Only for
DIREC_IN5 MASK: Select bits not for
GM5
update from the lower 32 bits
(DWORD)

Output Data Immediate Update


BASE: Base Module Number
SLOT: Output module slot
position
MASK_L: Select bits not for
update from the lower 32 bits GM5
DIREC_O
(DWORD) excluded
MASK_H: Select bits not for
update from the upper 32 bits
System (DWORD)
Control OUT: Execution Complete
Functions (BOOL)

Output Data Immediate Update


MODL: Output Module Number
MASK: Select bits not for
Only for
update from the 32 bits
DIREC_OUT5 GM5
(DWORD)
OUT: Execution Complete
(BOOL)

Watch Dog Timer Reset


REQ: Reset Command (BOOL)
WDT_RST
OUT: Execution Complete
(BOOL)

www.ed.co.kr
The Basics of PLC

7-4. List of Function Blocks

Category Command Symbol Function Description Notes

On Delay Timer
IN: Activation signal (BOOL)
TON PT: Preset Time (TIME)
Q: Output (BOOL)
ET: Current Value

Off Delay Timer


Timer IN: Activation signal (BOOL)
Function TOF PT: Preset Time (TIME)
Blocks Q: Output (BOOL)
ET: Current Value

Pulse Timer
IN: Activation signal (BOOL)
TP PT: Preset Time (TIME)
Q: Output (BOOL)
ET: Current Value

Up Timer
CU: Pulse Input (BOOL)
R: Current Value Reset (BOOL)
CTU
PV: Preset Value (INT)
Q: Output (BOOL)
CV: Current Value (INT)
Counter
Function
Blocks
Down Counter
CD: Pulse Input(BOOL)
LD: Preset Value Read (BOOL)
CTD
PV: Preset Value (INT)
Q: Output (BOOL)
CV: Current Value(INT)

www.ed.co.kr
The Basics of PLC

Category Command Symbol Function Description Notes

Up-Down Counter
CU: Up Pulse Input (BOOL)
CD: Down Pulse Input (BOOL)
R: Current Value Reset (BOOL)
LD: Load Value Read(BOOL)
CTUD
PV: Preset Value(INT)
QU: Up Count Output (BOOL)
Counter QD: Down Count Output
Function (BOOL)
Blocks CV: Current value (INT)

System Resource Control


(Semaphore)
CLAIM: Claim Resource (BOOL)
SEMA RELEASE: Release Resource
(BOOL)
BUSY: Resource Unavailable
(BOOL)

Priority Set (Bistable)


S1: Set Signal (BOOL)
SR
R: Reset Signal (BOOL)
Q1: Output (BOOL)

Priority Reset (Bistable)


S: Set Signal (BOOL)
RS
R1: Reset Signal (BOOL)
Function Q1: Output (BOOL)
Blocks

Detect rising edge


R_TRIG CLK: Input(BOOL)
Q: Output (BOOL)

Detect falling edge


F_TRIG CLK: Input(BOOL)
Q: Output (BOOL)

www.ed.co.kr
The Basics of PLC

Chapter 8. Basic Sequence Circuits

8-1. AND Circuit


Circuit which produces output only when all of the multiple inputs are on is called
the AND circuit and it is similar to series switch circuit.
[Figure 8-1] shows how the relay coil R is excited(magnetized) and the contact closes
to light the lamp only when both A and B are ON.
This kind of series circuit can be used to equip a press machine with a safety feature,
by preventing from operating unless all the operators have there push buttons pressed. It
can also be used in situation where all part of the machine needs in place in order to
move on to the next action and has many other applications.

Input Output
A B R
0 0 0
0 1 0
1 0 0
1 1 1

(a) Relay Circuit (b) Time Chart (c) Truth Table


[Figure 8-1] AND Circuit

www.ed.co.kr
The Basics of PLC

8-2. OR Circuit
OR circuit produces a output if any one of its inputs is on, and is also refered to as
parallel circuit.

As shown in [Figure 8-2], relay R is activated to illuminate the lamp, if push button
A is pressed or B is pressed, or if they are both pressed.

Input Output
A B R
0 0 0
0 1 1
1 0 1
1 1 1

(a) Relay Circuit (b) Time Chart (c) Truth Table


[Figure 8-2] OR Circuit

www.ed.co.kr
The Basics of PLC

8-3. NOT Circuit


NOT circuit reverses the inputs state, producing 0 for output if the input is 1, and 1
if the input is 0. It is also called a inverter.
Shown in [Figure 8-3] is a NOT circuit using the b contact of the relay, where the
lamp stays on if the push button A is not pressed, and lamp goes off if A is pressed.

Input Output
A R
0 1
1 0

(a) Relay Circuit (b) Time Chart (c) Truth Table

[Figure 8-3] NOT Circuit

www.ed.co.kr
The Basics of PLC

8-4. Self Holding Circuit


It has already been mentioned that the relay can be used for memory. Relay can store
information by composing a Self Holding circuit with its contact. [Figure 8-4] shows a
Self Holding circuit of a relay, where Self Holding contact R(1) is connected parallel to
the push button switch PB1.
When push button switch PB1 is pressed, relay is activated and the contacts R(1) and
R(2) close to illuminate the lamp. Here, even if push button switch PB1 is released,
current flows through R(1) and PB2 to the coil, sustaining the active state. In other
words, even if PB1 put back to its original state, the circuit to operate R is preserved
by the contact R(1).
The Self Holding is released by pressing the push button switch PB2, which recovers
R, and contact R(1) and R(2) opens to reset the circuit to its original state.

[Figure 8-4] Self Holding Circuit

www.ed.co.kr
The Basics of PLC

8-5. Interlock Circuit


Interlock circuits use contact to indicate the active state of a device, preventing oper-
ation of related devices, in order to protect the device and its user. Interlock circuit is
also called priority circuit or operation prevention circuit.
Interlock forms a series circuit between contact b and the subject circuit to prevent
other relays from operating if any one of the circuit is active.
As shown in [Figure 8-5], as R1 relay becomes active after the push button switch
PB1 becomes ON, R2 cannot operate even if PB2 is pressed. Also, if PB2 is asserted
first, causing R2 to become active, R1 cannot become active.

prohibit

[Figure 8-5] Interlock Circuit

www.ed.co.kr
The Basics of PLC

www.ed.co.kr
The Basics of PLC

8-6. On-Delay Circuit


Rather that producing output immediately for asserted inputs, an on-delay circuit is de-
signed to wait predetermined amount of time, delaying the output. There are two types
of delay circuits, which are the ON time delay circuits and OFF time delay circuits.
[Figure 8-6] show a ON time delay circuit, in which the timer contact closes and lamp
goes up, when the predetermined amount of time has past after the push button switch
PB1 is pressed, and if push button switch PB2 is pressed, time relay is reset and lamp
goes off immediately.

(a) Circuit Diagram (b) Time Chart

[Figure 8-6] On-Delay Circuit

www.ed.co.kr
The Basics of PLC

8-7. Off-Delay Circuit


In an off-delay circuit, a return signal does not resets the output immediately, but
waits a predetermined amount of delay. It can be configured by using the b contact on
an ON delay timer, or by using the contact a of an OFF delay timer.
In [Figure 8-7] is an example of OFF delay circuit, where the lamp comes on if the
push button switch PB1 is pressed, and the lamp goes off after being delayed for a pre-
determined amount of time from pressing of PB2.

(a) Circuit Diagram (b) Time Chart


[Figure 8-7] Off-Delay Circuit

The next LD program created by GMWIN representing another method using OFF de-
lay timer.

www.ed.co.kr
The Basics of PLC

8-8. One Shot Circuit (Mona stable)


This kind of circuit is made active by such means as push button switch, and returns
to its original state by itself, after a certain amount of time.
[Figure 8-8] shows an example of this circuit, where the relay coil R1 becomes
activated and the lamp becomes lit, when the push button switch PB1 is pressed, and at
the same time the timer starts working. When the timer expires, the timer contact b
opens, causing the lamp to go off. This kind of circuit has many applications such as
doorstep light.

(a) Circuit Diagram (b) Time Chart


[Figure 8-8] One Shot Circuit

www.ed.co.kr
The Basics of PLC

< Appendix > Glossary

Term Definition Notes


CPU
module
power
A standardized component of a system, similar to I/O
Module module,
board assembled to be inserted at the base.
I/O
module,
etc.
Unit is the module or the collection of modules, which
forms the smallest unit of component of a PLC system, Basic unit,
Unit
and connects to other modules or collections of modules to added unit
form the PLC system.
System composed of PLC and peripherals, which is
PLC System
configured to enable controlling by user programs.
A mode of restarting a PLC system or a user program
where all data (variables such as I/O image area, internal
Cold Restart
registers, timer, counter, etc. and program) is automatically
or manually reset to predetermined state.

Warm Based on the feature to alert the program power off event,
Restart resetting data and user program in a predetermined way.

Restarting after the maximum allowed time after power off


Hot Restart has elapsed, with all data restored to the previous state by
the PLC system.
I/O Image Area of memory in the CPU module used for preserving
Area the input and output status.

Watchdog Timer to watch the program execution, generating an alert


Timer if it exceeds the time limit.

Computational unit which outputs the result of arithmetic (+,


Function -, , ) or comparison operations immediately, instead of
storing the result.

Function Computational unit which retains the internal result of timer,


Block counter, etc. through multiple scans.

%IX0.0.2
Direct Variable which does not require declaration of name or %QW1.2.1
Variable type. %I, %Q, %M area belong to this class. %MD1234,
etc

www.ed.co.kr
The Basics of PLC

Term Definition Notes

Variables which the user provides information such as the


name and the type in the declaration.
Named If variables are declared as SWITCH0 = %i0.0.2 and
Variable 'RESULT=%MD1234, the variables can be accessed by
the respective names SWITCH0 and 'RESULT, instead
of %IX0.0.2 or %MD1234.

Load for GLOFA-GM series, which provides functions such


GMWIN
as program development, edit, compile, and debugging.

Current starts to flow from the switch to the PLC input


Sink Input
terminal when the input signal becomes ON.

Current starts to flow from PLC input terminal to the switch


Source Input
when the input signal becomes ON.

Sink Current starts to flow from load to output terminal when


Output the PLC output contact becomes ON.

Source Current starts to flow from output terminal to load terminal


Output when PLC output terminal becomes ON.

Download Choose Upload Program when program is written to PLC.

Choose Project - Load from PLC from the menu.


Create project, program file, and user library after loading
the upload file from PLC, and open the project.
Upload
If GMWIN already has a project or a program with the
same name, it can be overwritten or the user can choose
a different directory or file name.

Variables declared in resource global variables can be


Resource used in any program within the resource. Variables which
Global will be shared between program should be placed here.
Variables In order to use this class of variables in a program, the
variable must be declared VAR_EXTERNAL as its type.

Debugging is the process of finding and fixing bugs in the


Debugging
user program, to make it operate correctly.

www.ed.co.kr
The Basics of PLC

Term Definition Notes

Among the programs in the project, compile only the


Make programs which need to be compiled, and generate an
executable file.

Variable holds data values used in programs. Variables


Variable represent variable elements such as PLC inputs and
outputs, memory state, etc.

An instance is the collection of variables used in a function


block. Function blocks must keep output values, as well as
Instance
variables for internal use, requiring a certain amount of
memory, and this block of memory is called the instance.

Configuration is a single PLC system. A PLC system


consists of base and CPU module, I/O module, special
Configuration module. etc. Usually, one PLC system has one CPU
module. GM1 allows up to 4 CPU modules to be installed
on a single PLC system.

Among the variables declared in programs, global variables, I,


Q, M area, and system flags, variables of type BOOL can be
Time Chart monitored of the ON/OFF states, in regards to time. non-BOOL
type variables can be monitored using variable monitoring
described above.

A task is the condition for program execution. Task


Task definition includes the program execution condition and
priority assignment.

www.ed.co.kr
www.ed.co.kr

CH1. Introduction of ED-4260 PLC Trainer / 135

CH2. Usage of ED-4260 / 140

CH3. Option Modules / 156


ED-4260 PLC Trainer

Chap. 1 Introduction of ED-4260 PLC Trainer

1-1. Introduction of ED-4260


PLC Trainer ED-4260, is an advanced Programmable Logic Controller Trainer, de-
signed to develop good logic working knowledge of programmable controllers with con-
centration on relay ladder logic techniques and how PLC is connected to external com-
ponents in an operating control system. The primary parts of PLC unit, one demon-
stration frame, input and output modules, and one power supply unit. Especially, since
the PLC trainer can set various input and output conditions with various simulation
modules including options, it allows real training on automatic system such as FMS.
On the demonstration frame of the ED-4260 PLC trainer, three input and output mod-
ules are installed. It basically consists of input module (IM-4260-2) with digital input
interfaced, output module (OM-4260-3) for digital monitoring, and simulation module
(PM-4260-4) for rotational motion and linear motion.
The demonstration frame has 32 input points and 32 output points each. They are
connected to 2 input units of and 2 output units of PLC on the frame, various option
units, and option modules for input and output simulation can be installed.

www.ed.co.kr
ED-4260 PLC Trainer

1-2. Basic Components of ED-4260 PLC Trainer


1) PLC unit (GLOFA-GM4) components
1 power unit
1 CPU unit
2 input units (16 Points)
2 output units (16 Points)
1 PLC base (8 slots)

2) Demonstration system (DS-4260-1) components


1 input module (IM-4260-2)
1 output module (OM-4260-3)
1 position control module (PM-4260-4)
1 power supply module (PS-4260)
1 demonstration frame (64 I/O terminals)

3) Accessories
1 set of connecting cord (4)
1 AC power cord
1 RS-232C cable
2 set of 25pin connecting cable
1 training manual

www.ed.co.kr
ED-4260 PLC Trainer

1-3. Option System


1) PLC unit (GLOFA-GM4) options
Analog input unit (4260-AD)
Analog output unit (4260-DA)
High speed counter unit (4260-HSC)
Position selection unit (4260-POS)
PID control unit (4260-PID)
Temperature change (thermocouple) unit (4260-TC2)

2) Demonstration system (DS-4260-1) options


A/D converter module (AD-4260-5)
D/A converter module (DA-4260-6)
Power & terminal transfer unit (PT-4260-7)
Potentiometer & meter unit (PM-4260-8)
Temperature sensor module (SU-4260-9)
Photo control circuit (PC-4260-10)
Emergency switch unit (ES-4260-11)
3 relay units (RL-4260-12)
Signal input switch unit A (AS-4260-13)
Signal input switch unit B (BS-4260-14)
Buzzer & lamp unit (BL-4260-15)
Electric distributor unit (EM-4260-16)
Rotary encoder unit (RE-4260-17)
Signal input switch unit C (PS-4260-18)
Extension In/Out unit (ED-4230-5)

www.ed.co.kr
ED-4260 PLC Trainer

1-4. ED-4260 Specifications


1) PLC unit specifications
< PLC Type : GLOFA-GM4 >
Category Specifications
Stored program, repeat computing, periodical computing,
Control type
Interrupt computing
I/O control type Synchronous scan process (Direct I/O function)
LD(Ladder Diagram), IL(Instruction List), SFC(Sequential
Program language
Function)
Operator: LD(13), IL(21), 109 basic functions
Language
composition 11 basic function blocks, function block for special module
Operator: 0.2s/command basic function, basic function block:
Computing speed
0.2s/step
Program memory 128kbytes (32k step)
Max. I/O point 512 point for16-bit module, 1024 point for 32 bit module
Direct Variable : 2~16kbytes (setting by parameter)
Data memory
Symbolic variable : 52kbytes (explicit variable boundary)
Unlimited (symbolic variable per 1 point: 20 bytes)
Timer
Time range: 0.001sec~4294967.295sec(1,193hrs)
Unlimited (variable 1 point : 8bytes)
Counter
Counting range : 32,768~32,767
Operation mode RUN, STOP, PAUSE, DEBUG
Data recovery when
Static data in declaring variable as retain
power failure
Program blocks 180 block
Scan: unregistered program as a task program
32 Periodical tasks, 8 external contact
Programs (tasks)
tasks, 16 internal contact tasks
3 initial tasks (_INIT, _H, _INIT, _ERR, _SYS)
Watch dog, memory error, I/O error, battery error, power error,
Self diagnostics
etc..
Restart mode Cold, warm, hot restart
Communication
Network functions with FMM and FSM Module
network
Base slots 8 slots (except for power and CPU Module)
Operation
Temperature: 0~40, RH: 20~80%
environment
Input voltage AC 220V, 60Hz / DC 24V
PLC Unit Size 438(W) 159(H) 140(D)mm

www.ed.co.kr
ED-4260 PLC Trainer

2) Demonstration system specification


< DS-4260 >

Category Specification
Voltage: 0~24V (Continuous variable), 24V(fixed)
Current : 2A (MAX)
Regulation : 0.02% 1mV
DC OUTPUT Ripple : 0.02% 2mV
Voltmeter : DVM 3 digits
Current meter: AAM
DC output protection: current protector
Voltage: 220V (fixed)
Current: 1A (Max.)
AC OUTPUT Terminal: safe connector type
Circuit protection: electronic excessive current shutoff (Reset )
Voltmeter: DVM 3 digits
16 toggle Switches : (input selectable) 4 terminal output
2 push button Switches
Input control signal
1 2-way switch
(With Input Module)
4 digital switch, 1set of 25pin connector
2 HSC Pulses, 1 stepping Motor control pulse
16 lamps for DC 24V 8
2 lamps for DC 24V 16
Output device
Output Simulation 1 set of binary counter 4digits
(With Output Module 1 buzzer for DC 24V
& Simulator Module)
1 stepping motor
2 DC motors
32-bit input, 8 COMs
I/O terminal
32-bit output, 8 COMs
Input voltage AC 220V 50/60Hz
Modules Number 3 basic module
Module Size 250(W) 65(H) 166(D)mm
System Size 760(W) 352(H) 437(D)mm
Weight (System) 34 kg

www.ed.co.kr
ED-4260 PLC Trainer

Chapter 2. Usage of ED-4260

2-1. The Demonstration Frame


As explained in the manual, the use and application on the demonstration frame of
ED4260, various input and output simulation modules connected to the PLC for training,
and auxiliary training modules except for the PLC unit are explained in [Figure 2-1].
Explanation on the PLC unit is provided in GLOFA-GM4 separately.

Power Supply Module PLC Unit

Input Control Position Control Output Monitor Demonstration


Module Module Module Frame

[Figure 2-1] Basic components of ED-4260

The demonstration frame is basically equipped with one PLC input control module
(IM-4260-2), one output monitor module (OM-4260-3), and one position control module
(PM-4260-4). Also, it includes power supply module for input and output control.
Although the PLC unit has one power supply unit, that is only for circuit operation of
each unit in PLC.

www.ed.co.kr
ED-4260 PLC Trainer

1) Circuit components of PLC I/O unit and frame terminal

In [Figure 2-3], the PLC consists of one I/O unit and one demonstration frame
terminal. The units after the power unit and the CPU unit that have PLC base slots as
in [Figure 2-2] are for installation of the I/O unit and various optional units. Each slot
has an assigned unique number. The unique numbers are the unique addresses for I/O of
all units.

I/O Unit slot

Extension Connector

[Figure 2-2] PLC base

In PLC trainer ED-4260, slot 0 and 1 are reserved for input unit, slot 2 and 3 are
for output unit. The rest of slots are for option units. The input & output of these units
should directly connect to the slots.
[Figure 2-4] shows connection circuit of the PLC input unit and the demonstration
frame terminal. The input terminal unique numbers for slot 0 are 1st 8 bits from 000 to
007 and the next 8 bit from 008 to 015, and all are 16 bits. Input unit addresses for
slot 1 are from 100 to 107 and from 108 to 115, that are 16 bits.
Note that COM port terminals are separated common terminals by 8 bits

www.ed.co.kr
ED-4260 PLC Trainer

PLC
PLC Power CPU Input
Unit Output
Unit Option Unit
Unit()
Unit (Internal) Unit (Slot 0~1) (Slot 2~3) (Slot 4~7)

Upper
Line : 000~007
: 000~007 Upper
Line : 100~107
: 100~107 Upper
:Line : 200~207
200~207 Upper: Line
: 300~307
300~307
Line
Lower : 008~015
: 008~015 Line
Lower : 108~115
: 108~115 :Line
Lower 208~215
: 208~215
Lower: Line
308~315
: 308~315

[Figure 2-3] Input / output terminals and numbers of demonstration frame.

www.ed.co.kr
ED-4260 PLC Trainer

(Input Unit) (Input Unit)

(32 point)

* Perforated rectangle shows inputs terminals on demonstration frame

[Figure 2-4] Diagram of PLC input unit and connection of frame terminal

2) Usage of power supply


The power supply on PLC trainer ED-4260 provides power for the PLC training for
various input controls and for output simulation. The following explains output character-
istic of power supply.

(1) DC output
Output voltage: 0~24V (variable), 24V (fixed)
Ripple voltage: 0.02% + 2mV
Voltage regulation: 0.02% + 1mV
Output current: 0~2A (continuous variable)
Output protection: Constant current protector

(2) AC output

www.ed.co.kr
ED-4260 PLC Trainer

Output voltage: 220V


Output current: 1A Max
Output protection: Electronic excessive current shutoff (Resettable)
Output terminal: Safety connector type

[Caution]
Make sure not to contact any conductive objects to human body since the output of
AC is high voltage (220V), and must use a safe plug cord.
Also when connecting the power supply, make certain to turn off the switch.

AC/DC Voltage
Ammeter Voltmeter Display Selection AC O/L Overload
AC
Indication
RESET
Power Switch

PLC Power
Output Terminal
(220V)

DC Output
Current PLC
Adjustor Power Switch

Fixed 24V Output AC Power AC Output Terminal


DC Output
DC Output Terminal Switch 4 Safty Connector
Terminal
Voltage Adjustor

[Figure 2-5] Control panel of the power supply unit

www.ed.co.kr
ED-4260 PLC Trainer

3) COMMON Terminal of Input & Output.


The common terminal of the input or the output unit of PLC has one COM every
8-bit. COMs are separated from each other because input environments and output con-
trol component may be different. That is, in the case that there are inputs from different
power sources, there may be a case that a COM should not be shared commonly. Also,
among outputs, in the event that outputs connected to different power sources should be
controlled, COM. terminals should not be used. (a) and (b) of [Figure 2-6] show an ex-
ample of using input and output separate COMs. That is, although input unit has 16 bits
(000~015), on the other hand COMs. as shown in figure are separated by 8 bits. (a) of
the figure shows that different input powers from different input voltages are controlled,
and source power poles of COM. terminal are connected to opposite polarities.
And (b) in the figure explains that in the case that there are different AC and DC
power providing a load for output terminals, the same voltages are put together on
COM terminals.

To PLC Input To PLC Output

Frame
Terminal

(External Power)

Frame
(External Power) Terminal

To PLC Input To PLC Output


[Figure 2-6] Application circuit diagram of separated COM terminals

www.ed.co.kr
ED-4260 PLC Trainer

2-2. I/O Module and its Connection


1) Input module
Input module (IM-4260-2) that consists of 16 input control switches, 3 special purpose
control switches, and 1 digital switches(digit 4) allows input control training. The control
output of digital switch are connected to the input of PLC input unit by putting 25pin
connector of the control output of the digital to 25pin connector into the frame. This is
necessary when control the PLC input as a digital(Binary on BCD), in this case user
must select one input unit within slot 0 or 1. [Figure 2-7] shows an example of con-
nection between the digital switch on input module and the frame.

Input Connection

(25P
Output Connection
(25pin Connecting
) (25pin(25P
Connecting
Cable) )
Cable)

[Figure 2-7] Digital Input & Output Connection

www.ed.co.kr
ED-4260 PLC Trainer

As shown in [Figure 2-8], 4 digit 4 digital switches connected with 4 bits each to
0~3, 4~7, 8~11, and 12~15 respectively are controlled.

[Caution] When the digital output is connected to input of slot 0 with 25pin con-
nection cable, users can not use 000~015 terminal on demonstration frame at the same
time.

Digit-4 Digit-3 Digit-2 Digit-1

Digital
Digital
Switch


Intput
Module's
25pin
25pin Connector

Frame
Frame's
25pin Connector
25pin

PLC Unit
To PLC
Input Unit
[Figure 2-8] Circuit diagram of digital switch on input module

[Figure 2-9] shows the connection circuit of each 16-bit (0~15) toggle switch

Toggle Switch
4
4 Terminal
of Input Module
DC 24V DC 24V
(External Power) (External Power)
4 Terminal
4
of Frame

To PLC Input To PLC Input

[Figure 2-9] Circuit diagram of toggle switch of input module

www.ed.co.kr
ED-4260 PLC Trainer

The following is electric specifications of input unit of PLC unit (GLOFA-GM4) used
in ED-4260.
Model of Input unit G41-D22A
Input points 16 bits
Rated Input voltage DC 12/24V
Rated Input current DC 5/11mA
Operation voltage ON: higher than DC 9.5V
OFF: lower than DC 6V
Response time less than 10ms
Common type 8 bits/ 1 COM.
Input insulation Photo coupler
Internal current consumption Appox. 70mA with DC 5V

Digital Switch Output SPDT


(25 pin Connector) Switch Button Switch

Intput Digital
Switch(4Digit)

COM Terminal
COM
Button Switch
(0~7)
output terminal

COM Terminal
COM Input push button
(8~15) Switch and Terminal
(0~7)

Toggle Switch and


Input Terminal(8~15)
[Figure 2-10] Panel of Input module

www.ed.co.kr
ED-4260 PLC Trainer

2) Output module
An Output module (OM-4260-3) consists of 16 output monitor lamps, 2 special output
lamps, one alarm buzzer, and 4-digit LED display, and it allows output simulation for
PLC training. Each of 4-digit displays is independently connected to display BCD value,
The connection to digital display(7-segment) is that a 25pin connection cable is con-
nected to one of PLC output units as shown in [Figure 2-12]

Output Lamp

Output
Module's
4
4 Terminal
(External Power) (External Power)
Frame's
4
4 Terminal

To PLC Output Unit To PLC Output Unit

[Figure 2-11] Circuit connection of a load lamp of output module

Digit-4 Digit-3 Digit-2 Digit-1

LED Display
(BCD dfd
(Decoder Built in)

25pin Connector
25P
of Output Module

25pin
Frame
Connector
25P of Frame

PLC Unit
To PLC
Input Unit
[Figure 2-12] LED display circuit diagram of output module

www.ed.co.kr
ED-4260 PLC Trainer

[Figure 2-11] depicts that common lamp COMs are separated into COM1, which is
lamp 0~7 and COM2, which is lamp 8~15. Output load monitor lamps of Output mon-
itor module OM-4260-3 is for DC 24V.

Numeric LED displays (7-segment) as shown in [Figure 2-12] also are separated into
COM terminal 0~7 and 8~15 or connected to COM terminal in case of need. Things to
keep in mind is it seems that 4 bits as depicted in the figure is directly connected to
LED, but are displayed via BCD to 7 segment LED decoder.

The following are the electric specifications of output unit of PLC (GLOFA-GM4) on
ED-4260.
Model of Output unit G4Q-RY2A
Output points 16 Points
Rated load Voltage DC 24, AC 220V
Rated load Current Lower than 1A (with DC 24V)
Response time Less than 12ms
Common type 8 bits in 1 COM
Operation indication LED display
Surge protector Varistor
Internal current consumption lower than 100mA at DC 5V

www.ed.co.kr
ED-4260 PLC Trainer

Indication
Lamp Lamp Buzzer Input
Digital LED Display
(25pin)
Connector) (4 Digit)

COM
Terminal
Monitor
Load
(0~7)
Lamp(0~15)

COM Terminal

(8~15) Monitor
Input Terminal For
Lamp
Load Monitor Lamp

[Figure 2-13] Output module panel

www.ed.co.kr
ED-4260 PLC Trainer

2-3. Position Control Module


Position control module(PM-4260-4) consists of 2 DC motor, 1 stepping motor, and a
sensor system. These components have rotation motion and linear motion that allow
RPM control and position control on PLC.
Due to the fact that module in [Figure 2-14] performs mechanical motion and along
with detection of motion position by the sensor, it should not be put under an impact.

Sensor-2 DC Power
DC
Rotator
Output Terminal Input
Terminal
Rotator

DC Motor

Input Terminal

Sensor-1
Output
Terminal Stepping
Motor
A&B Phase

Input Terminal

Linear
Motion Linear
Motion
Input
Terminal
Rod
Guide

Linear Motion

Right Detection

Linear Motion Micro
Micro Switch-2
Switch-2
Movement

Linear
Motion MS-1
Left Detection Linear
Motion

Micro Switch-1 Output Terminal
Micro Switch-1 Motor MS-2

Output Terminal

[Figure 2-14] Components on the position control module panel

www.ed.co.kr
ED-4260 PLC Trainer

[Figure 2-15] shows components that comprise the rotation position control system
with the DC motor and the stepping motor on the position module. In (a) of [Figure
2-15], there are 2 sensors on the rotation disk. Of them, sensor1 is used for detection of
zero position, and the other one is for position constant sensor that can stop the motors
at a desired position. And (b) of the figure is a rotating system that can control the
RPM and position control by means of the stepping motor. The stepping motor in 2
phase is of position control accuracy up to 1.8/step. The sensor 3 in the rotation sys-
tem is for detecting 0 position which is initial position.

[Reference] The outputs of sensor 1~3 that are open collector type non-contact
switches, so be cautious of pole. The green collector should be connected
to (+) pole, the black should be connected to PLC input and com of
PLC input should be connected to (-) of power supply. In case of
using the sensor, make sure that DC 24V is provided for a DC power
input terminal located in middle of top in this module.

Rotator

(a) DC motor and the sensor system (b) Stepping motor and the sensor system
[Figure 2-15] Position control module and sensor component diagram

www.ed.co.kr
ED-4260 PLC Trainer

Specifications of the stepping motor.


Resistance 150/Phase 10%
Input voltage 24V
Current 0.16A/Phase
Phases 2 Phases
Step angle 1.8/Step
Inductance 55mH/Phase
Holding torque 1000 gfcm
Detent torque 40 gfcm
Rotor inertia 40 gcm

[Figure 2-16] shows the position control module for linear motion. One DC motor is
used, and 2 micro switches detect stop positions, on right and left.

[Note] This system has 2 limit switches on each end of right and left that prevent a
run-over of linear motion inside the module. Thus if over run, it automatically
stops.

Motor
Input

Greared Motor

Movement

Sensor-4 Out MS-1 MS-2 Sensor-5 Out

[Figure 2-16] Linear motion system diagram

www.ed.co.kr
ED-4260 PLC Trainer

Electrical specifications of the DC motor that does linear motion in the position con-
trol module are as follows.
Input voltage DC 24V
Input current Approx. 105mA
Field type Permanent magnet
Speed of Rotate 30 RPM (geared motor)

www.ed.co.kr
ED-4260 PLC Trainer

Chapter 3. Option Module

3-1. Analog/Digital Converter (AD-4260-5)


1) Introduction of AD-4260-5

In an automatic control system, there should be data signals and error values that in-
dicate the current status for control. These signals are obtained from temperature, pres-
sure density, speed, length, weight, and other factors. Change rate of these factors are
generally indicated as electric signal, which is either voltage or current, or electric
resistor. These signals are in the form of analog in the most cases, if you need an auto-
matic control with the PLC, you need an A/D converter that converts analog signal to
digital signal (binary or BCD).
In an ED-4260 PLC trainer, an A/D converter(4260-AD) for GLOFA-GM4 can be in-
stalled on the PLC unit as an option, but we will give an explanation on the usage of
AD-4260-5 module and PLC application training for better conversion.
Because the converter module has variable current source for an analog input signal
training, and also can change the reference voltage and clock frequency, digital output
rate control on an analog input and featuring training on difference of conversion time
are possible. The following is a list of features on A/D converter.
Resolution 8 bits
Conversion time Approx. 100s~1ms
Analog input 0~10V
Digital output level 5V0.2V (at TTL level)
Clock frequency Approx. 100kHz~1MHz
Access time 150ns
DC output (for analog input) 0~15V
Input power AC 220V

www.ed.co.kr
ED-4260 PLC Trainer

2) Usage of AD-4260-5

(1) Explanation on panel


[Figure 3-1] Converter AD-4260-5

Power ON/OFF switch


DC output DC output terminal for analog input
Fine DC 15V output fine adjuster
Coarse DC 15V output coarse adjuster
AC input Power input (AC 220V) terminal
Voltmeter Analog input level indication voltmeter
Analog input Analog input terminal
GND Analog input ground terminal
Chip selector switch
Read selection switch
Write selection switch

www.ed.co.kr
ED-4260 PLC Trainer

Interrupt switch
Digital output Digital output connector
Output LED 8-bit digital output indicator
CLOCK FREQ. Clock frequency variable
TP-1 Reference voltage test point

REF.-ADJ Reference voltage variable

[Figure 3-2] shows the connection between AD converter module and input of PLC
unit with 25pin input connection connector of the frame
In the figure, the A/D converter has 8 bits, whereas PLC unit has 16 point. So put
the A/D converter connector into first 8 point(0~7).

(2) Operation preparation


First, turn off the power switch, and connect AC 220V power from the AC
output terminal of power supply PS-4260 to the AC input terminal of the
AC-4260-5.
Connect and with a connection pin.
Set and switches from the center to the low
Position REF.ADJ adjuster at the center
Turn the CLOCK FREQ. Adjuster clockwise all the way.
Connect the digital output of AD-4260-5 and the input of ED-4260 frame with
a suitable cable as shown in [Figure 3-2].
In case of need, connect the a DC 15V output terminal for analog input and an
input analog terminal

www.ed.co.kr
ED-4260 PLC Trainer

[Figure 3-2] Connection of A/D converter AD-4260-5 to PLC

Output module can be selected for PLC output commensurate with the training
purpose. When you calibrate the output of the A/D converter, turn on the converter, set
analog input voltage, and adjust REF. ADJ. so that binary value on input voltage is
output. At this point, DC 0~15V output from this A/D converter can be used.

www.ed.co.kr
ED-4260 PLC Trainer

3-2. Digital/Analog Converter (DA-4260-6)

1) Introduction of DA-4260-6
Generally in an automatic system with PLC, depending on what it can control there
are a dynamic control type and non dynamic control type like a temperature control.
Both two controls are controlled with an electrical output, and their outputs are classified
as follows.
(1) ON/OFF output (switch control)
(2) Analog signal output
(3) Digital signal output

What we are trying to explain is you use the D/A converter to get analog signal from
the PLC since what the automatic control system controls is in need of electric analog
signal. To do this, it should be programmed to produce binary output from PLC, to
have analog output range in which is suitable for a control. Here we are explaining
DA-4260-6 module that allows the D/A conversion training and a way to do PLC appli-
cation training.
Since this converter module has the 8-bit binary switch in it that takes arbitrarily 8-bit
input, it takes binary manually and issues analog output accordingly. Also, the D/A con-
verter allows the V-REF of D/A converter to change analog output level rate to digital
conversion rate. The following is the electrical features of D/A converter, DA-4260-6.

Resolution 8 bits
Conversion time lower than 50s
Digital input level TTL level (H: approx. +5V)
Analog output 0~10V
Data switch 8 switches for digital input
Input power AC 220V

www.ed.co.kr
ED-4260 PLC Trainer

3) Usage of DA-4260-6

(1) Explanation on panel


[Figure 3-3] D/A converter DA-4260-6

Power Power ON/OFF switch


TP-1 Analog output TP of converter IC
TP-2 Reference voltage test point
REFERENCE Reference voltage variable
8 BINARY SWITCHes Digital input switch for training
BINARY OUTPUT Binary output terminal for training
8 LED INDICATORs 8 Digital input indication lamps
DIGITAL INPUT Digital input connector
METER RANGE 1.5V/15V meta range selection switch
GND Analog output ground terminal

www.ed.co.kr
ED-4260 PLC Trainer

Analog output Analog output terminal


Voltmetter Analog output level indicator
AC INPUT AC 220V input Power terminal

[Figure 3-4] shows the connection between the D/A converter module and the PLC
unit output with the 25pin frame connector. In the figure, D/A converter has 8 bits
whereas the output of PLC unit is 16 point. Thus, first 8 point (0~7 bit) of PLC output
are connected

(2) Operation preparation


Turn off the power switch and connect AC 220V power from power supply AC
output terminal on the frame to the AC input terminal of DA-4260-6.
Set the meter range switch on DA-4260-6 to 15V
Put Reference voltage adjuster in the middle

(3) Output adjuster


Connect 8 outputs of the converter binary switch and 8 binary inputs.
Turn on the power switch after placing the binary switches in "H".
Adjust analog output voltage with the reference knob to point 10 voltage.
Again, turn off the power switch for the converter, and disconnect the binary
switch output and digital input terminal.
Connect a suitable provided cable between the digital input of D/A converter
module and the 25pin connecter on ED-4260 frame as shown in [Figure 3-4].

www.ed.co.kr
ED-4260 PLC Trainer

[Figure 3-4] Connection D/A converter DA-4260-6 to the PLC

Input module is connected to the PLC input suitable for a training purpose. 8-bit digi-
tal input of D/A converter is connected to first 8 bits of the PLC unit(0~7).

www.ed.co.kr
ED-4260 PLC Trainer

3-3. Temperature Sensor Module (SU-4260-9)

1) Introduction of SU-4260-9
SU-4260-9 sensor training module detects temperature with the thermometer probe
along with the wheatstone bridge, have amplified output with the amplifier.
Also, the module emits heat, or cooling by internal fan that functions not only as
temperature source but also as the heater and cooling fan by connecting them externally
that allow temperature control training with the A/D converter and the PLC. [Figure
3-5] shows the control circuit of the heater and the cooling fan whose operation mode
is either a manual or automatic with the PLC. The following is electrical features of the
temperature sensor module.
Detection circuit Wheatstone bridge
Sensing range 1k~5k (bridge)
Temperature source Heater & cooler fan
Heater control Contact ON/OFF Type
Cooling control Contact ON/OFF Type
Sensor device Thermister probe
Input power AC 220V

Heater Control Cooler Control


Input Terminal Input Terminal

[Figure 3-5] Heater and cooling fan control circuit

www.ed.co.kr
ED-4260 PLC Trainer

2) Usage of SU-4260-9

(1) Explanation on panel

[Figure 3-6] Temperature sensor module SU-4260-9

AC input Power input terminal (AC 220V)


Balance Bridge balancing potentiometer
Amplifier connecting terminal Bridge output & amplifier input connection
Range Bridge measuring range selection switch
Meter Bridge balancing indicator
Output Temperature detecting output terminal
Cooler Cooler manual & automatic selection switch
Cooler control input terminal ON/OFF Cooling fan external input terminal
Temperature source Heater source for temp. probe

www.ed.co.kr
ED-4260 PLC Trainer

Heater Manual & automatic selection switch for heater


Heater control input terminal External ON/OFF input terminal for heater
Sensor input Thermistor probe input terminal

[Figure 3-7] depicts the connection of the temperature sensor module from which ana-
log output is issued to the PLC trainer, ED-4260, via the A/D converter. The 8-bit input
of A/D converter and 8-bit output of IM-4260-2 input module are connected to the input
unit, which is for preset comparative output. That is, since automatic control by temper-
ature controls temperature by detecting temperature, to be controlled at arbitrary temper-
ature, preset input is convenient.

[Figure 3-7] Temperature control circuit with temperature sensor module

(2) Operation preparation of SU-4260-9


Connect the output 4 of the bridge and input 5 of OP Amp.
Connect DC source terminal 2 and 3 of the bridge.
Set heater and cooler switch to the auto. Mode.

www.ed.co.kr
ED-4260 PLC Trainer

Set range switch to 1k.


Connect the thermistor probe to the sensor input terminal.
Connect the output of AC 220V to AC 220V input terminal of SU-4260-9 after
the switch of power supply module on ED-4260 is turned off.
Turn the power on, place the balance knob so that current indicator points to
0, and turn off the input power.

(3) Connection and operation preparation of A/D converter


Connect the output of SU-4260-9 and analog input of AD-4260-5.
Connect a suitable cable between digital output connector of AD-4260-5 and
25pin connector of the frame as shown in [Figure 3-7].
After connecting AC 220V from the power supply on the frame, repeat the
previous operation preparation 1 through 7 in 3-1-2.

(4) Control output connection


Connect the output terminal of the frame and the heater and cooler control input
terminal. (Figure shows connection between the output 300 of the PLC and
heater control input, and output 301 of the PLC and cooler control input.)
The value of preset can be issued as digital to control temperature by means of
the input module in concordance with the training purpose as shown in the
figure.

Notice that [Figure 3-7] displays a way of training. For your own sake, assign num-
bers to the PLC I/O module. In the figure, the preset input is connected to 008 ~ 015
of the PLC unit 1 via the frame terminal, and 8-bit output of temperature detecting
module is connected to bit 100 through 107 of PLC unit 2 via the 25pin connector.

www.ed.co.kr
ED-4260 PLC Trainer

3-4. Photo Control Circuit (PC-4260-10)

1) Introduction of PC-4260-10

The photo control module can control the brightness of the lamp. It allows automatic
brightness control circuit configuration with the arbitrarily value set since it has the de-
tecting sensor.
Since control input and output to the training module are analog signal, A/D converter
and D/A converter are needed to control signals as shown in [Figure 3-8].

D/A Converter A/D Converter

(Brightness (Brightness
Control) Detection)

[Figure 3-8] PC-4260-10 module and PLC control diagram

[Note] If there is a 4260-DA or a 4260-AD on the PLC unit (GLOFA-G4) that can
be installed on D/A converter and A/D converter, you may use them. You should be fa-
miliar with these converters before using them. The following is a list of electrical fea-
tures of the photo control SCR circuit.

Control input DC 0~10V


Load control range Max. 10W (10W Lamp)
Load input voltage 220V or 110V
Brightness detecting device CDS
Control type Load voltage phase angle control with the SCR
Input power AC 220V

www.ed.co.kr
ED-4260 PLC Trainer

2) Usage of PC-4260-10
(1) Explanation on panel

[Figure 3-9] Photo control SCR module PC-4260-10

DC 0~10V Brightness control input terminal


AC 220V input AC power input terminal
Photo coupler Photo combination device
J3 (TP) Photo transistor output test point
J6 and J7 2 poles terminal(Both side of Load)
A bulb and a socket 10W bulb or other connecting socket
J12 or J13 ON/OFF switch terminal
CdS Surrounding brightness detecting sensor
CdS Terminal Brightness detecting output terminal
(CdS resister change output)
J5 (TP) SCR gate input test point

www.ed.co.kr
ED-4260 PLC Trainer

[Figure 3-10] shows the connection of the D/A converter and the A/D converter along
with the photo control SCR circuit module to PLC trainer ED-4260. The brighter the
surroundings, the less the output resister of the sensor is. The darker it is, the higher
the resister increases. Thus it is a simple resister change output. With the output, the
sensor output should be connected to the A/D converter to operate the A/D converter.

[Figure 3-10] Example of the photo control SCR circuit module

The input powers of the A/D converter and the D/A converter in [Figure 3-2] are
connected to the output of the AC 220V power supply in [Figure 3-4]. And notice that
AC input for the lamps comes in when AC power runs on 220V input terminal of the
module.

(2) Module PC-4260-10 testing operation


Firstly, turn off the power supply of ED-4260, and turn the knob of DC output
voltage adjuster all the way down to the minimum counterclockwise.
Connect the DC output terminal of the power supply to the control input
(DC 0~10V) of the photo control SCR circuit module.

www.ed.co.kr
ED-4260 PLC Trainer

Connect 220V power from the power supply to an AC 220V input on the
module, and make sure that the lamp is surely inserted.
Connect switch input J12 and J13 with safe cord.
Turn on the power switch for ED-4260. As you turn knob for the output
voltage adjuster slowly, check that the brightness of the lamp is in accordance
with strength of its input voltage.
If something goes well, turn off the switch for the power supply, disconnect
the DC output connection cord, and turn the knob of the output voltage adjuster
all the down to the minimum counterclockwise.

(3) Operation preparation


Connect the control input of PC-4260-10 and the analog output of the D/A
converter.
Connect the output terminal of brightness sensor on the PC-4260-10 and the
analog input of the A/D converter.
Connect the digital output of A/D converter to 25pin input connector of the
frame, and the digital input of the D/A converter to 25pin output connector of
the frame.
Check whether the switch for power supply is off, and connect AC 220V output
terminal to the 220V input terminal on PC-4260-10 module with a safe cord.
Connect the switch terminals J12 and J13 of PC-4260-10 and the output
terminal 308 and COM. of ED-4260 frame as shown in [Figure 3-10].

(4) Connection and operation preparation of A/D and D/A converter


See the usage of and operation preparation of A/D converter in 3-1-2 AD-4260-5
See the usage of and operation preparation of D/A converter in 3-2-2 DA-4260-6.

[Figure 3-10] shows an example of training. Assign numbers to input and output mod-
ules of the PLC to use them.
Be aware of high voltage AC 220V when you do the training and careful not to
touch it. In times of changing or removing the connection, turn off the switch for the
power supply of ED-4260.

www.ed.co.kr
ED-4260 PLC Trainer

3-5. Power and Terminal Transfer Unit (PT-4260-7)


1) Introduction of PT-4260-7
The power and terminal transfer unit have the following 2 functions.

(1) Power supply


Input: AC 220V, Phase 1, 60Hz
Output: AC 110V(0.2A) and DC 15V (0.5A)

(1) Terminal hole size transfer


4 2 (20 circuit)
Generally, at times when you do the PLC training, you may find time that you need
AC 110V. Especially, when you do the ED-4260 PLC application training, option mod-
ules need input of AC 110V. Therefore, if you use PT-4260-7, you can have output of
AC 110V.
Also, due to the fact that input power of a circuit with the OP Amp among training
systems or modules is mostly DC 15V, PT-4260-7 is convenient. The only thing to
keep in mind is that you can not use it if the maximum output current of AC 110V re-
quires more than 0.2A and the maximum output current of DC 15V needs more than
0.5A.
The test points (TPs) of the training modules or input/output terminals have 2 different
plugs 4 plug and 2 plug. If there is an intermediate circuit that allows inter-
connection between them, it will be convenient. A terminal transfer is for that purpose.
PT-4260-7 is useful when different size terminals need to be connected. That is, it al-
lows connection training of ED-4260 PLC trainer with 4, option module with 2, or
other unit.

www.ed.co.kr
ED-4260 PLC Trainer

2) Usage of PT-4260-7

(1) Explanation on panel

AC 220V AC 110V Output Terminal


DC 15V
Power Switch Input Terminal Output Terminal -15V COM +15V

4-2 Convert Terminal

[Figure 3-11] Power and terminal transfer unit PT-4260-7

The rated output voltage from PT-4260-7 is 0.2A in AC 110V as said earlier.
Therefore, the output higher than 20W should not be used. The output current of DC
output 15V is 0.5A. Thus, load higher than 7.5W at +15V and 7.5W at 15V should be
avoided.
[Figure 3-12] shows an example of terminal convert circuit. This unit can be used not
only in ED-4260 but also other electronic and electric training systems for connection
terminal convertion.

www.ed.co.kr
ED-4260 PLC Trainer

[Figure 3-12] 4~2 terminal transfer circuit

www.ed.co.kr
ED-4260 PLC Trainer

3-6. Potentiometer and Meter Unit (PM-4260-8)


1) Introduction of PM-4260-8

The potentiometer and meter unit has as precise as 10-turn potentiometer, so that it
can divide voltage into arbitrary voltage. That is, analog signal input into an A/D con-
verter can be input precisely. Also 2 analog voltmeters allows monitoring analog input
voltage or analog output of D/A converter.
Especially, PM-4260-8 unit is an option unit prepared for the analog input unit (
4260-AD) of option unit of ED-4260 PLC unit or analog input of or output of analog
output unit (4260-DA). The following lists electrical features of PM-4260-8.

(1) Meter section


Input voltage(FS) DC 0~15V
Input current(FS) 100
Internal resister 150k

(2) Potentiometer section


Resistance 10k
Power consumption 3W
Max. input voltage 100Vp-p
Turn of adjustable 10 turn

www.ed.co.kr
ED-4260 PLC Trainer

2) Usage of PM-4260-8

(1) Explanation on panel

Meter-1
Potentiometer-1
Terminal
In/Output
Meter-1

Input Terminal
10-Turn Adjustor

Meter-2
Potentiometer-2

In/Output Terminal
Meter-2

Input Terminal
Adjustor
10-Turn

[Figure 3-13] Potentiometer and meter unit

[Figure 3-14] shows an output after varying input on the potentiometer. The input
voltage should not exceed 100V. Moreover, the external voltage does not interfere the
output terminal.

Input
Output

[Figure 3-14] Input and output of a potentiometer

www.ed.co.kr
www.ed.co.kr

Task 1 PLC I/O(ED-4260 TRAINER) Practice / 179


Task 2 Program Practice using Subroutine Commands / 191
Task 3 Motor's Start/Stop Circuit Practice / 197
Task 4 Motor's Forward/Reverse Control Program Practice(Interlock Circuit) / 203
Task 5 Program Practice using SET & RESET / 209
Task 6 Positive/Negative Transition Sensing Pulse Coil Program Practice / 215
Task 7 3-Phase Induction Motor's Y- Start Circuit Program Practice / 220
Task 8 Program Practice using Counter(UP) / 227
Task 9 Program Practice using Branch JUMP Command / 234
Task 10 Program Practice using Return Command / 239
Task 11 Program Practice using Transmission(MOVE) Command / 243
Task 12 Motor's Upper/Lower Limit Linear Movement Circuit Practice / 249
Task 13 Stepping Motor Circuit Practice using Timer / 254
Task 14 Applied Practice (Quiz Program Practice) / 259
Task 15 Applied Practice (Electronic Timer Program Practice) / 262
Task 16 Applied Practice (Lamp Shift Lighting Program Practice) / 265
Task 17 Applied Practice (Timer External Control Program Practice) / 268
Task 18 Applied Practice (Timer External Control Program Practice) / 272
Task 19 Applied Practice (Die Program Practice) / 275
Task 20 Applied Practice (ONE-SHOT Circuit Practice using TP Timer) / 278
PLC Practice using ED-4260 Trainer

Task 1 PLC I/O (ED-4260 TRAINER) Practice

1. Purpose of Experiment

1) Understand the principle of PLC I/O deivice.


2) Learn about the basic principle of PLC.
3) Identify the differences between Relay Sequence control and PLC.
4) Understand the structure and principle of PLC TRAINER(ED-4260).

2. Preparation
1) ED-4260 PLC TRAINER 1EA
2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge
1) One should be able to understand the flow of electric signal.
2) One should be able to understand how a basic sequence circuit works.

4. Activating Condition
1) Program is set up in such a way that 16 points of INPUT and 16 points of
OUTPUT can be actuated on a one-on-one basis.
2) Activating circuit needs to be configured as below so that when power is applied
to INPUT address 000 by using the PLC TRAINER (ED-4260), input switch
module(IM-4260-2), and output lamp module (OM-4260-3), output LAMP at
OUTPUT address 300 turns on. (TRAINER criterion)

INPUT 000 OUTPUT 300 INPUT 001 OUTPUT 301


INPUT 002 OUTPUT 302 INPUT 003 OUTPUT 303

www.ed.co.kr
PLC Practice using ED-4260 Trainer

INPUT 004 OUTPUT 304 INPUT 005 OUTPUT 305


INPUT 006 OUTPUT 306 INPUT 007 OUTPUT 307
INPUT 008 OUTPUT 308 INPUT 008 OUTPUT 309
INPUT 010 OUTPUT 310 INPUT 011 OUTPUT 311
INPUT 012 OUTPUT 312 INPUT 013 OUTPUT 313
INPUT 014 OUTPUT 314 INPUT 015 OUTPUT 315

3) INPUT 000 is connected to the number "0" switch of input module to form an
input circuit. (same configuration hereinafter)
4) OUTPUT 300 is connected to the number "0" lamp of output module to form an
output circuit. (same configuration hereinafter)
5) Power supply consists of DC 24V, and the following reference should be used for
proper configuration.

Reference: Power supply of input & output modules used for practice hereafter
is configured as follows:
PLC input module power supply: Connect PLC COM to DC 0V(-) and switch
COM to DC 24V(+) by using DC 24V fixed power supply. However, careful
consideration should be given to either NPN or PNP type depending on the sensor
type. In case that NPN type sensor is used, PLC COM should be connected to
DC 24V(+).
PLC output module power supply: Variable power supply DC 0~24V is used. The
reason why variable power supply is used for output is for one to practice a
separate use of input/output power supplies and arbitrarily adjust voltage depending
on the controller. Voltage should, however, be adjusted with current VR set to
maximum.

5. Connection with PLC


- To be connected with PLC, select RS-232C and Local after choosing Project
Options Connection Method, and select a communication port from COM1~C0M4
depending on the connection setup of PC.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

6. Program Practice
1) Execute GMWIN PROGRAM.
2) Choose New Project from the Project menu.

3) Use an easily identifiable name for a project file in the dialog box of new project,
choose GM4 for PLC type(it depends on user's system), and fill out Writer and
Comment in a commentarial way(possible to omit).

www.ed.co.kr
PLC Practice using ED-4260 Trainer

4) Once making a project is done and Next button is clicked, a Define Program
window shows up as below. Type proper character as you want (considering
system operation) for the program file name(for example I/O control). Choose
Scan Program for Execution Condition (Markedselect condition for run) and
click Next.

* Scan program refers to generally created programs such as ladder, and mnemonic.
* Task program prioritizes interrupts, and more details are found in the self - teaching
guide.
* Program file name is the file name used when the program is stored after its
creation, and is selected by choosing Search when an existing program needs
editing or execution.
* Instance (Program) name belongs to the substructure of project (a project can
execute a number of programs) and the file extension is *.SRC where SRC is an
abbreviation for source.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

5) When a Add Program window pops up as below, be sure that LD(Ladder


Diagram) is selected for an used language and program block for a program type,
and click Finish. Then a Program window appears on the screen.
* As far as an used language is concerned, refer to the self-teaching guide to learn
about the PLC standardization and the language's unique structure.

6) Programming
Once one clicks the desired location(on screen) where circuit will be built after
selecting the normally open contact point in order for OUTPUT 300 to be
activated as a result of pressing INPUT 000, the following result is displayed
on the screen.

normally open
contact point(N.O)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

In order for output lamp to turn on when input switch is pressed(ON) just like
Sequence circuit, it needs to be connected in series, and the following result is
displayed when one clicks the desired location where circuit will be built after
choosing Coil from the toolbox.

normally open coil output


contact point(N.O) contact point

Though there are two different ways, namely, a way of using direct variable
and a way of using indirect variable in order to define variable for input switch
and output coil, let us pick indirect variable for here. If one double-clicks with

the left button of a mouse by choosing of the toolbox in the intended


device(here is switch for input on lamp for output) to define indirect variable, a
Variable window is displayed as below.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

* The variable name is defined as INPUT000. (Example: switch, sensor, etc.)


* Because the variable called INPUT000" needs to be connected to contact point
number "0" of PLC input card as a matter of Assign(AT), one inputs
IX0.0.0(or I0.0.0) for memory allocation. The following figure is used for add or
edit variables, and is applicable to indirect variable instead of direct variable.
Direct variable should be inputted by choosing Assign(AT) when PLC's address to
be connected to the variable name is memory-allocation, whereas memory
allocation is Auto handled in case that address memory allocation is unneeded
separately.
* For more information on variable input method and data type, refer to the
self-teaching guide.
* Since % sign is automatically defined in Assign(AT) for memory allocation,
allocation value should be inputted without % sign.

* Concerning output coil as well, when the variable name(OUTPUT 300) and the

www.ed.co.kr
PLC Practice using ED-4260 Trainer

address(%QX0.3.0) are filled out in the same way as done with input switch, the
following figure appears.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

A program completed by repeating the above process makes a figure as below.

* A circuit suited to conditions can be easily built as below by using MOVE


command.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

7) Execution of Program(simulation)
To verify what was mentioned above, one uses a simulator, which is a character
istic of GLOFA to perform an experiment to check whether there is any abnormal
ity in the circuit and its activation.
Once Simulator Start is chosen after Project on the menu is chosen, an execution
file is generated, and clicking OK brings forth a simulator as below.

Base number and slot type in the above figure are automatically generated based
on the programmed variable of INPUT/OUTPUT.
The experiment of the above simulator shows that as input switch of slot number
0 is selected after CPU of the simulator is switched from STOP(S) mode to
RUN(R) mode, output is verified with a red lamp at slot number 3. (Refer to
the execution figure below.)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

8) Data Transmission from PC to PLC


By choosing Connect+Write+Run+Monitor On from Online of the menu, a
connection is established after verifying connection condition of RS-232 cable and
PLC model.

Connection terminates by clicking disconnection( ) icon.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

9) Connection Diagram with the Equipment

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Task 2 Program Practice using Subroutine Commands

1. Purpose of Experiment

- Learn about auxiliary programs and how to call them using subroutine commands.

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand basic knowledge of subroutine.


2) One should be able to understand the meaning of main program & auxiliary
program.

4. Activating Condition

1) If main switch is activated, then main output lamp is activated(main program


terminated), and auxiliary switch enables auxiliary output to be activated, and stop
switch enables main output lamp and auxiliary output to be initialized.
2) If main output lamp is not activated, then auxiliary output to be enabled by
auxiliary switch is not activated neither.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

3) PLC I/O MAP is configured as below.


Indirect I/O
Section Comment
Variable Name Allocation
Toggle
MAIN_SWITCH %IX0.0.1
Switch 1
Toggle
Input AUXILIARY_SWITCH %IX0.0.2
Switch 2
Toggle
STOP_SWITCH %IX0.0.0
Switch 0
MAIN_OUTPUT_LAMP %QX0.2.0 Lamp L-2
Output
AUXILIARY_LAMP %QX0.2.1 Lamp L-1

4) Power supply consists of DC 24V, and PLC COM is connected to DC 0V(-)


while switch COM and LAMP are connected to DC 24V(+)

5. Program Practice
1) Execute GMWIN to open the Project window and the Program window.
2) Design a program using PLC I/O MAP.
3) Refer to the previous task concerning programming method.
4) A figure below shows a program that built circuit using subroutine commands.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

5) How to use comment and label


If one double-clicks with the left button of mouse right on the row where
comment or label needs to be inserted, a dialog box as on the left below shows
up.

Once one chooses Comment, a message box appears so that any content can be
inputted there. When a comment like "This is a program using sub program." is
inputted, the following result is displayed.

To write a subprogram, one chooses for the intended program and makes a
label. (Refer to the figure below.)
As far as writing a subprogram is concerned, it
works identically for both label and comment. (In
case of the above program, the name to be called
is "sub program.")
When programming is done, END is written in the
LD program by choosing "Main Program End
Mark" from the label/comment menu, and "This
line is the end of program body" is written as a
comment.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

In order for the auxiliary program(subroutine program) to be selected, one selects


labelfrom the row 6 where a subprogram is written andSUB_PROGRAMfrom
the label list to complete calling program. (Refer to the figure below.)

The Label of subroutine call and the Label of the


subroutine program should be same.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

6. Execution of Program(using simulator)

1) To verify what was mentioned above, one uses a simulator, which is a


characteristic of GLOFA to perform an experiment to check whether there is any
abnormality in the circuit and its activation. (Refer to the figure.)

The above figure shows a situation where the simulator is chosen, and main output
lamp is activated by executing CPU with RUN mode and turning main switch on,
and auxiliary switch turns on as a result of jumping(subroutine) to auxiliary pro
gram by main output lamp, which enables auxiliary output to be turned on by
pressing the auxiliary switch.
To stop the simulator, just click shortcut in its right upper portion.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

2) Connection Diagram with the Equipment

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Task 3 Motor's Start/Stop Circuit Practice

1. Purpose of Experiment

1) Understand motor's starting principle using PLC.


2) Learn about I/O(INPUT/OUTPUT) MAP of PLC.
3) Identify the differences between Sequence control and PLC control.
4) Understand the structure and principle of PLC TRAINER(ED-4260)

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand motor's starting method.


2) One should be able to understand basic Sequence control circuit.
3) One should be able to understand self-holding circuit(Latching circuit).
4) One should be able to design PLC I/O MAP.

4. Activating Condition

1) Build motor's start circuit by using two input switches(start, stop).


(Output consists of output coil for magnetic contact, operation lamp, and
stop lamp.)
* Initially, stop lamp must have been turned on.
2) If start input switch is turned on, motor gets started, and then operation lamp turns
on whereas stop lamp turns off.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

3) If one turns on stop push button switch during operation, motor stops, and stop
lamp turns on, and operation lamp turns off.
4) PLC I/O MAP is configured as below.
Indirect I/O
Section Remarks
Variable Name Allocation
START_SWITCH %IX0.0.1 Push Switch S-2
Input
STOP_SWITCH %IX0.0.0 Push Switch S-3
MOTOR %QX0.2.0 MOTOR-1(-)
Output OPERATION_LAMP %QX0.2.1 Lamp L-2
STOP_LAMP %QX0.2.2 Lamp L-1

5) PLC input power supply consists of DC 24V, and PLC COM is connected to DC
0V(-) while switch COM is connected to DC 24V(+).
6) PLC output power supply also consists of DC 24V, and PLC terminal block COM
is connected to DC 0V(-) while Motor (+) terminal and LAMP COM are
connected to DC 24V(+).
7) It is very important to configure PLC I/O MAP. It means enabling PLC I/O MAP
to estimate input/output point, and means control as well as input/output
configuration.

5. Program Practice
1) Execute GMWIN.
2) Open the Project window and the Program window.
3) Create a program using normally open contact point, normally closed contact point,
and output coil.
4) Refer to the previous task concerning programming method.
5) The following figure displays a program that shows examples of motor's start
and stop circuit using direct variable and indirect variable of stop circuit.
(One should understand the meaning of direct variable and indirect variable in LD
program.)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

6) Storage of Program

www.ed.co.kr
PLC Practice using ED-4260 Trainer

As shown above, one chooses Compile of Compile on the menu to store


program.
Compile means temporary storage in buffer, and execution file is created by
Make.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

6. Execution of Program(using simulator)

1) To verify what was mentioned above, one uses a simulator, which is a


characteristic of GLOFA to perform an experiment to check whether there is any
abnormality in the circuit and its activation. (Refer to the figure.)

The above figure shows that when the simulator is chosen to execute CPU with
the RUN mode, stop lamp that is the number 2(%QX0.2.2) output lamp of slot
"2" turns on.
If one presses the number 1(%IX0.0.1) button of start switch in slot "0",
motor(%QX0.2.0) is activated and operation lamp(%QX0.2.1) turns on. Then stop
lamp turns off.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Self-holding contact is a kind memory circuit with two types, OFF


priority circuit and ON priority circuit. The figure above shows OFF priority
circuit because when start switch and stop switch are pressed simultaneously,
motor stops. But if motor keeps working, then it means ON priority circuit.

Motor keeps working until stop switch(%IX0.0.0) is turned on by self-holding


circuit.
To stop the simulator, just click shortcut in its right upper portion.

2) Connection Diagram with the Equipment

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Motor's Forward/Reverse Control Program


Task 4
(Interlock Circuit)

1. Purpose of Experiment

1) Understand motor's forward/reverse circuit using PLC.


2) Learn about PLC's I/O(INPUT/OUTPUT) MAP.
3) Identify the differences between Sequence control and PLC control.
4) Understand the structure and principle of PLC TRAINER(ED-4260).

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand motor's forward/reverse circuit.


2) One should be able to understand basic Sequence control circuit.
3) One should be able to understand Interlock circuit.
4) One should be able to design PLC I/O MAP.

4. Activating Condition

1) Build motor's forward/reverse circuit by using two(forward rotation, reverse


rotation) input switch and stop switch.
2) PLC I/O MAP is configured as below.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Indirect I/O
Section Comment
Variable Name Allocation
Toggle
FORWARD_SWITCH %IX0.0.1
Switch 1
Toggle
Input REVERSE_SWITCH %IX0.0.2
Switch 2
Toggle
STOP_SW %IX0.0.0
Switch 0
OPERATION_LAMP %QX0.3.0 Lamp L-2
FORWARD_MOTOR A %QX0.2.0 MOTOR-1 (+)
FORWARD_MOTOR B %QX0.3.2 MOTOR-1 (-)
Output
REVERSE_MOTOR A %QX0.2.1 MOTOR-1 (-)
REVERSE_MOTOR B %QX0.3.3 MOTOR-1 (+)
MOTOR_STOP_LAMP %QX0.3.1 Lamp L-1

2) When forward rotation switch turns on, motor does forward rotation operation.
When reverse rotation switch is turned on after turning stop switch ON/OFF, motor
does reverse rotation operation.
3) The system is configured in such a way that motor operation lamp turns on when
motor operates and motor stop lamp turns on when motor stops.
4) If forward rotation switch turns on, motor does forward rotation operation and
motor's operation lamp turns on. (Motor stop lamp turns off.)
5) One should turn motor off in order to do reverse rotation operation. Then motor
stop lamp should turn on(motor operation lamp turns off). If one turns reverse
rotation switch on after motor stops, then motor does reverse rotation operation,
and motor's operation lamp turns on(motor stop lamp turns off).

Interlock circuit is a circuit that inhibits operation of pertinent instrument by


using contact point showing its activating status in order to avoid concurrent
output between two instruments for instruments' protection and workers'
safety. In other words, it is called preceding operation priority circuit or
opponent operation inhibition circuit.

6) Forward direction operation should be sustained even if one turns on reverse


direction switch, and interlock circuit should be incorporated so that operation

www.ed.co.kr
PLC Practice using ED-4260 Trainer

switchover can be activated only after stop switch turns ON/OFF.


7) PLC input power supply consists of DC 24V, and PLC COM is connected to DC
0V(-) while switch COM is connected to DC 24V(+).
8) For PLC output power supply, connect DC 24V(+) to the number 2 slot
(%QX0.2.0 ~%QX0.2.7) COM terminal and DC 0V(-) to the number 3 slot
(%QX0.3.0~%QX0.3.7) COM terminal.
9) Connect %QX0.2.0 and %QX0.3.3 to motor's terminal(+), and %QX0.2.1 and
%QX0.3.2 to motor's terminal(-).
10) Connect LAMP COM to DC 24V(+).

5. Program Practice

1) Execute GMWIN.
2) Open the Project window and the Program window.
3) Create a program using PLC I/O MAP.
4) Refer to the previous task concerning programming method.
5) The following figure displays a program that built motor's forward/reverse circuit.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

6) Window for variable verification

- As for local variables(case of indirect variable declaration) applied to the above


program, a list of local variables is displayed as in the figure when Local Variable
is chosen from Program of the menu. It can be verified that memory assignments
in the figure match up with I/O MAP.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

6. Execution of Program(using simulator)

1) To verify what was mentioned above, one uses a simulator, which is a


characteristic of GLOFA to perform an experiment to check whether there is any
abnormality in the circuit and its activation. (Refer to the figure.)

The above figure shows that when the simulator is chosen to execute CPU with
the RUN mode, stop lamp that is the number 1(%QX0.3.1) output lamp of slot
"3" turns on.
If one turns on forward rotation switch(%IX0.0.1), then forward rotation motors,
A(%QX0.2.0), B(%QX0.3.2) are activated, and operation lamp(%QX0.3.0) turns on.
Then stop lamp turns off.
To perform reverse rotation, stop motor with stop switch and turn on reverse
rotation switch(%IX0.0.2). Then motors, A(%QX0.2.1), B(%QX0.3.3) are
activated and operation lamp turns on. (Even if one turns on reverse rotation

www.ed.co.kr
PLC Practice using ED-4260 Trainer

switch during forward rotation, reverse rotation is not activated because they are
mutually protected by interlock circuit.)
To stop the simulator, just click shortcut in its right upper portion.

2) Connection Diagram with the Equipment

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Task 5 Program Practice using SET and RESET Command

1. Purpose of Experiment

1) Understand PLC commands, SET and RESET.


2) Understand the structure and principle of PLC TRAINER(ED-4260).

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand basic commands of PLC.


2) One should be able to understand the meaning of SET and RESET.

4. Activating Condition
1) Build motor's start/stop circuit by using two(start, stop) switches.
2) PLC I/O MAP is configured as below.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Indirect I/O
Section Comment
Variable Name Allocation
Push
START_SWITCH %IX0.0.2
Switch S-2
Push
Input STOP_SWITCH %IX0.0.1
Switch S-3
Toggle
SWITCH_A %IX0.0.0
Switch 0
MOTOR %QX0.2.2 MOTOR-1 (-)
Output OPERATION_LAMP %QX0.2.1 Lamp L-1
STOP_LAMP %QX0.2.0 Lamp L-2

3) PLC input power supply consists of DC 24V, and PLC COM is connected to DC
0V(-) while switch COM is connected to DC 24V(+). Motor's power supply and
LAMP consist of DC 24V, and COM terminal is connected to DC 0V(-) while
motor(+) and LAMP COM are connected to DC 24V(+) variable power supply.
4) If start switch is turned on, motor's SET is activated and motor's operation lamp
turns on.
5) If stop switch is turned on, motor's RESET is activated, and operation stops, and
operation lamp turns off while stop lamp turns on.
6) Even if circuit is interrupted with switch A while being operated by start switch,
motor keeps working until motor's SET will be RESET.
7) SET command is characterized by the ability of sustaining its effect until RESET
command takes over.

5. Program Practice

1) Execute GMWIN and open the Project window and the Program window.
2) Create a program using PLC I/O MAP.
3) Refer to the previous task concerning programming method.
4) A program that utilizes SET command and RESET command for motor's start and
stop is shown in the figure below.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

5) Various differences can be identified when the above program is compared with
motor's start/stop circuit of the practice task 3. Identify each difference.
6) Try to transmit using upload while transmitting to PLC. (Different traits from
MASTER-K)
7) Unless one selects upload program while transmitting to PLC, it is impossible for
program to be reversely transmitted from PLC. (Case of transmission from PLC to
PC Refer to clause 7.)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

6. Execution of Program(using simulator)


1) To verify what was mentioned above, one uses a simulator, which is a
characteristic of GLOFA to perform an experiment to check whether there is any
abnormality in the circuit and its activation. (Refer to the figure.)

The above figure shows a case that when the simulator is chosen to execute CPU
with the RUN mode and turn on start switch, operation lamp turns on while motor
SET is activated.
Motor stops only when motor RESET is activated by stop switch.
Motor maintains operation because RESET was not activated as the figure above
even if switch A is turned on when operated by start switch.
SET command is Cleared only by RESET command.
To stop the simulator, just click shortcut in its right upper portion.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

2) Connection Diagram with the Equipment

7. The following should be defined to transmit data(including project and


source file) from PC to PLC. (PLC upload program)

1) Install RS-232 cable for a connection. (Connecting PC and PLC's CPU)


2) Choose Option from Project of the menu. (Refer to the figure below.)
3) Choose Output File from Make Option, and check Upload Program, and then
include or exclude comment as an option.
4) The reason why upload program needs to be set up is to be able to receive data
from PLC. (Function different from MASTER-K)
5) All it takes to receive PLC's program to PC is to choose Read from Online of the
menu. (From PC standpoint, reading means receiving data from PLC to PC.)
* From PC standpoint, Write of the Online menu means transmitting data from PC
to PLC.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Figure to define Upload Program

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Positive/Negative Transition
Task 6
Sensing pulse Coil Program Practice

1. Purpose of Experiment

- Learn about a PLC command, positive/negative transition sensing pulse coil


command.(Differential Signal)

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand basic commands of PLC.


2) One should be able to understand the meaning of positive/negative transition
sensing pulse coil.
3) One should be able to understand the meaning of scan time.

4. Activating Condition

1) Build motor's start/stop circuit by using three(start 1, start 2, stop) switches.


2) PLC memory assignment is configured as below.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Indirect I/O
Section Comment
Variable Name Allocation
Push
START_SWITCH_1 %IX0.0.2
Switch S-2
Push
Input START_SWITCH_2 %IX0.0.1
Switch S-3
Toggle
STOP_SWITCH %IX0.0.0
Switch 0
MOTOR %QX0.2.2 MOTOR-1 (-)
Detect positive
POSITIVE Automatic
Edge
Output Detect negative
NEGATIVE Automatic
Edge
OPERATION_LAMP %QX0.2.1 Lamp L-1
STOP_LAMP %QX0.2.0 Lamp L-2

3) PLC input power supply consists of DC 24V, and PLC COM is connected to DC
0V(-) while switch COM is connected to DC 24V(+). Motor's power supply and
LAMP consist of DC 24V, and COM terminal is connected to DC 0V(-) while
motor(+) and LAMP COM are connected to DC 24V(+).
4) When start switch 1 turns on, positive transition sensing pulse coil is activated for
1 scan to operate motor(operation sustained by self-holding) as start switch 1
switches from OFF to ON(rising edge), and motor is stopped by stop switch.
5) When start switch 2 turns on, negative transition sensing pulse coil is activated for
1 scan to operate motor(operation sustained by self-holding) as start switch 2
switches from ON to OFF(falling edge), and motor is stopped by stop switch.

5. Program Practice
1) Execute GMWIN and open the Project window and the Program window.
2) Create a program using PLC I/O MAP.
3) Refer to the previous task concerning programming method.
4) A program that built motor's start/stop circuit using positive/negative transition
sensing pulse coil command is shown in the figure below.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

5) Various differences can be identified when the above program is compared with
motor's start/stop circuit of the practice task 3. (Notice the difference between rising
output contact point and falling output contact point.)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

6. Execution of Program(using simulator)

1) To verify what was mentioned above, one uses a simulator, which is a


characteristic of GLOFA to perform an experiment to check whether there is any
abnormality in the circuit and its activation. (Refer to the figure.)

The above figure shows a case that when the simulator is chosen to execute CPU
with the RUN(R) mode and turn on start switch, stop lamp turns on. (Case of us-
ing reverse coil as stop lamp output tool)
As soon as start switch 1 turns on, positive transition sensing pulse is on, output
is sensed, and motor operates, and it is stopped by stop switch.
As soon as start switch 2 turns on and then turns off, negative transition sensing
pulse is on, and motor operates, and it is stopped by stop switch.
To stop the simulator, just click shortcut in its right upper portion.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

2) Connection Diagram with the Equipment

www.ed.co.kr
PLC Practice using ED-4260 Trainer

3-Phase Induction Motor's


Task 7
Y- Start Circuit Program Practice

1. Purpose of Experiment
- Learn about 3-phase induction motor's Y- start circuit using timer command.

2. Preparation
1) ED-4260 PLC TRAINER 1EA
2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge
1) One should be able to understand basic knowledge of timer.
2) One should be able to understand 3-phase induction motor's start mechanism.
3) One should be able to understand function block.

4. Activation Condition
1) Build 3-phase induction motor's start/stop circuit by using operation switch and
stop switch. (Y- Operation)
2) PLC I/O MAP is configured as below.
Indirect I/O
Section Comment
Variable Name Allocation
Push
START_SWITCH %IX0.0.1
Switch S-2
Input
Push
STOP_SWITCH %IX0.0.0
Switch S-3
Y_OPERATION %QX0.2.1 Lamp 1
Output _OPERATION %QX0.2.2 Lamp 2
STOP_LAMP %QX0.2.0 Lamp 0

www.ed.co.kr
PLC Practice using ED-4260 Trainer

3) Power supply consists of DC 24V, and PLC COM is connected to DC 0V(-)


while switch COM and LAMP are connected to DC 24V(+). Use input power
supply and output power supply separately.
4) If start switch turns on, then Y operation(MC) is activated, and 3-phase induction
motor operates with Y connection, and timer is activated as well.
5) After the set time of timer(set to 5 seconds in this practice), Y operation(MC)
turns off, and operation(MC) is activated, and 3-phase induction motor operates
with connection. 3-phase induction motor is stopped by stop switch.
( MC output of Y operation and operation is replaced with lamp for
this practice.)

5. Program Practice

1) Execute GMWIN and open the Project window and the Program window.
2) Create a program using PLC I/O MAP.
3) Refer to the previous task concerning programming method.
4) A program that built 3-phase induction motor's Y- start circuit using timer is
shown in the figure below.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

5) To execute timer in GLOFA PLC, a precaution should be taken because it uses a


different command system. MASTER-K depends on general output coil is applied
for this command, whereas GLOFA uses a command system characterized by
Function and Function Block.

Differences between Function and Function Block


Function : Time taken from STEP 1 of a program to final STEP is called 1
SCAN. Function applies to the case that requires an immediate execution
within 1 SCAN TIME and the case that does not stores operation results in
the inside of command. (Example: operation function, time/date function,
selection/comparison function, type conversion function)
Function Block : Function block applies to the case that a program outputs
operation results stored through multiple SCANs. (Example: timer, counter)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

6) How to use Function Block


When one chooses Function Block( ) of the tool box and places it in a perti-
nent location of program in order to use timer, Function Block List pops up as the
figure below.

Choose Standard Function Block under Function Block Type Selection, and TON(ON
DELAY TIMER) under Standard Function Block, and then define a variable name
for timer. (Call it T1 using the abbreviation of TIMER. For COUNTER, it is general
to use C, its initial.)
The figure below shows that T1 is under activation as Y operation contact point
turns on, and activation status of the program whose set time(PT) is set to 5 seconds
is shown as well.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Function Block of ON Delay Timer(TON)


- T1: The name of timer(instant name)
- IN: Activation start input signal that activates timer
(BOOL)
- PT: The set time of timer(TIME)
- Q: Output(Output of when the set time is reached)
- ET: The elapsed time(present value) of timer

OFF Delay Timer and Pulse Timer Function Block

- OFF Delay Timer(TOF)


- When input signal of IN turns ON, output also turns
ON, and from the moment when input signal turns OFF,
timer is activated, and output turns OFF when the set
time is reached.
- IN, PT, Q, and ET have the same structure as ON
Delay Timer.

- Pulse Timer(TP)
- From the moment when input signal of IN turns
ON, output turns ON, and even if input signal turns
OFF, output stays ON until certain time, and
output turns OFF when the set time is reached.
- IN, PT, Q, and ET have the same structure as ON Delay
Timer.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

6. Execution of Program(using simulator)

1) To verify what was mentioned above, one uses a simulator, which is a


characteristic of GLOFA to perform an experiment to check whether there is any
abnormality in the circuit and its activation. (Refer to the figure.)

The above figure shows a case that when the simulator is chosen to execute CPU
with the RUN(R) mode and turn on start switch, Y operation output turns on.
Timer is activated by Y operation contacty point, and operation output is acti-
vated 5 seconds after the set time.
Operation is stopped by stop switch, and then stop lamp turns on.
To stop the simulator, just click shortcut in its right upper portion.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

2) Connection Diagram with the Equipment

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Task 8 Program Practice using Counter(UP)

1. Purpose of Experiment

- Learn about counter types and their characteristics.

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand basic knowledge of counter.


2) One should be able to understand function block.

4. Activation Condition

1) Build a circuit in such a way that when start switch turns on, special register
_T1S repeats ON and OFF every one half second for one second, and when timer
turns on five times, counter enables motor to operate, and operation lamp turns
on. (Stop lamp turns off.)
2) Motor stops 5 seconds after timer is activated by counter output and operation
lamp turns off(stop lamp turns on). Motor should repetitively operate until
stop switch finally turns on.
3) When stop switch turns on, the present value of counter should be initialized.
4) PLC memory assignment is configured as below.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Indirect
Section Memory Allocation Comment
Variable Name
START_SWITCH %IX0.0.1 Push Switch S-2
Input
STOP_SWITCH %IX0.0.0 Push Switch S-3
MOTOR %QX0.3.3 MOTOR-1 (-)
START_LAMP %QX0.3.2 Lamp 2
OPERATION_LAMP %QX0.3.1 Lamp 1
Output
STOP_LAMP %QX0.3.0 Lamp 0
C1 Automatic
T1 Automatic

5) PLC input power supply consists of DC 24V, and PLC COM is connected to DC
0V(-) while switch COM is connected to DC 24V(+). Motor's and Lamp's
operating power consist of DC 24V, and COM terminal is connected to DC 0V(-)
while motor(+) and LAMP COM are connected to DC 24V(+).

5. Program Practice

1) Execute GMWIN and open the Project window and the Program window.
2) Create a program using PLC I/O MAP.
3) Refer to the previous task concerning programming method.
4) The figure below shows local variable list and program that built the above circuit
using counter.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

5) How to use function block(CTU: UP Counter)


Choose Function Block( ) of the toolbox to use counter.
(Refer to how to use timer.)
Choose Standard Function Block from among Function Block Types, an
CTU(up counter) from among Standard Function Blocks, and define a
name for counter. (Call it counter arbitrarily.)
Counter types are as follows.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

This incremental counter increases by "1" each time CU's


input is "1."
* Once it reaches the preset value(PV), output(Q) is activated.
- CU takes UP-counter for input, and should be connected
to the left bus.
- R is counter's RESET. (Current value of CV is initialized.)
- PV is counter's preset value(maximum of 32767).
- Q is UP-counter's output(BOOL).
- CV is counter's current value.

This decremental counter decreases by "1" each time CD's


input is "1."
* Once it reaches the preset value(PV), output(Q) is
activated.
- CD takes DOWN-counter for input, and should be
connected to the left bus.
- If LD is 1, the preset value of PV is loaded to the
current value of CV.
- PV is counter's preset value(maximum of 32767).
- Q is DOWN-counter's output(BOOL).
- CV is counter's current value.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

This incremental-decremental counter increases by "1"


each time CU's input is "1" and decreases by "1"
each time CD's input is "1."
* QU's output becomes "1" if CV is greater than or
equal to PV, and QD becomes "1" if CV is less than
0.
- CU/CD should be connected to the left bus while
UP/DOWN-counters are inputted.
- R is counter's RESET. (The preset value of PV is
cleared.)
- If LD is 1, the preset value of PV is loaded to the
current value of CV.
- PV is counter's preset value(maximum of 32767).
- QU is UP-counter's output.
- QD is DOWN-counter's output.
- CV is counter's current value.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

6. Execution of Program(using simulator)


1) To verify what was mentioned above, one uses a simulator, which is a
characteristic of GLOFA to perform an experiment to check whether there is any
abnormality in the circuit and its activation. (Refer to the figure.)

The above figure shows a case that when the simulator is chosen to execute CPU
with the RUN(R) mode, and turn on start switch, and activate start lamp, input sig-
nal is transmitted to counter every second by PLC's special register _T1S for
counting.
Once counter's counting reaches the preset value(PV=5), counter output Q is acti-
vated to operate motor that turns on operation lamp then.
Timer is activated by counter's output, and once the preset time(PT=5) is reached,
RESET is activated to initialize counter and stop motor. Then operation lamp turns

www.ed.co.kr
PLC Practice using ED-4260 Trainer

off and stop lamp turns on.


If stop switch turns on after repetitively executing and , all actions stop and
start lamp turns off. Counter's proceeding value is initialized too.
To stop the simulator, just click shortcut in its right upper portion.

2) Connection Diagram with the Equipment

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Task 9 Program Practice using Branch JUMP Command

1. Purpose of Experiment

- Learn about program jump(subprogram) within LD program, which uses JUMP


command.

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand basic knowledge of jump and call.


2) One should be able to understand subroutine program.

4. Activating Condition

1) Switch 1 controls output 1, and switch 2 controls output 2. But circuit should be
built in such a way that output 1 is not controlled by switch 1 when branch(jump)
command is used. On the other hand, output 2 should be always activated
regardless of branch(jump) command of switch 2.
2) PLC I/O MAP is configured as below.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Indirect I/O
Section Comment
Variable Name Allocation
SWITCH_1 %IX0.0.1 Toggle Switch 1
Input SWITCH_2 %IX0.0.0 Toggle Switch 0
BRANCH_SWITCH %IX0.0.2 Toggle Switch 2
OUTPUT_1 %QX0.2.1 Lamp L-1
Output
OUTPUT_2 %QX0.2.0 Lamp L-2

3) Power supply consists of DC 24V, and should be used separately for input and
output. PLC COM is connected to DC 0V(-) while switch COM and LAMP are
connected to DC 24V(+).

5. Program Practice

1) Execute GMWIN and open the Project window and the Program window.
2) Creat a program using PLC I/O MAP.
3) Refer to the previous task concerning programming method.
4) The figure below shows program that satisfies the above conditions using jump
command.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

5) How to use jump command


To use branch command, choose in the pertinent program and then define
label. (Refer to subroutine command for information on comment and label.)
As shown in the above example program, branch command directs the program to
jump to the label instead of executing the program immediately after the branch
command.

Branch(Jump) Command

Branch command allows program to directly go to the location where it


intends to branch to, and the destination is expressed as label. In a program
that includes subroutine, jump within main program requires label within main
program, and jump within subroutine requires label within subroutine. This
command is used to distinguish main program, auxiliary program respectively,
and to jump the program as well.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

6. Execution of Program(using simulator)

1) To verify what was mentioned above, one uses a simulator, which is a


characteristic of GLOFA to perform an experiment to check whether there is any
abnormality in the circuit and its activation. (Refer to the figure.)

The above figure shows a case that when the simulator is chosen to execute CPU
with the RUN(R) mode, and turn on switch 1 and switch 2 after executing branch
switch, output 2 turns on.
Once branch switch's contact point is activated, output 1 is not activated even if
switch 1's contact point is activated by branching to the jump destination, labeled,
jump. But output of output 1 is activated when there is no jump command, and if
jump command is executed while output 1 is in action, then output is maintained
even if switch 1's contact point turns off, and is controlled by switch 1 when jump
command is released. Output of output 2 is activated by switch 2 regardless of
jump command.

To stop the simulator, just click shortcut in its right upper portion.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

2) Connection Diagram with the Equipment

7. Differences between Subroutine and Jump

1) Subroutine is used after END of command.


2) Jump enables the program to jump to any location where it intends to branch to.
3) In case of branching, the program in between the location where branch command
was issued and the location to jump to is not executed.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Task 10 Program Practice using RETURN Command

1. Purpose of Experiment

- Learn about return command(RETURN).

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand basic function of PLC.


2) One should be able to understand program termination.

4. Activating Condition
1) If switch 1's contact point is activated, output 1 is activated, and program
terminates as it encounters [Return], output 2 outputted by switch 2's contact point
that is the program after [Return] is not activated.
2) PLC I/O MAP is configured as below.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Indirect I/O
Section Comment
Variable Name Allocation
Toggle
SWITCH_1 %IX0.0.1
Switch 1
Input
Toggle
SWITCH_2 %IX0.0.0
Switch 0
OUTPUT_1 %QX0.2.1 Lamp L-1
Output
OUTPUT_2 %QX0.2.0 Lamp L-2

3) Power supply consists of DC 24V, and should be used separately for input and
output. PLC COM is connected to DC 0V(-) while switch COM and LAMP are
connected to DC 24V.

5. Program Practice

1) Execute GMWIN and open the Project window and the Program window.
2) Create a program using PLC I/O MAP.
3) Refer to the previous task concerning programming method.
4) The figure below shows program that satisfies the above conditions using return
command.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

5) How to use return command


To use return command, choose from the toolbox and press the left button of
mouse after placing cursor in the pertinent spot. Then the program following
[Return] is not executed and terminates. (Shortcut +)

6. Execution of Program(using simulator)

1) To verify what was mentioned above, one uses a simulator, which is a


characteristic of GLOFA to perform an experiment to check whether there is any
abnormality in the circuit and its activation. (Refer to the figure.)

The above figure shows the following. When the simulator is chosen to execute
CPU with the RUN(R) mode, and turn on switch 1, output 1 turns on. But the
program after row 2 is not executed because it is terminated by [Return] command
on row 2. Therefore even if switch 2 on row 3 is turned on, output 2 does not
turn on.
To stop the simulator, just click shortcut in its right upper portion.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

2) Connection Diagram with the Equipment

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Task 11 Program Practice using Transmission(MOVE) Command

1. Purpose of Experiment

- Learn about data movement using transmission command(MOVE).

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) 25pin Connection Cable 2EA
5) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand data type.


2) One should be able to understand expression of antilogarithm and system of
notation.

4. Activation Condition

1) Build a circuit in such a way that digital switch input is transmitted to %QW0.2.0
with switch 1 using MOVE command on DISPLAY, and inputted BCD values are
separately transmitted to %QB0.3.0(LAMP 0 ~ LAMP 7) and %QB0.3.1(LAMP 8
~ LAMP15), and the pertinent LAMP turns on.
2) PLC I/O MAP is configured as below.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Memory
Section Variable Name Comment
Allocation
Toggle
SWITCH_1 %IX0.1.15
Switch 2
Toggle
Input SWITCH_2 %IX0.1.14
Switch 1
Toggle
SWITCH_3 %IX0.1.13
Switch 0
OUT
DATA1 %QW0.2.0
DISPLAY
Output DATA2 %QB0.3.0 Lamp 0~7

DATA3 %QB0.3.1 Lamp 8~15

3) Power supply consists of DC 24V, and should be used separately for input and
output. PLC COM is connected to DC 0V(-) while switch COM and LAMP are
connected to DC 24V.

5. Program Practice

1) Execute GMWIN and open the Project window and the Program window.
2) Create a program using PLC I/O MAP.
3) Refer to the previous task concerning programming method.
4) The figure below shows program that satisfies the above conditions using MOVE.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

5) How to use MOVE command


To use MOVE command, choose from the toolbox and press the left button
of mouse after placing cursor in the pertinent spot. Then the Function menu shows
up. Just like function block(used for timer and counter), function has a structure
different from what applies to MASTER-K PLC. Function is a set of various com-
mands used for PLC programming.
To use MOVE command, choose MOVE from Function Selection to
generate a syntax as below.(select function window appeared)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

MOVE has EN, ENO, IN1, and OUT as input/output structure.


MOVE is a sort of function(easier to take it as a command) that has capability
of copying data, and its structure is as follows.
- EN: Input contact point to execute MOVE function
- ENO: Output status of MOVE(BIT form)
- IN1: Value to copy
- OUT: Value to be copied
* Variables related to IN1 and OUT should have the same data type.
Antilogarithm, system of notation, and data type are all important.
- The meaning of 16#1111: Hexadecimal that has 16 bits ranged from the lowest
bit to the highest bit consists of four bits (nybble concept). Which has 4 bits.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

- A data expression, 16#1111H, is hexadecimal with the value, 1111. If it is repre


sented as 4 parts(nybble unit), in which each has 4 bits(16 possibilities),
%QX0.2.0, %QX0.2.4, %QX0.2.8, and %QX0.2.12 turn out to be ON, and rest
bits are all OFF.
If the data is represented in terms of binary combination of ON/OFF, it would be
0001 0001 0001 0001 shown in the figure, and 1111H as a hexadecimal.
(in 1111H, H means hexadecimal, and is omitted in actual programming.)
In addition, 16#FFFFH that is equivalent to 1111 1111 1111 1111 shows that all
contact points(BIT) in between %QX0.2.0 and %QX0.2.15 turn out to be ON.

6. Execution of Program(using simulator)

1) To verify what was mentioned above, one uses a simulator, which is a


characteristic of GLOFA to perform an experiment to check whether there is any
abnormality in the circuit and its activation. (Refer to the figure.)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

The figure above shows that when the simulator is chosen to execute CPU with
the RUN(R) mode, and turn on switch 1, 2, and 3, data 8421 is transmitted to
DATA1(%QW0.2.0), DATA2(%QB0.3.0), and DATA3 (%QB0.3.1). (Outputs are
controlled by each switch.)
If 16#8421H is expressed as binary, it is (8)1000 (4)0100 (2)0010 (1)0001, and it
means that output contact points at 0, 5, 10, 15 have lamp turned on. Then the
data are transmitted by WORD and BYTE units, and 16#??21 is transmitted by
switch 2, and 16#84?? by switch 3. As for data input, use digital switch for prac-
tice, and remove 25pin cable when push/toggle switches are used for input.
To stop the simulator, just click shortcut in its right upper portion.

2) Connection Diagram with the Equipment

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Motor's Upper/Lower Limit


Task 12
Linear Movement Circuit Practice

1. Purpose of Experiment

1) Understand motor's forward/reverse circuit pertaining to position control using PLC.


2) Learn about I/O(INPUT/OUTPUT) MAP of PLC.
3) Understand activating principle using limit switch.
4) Understand structure and principle of PLC TRAINER(ED-4260).

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand motor's start mechanism.


2) One should be able to understand basic Sequence control circuit.
3) One should be able to understand self-holding circuit.
4) One should be able to perform position control using limit switch.
5) One should be able to configure PLC I/O MAP.

4. Activating Condition

1) Build motor's forward/reverse circuit by detecting the positions of upper


limit(sensor-4) and lower limit(sensor-5) using limit switch when the appliance
moves from side to side.
2) When start switch turns on, motor starts, and the appliance moves to the lower

www.ed.co.kr
PLC Practice using ED-4260 Trainer

limit. But when the position is detected at the lower limit, motor moves to the
upper limit,
and when the position is detected at the upper limit, motor moves back to the
lower limit causing repetitive operation.
3) If stop switch turns on during operation, motor stops.
4) PLC I/O MAP is configured as below.

Indirect I/O
Section Comment
Variable Name Allocation
START %IX0.0.0 Push Switch S-2
STOP %IX0.0.1 Push Switch S-3
Input
LS01 %IX0.0.3 SENSOR-5
LS02 %IX0.0.2 SENSOR-4
OUT_20 %QX0.2.0 MOTOR-2 (+)
OUT_21 %QX0.2.1 MOTOR-2 (-)
Output
OUT_30 %QX0.3.0 MOTOR-2 (-)
OUT_31 %QX0.3.1 MOTOR-2 (+)

5) PLC input power supply consists of DC 24V, and PLC COM is connected to DC
0V(-) while switch COM is connected to DC 24V(+).
6) PLC output power supply consists of DC 24V, and COM terminal of the number
2 slot(%Q0.2.0~%Q0.2.7) is connected to DC24V(+) while COM terminal of the
number 3 slot(%Q0.3.0~%Q0.3.7) is connected to DC 0V(-).
7) %QX0.2.0 and %QX0.3.1 are connected to motor's (+)terminal, and %QX0.2.1 and
%QX0.3.0 are connected to motor's (-)terminal.
8) Configuring PLC I/O MAP is a very important work. It is so because PLC I/O
MAP estimates input/output point, and means control as well as input/output
configuration.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

5. Program Practice

1) Execute GMWIN.
2) Open the Project window and the Program window.
3) Write a program using normally open contact point, normally closed contact point,
and output coil.
4) Refer to the previous task concerning programming method.
5) The figure below shows program that contains an example of motor's upper/lower
limit linear movement circuit.

6. Execution of Program(using simulator)

1) To verify what was mentioned above, one uses a simulator, which is a


characteristic of GLOFA to perform an experiment to check whether there is any

www.ed.co.kr
PLC Practice using ED-4260 Trainer

abnormality in the circuit and its activation. (Refer to the figure.)

The figure above shows that when the simulator is chosen to execute CPU with the
RUN(R) mode, and turn on the number 0(%IX0.0.0) of START input slot "0", out-
put OUT20(%QX0.2.0) and OUT30(%QX0.3.0) are activated to start motor.
if one turns on START switch(%IX0.0.0), it is self-holded(latched) by M00, and
M01 is activated, and motor moves to the lower limit position because output
OUT20(%QX0.2.0) and OUT30(%QX0.3.0) are activated by M01. If LS01 is de-
tected at the lower limit position, M01 is turned off, and M02 is activated, and
motor moves to the upper limit position because output OUT21 (%QX0.2.1) and
OUT31(%QX0.3.1) are activated. If LS02 is detected at the upper limit position,
M02 is turned off, and M01 causes the appliance to move back to the lower limit
position and repetitively operate until one presses STOP switch.
To stop the simulator, just click shortcut in its right upper portion.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

2) Connection Diagram with the Equipment

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Task 13 Stepping Motor Circuit Practice using Timer

1. Purpose of Experiment

1) Understand stepping motor circuit pertaining to position control using PLC.


2) Learn about I/O(INPUT/OUTPUT) MAP of PLC.
3) Understand activating principle of sensor(contactless input element).
4) Understand structure and principle of PLC TRAINER(ED-4260).

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand activation mechanism of stepping motor.


2) One should be able to understand basic Sequence control circuit.
3) One should be able to understand timer circuit.
4) One should be able to understand sensor.
5) One should be able to configure PLC I/O MAP.

4. Activating Condition

1) Build a circuit in such a way that both START switch and STOP switch are used,
and stepping motor stops at a designated position using sensor.
2) Build a circuit in such a way that when START switch turns on, stepping motor
begins to rotate, and sensor stops it as its rotation reaches 360.
3) If STOP switch turns on during operation, stepping modor stops.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

4) PLC I/O MAP is configured as below.

Indirect I/O
Section Comment
Variable Name Assignment
Push Switch
START %IX0.0.0
S-2
Input Push Switch
STOP %IX0.0.1
S-3
SN_1 %IX0.0.2 SENSOR-3
OUT_0 %QX0.2.0 MOTOR-3 (B)
OUT_1 %QX0.2.1 MOTOR-3 (A)
Output
OUT_2 %QX0.2.2 MOTOR-3 (B1)
OUT_3 %QX0.2.3 MOTOR-3 (A1)

5) PLC input power supply consists of DC 24V, and PLC COM is connected to DC
0V(-) while switch COM is connected to DC 24V(+). Use variable power supply
DC 24V for output, and connect stepping motor's CT to (+), and PLC output
COM terminal to (-).
6) Configuring PLC I/O MAP is a very important work. It is so because PLC I/O
MAP estimates input/output point, and means control as well as input/output
configuration.

5. Program Practice

1) Execute GMWIN.
2) Open the Project window and the Program window.
3) Create a program using normally open contact point, normally closed contact
point, output coil, negative transition sensing pulse, timer, etc.
4) Refer to the previous task concerning programming method.
5) The figure below shows program that contains an example of motor's rotational
movement circuit.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

www.ed.co.kr
PLC Practice using ED-4260 Trainer

6. Execution of Program(using simulator)

1) To verify what was mentioned above, one uses a simulator, which is a


characteristic of GLOFA to perform an experiment to check whether there is any
abnormality in the circuit and its activation. (Refer to the figure.)

The figure above shows that when the simulator is chosen to execute CPU with
the RUN(R) mode, and turn on SN_1 as well as the number 0(%IX0.0.0) of
START switch input slot "0", timer is activated, which repetitively activates OUT0,
OUT1, OUT2, OUT3 in turn to let stepping motor rotate. Once SN_1 is activated,
M06 is activated, and self-holding circuit is released to stop stepping motor.
Stepping motor is stopped by STOP switch also.
To stop the simulator, just click shortcut in its right upper portion.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

2) Connection Diagram with the Equipment

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Task 14 Advenced Practice I (Quiz Program Practice)

1. Purpose of Experiment

- Develop application scope of PLC using various commands.

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand basic function of PLC.


2) One should be able to understand how to represent data.

4. Activating Condition

1) In a quiz program, both a presider and participants show up. The presider casts a
quiz for participants. A priority is given to the person who presses switch first, by
which lamp turns on with a buzzer sound. Design a program suited to this
scenario. (The lamp for the person who pressed switch first stays on until the
presider releases it with a reset button, and buzzer sounds for a second only.)
2) Design a program with a configuration of PLC I/O MAP as below.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Indirect I/O
Section Comment
Variable Name Allocation
PARTICIPANT1 %IX0.0.0 Push Switch 0
PARTICIPANT2 %IX0.0.1 Push Switch 1
Input
PARTICIPANT3 %IX0.0.2 Push Switch 2
PRESIDER %IX0.0.3 Push Switch 3
BUZZER %QX0.2.0 BUZZER (-)
PART_LAMP1 %QX0.2.1 LAMP 1
Output
PART_LAMP2 %QX0.2.2 LAMP 2
PART_LAMP3 %QX0.2.3 LAMP 3

3) Power supply consists of DC 24V, and PLC COM is connected to DC 0V while


switch COM and LAMP are connected to DC 24V.

5. Program Practice

1) Execute GMWIN and open the Project window and the Program window.
2) Create a program using PLC I/O MAP.
3) Refer to the previous task concerning or PLC self-teaching guide for any
programming help.

6. With the best use of monitoring and simulation, make a trial run to
verify whether the program really works.
(If the program does not work, then keep modifying it till completion.)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

LADDER DIAGRAM PROGRAM


Department( ) Year( ) Class( ) No.( ) Name( )
Program Name: Writing Date:

Row 0

Row 1

Row 2

Row 3

Row 4

Row 5

Row 6

Row 7

Row 8

Row 9

Row 10

Row 11

Row 12

Row 13

Row 14

Row 15

Row 16

Row 17

Row 18

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Task 15 Advenced Practice II (Electronic Timer Program Practice)

1. Purpose of Experiment

- Develop application scope of PLC using various commands.

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand basic function of PLC.


2) One should be able to understand how to represent data.

4. Activating Condition

1) Try to make an electronic timer(stop watch) using DISPLAY of OUTPUT module.


2) If START switch turns ON, then timer is activated, and proceeding time value is
outputted on DISPLAY.
3) If STOP switch turns ON, then timer stops.
4) If START switch is pressed, present value is initialized for repetitive execution.
5) Design a program with a configuration of PLC I/O MAP as below.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Indirect Memory
Section Comment
Variable Name Allocation
Push Switch
START %IX0.0.0
S-2
Input
Push Switch
STOP %IX0.0.1
S-3
OUT
Output TIME %QW0.2.0
DISPLAY

6) Power supply consists of DC 24V, and PLC COM is connected to DC 0V while


switch COM and LAMP are connected to DC 24V.

5. Program Practice

1) Execute GMWIN and open the Project window and the Program window.
2) Create a program using PLC I/O MAP.
3) Refer to the previous task concerning or PLC self-teaching guide for any
programming help.

6. With the best use of monitoring and simulation, make a trial run to
verify whether the program really works.
(If the program does not work, then keep modifying it till completion.)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

LADDER DIAGRAM PROGRAM


Department( ) Year( ) Class( ) No.( ) Name( )
Program Name: Writing Date:

Row 0

Row 1

Row 2

Row 3

Row 4

Row 5

Row 6

Row 7

Row 8

Row 9

Row 10

Row 11

Row 12

Row 13

Row 14

Row 15

Row 16

Row 17

Row 18

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Advenced Practice III


Task 16
(Lamp Shift Lighting Program Practice)

1. Purpose of Experiment

- Develop application scope of PLC using various commands.

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand basic function of PLC.


2) One should be able to understand how to represent data.

4. Activating Condition

1) Build a circuit in such a way that if start switch turns ON, lamps of LAMP 0
through LAMP 15 turn on in order every second whereas they are initialized as
soon as stop switch turns ON.
2) Design a program with a configuration of PLC I/O MAP as below. (Use indirect
variable.)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Indirect Memory
Section Comment
Variable Name Allocation
Push Switch
START %IX0.0.0
S-2
Input
Push Switch
STOP %IX0.0.1
S-3
LAMP0 %QX0.2.0 Lamp 0
LAMP1 %QX0.2.1 Lamp 1
Output : : :
LAMP14 %QX0.2.14 Lamp 14
LAMP15 %QX0.2.15 Lamp 15

3) Power supply consists of DC 24V, and PLC COM is connected to DC 0V while


switch COM and LAMP are connected to DC 24V.

5. Program Practice

1) Execute GMWIN and open the Project window and the Program window.
2) Create a program using PLC I/O MAP.
3) Refer to the previous task concerning or PLC self-teaching guide for any
programming help.

6. With the best use of monitoring and simulation, make a trial run to
verify whether the program really works.
(If the program does not work, then keep modifying it till completion.)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

LADDER DIAGRAM PROGRAM


Department( ) Year( ) Class( ) No.( ) Name( )
Program Name: Writing Date:

Row 0

Row 1

Row 2

Row 3

Row 4

Row 5

Row 6

Row 7

Row 8

Row 9

Row 10

Row 11

Row 12

Row 13

Row 14

Row 15

Row 16

Row 17

Row 18

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Advenced Practice IV
Task 17
(Timer External Control Program Practice I)

1. Purpose of Experiment

- Develop application scope of PLC using various commands.

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) 25pin Connection Cable 2EA
5) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand basic function of PLC.


2) One should be able to understand how to represent data.

4. Activating Condition

1) Build a circuit in such a way that one inputs timer's preset value(TP) using digital
switch, and when start switch turns ON, and then timer is activated, lamp turns
on as timer reaches the preset value.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Indirect
Section Memory Allocation Comment
Variable Name
Toggle
START %IX0.0.0
Switch 0
Input
Digital
PT %IW0.1.0
Switch
LAMP %QX0.3.0 Lamp L-1
Output DISPLAY
DISPLAY %QW0.2.0
OUT

5. Program Practice

1) Execute GMWIN and open the Project window and the Program window.
2) Create a program using PLC I/O MAP.
3) Refer to the previous task concerning or PLC self-teaching guide for any
programming help.

6. With the best use of monitoring and simulation, make a trial run to
verify whether the program really works.
(If the program does not work, then keep modifying it till completion.)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

www.ed.co.kr
PLC Practice using ED-4260 Trainer

LADDER DIAGRAM PROGRAM


Department( ) Year( ) Class( ) No.( ) Name( )
Program Name: Writing Date:

Row 0

Row 1

Row 2

Row 3

Row 4

Row 5

Row 6

Row 7

Row 8

Row 9

Row 10

Row 11

Row 12

Row 13

Row 14

Row 15

Row 16

Row 17

Row 18

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Advenced Practice V
Task 18
(Timer External Control Program Practice II)

1. Purpose of Experiment
- Develop application scope of PLC using various commands.

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand basic function of PLC.


2) One should be able to understand how to represent data.

4. Activating Condition

1) Build a circuit in such a way that if one inputs timer's preset value(TP) using
digital input switch, and timer is activated as a result of turning on push button
switch, timer's activation time value should be displayed using 7-segment. If timer's
activation is completed, then lamp turns on. It is initialized by stop switch.

5. Program Practice

1) Execute GMWIN and open the Project window and the Program window.
2) Create a program using PLC I/O MAP.
3) Refer to the previous task concerning or PLC self-teaching guide for any
programming help.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Indirect
Section Memory Allocation Comment
Variable Name
Push Switch
START %IX0.0.0
S-2
Input Push Switch
STOP %IX0.0.1
S-3
PT %IW0.1.0 DIGITAL SW
ET %QW0.2.0 OUT DISPLAY
Output
LAMP0 %QX0.3.0 Lamp L-1

6. With the best use of monitoring and simulation, make a trial run to
verify whether the program really works.
(If the program does not work, then keep modifying it till completion.)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

LADDER DIAGRAM PROGRAM


Department( ) Year( ) Class( ) No.( ) Name( )
Program Name: Writing Date:

Row 0

Row 1

Row 2

Row 3

Row 4

Row 5

Row 6

Row 7

Row 8

Row 9

Row 10

Row 11

Row 12

Row 13

Row 14

Row 15

Row 16

Row 17

Row 18

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Task 19 Advenced Practice VI (Die Program Practice)

1. Purpose of Experiment

- Develop application scope of PLC using various commands(counter, MOVE).


- Develop application scope of conversion of BCD code to decimal.

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand basic function of PLC.


2) One should be able to understand how to represent data.

4. Activating Condition

1) Write a program using counter(TON), conversion function(INT_TO_BCD), and flag


command
2) Build a die circuit in such a way that if START switch is pressed, then counter
begins counting up to the preset value(PT) where counting restarts, and then if
STOP switch is pressed, then counter should stop, and the present value of
counter is displayed on OUTPUT DISPLAY.
3) Design in such a way that START switch should be pressed again to execute
repetitively.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

5. Program Practice

1) Execute GMWIN and open the Project window and the Program window.
2) Create a program using PLC I/O MAP.
3) Refer to the previous task concerning or PLC self-teaching guide for any
programming help.

Indirect
Section Memory Allocation Comment
Variable Name
Push Switch
START %IX0.0.0
S-2
Input
Push Switch
STOP %IX0.0.1
S-3
Output DISPLAY %QW0.2.0 OUT DISPLAY

6. With the best use of monitoring and simulation, make a trial run to
verify whether the program really works.
(If the program does not work, then keep modifying it till completion.)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

LADDER DIAGRAM PROGRAM


Department( ) Year( ) Class( ) No.( ) Name( )
Program Name: Writing Date:

Row 0

Row 1

Row 2

Row 3

Row 4

Row 5

Row 6

Row 7

Row 8

Row 9

Row 10

Row 11

Row 12

Row 13

Row 14

Row 15

Row 16

Row 17

Row 18

www.ed.co.kr
PLC Practice using ED-4260 Trainer

Advenced Practice VII (ONE-SHOT


Task 20
Circuit Practice using TP Timer)

1. Purpose of Experiment
- Develop application scope of PLC using various function block commands.
- Develop application scope using positive transition sensing coil contact point and
negative transition coil.

2. Preparation

1) ED-4260 PLC TRAINER 1EA


2) PC(GMWIN installed) 1EA
3) RS-232 CABLE 1EA
4) Connection Cable 1SET

3. Related Knowledge

1) One should be able to understand basic function of PLC.


2) One should be able to understand how to represent data.

4. Activating Condition

1) Write a program using TP timer, positive transition sensing coil contact point, and
negative transition sensing coil.
2) Design a circuit in such a way that if PB switch is pressed, then LAMP turns on,
and then LAMP turns off in three seconds.

www.ed.co.kr
PLC Practice using ED-4260 Trainer

5. Program Practice

1) Execute GMWIN and open the Project window and the Program window.
2) Create a program using PLC I/O MAP.
3) Refer to the previous task concerning or PLC self-teaching guide for any b
programming help.

Sectio Indirect Memory


Comment
n Variable Name Allocation
Push Switch
Input PB_SWITCH %IX0.0.0
S-2
Output LAMP %QW0.2.0 LAMP L-1

6. With the best use of monitoring and simulation, make a trial run to
verify whether the program really works.
(If the program does not work, then keep modifying it till completion.)

www.ed.co.kr
PLC Practice using ED-4260 Trainer

LADDER DIAGRAM PROGRAM


Department( ) Year( ) Class( ) No.( ) Name( )
Program Name: Writing Date:

Row 0

Row 1

Row 2

Row 3

Row 4

Row 5

Row 6

Row 7

Row 8

Row 9

Row 10

Row 11

Row 12

Row 13

Row 14

Row 15

Row 16

Row 17

Row 18

www.ed.co.kr

You might also like