Application Program For Data Reception Using A Combination That Specifies The Start Frame - Mitsubishi Electric MELSEC iQ-R Series User Manual

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

Advertisement

Application program for data reception using a combination that
specifies the start frame
The following shows the program example when receiving data using a combination that specifies the start frame.
Reception program example
Data reception using a user frame set with the following conditions is shown below.
■C24 interface used for communication with target device
CH1 side RS-232 interface of C24
■Parameter settings
For other than the following items, use default values.
Item
Word/byte units designation
Transparent code for receiving
specification
ASCII-BIN conversion designation
Receive end data quantity
Receive end code
User frame use enable/disable
designation
Start frame No. designation
*1
Final frame No. designation
User frame receiving method
designation
Method 1 dedicated receive end data
quantity designation
*1 It indicates the registered contents of the user frame No. specified to the start and final frame No., respectively.
■Registration contents in user frame
Item
Start frame No.
1st
2nd
3rd
4th
Final frame No.
1st
2nd
3rd
4th
■Program example
The following shows example of data reception with a user frame.
Category
Label name
Module label
C24_1
C24_1.stnCH1.bSet_Req_ReceptionRead
C24_1.stnCH1.bSts_ReceptionAbnormalDetection
C24_1.stnCH1.uResult_ReceiveUserFrame_D
Setting content
Buffer memory address
to store registration value
Word/byte
150(96H)
Designated/No
288(120H)
designation
Do not convert
289(121H)
6
164 (A4H)
No designation
165 (A5H)
Use
173 (ADH)
Designated
174 to 177 (AEH to B5H)
Method 0/Method 1
8224 to 8227 (2020H to 2023H)
0H to FFFFH
8228 to 8231 (2024H to 2027H)
User frame No.
3E8H
3E9H
6H
15H
41BH/8005H
0H (none)
0H (none)
0H (none)
Remarks
Set to either one according to the program example.
When 'Designated', Additional code: 10H (DLE)
Transparent code: 02H (STX)
Refer to the illustrations provided in this section.
Registered code
02H, 51H, 20H, 0AH, 3BH
02H, 41H, 3BH
06H
15H
03H, FFH, F0H
Description
Target module
CH1 Reception data read request
CH1 Reception abnormal detection
CH1_Receive user frame (nth)
15 DATA COMMUNICATIONS USING USER FRAMES
15.3 Program for Data Reception with User Frame
Registered data content
STX, Q, (SP), Station No. of target
device, ;
STX, A, ;
ACK
NAK
ETX, Sum check code
Device
X3
X4
U0\G603
15
303

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents