Mitsubishi Electronics AJ65bt-r2 사용자 설명서

다운로드
페이지 264
6 - 26
MELSEC-A
6   EXCHANGING DATA WITH AN EXTERNAL DEVICE
(3)   Program
The program for receiving data from an external device using the
transmission/reception buffer is shown below.
With the following program, the R2 buffer memory is used at the default value, so
the reception is completed when LF(A
H
) or CR(D
H
) is transmitted from the
external device.
Refer to section 5.1 for details on the program conditions.
(a)   When using the FROM/TO command with the ACPU / QCPU-
A (A mode)
R2 initialization (Refer to section 5.5.2 (4).)
R2 normal
Set data reception enable
flag
Call reception data read
program
Set reception read 
complete (RYn2)
Reset reception read 
complete (RYn2)
Reset data reception
enable flag
In itia liza tio n
c o m p le te
Master station initialization (parameter setting, data link setting) (Refer to section 5.4.)
Reading of remote input (RX) (Refer to section 5.3 (2).)
Confirmation of R2 data link status (Refer to section 5.3 (3).)
R2 error processing (Refer to section 5.3 (7).)
Writing of remote output (RY) (Refer to section 5.3 (8).)
1)   Program to read reception data
Change to bank 1
Dummy area
Set station No., request 
code
Set transmission buffer 
write data size
Quantity (Fixed)