6. BASIC INSTRUCTIONS
6
−
81
MELSEC-A
Program Examples CHG
The following programs are used with the A3CPU and other types of CPUs to output
pulses in accordance with the input condition of the PLS instruction while alternately
running the main and subprograms.
(1) For
A3CPU
It is necessary to compare the operation result of a scan with that of the
previous scan to allow correct output of the PLS instruction. M9050 must
therefore be turned ON when the CHG instruction is executed to save the
operation result of the previous scan, which has been stored in the operation
result storage memory, in the save area.
Since the CHG instruction for the A3CPU is executed only when input conditions
are turned ON, programs must be written in the forms shown below.
(2) For A3N, A73 and A3V CPUs
Since the CHG instruction for the A3NCPU is executed only when input
conditions are turned ON, programs must be written in the forms shown below.
(
)
(
)
Main sequence program
Sub sequence program
(
)
(
)
(
)
(
)
M9036
M0
M0
M0
M0
M0
P0
P1
M9051
M9051
M9051
M9057
M9057
M9050
M0
CJ P1
CHG
CHG
CJ P0
FEND
Always on
M9036
M1
M1
M1
M1
M1
P0
P1
M9051
M9051
M9051
M9056
M9056
M9050
M1
CJ P1
CHG
CHG
CJ P0
FEND
Always on
M0
M0
M0
M0
M0
P0
P1
M9051
M9051
M9051
M9057
M9057
M0
CJ P1
CHG
CHG
CJ P0
FEND
M1
M1
M1
M1
M1
P0
P1
M9051
M9051
M9051
M9056
M9056
M1
CJ P1
CHG
CHG
CJ P0
FEND
Main sequence program
Sub sequence program
Содержание MELSEC-A series
Страница 1: ......
Страница 2: ......
Страница 13: ...A 11 MEMO...
Страница 505: ...APPENDICES APP 100 MELSEC A MEMO...
Страница 507: ......
Страница 508: ......