Mitsubishi MELSEC System Q Manual page 128

Hide thumbs Also See for MELSEC System Q:
Table of Contents

Advertisement

Programming Tips for Timers and Counters
Ladder Diagram
When relay M15 is on the contents of data register D100 is copied to D31. This register
contains the setpoint value for T31. You could use a programming or control unit to adjust
the contents of D100.
The special relay SM402 is only set for a single program cycle directly after the PLC is
switched on. This is used to copy the constant value 34 into data register D5, which is then
used as the setpoint value for counter C0.
You don't have to write program instructions to copy the setpoint values to the data registers.
You could also use a programming unit to set them before the program is started, for example.
E
WARNING:
If you use normal registers the setpoint values will be lost when the power supply is
switched off and when the RUN/STOP switch is set to the STOP position. If this happens
hazardous conditions may be created next time the power is switched on and/or when
the PLC is started again, because all the set points will have a value of "0".
If you don't configure your program to copy the values automatically you should always
use latched data registers for storing the setpoint values for timers and counters. Also,
remember that even the contents of these registers will also be lost when the PLC is
switched off if the backup battery is empty.
5 – 16
Devices in Detail
MELSEC Instruction List
LD
M15
MOV
D100
D31
LD
X1
OUT
T31
D131
LD
SM402
MOV
K34
D5
LD
M50
OUT
C0
D5
IEC Instruction List
LD
M15
MOV_M
D100, D31
LD
X1
TIMER_M
TC31, D31
LD
SM402
MOV_M
K34, D5
LD
M50
COUNTER_M
CC0, D5
MITSUBISHI ELECTRIC

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents