Reception Control Method Using An Interrupt Program - Mitsubishi Electric MELSEC iQ-R Series User Manual

Serial communication module
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

8.3
Reception Control Method Using an Interrupt
Program
The following explains the reception control method when receiving data with an interrupt program during communication
using the nonprocedural protocol or bidirectional protocol.
<Data reception using the dedicated instruction,
BUFRCVS instruction (interrupt program)>
SM400
I50
Main program execution
Interrupt program execution
BUFRCVS instruction
Reception data read
request signal
Reception abnormal
detection signal
Buffer memory
reception area
 When data is received from the target device, the receive data is stored in the buffer memory and the 'CH1 reception data
read request' signal turns ON.
 The main program stops executing and the interrupt program starts.
 The data reception dedicated instruction, BUFRCVS, for the interrupt program is executed and data is received.
 When the execution of the BUFRCVS instruction is complete, the 'CH1 reception data read request' signal turns OFF.
 The execution of the interrupt program is completed, and execution of the main program restarts.
*1 When the reading of received data using the BUFRCVS instruction is finished, the following processes are performed.
 At normal completion
CPU module error flag (SM0) turns OFF.
 At abnormal completion
CPU module error flag (SM0) turns ON.
The error code is stored in the CPU module error code (SD0).
For more details on the error flag (SM0) and error codes (SD0) of the CPU module, refer to the following manual.
 MELSEC iQ-R CPU Module User's Manual (Application)
8 RECEIVING DATA WITH AN INTERRUPT PROGRAM
220

8.3 Reception Control Method Using an Interrupt Program

Z.BUFRCVS
"U0"
K1
Ó
Ô
Ò
X3
X4
Data reception
FEND
D200
Control data
[D200]: Word count for stored receive data
[D201]: Receive data
IRET
Ö
Õ
Reception using bidirectional
protocol
Response transmission
*1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents