8 APPLICATION INSTRUCTION
8.4 Structuring Instruction
401
8
Example in which outputs are latched
In the following program example, the counter C0 is provided to count X1. When X0 is input, the subroutine P0 is executed only in one scan, and then the
counter is reset and Y7 is output.
[Program example]
[Timing chart]
A: Execution of subroutine P0 triggered by X0
(1): Because the C0 reset instruction is valid, the
current value of C0 remains unchanged even if a
pulses are input.
(2): Outputs are latched.
Example in which latched outputs are reset (countermeasures)
[Program example]
(1): Program to reset Y7 at an arbitrary timing
(2): Program to reset the preceding C0 reset
instruction inside the subroutine
X0
P0
P0
CALLP
Y7
RET
X1
C0
K10
FEND
X0
C0
RST
RST
C0
Y7
X1
1
2
3
Subroutine is executed.
Remains reset
Y7 being output
(2)
(1)
A
Counter
reset
Current
value of
C0
X0
P0
P0
CALLP
RET
X1
C0
K10
(1)
(2)
FEND
X0
C0
A
RST
C0
RST
Y7
X2
Y7
RST
B
SM401
RUN Monitor
(normally OFF)
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......