Learn PLC Programming Relay Sequences
Learn PLC Programming Relay Sequences
Safety Precautions
(Be sure to read this before the training.)
Before designing a system, be sure to read this manual and pay close
attention to safety.
During the training, pay attention to the following points to ensure
correct handling.
CAUTION
Proceed with the training under the guidance of a teacher.
Do not remove the training machine module or change the wiring
without permission. Doing so may result in malfunction, misoperation,
injury or fire.
Before attaching or detaching the module, turn the power OFF.
Attaching or detaching the module while it is still ON may cause the
module to malfunction or cause an electric shock.
If unusual odor is detected with the training machine (X/Y table, etc.)
immediately turn the power switch to OFF.
If an abnormal event occurs, immediately contact your teacher.
INTRODUCTION
This text book introduces basic knowledge you should be aware of for
sequence control together with simple examples for first-time users of
PLCs.
Descriptions in this text book are primarily for the teaching material FX-I/O
demonstration model that uses the micro PLC FX1S-14MR type.
Contents
Chapter 1 WHAT IS "SEQUENCE CONTROL?"
1.1 What Is "Sequence Control?" 4
1.2 Devices Associated with Sequence Control 6
1.3 Items Required for Sequence Control 8
1.4 Performing Wiring Based on Sequences 11
1.5 Let's Remember Sequence Symbols 16
Appendices
Appendix 1 The OPERATION OF THE GX Developer 51
Appendix 2 SFC Program Outline 99
Appendix 3 Training Machine's I/O wiring Example 101
(2) Succession
Sequence
Though operation of the car wash on the previous page was described in
approximate terms, this order is the basic way of thinking behind sequences, and
making this sequence operate correctly and automatically countless times as
intended becomes sequence control.
Sequence control is used extensively and is a vital approach in all situations and
all fields.
Household electrical appliances
Elevator
Factory
Sequence
control is
used
in a wide
range of fi
elds.
Power substations
Sequence control is used not just in complex applications but also in applications
very familiar to us.
Personnel
Sequence
Various devices are also combined to perform sequence
control in a car wash, for example.
Devices for making machines move
Start
Stop
The devices shown in this figure are just examples and only a few of many such
devices.
In sequence control, combinations of devices such as these are made to operate
in accordance with a work procedure.
Of these devices, "devices operated by personnel" and "devices for detecting
machine states" become the conditions for making things move in sequence
control, while "devices that notify personnel of machine states" and "devices for
making machines move" are the devices that are operated in accordance with
these conditions.
Operation panel A panel on which "devices operated by personnel"
(pushbutton switches, selector switches, etc.) and
"devices for notifying personnel of machine states"
(lamps, digital displays, etc.) are installed.
Control panel A panel on which devices, such as electromagnetic
contactors, relays and PLCs, for controlling machine
movement, are installed.
Though small-load devices such as
small-size solenoid valves and pilot
lamps can be driven directly by a PLC,
large-load devices such as large-size
solenoid valves must be driven via an
electromagnetic contact or relays.
Magnetic contactors, relays, etc.
Control
Machine
s
er
ply
up
Po
Pushbutton
Blue lamp
Red lamp
Relay
Moving contact
When electricity flows to
the magnetic, the moving
contact is actuated.
Fixed contact
Magnet
Flow of
electricity
Magnet
About contacts
A "contact" is a contacting part that performs switching operation, and
allows electricity to pass or blocks electricity. Other forms of contacts were
found in switches, timers, counters and other devices. There are two types
of contacts, N.O. contacts and N.C. contacts. (See next page)
12VDC(direct current)
100VAC(Alternate currect)
(2) Relays can make motors and lamps in remote sites operate.
About contacts
Contacts perform a switching operation to block electricity or make parts conduct.
Basic contacts are N.O. contacts and N.C. contacts, and switches, relays,
timers, counters and other devices have contacts.
N.O. contacts
A "N.O. contact" is a "normally open" contact, and closes when an instruction
(Note 1) is made to the contact.
Note 1 An "instruction" here means "causing an operation or change." The operation of
pressing a pushbutton corresponds to an instruction.
Pushbutton
Moving contact
Moving contact
Circuit
open
Fixed contact
Flow of
electricity
Contact
Fixed contact
Wiring
Wiring
Wiring
Spring
Before button is pressed (in return position)
Spring
After button is pressed (in operating position)
N.C. contacts
A "N.C. contact" is a "normally closed" contact, and opens when an instruction is made.
Operation: In the case of a pushbutton switch
When the pushbutton switch is not pressed, the contact is closed.
When it is pressed, the contact opens.
Press button
Flow of
electricity
Wiring
Pushbutton
Circuit
closed
Moving contact
10
Wiring
Wiring
Fixed contact
Spring
Circuit
open
Fixed contact
Moving contact
Spring
DC power supply
Blue lamp
Red lamp
demonstration model
Pushbutton
Product configuration
Power cable
1 pc
Pushbutton
1 pc
Blue lamp
1 pc
Red lamp
1 pc
Relay
Relay
1 pc
Wires (brown, red, orange, yellow,
green, blue, purple, gray)
1 each
Let's wire the training demonstration model. Figure 1.Blue lamp
Red
Blue
Lamp 1
Lamp 2
Lamp 1
Lamp 2
Pushbutton
Pushbutton switch
N.O. contact
Wiring diagram
Blue
Lamp 1
Lamp 2
Lamp 1
Lamp 2
Pushbutton
Red
Pushbutton switch
11
Power ON
NO
Pushbutton
switch not
pressed?
YES
NO
Pressed
Pushbutton
Closed
Relay
Operating
Blue lamp
Lit
Lit
Red lamp
Lit
You can also learn the content of sequence control from flow charts and time charts.
12
Lamp 1
Lamp 2
Lamp 1
Lamp 2
4 5 7
3
Pushbutton
1
6
Pushbutton switch
N.O. contact
Sequence Diagram
DC power supply
PB
Pushbutton switch
RELAY
Relay coil
AC power supply
BLUE
Blue
RED
Red
13
Transfer pump
Pump
LS2 (N.C. contact)
Float switch turns OFF
when tank is full.
LS2 OFF
Well
14
Stop
Operation
Motor
Empty
LS2 ON
Water
level
LS1 ON
LS1 OFF
Full
Sequence diagram
Breaker
MC
Motor
power
supply
Motor
MC
Breaker
Start switch
LS2 3
LS1
MC
N.O. contact
N.C. contact
The start switch The float switch
turns OFF when
stays ON even
if it is released. the tank is full.
(residual operation
type)
N.O. contact
The float switch turns ON
when the tank is empty.
Magnet
switch
MC 2
Full
Empty
Water level
mid position
Operation
Full
Even when the float
switch LS1 turns OFF,
operation of the magnet
switch continues due to
the self-holding circuit.
15
N.O. Contact
N.C. Contact
Drive Source
Product Category
Pushbutton
switch
(Autoreturn type)
Manual
Pushbutton
switch
(residual
operation type)
Manual
Thermal
relay
(OCR)
Limit
switch
(general)
Limit
switch
(mechanical
operation)
Heater
Operation
Manual
Dog
cam
Auxiliary
switch relay
contact
Magnetic
contactor
Timer
ON delay
Timer
OFF delay
16
Electromagnetic
coil
Actually
So far, we have performed "sequence control" by physically wiring relays
and timers. This chapter considers the use of a simple PLC program to
control electronic devices.
17
Devices operated
by personnel
Sequence control
Machine
Sensors, etc.
The devices that are operated by personnel or that detect machine states in
sequence control are called "instruction signals" or "condition signals."
Devices that notify personnel of machine states or that move machines are
called "loads."
PLCs are responsible for carrying out "sequence control." The diagram above
illustrates the control of these devices. Where the condition signals and loads in
the devices are connected to the PLC.
18
Input Devices
PLC
Limit switches
Contactor
Storage
section
Relay contact
Operation
section
Power supply
Output interface
Pushbutton switch
Input interface
Select switch
Memory
Lamp
Solenoid valve
(solenoid valve)
Power supply
Microcomputer
Output Devices
Devices connected to the input side of the PLC are called "input devices," while
devices connected to the output side of the PLC are called "output devices."
One device is connected to each terminal block.
One input device and one output device may merely be connected to a PLC in
this way, and the connection for performing sequence control is performed
electronically inside the PLC.
PLC internal connections are programmed using dedicated sequence language
(instructions), and a combination of these instructions is called a "sequence
program." Sequence control is performed in accordance with this program, so
there is no need to wire externally.
19
Output of output
relay operation
External load
operated
Power
supply
COM
X000
X001
Y100
X001
Y000
X003
X001
X005
M100
Y001
Timers
Timers
T
X005
PL
Y000
Y001
X003
X004
PB2
Y000
Output relays
Output relays
X002
LS1
Y000
X003
X001
PB1
Y001
Y002
Y002
Y002
MC
K100
X006
Y003
X005
X007
X007
M100
Auxiliary
Auxiliary relays
relays
Contacts for
external outputs
Input relays
PLC
The figure above shows how the input devices, output devices and the sequence program are configured.
The input devices is connected to the PLC's input relays, and the output device is controlled via contacts for external outputs.
Input relays
The input relays convert the signals from an external device to signals for the
PLC. In the above figure, the input device is designed to operate merely by
connecting across the input terminal and the COM terminal.
However it should be noted that PLCs have a limited number of contacts, even
though, an infinite number of contacts is provided on the sequence program.
Operation
COM
Input terminal
Input device
Input relay
PLC
20
Power supply
An I/O number is assigned to each terminal to make the I/O devices connected
to the input terminals and output terminals correspond to the input relays and
output relays of the sequence program.
Timers and counters held internally by the PLC are also assigned to devices
numbers in addition to each terminal number.
Element numbers Element numbers comprise a symbol that shows what the
devices is and a number that categorizes individual devices.
Input relays : X000~
Timers
: T 0~
0~
Counters are held internally by the
PLC and count numbers. When a
preset number is reached, a contact
closes.
Counters
:C
Auxiliary relays : M 0~
Reference
Octal
Decimal
Hexadecimal
Decimal
"Decimal" The decimal number system is used most often, and counts up numbers in
units of ten in the format 0 to 9, 10 to 19, 20 to 29 and so forth.
The octal number system counts up numbers in units of eight in the format
"Octal"
0 to 7, 10 to 17, 20 to 27 and so forth.
"Hexadecimal" The hexadecimal number system counts up numbers in units of 16 in the
format 0 to 9, 0A, 0B, 0C, 0D, 0E, 0F, 10 to 19, 1A, 1B, 1C, 1D, 1E, 1F and
so forth.
21
MC
LS2
LS1
Sequence program
X000
X002
X001
SW
LS2
LS1
Y000
Y000
SW
MC
MC
MC
The following describes the various differences when a relay sequence program
is replaced with a sequence program.
(1) How N.O. contacts and N.C. contacts are expressed
Relay sequence diagram
Sequence program
N.O. contact
N.O. contact
N.C. contact
N.C. contact
(4) Limit switch 2 in the sequence diagram is a N.C. contact but becomes a N.O.
contact in a sequence program.
This is because the role of limit switch 2 in the above sequence diagram is to
break the self-hold circuit of the MC and stop the MC. So, we should consider
that it is in a conducting state at all times on the circuit.
Next, remember the operation of the input relay on page 2-4. In operation of
the N.O. contacts and N.C. contacts in the sequence program, N.O. contacts
turn ON and N.C. contacts turn OFF when the input relay is electrically
conducting due to a change in state of the contact on the external wiring. Due
to this fact, a N.O. contact must be used on the sequence program to obtain
the same operating state.
In this way, when a PLC is used, N.O. contacts and N.C. contacts can be
used for each of the contacts on the sequence program.
22
Fuse
COM
SW
LS1
LS2
Intput wiring
COM
X000
X002
X001
X000
Y000
X001
Y000
MC
Y000
X002
Sequence program
Output wiring
The wiring of a PLC wiring can be divided up into I/O wiring and internal wiring.
I/O wiring must be handled in the
conventional way using cutting pliers
and a screwdriver.
The connections between input terminals and input relay coils and between
output contacts of output relays and output terminals were already established at
the delivery from the factory.
23
MITSUBISHI
24
1
2
3
4
5
6
Economical
In general, PLC is more inexpensive than conventional control box
where 10 or more relays are required.
Improved reliability
Troubles due to relays and timers can be reduced and the component
with PLC can be used without any concern once the initial set-up of the
PLC is completed.
Improved maintainability
Maintenance can be done in an easy manner, since few parts with life
limitation are used and the PLC has a self diagnosis function.
Item
1
2
3
4
5
6
7
8
9
Functionality
Changeability of control
content
Relay control
PLC control
Reliability
Versatility
Device expandability
Ease of maintenance
Range of functions
Generally, large
Device size
Reference
25
26
SEQUENCE INSTRUCTIONS
Chapter 3
SEQUENCE INSTRUCTIONS
What you have learned up till now
So far we have explained that PLCs are a collection of many relays, timers and
counters, and that their internal sequences can be wired by key operation on a
programming panel. When performing this wiring work, rules matched to contact
and coil connection methods and types of coils are required. These rules are the
instructions.
Instructions are programmed in the format "instruction word + devices number"
or by individual instruction words.
This chapter introduces several of the basic instructions for programming a PLC.
27
The following table summarizes the instructions held by a PLC, the meanings of
each instruction and how the circuit is indicated in a sequence program.
Symbol, Name
LD
Load
LDI
Load inverse
AND
AND
ANI
AND inverse
OR
OR
ORI
OR inverse
ANB
AND block
ORB
OR block
OUT
Out
SET
Set
RST
Reset
Function
Circuit Indication
Bus connection
instruction,
N.O. contact
Bus connection
instruction,
N.C. contact
Series connection,
N.O. contact
Series connection,
N.C. contact
Parallel connection,
N.O. contact
Parallel connection,
N.C. contact
Series connection
between blocks
Parallel connection
between blocks
Coil drive
instruction
Retain operation,
coil instruction
Cancel retain
operation, coil
instruction
NOP
No operation
No operation
END
End of program
END
28
End of program
Return to 0 step
0
1
2
3
4
5
6
9
Instruction
X001
LD
OR
ANI
OUT
LD
ANI
OUT
END
X001
Y000
X003
Y000
Y000
X006
T1 K30
X003
Y000
0
Y000
Repeat operation
Step
number
K30
X006
4
T1
END
29
FX1S PLC
Insert in direction
marked by triangle
mark.
FX-20P-CAB0 type
program cable
Clear
Repeatedly press
this cursor key.
Reference
Read
/
Write
HPP Operations
Insert Monitor
/
/
Delete
Test
30
Load
Bus connection
instruction for N.O.
contacts
LD
LDI
OUT
END
Load inverse
Bus connection
instruction for N.C.
contacts
Out
Coil drive instruction
Step numbers
Step numbers indicate the order and
size of a program.
If you program instructions in the
order of the list program, the PLC will
automatically assign the step
numbers.
End
Instruction used for
the end of a program
Circuit program
List program
Step
0
1
2
3
4
OUT(Note 2)
X 000
0
Y 000
Instruction
LD
X 000
OUT Y 000
LDI
X 000
OUT Y 003
END
X 000
2
Y 003
LDI(Note 1)
(Note 1)
END
OFF
ON
OFF
Output Y 000
OFF
ON
OFF
ON
OFF
ON
Output Y 003
31
Set
Operation hold
output instruction
SET
RST
Reset
Operation hold
cancel instruction
Circuit program
List program
X 001
0
SET
Y 000
RST
Y 000
X 003
2
END
ON
Input X 003
Output Y 000
ON
ON
32
Step
0
1
2
3
4
Instruction
LD
X 001
SET Y 000
LD
X 003
RST Y 000
END
AND
Series connection
instruction for N.O.
contacts
AND
ANI
AND inverse
Series connection
instruction for N.C.
contacts
Circuit program
AND
X 000
X 001
List program
Step
0
1
2
3
4
5
6
ANI
X 002
Y 000
X 003
Y 003
Instruction
LD
X 000
AND X 001
ANI X 002
OUT Y 000
AND X 003
OUT Y 003
END
AND(Note 1)
6
END
ON
Input X 001
ON
Input X 002
ON
ON
OFF
Input X 003
Output Y 000
Output Y 003
ON
ON
ON
33
OR
Parallel connection
instruction for N.O.
contacts
OR
ORI
OR inverse
Parallel connection
instruction for N.C.
contacts
Circuit program
List program
Step
0
1
2
3
4
X 000
Y 000
X 001
X 002
END
ON
Input X 001
ON
Input X 002
ON
Output Y 000
OFF
ON
ON
34
Instruction
LD
X 000
OR
X 001
ORI X 002
OUT Y 000
END
AND block
Series connection
instruction for
parallel circuit block
ANB
Circuit program
List program
LD instruction also from
beginning of branch
X 000
0
X 001
ANB
X 002
Y 000
X 003
Parallel circuit block
OR instruction before
ANB instruction
END
ON
Input X 001
Input X 002
ON
ON
Input X 003
Output Y 000
Step
0
1
2
3
4
5
6
Instruction
LD
X 000
OR
X 001
LD
X 002
OR
X 003
ANB
OUT Y 000
END
ON
ON
ON
35
OR block
Parallel connection
instruction for series
circuit block
ORB
Circuit program
X 000
List program
X 001
Y 000
ORB
X 002
X 003
Step
0
1
2
3
4
5
6
Instruction
LD
X 000
AND X 001
LD
X 002
AND X 003
ORB
OUT Y 000
END
END
Input X 001
ON
ON
ON
Input X 002
Input X 003
Output Y 000
ON
ON
ON
36
NOP
No operation
No operation
instruction
When an all clear has been performed on a program, all instructions become
NOP.
The PLC ignores NOP instructions inserted between general instructions.
However, be sure to delete NOP instructions as much as possible as they use up
unnecessary program steps and make it longer to calculation programs.
ra
Time fo
break!
37
(2)
X 000
Y 000
(3)
(5)
X 001
X 003
(6)
Y 001
(4)
(7)
X 002
Y 002
(8)
(9)
X 004
X 005
(13)
Y 003
(10)
(11)
X 006
X 007
(12)
(14)
Y 004
(15)
Y 005
(16)
END
A program like the one above is made using 16 program steps, (1) to (16).
The following shows the above program rewritten as a list program.
Step
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
38
Instruction
X 000
LD
Y 000
OUT
X 001
LD
X 002
OR
X 003
AND
Y 001
OUT
Y 002
OUT
X 004
LD
X 005
AND
X 006
LD
X 007
AND
ORB
Y 003
OUT
Y 004
OUT
Y 005
OUT
END
Timers
Of the various timers available, this section
describes how to program a digital timer that
is held internally on a micro PLC.
Timer program
X 000
0
Y 000
T0
K 100
(10 secs)
T
Y 003
Step
0
1
Instruction
LD
X 000
OUT Y 000
OUT T0
SP
K 100
5
6
7
LD
T0
OUT Y 003
OUT T0 K100,
input from
Personal
Computer
END
Timer program
END
Monitor
mode
M
When the monitor mode is selected, "M" is
displayed at the top left of the FX-10P screen.
ON
ON
10 secs
ON
ON
39
Counters
Of the various counters available, this section
describes how to program a general-purpose
counter that is held internally on a micro PLC.
X 001
RST
C0
Reset input
X 003
C0
3
Count input
C
K10
Counter program
Step
0
1
3
Instruction
LD
X 001
RST C0
X 003
LD
OUT C0
K 10
SP
7
8
9
C0
LD
OUT Y 003
END
Y 003
END
Counter program
Key operation
Monitor
/
Test
Monitor
mode
Operation
Input X001
((reset)
t)
Input X003 (count)
Present value of
counter C0
0
Output Y003
10
ON
For example,
a pedometer
40
OUT T0 K10,
input from
Personal
Computer
X 003
List program
X 004
Y 003
Step
0
1
2
3
4
Instruction
LD
X 003
OR Y 003
ANI X 004
OUT Y 003
END
Y 003
ON
Input X004
Output Y003
Reference
ON
ON
41
42
Escalator
drive Y003
Illumination
lamp Y000
Passdetection switch: 0
X001
I/O assignments
Input
X001
Illumination lamp
Y000
Y003
Operation
(1)Let's assume that the escalator does not move until someone approaches it.
(2)When someone approaches the escalator and turns on pass detection switch:
0, the illumination lamp lights and the escalator starts to move. (Escalator
movement is up only.)
(3) The person is carried up by the escalator, and when that person moves off
the escalator, pass detection switch: 1 turns ON, and the illumination lamp
and escalator return to a non-operating state.
In this example, consider both pass detection switches: 0 and 1 as non-hold type
switches.
Another assumption in this example is that people do not continue to get on this
escalator.
43
Pass detection
switch: 1
X003
Y000
Illumination lamp ON
Y003
Escalator drive
Self hold
Y000
END
List program
Step
0
1
2
3
4
5
Instruction
LD X001
OR Y000
ANI X003
OUT Y000
OUT Y003
END
Key operation
After preparing for programming (see page 3-3), create the program using the
following key operations.
PLC power
ON
Read
Write
Online
selection
Write
0
1
N O P
N O P
1
1
O R
N O P
5
6
E N D
N O P
44
Y 0 0 0
I/O assignments
Input
Cup detection
Dispense tea button
Check tea leaves button
Replenish water tank lower limit switch
Replenish water tank upper limit switch
output
Y000
Y001
Y003
Explanation of operation
(1)When cup detection X000 is ON, and dispense tea button X001 is pressed
(X001 turns ON), dispense tea output Y001 operates, and hot water is poured
into the cup. Hot water is poured only for the duration that the button is
pressed, and stops being poured when you release your hand from the
button.
When cup detection X000 is OFF, hot water is not poured even by pressing
dispense tea button X001.
(2)When water in the replenish water tank gets low, lower limit switch X003 turns
ON and replenish water output Y003 operates.
When replenish water output Y003 operates and water is poured into the tank,
upper limit switch X004 finally turns ON, and replenish water output Y003
becomes non-operational.
(3)When water is replenished five times, the change tea leaves indicator lamp
lights.
(4)When the check button is pressed, the change tea leaves indicator lamp goes
out.
45
X 001
Cup detection
X 003
X 004
Y 001
Y 003
Y 003
Self hold
Y 003
C0
Replenish water output
C
K5
0
Y 000
X 002
RST
C0
Counter reset
Check button
END
List program
Step
0
1
2
3
4
5
6
7
46
Instruction
LD
X000
AND X001
OUT Y001
LD
X003
OR Y003
ANI X004
OUT Y003
LD
Y003
OUT
SP
C0
K5
11
12
13
14
16
LD
OUT
LD
RST
END
C0
Y000
X002
C0
RUN
STOP
DOW
Operation start
N
Stop
button
X 001 button Fall start
X 000 button
X 002
I/O assignments
Input
Stop button
Operation start button
Fall start button
Fall end limit switch
Rise end limit switch
X000
X001
X002 (Consider this to be an auto-return type pushbutton.)
X003
X004
output
Y000
Y001
Y003
Explanation of operation
When operation start button X001 is pressed, drill rotation output Y003 operates
and the drill starts to rotate.
When stop button X000 is pressed, drill rotation output Y003 becomes nonoperational, and drill operation stops.
If fall start button X002 is pressed during drill rotation, drill fall output Y001
operates, and the drill starts to fall. When the drill finally reaches the position of
the fall end limit switch, fall end limit switch X003 turns ON, and the drill fall
operation stops.
Three seconds after the drill fall operation stops, drill rise output Y000 operates,
and the drill rises.
The drill rise operation ends when rise end limit switch X004 turns ON after drill
rise operation has begun.
47
X 000
Y 003
Drill rotation
Y 001
Drill fall
Stop button
Y 003
Self hold
X 002
X 003
Y 003
Y 000
Fall end
Interlock
limit switch
Self hold
X 003
T0
Fall end limit switch
K 30
T
Y 000
X 004
Y 001
Rise end
limit switch
Interlock
Y 000
Drill rise
Self hold
END
List program
Step
0
1
2
3
4
5
6
7
8
9
10
48
Instruction
LD
X001
OR
X003
ANI X000
OUT Y003
LD
Y002
OR
Y001
AND Y003
ANI X003
ANI Y000
OUT Y001
LD
X003
11
OUT
SP
T0
K30
14
15
16
17
18
19
LD
OR
ANI
ANI
OUT
END
T0
Y000
X004
Y001
Y000
Pushbutton
switch
X 000 Lamp X 001
Y 000
X 002
Lamp
Y 001
X 003
Children
Adults
PB4
SW
MC
Pushbutton
switch
X 004
Lucky chance
switch
X 005
I/O assignments
Input
Children's buttons
Adult's buttons
MC's button
Lucky chance switch
Explanation of operation
(1) Light the lamp that is the quickest to respond to the MC's question.
(2) The lamp lights until the MC presses pushbutton X004. Note, that the
children's team has an advantage as lamp Y000 can be made to light
whichever of pushbuttons X000 and X001 is pressed.
The adults' team have a disadvantage as lamp Y001 does not light unless
both pushbuttons X002 and X003 are pressed.
(3) When the MC has turned lucky chance switch X005 ON, the children have a
lucky chance to open the jackpot ball if they press the button within ten
seconds.
49
X 004
Y 001
MC
Adults
Y 000
Children's lamp
Y 001
Adults' lamp
Y 004
Children X 001
Children Y 000
X 003
X 004
MC
Y 000
Children
Adults Y 001
Children Y 000
X 005
Lucky chance
Y 004
X 005
T0
Lucky chance
K 100
END
List program
Let's try considering the program.
Step
Instruction
Step
10
11
12
13
14
15
16
17
18
19
20
50
Instruction
51
2) Menu bar
3) Tool bar
5) Edit screen
4) Project data list
6) Status bar
1) Title bar
The name of the opened project and the operation icon of windows are displayed.
Changing the size of GX Developer and quitting it
52
Minimizing GX Developer
Quitting GX Developer
2) Menu bar
3) Tool bar
The description
of the function
will be displayed
when the mouse
cursor stops at
the buttons.
*: The contents of the tool bar can be moved, added and removed, therefore the displayed items and
the layouts depend on the various environments.
The frequently used functions are configured by icon buttons. Compared to selecting from the menu,
the desired function can be directly executed.
Circuit creating window, parameter setting screen and so on are displayed by tree structure.
53
5) Edit screen
5) Edit screen
Circuit creating screen, monitor screen and so on are multiply displayed by windows.
6) Status bar
The status of the operation and setting is displayed.
Current input mode is displayed
54
CPU
type
Project
Program
Sequence program
Comment
Parameter
Device Memory
55
[MELSOFT Application]
[GX Developer]
2) GX Developer is started.
56
1) Click
1) Click
3) Select "FXCPU".
4) Click the [] button of [PLC type].
2) Click
5) Select "FX3U(C)".
Note: Select the series name that is actually
used.
4) Click
57
6) Click
OK
6) Click
Point
About the parameter setting
In FX PLC, it is not necessary to set the parameters when the comments stored in PLC are not
set or file registers are not used.
For the details of the parameters, see Appendix.
58
Point
X000
X002
Y000
Y000
X003
Y001
Point
The relationship between the function keys and the symbols of the circuit is displayed on the
buttons of the tool bar.
Main key operations
F5
F6
F7
Ctrl
F9
F9
F8
Shift
F5
Shift
F6
Shift
F9
Ctrl
F10
Use half-width characters when inputting. Full-width characters are not allowed.
59
1) Press the F5
Input "X2".
1) Input "X2"
key.
Cancel it by
[Cancel].
2) Confirm it by the
4) Input "X0"
7) Input "Y0"
60
Enter
key or [OK].
X2
is displayed.
key.
Enter
X0
key or [OK].
is displayed.
key.
Enter
key or [OK].
ESC
or
Y0
is displayed.
12) The circuit input
13) Move the cursor to the beginning of the next
line.
key.
14) Press the F5
Input "X3".
15) Confirm it by the Enter key or [OK].
X3
is displayed.
key.
Enter
key or [OK].
F4
(Convert)
F4
(Convert) key.
from the tool bar, or select
61
X000
Point
Y000
Y000
X003
Y001
Point
Click the tool buttons to input the symbols of the circuit.
Main tool buttons
Use half-width characters when inputting. Full-width characters are not allowed.
62
2) Click
Cancel it by ESC
or [Cancel].
2) Confirm it by the
4) Input "X0"
5) Click
7) Input Y0
8) Click
10) Input Y0
Enter
key or [OK].
X2
X0
11) Click
63
Y0
15) Click
is displayed.
12) The circuit input
13) Move the cursor to the beginning of the next
line.
.
14) Click the tool button
Input "X3".
15) Confirm it by the Enter key or [OK].
X3
18) Click
F4 (Convert)
F4
(Convert) key.
from the tool bar, or select
64
S/S
0V
24V
X0
X1
X2
X3
X4
X5
X6
X7
X10
X12
X11
IN
X13
X14
X15
X16
X17
X20
X21
X22
X23
X24
X25
X26
X27
0 1 2 3 4 5 6 7 20 21 22 23 24 25 26 27
10 11 12 13 14 15 16 17
POWER
RUN
BATT
ERROR
FX3U-48MR/ES
OUT
FX3U-48M
PLC
0 1 2 3 4 5 6 7 20 21 22 23 24 25 26 27
10 11 12 13 14 15 16 17
Y0
Y2
COM1
Y1
Y3
Y4
Y6
COM2
Y5
Y7
Y10
Y12
COM3
Y11
Y13
Y14
Y16
Y20
Y22
Y24
Y26
COM5
COM4 Y15
Y17
Y21
Y23
Y25
Y27
built-in port
(RS-422)
RS-232C
F2-232CAB-1
FX-422CAB0
GX Developer
FX-232AWC-H
(RS-232C/RS-422 converter)
S/S
0V
24V
X0
X1
X2
X3
X4
X5
X6
X7
X10
X12
X11
IN
X13
X14
X15
X16
X17
X20
X21
X22
X23
X24
X25
X26
X27
0 1 2 3 4 5 6 7 20 21 22 23 24 25 26 27
10 11 12 13 14 15 16 17
POWER
RUN
BATT
ERROR
FX3U-48MR/ES
FX3U-48M
PLC
built-in port
Y0
Y2
COM1
Y1
Y3
OUT
0 1 2 3 4 5 6 7 20 21 22 23 24 25 26 27
10 11 12 13 14 15 16 17
Y4
Y6
COM2
Y5
Y7
Y10
Y12
COM3
Y11
Y13
Y14
Y16
Y20
Y22
Y24
Y26
COM5
COM4 Y15
Y17
Y21
Y23
Y25
Y27
USB
(RS-422)
GX Developer
FX-USB-AW
(USB/RS-422 converter)
Check the COM port number that the driver of FX-USB-AW assigns to the
personal computer. For the check procedures, see the manual of FX-USBAW.
65
S/S
0V
24V
X0
X1
X2
X3
X4
X5
X6
X7
X10
X12
X11
IN
X13
X14
X15
X16
X17
X20
X21
X22
X23
X24
X25
X26
X27
0 1 2 3 4 5 6 7 20 21 22 23 24 25 26 27
10 11 12 13 14 15 16 17
POWER
RUN
PLC
BATT
ERROR
FX3U-48MR/ES
built-in port
(RS-422)
FX3U-48M
Y0
Y2
COM1
Y1
Y3
OUT
0 1 2 3 4 5 6 7 20 21 22 23 24 25 26 27
10 11 12 13 14 15 16 17
Y4
Y6
COM2
Y5
Y7
Y10
Y12
COM3
Y11
Y13
Y14
Y16
Y20
Y22
Y24
Y26
COM5
COM4 Y15
Y17
Y21
Y23
Y25
Y27
GOT1000
RS-422
USB
GX Developer
USB
GT09-C30USB-5P
66
5) Click
6) Click
67
S/S
0V
24V
X0
X1
X2
X3
X4
X5
X6
X7
X10
X12
X11
IN
X13
X14
X15
X16
X17
X20
X21
X22
X23
X24
X25
X26
X27
0 1 2 3 4 5 6 7 20 21 22 23 24 25 26 27
10 11 12 13 14 15 16 17
POWER
RUN
BATT
ERROR
FX3U-48MR/ES
FX3U-48M
Y0
Y2
COM1
Y1
Y3
1) Set to "STOP"
OUT
0 1 2 3 4 5 6 7 20 21 22 23 24 25 26 27
10 11 12 13 14 15 16 17
Y4
Y6
COM2
Y5
Y7
Y10
Y12
COM3
Y11
Y13
Y14
Y16
Y20
Y22
Y24
Y26
COM5
COM4 Y15
Y17
Y21
Y23
Y25
Y27
2) Select
2) Click
4) Click
4) Click [Execute].
5) Click
68
S/S
0V
24V
X0
X1
X2
X3
X4
X5
X6
X7
X10
X12
X11
IN
X13
X14
X15
X16
X17
X20
X21
X22
X23
X24
X25
X26
X27
0 1 2 3 4 5 6 7 20 21 22 23 24 25 26 27
10 11 12 13 14 15 16 17
POWER
RUN
BATT
ERROR
FX3U-48MR/ES
OUT
FX3U-48M
Y0
Y2
COM1
Y1
Y3
1) Set to "RUN"
0 1 2 3 4 5 6 7 20 21 22 23 24 25 26 27
10 11 12 13 14 15 16 17
Y4
Y6
COM2
Y5
Y7
Y10
Y12
COM3
Y11
Y13
Y14
Y16
Y20
Y22
Y24
Y26
COM5
COM4 Y15
Y17
Y21
Y23
Y25
Y27
2) Select
from the tool bar or select [Online]
[Monitor] [Monitor mode] from the menu.
2) Click
1) Set [Switch X002 is "ON"] with the status [Switch X000 is "OFF"], and then check [Output Y000 is
"ON"].
2) Check [Output Y000 is "ON"] while [Switch X002 is "OFF"].
3) Set [Switch X000 is "ON"] and then check [Output Y000 is "OFF"].
4) Check [Output Y001 is "ON/OFF"] in accordance with [Switch X003 is "ON/OFF"].
69
Reference
(1) The display of the monitor status dialog
1)
2)
3)
4)
1) Scan time
The maximum scan time of the sequence
program is displayed.
2) PLC status
The status of the PLC is displayed.
3) The execution status of the monitor
It is flashing when the monitor is being
executed.
4) Memory type display
The memory type of the PLC is displayed.
(2) The interpretation of the status display for the circuit monitor
1) Contact Instruction
Input contact
Type
X0: OFF
X0: ON
X000
X000
Circuit open
Circuit close
X000
X000
Circuit close
Circuit open
Non-execution/
Non-drive
Execution/Drive
Y000
Y000
SET M0
SET M0
NO contact
NC contact
2) Out Instruction
Driving status
Type
OUT instruction
SET instruction,
etc.
The ON/OFF status of the device to be rest is displayed by the monitor using RST instruction.
Type
RST instruction
70
RST M0
When device to be
reset is ON
RST M0
Use half-width characters when inputting. Full-width characters are not allowed.
Switch between "Ovrwrte" and "Insert"
Set to "Ovrwrte" when correcting the already created circuit diagram.
The new circuit will be inserted when the "Insert" mode is set to.
It switches between
"Ovrwrte" and "Insert"
by pressing the Insert key.
71
X000
Y000
Y000
Change to
Y002
X003
Y001
2) Change "Y002"
F4
(Convert)
5) Confirm the changes by pressing the
(Convert) key.
72
F4
2) Adding lines
[The circuit where lines are to be added to]
X002
X000
Y000
Y000
Y003
X003
Y001
1) Click
1) Click
F10
2) Drag
5) Input "Y3".
6) Confirm it by the
5) Change "Y003"
Enter
key or [OK].
F4
(Convert)
8) Confirm the changes by pressing the
(Convert) key
F4
74
3) Deleting lines
[The circuit where lines are to be deleted]
X002
X000
Y000
Delete this
circuit
Y000
Y003
X003
Y001
1) Click
2) Drag
1) Click
Alt
F9
Delete
key.
75
F4
(Convert)
6) Confirm the changes by pressing the
(Convert) key.
F4
76
X000
Y000
Y000
X003
Y001
4) Add a circuit
Convert
77
2) Deleting lines
[ The circuit where a line is to be deleted ]
X001
Y002
X002
X000
Y000
Y000
X003
Y001
Point
The line to be deleted is displayed in grey.
Confirm it by pressing Convert (F4).
78
X000
Y002
Y002
X004
Y004
4) The selected
area is cut
79
X002
X000
Y000
Copy this
line
Y000
X004
Y004
X002
X000
Y000
Paste it to
this line
Y000
3) Execute
copy
Point
Switch by the Insert key
"Ovrwrte" mode : Pastes by overwriting in
the cursor position.
"Insert" mode : Pastes by inserting in the
cursor position.
5) Select
from the tool bar or select [Edit]
[Paste] ( Ctrl + V ) from the menu.
The grey displayed part is remained when one part of
the circuit is pasted. Confirm it by the F4 (Convert) key
after the circuit is amended.
5) Finish copy/paste
80
Convert
1) Click
5) Click
6) Click Yes
finish it.
6) Click
Reference
The following characters cannot be used in the project name.
/ , ,> ,< ,* ,? , , , | , : , ; ( ; , are only used to specify the driver)
Also, do not use . (period) at the end of the project name.
When the project name is specified with 8 or more characters by GX Developer (later than SW6D5GPPW), characters past the 8th character will not be displayed if read by the old versions (older than
SW2D5-GPPW) of GX Developer.
The project path plus its name is within 150 half-width characters (75 full-width characters).
The tile is within 32 half-width characters (16 full-width characters).
If there are spaces in the project path and project name, GX Developer cannot start normally even if
GPPW.gpj, ***.gps is double-clicked in the Explorer window.
If there are spaces in the project path and project name, open the project by starting GX Developer
selecting [Project] [Open project] from the menu.
81
Convert
1) Click
6) Click Yes
finish it.
6) Click
82
1) Click
4) Click
3) Select the project name
83
1) Select
from the tool bar or select [Online]
[Monitor] [Monitor mode] from the menu.
84
Reference
(1) the display of the monitor status dialog
1)
2)
3)
4)
1) Scan time
The maximum scan time of the sequence
program is displayed.
2) PLC status
The status of the PLC is displayed.
3) The execution status of the monitor
It is flashing when the monitor is being
executed.
4) Memory type display
The memory type of the PLC is displayed.
(2) The interpretation of the status display for the circuit monitor
1) Contact Instruction
Input contact
Type
X0: OFF
X0: ON
X000
X000
Circuit open
Circuit close
X000
X000
Circuit close
Circuit open
Non-execution/
Non-drive
Execution/Drive
Y000
Y000
SET M0
SET M0
NO contact
NC contact
2) Out Instruction
Driving status
Type
OUT instruction
SET instruction,
etc.
The ON/OFF status of the device to be reset is displayed by the monitor using RST instruction.
Type
RST instruction
RST M0
When device to be
reset is ON
RST M0
85
5) Click [Register].
5) Click
Select "32 bit integer"
when you want to
nomitorthe device in
32 bits.
7) Click
86
7) Click
9) Click
87
88
Reference
The specified device can be forcedly turned on/off by double-clicking any bit device (contact, coil) in
[Circuit monitor window] while pressing the [Shift] key.
89
4) New value
90
5) Click
Shift+F4
4) Click
5) Click
Caution
It is impossible to write the program to PLC if the program before corrected in PLC is different from
the one in GX Developer. Verify it in advance, or transfer it by [Write to PLC] if not knowing whether
they are the same.
91
Type
Purpose
The number of
the characters
(full-width)
Remark
1) Device comment
16
2) Statement
32
3) Note
16
[Comment Examples]
2) Statement
START Circuit
0
X000
T7
Start Conveyor
Stop
Time
Y000
3) Note
Lamp
Green
Buzzer Time Setting
4 Y000
Lamp Green
8
1) Comment
T5
(Y001 )
Buzzer
2-second Timer
Point
>
K20 T5
B/D
T5
2-second B/D
Timer
10
8
Select [Display] [Display comment] from the menu and then the comments are displayed.
Do the above operation again to stop comment displaying
92
1) Click
3) Input comments
1) Double-click
2) Input the comment
1) Click
from the tool bar and double-click the
circuit diagram symbol to be commented.
2) Input the comment in the "Enter symbol"
window and click [OK].
on the tool bar again to finish the
Click
operation.
93
Point
It is necessary to set "Parameter setting" and "Comment range setting" to write the device comments
to PLC.
1) Parameter setting
Select [Parameter] [PLC parameter].
Set the "number of blocks" in the "Comment capacity" setting.
One block is equivalent to a 50-point comment, occupying the capacity of 500-step program
memory.
Comment
range setting
Reference
94
1) Double-click
1) Click
from the tool bar, and double-click
anywhere of the circuit block which the
statement is to be written to.
1) Click
from the tool bar, and double-click
the output instruction symbol which the note is
to be written to.
2) Input the note in the "Enter Note" window and
click [OK].
on the tool bar again to finish the
Click
operation.
95
96
X0
Enter
OUT
Y0
Enter
LDI
X0
Enter
AND
Y0
Enter
OUT
M0
Enter
LD
M0
Enter
OUT
T0
K10
Enter
OUT
C0
K5
Enter
K1 D0
Enter
CMP
K20 D3 M10
Enter
Reference
Insert
key.
97
1) Select
from the tool bar, or select
[View] [Circuit display] from the menu.
98
Appendix 2
SFC Program Outline
99
LS3
Motor
advance
retract
Operation
Start button
pushbutton
5 secs
pause
LS2
Retract
Advance LS4
2nd movement
Retract
100
Appendix 3
Training Machine's I/O Wiring Example
101
0
Start button pushbutton
S 20
X 003
Y 000
S 21
X 002
Retract
limit switch 2
S 22
T
K 50
Y 000
S 24
X 002
S 23
X 004
Retract
Y 001
Retract
limit switch 2
Retract
Reference
"Initial state" refers to the state at the top of the SFC.
"RUN pulse" is the signal that is generated when the PLC is in RUN
mode.
"Transition condition" refers to the transition signal that is used for moving between states.
SFC operation is shown as follows.
S 20
Y 000
S 20
Y 001
S 21
X 003
S 21
X 002
102
Y 000
X 003
X 002
Y 001
Breaker
Micro PLC
L
N
Y 000
Lamp (red)
Variable resistor
Low
High
X 000
Y 001
Pushbutton switch
Buzzer
X 001
Y 002
Pushbutton switch
Magnetic contactor
X 002
Toggle switch
Y 003
Relay
X 003
Contact
Motor
Limit switch
Y 004
X 004
Solenoid valve
Proximity switch
X 005
X 006
COM0
~
Select switch
COM
COM2
103
HEAD OFFICE: TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN
HIMEJI WORKS: 840, CHIYODA CHO, HIMEJI, JAPAN
JY997D22101B
(MEE)
Effective
Specifications are subject to change without notice.