Download  Print this page

Mitsubishi Electric MELSEC IQ-R series Reference Manual

Programmable controller.
Hide thumbs
   
1
2
3
4
5
6
Table of Contents
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498

Advertisement

MELSEC Communication Protocol
Reference Manual
-RJ71C24
-RJ71C24-R2
-RJ71C24-R4
-LJ71C24
-LJ71C24-R2
-LJ71E71-100
-QJ71C24N
-QJ71C24N-R2
-QJ71C24N-R4
-QJ71C24
-QJ71C24-R2
-QJ71E71-100
-QJ71E71-B5
-QJ71E71-B2

Advertisement

Table of Contents

   Also See for Mitsubishi Electric MELSEC IQ-R series

   Related Manuals for Mitsubishi Electric MELSEC IQ-R series

   Summary of Contents for Mitsubishi Electric MELSEC IQ-R series

  • Page 1 MELSEC Communication Protocol Reference Manual -RJ71C24 -RJ71C24-R2 -RJ71C24-R4 -LJ71C24 -LJ71C24-R2 -LJ71E71-100 -QJ71C24N -QJ71C24N-R2 -QJ71C24N-R4 -QJ71C24 -QJ71C24-R2 -QJ71E71-100 -QJ71E71-B5 -QJ71E71-B2...
  • Page 3: Safety Precautions

    SAFETY PRECAUTIONS (Read these precautions before using this product.) Before using this product, please read this manual and the relevant manuals carefully and pay full attention to safety to handle the product correctly. Note that these precautions apply only to this product. For the safety precautions of the programmable controller system, please read the User's Manual for the CPU module used.
  • Page 4 [Operating precautions] CAUTION ● When changing data and operating status, and modifying program of the running programmable controller from an external device such as a personal computer connected to an intelligent function module, read relevant manuals carefully and ensure the safety before operation. Incorrect change or modification may cause system malfunction, damage to the machines, or accidents.
  • Page 5: Conditions Of Use For The Product

    CONDITIONS OF USE FOR THE PRODUCT (1) Mitsubishi programmable controller ("the PRODUCT") shall be used in conditions; i) where any problem, fault or failure occurring in the PRODUCT, if any, shall not lead to any major or serious accident; ii) where the backup and fail-safe function are systematically or automatically provided outside of the PRODUCT for the case of any problem, fault or failure occurring in the PRODUCT.
  • Page 6: Introduction

    INTRODUCTION Thank you for purchasing the Mitsubishi programmable controller. This manual describes the supported devices, access range, communication procedure, and message format required for using MELSEC communication protocols listed below. Before using this product, thoroughly read this manual and the related manuals to develop full familiarity with the functions and performance of the programmable controller to ensure correct use.
  • Page 7: Table Of Contents

    CONTENTS SAFETY PRECAUTIONS ..............1 CONDITIONS OF USE FOR THE PRODUCT .
  • Page 8 Code ................. . 39 Frame .
  • Page 9 Random write in word units (test) (command: 1402)..........106 Random write in bit units (test) (command: 1402).
  • Page 10 Read CPU model name (command: 0101) ........... . 179 11.3 Remote Password .
  • Page 11 Write to file (command: 1829) ............. . 242 Close file (command: 182A) .
  • Page 12 Write to file (command: 1203) ............. . 325 Modify file information (command: 1204) .
  • Page 13 18.2 Details of Setting Data..............391 Header.
  • Page 14 Commands for 4C/3C/4E/3E frame............465 Commands for 2C frame .
  • Page 15: Relevant Manuals

    RELEVANT MANUALS Manual name [manual number] Description Available form MELSEC Communication Protocol Reference Manual Explains the specifications, access ranges, message protocols, and e-Manual [SH-080008](this manual) functions of MELSEC communication protocol. e-Manual refers to the Mitsubishi FA electronic book manuals that can be browsed using a dedicated tool. e-Manual has the following features: •...
  • Page 16: Terms

    An abbreviation for MELSEC communication protocol Protocols to access supported devices or programmable controller connected to supported devices from external devices. Module access device A generic term for module device access of MELSEC iQ-R series and intelligent function module devices of MELSEC-Q/L series. Multidrop connection...
  • Page 17: Discontinued Models

    DISCONTINUED MODELS The following models are described in this manual, but have no longer been produced. For the onerous repair term after discontinuation of production, refer to "WARRANTY" in this manual. Model Production discontinuation QJ71C24 January 2004 QJ71C24-R2 January 2004 QJ71CMO December 2012 QJ71CMON...
  • Page 18 MEMO...
  • Page 19: Melsec Communication Protocol

    PART 1 MELSEC COMMUNICATION PROTOCOL MELSEC communication protocol (hereinafter abbreviated as MC protocol) is a communication protocol for MELSEC programmable controller used when accessing programmable controller from an external device via C24 or E71. This part explains the overview and basic operations of MC protocol. 1 ABILITY OF MC PROTOCOL 2 SUPPORTED DEVICES AND ACCESSIBLE RANGES 3 COMMUNICATION PROCEDURE...
  • Page 20: Chapter 1 Ability Of Mc Protocol

    ABILITY OF MC PROTOCOL This chapter explains the purposes and features of the MC protocol. Purposes MC protocol performs data communication to control a programmable controller system on the external devices (such as a personal computer, GOT). Reading and writing data By reading/writing data to/from the device memory of the CPU module and buffer memory of the intelligent function modules, the following operations can be performed: ■Reading data...
  • Page 21: Features

    Features Communication from external device without using sequential programs The programmable controller transmits data in accordance with the commands from an external device. Thus, a program for data communication is not required for CPU module. (When using on-demand functions with C24, a sequence program for data communication from CPU module is required.) Communication protocols of C24/E71 The message formats and control procedures for an external device to access a programmable controller are defined for each...
  • Page 22: Chapter 2 Supported Devices And Accessible Ranges

    This manual explains MC protocol communication when connecting the devices shown below and external devices. Type Series Model name Reference Serial communication module MELSEC iQ-R series RJ71C24, RJ71C24-R2, RJ71C24-R4 Page 28 MESSAGES OF SERIAL COMMUNICATION MODULE MELSEC-L series LJ71C24, LJ71C24-R2...
  • Page 23 Accessible modules The following modules in the accessible range can be accessed However, the commands that can be used have some restrictions. (Page 471 Accessible Modules for Each Command) For the access to A series and QnA series modules, refer to the following sections. •...
  • Page 24: Chapter 3 Communication Procedure

    COMMUNICATION PROCEDURE This chapter explains the considerations when performing communication from an external devices to the programmable controller system using MC protocol. Features of Communication Process The following shows the features of data communication using MC protocol. Request messages and response messages There are two types of messages in MC protocol;...
  • Page 25: Considerations

    Considerations The following are the considerations when performing data communication. When accessing CPU module The following are the considerations when accessing a CPU module from an external device via a supported device. ■Processing timing of CPU module Processing for a request message is performed during an END processing of CPU module. External device External device Request message...
  • Page 26 When accessing MELSECNET/H or MELSECNET/10 remote I/O station The following are the considerations when accessing a MELSECNET/H remote I/O station or MELSECNET/10 remote I/O station from external devices. ■Considerations for supported frames 1E frame cannot be used for communication. ■Functions that can be used The functions that can be used for remote I/O station are as follows: Function MELSECNET/H remote I/O station...
  • Page 27: Considerations When Connecting C24

    Considerations when connecting C24 The following shows the considerations when performing data communication between C24. Conditions that C24 transmission sequence becomes initial status The transmission sequence of C24 becomes initial status under the following conditions. • When turning the power ON, changing the status of reset switch on the front of the CPU, and switching modes. •...
  • Page 28: Considerations When Connecting E71

    Considerations when connecting E71 Send of request message Before sending a request message, check that the supported device is ready to receive the request message. When sending multiple request messages For 4E frame, send the request message with appending "Serial No." to the subheader on the external device. By appending "Serial No.", the send source can be identified when multiple request messages have been sent.
  • Page 29: Part 2 Message Formats

    PART 2 MESSAGE FORMATS This part explains the message format of MC protocol. 4 MESSAGES OF SERIAL COMMUNICATION MODULE 5 MESSAGES OF ETHERNET INTERFACE MODULE 6 ACCESS ROUTE SETTINGS...
  • Page 30: Chapter 4 Messages Of Serial Communication Module

    MESSAGES OF SERIAL COMMUNICATION MODULE This section explains the specifications of the messages of MC protocol and access range when connecting with serial communication from an external device. Types and Purposes of Messages The messages of MC protocol can be classified as shown in the following table depending on the supported device and its intended purpose.
  • Page 31: Message Formats Of Each Protocol

    Message Formats of Each Protocol This section explains the message format and setting data per each format. Format 1 Message format ■Request message Control code Frame ID No. Access route Request data Sum check code Sum check range ■Response message (Normal completion: Response data) Control code Control code Sum check code...
  • Page 32: Format 2

    Format 2 Message format ■Request message Control code Block No. Frame ID No. Access route Request data Sum check code Sum check range ■Response message (Normal completion: Response data) Control code Control code Block No. Frame ID No. Access route Response data Sum check code Sum check range...
  • Page 33: Format 3

    Format 3 Message format ■Request message Control code Control code Request data Frame ID No. Access route Sum check code Sum check range ■Response message (Normal completion: Response data) Control code Control code Frame ID No. Access route End code Response data Sum check code Sum check range...
  • Page 34: Format 4

    Format 4 Message format ■Request message Control code Control code Frame ID No. Access route Request data Sum check code Sum check range ■Response message (Normal completion: Response data) Control code Control code Control code Sum check code Frame ID No. Access route Response data Sum check range...
  • Page 35: Format 5

    Format 5 Message format ■Request message Frame Control code Control code Number of Access route Request ID No. Sum check code data bytes data Specify the number of bytes in this range. Sum check range ■Response message (Normal completion: Response data) Normal Frame Response...
  • Page 36: Details Of Setting Data

    Details of Setting Data This section explains how to specify the common data items and their content in each message. Control code Control code is a data that has special meaning (such as head data of a message) for C24 transmission control. Control code used in a message (format 1 to format 4) in ASCII code The control code used for a message in ASCII code (format 1 to format 4) is shown in the following table.
  • Page 37: Number Of Data Bytes

    Control code used in a message (format 5) in binary code The control code used for a message in binary code (format 5) is shown in the table below. Symbol name Description Code (hexadecimal) Start of Text End of Text Data Link Escape ■Additional code (10H) The additional code is added to distinguish the data when the control code DLE (10H) is the same as the setting data in the...
  • Page 38: Block Number

    Block number Block number is an arbitrary number defined by an external device and used for data defragmentation. Block number converts data to 2-digit (hexadecimal) ASCII code within the range of '00H' to 'FFH' and sent them from the upper digits. C24 only checks if the block number is specified within the correct range.
  • Page 39 Sum check range The sum check range of each message format is as follows: Format Message structure Reference Format 1 to format 3 Page 29 Format 1 Page 30 Format 2 Control code Sum check code Page 31 Format 3 Sum check range Format 4 Page 32 Format 4...
  • Page 40: End Code

    Setting method ■Data communication in ASCII code Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits. ■Data communication in binary code The same as the data communication in ASCII code, use the numerical value converted to the 2 digit ASCII code (hexadecimal).
  • Page 41: Chapter 5 Messages Of Ethernet Interface Module

    MESSAGES OF ETHERNET INTERFACE MODULE This section explains the specifications of the messages and access range of MC protocol when connecting with Ethernet communication from an external device. Types and Purposes of Messages The messages of MC protocol can be classified as shown in the following table depending on the supported device and its intended purpose.
  • Page 42: Frame

    Frame This section explains the types and purposes of the frames (data communication messages) used by the external device to access the supported devices using MC protocol. The frames for Ethernet interface modules are as follows: Frame Features and purposes Compatible message format Corresponde nce code...
  • Page 43: Message Format

    Message Format This section explains the message format and setting data for 4E frame and 3E frames. For the message format for 1E frame, refer to the following section. Page 391 Message Format Message format ■Request message Header Subheader Access route Request data length Monitoring timer Request data...
  • Page 44: Details Of Setting Data

    Details of Setting Data This section explains how to specify the common data items and their content in each message. For the setting data with 1E frame, refer to the following section. Page 391 Details of Setting Data Header A header for TCP/IP and UDP/IP. A header of a request message is added on the external device side and sent. Normally, it is added automatically by an external device.
  • Page 45: Request Data Length And Response Data Length

    Response message ASCII code Binary code Request data length and response data length For the request data length, specify the data length from the monitoring timer to the request data. For the response data length, the data length from an end code to a response data (at normal completion) or an error information (at abnormal completion) is stored.
  • Page 46: End Code

    End code The command processing result is stored. At normal completion, '0' is stored. At abnormal completion, an error code of the access target is stored. Error code indicates the content of occurred error. If more than one error occurs at the same time, the error code detected first is returned. For the content of error code and its corrective action, refer to the user's manual of the module used.
  • Page 47: Chapter 6 Access Route Settings

    ACCESS ROUTE SETTINGS This chapter explains the accessible range of each frame of MC protocol and data to specify the access target. Accessible Ranges and Setting Data for Each Frame The accessible range of each frame and the data items to set an access route are as shown below. 4C frame Accessible range of 4C frame The following ranges can be accessed.
  • Page 48: Frame

    3C frame Accessible range of 3C frame The following ranges can be accessed. External device Multidrop connection Network Network No.1 No.n (Relay station) Connected station (Host station) :Accessible target station Message format (Setting example for accessing connected station (host station)) Network No.
  • Page 49: 1c Frame

    1C frame Accessible range of 1C frame The following ranges can be accessed. External device Multidrop connection Network Connected station (Host station) :Accessible target station When accessing a device, only the applicable device range for MELSEC-A series module can be accessed. (Page 352 Accessible device range) Message format (Setting example for accessing connected station (host station)) Station No.
  • Page 50: 4e Frame, 3e Frame

    4E frame, 3E frame Accessible range of 4E frame, 3E frame The following ranges can be accessed. External device Multidrop connection Connected station (Host station) Network Network No.1 No.n (Relay station) :Accessible target station 4C frame is supported by multiple CPU system. (Page 461 Compatibility with Multiple CPU Systems) Message format (Setting example for accessing connected station (host station)) ■Data communication in ASCII code Network...
  • Page 51: 1e Frame

    1E Frame Accessible range of 1E frame The following ranges can be accessed. External device Connected station (Host station) Network :Accessible target station When accessing a device, only the applicable device range for MELSEC-A series module can be accessed. (Page 399 Accessible device range) Message format (Setting example for accessing connected station (host station)) ■Data communication in ASCII code PC No.
  • Page 52: Details Of Setting Data

    Details of Setting Data This section explains the content and specification method of the data items to set the access route. : Necessary, : Unnecessary Item Frames for C24 Frames for E71 Reference Station No.      ...
  • Page 53 Accessing other stations via network Specify the station No. from 0 to 31 (00H to 1FH) of a station that relays multidrop connection and network when accessing other stations via network. Specify '0' when accessing other stations via network without the multidrop connection. External device Multidrop connection Other stations...
  • Page 54: Network No., Pc No

    Network No., PC No. Specify the network No. and station No. that are set with the parameters for the access target network module. Specify a fixed value when accessing the connection station. Specify the network No. with the value shown below. Specifying improper value may result in no response returned.
  • Page 55 ■When accessing with the "Valid Module During Other Station Access" setting 1C frame and 1E frame do not have the setting of network No. When specifying the network of access target is required because more than one network module is mounted on the connection station, set the "Valid Module During Other Station Access"...
  • Page 56 Setting method ■Data communication in ASCII code Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits. ■Data communication in binary code Send a 1-byte numerical value. Accessing connected station (host station) or multidrop connection station ASCII code Binary code Network...
  • Page 57: Request Destination Module I/o No., Request Destination Module Station No

    Access target Request destination module I/O No. Request destination module station No. MELSEC iQ-R series module 0000H to 02FFH: Values obtained by dividing the start input/ 00H to 1FH (0 to 31): Station No. output number by 16 MELSEC-Q/L series module...
  • Page 58 External device Multidrop connection Connected station (Host station) Network :Station specified to the request No.n destination module I/O number :Access target station (Relay station) (Station specified to the request destination module station No.) 6 ACCESS ROUTE SETTINGS 6.2 Details of Setting Data...
  • Page 59 Accessing multiple CPU system, redundant system Specify the access target with the request destination module I/O No. Specify the fixed value (00H) for the station No. Access target Request destination module I/O No. Request destination module station No. Multiple CPU system Control CPU 03FFH Non-control...
  • Page 60 Setting method For the request destination module I/O No., specify the value obtained by dividing the start input/output number assigned to the module by 16 in 4 digits (hexadecimal). ■Data communication in ASCII code For the request destination module I/O No., convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 61: Self-station No

    Self-station No. Specify this when more than one external device (m stations) and more than one C24s (n stations) are connected with the multidrop connection. Specify the fixed value (00H) for any cases other than multidrop connection in a m:n basis. When external devices are connected with the m:n multidrop connection Specify the station No.
  • Page 62 MEMO 6 ACCESS ROUTE SETTINGS 6.2 Details of Setting Data...
  • Page 63: Part 3 Command

    PART 3 COMMAND This part explains the functions that can be specified by a message of MC protocol and the message format of request data and message data of each command. 7 COMMANDS AND FUNCTIONS 8 DEVICE ACCESS 9 LABEL ACCESS 10 BUFFER MEMORY ACCESS 11 CONTROL MODULE OPERATION 12 FILE CONTROL...
  • Page 64: Chapter 7 Commands And Functions

    COMMANDS AND FUNCTIONS This chapter explains the commands of MC protocol. The functions of a message is defined by each command. The message format for request data and response data varies with commands. Depending on the type of frame to be used, the specific value is assigned to a command. The value of command is specified at the head of a request data.
  • Page 65: Commands For 4c/3c/4e/3e Frame

    Commands for 4C/3C/4E/3E frame The following shows the commands for 4C/3C/4E/3E frame. For 4C/3C/4E/3E frame, specify subcommands in the request message as well. Device access Function Command Description Subcommand Batch read Batch read in 0401 Read values from devices in word units. 0000 For MELSEC- and write...
  • Page 66 Label access Function Command Description Subcommand Batch read Batch read 041A Read the values from array type labels. 0000 For MELSEC and write array type Read the values in batch with specifying the consecutive array elements. iQ-R series labels Specify the array type labels or array type elements of structure type labels. Batch write 141A Write the values to array type labels.
  • Page 67 File control Function Command Description Subcommand File check Read directory/ 1810 For the specified storage destination file, read the file name, file creation date and 0000 For MELSEC- file information time (last edit date and time) etc. Q/L series 0040 For MELSEC iQ-R series Search...
  • Page 68: Commands For 2c Frame

    Serial communication dedicated commands Function Command Description Subcommand  User frame Read 0610 Read the contents of registered user frames. 0000 registered data Register data 1610 Register user frames to C24. 0000   Delete Delete the registered user frame. 0001 registered data ...
  • Page 69: Chapter 8 Device Access

    Device number number code code (3 bytes) (1 byte) (2 digits) (6 digits) For MELSEC iQ-R series Device code Device number Device number Device code (4 digits) (8 digits) (4 bytes) (2 bytes) When accessing any of the following devices, use the device extension specification (subcommand: 008).
  • Page 70 Convert the numerical value to 2-digit or 4-digit ASCII code (hexadecimal), and send it from the upper digits. • For MELSEC-Q/L series: 2-digit ASCII code • For MELSEC iQ-R series: 4-digit ASCII code The '*' in a device code can also be specified with a space (code: 20H).
  • Page 71 Specify the device number in decimal or hexadecimal, depending on the device type. (Page 70 Device code list) • For MELSEC-Q/L series: 6-digit ASCII code • For MELSEC iQ-R series: 8-digit ASCII code (10 digits at device extension specification) The '0' in the upper digits can also be specified with a space (code: 20H).
  • Page 72: Device Code List

    Device code list The following shows the device code of each device and the notation of device number (decimal/hexadecimal). The data to be set differs between MELSEC-Q/L series commands (subcommand: 0000, 0001) and MELSEC iQ-R series subcommand (0002, 0003). : Inaccessible...
  • Page 73 Device For MELSEC-Q/L For MELSEC iQ-R series series Device name Symbol Type Notation ASCII Binary ASCII Binary Page 442 Accessing module access devices I/O No. specified device Page 444 Accessing CPU buffer memory access device Module access device U\G Word Decimal G*** 00ABH...
  • Page 74: Number Of Device Points

    Number of device points Specify the number of device points to be read or written. Setting method ■Data communication in ASCII code Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits. Use capitalized code for alphabetical letter. ■Data communication in binary code Send the 2-byte numerical value in order from the lower byte (L: bit 0 to 7).
  • Page 75: Number Of Blocks

    • Number of word device blocks + Number of bit device blocks  120 In the following case, calculate it as access point  2. • When accessing module of MELSEC iQ-R series by setting device extension specification (subcommand: 008) Setting method ■Data communication in ASCII code...
  • Page 76: Read Data, Write Data

    Read data, write data The read device value is stored for reading, and the data to be written is stored for writing. The data order differs between bit units or word units. For bit units The following shows the data to be read and written in bit units. ■Data communication in ASCII code The ON/OFF status of each device are represented with single-digit ASCII code.
  • Page 77 For word units (16-point unit for bit device) The following shows the data to be read and written in word units. When handling data other than bit data, refer to the following section. Page 79 Considerations for handling real number data and character string data ■Data communication in ASCII code Convert the 1-word(16 points of bit device) numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 78 ■Data communication in binary code Send the numerical value in order from the lower byte (L: bit 0 to 7) by handling 16 points unit as 2 bytes. When indicating ON/OFF status of 32 points from M16 The device point value becomes "02" in 16-points units. Number of Head Device...
  • Page 79 For double word unit (32-point unit for bit device) The following shows the data to be read and written in double word units. ■Data communication in ASCII code Convert the 2-word numerical value (32 points of bit device) to 8-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 80 ■Data communication in binary code Send the numerical value in order from the lower byte (L: bit 0 to 7) by handling 32 points unit as 4 bytes. When indicating ON/OFF status of 32 points from M16 Number of Device Data device points code...
  • Page 81 Considerations for handling real number data and character string data The word data and double word data are handled as integer value (16-bit data or 32-bit data). When data other than integer (real number, character string) is stored in a device, the stored value is read as integer value. •...
  • Page 82: Set/reset

    Specify the ON/OFF status of bit device. • For ON: '1' Subcommand type ASCII code Binary code For MELSEC-Q/L series For MELSEC iQ-R series • For OFF: '0' Subcommand type ASCII code Binary code For MELSEC-Q/L series For MELSEC iQ-R series 8 DEVICE ACCESS 8.1 Data to be Specified in Commands...
  • Page 83: Monitor Condition Specification

    Monitor condition specification The following explains the data to be used when specifying monitor conditions by the following commands. • Random read in word units (command: 0403) • Register monitor data (command: 0801) Device Step No. Monitor condition specification specification Monitor condition specification Item Description...
  • Page 84 Specification of read timing by monitor condition The read timing can be changed by specifying monitor conditions according to the selection of subcommand. ■When do not specify monitor condition Data is read by the END processing after a read request. Timer 0 monitoring time Timer 1 monitoring time Timer 2 monitoring time...
  • Page 85 Monitor condition Following conditions can be specified as "Monitor condition" for read timing. Conditions that can be specified Condition satisfaction timing Step No. specification When specified program step is executed Device specification Word device value specification When specified word device value reached the specified value Bit device value specification When specified bit device turned ON/OFF When the step No.
  • Page 86 Step No. specification Specify a condition using a step No. of program. Data is read at the END processing immediately after a step of the specified program is executed. ■When step No. is specified Specify the following items. Item Description Reference Step No.
  • Page 87 Device specification Specify a condition using a device and its value. Data is read at the END processing immediately after the specified device reached the specified value. ■When word device value is specified Set the following when a monitor condition which specifies word device value is selected. Item Description Reference...
  • Page 88 ■When no device is specified Set the following when monitor condition without device specification is selected. ASCII code Binary code SFC specification The block No. and step No. of SFC (MELSAP3) program can be specified as a monitor condition. Specify the following values. Condition SFC pattern SFC block No.
  • Page 89 Mask value, monitor conditions when word device value is specified Specify the value of word device to be set as a monitor condition. Arbitrary bit range of word devices can only be specified by specifying mask value. (Logical AND by each bit of the specified word device data and the designated mask value is compared with the monitor condition value.) ■Data communication in ASCII code Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 90: Batch Read And Write

    Batch Read and Write Read or write the values of consecutive devices in batch by specifying the number of device points. Batch read in word units (command: 0401) Read values from devices in word units. When accessing any of the following devices, use the device extension specification (subcommand: 008). •...
  • Page 91 Type ASCII code Binary code For MELSEC iQ-R series For 2C frame, the specification is not required. Functions and specification methods are equivalent to the subcommands for MELSEC-Q/L series. ■Head device Specify the head device of the consecutive devices. (Page 67 Devices) The following devices cannot be specified.
  • Page 92 Communication example (Reading bit device) Read the value of M100 to M131 (for 2 words). (Subcommand: for MELSEC-Q/L series) ■Data communication in ASCII code (Request data) Device Subcommand Head device number Number of device points code (Response data) 0 = OFF 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 = ON M115...
  • Page 93 Communication example (Reading word device) Read values of T100 to T102. (Subcommand: for MELSEC-Q/L series) T100 = 4660 (1234H), T101 = 2 (2H), T102 = 7663 (1DEFH) are stored. ■Data communication in ASCII code (Request data) Device Subcommand Head device number Number of device points code (Response data)
  • Page 94: Batch Read In Bit Units (command: 0401)

    Type ASCII code Binary code For MELSEC-Q/L series For MELSEC iQ-R series For 2C frame, the specification is not required. Functions and specification methods are equivalent to the subcommands for MELSEC-Q/L series. 8 DEVICE ACCESS 8.2 Batch Read and Write...
  • Page 95 Specify the number of device points to be read within the following range. (Page 72 Number of device points) Access target ASCII code Binary code MELSEC iQ-R series module 1 to 7904 points 1 to 3584 points 1 to 7168 points...
  • Page 96: Batch Write In Word Units (command: 1401)

    Type ASCII code Binary code For MELSEC-Q/L series For MELSEC iQ-R series For 2C frame, the specification is not required. Functions and specification methods are equivalent to the subcommands for MELSEC-Q/L series. 8 DEVICE ACCESS 8.2 Batch Read and Write...
  • Page 97 Specify the number of device points to be written within the following range in word units. (Page 72 Number of device points) Access target Range Word device Bit device Double word device MELSEC iQ-R series module 1 to 960 points 1 to 960 words 1 to 960 words MELSEC-Q/L series module (1 to 15360 points) (1 to 480 points) ...
  • Page 98 Communication example (Writing word device) Write '6549' (1995H) to D100, '4610' (1202H) to D101, and '4400' (1130H) to D102. (Subcommand: for MELSEC-Q/L series) ■Data communication in ASCII code Device Subcommand Head device number Number of device points Write data code D100 D101 D102...
  • Page 99: Batch Write In Bit Units (command: 1401)

    Type ASCII code Binary code For MELSEC-Q/L series For MELSEC iQ-R series For 2C frame, the specification is not required. Functions and specification methods are equivalent to the subcommands for MELSEC-Q/L series. 8 DEVICE ACCESS 8.2 Batch Read and Write...
  • Page 100 Specify the number of device points to be written within the following range. (Page 72 Number of device points) Access target ASCII code Binary code MELSEC iQ-R series module 1 to 7904 points 1 to 3584 points 1 to 7168 points...
  • Page 101: Random Read And Write

    Random Read and Write Read or write device values by specifying the device numbers. It can be specified with discontinuous device numbers. Random read in word units (command: 0403) Read values from devices in word units and double word units. It can be specified with discontinuous device number. When accessing any of the following devices, use the device extension specification (subcommand: 008).
  • Page 102 MELSEC iQ-R series module (subcommand: 0000) MELSEC-Q/L series module (subcommand: 0000) 192 points 1  Number of word access points + Number of double word access points  MELSEC iQ-R series module (subcommand: 0002, 008) MELSEC-Q/L series module (subcommand: 0080) 96 points MELSEC-QnA series module...
  • Page 103 The number of points equivalent to the specified 'Number of word access points' and 'Number of double word access points' is specified for 'Device', respectively. When '0' is specified for the access points, this specification is not required. The following devices cannot be specified. •...
  • Page 104 Communication example (Monitor condition is not specified) Read values of D0, T0, M100 to M115, X20 to X2F with word access. Read values of D1500 to D1501, Y160 to Y17F, M1111 to M1142 with 4 double word access. (Subcommand: for MELSEC-Q/L series) D0 = 6549 (1995H), T0 = 4610 (1202H), D1500 = 20302 (4F4EH), D1501 = 19540 (4C54H) are stored.
  • Page 105 ■Data communication in binary code (Request data) Number of word Number of double access points word access points Subcommand Device for word access Device Device Device Device Device Device Device Device number code number code number code number code Device for double word access Device Device Device...
  • Page 106 Communication example (Monitor condition is specified) Read values of D0, T0, M100 to M115, X20 to X2F with word access. Read values of D1500 to D1501, Y160 to Y17F, M1111 to M1142 with 4 double word access. The monitor condition is as follows: When the value of link register (W100) reached '7BH' (123) while the step No.1000 of program file CONB1.QPG is being executed.
  • Page 107 ■Data communication in binary code (Request data) Monitor Subcommand File name Extension Attribute Step No. File No. Step No. Block No. condition pattern File designation SFC designation ( not specified ) Monitor Monitor Device Device Mask Device Device condition condition number value number...
  • Page 108: Random Write In Word Units (test) (command: 1402)

    Type ASCII code Binary code For MELSEC-Q/L series For MELSEC iQ-R series For 2C frame, the specification is not required. Functions and specification methods are equivalent to the subcommands for MELSEC-Q/L series. 8 DEVICE ACCESS 8.3 Random Read and Write...
  • Page 109  14)  1920 points MELSEC-Q/L series module (subcommand: 0000) 1  (Number of word access points  12) + (Number of double word access MELSEC iQ-R series module (subcommand: 0002, 008) points  14)  960 points MELSEC-Q/L series module (subcommand: 0080)
  • Page 110 ■Data communication in ASCII code (Request data) Number of word Number of double access points word access points Subcommand Device for word access Device Device Write data 2 Device number Write data 1 code Device number code Device Device for double word access code...
  • Page 111 ■Data communication in binary code (Request data) Number of word Number of double access points word access points Subcommand Device for word access Device Device Write Device Device Write number code data 1 number code data 2 Device Device Write Device Device Write...
  • Page 112: Random Write In Bit Units (test) (command: 1402)

    Range MELSEC iQ-R series module (subcommand: 0001) 1 to 188 points MELSEC-Q/L series module (subcommand: 0001) MELSEC iQ-R series module (subcommand: 0003, 008) 1 to 94 points MELSEC-Q/L series module (subcommand: 0081) MELSEC-QnA series module Module on other station via MELSEC-QnA series network module...
  • Page 113 ■Device Specify a device to be written. (Page 67 Devices) Specify a bit device. ■Set/reset Specify the ON/OFF status of bit devices. (Page 80 Set/reset) The number of points equivalent to the specified "Number of bit access points" is specified for "Device" and "Set/reset", respectively.
  • Page 114: Batch Read And Write Multiple Blocks

    Batch Read and Write Multiple Blocks Read or write values for specified multiple blocks by handling consecutive devices as one block. Batch read multiple blocks (command: 0406) Read values for specified multiple blocks by handling consecutive word devices or bit devices as one block. Each block can be specified with discontinuous device numbers.
  • Page 115 MELSEC iQ-R series module (subcommand: 0000) MELSEC-Q/L series module (subcommand: 0000) MELSEC-QnA series module MELSEC iQ-R series module (subcommand: 0002, 008) 1Number of word device blocks + Number of bit device blocks60 points MELSEC-Q/L series module (subcommand: 0080) ■Block of word device, block of bit device Specify the device to be read by handling consecutive devices as one block.
  • Page 116 Communication example Read values from device as follows. (Subcommand: for MELSEC-Q/L series) Item Content to be read Word device Block 1: D0 to D3 (4 points) Block 2: W100 to W107 (8 points) Bit device Block 1: M0 to M31 (2 points) Block 2: M128 to M159 (2 points) Block 3: B100 to B12F (3 points) ■Data communication in ASCII code...
  • Page 117 ■Data communication in binary code (Request data) Number of word Number of bit device blocks device blocks Subcommand Device Number of Device Number of Device Number of Device Number of Device Number of Device number Device number Device number Device number Device number code device points...
  • Page 118: Batch Write Multiple Blocks (command: 1406)

    ASCII code Binary code For MELSEC-Q/L series For MELSEC iQ-R series ■Number of word device blocks, number of bit device blocks Specify the number of device blocks to be written in hexadecimal. (Page 73 Number of blocks) 8 DEVICE ACCESS...
  • Page 119 1Number of word device blocks + Number of bit device blocks120 points MELSEC-Q/L series module (subcommand: 0000) MELSEC-QnA series module MELSEC iQ-R series module (subcommand: 0002, 008) 1Number of word device blocks + Number of bit device blocks60 points MELSEC-Q/L series module (subcommand: 0080) ■Block of word device, Block of bit device...
  • Page 120 Communication example Write values to devices as follows. (Subcommand: for MELSEC-Q/L series) ■Data communication in ASCII code (Request data) Number of word Number of bit device blocks device blocks Subcommand Device Number of code Device number Write data device points Device Number of code...
  • Page 121 ■Data communication in binary code (Request data) Number of word Number of bit device blocks device blocks Subcommand Number of Number of Device Device device Device Device device Write data Write data number code number code points points W100 W107 Number of Number of Device...
  • Page 122: Device Memory Monitor

    Device Memory Monitor Read the registered device data, and monitor it. Monitoring procedure The following shows the procedure to monitor devices. Registration of monitor device Register a device to be read. (Page 121 Register monitor data (command: 0801)) Execution of monitor Read values from a registered device.
  • Page 123: Register Monitor Data (command: 0801)

    Register monitor data (command: 0801) Register devices to be monitored. Message format The following shows the message format of the request data and response data of the command. ■Request data Number of word Monitor condition Number of double word access points Command Subcommand specification...
  • Page 124: Monitor (command: 0802)

    Monitor (command: 0802) Read value of registered device. Message format The following shows the message format of the request data and response data of the command. ■Request data Command Subcommand ■Response data Data read (first point) Data read (mth point) Data read (first point) Data read (nth point) Read data in word units...
  • Page 125 Communication example Read the following devices registered by the 'register monitor data' (command: 0801). • Word access: D0, T0, M100 to M115, X20 to X2F • Double word access: D1500 to D1501, Y160 to Y17F, M1111 to M1142 D0 = 6549 (1995H), T0 = 4610 (1202H), D1500 = 20302 (4F4EH), D1501 = 19540 (4C54H) are stored. ■Data communication in ASCII code (Request data) (Response data)
  • Page 126 ■Data communication in binary code (Request data) (Response data) Data Data Data Data read 1 read 2 read 3 read 4 Data read 1 Data read 2 Data read 3 in word in word in word in word in double word in double word in double word units...
  • Page 127: Chapter 9 Label Access

    This section explains the commands to read and write devices using the standard global label of GX Works3. The commands can be used when the connected station and request target is MELSEC iQ-R series module. • Local labels and module labels cannot be accessed.
  • Page 128 Label name Specify the character string of a label name. ■Data communication in ASCII code Convert the numerical value of UTF-16, which indicates a global label name, to ASCII code (hexadecimal), and send it from the upper digits. ■Data communication in binary code Send the numerical value of UTF-16, which indicates a global label name from lower byte (L: bit 0 to 7).
  • Page 129 ■Two-dimensional array, three-dimensional array, Up to three-dimensional arrays can be specified. For two-dimension and three-dimension array, specify an element number by separating with comma (',') in a square bracket. (UTF-16: ','= 002C) When the element numbers are 2, 1, 3 of three-dimensional array of array name 'Lbl' •...
  • Page 130 ■Structure member When the structure member is a structure type, specify the element name by delimiting with period '.' up to the end member. When specifying the member, 'memberB1', of the structure member name 'memberA3' for the structure type label name 'LabelA' •...
  • Page 131: Abbreviation Specification Of Label

    Abbreviation specification of label Abbreviation specification can be used when specifying a structure type label as an access target. When a label name or a structure member name is specified by the abbreviation specification, the character string specified as a "label name" can be simplified using "%n" (n: offset value). When a structure type label name 'LabelA' and its structure member name 'memberA3' is specified as abbreviation specification, they can be abbreviated as follows.
  • Page 132 (1) LabelA Item Value of code corresponds to character Label name UTF-16 004C 0061 0062 0065 006C 0041 ASCII code 30303443 30303631 30303632 30303635 30303643 30303431 Binary code 4C00 6100 6200 6500 6C00 4100 (2) memberA3 Item Value of code corresponds to character Label name UTF-16 006D...
  • Page 133: Points

    Points Specify the number of the data to be read or written. Setting method The setting method of each item to specify the number of points is common. Since data to be transmitted is 1920 bytes at maximum, the maximum number of points which can be specified varies depending on the label name length contained in the data.
  • Page 134: Data Type Id

    Data type ID The data type of the read label is stored. When writing data, the data type ID is not specified. The specified Follow the data type of the specified label. The value of data type ID of each data type is shown below. Data type Data type ID Setting value...
  • Page 135: Data Length, Unit Specification

    Data length, unit specification Specify the length of data to be read/written. Unit specification Specify the units of data length when reading/writing data from/to array in batch. ■Bit specification The value of data length is handled as the number of bits. Specify this when the data type of the label is bit.
  • Page 136 ■Data communication in ASCII code Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits. ■Data communication in binary code Send 2-byte numerical values from lower byte (L: bits 0 to 7). *1 For C24, the additional code may be added. (Page 35 Additional code (10H)) Setting example ■Batch read and write of array For the bit specification, specify the number of bits to be accessed.
  • Page 137: Read Data, Write Data

    Read data, write data The read data is stored for reading, and the data to be written is stored for writing. Data is stored with variable length. The length of data is specified by "Data length." (Page 133 Data length) The storing method of data is same as that of reading or writing data in word units (bit device in 16-points).
  • Page 138: Batch Read And Write

    Batch Read and Write Read/write data by specifying the continuous element of array in batch. Batch read array type labels (command: 041A) Read data by specifying the continuous element of array in batch. Specify the array type label or array type element of structure label. The labels other than array type can be specified in one point unit.
  • Page 139 ■Array specification Specify the details of arrays for number of arrays specified to array points. Fixed Unit Array data Label name length Label name values specification length Array specification (Array one point) Specify the following items for each array. • Label name length, label name: Specify the label name and label length of a global label. (Page 125 Labels) •...
  • Page 140 Communication example (Bit specification) For one-dimensional array type label 'Lbl', read 2-bit data from Lbl [2]. The value of the read label is as follows: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 Fixed to 0 Access target data ■Data communication in ASCII code...
  • Page 141 Communication example (Byte specification) For one-dimensional array type label 'Lbl', read 5-word data from Lbl [2]. ■Data communication in ASCII code (Request data) Subcommand Array points Abbreviation specification Label name length Label name Unit specification (Fixed value) Array data length Array specification (Array one point) In the figure (1), set the value of "ASCII code"...
  • Page 142 Communication example (Abbreviate with structure type array) Read the following data from the structure label 'Typ1', which has the array type element. • 8 bytes from Typ1.led[2] • 4 bytes from Typ1.No[1] The notation of each label when using abbreviation specification (Typ1= %1) is as follows. (1)Typ1 Item Value of code corresponds to character...
  • Page 143 Array points Data type ID Unit specification Array data length Read data Read data of Typ1.led Data type ID Unit specification Array data length Read data Read data of Typ1.No 9 LABEL ACCESS 9.2 Batch Read and Write...
  • Page 144 ■Data communication in binary code (Request data) Array Number of Label name Label name Subcommand points abbreviated points length Abbreviation specification (Fixed value) (Fixed value) Label name Unit Array data Label name Unit Array data Label name Label name length specification length length...
  • Page 145: Batch Write Array Type Labels (command: 141a)

    Batch write array type labels (command: 141A) Write the values in batch with specifying the consecutive array elements. Specify the array type labels or array type elements of structure type labels. The labels other than array type can be specified in one point unit. (Specify the number of array element as '1'.) Message format The following shows the message format of the request data and response data of the command.
  • Page 146 • Fixed value: '0'. ASCII code Binary code Communication example (Bit specification) For one-dimensional array type label 'Lbl', write 2-bit data from Lbl [2]. The value of the label to be written is as follows: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 Fixed to 0 Access target data ■Data communication in ASCII code...
  • Page 147 Communication example (Byte specification) For one-dimensional array type label 'Lbl', write 5-word data from Lbl [2]. ■Data communication in ASCII code (Request data) Subcommand Array points Abbreviation specification Label name length Label name Unit specification (Fixed value) Array data length Write data In the figure (1), set the value of "ASCII code"...
  • Page 148 (3)Typ1.No[7] Item Value of code corresponds to character Abbreviated notation UTF-16 0025 0031 002E 004E 006F 005B 0037 005D ASCII code 30303235 30303331 30303245 30303445 30303646 30303542 30303337 30303544 Binary code 2500 3100 2E00 4E00 6F00 5B00 3700 5D00 ■Data communication in ASCII code (Request data) Subcommand Array points Number of abbreviated points Label name length...
  • Page 149: Random Read And Write

    Random Read and Write Specify a label and read/write value in one point unit. When reading and writing data in batch by specifying continuous elements of array, use batch read and write command. (Page 136 Batch Read and Write) Random read labels (command: 041C) Read value in one point units by specifying multiple labels.
  • Page 150 Data stored in response data ■Label points The same data as request data are stored. ■Label data The data of read label for the specified number of label points is stored. Spare Read data length Read data Data type ID data Label data (1 point) The following items are stored for each label.
  • Page 151 ■Data communication in ASCII code (Request data) Subcommand Label points Number of abbreviated points Label name length Label name Label name length Label name Label name length Label name Label name length Label name In the figure (1) to (4), set the value of "ASCII code" indicated in the table of "Value of code corresponding to character" of each label name.
  • Page 152: Random Write Labels (command: 141b)

    Random write labels (command: 141B) Write value in one point units by specifying multiple labels. Message format The following shows the message format of the request data and response data of the command. ■Request data Label Label points Abbreviation Label specification Command Subcommand specification...
  • Page 153 Communication example Write data to three labels. • Lbl1 (bit type) = 1 (ON) • Lbl2.Lbl[2] (word type array element of structure label) = 0031H • Lbl3 (word type) = 0001H The notation of each label when using abbreviation specification (Lbl2 = %1) is as follows. (1) Lbl2 (abbreviation specification) Item Value of code corresponds to character...
  • Page 154 ■Data communication in ASCII code (Request data) Subcommand Label points Number of abbreviated points Label name length Label name Label name length Label name Write data length Write data Label name length Label name Write data length Write data Label name length Label name Write data length Write data...
  • Page 155: Chapter 10 Buffer Memory Access

    BUFFER MEMORY ACCESS This chapter explains the commands which read and write the buffer memory. The buffer memory can be accessed with device access function using module access device (Un\G). Page 442 Accessing module access devices Page 67 DEVICE ACCESS 10.1 Buffer Memory This section explains the command which reads and writes data to the buffer memory of the supported device connected to...
  • Page 156 Word length Specify the word length of the buffer memory to be read/written. ■Data communication in ASCII code Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits. ■Data communication in binary code Send 2-byte numerical values from lower byte (L: bits 0 to 7). For 5 words and 20 words Number of device points ASCII code...
  • Page 157: Batch Read (command: 0613)

    Batch read (command: 0613) Read data from the buffer memory of the host station (supported device). Message format The following shows the message format of the request data and response data of the command. ■Request data Command Subcommand Start address Word length ■Response data The value read from the buffer memory is stored.
  • Page 158 Communication example Read the data of the buffer memory addresses from 78H to 81H (120 to 129). ■Data communication in ASCII code (Request data) Start address Word length (Response data) Read data 1 Read data 2 Read data 10 Values of address 78H Values of address 79H Values of address 81H =0500H...
  • Page 159: Batch Write (command: 1613)

    Batch write (command: 1613) Write data to the buffer memory of the host station (supported device). Do not write any data in "System area" or "Write-protect area" in the buffer memory. Writing data to the "System area" or "Write-protect area" may cause malfunction of the programmable controller system.
  • Page 160 Communication example Write the value to buffer memory addresses from 2680H to 2683H (9856 to 9859). ■Data communication in ASCII code (Request data) Start address Word length Write data 1 Write data 4 Values of address 2680H Values of address 2683H =2000H ■Data communication in binary code (Request data)
  • Page 161: Intelligent Function Module

    10.2 Intelligent Function Module The section explains the commands to read from/write to the buffer memory of an intelligent function module. Accessible modules The following shows the accessible intelligent functional modules to buffer memory. Accessing buffer memory using module access device (Un\G) The intelligent function modules, which can be accessed the module access device (Un\G), can be accessed by the device access function.
  • Page 162: Data To Be Specified In Commands

    By using the command (0601, 1601), MELSEC-QnA series special function modules can be accessed. Module Model Additional values when calculating start address CC-Link system master/local module AJ61QBT11, A1SJ61QBT11 2000H Ethernet interface module AJ71QE71, AJ71QE71-B5, A1SJ71QE71-B2, A1SJ71QE71-B5 4000H Serial communication module AJ71QC24, AJ71QC24-R2, AJ71QC24-4, AJ71QC24N, AJ71QC24N-R2, 4000H AJ71QC24N-R4, A1SJ71QC24, A1SJ71QC24-R2, A1SJ71QC24N,...
  • Page 163 Number of bytes Specify the number of bytes of the data to be read/written. ■Calculation method The buffer memory for intelligent function module consists of two bytes (one word) for one area. Calculate the number of bytes by 2-byte per data for one buffer memory address. Number of bytes = (Number of buffer memory address 2) When accessing the buffer memory address 160 to 161 (A0H to A1H) (161- 160 + 1) ...
  • Page 164 ■Intelligent function module number of MELSECNET/H remote I/O station Intelligent function module number of MELSECNET/H remote I/O station is the upper 2 digits of the last number represented with 3-digit number of the following "Input/output signal based on the remote I/O station". Specify this with "Input/output signal based on the remote I/O station"...
  • Page 165: Batch Read (command: 0601)

    Batch read (command: 0601) Read the data from the buffer memory of an intelligent function module. Message format The following shows the message format of the request data and response data of the command. ■Request data Number of Command Subcommand Start address Module No.
  • Page 166 Communication example Read the data of the buffer memory addresses 1H to 2H of Q62DA whose input/output signal is from 30H to 4FH (module No.: 03H). Buffer memory of Q62DA Data for command Address Name Stored data (word unit) Read data (byte unit) CH1 digital value 0001H CH2 digital value...
  • Page 167: Batch Write (command: 1601)

    Batch write (command: 1601) Write data to the buffer memory of an intelligent function module. Do not write any data in "System area" or "Write-protect area" in the buffer memory. Writing data to the "System area" or "Write-protect area" may cause malfunction of the programmable controller system.
  • Page 168 Communication example Write data to the buffer memory addresses from 1H to 2H of Q62DA whose input/output signals are from 30H to 4FH (module No.: 03H). Buffer memory of Q62DA Data for command Address Name Stored data (word unit) Write data (byte unit) CH1 digital value 01F4H CH2 digital value...
  • Page 169: Chapter 11 Control Module Operation

    CONTROL MODULE OPERATION This chapter explains the commands for changing operation status and performing test using the functions of the module. 11.1 Data to be specified in commands This section explains the contents and specification methods for data items which are set in each command related to module control.
  • Page 170: Model Name And Model Code

    Send 2-byte numerical values from lower byte (L: bits 0 to 7). For Q02HCPU (41H) ASCII code Binary code Model name and model code list The following shows the list of model names and model codes. ■MELSEC iQ-R series Model name Model code RCPU 0360H R04CPU...
  • Page 171 When a command is executed to an RCPU or a CC-Link IE Field Network remote head module from the module of which connected station is other than MELSEC iQ-R series, the model name 'RCPU' and the model code '0360H' are stored.
  • Page 172: Remote Password

    Specify the number of characters of remote password. • For MELSEC-Q/L series modules, the character string is fixed to 4 characters. • For MELSEC iQ-R series modules, specify the number of character string of the remote password (6 to 32 characters). ■Data communication in ASCII code Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 173: Loopback Data

    Loopback data Loopback data length Number of bytes of loopback data. ■Data communication in ASCII code Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits. ■Data communication in binary code Send 2-byte numerical values from lower byte (L: bits 0 to 7). *1 For C24, the additional code may be added.
  • Page 174: Communication Error Information

    When the command is executed, the following corresponding bit of the buffer memory turns OFF (0). "LED lighting status, communication error status" (Buffer memory 513 (201H), 514 (202H)) For MELSEC iQ-R series C24, specify '0'. Setting method ■Data communication in ASCII code Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 175: Remote Operation

    11.2 Remote Operation Change the operation status of CPU module. For the remote operation function, refer to the manual of each CPU module. • When powering OFF to ON or resetting the access target CPU after applying remote RUN/STOP/PAUSE, the information of the remote operation will be cancelled. After powering OFF to ON or resetting CPU, the CPU operates with the status of the switch on the CPU module.
  • Page 176 Data specified by request data ■Command ASCII code Binary code (for C24) Binary code (for E71) *1 For C24, the additional code is added. (Page 35 Additional code (10H)) ■Subcommand ASCII code Binary code ■Mode Select the operation when the request target module is already in remote operation by other device. (Page 167 Mode) •...
  • Page 177: Remote Stop (command: 1002)

    Remote STOP (command: 1002) Perform remote STOP for the access target module. Message format The following shows the message format of the request data and response data of the command. ■Request data Fixed Command Subcommand values ■Response data There is no response data for this command. Data specified by request data ■Command ASCII code...
  • Page 178: Remote Pause (command: 1003)

    Remote PAUSE (command: 1003) Perform remote PAUSE for the access target module. The command can be executed when the switch of the access target module is RUN. In the STOP status, the command is completed normally, however, the access target CPU will not be in PAUSE status. Message format The following shows the message format of the request data and response data of the command.
  • Page 179: Remote Latch Clear (command: 1005)

    Remote latch clear (command: 1005) Perform remote latch clear for the access target module. • Execute the command after changing the status of the access target module to STOP. • The remote latch clear cannot be performed when the access target CPU is in remote STOP or remote PAUSE by other devices.
  • Page 180: Remote Reset (command: 1006)

    Remote RESET (command: 1006) Perform remote RESET for the access target module. • Execute the command after changing the status of the access target module to STOP. If the CPU module is stopped due to the error, the command can be executed even when the switch of the CPU module is in the position of RUN, •...
  • Page 181: Read Cpu Model Name (command: 0101)

    Read CPU model name (command: 0101) Read model name and model code from the access target module. Message format The following shows the message format of the request data and response data of the command. ■Request data Command Subcommand ■Response data Model name and model code are stored.
  • Page 182: Remote Password

    11.3 Remote Password This section explains the commands that unlock or lock the remote password. For details on the remote password, refer to the manuals of access target CPU or CPU module. The command can only be used for C24 (including multidrop connection station) and E71 connected to the external device.
  • Page 183: Unlock (command: 1630)

    Unlock (command: 1630) Specify the remote password to unlock the module. (The module can communicate.) If the incorrect password is entered several times, the password is locked out and cannot be cleared for a while. When the command is sent to the unlocked module, the unlock status is not changed. (The password verification is not performed.) Message format The following shows the message format of the request data and response data of the command.
  • Page 184 Subcommand length password Communication example (for the files of MELSEC iQ-R series) Unlock the MELSEC iQ-R series module in which the following remote password has been set. • Remote password: 'abcdefghijklmnopqrstuvwxyz' (26 characters) ■Data communication in ASCII code (Request data)
  • Page 185: Lock (command: 1631)

    Lock (command: 1631) Specify the remote password to lock the module. (The module cannot communicate.) When the command is sent to the locked module, the lock status is not changed. (The password verification is not performed.) Message format The following shows the message format of the request data and response data of the command. ■Request data Remote password Command...
  • Page 186 Subcommand length password Communication example (for the files of MELSEC iQ-R series) Lock the MELSEC iQ-R series module in which the following password has been set. • Remote password: 'abcdefghijklmnopqrstuvwxyz' (26 characters) ■Data communication in ASCII code (Request data) Remote password...
  • Page 187: Loopback Test

    11.4 Loopback Test This chapter explains the commands for testing the connection and data communication between an external device and connected station. The command can only be used for C24 (including multidrop connection station) and E71 connected to the external device. It cannot be used via network. Loopback test (command: 0619) Perform the test to check whether the communication between the external device and connected station is normal.
  • Page 188 Communication example Perform the loopback test with the following loopback data. • Loopback data: 'ABCDE" (5 characters) ■Data communication in ASCII code (Request data) Subcommand Number of loopback data Loopback data (Response data) Number of loopback data Loopback data ■Data communication in binary code (Request data) Number of Loopback data...
  • Page 189: Clear Error Information

    11.5 Clear Error Information This section explains the command to initialize LED display and error information of buffer memory, and recover the supported device. For details of the related LEDs, input/output signals, and buffer memory, refer to the manual of the access target module. Turn indicator LED OFF, initialize error code (command: 1617) Turn OFF the indicator LED of the serial communication module, and initialize the communication error information and error codes.
  • Page 190 ■Communication error information Specify the items in "LED lighting status, communication error status" to be initialized. (Page 172 Communication error information) For MELSEC iQ-R series C24, specify '0'. Communication example Perform the following operations for CH1 interface of QJ71C24N-R2. • ERR LED: OFF •...
  • Page 191: Turn Com.err. Led Off (command: 1617)

    Turn COM.ERR. LED OFF (command: 1617) Turn the COM.ERR.LED of Ethernet interface module OFF. The commands can be used for E71 connected to an external device and cannot be used via network. Message format The following shows the message format of the request data and response data of the command. ■Request data Command Subcommand...
  • Page 192: Chapter 12 File Control

    • MELSEC-Q/L series (when using subcommand '0000'): "Head file No." = previous "Head file No." + "Number of file information" • MELSEC iQ-R series (when using subcommand '0040'): "Head file No." = previous "Last file No." + 1 Page 211 Read directory/file information (command: 1810) Repeat the procedure of Step 2 and later.
  • Page 193: Procedure To Read Files

    In the following cases, create a new file and write data to it after deleting the target file. • When the target file is sequence program file (*.PRG) or FB file (*.PFB) of MELSEC iQ-R series. • When changing the file size of MELSEC-Q/L series is required.
  • Page 194: Procedure To Create New File And Write Data

    The procedure varies depending on types of file. Refer to procedure according to file types. File type File extension Reference MELSEC-Q/L series MELSEC iQ-R series  Header statement file Page 192 When creation of temporary file is required Sequence program file...
  • Page 195: Procedure To Delete Files

    Procedure to delete files Check for file existence. Any of the following commands can be used. • Page 211 Read directory/file information (command: 1810) • Page 217 Search directory/file information (command: 1811) Delete the file. • Page 223 Delete file (command: 1822) Procedure to copy files Before copying file, secure the free area of the target memory.
  • Page 196: Considerations

    12.2 Considerations The following shows the considerations for file control. Files such as read programs and parameters If the files such as program files and parameters which affect the system are read from the CPU module, keep the files for backup.
  • Page 197: Data To Be Specified In Commands

    File password 32 (4 characters) MELSEC-L series module File password 32 (4 to 32 characters) 0004 Password character string (fixed to 32 characters) MELSEC iQ-R series module File password (6 to 32 characters) 0040 Number of password characters, password character string (variable length) *1 If the password is less than 32 characters, append a space (code: 20H).
  • Page 198 File password 32 of MELSEC-L series (4 to 32 characters) Use the subcommand '0004'. Subcommand '0000' can be used only when the password is not set to the file. When subcommand 0000 is used to MELSEC-L series module, specify 20H for 4 bytes. ■When a password is set Send password character string in 32-digit ASCII code.
  • Page 199 File password for MELSEC iQ-R series (6 to 32 characters) Use the subcommand '0040'. If multiple wrong passwords are attempted continuously, the password will be locked out and cannot unlock the password for a while. ■When a password is set Specify the number of characters and the character string of password.
  • Page 200: Drive No

    Drive No. This is a data to specify the drive in a CPU module of which files are to be managed. Specified value Target drive RCPU LCPU/QCPU/QnACPU  0000H Program memory 0001H Device/label memory (file storage area) SRAM card The same operation when 0003H is specified. 0002H SD memory card Flash card, ATA card, SD memory card...
  • Page 201: File No

    *1 For C24, the additional code may be added. (Page 35 Additional code (10H)) ASCII code Binary code File No. of MELSEC iQ-R series module Use the subcommand '0040'. ■Data communication in ASCII code Convert the file No. to ASCII code 8 digits (hexadecimal), and transmit it from the upper digits.
  • Page 202: Number Of Files

    Number of files Specify the number of files to be accessed. The number of registered files or the number of accessed files are returned. Setting method ■Data communication in ASCII code Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits. ■Data communication in binary code Send 2-byte numerical values from the lower byte (L: bits 0 to 7).
  • Page 203 Path name Specify the absolute path by UTF-16 from the root folder. "Drive name:\" is not required in front of the path. Use '\' (005CH) for the delimiter between the folder names. ■Data communication in ASCII code Convert the numerical value of UTF-16, which indicates a path character string, to ASCII code (hexadecimal), and send it from the upper digits.
  • Page 204: File Name Specification

    Specify with ASCII code character string. • Number of characters (up to 12 characters) and file name character string (including the extension) MELSEC iQ-R series module Path name, file name (up to 60 0040 • Number of characters (up to 252 characters) and file...
  • Page 205 File name of MELSEC-Q/L series module (Number of characters and file name) For the data other than response data of read directory/file information (command: 1810), specify with number of characters and file name character string. Use the subcommand '0000' or '0004'. The file name and the extension are specified as a variable length character string with a period inserted between them.
  • Page 206 File name of MELSEC iQ-R series module (Number of characters and file name) Use the subcommand '0040'. Specify the file name including absolute path from the root folder with variable length. The file name and the extension are specified by inserting a period between them. Specify the length of character string with "number of characters".
  • Page 207: Attribute

    Attribute This indicates whether the data can be written to a file or directory. File attribute Read-only Archive attribute ASCII code Binary code attribute Read-only Writable, readable Do not access the file in which the value other than above is stored in the attribute since the files are reserved for system use. Attribute of directory (folder) Read-only Archive attribute...
  • Page 208: Creation Date And Time (last Edit Date And Time)

    Creation date and time (last edit date and time) This is a date and time when the current file contents are registered. Setting method Represent the date (year, month, day) and time (hour, minute, second) with 16-bit value, respectively. ■Data communication in ASCII code Convert the respective numerical value to 4-digit ASCII code (hexadecimal) and send from the upper digits (time, year).
  • Page 209: File Size

    Time (hour, minute, second) Represent the hour, minute, second with 16-bit value. • Hour: The binary value is represented with bits 11 to 15. • Minute: The binary value is represented with bits 5 to 10. • Second: The binary value divided by 2 is represented with bits 0 to 4. When 20:50:58 (Hours) (Minutes)
  • Page 210: File Pointer No

    File pointer No. This is a number for CPU module to manage files. The file pointer No. can be acquired with the following command. Page 236 Open file (command: 1827) Setting method ■Data communication in ASCII code Send 4-byte ASCII code data. ■Data communication in binary code Send 2-byte numerical value.
  • Page 211: Number Of Bytes

    Number of bytes Specify the number of bytes of data to be read or written as one address/one byte. Setting method ■Data communication in ASCII code Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits. ■Data communication in binary code Send 2-byte numerical values from the lower byte (L: bits 0 to 7).
  • Page 212: Open Mode

    Open mode Specify whether the specified file is open for reading or for writing with the 'open file' (command: 1827). Item ASCII code Binary code For reading For writing Close type Specify a target to be closed with the 'close file' (command: 182A). File to unlock ASCII code Binary code...
  • Page 213: File Check

    Binary code (for C24) Binary code (for E71) *1 For C24, the additional code may be added. (Page 35 Additional code (10H)) ■Sub command Item ASCII code Binary code For MELSEC-Q/L series For MELSEC iQ-R series 12 FILE CONTROL 12.4 File Check...
  • Page 214 ■Directory specification Depending on the access target, specify any of the following: • MELSEC iQ-R series (when using subcommand '0040'): Specify the target folder with an absolute path. (Page 200 Directory specification) • MELSEC-Q/L series (when using subcommand '0000'): Specify '0'.
  • Page 215 Page 202 File name of MELSEC-Q/L series module (File name and extension) (Subcommand: 0000) For MELSEC iQ-R series Page 204 File name of MELSEC iQ-R series module (Number of characters and file name) (Subcommand:0040) • Attribute: The file attributes are stored. (Page 205 Attribute) •...
  • Page 216 Communication example (files for MELSEC-Q/L series) Read directory/file information under the following conditions. • Drive No.: 0 • Head file No.: 1 • Number of requested files: 3 ■Data communication in ASCII code (Request data) Head file Directory specification Number of Subcommand (Fixed value) Drive No.
  • Page 217 Communication example (files for MELSEC iQ-R series) Read directory/file information under the following conditions. • Drive No.: 4 • Head file No.: 1 • Number of requested files: 3 The path names of directory are shown in the following table.
  • Page 218 (Response data) Number of file information Last file No. Directory/ Directory/ Directory/ file information 1 file information 2 file information 3 Number of characters File name Attribute Spare data (18 bytes) File Last edit time Last edit date Spare data File size "20 h 58 m 58 s"...
  • Page 219: Search Directory/file Information (command: 1811)

    For MELSEC-Q/L series For MELSEC iQ-R series ■Fixed value 1 Specify the following fixed value. • MELSEC iQ-R series (when using subcommand '0040'): Specify '0'. ASCII code Binary code • MELSEC-Q/L series (when using subcommand '0000'): Specify 20H in 4 bytes.
  • Page 220 ■Fixed value 2 Specify '0'. ASCII code Binary code ■Number of file name characters, file name Specify the file name of which file No. is to be read. (Page 202 File name specification) Communication example (files for MELSEC-Q series) Read the file No. in the following conditions. •...
  • Page 221 Communication example (files for MELSEC iQ-R series) Read the file No. in the following conditions. • Drive No.: 4 • File No.: 6 The file name is as follows: (1) LINE\LINE.CSV (13 characters) Item Value of code corresponds to character...
  • Page 222: File Creation And Deletion

    For MELSEC-Q/L series For MELSEC iQ-R series ■Password Specify the following fixed value. • MELSEC iQ-R series (when using subcommand '0040'): Specify '0'. ASCII code Binary code • MELSEC-Q/L series (when using subcommand '0000'): Specify 20H in 4 bytes. ASCII code, binary code 12 FILE CONTROL 12.5 File Creation and Deletion...
  • Page 223 ■Drive No. Specify the access target drive. (Page 198 Drive No.) ■File size Specify the file capacity in byte unit. (Page 207 File size) ■Number of file name characters, file name Specify the file name to be created. (Page 202 File name specification) Communication example (files for MELSEC-Q series) Create a new file in the following conditions: •...
  • Page 224 Communication example (files for MELSEC iQ-R series) Create a new file in the following conditions: • Drive No.: 4 • File size: 7168 byte • File name: LINE.CSV (8 characters) The value of the file name is as follows: (1) LINE.CSV (8 characters)
  • Page 225: Delete File (command: 1822)

    ■Sub command Item ASCII code Binary code For MELSEC-Q series For MELSEC-L series For MELSEC iQ-R series ■Password Specify the password of the file. (Page 195 Password) ■Drive No. Specify the access target drive. (Page 198 Drive No.) 12 FILE CONTROL...
  • Page 226 ■Number of file name characters, file name Specify the file name to be deleted. (Page 202 File name specification) Communication example (files for MELSEC-Q series) Delete the file under the following conditions: • Password: 1234 • Drive No.: 0 • File name: ABC.QPG ■Data communication in ASCII code (Request data) Subcommand...
  • Page 227 Communication example (files for MELSEC iQ-R series) Delete the file under the following conditions: • Password: A to Z (26 characters) • Drive No.: 4 The file name is as follows: (1) LINE.CSV (8 characters) Item Value of code corresponds to character...
  • Page 228: Copy File (command: 1824)

    ASCII code Binary code ■Sub command Item ASCII code Binary code For MELSEC-Q series For MELSEC-L series For MELSEC iQ-R series ■Fixed value Specify '0'. ASCII code Binary code (16 characters) (8 bytes) 12 FILE CONTROL 12.5 File Creation and Deletion...
  • Page 229 ■Password Specify the password of the access target file. (Page 195 Password) ■Drive No. Specify the access target drive. (Page 198 Drive No.) Program memory (drive No.0) of RCPU cannot be specified. ■Number of file name characters, file name Specify the file name to be copied. (Page 202 File name specification) Communication example (files for MELSEC-Q series) Copy the file under the following conditions: •...
  • Page 230 Communication example (files for MELSEC-L series) Copy the file under the following conditions: • Password copy source/destination AbCd1234... (24 spaces, code: 20H) • Drive No. of copy source, drive No. of copy destination: 0 • Copy source file name: MAIN.QPG •...
  • Page 231 Communication example (files for MELSEC iQ-R series) Copy the file under the following conditions: • Drive No. of copy source: 2 • Drive No. of copy destination: 4 The file name of the copy source and copy destination is as follows.
  • Page 232: File Modification

    ■Command ASCII code Binary code ■Sub command Item ASCII code Binary code For MELSEC-Q series For MELSEC-L series For MELSEC iQ-R series ■Password Specify the password of the access target file. (Page 195 Password) 12 FILE CONTROL 12.6 File Modification...
  • Page 233 ■Drive No. Specify the access target drive. (Page 198 Drive No.) ■Attribute Specify the file attribute. (Page 205 Attribute) • Read only: 01H • Readable, writable: 20H Do not specify the value other than above since the values are reserved for system use. ■Number of file name characters, file name Specify the file name to modify attribute.
  • Page 234 Communication example (files for MELSEC iQ-R series) Change the file attribute in the following conditions. • Password: A to Z (26 characters) • Drive No.: 4 • Attribute: Read only: 01H The file name is as follows: (1) LINE.CSV (8 characters)
  • Page 235: Modify File Creation Date And Time (command: 1826)

    ASCII code Binary code ■Sub command Item ASCII code Binary code For MELSEC-Q/L series For MELSEC iQ-R series ■Fixed value Specify '0'. ASCII code Binary code ■Drive No. Specify the access target drive. (Page 198 Drive No.) ■Date to change, time to change The file of the last edit date and time is modified with the specified date and time.
  • Page 236 Communication example (files for MELSEC-Q series) Modify the date and time of file creation under the following conditions. • Drive No.: 0 • Date to change: 2010/04/01 • Time to change: 20:50:58 • File name: ABC.QPG ■Data communication in ASCII code (Request data) Subcommand (Fixed value)
  • Page 237 Communication example (files for MELSEC iQ-R series) Modify the date and time of file creation under the following conditions. • Drive No.: 4 • Date to change: 2010/04/01 • Time to change: 20:50:58 The file name is as shown below.
  • Page 238: Open File (command: 1827)

    ASCII code Binary code For MELSEC-Q series For MELSEC-L series For MELSEC iQ-R series ■Password Specify the password of the access target file. (Page 195 Password) ■Open mode Specify whether the specified file is open for reading or for writing. (Page 210 Open mode) •...
  • Page 239 ■Drive No. Specify the access target drive. (Page 198 Drive No.) ■Number of file name characters, file name Specify the file name to be open. (Page 202 File name specification) Communication example (files for MELSEC-Q series) Open the file of QCPU in the following conditions. •...
  • Page 240 Communication example (files for MELSEC-L series) Open the file of LCPU in the following condition. • Password: AbCd1234... (24 spaces, code: 20H) • Drive No.: 0 • File name: MAIN.QPG • Open mode: Open for write ■Data communication in ASCII code (Request data) Subcommand Password (fixed to 32 characters)
  • Page 241 Communication example (files for MELSEC iQ-R series) Open a file of MELSEC iQ-R series CPU module. • Password: A to Z (26 characters) • Drive No.: 4 • Open mode: Open for write The file name is as follows: (1) LINE.CSV (8 characters)
  • Page 242: Read File (command: 1828)

    Read file (command: 1828) Read the content of a file. Use the open/close command in order to prohibit access from other devices when this command is used. Message format The following shows the message format of the request data and response data of the command. ■Request data Number of Command...
  • Page 243 Communication example Read the file under the following conditions: • File pointer No.: 0 • Number of bytes read: 1K bytes ■Data communication in ASCII code (Request data) Subcommand File pointer No. Offset address Number of bytes read (Response data) Number of bytes read Read data (Contents of a file)
  • Page 244: Write To File (command: 1829)

    Write to file (command: 1829) Write contents to a file. Use the open/close command in order to prohibit access from other devices when this command is used. When this command is executed to files of parameter and a program being executed, place CPU module in the STOP status.
  • Page 245 ■Write data Specify the data to be written to a file. Communication example Write the file under the following conditions: • File pointer No.: 0 • Offset address: 0 • Number of bytes written: 1K byte ■Data communication in ASCII code (Request data) Subcommand File pointer No.
  • Page 246: Close File (command: 182a)

    Close file (command: 182A) Close a file and unlock the file which has been locked by the 'open file' (command: 1827). Message format The following shows the message format of the request data and response data of the command. ■Request data Command Subcommand File pointer No.
  • Page 247 Communication example Close the file under the following conditions: • File pointer No.: 0 • Close type: 2 ■Data communication in ASCII code (Request data) Subcommand File pointer No. Close type ■Data communication in binary code (Request data) File pointer No. Subcommand Close type 12 FILE CONTROL...
  • Page 248: Chapter 13 Serial Communication Module Dedicated Commands

    SERIAL COMMUNICATION MODULE DEDICATED COMMANDS This chapter explains the dedicated commands for serial communication module. 13.1 User Frame A user frame is a data name which is used to send/receive data by registering the fixed format portion in a message to be communicated between an external device and serial communication module.
  • Page 249: Data To Be Specified In Command

    Data to be specified in command This section explains the contents and specification methods for data items which are set in each command related to the user frame. Frame No. Specify the number of target user frame. Type Setting value Registration destination Remarks Default registration frame...
  • Page 250 Registration data The following shows the content of data in a user frame. ■Data communication in ASCII code Convert the data to 2-digit (hexadecimal) ASCII code, and send it from the upper digit. ■Data communication in binary code Send data from the first frame. When the registration data is ETX + Variable data (sum check code) + CR + LF ASCII code Binary code...
  • Page 251: Read Registered Data (command: 0610)

    Read registered data (command: 0610) Read the registered content of user frames. Message format The following shows the message format of the request data and response data of the command. ■Request data Command Frame No. Subcommand ■Response data The read registration data is stored. Registration data Frame byte Registration data...
  • Page 252 Example for data communication Read the following registration data from frame No. 3E8H. Registration data: ETX + Variable data (sum check code) + CR + LF ■Data communication in ASCII code (Request data) Command Subcommand Frame No. (Response data) Number of Number of frame byte Variable data registration data byte...
  • Page 253: Register Data (command: 1610)

    Register data (command: 1610) Register user frames to C24. For MELSEC iQ-R series, the user frame is replaced with the contents registered using module extended parameters by powering OFF  ON or switching the CPU module STOP  RUN. For more information on user frame registration using module extended parameters, refer to the following manual.
  • Page 254 Example for data communication Register the following data in frame No. 3E8H. Registration data: ETX + Variable data (sum check code) + CR + LF ■Data communication in ASCII code (Request data) Number of Command Subcommand Frame No. Number of frame byte Variable data registration data byte Registration data...
  • Page 255: Delete Registered Data (command: 1610)

    Delete registered data (command: 1610) Delete the registered user frame. Message format The following shows the message format of the request data and response data of the command. ■Request data Number of Number of Command Subcommand Frame No. registration frame byte data byte ■Response data There is no response data for this command.
  • Page 256 Example for data communication Delete the registration data of frame No. 3E8H. ■Data communication in ASCII code (Request data) Number of Command Subcommand Frame No. Number of frame byte registration data byte ■Data communication in binary code (Request data) Number of Frame Number of registration...
  • Page 257: Global Function

    13.2 Global Function The global function is a function to turn ON/OFF the global signals (input signals: X1A/X1B) of serial communication module connected to external devices with the multidrop communications. This is used as interlock signals for emergency command, simultaneous startup, and applicability of data transmission/ reception to CPU modules.
  • Page 258: Global Signal On/off (command: 1618)

    Global signal ON/OFF (command: 1618) Turn ON/OFF the global signal from an external device. Message format The following shows the message format of the request data and response data of the command. ■Request data Global signal Command Subcommand specification ■Response data There is no response data for this command.
  • Page 259 Communication example (turn ON) Turn the global signal X1A ON. ■Data communications in ASCII code (Format 1) (Request data) Command Subcommand Global signal specification ■Data communications in binary code (Format 5) (Request data) Global signal Command Subcommand specification Communication example (turn OFF) Turn OFF the global signal X1A.
  • Page 260: Transmission Sequence Initialization Function

    13.3 Transmission sequence initialization function The transmission sequence initialization function is a function to initialize the transmission sequence of data communication using format 5 of 4C frame, and to place C24 into the state where it waits to receive commands from external devices. The command can only be used for C24 (including multidrop connection station) connected to the external device.
  • Page 261: Mode Switching Function

    13.4 Mode Switching Function The mode switching function is a function to switch the current communication protocol (operation mode) or transmission specification for the specified interface from external devices after C24 starts up. For more details on the mode switching function, refer to the following manuals.
  • Page 262 Mode No. Specify the communication protocol setting after switching the C24 mode. Mode No. Operation mode MC Protocol (Format 1) MC Protocol (Format 2) MC Protocol (Format 3) MC Protocol (Format 4) MC Protocol (Format 5) Nonprocedural protocol Bidirectional protocol Predefined protocol MELSOFT connection, GX Developer connection ■Data communication in ASCII code...
  • Page 263 Transmission setting Specify the transmission setting after switching the C24 mode. Item OFF (0) ON (1) Operation setting Independent Interlink Data bit Parity bit None Odd/even parity Even Stop bit Sum check code None Online change Disable Enable Setting change Disable Enable For the transmission setting, refer to the following manuals.
  • Page 264 Communication speed Specify the communication speed after switching the C24 mode. Specified value Communication speed 50bps 300bps 600bps 1200bps 2400bps 4800bps 9600bps 14400bps 19200bps 28800bps 38400bps 57600bps 115200bps 230400bps The communication speed that can be set differs depending on the module or channel. For the communication speed setting, refer to the following manuals.
  • Page 265: Switch Mode (command: 1612)

    Switch mode (command: 1612) Switch the C24 mode from external devices. Message format The following shows the message format of the request data and response data of the command. ■Request data Transmission Switching Communication Command Subcommand Channel No. Mode No. setting instruction speed...
  • Page 266 ■Transmission setting Specify the transmission setting. (Page 261 Transmission setting) When the setting by command is enabled (Switching instruction: 2, 3, 6, or 7), the transmission setting is changed according to the specified value. As for the setting by command is disabled (Switching instruction: 0, 1, 4, or 5), the transmission setting is changed according to the transmission setting set with Engineering tool When the setting is invalid, specify '0'.
  • Page 267 ■Data communication in binary code (Request data) Channel Switching Mode Transmission Communication instruction setting speed Command Subcommand 13 SERIAL COMMUNICATION MODULE DEDICATED COMMANDS 13.4 Mode Switching Function...
  • Page 268: Programmable Controller Cpu Monitoring Function

    13.5 Programmable controller CPU monitoring function Programmable controller CPU monitoring function is a function that C24 monitors CPU module with the monitoring information which was registered in advance. For the Programmable controller CPU monitoring function, refer to the following manuals. •...
  • Page 269 CPU error monitoring, CPU status information Specify whether to perform error monitoring for the host station CPU module. CPU error monitoring ASCII code Binary code Do not perform error monitoring for the host station CPU module. Perform error monitoring for the host station CPU module.
  • Page 270 Edge trigger Level trigger Monitoring condition Device type that can be transmission transmission specified Device value  Monitoring condition value 0003H 0103H Unsigned Word device 0004H 0104H Device value < Monitoring condition value Device value  Monitoring condition value 0005H 0105H 0006H 0106H...
  • Page 271: Register (command: 0630)

    Register (command: 0630) Register the target devices to be monitored with the Programmable controller CPU monitoring function and its monitoring conditions in CPU module. Specify the monitoring target device for multiple blocks with the consecutive word devices and bit devices treated as one block.
  • Page 272 Data specified by request data ■Command ASCII code Binary code ■Subcommand ASCII code Binary code ■Cycle time units, cycle time Specify the following time interval (period for 1 cycle). (Page 266 Cycle time) • Time interval that C24 reads monitoring information from CPU module •...
  • Page 273 ■Word device registration, bit device registration Specify the monitoring target device for multiple blocks with the consecutive word devices and bit devices treated as one block. Specify the following items for every block. Number of Monitoring Monitoring Monitoring registered points condition start device condition value...
  • Page 274 Data to be stored by response data ■Fixed value ASCII code Binary code ■Programmable controller CPU monitoring function The send timing (fixed cycle send/condition match send) of the monitoring result is stored. (Page 266 Programmable controller CPU monitoring function) ■Number of registered word blocks, number of registered bit blocks The number of blocks of word device information and bit device information are stored.
  • Page 275 Communication example (for fixed cycle send) Perform the Programmable controller CPU monitoring registration with the following conditions. • Cycle time units, cycle time: 30 seconds • Programmable controller CPU monitoring function: Fixed cycle send • Number of registered word blocks: 2 blocks •...
  • Page 276 ■Data communication in ASCII code (Request data) Number of Number of Programmable Cycle CPU error controller CPU Transmission registered registered Cycle time Subcommand time unit monitoring monitoring function method word blocks bit blocks Word device registration (first point) Number of registered Monitoring Monitoring Monitoring start device...
  • Page 277 ■Data communication in binary code (Request data) Programmable controller Number of registered word blocks Cycle time unit CPU monitoring function Number of registered bit blocks Transmission Subcommand Cycle time method CPU error monitoring Word device registration (First point) Word device registration (Second point) Monitoring Monitoring Number of...
  • Page 278 Communication example (for condition match send) Perform the Programmable controller CPU monitoring registration function with the following conditions. • Cycle time units, cycle time: 30 seconds • Programmable controller CPU monitoring function: Condition match send • Number of registered word blocks: 2 blocks •...
  • Page 279 ■Data communication in ASCII code (Request data) Programmable Number Number Cycle Transmission CPU error controller CPU Cycle time of registered of registered Subcommand time unit method monitoring monitoring function word blocks bit blocks Word device registration (first point) Number of Monitoring Monitoring Monitoring start device...
  • Page 280 ■Data communication in binary code (Request data) Programmable controller Cycle time unit Number of registered word blocks CPU monitoring function Number of registered bit blocks Transmission Subcommand Cycle time CPU error monitoring method Word device registration (first point) Word device registration (second point) Monitoring Number of Monitoring...
  • Page 281: Deregister (command: 0631)

    Deregister (command: 0631) Deregister the Programmable controller CPU monitoring function. Execute the cancel command to end monitoring. Message format The following shows the message format of the request data and response data of the command. ■Request data Command Subcommand ■Response data There is no response data for this command.
  • Page 282: On-demand Function

    13.6 On-demand function On-demand function is a function that transmits data to external device using MC protocol after starting up the function from CPU module. This function can be used to sent the emergency data that is required to notify to external devices from the CPU module. The command can only be used for C24 connected to the external device on 1:1 basis.
  • Page 283: Execution Procedure

    Execution procedure The procedures for the on-demand function are as shown below. Procedure for CPU module and C24 The following shows the procedure to send data using the on-demand function from CPU module. Set the items for the on-demand function. Page 280 Settings for using the on-demand function Execute the serial communication module dedicated instruction 'G (P).
  • Page 284: Execution Timing

    Execution timing The following shows the execution timing of send/receive processing while C24 is being sending/receiving other message of MC protocol, when data transmission instruction by the on-demand function is executed in the CPU module. When sending on-demand data or response data, the timeout check is performed by send monitoring timer (timer 2).
  • Page 285: On-demand (command: 2101)

    On-demand (command: 2101) Send data using the on-demand function from CPU module. Any message other than send data is added automatically in the message format selected in the communication protocol setting. ('FE' is specified to the 'PC No.' for the access route.) •...
  • Page 286 Communication example (communication protocol setting is format 1 to 4) Send 2-word data (1234H, 5678H) to the external device from the CPU module under the following settings. • Communication protocol setting: MC protocol (Format 1 to 4) • Word/byte units designation: Word unit (Response data) Transmission data Communication example (communication protocol is format 5)
  • Page 287: Part 4 Compatibility With Qna Series

    PART 4 COMPATIBILITY WITH QnA SERIES This part explains the specifications when using MELSEC-QnA series devices. 14 MELSEC-QnA SERIES SUPPORTED SPECIFICATIONS 15 QnACPU DEDICATED COMMANDS...
  • Page 288: Chapter 14 Melsec-qna Series Supported Specifications

    MELSEC-QnA SERIES SUPPORTED SPECIFICATIONS This chapter explains the specifications of the messages of MC protocol and accessible ranges when using the MELSEC- QnA series devices as follows: • When accessing system including MELSEC-QnA series modules • When utilizing software for data communication created for MELSEC-QnA series programmable controller. 14.1 Frames and Commands that can be used When accessing MELSEC-QnA series modules, all frames of MC protocol can be used.
  • Page 289: Considerations

    ■Modules other than MELSEC-QnA series Network Module type Model CC-Link IE Field Network CC-Link IE Field Network master/ LJ71GF11-T2, QJ71GF11-T2, QS0J71GF11-T2 local module CC-Link IE Controller Network CC-Link IE Controller Network QJ71GP21-SX, QJ71GP21S-SX module MELSECNET/H MELSECNET/H module QJ71LP21, QJ71LP21-25, QJ71LP21S-25, QJ71LP21G, QJ71BR11, QJ71NT11B Ethernet Ethernet interface module...
  • Page 290: Chapter 15 Qnacpu Dedicated Commands

    QnACPU DEDICATED COMMANDS This chapter shows the QnACPU dedicated commands. 15.1 QnACPU Dedicated Commands List The following shows the list of QnACPU dedicated commands. There are some commands that cannot be executed while the CPU module is in RUN. Refer to the following section.
  • Page 291: Defragmentation Of Drive Memory

    15.2 Defragmentation of Drive Memory An external device performs the following functions for other station QnACPU drive which stores parameters and program files that the sequence programs are written. Read drive memory usage status Check the usage status of the drive memory (cluster usage status) of the specified drive. Defragment drive memory When the valid data written in the drive memory is not consecutive, increase the consecutive free area in cluster unit by defragmentation.
  • Page 292: Data To Be Specified In Commands

    Data to be specified in commands The following explains the data to be specified in commands when an external device performs defragmentation to the drive memory of QnACPU. Keyword A data to allow/prohibit the access to the drive, which is the character string (up to 6 characters) that are registered to the specified drive.
  • Page 293 Drive name A data to perform reading usage status of drive memory, or specify the QnACPU drive to perform defragmentation. ■Data communication in ASCII code Convert the numerical value that indicates access target drive to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 294 Free cluster table A data indicating the status of cluster usage. It is a response data to 'read drive memory usage status' (command: 0205). ■Data communication in ASCII code The numerical value that indicates usage status is converted to n-digit (hexadecimal) ASCII code and sent to the external device.
  • Page 295: Read Drive Memory Usage Status (command: 0205)

    Read drive memory usage status (command: 0205) Read the usage status of the drive memory. When creating a new file (registering new file), a consecutive free area for the file size to be created is required. To calculate the capacity (size) of the consecutive free area of the specified drive, check the number of consecutive free clusters (number of consecutive OFF bits) by reading the usage status of that drive memory.
  • Page 296 ■Number of clusters to be read Specify the number of clusters within the range of drive memory whose usage status is to be read. (Page 291 Number of clusters to be read) Communication example Read the usage status of the drive memory of the RAM area in a memory card A (drive name: 01H) for 32 clusters. ■Data communication in ASCII code (Request data) Subcommand...
  • Page 297: Defragment Drive Memory (command: 1207)

    Defragment drive memory (command: 1207) Perform the defragmentation of drive memory. Perform the defragmentation of drive memory in the following situation. • When the specified QnACPU is STOP. • The usage status of drive memory (check with command 0205) is not consecutive and the files cannot be stored. Message format The following shows the message format of the request data and response data of the command.
  • Page 298 Communication example Perform defragmentation for the drive memory of the RAM area in a memory card A (drive name: 01H). ■Data communication in ASCII code (Request data) Keyword Setting flag Drive name Subcommand ■Data communication in binary code (Request data) Setting flag Subcommand...
  • Page 299: File Control

    15.3 File Control Read, register, and delete files in QnACPU modules. Use this function in the following situations: • Read parameters and sequence programs from an external device • Write the files read from CPU module to an external device according to the commands. For the file name, extension, and location of a file stored in CPU module, refer to the user's manual (function explanation, program fundamentals) of the CPU module used.
  • Page 300: Data To Be Specified In Commands

    Data to be specified in commands This section explains the data to be specified in command when an external device manages files in the CPU module. Keyword Allow/prohibit the access to the specified drive. When a keyword has already been registered, specify the same keyword. For the content of the data, refer to the following section.
  • Page 301 Number of requested file, total number of registered files, number of file information A data that indicates the number of request files, number of files registered in the specified drive, and number of files that return file information when reading file information. ■Data communication in ASCII code Convert the numerical value described in the reference section relevant to the corresponding function to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 302 Last edit time and last edit date A data that indicates the date and time when the current file content was registered. ■Data communication in ASCII code Convert the numerical value to a 4-digit (hexadecimal) ASCII code and send it from upper digits (time, year). When dummy is specified, send '0000H'.
  • Page 303 File size A data that indicates the current file size in number of bytes. ■Data communication in ASCII code Convert the numerical value to 8-digit (hexadecimal) ASCII code, and send it from the upper digits. ■Data communication in binary code Send 4-byte numerical from the lower byte (L: bits 0 to 7).
  • Page 304 Number of bytes read, number of bytes written A data to specify the number of bytes in the file range from/to which data is read/written. Specify it as one address per one byte. ■Data communication in ASCII code Convert the numerical value described in the reference section of the relevant function to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 305 Fixed value Specify '0'. ASCII code Binary code Modification pattern (for changing file name and file size) A data to specify which information to be modified when information (file name, size, date and time created) of the existing file is modified. ■Data communication in ASCII code Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 306 File No. usage A data that shows the usage status of the file No. for 256 files to be returned to external devices when the usage status of file No. is read. ■Data communication in ASCII code Convert the numerical value to 64-digit ASCII code (hexadecimal) and send it to the external device side. (File No. for 8 files: 2 digits) ■Data communication in binary code Send the following 32-byte value which indicate the usage status to the external device side from the lower bytes (L: bits 0 to...
  • Page 307 Copy mode A data to specify whether or not the last edit data and time of the source file to the target file at the completion of copying. The QnACPU management time at a new file creation will remain when the date and time are not copied. ■Data communication in ASCII code Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 308: File Control Execution Procedure For The Qnacpu

    File control execution procedure for the QnACPU The following shows the procedures for executing file control on QnACPU. Procedure when reading contents of file Check for file existence. Check with any of the following commands. • Page 308 Read file information table without header statement (command: 0201) •...
  • Page 309 Procedure for creating a new file and write data to it (creating a file by copying) Check for file existence. Check with any of the following commands. • Page 308 Read file information table without header statement (command: 0201) • Page 311 Read file information table with header statement (command: 0202) •...
  • Page 310: Read File Information Table Without Header Statement (command: 0201)

    Read file information table without header statement (command: 0201) The following examples show the control procedure for reading file information table without header statement within the range of the specified file No. Message format The following shows the message format of the request data and response data of the command. ■Request data ASCII Subcommand...
  • Page 311 ■Number of requested file Number of request files when reading file information. (Page 299 Number of requested file, total number of registered files, number of file information) Specify within the following range. 1  Number of requested file  36 Data stored by response data ■Total number of registered files Number of files registered in the specified drive.
  • Page 312 Communication example Read the file information table without header statement in following conditions. • Drive name: 1 (RAM area of memory card A) • File No.: 10 • Number of requested file: 2 ■Data communication in ASCII code (Request data) Subcommand Keyword Setting flag...
  • Page 313: Read File Information Table With Header Statement (command: 0202)

    Read file information table with header statement (command: 0202) The following examples show the control procedure for reading file information table with header statement within the range of the specified file No. Message format The following shows the message format of the request data and response data of the command. ■Request data ASCII Number of...
  • Page 314 ■Number of requested file Number of request files when reading file information. (Page 299 Number of requested file, total number of registered files, number of file information) Specify within the following range. 1  Number of requested file  16 Data stored by response data ■Total number of registered files Number of files registered in the specified drive.
  • Page 315 Communication example Read the file information table with header statement in following conditions. • Drive name: 1 (RAM area of memory card A) • File No.: 10 • Number of requested file: 2 ■Data communication in ASCII code (Request data) Subcommand Keyword Setting flag...
  • Page 316: Read File Presence (search File) (command: 0203)

    Read file presence (Search file) (command: 0203) The following examples show the control procedure for searching for the specified file, and reading its file No. and file size. Message format ■Request data ASCII Subcommand Keyword Setting flag Drive name File name Extension Attribute Binary Setting...
  • Page 317 Data stored by response data ■File No. This indicates the registration number of a file. (Page 298 File No.) ■File size This value indicates the capacity of the current file in number of bytes. (Page 301 File size) Communication example Read the existence of a specified file under the following condition.
  • Page 318: Read File No. Usage Status (command: 0204)

    Read file No. usage status (command: 0204) The following examples show the control procedure for reading the usage status of a file No. Message format ■Request data ASCII Subcommand Keyword Setting flag Drive name Binary Setting Keyword Drive name Subcommand flag ■Response data The file No.
  • Page 319 Communication example Read the file No. usage in the following conditions. • Drive name: 1 (RAM area of memory card A) ■Data communication in ASCII code (Request data) Subcommand Keyword Setting flag Drive name (Response data) File No. usage status (64 characters) No.1 to 8 No.9 to No.248 No.249 to 256...
  • Page 320: Read File (command: 0206)

    Read file (command: 0206) The following examples show the control procedure for reading the data written in the specified file. The maximum number of data bytes to be read per one time is fixed. Read all the data written to the specified file with adjusting the offset address and number of bytes read, and dividing them for several times.
  • Page 321 Data specified by request data ■Command ASCII code Binary code ■Subcommand ASCII code Binary code ■Keyword Allow/prohibit the access to the file of the target memory. (Page 298 Keyword) ■Setting flag Data that indicates whether the keyword is registered in the specified drive. (Page 298 Setting flag) ■Drive name A data to specify the drive in a CPU module of which files are to be managed.
  • Page 322 Communication example Read the data written in the specified file under the following condition. • Drive name: 1 (RAM area of memory card A) • File No.: 1 • File name: ABC12.QPG • Offset address: 100H • Number of bytes read: 50 bytes ■Data communication in ASCII code (Request data) Subcommand...
  • Page 323: Register And Deregister File Locks (command: 0808)

    Register and deregister file locks (command: 0808) The following examples show the control procedure for registering and deregistering a file lock. Restarting QnACPU (such as resetting CPU module) with the file lock registered results in the file lock deregistered state. Message format ■Request data Subcommand...
  • Page 324 Communication example (Register) Read the existence of a specified file under the following condition. • File lock mode: 0 (usual practice) • Drive name: 1 (RAM area of memory card A) • File No.: 1 • File name: ABC12.QPG ■Data communication in ASCII code (Request data) Subcommand File lock mode...
  • Page 325: Create New File (register File Name) (command: 1202)

    Create new file (Register file name) (command: 1202) The following examples show the control procedure for registering a new file and reserving a file area on the specified disk. Write data to the file created using this function with the following function. Page 325 Write to file (command: 1203) The content of file in which data is not written cannot be read.
  • Page 326 ■Drive name A data to specify the drive in a CPU module of which files are to be managed. (Page 298 Drive name, Drive No.) ■Fixed value '0000' (at the time of an ASCII code) or 0000H (at the time of a binary code) is transmitted. (Page 303 Fixed value) ■File name Character string data of a file name.
  • Page 327: Write To File (command: 1203)

    Write to file (command: 1203) The following example shows the control procedure for writing the data of the file that has been read from the QnACPU and stored in an external device to the specified file ('batch write'), and the control procedure for writing n-bytes of arbitrary one- word data to the specified file ('identical data write (FILL)').
  • Page 328 Data specified by request data ■Command ASCII code Binary code ■Subcommand Type ASCII code Binary code Batch write Writing the identical data (FILL) ■Keyword Allow/prohibit the access to the file of the target memory. (Page 298 Keyword) ■Setting flag Data that indicates whether the keyword is registered in the specified drive. (Page 298 Setting flag) ■Drive name A data to specify the drive in a CPU module of which files are to be managed.
  • Page 329 Communication example (Batch write) Batch write is executed under the following condition. • Drive name: 1 (RAM area of memory card A) • File No.: 1 • File name: ABC12.QPG • Offset address: 7CH • Number of bytes written: 416 bytes ■Data communication in ASCII code (Request data) Subcommand...
  • Page 330 Communication example (Write identical data (FILL)) The identical data are written (FILL) by FFFFH under the following condition. • Drive name: 1 (RAM area of memory card A) • File No.: 1 • File name: ABC12.QPG • Offset address: 7CH •...
  • Page 331: Modify File Information (command: 1204)

    Modify file information (command: 1204) The following examples show the procedure to modify the file information of the specified file. Message format ■Request data • Modify file creation date and time (subcommand: 0000) ASCII Subcommand Keyword Setting flag Drive name File No.
  • Page 332 • Batch modify file information (subcommand: 0002) ASCII File name Extension Subcommand Keyword Setting flag Drive name File No. (Before modification) (After modification) File name Attribute Attribute Extension Modification pattern Last edit time Last edit date (After modification) (After modification) (Before modification) (After modification) Fixed value...
  • Page 333 Data specified by request data ■Command ASCII code Binary code ■Subcommand Type ASCII code Binary code Modify file creation date and time Modify file name, attribute, file size Batch modify file information ■Keyword Allow/prohibit the access to the file of the target memory. (Page 298 Keyword) ■Setting flag Data that indicates whether the keyword is registered in the specified drive.
  • Page 334 Communication example (Modify file creation time) (subcommand: 0000) Modify the creation time of the following file. • Drive name: 1 (RAM area of memory card A) • File name: ABC12.QPG • Modification pattern: 14H (specify the time of QnACPU for the last edit time.) ■Data communication in ASCII code (Request data) Subcommand...
  • Page 335 Communication example (Modify file name, attribute) (subcommand: 0001) Modify the file name and attribute of the following file. • Drive name: 1 (RAM area of memory card A) • File No.: 1 • File name (before modification): ABC12.QPG • File name (after modification): ABC1234.QPG •...
  • Page 336 Communication example (Batch modify file information) (subcommand: 0002) Modify the file name of the following files, attribute, and last edit date and time. • Drive name: 1 (RAM area of memory card A) • File No.: 1 • File name (before modification): ABC12.QPG •...
  • Page 337: Delete File (command: 1205)

    Delete file (command: 1205) The following examples show the procedure to delete the existing files. Determine the file deletion timing for the entire system, including the QnACPU and related devices. The file in which the file lock has been registered cannot be deleted. When QnACPU is in RUN, the following files cannot be deleted.
  • Page 338 ■Extension A character string data of extension of a file. (Page 299 File name, extension, and attribute) ■Attribute A data to specify the file attribute (applicability of data read/write). (Page 299 File name, extension, and attribute) When deleting a file, handle the attribute as dummy data. Communication example Delete files under the following conditions.
  • Page 339: Copy File (command: 1206)

    Copy file (command: 1206) The following examples show the procedure to copy a file. (For QnACPU) The maximum number of data bytes to be copies per one time is static. For the data which are already written, adjust the offset address and number of copy bytes, and divide them and write to the new registration file for several times. Message format ■Request data ASCII...
  • Page 340 Data specified by request data ■Command ASCII code Binary code ■Subcommand ASCII code Binary code ■Keyword Allow/prohibit the access to the file of the target memory. (Page 298 Keyword) ■Setting flag This indicates whether the keyword registered in the specified drive matches the keyword of request data. (Page 290 Setting flag) ■Drive name A data to specify the drive in a CPU module of which files are to be managed.
  • Page 341 Communication example Copy the file with the following condition. • Drive name (copy source): 1 (RAM area of memory card A) • Drive name (copy destination): 3 (RAM area of memory card B) • File No. (copy source): 1H (1) •...
  • Page 342 ■Data communication in binary code (Request data) Setting File No. flag Subcommand Keyword Drive name File name Copy source Offset Copy Setting address mode flag Extension Attribute Number of bytes read Keyword Drive name Copy source Copy destination Offset address Extension Attribute File No.
  • Page 343: Part 5 Compatibility With Aseries

    PART 5 COMPATIBILITY WITH A SERIES This part explains the specifications when using MELSEC-A series devices. 16 MELSEC-A SERIES SUPPORTED SPECIFICATIONS 17 COMMUNICATING USING 1C FRAMES 18 COMMUNICATING USING 1E FRAMES...
  • Page 344: Chapter 16 Melsec-a Series Supported Specifications

    MELSEC-A SERIES SUPPORTED SPECIFICATIONS This chapter explains the specifications of the messages of MC protocol and access ranges when using the MELSEC-A series devices as follows: • When accessing system including MELSEC-A series modules • When utilizing the software for data communication created for MELSEC-A series programmable controller. 16.1 Frames and Commands that can be Used When accessing MELSEC-A series modules, all frames of MC protocol can be used.
  • Page 345: Considerations

    16.3 Considerations The following shows the considerations when using MELSEC-A series devices. Considerations when connecting C24 ■When a computer link module is included in multidrop connection Access in ASCII code (format 1 to format 4). A binary code (format 5) cannot be used. (Including the access to the connected station) Considerations when connecting E71 ■Setting range of monitoring timer...
  • Page 346: Chapter 17 Communicating Using 1c Frames

    COMMUNICATING USING 1C FRAMES This chapter explains the functions when accessing using 1C frame and their message format. 1C frame is compatible with the communication function of the dedicated protocols supported by A series computer link modules. Only the commands for 1C frame explained in this chapter can be used for 1C frame. 17.1 Message Format This section explains the message format when communicating data using 1C frame.
  • Page 347 Item Description Reference Request data Command Specify the function to request such as read or write. Page 346 Command Message wait A data to generate a delay time for response transmission. Page 347 Message wait Specify the wait time within the range of 0 to 150 ms in 10 ms units. Character A data that instructs the CPU module to execute a request specified by Page 347 Character area...
  • Page 348: Details Of Setting Data

    17.2 Details of Setting Data This section explains how to specify the common data items and their content in each message. Command Set the command type. (Page 349 Command and Function Lists for 1C Frame) The setting values for each command are as follows. Function ACPU common AnA/AnUCPU...
  • Page 349: Message Wait

    Message wait Message wait is a data to generate a delay time for response transmission. Some external devices may take time to become receiving status after sending a command. Specify the minimum wait time to send the result after C24 is received a command from an external device. Specify the wait time in accordance with the specifications of the external device.
  • Page 350: Error Code

    When writing data (No response data) The following shows the image when the response data is not included in the response message. (The head of the message data in the figure is a control code of format 1. Page 29 Message Formats of Each Protocol) External device Command Message wait...
  • Page 351: Command And Function Lists For 1c Frame

    17.3 Command and Function Lists for 1C Frame Use the following commands for data communication using 1C frame. Function ACPU AnA/ Description common AnUCPU command common command Device memory Batch read Bit units Reads bit devices (X, Y, M, etc.) in 1-point units. Word units Reads bit devices (X, Y, M, etc.) in 16-point units.
  • Page 352: Device Memory Read And Write

    17.4 Device Memory Read and Write This section explains the specification content and examples of the control procedure when reading from/writing to the device memory are as shown below. For the message formats other than request data and response data, refer to the following sections. Page 344 Message Format, Page 346 Details of Setting Data To read and write the extended file register, use the commands dedicated to the extended file register.
  • Page 353: Data To Be Specified In Command

    Data to be specified in command Device codes, device numbers The settings of each device when reading/writing device memory can be performed using device code and device number as shown in the following figure. Specify the device to be accessed by a device code and a device number. The setting data size differ between ACPU common commands and AnA/AnUCPU commands.
  • Page 354 Accessible device range The following table shows the devices and device number range that can be specified when accessing the device memory. Access the CPU module within the range of device number that can be used by commands and the range of the device number that can be used in the access target CPU.
  • Page 355 Number of device points Specify the number of device points to be read or written. Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits. Specify the number of device points in one command within the device points that can be processed in one communication. Page 465 Number of Processing per One Communication Specify '00' for 256 points.
  • Page 356: Batch Read (bit Units) (command: Br, Jr)

    Batch read (bit units) (command: BR, JR) Reads bit devices (X, Y, M, etc.) in batch. Message format The following shows the message format of the request data and response data of the command. ■Request data Number of Command Message wait Head device device points ■Response data...
  • Page 357 Communication example Read data in bit units under the following conditions. • Message wait: 100 ms • Head device: X040 • Number of device points: 5 points (Request data) ■When using BR (ACPU common command) Message wait Number of Head device device points ■When using JR (AnA/AnUCPU common command) Message wait...
  • Page 358: Batch Read (word Units) (command: Wr, Qr)

    Batch read (word units) (command: WR, QR) Reads bit devices (X, Y, M, etc.) in 16-point units. Reads word devices (D, T, C, etc.) in 1-point units Message format The following shows the message format of the request data and response data of the command. ■Request data Number of device Command...
  • Page 359 Communication example (Reading bit device memory) Read bit devices in 16-point units under the following conditions. • Message wait: 0 ms • Head device: X040 • Number of device points: 32 points (2 words) (Request data) ■When using WR (ACPU common command) Message wait Number of device points Head device...
  • Page 360: Batch Write (bit Units) (command: Bw, Jw)

    Batch write (bit units) (command: BW, JW) Writes bit devices (X, Y, M, etc.) in batch. Message format The following shows the message format of the request data and response data of the command. ■Request data ACPU common command Number of Write data for the number of Command Message wait...
  • Page 361 Communication example Write data in bit units in batch under the following conditions. • Message wait: 0 ms • Head device: M903 • Number of device points: 5 points (Request data) ■When using BW (ACPU common command) Message wait Number of device points (Number of words) Write data for the number of device points Head device (M903) (M904) (M905) (M906) (M907)
  • Page 362: Batch Write (word Units) (command: Ww, Qw)

    Batch write (word units) (command: WW, QW) Write data to bit devices (X, Y, M, etc.) in 16-point units. Write data to word devices (D, T, C, etc.) in 1-point units. Message format The following shows the message format of the request data and response data of the command. ■Request data Number of Write data for the number of...
  • Page 363 Communication example (Writing to word bit memory) Write data to bit devices in 16-point units under the following conditions. • Message wait: 0 ms • Head device: M640 • Number of device points: 32 points (2 words) (Request data) ■When using WW (ACPU common command) Message wait Number of device points (Number of words) Write data for the number of device points...
  • Page 364: Test (random Write) (bit Units) (command: Bt, Jt)

    Test (random write) (bit units) (command: BT, JT) Set/reset devices and device numbers to bit devices (X, Y, M, etc.) by specifying them randomly in 1 point units. Message format The following shows the message format of the request data and response data of the command. ■Request data Number of Device...
  • Page 365 Communication example Perform the test in bit units under the following conditions. • Message wait: 0 ms • Number of device points: 3 points • Device: Turn ON M50, turn OFF B31A, and turn ON Y02F (Request data) ■When using BT (ACPU common command) Number of device points Message wait (Number of words)
  • Page 366: Test (random Write) (word Units) (command: Wt, Qt)

    Test (random write) (word units) (command: WT, QT) Set/reset devices and device numbers to bit devices (X, Y, M, etc.) by specifying them randomly in 16 point units. Write devices and device numbers to word devices (D, T, C, etc.) by specifying them randomly in 1 point units. A mixture of word devices and bit devices (16 bit units) can be specified.
  • Page 367 Communication example Write data with mixture specification of word devices and bit devices (16-point unit) under the following conditions. • Message wait: 0 ms • Number of device points: 3 points (3 words) • Device: Set 1234H to D500, BCA9H from Y100 to Y10F, and 64H to current values of C100 (Request data) ■When using WT (ACPU common command) Message wait...
  • Page 368: Monitor (command: Bm, Jm, Wm, Qm, Mb, Mj, Mn, Mq)

    Monitor (Command: BM, JM, WM, QM, MB, MJ, MN, MQ) The monitor data registration function registers the devices and numbers to be monitored from an external device to C24. The monitor function reads the data of the registered devices from the CPU module and processes it in the external device. When the batch read (BR/WR/JR/QR) is performed, the read device numbers will be consecutive, however, by using this function, devices can be monitored by specifying the device numbers randomly The following example shows the control procedure for monitoring and registering name and number of the devices to be...
  • Page 369 Register monitor data (bit units) (command: BM, JM) Set the bit devices (X, Y, M, etc.) to be monitored in 1-point units. Monitor the device memory registered in bit units using the following command. Page 369 Monitor (bit units) (command: MB, MJ) ■Request data Number of Device...
  • Page 370 Register monitor data (word units) (command: WM, QM) Register the bit devices (X, Y, M, etc.) to be monitored in 16-point units. Register the word devices (D, T, C, etc.) to be monitored in 1-point units. A mixture of word devices and bit devices (16 bit units) can be specified. Monitor the device memory registered in word units using the following command.
  • Page 371 Monitor (bit units) (command: MB, MJ) Monitor the registered bit devices (X, Y, M, etc.). • The bit device memory registered with BM command is monitored using MB command. • The bit device memory registered with JM command is monitored using MJ command. ■Request data Message wait Command...
  • Page 372 Monitor (word units) (command: MN, MQ) Monitor the registered bit devices (X, Y, M, etc.) in 16-point units. Monitor the registered word device (D, T, C, etc.) in 1-point unit. • The bit device memory registered with WM command is monitored using MN command. •...
  • Page 373: Read And Write Extended File Register

    17.5 Read and Write Extended File Register The extended file register is a memory area that stores required data and operation result for various data processing by using the software package for extended file register 'SWOGHP-UTLPC-FN1' or 'SW0SRX-FNUP' (hereinafter abbreviated to UTLP-FN1 and FNUP) and AnACPU and AnUSCPU extended file register dedicated instructions.
  • Page 374: Specification Method For Extended File Register

    Specification method for extended file register The specification method differs depending on the command. • ACPU common command: Specify with device number and block number. • AnA/AnUCPU common command: Specify the address from device number 0 of block number 1 as a device number. (Access with the consecutive device number of extended file register using usable number of blocks ...
  • Page 375 Device number (address) specification using AnA/AnUCPU common commands By using AnA/AnU common command function, the extended file register of block number 1 to 256 can be accessed regardless of each block number by specifying the address from device number '0' of the block number '1' as a device number.
  • Page 376: Data To Be Specified In Command

    Data to be specified in command Device number ■ACPU common command Specify the block number and device number with 7 digits. • When the block number is less than 2 digits 'Block number (2 digits)' + 'R' + 'Device number (4 digits)' •...
  • Page 377: Batch Read (command: Er)

    Batch read (command: ER) Read extended file register (R) in 1-point units. Message format The following shows the message format of the request data and response data of the command. ■Request data Number of device points Message wait Head device No. (Number of words) ■Response data The value of read device is stored in word units.
  • Page 378: Batch Write (command: Ew)

    Batch write (command: EW) Write extended file register (R) in 1-point units. Message format The following shows the message format of the request data and response data of the command. ■Request data Number of Message wait Head device No. Write data for the number of device points device points ■Response data There is no response data for this command.
  • Page 379: Test (random Write) (command: Et)

    Test (random write) (command: ET) Specify the block number and device number to the extended file register (R) in 1-point units and write them randomly. Message format The following shows the message format of the request data and response data of the command. ■Request data Data for the number of device points Number of...
  • Page 380: Monitor (command: Em, Me)

    Monitor (command: EM, ME) The monitor data registration function registers the devices and numbers to be monitored from an external device to C24. The monitor function reads the data of the registered devices from the CPU module and processes it in the external device. When the batch read (ER) or direct read (NR) is performed, the read device numbers will be consecutive, however, by using this function, devices can be monitored by specifying the device numbers randomly.
  • Page 381 Register monitor data (command: EM) Register the device number to be monitored in 1-point units. Monitor the extended file register registered with EM command using the following command. Page 380 Monitor (command: ME) ■Request data Number of Device No. ( for the number of Message wait device points device points)
  • Page 382 Monitor (command: ME) Monitor the registered extended file registers. ■Message format • Request data Message wait • Response data Monitoring result ( For the number of device points ) The value of read device is stored in word units. (Page 74 Read data, write data) ■Data specified by request data •...
  • Page 383: Direct Read (command: Nr)

    Direct read (command: NR) Read extended file register in 1-point (1 word) units by specifying the consecutive device number of extended file register. Message format The following shows the message format of the request data and response data of the command. ■Request data Number of device points Message wait...
  • Page 384: Direct Write (command: Nw)

    Direct write (command: NW) Write extended file register in 1-point (1 word) units by specifying the consecutive device number of extended file register. Message format The following shows the message format of the request data and response data of the command. ■Request data Number of Message wait...
  • Page 385: Read And Write Buffer Memory Of Special Function Module

    17.6 Read and write Buffer Memory of Special Function Module The following examples the commands that performs data read/write to the buffer memory of MELSEC-A series special function modules. This command accesses in byte units regardless of the word/byte specification. Data to be specified in command This section explains the contents and specification methods for data items which are set in each command related to the access to the special function module buffer memory.
  • Page 386 Special function module No. Specify the last input/output signal (I/O address) of the special function module. (Specify the upper 2-digit in 3-digit representation.) Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits. ■Special function module No. which occupies 1 slot Special function module No.
  • Page 387: Accessible Modules

    Accessible modules The accessible special function modules are as follows. Module Type Additional values when Module number calculating start address when module is (Buffer memory start mounted on slot 0 address) High-speed counter module AD61 (S1) A1SD61, A1SD62 (E/D) Analog-digital converter module A616AD A68AD(S2), A68ADN A84AD...
  • Page 388: Batch Read (command: Tr)

    Batch read (command: TR) Read the buffer memory of a special function module. Message format The following shows the message format of the request data and response data of the command. ■Request data Special function Message wait Start address Byte length module No.
  • Page 389 Communication example Read data of 4 bytes under the following conditions. • Message wait: 0 ms • Start address: 7FOH • Byte length: 4 bytes • Special function module No.: 13 (input/output signals are 120H to 13FH) (Request data) Message wait Start address Byte length Special function module No.
  • Page 390: Batch Write (command: Tw)

    Batch write (command: TW) Write data to the buffer memory of a special function module. Message format The following shows the message format of the request data and response data of the command. ■Request data Special function Message wait Start address Write data Byte length module No.
  • Page 391: Loopback Test

    17.7 Loopback Test A loopback test checks whether the communication function between an external device and C24 operates normally. Loopback test (Command: TT) Return the characters received from an external device to the external device unchanged. Message format The following shows the message format of the request data and response data of the command. ■Request data Character Loopback...
  • Page 392 Communication example Return 5-digit data received from an external device to the external device unchanged under the following conditions. • Message wait: 0 ms • Character length: 5 characters • Loopback data: 'ABCDE' (Request data) Message wait Character length Loopback data (Response data) Character length Loopback data...
  • Page 393: Chapter 18 Communicating Using 1e Frames

    COMMUNICATING USING 1E FRAMES This chapter explains the functions when accessing using 1E frame and their message format. 1E frame is compatible with the communication function supported by MELSEC-A series Ethernet interface modules. Only the commands for 1E frame explained in this chapter can be used for 1E frame. 18.1 Message Format This section explains the message format when communicating data using 1E frame.
  • Page 394: Header

    Header A header for TCP/IP and UDP/IP. A header of a request message is added on the external device side and sent. Normally, it is added automatically by an external device. A header for a response message is set automatically by E71. Subheader Set the command type.
  • Page 395: Pc No

    PC No. Specify the station No. of the access target. Accessing the connected station (host station) Specify 'FF'. External device Connected station :Access target station (Host station) Accessing other stations via network Specify the network module station No.01H to 40H (1 to 64) of the access target. External device Connected station (host station)
  • Page 396: Acpu Monitoring Timer

    ACPU monitoring timer Set the wait time up to the completion of reading and writing processing. • 0000H (0): Wait infinitely (Waits until a processing is completed.) • 0001H to FFFFH (1 to 65535): Waiting time (unit: 250 ms) To perform normal data communication, using the timer within the setting range in the table below is recommended depending on the communication destination.
  • Page 397: End Code, Abnormal Code

    End code, Abnormal code The command processing result is stored. End code At normal completion, '0' is stored. At abnormal completion, an error code of the access target is stored. Error code indicates the content of occurred error. If more than one error occurs at the same time, the error code detected first is returned. For the content of error code and its corrective action, refer to the user's manual of the module used.
  • Page 398: Commands And Function List For 1e Frame

    18.3 Commands and Function List for 1E Frame Use the following commands for data communication using 1E frame. Function Command Description Device memory Batch read Bit units Reads bit devices (X, Y, M, etc.) in 1-point units. Word units Reads bit devices (X, Y, M, etc.) in 16-point units. Reads word devices (D, T, C, etc.) in 1-point units.
  • Page 399: Read And Write Device Memory

    18.4 Read and Write Device Memory This section explains the specification content and examples of the request data and the response data when reading and writing device memory. For the message formats other than request data and response data, refer to the following sections. Page 391 Message Format, Page 391 Details of Setting Data To read and write the extended file register, use the commands dedicated to the extended file register.
  • Page 400 ■Data communication in binary code • Device number: Send 4-byte numerical values from the lower byte (L: bits 0 to 7). • Device code: Send 2-byte numerical values from lower byte (L: bits 0 to 7). Data register (D) 1234 (device number is decimal) Convert a device number to hexadecimal.
  • Page 401 Accessible device range ■List of devices (ACPU other than AnU) Specify the device number within the range of the access target module. : Accessible, : No device Device Device range Device number A2-S1 A2A-S1 A1SH A2SH A2N-S1 A1SJ A1SJH A2CJ A0J2H ...
  • Page 402 ■List of devices (AnUCPU, QnACPU) Specify the device within the range of AnACPU. Page 397 Considerations when reading/writing data to module other than ACPU module : Accessible, : Not accessible, : No device Device Device range Device number A2US A2US-S1 Q2A-S1 A2USH-S1 Q2AS...
  • Page 403 ■Device list (QCPU, LCPU, safety CPU) Specify the device within the range of AnACPU. Page 397 Considerations when reading/writing data to module other than ACPU module : Accessible, : Not accessible, : No device Device Device range Device Basic model QCPU QCPU other than left number Safety CPU...
  • Page 404 Number of device points Specify the number of device points to be read or written. Specify the number of device points in one command within the device points that can be processed in one communication. Page 465 Number of Processing per One Communication Specify '00' for 256 points.
  • Page 405: Batch Read In Bit Units (command: 00)

    Batch read in bit units (command: 00) Read bit devices (X, Y, M, etc.) in 1-point units. Message format The following shows the message format of the request data and response data of the command. Specify the command type by subheader. (Page 392 Subheader) ■Request data Number of device Head device...
  • Page 406 Communication example Read the bit devices in the CPU module with E71 mounted under the following conditions. • Head device: M100 • Number of device points: 12 points ■Data communication in ASCII code (Request data) Head device Number of device points (Response data) Data for the number of specified device points (M100)
  • Page 407: Batch Read In Word Units (command: 01)

    Batch read in word units (command: 01) Reads bit devices (X, Y, M, etc.) in 16-point units. Reads word devices (D, T, C, etc.) in 1-point units Message format The following shows the message format of the request data and response data of the command. ■Request data Number of device Head device...
  • Page 408 Communication example Read the bit devices in the CPU module with E71 mounted under the following conditions. • Head device: Y40 • Number of device points: 32 points (2 bytes) ■Data communication in ASCII code (Request data) Head device Number of device points (Response data) Data for the number of specified device points (Y4F) to (Y48)
  • Page 409: Batch Write In Bit Units (command: 02)

    Batch write in bit units (command: 02) Write bit devices (X, Y, M, etc.) in 1-point units. Message format The following shows the message format of the request data and response data of the command. ■Request data Number of Head device Fixed value Write data device points...
  • Page 410 Communication example Write the bit devices in the CPU module with E71 mounted under the following conditions. • Head device: M50 • Number of device points: 12 points ■Data communication in ASCII code (Request data) Head device Number of device points Data for the number of specified device points (M61) (M50)
  • Page 411: Batch Write In Word Units (command: 03)

    Batch write in word units (command: 03) Write bit devices (X, Y, M, etc.) in 16-point units. Write word devices (D, T, C, etc.) in 1-point units. Message format The following shows the message format of the request data and response data of the command. ■Request data Number of Head device...
  • Page 412: Test In Bit Units (random Write) (command: 04)

    Test in bit units (random write) (command: 04) Specify the devices and device numbers of bit devices (X, Y, M, etc.) in 1-point units randomly, and set/reset them. Message format The following shows the message format of the request data and response data of the command. ■Request data There is no request data for this command.
  • Page 413 Communication example Set/reset the bit devices in CPU module with E71 mounted under the following conditions. • Number of device points: 3 points • Data for the number of specified device points: Specify Y94 to ON, M60 to OFF, and B26 to ON. ■Data communication in ASCII code (Request data) Number of device...
  • Page 414: Test In Word Units (random Write) (command: 05)

    Test in word units (random write) (command: 05) Specify the devices and device numbers of bit devices (X, Y, M, etc.) in 16-point units randomly, and set/reset them. Specify the devices and device numbers of word devices (D, T, C, etc.) in 1-point units randomly, and write them. Message format The following shows the message format of the request data and response data of the command.
  • Page 415 Communication example Set/reset the devices in the CPU module with E71 mounted under the following condition. • Number of device points: 3 points • Data for the number of specified device points: Specify Y80 to 8F to ON/OFF, W26 to '1234H', and the current value of C18 to '50H'.
  • Page 416: Monitor Device Memory (command: 06, 07, 08, 09)

    Monitor device memory (command: 06, 07, 08, 09) The ON/OFF status or contents of devices in the CPU module can be monitored from an external device by registering the devices and device numbers to be monitored to E71 in advance and executing the monitor command from the external device.
  • Page 417 Register monitor data(command: 06, 07) Registers bit devices (X, Y, M, etc.) to be monitored in 1-point units. (Command: 06) Registers bit devices (X, Y, M, etc.) to be monitored in 16-point units. (Command: 07) Registers word devices (D, T, C, etc.) to be monitored in 1-point units. (Command: 07) ■Request data Device number Device number...
  • Page 418 Monitor in bit units (command: 08) Monitor the bit devices for which monitor data is registered. ■Request data There is no request data for this command. ■Response data The value of the read device is stored in byte units. The order of data differs depending on the ASCII code or binary code. If the number of device points registered to be monitored is an odd number, dummy data 0 (30H) is added when the monitoring is executed.
  • Page 419 Monitor in word units (command: 09) Monitor word devices and bit devices (16 point units) which are registered as a monitor data. ■Request data There is no request data for this command. ■Response data The value of the read device is stored in word units. The order of data differs depending on the ASCII code or binary code.
  • Page 420: Read And Write Extended File Register

    18.5 Read and Write Extended File Register The extended file register is a memory area that stores required data and operation result for various data processing and AnACPU and AnUSCPU extended file register dedicated instructions by using the software package for extended file register 'SWOGHP-UTLPC-FN1' or 'SW0SRX-FNUP' (hereinafter abbreviated to UTLP-FN1 and FNUP).
  • Page 421: Batch Read (command: 17)

    Batch read (command: 17) Read extended file register (R) in 1-point units. Message format The following shows the message format of the request data and response data of the command. ■Request data (ASCII code) Number of device Block No. Device number points (Binary code) Number of device...
  • Page 422 Communication example Read the extended file registers in the CPU module with E71 mounted under the following conditions. • Block number: No.2 • Device number: R70 • Number of device points: 3 points ■Data communication in ASCII code (Request data) Block No.
  • Page 423: Batch Write (command: 18)

    Batch write (command: 18) Write to extended file register (R) in 1-point units. Message format The following shows the message format of the request data and response data of the command. ■Request data (ASCII code) Number of device Data for the number of Block No.
  • Page 424 Communication example Write data to extended file registers in the CPU module with E71 mounted under the following conditions. • Block number: No.3 • Device number: R100 • Number of device points: 3 points ■Data communication in ASCII code (Request data) Block No.
  • Page 425: Test (random Write) (command: 19)

    Test (random write) (command: 19) Specify the block numbers and device numbers in 1-point units and write them randomly to extended file register (R). Message format The following shows the message format of the request data and response data of the command. ■Request data (ASCII code) Data for the number of device points...
  • Page 426 Communication example Write data to extended file registers in the CPU module with E71 mounted under the following conditions. • Data to be written: R26 in block number 2 and R19 in block number 3 • Number of device points: 2 points ■Data communication in ASCII code (Request data) Number of device points...
  • Page 427: Monitor Extended File Registers (command: 1a, 1b)

    Monitor extended file registers (command: 1A, 1B) The contents of extended file registers in the CPU module can be monitored from an external device by registering the block numbers and device numbers to be monitored to E71 in advance and executing the monitor command from the external device.
  • Page 428 Register monitor data (command: 1A) Register device numbers to be monitored in 1-point units. ■Request data (ASCII code) Data for the number of device points Number of device Block No. Device number points (Binary code) Data for the number of device points Number of device Device number Block No.
  • Page 429 Monitoring (command: 1B) Monitor the extended file registers registered by monitor data registration. ■Data specified by request data There is no request data for this command. ■Response data Store the monitoring result. ■Communication example Monitor the following extended file registers registered by monitor data registration. •...
  • Page 430: Direct Read (command: 3b)

    Direct read (command: 3B) Read extended file register in 1-point (1 word) units by specifying the consecutive device numbers of extended file register. This command is a dedicated command for AnACPU. (The command is equivalent to AnA/AnUCPU common commands of 1C protocol.) Message format The following shows the message format of the request data and response data of the command.
  • Page 431 Communication example Read the extended file registers directly in the CPU module with E71 mounted under the following conditions. • Block number: No.0 • Device number: R70 • Number of device points: 4 points ■Data communication in ASCII code (Request data) Block No.
  • Page 432: Direct Write (command: 3c)

    Direct write (command: 3C) Write extended file register in 1-point (1 word) units by specifying the consecutive device number of extended file register. This command is a dedicated command for AnACPU. (The command is equivalent to AnA/AnUCPU common commands of 1C protocol.) Message format The following shows the message format of the request data and response data of the command.
  • Page 433 Communication example Write data to the extended file registers directly in the CPU module with E71 mounted under the following conditions. • Block number: No.0 • Device number: R100 • Number of device points: 3 points ■Data communication in ASCII code (Request data) Device number Number of device points...
  • Page 434: Read And Write Buffer Memory Of Special Function Module

    18.6 Read and Write Buffer Memory of Special Function Module The section explains the commands that read/write data from/to buffer memory of MELSEC-A series special function module. For the message formats other than request data and response data, refer to the following sections. Page 391 Message Format, Page 391 Details of Setting Data This command accesses in byte units.
  • Page 435: Accessible Modules

    Byte length Specify the byte length of the buffer memory to be read or written. Specify '00' for 256 bytes. ■Data communication in ASCII code Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits. ■Data communication in binary code Send a 1-byte numerical value.
  • Page 436: Batch Read (command: 0e)

    Batch read (command: 0E) Read the buffer memory of a special function module. Message format The following shows the message format of the request data and response data of the command. ■Request data Special function Fixed Start address Byte length module No.
  • Page 437 Communication example Read the buffer memory of the special function module with E71 mounted in the same station under the following conditions. • Special function module No.: 13H (buffer memory whose input/output signal is from 120H to 13FH) • Start address: 7F0H •...
  • Page 438: Batch Write (command: 0f)

    Batch write (command: 0F) Write data to the buffer memory of a special function module. Message format The following shows the message format of the request data and response data of the command. ■Request data Write data Special function Fixed Start address Byte length (for the length of...
  • Page 439 Communication example Write data to buffer the memory of the special function module with E71 mounted in the same station under the following conditions. • Special function module No.: 13H (buffer memory whose input/output signal is from 120H to 13FH) •...
  • Page 440: Appendix

    APPENDIX Appendix 1 Read/Write by Device Extension Specification Accesses shown below are available by setting the subcommand in a request data to 008 or 00C0. • Accessing link direct devices • Accessing module access devices • Accessing CPU buffer memory access devices •...
  • Page 441 Subcommands for device extension specification Use the following subcommands for extension specification. Item ASCII code Binary code When accessing in word units MELSEC-Q/ L series When accessing in bit units When specifying monitor condition For MELSEC When accessing in word units iQ-R series When accessing in bit units APPENDICES APPENDIX...
  • Page 442: Accessing Link Direct Devices

    For MELSEC-Q/L series Extension Device Device number specification code (3 digits) (2 digits) (6 digits) For MELSEC iQ-R series Extension specification Device code Device number (4 digits) (10 digits) ■Data communication in binary code Subcommand type Binary code For MELSEC-Q/L series...
  • Page 443 Data to be specified ■Extension specification Specify the access target network No. in hexadecimal. • ASCII code: Specify J (4AH) at the head of data. Convert the numerical value to 3-digit ASCII code (hexadecimal), and send it from the upper digits. •...
  • Page 444: Accessing Module Access Devices

    ASCII code For MELSEC-Q/L series Extension Device specification code Device number (2 digits) (6 digits) For MELSEC iQ-R series Extension specification Device code Device number (4 digits) (10 digits) ■Data communication in binary code Subcommand type Binary code For MELSEC-Q/L series...
  • Page 445 Data to be specified ■Extension specification Specify the value obtained by dividing the start input/output number of an intelligent function module by 16 in hexadecimal. • ASCII code: Specify U (55H) at the head of data. Convert the numerical value to 3-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 446: Accessing Cpu Buffer Memory Access Device

    Register monitor data 0801 0082 Message format for device extension specification ■Data communication in ASCII code Subcommand type ASCII code For MELSEC iQ-R series Extension specification Device code Device number (4 digits) (10 digits) ■Data communication in binary code Subcommand type...
  • Page 447 For CPU No.4 (start input/output number: 3E30H) ASCII code Binary code Indirect specification of the start input/output number of the CPU module can also be performed by using the CPU module index register. Page 446 Access to index the network No. and start input/output number ■Device code and device number Specify the following devices.
  • Page 448: Access For Index Modification

    Access for index modification Index modification is the indirect specification using index registers. Accesses shown below are available by setting the subcommand in a request data to 008 or 00C0. Target data Reference Network No. or start input/output number Page 446 Access to index the network No. and start input/output number Device number Page 447 Access to index the device number The following device access commands can be used for access.
  • Page 449 Access to index the device number When accessing a device, indirect specification of the device number can be performed using index register. Device Device number code Device modification The access target can be switched with one message, by changing the value of the index register in CPU module programs. When accessing D4 by specifying D0 and Z0 Specify by the request data.
  • Page 450 Message format for device extension specification ■Data communication in ASCII code Extension Extension Device Device specification Device number specification code modification modification ■Data communication in binary code Extension Direct Device Extension Device number specification memory code specification modification specification The following shows the correspondence of each data. Extension specification, Extension specification, Device...
  • Page 451 (Specification range: 0 to 15) Index register (Z0) Subcommand type ASCII code Binary code For MELSEC-Q/L series For MELSEC iQ-R series Long index register (LZ0) Subcommand type ASCII code Binary code For MELSEC iQ-R series When do not perform index modification, specify '0'.
  • Page 452 Communication example (indexing network No.) Access W100 (J1Z0\W100) of network No.1 + Z0 by specifying subcommand 0080. ■Data communication in ASCII code Extension Device Extension specification code Subcommand specification modification Device number ■Data communication in binary code Extension Subcom Extension Device Device specification...
  • Page 453: Accessing Devices For Indirect Specification

    ■Data communication in ASCII code Subcommand type ASCII code For MELSEC-Q/L series Device Device Device number code modification For MELSEC iQ-R series Device code Device number Device modification ■Data communication in binary code Subcommand type Binary code For MELSEC-Q/L series Device...
  • Page 454 (Specification range: 0 to 15) Index register (Z0) Subcommand type ASCII code Binary code For MELSEC-Q/L series For MELSEC iQ-R series For long index register (LZ0) Subcommand type ASCII code Binary code For MELSEC iQ-R series When do not perform index modification, specify the following.
  • Page 455 Device extension specification example (when do not perform index modification) Access D100 by specifying the subcommand 0080 and using devices for indirect specification '@D0'. Store the address of D100 in D0 with a program before executing the command. Specify by the request data. Specify by the program of the CPU module.
  • Page 456: Appendix 2 Processing Time

    Appendix 2 Processing Time Time chart and communication time of C24 transmission sequence The following figure shows a communication time chart when accessing programmable controller from an external device via C24. When accessing CPU module with C24 mounted from an external device The following shows the time chart when the message wait time is specified.
  • Page 457 Transmission time of transmission sequence The following explains the approximate time required from when external device starts data transmission to when C24 returns the result. The average of the above approximate time is shown below for the estimation of the processing time. ■When external device reads data from a programmable controller (unit: ms) Communication time = Request message transmission time (T0) + [(T1 + (1.5 ×...
  • Page 458: Transmission Time When Accessing Other Stations

    Transmission time when accessing other stations This section explains the transmission time (T1) when accessing CC-Link IE, MELSECNET/H, or MELSECNET/10 on other station. For details on the network systems, refer to the manual of each network system. Transmission time (T1) to access other station (CC-Link IE, PLC network) The following formula is for calculating the transmission time of CC-Link IE, MELSECNET/H (PLC network), and MELSECNET/10 (PLC network).
  • Page 459 The following shows the transmission time for MELSECNET/H(remote I/O net) and MELSECNET/10(remote I/O net). MELSEC iQ-R series and MELSEC-L series are not supported. Transmission time (T1) = (Transmission delay time + 1 link scan time or internal processing time) × (n + 1) (When this value is more than the internal processing time.)
  • Page 460 ■Causes of transmission time (T1) delay When a command that takes two scans to send is executed, the transmission time is twice the value obtained by the formula above . When the access request is issued to the same station from multiple external devices simultaneously, refer to the precautions for data communication.
  • Page 461: Number Of Scans Required For Processing

    Number of scans required for processing When connected to C24/E71 ■Basic model QCPU Function Command Subcommand Number of scans required for processing Online change Online change is enabled is disabled Device access Batch read and write Batch read in word units 0401 0000 Batch read in bit units...
  • Page 462 ■Universal model QCPU, LCPU, RCPU Function Command Subcommand Number of scans required for processing QCPU/ RCPU Online change Online change LCPU is enabled is disabled Device access Batch read and write Batch read in word units 0401 0000 0002 Batch read in bit units 0001 0003 Batch write in word units...
  • Page 463: Appendix 3 Compatibility With Multiple Cpu Systems

    Appendix 3 Compatibility with Multiple CPU Systems This section explains data communication using MC protocol when CPU modules are configured in the multiple CPU system. Another station can be accessed whether the control CPU of the module acting as a relay is the same or different. External device Host station Personal computer...
  • Page 464: When Qcpu Is Configured In The Multiple Cpu System

    When QCPU is configured in the multiple CPU system When using C24/E71 in the multiple CPU system of QCPU, refer to the following manual.  QCPU User's Manual (Multiple CPU System) Accessing multiple CPU system on connected station (host station) ■When using C24/E71 in the multiple CPU system Use C24/E71 of which function version is B.
  • Page 465: Appendix 4 Applicable Commands For Online Program Change

    Appendix 4 Applicable Commands for Online Program Change This section explains the applicability of each command according to the STOP/RUN status of CPU module and the settings by supported devices. In this section, the commands that cannot be executed while CPU module is in the RUN status and the commands to enable/ disable the online change with Engineering tool are shown.
  • Page 466: Setting Method For Writing Data To Cpu During Run

    Commands for 4C /3C/2C/4E/3E frame Type Command 4C, 3C, 4E, 3E Device access Batch write in word units 1401 Batch write in bit units Random write in word units (test) 1402 Random write in bit units (test) Batch write multiple blocks 1406 ...
  • Page 467: Appendix 5 Number Of Processing Per One Communication

    Device access The letter in the column of 'Access target' indicates the following module. • R/Q/L: MELSEC iQ-R series, MELSEC-Q series, or MELSEC-L series module • QnA: MELSEC-QnA series and other station module via MELSEC-QnA series network module • A: MELSEC-QnA series module For the restrictions of access target for each command and subcommand type, refer to the following section.
  • Page 468 Label access Function Command Subcommand Number of points processed per communication Batch read and write Batch read array type labels 041A 0000 Depend on the label name length (total number of bytes are 1920 bytes or less) Batch write array type labels 141A 0000 Random read and write...
  • Page 469 File control Function Command Subcommand Number of points processed per communication File check Read directory/file information 1810 0000 (for 36) 0040 Search directory/file 1811 0000 (for 1) information 0040 File creation and Create new file 1820 0000 (for 1) deletion 0040 Delete file 1822...
  • Page 470 QnA dedicated commands Function Command Subcommand Number of points processed per communication Drive memory Read memory usage status 0205 0000 (256 clusters) defragmentation Defragment memory 1207 0000 (1 station) File control Read file Without header 0201 0000 (for 36) information statement table With header...
  • Page 471: Commands For 2c Frame

    Commands for 2C frame Refer to the processing points of the corresponding commands for 4C/3C/4E/3E frame Commands for 1C frame Function Command Number of points processed per communication Device memory Batch read Bit units 256 points Word units Bit device 32 words (512 points) Word device 64 points...
  • Page 472: Commands For 1e Frame

    Commands for 1E frame Function Command Number of points processed per communication Device memory Batch read Bit units 256 points Word units Bit device 128 words (2048 points) Word device 256 points Batch write Bit units 256 points Word units Bit device 40 words (640 points) Word device...
  • Page 473: Appendix 6 Accessible Modules For Each Command

    Appendix 6 Accessible Modules for Each Command The following shows the access target modules that can be specified by a request message. For the functions and commands which can be used for supported devices, refer to the user's manual of each device. Access target modules The character in the column of 'Access target' indicates the following module.
  • Page 474 *1 Specify the device with the specification method of MELSEC-Q/L series. The added new devices for MELSEC iQ-R and their ranges cannot be specified. *2 The command can be used when both access target and connected station are MELSEC iQ-R series module. *3 The command can be specified when using Basic model QCPU, High Performance model QCPU, and Process CPU.
  • Page 475 Module control : Executable, : Executable (with restrictions), : Not executable Function Command Subcommand Access target Reference CPU module Remote I/O Head           Remote 1001 0000 Page 173 Remote RUN control (command: 1001) ...
  • Page 476: Commands For 2c Frame

    Page 244 Close file (command: 182A) *1 The command can be used when both access target and connected station are MELSEC iQ-R series module. *2 It can be used when password is not set to the target file. *3 The command can be used when both access target and connected station are MELSEC-L series module.
  • Page 477: Commands For 1c Frame

    Commands for 1C frame : Executable, :Not executable Function Command Access target Reference CPU module Remote I/O Head Device Batch Bit units         Page 354 Batch read (bit memory read units) (command: BR, ...
  • Page 478: Commands For 1e Frame

    Commands for 1E frame : Executable, :Not executable Function Command Access target Reference CPU module Device memory Batch read Bit units      Page 403 Batch read in bit units (command: 00)      Word units Page 405 Batch read in word units (command: 01) Batch write...
  • Page 479: Appendix 7 Setting Examples

    Appendix 7 Setting Examples This section explains the setting example of the message. Setting examples of message for serial communication module The following shows the setting example when using a command from a serial communication module. Examples of device access in ASCII code (Format 1, 3C frame) The following shows the setting example when using a command for format 1 and 3C frame.
  • Page 480 ■Device writing • Format 1 (sum check enabled), 3C frame • Access target: QCPU of the connected station (host station) • Command: Batch write in word units (command: 1401) • Device: M100 to M131 (for 2 words) Write values to devices. Request message Control code Frame ID No.
  • Page 481 Examples of device access in binary code (Format 5, 4C frame) The following shows the setting example when using a command for format 5 and 4C frame. ■Device reading • Format 5 (sum check enabled), 4C frame • Access target: QCPU of the connected station (host station) •...
  • Page 482 ■Device writing • Format 5 (sum check enabled), 4C frame • Access target: QCPU of the connected station (host station) • Command: Batch write in word units (command: 1401) • Device: M100 to M131 (for 2 words) Write values to devices. Request message Control code Number of data...
  • Page 483: Setting Examples Of Message For Ethernet Interface Module

    Setting examples of message for Ethernet interface module The following shows the setting example when using a command from an Ethernet interface module. Examples of device access in ASCII code (3E frame) The following shows the setting example when using a command for ASCII code and 3E frame. ■Device reading •...
  • Page 484 ■Device writing • ASCII code, 3E frame • Access target: QCPU of the connected station (host station) • Command: Batch write in word units (command: 1401) • Device: M100 to M131 (for 2 words) Write values to devices. Request message Subheader Access route Request data...
  • Page 485 Examples of device access in binary code (3E frame) The following shows the setting example when using a command for binary code and 3E frame. ■Device reading • Binary code, 3E frame • Access target: QCPU of the connected station (host station) •...
  • Page 486 ■Device writing • Binary code, 3E frame • Access target: QCPU of the connected station (host station) • Command: batch write in word units (command: 1401) • Device: M100 to M131 (for 2 words) Write values to devices. Request message Subheader Access route Request data...
  • Page 487: Setting Examples Of Access Route

    Setting examples of access route The following shows the setting example of each access route for each frame. For the details of each setting item, refer to the following section. Page 50 Details of Setting Data Accessing the connected station (host station) The following shows the setting example for accessing the connected station (host station).
  • Page 488 Connecting with a multidrop connection When accessing a multidrop connection station, specify the station No. of an access target to the station No. When requiring to distinguish request sources in a m:n connection, specify the station No. of an external device to the self- station No.
  • Page 489 ■When accessing from an Ethernet interface module When accessing a multidrop connection station with the frames (4E frame, 3E frame) for the Ethernet interface module, specify the start input/output number of a multidrop connection source module (relay station) and the station No. of an access target to the request destination I/O No.
  • Page 490 Connecting with a multidrop link and via network The following shows setting examples for connecting with a multidrop connection and via network. ■Other stations via network from a multidrop connection Specify the setting for a multidrop connection including the connected station (host station) and the setting for a connection via network each.
  • Page 491 MEMO APPENDICES APPENDIX Appendix 7 Setting Examples...
  • Page 492: Index

    INDEX 0 to 9 ......28,47 .......42 1C frame Header .
  • Page 493 ....383,432 Special function module ......50 Station No.
  • Page 494: Revisions

    Japanese manual number: SH-080003-AC This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.
  • Page 495: Warranty

    WARRANTY Please confirm the following product warranty details before using this product. 1. Gratis Warranty Term and Gratis Warranty Range If any faults or defects (hereinafter "Failure") found to be the responsibility of Mitsubishi occurs during use of the product within the gratis warranty term, the product shall be repaired at no cost via the sales representative or Mitsubishi Service Company.
  • Page 496: Trademarks

    TRADEMARKS Ethernet is a registered trademark of Fuji Xerox Corporation in Japan. Unicode is either a registered trademark or a trademark of Unicode, Inc. in the United States and other countries. The company names, system names and product names mentioned in this manual are either registered trademarks or trademarks of their respective companies.
  • Page 498 SH(NA)-080008-W(1605)KWIX MODEL: MC-PROTOCOL-R-E MODEL CODE: 13JF89 HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN When exported from Japan, this manual does not require application to the Ministry of Economy, Trade and Industry for service transaction permission.

This manual is also suitable for:

Melsecq seriesMelsec l series

Comments to this Manuals

Symbols: 0
Latest comments: