7. PROGRAMMING
7.
PROGRAMMING
7.1 Important Points about Programming
This section describes how to create programs.
Follow the points below when creating a program.
(1) Creating a Slave Station I/O Communication Program
•
Place the I/O communication reading program at the beginning of the sequence
program.
•
Place the I/O communication writing program at the end of the sequence program.
Refresh processing request, I/O communication read program
(2) Read received data and write send data when no unit error has occurred and the unit is
in ready status.
Unit error
Unit ready
X0
X0F
(3) Create a program to detect the communication status of each station and apply an
interlock. Also, create processing programs to handle faults.
Unit error
Unit ready
X0
X0F
M0
M1
M0
M1
(4) In case parameter setting has been done previously with the sequence program, the
settings
are
stored
To set the parameters from the scratch, clear the "Parameter" area of the buffer memory
to zero(0).
I/O communication write program
Slave communication status
FROM
Station number 0 error processing program
Station number 1 error processing program
Station number 0 normal processing program
Station number 1 normal processing program
in
the
buffer
−
7
1
MELSEC-A
Communication program
H0
H1BC
K4M0
memory
when
powered
K4
ON.