Program For Data Reception - Mitsubishi Electric MELSEC iQ-R Series User Manual

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

Advertisement

Program for data reception

Program example for data reception
The following shows the program for data reception using the bidirectional protocol and program example.
For details on the BIDIN instruction, refer to the dedicated instructions. (Page 520 Dedicated Instructions)
Reception data read request
X3
M0
Module READY (X1E)
Reception data read request (X3)
BIDIN instruction
BIDIN instruction completion device
BIDIN instruction completion device +1
(Normal completion/Abnormal completion)
Receive data count (Un\G1536)
Received data (Un\G1537 to 2047)
 Start the programmable controller on the host station. The value set with Engineering tool is stored in C24.
 When data is received from the target device, the 'CH1 reception data read request' (X3) turns ON.
 After the control data for the BIDIN instruction is stored in the device, the sequence program executes the BIDIN
instruction and reads the receive data.
 When the reading of receive data is completed, a response message (ACK message when the operation was completed
normally) is sent and the device that has completed the BIDIN instruction turns ON.
4 DATA COMMUNICATION USING BIDIRECTIONAL PROTOCOL
92
4.1 Receiving Data from Target Device
M1
Ò
(OFF)
m
Data reception
Create control data from D0
G.BIDIN
Un
D0
Processing for normal completion(Storing received data)
Ó
Ô
BIDIN
n
Received data
Response transmission
(CH1)
D10
M0
Õ
1 scan

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents