25 AUTOMATIC REMOVAL OF NULL CHARACTERS INCLUDED IN SEND DATA
25.4 Program Example
413
25
Example of transmission using user frame
C24 transmits a string data using the NULL character automatic removal function to the target device.
Transmitting given data in combination with a user frame with PRR dedicated instruction
■Program example
For information on the module FB to be used, refer to the following manual.
MELSEC iQ-R Serial Communication Module Function Block Reference
Category Label name Description Device
Module label C24_1 Target module
Label to be defined Define the global label as shown below.
TTAL
12 3ABC
O
S
T
X
E
T
X
Q
X50
M0
M1
02
H
51
H
0A
H
00
H
3B
H
54
H
54
H
41
H
4C
H
3B
H
2D
H
01
H
(012D
H
)
03
H
A7
H
31
H
32
H
33
H
41
H
42
H
43
H
4F
H
PRR
ON
ON
(H) (L)
00
H
,
04
H
0
H
0
H
1
H
5
H
43F2
H
(*1)
43F3
H
(*1)
C001
H
(*1)
441B
H
(*1)
8000
H
(0004
H
)
42
H
,
41
H
(4241
H
)
00
H
,
43
H
(0043
H
)
00
H
,
33
H
(0033
H
)
32
H
,
31
H
(3231
H
)
Target device
Sum check
code
C24
Station No.
of target
device
Station
No. of C24
Data in transmission area
(arbitrary data portion)
; ; (Total
number)
Registration No. of
the corresponding
user frame
Corresponds to 3F2H
(for first designated frame)
Corresponds to 3F3H (for
second designated frame)
Corresponds to
8001H (for third
designated frame)
Corresponds to 8000H
(for fourth designated
frame)
Corresponds to 41BH
(for fifth designated
frame)
Buffer memory (frame designation)
User frame
being
transmitted
Transmission
command
(Not sent)(Sending)
User frame being transmitted
0H/Other than 0H
(Do not send)
CR/LF output designation
CPU module
(1st)
Output head pointer designation
Output count designation
Completion
device
Transmission frame no. designation (1st)
For transmit
user frame
designation
Abnormal
completion
Transmission frame no. designation (2nd)
Status display
device
at completion
Normal
completion
Transmission frame no. designation (3rd)
Transmission frame no. designation (4th)
1 scan
Transmission frame no. designation (5th)
Transmission frame no. designation (6th)
(*1): NULL characters deletion is not performed since b14 for
transmission frame No. designation is 'ON'.
Buffer memory (transmission area)
Transmission
data count
Transmission
data