Mitsubishi Electric FX2N Beginners Manual page 54

Hide thumbs Also See for FX2N:
Table of Contents

Advertisement

Programming PLC Applications
Programming
Now we can start writing the program. Whether relay devices are going to be needed and if so
how many usually only becomes clear once you actually start programming. What is certain in
this project is that we are going to need three timers for important functions. If we were using a
hard-wired controller we would use timer relays for this. In a PLC you have programmable elec-
tronic timers (see section 4.3). These timers can also be defined before we start programming:
Function
Timer
Next we can program the individual control tasks:
b Delayed arming of the alarm system
Ladder Diagram
X001
0
T0
4
When the key-operated switch is turned to ON the delay implemented with timer T0 starts to
run. After 20 seconds (K200 = 200 x 0.1s = 20s) the indicator lamp connected to output Y000
lights up, indicating that the system is armed.
b Monitor alarm circuits and trigger alarm signal
Ladder Diagram
X002
6
X003
10
X004
14
Output Y000 is polled in this routine to check whether the alarm system is armed. You could
also use a relay here that would then be set and reset together with Y000. An interruption of an
alarm circuit will only set relay M1 (indicating that an alarm has been triggered) if the alarm sys-
tem is actually armed. In addition to this outputs Y003 through Y005 are used to indicate which
alarm circuit triggered the alarm. Relay M1 and the corresponding alarm circuit output will
remain set even when the alarm circuit is closed again.
3 – 24
Arming delay
Alarm triggering delay
Siren activation duration
Y000
SET
SET
Y000
SET
SET
Y000
SET
SET
An Introduction to Programming
Adress
Remarks
T0
Time: 20 seconds
T1
Time: 10 seconds
T2
Time: 30 seconds
Instruction List
K200
0
T0
1
4
5
Y000
Instruction List
6
M1
7
8
9
Y003
10 LDI
11 AND
M1
12 SET
13 SET
14 LDI
Y004
15 AND
16 SET
M1
17 SET
Y005
LD
X001
OUT
T0
K200
LD
T0
OUT
Y000
LDI
X002
AND
Y000
SET
M1
SET
Y003
X003
Y000
M1
Y004
X004
Y000
M1
Y005
MITSUBISHI ELECTRIC

Advertisement

Table of Contents
loading

Table of Contents