Mitsubishi Electronics AJ65bt-r2 ユーザーズマニュアル

ページ / 264
9 - 28
MELSEC-A
9   PROGRAM EXAMPLES
9.3 Example of program for using transmission/reception buffer
An example of the program for using the transmission/reception buffer is given below.
9.3.1 When using FROM/TO command with ACPU / QCPU-A (A mode)
An example of the program for using the FROM/TO command with the ACPU / QCPU-
A (A mode) when using the transmission/reception buffer is shown below.
(1)   Main program
Master station initialization
No. of connected modules: 
   1 module
Write to master station
R2 station information 
(intelligent, one station
 occupied, station No. 1)
Write to master station
Write to master station
Set transmission buffer
size
Set reception buffer size
Set automatic update 
buffer size
Refresh indication
Start data link with buffer 
memory
Turn start request signal 
OFF when normal
Read parameter state
when abnormal
Turn start request signal 
OFF
Read remote input (RX) (X100 to X11F)
Change to bank 0
Confirm R2 data link state
Read RXn0 to RX(n+1)F
to X100 to X11F
Read R2 data link state
(SW0080)
R2 data link normal
R2 data link error
Error LED