SH 080008 W
SH 080008 W
SH 080008 W
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
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.
In this manual, the safety precautions are classified into two levels: " WARNING" and " CAUTION".
[Design precautions]
WARNING
When connecting an external device with a CPU module or intelligent function module to modify data
of a running programmable controller, configure an interlock circuit in the program to ensure that the
entire system will always operate safely. For other forms of control (such as program modification,
parameter change, forced output, or operating status change) of a running programmable controller,
read the relevant manuals carefully and ensure that the operation is safe before proceeding. Improper
operation may damage machines or cause accidents.
Especially, when a remote programmable controller is controlled by an external device, immediate
action cannot be taken if a problem occurs in the programmable controller due to a communication
failure. To prevent this, configure an interlock circuit in the program, and determine corrective actions
to be taken between the external device and CPU module in case of a communication failure.
Do not write any data to the "system area" and "write-protect area" of the buffer memory in the
module. Also, do not use any "use prohibited" signals as an output signal from the CPU module to
each module. Doing so may cause malfunction of the programmable controller system. For the
"system area", "write-protect area", and the "use prohibited" signals, refer to the user's manual for the
module used.
1
[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.
Do not power off the programmable controller or reset the CPU module while the setting values in the
buffer memory are being written to the flash ROM in the module. Doing so will make the data in the
flash ROM undefined. The values need to be set in the buffer memory and written to the flash ROM
again. Doing so also can cause malfunction or failure of the module.
2
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;
and
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.
(2) The PRODUCT has been designed and manufactured for the purpose of being used in general industries.
MITSUBISHI SHALL HAVE NO RESPONSIBILITY OR LIABILITY (INCLUDING, BUT NOT LIMITED TO ANY AND ALL
RESPONSIBILITY OR LIABILITY BASED ON CONTRACT, WARRANTY, TORT, PRODUCT LIABILITY) FOR ANY
INJURY OR DEATH TO PERSONS OR LOSS OR DAMAGE TO PROPERTY CAUSED BY the PRODUCT THAT ARE
OPERATED OR USED IN APPLICATION NOT INTENDED OR EXCLUDED BY INSTRUCTIONS, PRECAUTIONS, OR
WARNING CONTAINED IN MITSUBISHI'S USER, INSTRUCTION AND/OR SAFETY MANUALS, TECHNICAL
BULLETINS AND GUIDELINES FOR the PRODUCT.
("Prohibited Application")
Prohibited Applications include, but not limited to, the use of the PRODUCT in;
Nuclear Power Plants and any other power plants operated by Power companies, and/or any other cases in which the
public could be affected if any problem or fault occurs in the PRODUCT.
Railway companies or Public service purposes, and/or any other cases in which establishment of a special quality
assurance system is required by the Purchaser or End User.
Aircraft or Aerospace, Medical applications, Train equipment, transport equipment such as Elevator and Escalator,
Incineration and Fuel devices, Vehicles, Manned transportation, Equipment for Recreation and Amusement, and
Safety devices, handling of Nuclear or Hazardous Materials or Chemicals, Mining and Drilling, and/or other
applications where there is a significant risk of injury to the public or property.
Notwithstanding the above, restrictions Mitsubishi may in its sole discretion, authorize use of the PRODUCT in one or
more of the Prohibited Applications, provided that the usage of the PRODUCT is limited only for the specific
applications agreed to by Mitsubishi and provided further that no special quality assurance or fail-safe, redundant or
other safety features which exceed the general specifications of the PRODUCTs are required. For details, please
contact the Mitsubishi representative in your region.
3
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.
Make sure that the end users read this manual and then keep the manual in a safe place for future reference.
Relevant products
RJ71C24, RJ71C24-R2, RJ71C24-R4,
LJ71C24, LJ71C24-R2, LJ71E71-100,
QJ71C24N, QJ71C24N-R2, QJ71C24N-R4, QJ71C24, QJ71C24-R2, QJ71E71-100, QJ71E71-B5, QJ71E71-B2
4
CONTENTS
SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
RELEVANT MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
DISCONTINUED MODELS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
CONTENTS
PART 1 MELSEC COMMUNICATION PROTOCOL
5
Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.2 Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.3 Details of Setting Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Header. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Subheader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Request data length and response data length. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Monitoring timer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
End code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Error information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
PART 3 COMMAND
6
Random write in word units (test) (command: 1402). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Random write in bit units (test) (command: 1402). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
8.4 Batch Read and Write Multiple Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Batch read multiple blocks (command: 0406) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Batch write multiple blocks (command: 1406) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
8.5 Device Memory Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Monitoring procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Register monitor data (command: 0801) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Monitor (command: 0802) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
CONTENTS
CHAPTER 9 LABEL ACCESS 125
9.1 Data to be Specified in Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Abbreviation specification of label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Data type ID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Data length, unit specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Read data, write data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
9.2 Batch Read and Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Batch read array type labels (command: 041A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Batch write array type labels (command: 141A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
9.3 Random Read and Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Random read labels (command: 041C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Random write labels (command: 141B) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
7
Read CPU model name (command: 0101) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
11.3 Remote Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Execution procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Unlock (command: 1630) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Lock (command: 1631) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
11.4 Loopback Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Loopback test (command: 0619) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
11.5 Clear Error Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Turn indicator LED OFF, initialize error code (command: 1617) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Turn COM.ERR. LED OFF (command: 1617) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
8
Write to file (command: 1829) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Close file (command: 182A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
CONTENTS
13.2 Global Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Global signal ON/OFF (command: 1618) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
13.3 Transmission sequence initialization function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Initialize transmission sequence (command: 1615). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
13.4 Mode Switching Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Data to be specified in command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Switch mode (command: 1612). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
13.5 Programmable controller CPU monitoring function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Data to be specified in command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Register (command: 0630) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Deregister (command: 0631). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
13.6 On-demand function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Settings for using the on-demand function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Execution procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Execution timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
On-demand (command: 2101) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
9
Write to file (command: 1203) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Modify file information (command: 1204) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Delete file (command: 1205) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Copy file (command: 1206) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
10
18.2 Details of Setting Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Header. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Subheader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
PC No. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
ACPU monitoring timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
End code, Abnormal code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
18.3 Commands and Function List for 1E Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
18.4 Read and Write Device Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
CONTENTS
Data to be specified in command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Batch read in bit units (command: 00). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Batch read in word units (command: 01). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
Batch write in bit units (command: 02) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Batch write in word units (command: 03) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Test in bit units (random write) (command: 04) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
Test in word units (random write) (command: 05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
Monitor device memory (command: 06, 07, 08, 09) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
18.5 Read and Write Extended File Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
Data to be specified in command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
Batch read (command: 17) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
Batch write (command: 18) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
Test (random write) (command: 19). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Monitor extended file registers (command: 1A, 1B) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
Direct read (command: 3B) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Direct write (command: 3C). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
18.6 Read and Write Buffer Memory of Special Function Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
Data to be specified in command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
Accessible modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
Batch read (command: 0E) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
Batch write (command: 0F) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
APPENDIX 438
Appendix 1 Read/Write by Device Extension Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
Accessing link direct devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
Accessing module access devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
Accessing CPU buffer memory access device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
Access for index modification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
Accessing devices for indirect specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Appendix 2 Processing Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
Time chart and communication time of C24 transmission sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
Transmission time when accessing other stations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
Number of scans required for processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Appendix 3 Compatibility with Multiple CPU Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
When RCPU is configured in the multiple CPU system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
When QCPU is configured in the multiple CPU system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Appendix 4 Applicable Commands for Online Program Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Commands that cannot be executed during RUN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Commands that enable/disable online change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Setting method for writing data to CPU during RUN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
Appendix 5 Number of Processing per One Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
11
Commands for 4C/3C/4E/3E frame. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
Commands for 2C frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
Commands for 1C frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
Commands for 1E frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
Appendix 6 Accessible Modules for Each Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
Commands for 4C/3C/4E/3E frame. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
Commands for 2C frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
Commands for 1C frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
Commands for 1E frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
Appendix 7 Setting Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
Setting examples of message for serial communication module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
Setting examples of message for Ethernet interface module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
Setting examples of access route . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
INDEX 490
REVISIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .492
WARRANTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .493
TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .494
12
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. PDF
e-Manual refers to the Mitsubishi FA electronic book manuals that can be browsed using a dedicated tool.
e-Manual has the following features:
Required information can be cross-searched in multiple manuals.
Other manuals can be accessed from the links in the manual.
The hardware specifications of each part can be found from the product figures.
Pages that users often browse can be bookmarked.
13
TERMS
This manual uses the terms listed in the following table unless otherwise noted.
Terms Description
ACPU A generic term for MELSEC-A series CPU modules.
Buffer memory Memory for intelligent function modules to store setting values and monitor values.
Built-in Ethernet port CPU A generic term for MELSEC-Q series CPU modules and MELSEC-L series CPU modules with built-in Ethernet port.
module
C24 Another term for serial communication modules.
CC-Link IE A generic term for CC-Link IE Controller Network and CC-Link IE Field Network.
Connected station (host station) Connected station (host station) indicates a station directly connected to external devices
Control CPU A CPU module that controls each module. In a multiple CPU system, a control CPU can be set for each module.
CPU module A generic term for MELSEC programmable controller CPU.
Device Supported devices and internal devices (X, Y, W, etc.) of the CPU modules
E71 Another term for Ethernet interface modules
Engineering tool A tool for setting, programming, debugging, and maintaining programmable controllers.
The tool indicates GX Developer, GX Works2, and GX Works3 etc.
For the supported tools, refer to the following manual.
The user's manual for the module used or the MELSEC iQ-R Module Configuration Manual
External device A device which sends request message to the supported devices (such as a personal computer, HIM, measuring instrument,
ID units, barcode readers, regulators, and C24s).
Intelligent function module A generic term for MELSEC iQ-R series modules, MELSEC-Q series modules, and MELSEC-L series modules that have
functions other than input or output, such as A/D or D/A converter modules.
LCPU A generic term for MELSEC-L series CPU modules.
Link device Internal devices (LX/LY/LB/LW/RX/RY/RWr/RWw) of the network modules
MC protocol 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 A connection when connecting a personal computer and multiple external devices or C24s in 1:n or m:n basis using RS-422/
485 interface
Network module A generic term for MELSEC programmable controller which can be connected to Ethernet, CC-Link IE Field Network, CC-
Link IE Controller Network, MELSECNET/H, and MELSECNET/10.
Other station Other station indicates a station connected to the connected station (host station) on the network.
QCPU A generic term for MELSEC-Q series CPU modules.
QnACPU A generic term for MELSEC-QnA series CPU modules.
RCPU A generic term for MELSEC iQ-R series CPU module.
Relay station A station that relays data link to other station with mounting more than one network modules on one programmable controller.
Request message A processing request message sent from external devices to the supported devices
Response message A processing result message sent from SLMP compatible devices in response to the request message
Special function module A generic term for MELSEC-A series modules and MELSEC-QnA series modules that have functions other than input or
output, such as A/D or D/A converter modules.
Supported device A generic term for devices which receive MELSEC communication protocol messages.
User frame A data name used when registering the fixed format part in a message to be transmitted between an external device and a
serial communication module, and using it for data transmission and reception. (The content of data in a user frame must be
the same as the specifications of the external device.)
Register the order (transmission control code, C24 station No., sum check, fixed data, etc.) of the head and end part of a
message to be transmitted to serial communication module.
This function is used for the on-demand function of MC protocol and the data send/receive function by nonprocedural
protocol.
14
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 December 2012
15
MEMO
16
PART 1
PART 1 MELSEC
COMMUNICATION
PROTOCOL
1 ABILITY OF MC PROTOCOL
3 COMMUNICATION PROCEDURE
17
1 ABILITY OF MC PROTOCOL
This chapter explains the purposes and features of the MC protocol.
1.1 Purposes
MC protocol performs data communication to control a programmable controller system on the external devices (such as a
personal computer, GOT).
Reading data
Operation monitoring, data analysis, production control, etc. of the CPU module can be performed on the external device.
Writing data
Production instructions can be issued from the external device.
Reading files
File management for the CPU modules of the connected station (host station) and other station can be performed on the
external device.
Writing files
Execution programs can be modified (replaced) by writing file data stored in the external device to the programmable
controller CPU as necessary.
1 ABILITY OF MC PROTOCOL
18 1.1 Purposes
1.2 Features
1
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.)
Read/write
100 100
Request message
Control
Frame ID No. Access route Response data
codes
Response message
Network Network
No.1 No.n
Connected station other stations (Relay station) (Relay station) other stations
(Host station)
Access range
1 ABILITY OF MC PROTOCOL
1.2 Features 19
2 SUPPORTED DEVICES AND ACCESSIBLE
RANGES
This chapter explains the supported modules and accessible modules.
Accessible range
The following devices are accessible.
Supported devices that are connected to the external device directly (connected station)
Other stations on the same network with the supported devices*1
Other stations on the other network that are connected to other station in the same network with the supported device.*1
*1 Other station on which network No. and station No. is set, and a multidrop connection station can be accessed.
The accessible range differs in types (frames) of a message format.
The following figure shows the maximum range that can be accessed.
Network Network
No.1 No.n
Connected station other stations (Relay station) (Relay station) other stations
(Host station)
Access range
For the accessible range of each message, refer to the following sections.
Message formats of serial communication modules Message formats of Ethernet interface modules
Page 45 Accessible range of 4C frame Page 48 Accessible range of 4E frame, 3E frame
Page 46 Accessible range of 3C frame Page 49 Accessible range of 1E frame
Page 46 Accessible range of 2C frame
Page 47 Accessible range of 1C frame
For details on the accessible range of programmable controllers of other stations on a network system, refer to the manual for
the network system used.
The multiple CPU system is supported. For details on the multiple CPU system, refer to the following section.
Page 461 Compatibility with Multiple CPU Systems
Connectable modules
The following modules can be connected from an external device with the serial communication.
Serial communication module
CPU modules that have serial communication function
For the serial communication functions, refer to the user's manual of the CPU module used.
MELSEC-L CPU Module User's Manual (Function Explanation, Program Fundamentals)
QnUCPU User's Manual (Function Explanation, Program Fundamentals)
The following modules can be connected from an external device with the Ethernet communication.
Ethernet interface module
Built-in Ethernet CPU module
For Ethernet built-in CPU modules, refer to the user's manual of the CPU module used.
MELSEC-L CPU Module User's Manual (Built-In Ethernet Function)
QnUCPU User's Manual (Communication via Built-in Ethernet Port)
In the circumstances that multiple network modules with the same network No. are mounted on the station with C24/E71, the
access to other stations is performed via the network module mounted on the slot that has the lowest base unit number when
the network No. is specified.
External device
Supported device
Repeated as needed.
Half-duplex communication
Data communication by MC protocol is performed with half-duplex communication.*1
When accessing CPU module, send the next command message after receiving the response message against the
previously sent command message from the CPU module. (The command messages cannot be sent until the reception of the
response message is completed.)
When the system between external devices and CPU module is configured with an m:n connection, the next command
message cannot be sent until data communication between either of the external devices and CPU modules is completed.
*1 When using the on-demand function using C24, full-duplex communication can be performed.
3 COMMUNICATION PROCEDURE
22 3.1 Features of Communication Process
3.2 Considerations
The following are the considerations when performing data communication.
1. 4.
Supported device
2. 3.
2. When the request message is received from the external device to the target device, a data read request or write request
is issued to the CPU module.
3. In accordance with the request issued from the external device during END processing from the external device, CPU
modules reads/writes data and then sends the processing result back to the supported device.
4. Once the supported device receives a processing result from the CPU module, send a response message including the
processing result to the external device.
When access requests are sent to one station from several external devices at the same time
Depending on the request timing, the processing requested from the external device may be on hold until several END
processing take place. By using either of the following methods, multiple requests can be processed in one scan.
Execute COM instruction by program.
Ensure 1 to 100 ms of service processing time using "Service Processing Setting" of Engineering tool.
3 COMMUNICATION PROCEDURE
3.2 Considerations 23
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.
*1 The monitoring target devices can be registered within the device range of MELSECNET/H remote I/O station.
Only reading from/writing to the buffer memory of intelligent function module is available for MELSECNET/10 remote I/O
stations supported by QnA/A series.
3 COMMUNICATION PROCEDURE
24 3.2 Considerations
Considerations when connecting C24
The following shows the considerations when performing data communication between C24.
3 COMMUNICATION PROCEDURE
3.2 Considerations 25
Considerations when connecting E71
*1 If the calculation result became decimal, the number after the decimal points will be rounded off to positive number.
When exceeded number of commands were sent, an error may occur in the supported device, or response messages may
not be returned from the supported device.
When sending the request message which exceeds the number of commands, decrease the frequency of request message
transmission.
When the response message corresponding to the request message does not return
If the response message is not returned from the supported device, resend the request message from the external device
after the specified time set with "Monitoring timer" of the request message is elapsed.
Replacement of devices
After replacing a device on Ethernet due to failure, the devices may not communicate properly because of the change of the
MAC address. (When replaced with the device that has the same IP address)
When a device in the Ethernet network is replaced, restart all devices in the network.
3 COMMUNICATION PROCEDURE
26 3.2 Considerations
PART 2
PART 2 MESSAGE FORMATS
27
4 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.
Set the format with the communication protocol setting of Engineering tool.
Communication using binary code shorten the communication time since the amount of communication data
is reduced by approximately half as compared to the one using ASCII code.
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 serial communication modules are as follows:
Frame Features and purposes Compatible message format Format
4C frame Accessible from external devices with the maximum Dedicated protocols for MELSEC-QnA series serial Formats 1 to 5
access range. communication modules (QnA extension frame).
3C frame These message formats are simplified compared to the Dedicated protocols for MELSEC-QnA series serial Formats 1 to 4
4C frame. communication modules (QnA frame).
Data communication software for MELSEC-QnA series
2C frame Dedicated protocols for MELSEC-QnA series serial
programmable controllers can be used.
communication modules (QnA simplified frame).
1C frame These frames have the same message structures as Dedicated protocols for MELSEC-A series computer link
when accessing the CPU module using an MELSEC-A modules
series computer link module.
Data communication software for MELSEC-A series
programmable controllers can be used.
Format 1
Message format
Request message
Control code
ENQ Frame ID No. Access route Request data Sum check code
05H
4
Sum check range
Control code
ACK Frame ID No. Access route
06H
Setting data
Set the following items.
Item Description Reference
Control code A code is defined for control. Page 34 Control code
(ENQ, STX, ACK, NAK, ETX)
Frame ID No. Specify the frame to be used. Page 36 Frame ID No.
Access route Specify the access route. Page 45 ACCESS ROUTE
SETTINGS
Request data Set the command that indicates the request content. Refer to "Request Page 62 COMMANDS AND
data" rows of each command. FUNCTIONS
Response data Store the read data for the command. Refer to "Response data" rows of
each command.
Sum check code The value of the lower one byte (8 bits) of the additional result regarding Page 36 Sum check code
the data in the sum check target range as a binary data.
Error code Error code indicates the content of occurred error. Page 38 Error code
Message format
Request message
Control code
ENQ Block No. Frame ID No. Access route Request data Sum check code
05H
Control code
NAK Block No. Frame ID No. Access route Error code
15H
Setting data
Set the following items.
Item Description Reference
Control code A code is defined for control. Page 34 Control code
(ENQ, STX, ACK, NAK, ETX)
Block number This can set arbitrarily in the range of '00H' to 'FFH'. Page 36 Block number
It is used for data defragmentation.
Frame ID No. Specify the frame to be used. Page 36 Frame ID No.
Access route Specify the access route. Page 45 ACCESS ROUTE
SETTINGS
Request data Set the command that indicates the request content. Refer to "Request Page 62 COMMANDS AND
data" rows of each command. FUNCTIONS
Response data Store the read data for the command. Refer to "Response data" rows of
each command.
Sum check code The value of the lower one byte (8 bits) of the additional result regarding Page 36 Sum check code
the data in the sum check target range as a binary data.
Error code Error code indicates the content of occurred error. Page 38 Error code
Message format
Request message
Control code Control code
STX Frame ID No. Access route Request data ETX Sum check code
02H 03H
Control code
STX Frame ID No. Access route End code Response data
Control code
ETX Sum check code
4
02H 03H
Setting data
Set the following items.
Item Description Reference
Control code A code is defined for control. Page 34 Control code
(STX, ETX)
Frame ID No. Specify the frame to be used. Page 36 Frame ID No.
Access route Specify the access route. Page 45 ACCESS ROUTE
SETTINGS
Request data Set the command that indicates the request content. Refer to "Request Page 62 COMMANDS AND
data" rows of each command. FUNCTIONS
Response data Store the read data for the command. Refer to "Response data" rows of
each command.
Sum check code The value of the lower one byte (8 bits) of the additional result regarding Page 36 Sum check code
the data in the sum check target range as a binary data.
End code Indicates that the processing result is a normal completion or abnormal Page 38 End code
completion.
4C/3C/2C frame: QACK (normal), QNAK (abnormal)
1C frame: GG (normal completion), NN (abnormal completion)
Error code Error code indicates the content of occurred error. Page 38 Error code
Message format
Request message
Setting data
Set the following items.
Item Description Reference
Control code A code is defined for control. Page 34 Control code
(ENQ, STX, ACK, NAK, ETX, CR, LF)
Frame ID No. Specify the frame to be used. Page 36 Frame ID No.
Access route Specify the access route. Page 45 ACCESS ROUTE
SETTINGS
Request data Set the command that indicates the request content. Refer to "Request Page 62 COMMANDS AND
data" rows of each command. FUNCTIONS
Response data Store the read data for the command. Refer to "Response data" rows of
each command.
Sum check code The value of the lower one byte (8 bits) of the additional result regarding Page 36 Sum check code
the data in the sum check target range as a binary data.
Error code Error code indicates the content of occurred error. Page 38 Error code
Message format
Request message
Control code Frame Control code
Number of ID No. Access route Request
DLE STX DLE ETX Sum check code
data bytes data
10H 02H F8H 10H 03H
Setting data
Set the following items.
Item Description Reference
Control code A code is defined for control. Page 34 Control code
(DLE, STX, ETX)
Number of data bytes A number of bytes from a frame ID No. to control code (DLE, ETX). Page 35 Number of data bytes
Frame ID No. Specify the frame to be used. Page 36 Frame ID No.
Access route Specify the access route. Page 45 ACCESS ROUTE
SETTINGS
Request data Set the command that indicates the request content. Refer to "Request data" rows of each Page 62 COMMANDS AND
command. FUNCTIONS
Response data Store the read data for the command. Refer to "Response data" rows of each command.
Sum check code The value of the lower one byte (8 bits) of the additional result regarding the data in the sum Page 36 Sum check code
check target range as a binary data.
Response ID code This indicates a response message. The 2-byte numerical value, 'FFFFH' is stored.
Normal completion code This indicates the processing is completed normally. The 2-byte value, '0000H' is stored.
Error code Error code indicates the content of occurred error. Page 38 Error code
Control code
Control code is a data that has special meaning (such as head data of a message) for C24 transmission control.
EOT(04H), CL(0CH)
EOT and CL are codes for initializing the transmission sequence for data communications in ASCII code using the MC
protocol and for placing C24 into wait state to receive commands from an external device.
The transmission sequence is initialized with the command (command code: 1615) when binary code (format 5) is used.
When performing the following at an external device, send the EOT/CL to the C24 depending on the format used.
Canceling a read/write request by command previously sent. (If a write request is issued, the write request cannot be
canceled when the data has already written to the CPU module.)
Placing C24 into the wait state to receive commands before commands are sent.
Placing C24 into the state where it has been started up when data communication cannot be performed normally.
The message structure when sending EOT, CL is shown below.
Only the following data is sent. The station No. and PC No. are not required.
Format EOT CL
Format 1 to format 3
EOT CL
04H 0CH
Format 4
EOT CR LF CL CR LF
04H 0DH 0AH 0CH 0DH 0AH
Range
Calculate the data in the range from frame ID No. before DLE (10H) except for the additional code. (Page 35 Additional
code (10H))
Setting method
Set the data in binary code (format 5) at data communication.
Send 2-byte numerical value from the lower byte (L: bits 0 to 7).
Ex.
Response message (Normal completion: Response data)
Frame ID No.: 1 byte
Access route: 7 byte
Response ID code, normal completion code: 4 bytes
Response data: 2 bytes + additional code (10H) 1 byte
Number of data bytes = 1 + 7 + 4 + 2 = 14 (0EH)
Control code Number of Frame Access route Response Normal Response Control code
data bytes ID No. ID code completion data
DLE STX code DLE ETX Sum check code
10H 02H 0E00H F8H ( 7 bytes ) FFFFH 0000H 001010H 10H 03H
Frame ID No.
Specify the frame to be used.
Type Setting value
4C frame F8
3C frame F9
2C frame FB
1C frame (Not required)
Setting method
Data communication in ASCII code
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
For 4C frame (F8)
ASCII code Binary code
F 8
46H 38H F8H
Sum check
Sum check is a function for detecting error when data changes while data transmission.
Set the sum check existence by Engineering tool.
Ex.
In the following case of 1C frame format 1, the sum check code will be 'C0'.
Formula: 30H + 30H + 46H + 46H + 42H + 52H + 33H + 4DH + 30H + 30H + 30H + 30H = 2C0H
Sum check code: 'C0' (ASCII code 43H, 30H)
Message
Character
Command
PC No.
E
Station
check
code
Sum
wait
area
No.
N
Q
0 0 F F B R 3 M 0 0 0 0 C 0
05H 30H 30H 46H 46H 42H 52H 33H 4DH 30H 30H 30H 30H 43H 30H
In the following case of 4C frame format 5, the sum check code will be '05'.
Formula: 12H + 00H + F8H + 05H + 07H + 03H + 04H + 00H + 01H + 00H + 01H + 04H + 01H + 00H + 40H + 00H + 00H +
9CH + 05H + 00H = 205H
Sum check code: '05' (ASCII code 30H, 35H)
PC No.
Request destination
Request destination
Station No.
Network No.
Self-station No.
Subcommand
Frame ID No.
Device code
Head device
D S D E
Number of device
Number of
data bytes
L T L T
module I/O No.
E X E X
points
L H L H L H L H L H L H H L
10H 02H 12H 00H F8H 05H 07H 03H 04H 00H 01H 00H 01H 04H 01H 00H 40H 00H 00H 9CH 05H 00H 10H 03H 30H 35H
Ex.
Sum check code: '05' (ASCII code 30H, 35H)
ASCII code, binary code
0 5
30H 35H
End code
Indicates that the processing result is a normal completion or abnormal completion.
The following fixed value is stored.
Processing 4C frame, 3C frame, 2C frame 1C frame
result
Normal
completion
Q A C K G G
51H 41H 43H 48H 47H 47H
Abnormal
completion
Q N A K N N
51H 4EH 41H 48v 4EH 4EH
Error code
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.
Q Corresponding Serial Communication Module User's Manual (Basic)
MELSEC-L Serial Communication Module User's Manual (Basic)
MELSEC iQ-R Serial Communication Module User's Manual (Application)
Setting method
Data communication in ASCII code
Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
When error code 7151H is returned
ASCII code Binary code
7 1 5 1
37H 31H 35H 31H 51H 71H
Code
ASCII code and binary code are available. 5
Set the operation settings with Engineering tool.
Communication using binary code shorten the communication time since the amount of communication data
is reduced by approximately half as compared to the one using ASCII code.
Ex.
Subheader of 4E frame request message (serial No. is '1234')
ASCII code Binary code
5 4 0 0 1 2 3 4 0 0 0 0
35H 34H 30H 30H 31H 32H 33H 34H 30H 30H 30H 30H 54H 00H 34H 12H 00H 00H
(Fixed value) (Fixed value) (Fixed value) (Fixed value)
Message format
Request message
Header Subheader Access route Request data length Monitoring timer Request data
Setting data
Set the following items.
Item Description Reference
Header A header of Ethernet. Normally, it is added automatically. Page 42 Header
Subheader The value to be set according to type of message is defined. Page 42 Subheader
4E frame: Set a serial No.
3E frame: Fixed value (Request message '5000', Response message 'D000')
Access route Specify the access route. Page 45 ACCESS ROUTE SETTINGS
Request data Specify the data length from the monitoring timer to the request data. Page 43 Request data length and
length response data length
Monitoring timer Set the wait time up to the completion of reading and writing processing. Page 43 Monitoring timer
Request data For the request data, set the command that indicates the request content. Refer to "Request Page 62 COMMANDS AND
data" rows of each command. FUNCTIONS
Response data The data length from an end code to a response data (at normal completion) or an error Page 43 Request data length and
length information (at abnormal completion) is stored. response data length
Response data For the response data, store the read data for the command at normal completion. Refer to Page 62 COMMANDS AND
"Response data" rows of each command. FUNCTIONS
End code The command processing result is stored. Page 44 End code
Error information Store the information of a station on which an error occurred and information of a command. Page 44 Error information
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
The value to be set according to type of message is defined.
Serial No. added on the external device side must be managed at the external device side.
Ex.
Request message (serial No. '1234')
ASCII code Binary code
5 4 0 0 1 2 3 4 0 0 0 0
35H 34H 30H 30H 31H 32H 33H 34H 30H 30H 30H 30H 54H 00H 34H 12H 00H 00H
(Fixed value) (Free) (Fixed value) (Free)
5 0 0 0
35H 30H 30H 30H 50H 00H
D 0 0 0
44H 30H 30H 30H D0H 00H
Setting method
Specify the data length in hexadecimal. (Unit: byte)
Ex.
The data length is 24 bytes
ASCII code Binary code
0 0 1 8
30H 30H 31H 38H 18H 00H
Monitoring timer
Set the wait time up to the completion of reading and writing processing.
Set the wait time from when E71 on the connection station requests processing to the access target to when the response is
returned.
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.
Access target Monitoring timer
Connected station (host station) 0001H to 0028H (0.25 s to 10 s)
Other station 0002H to 00F0H (0.5s to 60s)
Setting method
Data communication in ASCII code
Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
When specifying 10H (16 250 ms = 4 seconds) for the monitoring timer
ASCII code Binary code
0 0 1 0
30H 30H 31H 30H 10H 00H
Setting method
Data communication in ASCII code
Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
Normal completion
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
C 0 5 1
43H 30H 35H 31H 51H C0H
Error information
Store the information of a station on which an error occurred and information of a command.
Access route: The information of a station which sent an error response is stored. It may differ from the contents of a
request message.
Command, subcommand: The command and the subcommand when an error occurred are stored.
4C frame
External device
Multidrop connection
Multidrop connection
6
Network Network
No.1 No.n
Connected station (Relay station)
(Host 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 (Format 1 to Format 4)
Network Request destination Request destination
No. module I/O No. module station No.
Station No. PC No. Self-station No.
0 0 0 0 F F 0 3 F F 0 0 0 0
30H 30H 30H 30H 46H 46H 30H 33H 46H 46H 30H 30H 30H 30H
Station PC Self-station
No. No. No.
Setting data
Set the following items.
Item Description Reference
Station No. Specify the station to be connected from an external device. Page 50 Station No.
Network No. Specify the network No. of an access target. Page 52 Network No., PC No.
PC No. Specify the network module station No. of an access target.
Request destination When accessing a multidrop connection station via network, specify the start input/output Page 55 Request destination module
module I/O No. number of a multidrop connection source module. I/O No., request destination module
Specify the CPU module of the multiple CPU system and redundant CPU system. station No.
Request destination When accessing a multidrop connection station via network, specify the station No. of an
module station No. access target module.
Self-station No. At the time of m:n multidrop connection, specify the station No. of a request source external Page 59 Self-station No.
device.
External device
Multidrop connection
Network Network
No.1 No.n
Connected station (Relay station)
(Host station)
:Accessible target station
Message format (Setting example for accessing connected station (host station))
Station No. Network No. PC No. Self-station No.
0 0 0 0 F F 0 0
30H 30H 30H 30H 46H 46H 30H 30H
Setting data
Set the following items.
Item Description Reference
Station No. Specify the station to be connected from an external device. Page 50 Station No.
Network No. Specify the network No. of an access target. Page 52 Network No., PC No.
PC No. Specify the network module station No. of an access target.
Self-station No. At the time of m:n multidrop connection, specify the station No. of a request source external Page 59 Self-station No.
device.
2C frame
External device
Multidrop connection
Connected station
(Host station) :Accessible target station
Message format (Setting example for accessing connected station (host station))
Station No. Self-station No.
0 0 0 0
30H 30H 30H 30H
Setting data
Set the following items.
Item Description Reference
Station No. Specify the station to be connected from an external device. Page 50 Station No.
Self-station No. At the time of m:n multidrop connection, specify the station No. of a request source external Page 59 Self-station No.
device.
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. PC No.
6
0 0 F F
30H 30H 46H 46H
Setting data
Set the following items.
Item Description Reference
Station No. Specify the station to be connected from an external device. Page 50 Station No.
PC No. Specify the network module station No. of an access target. Page 52 Network No., PC No.
External device
Network Network
No.1 No.n
(Relay 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 Request destination Request destination
No. module I/O No. module station No.
PC No.
0 0 F F 0 3 F F 0 0
30H 30H 46H 46H 30H 33H 46H 46H 30H 30H
PC
No.
Setting data
Set the following items.
Item Description Reference
Network No. Specify the network No. of an access target. Page 52 Network No., PC No.
PC No. Specify the network module station No. of an access target.
Request destination When accessing a multidrop connection station, specify the start input/output number of Page 55 Request destination module
module I/O No. a multidrop connection source module. I/O No., request destination module
Specify the CPU module of the multiple CPU system and redundant CPU system. station No.
Request destination When accessing a multidrop connection station, specify the station No. of an access target
module station No. module.
External device
Connected station
(Host station)
Network
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
6
PC No.
F F
46H 46H
FFH
Setting data
Set the following items.
Item Description Reference
PC No. Specify the network module station No. of an access target. Page 52 Network No., PC No.
Station No.
Specify the station accessed from an external device.
External device
Connected station
(Host station) :Access target station
External device
Multidrop connection
When accessing all stations connected with the multidrop connection with the global function
Specify 'FF' (FFH) when turning ON/OFF the global signal to all station connected with the multidrop connection using the
global function. By specifying 0 to 31 (00H to 1FH), X1A/X1B turns ON only on the specified station, and does not turn ON on
the other stations.
(Page 255 Global Function)
External device
Multidrop connection
External device
Multidrop connection
Other stations
Network
Setting method
Data communication in ASCII code
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
When the station No. setting for C24 to be accessed is '5'
ASCII code Binary code
0 5
30H 35H 05H
When accessing all station connected with the multidrop connection using the global function
ASCII code Binary code
F F
46H 46H FFH
The station No. of the serial communication module can be checked by using the following parameters of
Engineering tool.
GX Works2: "Station Number Setting" in "Switch Setting"
GX Works3: "Station Number Settings" in "Module Parameter"
External device
Connected station
(Host station) :Access target station
External device
Multidrop connection
External device
Connected station
(Host station)
Network
No.n
Other stations
:Access target station
Network No.3
Network No.2
Network No.1
6
Power supply
module QCPU QJ71LP21
Ethernet
When accessing in accordance with the setting of "Valid Module During Other Station Access" using a frame with the network
No. set is desired, specify 'FEH' (254) to the network No.
When accessing other station via C24/E71 mounted on MELSECNET/H remote I/O station, the access to the other station
specified with the PC No. of MELSECNET/H remote I/O station is available by specifying 'FEH' to the network No.
External device
Multidrop connection
Connected station
(Host station)
Network
No.n
(Relay station) :Station specified to the network No. and station No.
Ex.
Accessing connected station (host station) or multidrop connection station
ASCII code Binary code
Network PC Network PC
No. No. No. No.
0 0 F F
30H 30H 46H 46H 00H FFH
When accessing other station of which network No. is '2' and station No. is '3'
ASCII code Binary code
Network PC Network PC
No. No. No. No.
0 2 0 3
30H 32H 30H 33H 02H 03H
The network No. and station No. of the network module can be checked by using the following parameters of
Engineering tool.
GX Works2: "Network Parameter"
GX Works3: "Module Parameter"
The network No. and the station No. of the network module are normally set in decimal. However, the network
No. and the PC No. are set in hexadecimal.
Multidrop connection
External device
*1 When executing a command that manages files, specify the I/O number other than that of the control system (03D0H) and standby
system (03D1H). Otherwise, the access target is changed and the files cannot be read/written.
6
Ex.
Accessing the connected station (host station)
ASCII code Binary code
0 3 F F 0 0
30H 33H 46H 46H 30H 30H FFH 03H 00H
0 0 0 8 0 5
30H 30H 30H 38H 30H 35H 08H 00H 05H
The station No. of the serial communication module can be checked by using the following parameters of
Engineering tool.
GX Works2: "Station Number Setting" in "Switch Setting"
GX Works3: "Station Number Settings" in "Module Parameter"
When accessing the non-control CPU (multiple CPU No.2) on multiple CPU system
ASCII code Binary code
0 3 E 1 0 0
30H 33H 45H 31H 30H 30H E1H 03H 00H
When external devices are connected with the m:n multidrop connection
Specify the station No. of request source external device, 0 to 31 (00H to 1FH).
For the station No. (m stations) of external devices, the value which is not set to C24 (n stations) of the multidrop connection
is used.
(The total of 'm' and 'n' is up to 32 stations.)
Station No. of a request source external device: Specify it to the self-station No.
Station No. of the connected station C24: Specify it to the station No. (Page 50 Station No.)
External device : Station No. n Request source external device : Station number specified for the Self-station No. External device : Station No. (n + m - 1) < 32
C24:Station number
6
C24: Station No.0 specified for the Station No. C24: Station No.n-1
Connected station
Setting method
Data communication in ASCII code
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
For connection other than m:n multidrop connection
ASCII code Binary code
0 0
30H 30H 00H
1 F
31H 46H 1FH
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.
8 DEVICE ACCESS
9 LABEL ACCESS
12 FILE CONTROL
61
7 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.
Request message
Command
Response message
The explanation of each command in Part 3, the message format of request data and response data are explained.
For the message formats other than request data and response data, refer to the following sections.
Page 28 MESSAGES OF SERIAL COMMUNICATION MODULE
Page 39 MESSAGES OF ETHERNET INTERFACE MODULE
There are some commands that cannot be executed while the CPU module is in RUN. Refer to the following
section.
Page 463 Applicable Commands for Online Program Change
For details on the number of points processed per communication and modules can be accessed by each
command, refer to the following sections.
Page 465 Number of Processing per One Communication
Page 471 Accessible Modules for Each Command
Device access
Function Command Description Subcommand
Batch read Batch read in 0401 Read values from devices in word units. 0000 For MELSEC-
and write word units Read the values in batch with specifying the consecutive device points. 0080 Q/L series
0002 For MELSEC
0082 iQ-R series
Batch read in Read values from devices in bit units. 0001 For MELSEC-
bit units Read the values in batch with specifying the consecutive device points. 0081 Q/L series
0003 For MELSEC
0083 iQ-R series
Batch write in 1401 Write values to devices in word units. 0000 For MELSEC-
word units Write the consecutive devices in batch with specifying the consecutive device 0080 Q/L series
points.
0002 For MELSEC
0082 iQ-R series
Batch write in Write values to devices in bit units. 0001 For MELSEC-
bit units Write the consecutive devices in batch with specifying the consecutive device 0081 Q/L series
points.
0003 For MELSEC
0083 iQ-R series
Random read Random read 0403 Read values from devices in word or double-word units. 0000 For MELSEC-
7
and write in word units Read device values with specifying device numbers. 0080 Q/L series
Discontinuous device numbers can be specified.
0002 For MELSEC
0082 iQ-R series
Read values randomly in word units by specifying the monitor condition. 0040 Monitor
The read timing can be changed. 00C0 condition
specified
Random write 1402 Write values to devices in word or double-word units. 0000 For MELSEC-
in word units Write device values with specifying device numbers. 0080 Q/L series
(test) Discontinuous device numbers can be specified.
0002 For MELSEC
0082 iQ-R series
Random write Write values to devices in bit units. 0001 For MELSEC-
in bit units Write device values with specifying device numbers. 0081 Q/L series
(test) Discontinuous device numbers can be specified.
0003 For MELSEC
0083 iQ-R series
Batch read Batch read 0406 Read values for specified multiple blocks by handling consecutive word devices 0000 For MELSEC-
and write multiple blocks or bit devices as one block. 0080 Q/L series
multiple Each block can be specified with discontinuous device numbers.
0002 For MELSEC
blocks
0082 iQ-R series
Batch write 1406 Write values for specified multiple blocks by handling consecutive word devices 0000 For MELSEC-
multiple blocks or bit devices as one block. 0080 Q/L series
Each block can be specified with discontinuous device numbers.
0002 For MELSEC
0082 iQ-R series
Monitor Register 0801 Register the devices to be monitored. 0000 For MELSEC-
device monitor data 0080 Q/L series
memory
0002 For MELSEC
0082 iQ-R series
Perform monitor data registration by specifying monitor conditions. 0040 Monitor
The read timing can be changed. 00C0 condition
specified
Monitor 0802 Read the values of registered devices. 0000
Module control
Function Command Description Subcommand
Remote Remote RUN 1001 Perform remote RUN to the access target module. 0000
control
Remote STOP 1002 Perform remote STOP to the access target module. 0000
Remote 1003 Perform remote PAUSE to the access target module. 0000
PAUSE
Remote latch 1005 Perform remote latch clear to the access target module. 0000
clear
Remote 1006 Perform remote RESET to the access target module. 0000
RESET
Read CPU 0101 Read model name and model code from the access target module. 0000
model name
Remote Unlock 1630 Specify a remote password to enable communications with other devices. 0000
password (Change a device from the locked state to unlocked state.)
Lock 1631 Specify a remote password to disable communications with other devices. 0000
(Change a device from the unlocked state to locked state.)
Loopback test 0619 Test to check whether communications between external device and connection 0000
station operate normally.
Clear error Turn indicator 1617 Turn OFF the error LED, and initialize communication error information and error 000
information LED OFF, code.
initialize
communication
error
information/
error code
Devices
Specify the device to be accessed by a device code and a device number.
The data order differs between ASCII code or binary code.
The data size to be set differs between MELSEC-Q/L series subcommands (subcommand: 0000, 0001) and MELSEC iQ-R
series subcommands (subcommand: 0002, 0003).
Subcommand type ASCII code Binary code
For MELSEC-Q/L series
Device Device Device
code Device number number code
8
(4 digits) (8 digits) (4 bytes) (2 bytes)
When accessing any of the following devices, use the device extension specification (subcommand: 008).
Link direct device
Module access device
CPU buffer memory access device
For the message format for device extension specification, refer to the following section.
Page 438 Read/Write by Device Extension Specification
8 DEVICE ACCESS
8.1 Data to be Specified in Commands 67
Device codes
Specify the device name to be accessed.
Specify the device within the range of the access target module.
For the values of each device code, refer to the following section.
Page 70 Device code list
Ex.
For input (X)
Subcommand type ASCII code Binary code
For MELSEC-Q/L series
X *
58H 2AH 9CH
X * * *
58H 2AH 2AH 2AH 9CH 00H
8 DEVICE ACCESS
68 8.1 Data to be Specified in Commands
Device number
Specify the number of device to be accessed.
Specify the device number within the range of the access target module.
Ex.
For input (X) 1234 (a device of which device number is in hexadecimal)
Subcommand type ASCII code Binary code
For MELSEC-Q/L series
0 0 1 2 3 4
30H 30H 31H 32H 33H 34H 34H 12H 00H
For internal relay (M) 1234 (a device of which device number is in decimal)
For binary code, convert the device number to hexadecimal. '1234' (decimal) '4D2' (hexadecimal)
Subcommand type ASCII code Binary code
For MELSEC-Q/L series
0 0 1 2 3 4
30H 30H 31H 32H 33H 34H D2H 04H 00H
0 0 0 0 1 2 3 4
30H 30H 30H 30H 31H 32H 33H 34H D2H 04H 00H 00H
DLE
10H 10H 00H 00H 10H 00H 00H
DLE
10H 10H 00H 00H 00H 10H 00H 00H 00H
8 DEVICE ACCESS
8.1 Data to be Specified in Commands 69
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
Device For MELSEC-Q/L For MELSEC iQ-R
series series
Device name Symbol Type Notation ASCII Binary ASCII Binary
Special relay SM Bit Decimal SM 91H SM** 0091H
Special register SD Word Decimal SD A9H SD** 00A9H
Input X Bit Hexadecimal X* 9CH X*** 009CH
Output Y Hexadecimal Y* 9DH Y*** 009DH
Internal relay M Decimal M* 90H M*** 0090H
Latch relay L Decimal L* 92H L*** 0092H
Annunciator F Decimal F* 93H F*** 0093H
Edge relay V Decimal V* 94H V*** 0094H
Link relay B Hexadecimal B* A0H B*** 00A0H
Data register D Word Decimal D* A8H D*** 00A8H
Link register W Hexadecimal W* B4H W*** 00B4H
Timer Contact TS Bit Decimal TS C1H TS** 00C1H
Coil TC C0H TC** 00C0H
Current value TN Word C2H TN** 00C2H
Long timer*1 Contact LTS Bit Decimal LTS* 0051H
Coil LTC LTC* 0050H
Current value LTN Double word LTN* 0052H
Retentive timer Contact STS Bit Decimal SS C7H STS* 00C7H
Coil STC SC C6H STC* 00C6H
Current value STN Word SN C8H STN* 00C8H
Long retentive Contact LSTS Bit Decimal LSTS 0059H
timer*1 Coil LSTC LSTC 0058H
Current value LSTN Double word LSTN 005AH
Counter Contact CS Bit Decimal CS C4H CS** 00C4H
Coil CC CC C3H CC** 00C3H
Current value CN Word CN C5H CN** 00C5H
Long counter*1 Contact LCS Bit Decimal LCS* 0055H
Coil LCC LCC* 0054H
Current value LCN Double word LCN* 0056H
Link special relay SB Bit Hexadecimal SB A1H SB** 00A1H
Link special register SW Word Hexadecimal SW B5H SW** 00B5H
Direct access input DX Bit Hexadecimal DX A2H DX** 00A2H
Direct access output DY Hexadecimal DY A3H DY** 00A3H
Index register Index register Z Word Decimal Z* CCH Z*** 00CCH
Long index register*2 LZ Double word LZ** 0062H
File register*3 Block switching R Word Decimal R* AFH R*** 00AFH
method
Serial number access ZR Hexadecimal ZR B0H ZR** 00B0H
method
Extended data register*4 D Word Decimal D* A8H
*4
Extended link register W Word Hexadecimal W* B4H
Refresh data register RD Word Decimal RD** 002CH
Network No. specified device J\ Page 440 Accessing link direct devices
Link direct device
8 DEVICE ACCESS
70 8.1 Data to be Specified in Commands
Device For MELSEC-Q/L For MELSEC iQ-R
series series
Device name Symbol Type Notation ASCII Binary ASCII Binary
I/O No. specified device U Page 442 Accessing module access devices
Page 444 Accessing CPU buffer memory access device
Module access device U\G Word Decimal G ABH G*** 00ABH
CPU buffer memory access device U3E\G Word Decimal G** 00ABH
U3E\HG Word Decimal HG** 002EH
*1 Page 71 Considerations when accessing long timer, long retentive timer, or long counter
*2 Page 71 Considerations when accessing long index register
*3 Page 71 Consideration when accessing file register
*4 Page 71 Consideration when accessing extended data register or extended link register
Considerations
Devices that cannot be specified
Devices which are not listed on the list cannot be specified by the command for device access of MC protocol.
The available device type and device range are in accordance with the device specifications of access target module.
Specify the device that can be used for the access target module.
Accessing a local device is not available.
When accessing a device that cannot be specified, create a program etc. to copy a value and store the value temporarily in
the device that can be specified and access it.
When a device can be assigned to a standard global label in GX Works3, even the device, to which a device code cannot
be specified, can be accessed by specifying the label name. (Page 125 LABEL ACCESS)
Considerations when accessing long timer, long retentive timer, or long counter
Use any of the following commands. 8
Device Read Write
Long timer Contact LTS, Page 88 Batch read in word units (command: 0401)*1 Page 110 Random write in bit units (test) (command:
Long retentive LSTS 1402)
timer Coil LTC,
LSTC
Current LTN, Page 88 Batch read in word units (command: 0401) Page 106 Random write in word units (test) (command:
value LSTN Page 99 Random read in word units (command: 0403) 1402)
Long counter Contact LCS Page 88 Batch read in word units (command: 0401) Page 94 Batch write in word units (command: 1401)
Page 92 Batch read in bit units (command: 0401) Page 97 Batch write in bit units (command: 1401)
Coil LCC
Page 110 Random write in bit units (test) (command:
1402)
Current LCN Page 88 Batch read in word units (command: 0401) Page 94 Batch write in word units (command: 1401)
value Page 99 Random read in word units (command: 0403) Page 106 Random write in word units (test) (command:
1402)
*1 When reading data with a current value (LTN, LSTN) specified, the values of contacts and coils will be stored in the read data.
8 DEVICE ACCESS
8.1 Data to be Specified in Commands 71
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.
Ex.
For 5 points and 20 points
Number of device points ASCII code Binary code
5 points
0 0 0 5
30H 30H 30H 35H 05H 00H
20 points
0 0 1 4
30H 30H 31H 34H 14H 00H
Access points
Specify the number of device points to be accessed in word unit, double word unit, or bit unit.
Setting method
Data communication in ASCII code
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Use capitalized code for alphabetical letter.
Ex.
For 5 points and 20 points
Number of device points ASCII code Binary code
5 points
0 5
30H 35H 05H
20 points
1 4
31H 34H 14H
8 DEVICE ACCESS
72 8.1 Data to be Specified in Commands
Number of blocks
Specify the number of blocks of the device to be accessed in hexadecimal.
Set each number of blocks within the following range.
Number of word device blocks + Number of bit device blocks 120
Setting method
Data communication in ASCII code
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Use capitalized code for alphabetical letter.
Ex.
For 5 points and 20 points
Number of device points ASCII code Binary code
5 points
0
30H
5
35H 05H
8
20 points
1 4
31H 34H 14H
8 DEVICE ACCESS
8.1 Data to be Specified in Commands 73
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.
Ex.
When indicating ON/OFF status of five points from M10
M10 M11 M12 M13 M14
ON OFF ON OFF ON
ASCII code Binary code (For C24)*1 Binary code (For E71)
*1 For C24, the additional code may be added. (Page 35 Additional code (10H))
8 DEVICE ACCESS
74 8.1 Data to be Specified in Commands
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
Ex.
When indicating ON/OFF status of 32 points from M16
M * 0 0 0 0 1 6 0 0 0 2 A B 1 2 3 4 C D
4DH 2AH 30H 30H 30H 30H 31H 36H 30H 30H 30H 32H 41H 42H 31H 32H 33H 34H 43H 44H
8
A B 1 2 3 4 C D
b15 b14 b13 b12 b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 b15 b14 b13 b12 b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
0 OFF
1 0 1 0 1 0 1 1 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 0 0 1 1 0 1
1 ON
M31 to M16 M47 to M32
Ex.
When indicating the stored data of D350 and D351
Device Number of
code Head device device points Data Data
D * 0 0 0 3 5 0 0 0 0 2 5 6 A B 1 7 0 F
44H 2AH 30H 30H 30H 33H 35H 30H 30H 30H 30H 32H 35H 36H 41H 42H 31H 37H 30H 46H
8 DEVICE ACCESS
8.1 Data to be Specified in Commands 75
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.
Ex.
When indicating ON/OFF status of 32 points from M16
Number of
Head Device device
device code points Data Data
10H 00H 00H 90H 02H 00H 12H ABH CDH 34H
1 2 A B C D 3 4
b7 b6 b5 b4 b3 b2 b1 b0 b15 b14 b13b12 b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 b15 b14 b13b12 b11b10 b9 b8 0 OFF
1 ON
0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 0 0 1 1 0 1 0 0
M23 to M16 M31 to M24 M39 to M32 M47 to M40
Ex.
When indicating the stored data of D350 and D351
5EH 01H 00H A8H 02H 00H ABH 56H 0FH 17H
The value to
read or write. 5 6 A B 1 7 0 F
The content of D350 indicates 56ABH The content of D351 indicates 170FH
(22187 in decimal) (5903 in decimal)
8 DEVICE ACCESS
76 8.1 Data to be Specified in Commands
For double word unit (32-point unit for bit device)
The following shows the data to be read and written in double word units.
Ex.
When indicating ON/OFF status of 32 points from M16
Device
code Device number Data
M * 0 0 0 0 1 6 A B 1 2 3 4 C D
4DH 2AH 30H 30H 30H 30H 31H 36H 41H 42H 31H 32H 33H 34H 43H 44H
A B 1 2 3 4 C D
8
b15 b14 b13 b12 b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 b15b14 b13 b12 b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
0 OFF
1 0 1 0 1 0 1 1 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 0 0 1 1 0 1
1 ON
M47 to M32 M31 to M16
Ex.
When indicating the stored data of D350 (D351)
Device
code Device number Data
D * 0 0 0 3 5 0 1 7 0 F 5 6 A B
44H 2AH 30H 30H 30H 33H 35H 30H 31H 37H 30H 46H 35H 36H 41H 42H
8 DEVICE ACCESS
8.1 Data to be Specified in Commands 77
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.
Ex.
When indicating ON/OFF status of 32 points from M16
Number of Device
device points code Data
C D 3 4 1 2 A B
b7 b6 b5 b4 b3 b2 b1 b0 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 b15 b14 b13 b12 b11 b10 b9 b8
0 OFF
1 1 0 0 1 1 0 1 0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 1 1 ON
M23 to M16 M31 to M24 M39 to M32 M47 to M40
Ex.
When indicating the stored data of D350 (D351)
Number of Device
device points code Data
The value to
read or write. 5 6 A B 1 7 0 F
The content of D350 indicates 56ABH The content of D351 indicates 170FH
(22187 in decimal) (5903 in decimal)
8 DEVICE ACCESS
78 8.1 Data to be Specified in Commands
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.
When real number (0.75) is stored in D0 and D1: D0 = 0000H, D1 = 3F40H
When character string ('12AB') is stored in D2 and D3: D2 = 3231H, D3 = 4241H
For data to be used as real number or character string data in the instructions of the programmable controller, write it to the
device/label according to the defined data specification method. For more details on how to specify data used in instructions,
refer to the programming manual of the CPU module used.
D3 D
D4 NULL
Ex.
Write ASCII code character string data used in the instructions which handle character strings to word device 8
Store the character string ('ABCD') to D0 and D1: D0 = 4241H ('BA'), D1 = 4443H ('DC')
Specify the following data for write data.
ASCII code Binary code
B A D C NULL NULL
4 2 4 1 4 4 4 3 0 0 0 0 A B C D NULL NULL
34H 32H 34H 32H 34H 34H 34H 33H 30H 30H 30H 30H 41H 42H 43H 44H 00H 00H
D0 D0 D1 D2
D1 D2
When communicating ASCII code character string data in ASCII code, data is rearranged every two
characters and stored.
8 DEVICE ACCESS
8.1 Data to be Specified in Commands 79
Set/reset
Specify the ON/OFF status of bit device.
For ON: '1'
Subcommand type ASCII code Binary code
For MELSEC-Q/L series
0 1
30H 31H 01H
0 0 0 1
30H 30H 30H 31H 01H 00H
0 0
30H 30H 00H
0 0 0 0
30H 30H 30H 30H 00H 00H
8 DEVICE ACCESS
80 8.1 Data to be Specified in Commands
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)
8 DEVICE ACCESS
8.1 Data to be Specified in Commands 81
Specification of read timing by monitor condition
The read timing can be changed by specifying monitor conditions according to the selection of subcommand.
Program
END processing
Sequence scan
External
device side Command message
Module side Response message
Read request Data
Program
Monitoring with multiple conditions to the device memory of the same CPU module cannot be performed at
the same time. When this command, to which a monitor condition is specified, is executed while monitor with
other conditions is being performed, the command is completed abnormally.
8 DEVICE ACCESS
82 8.1 Data to be Specified in Commands
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. specification and device specification are specified together, the read processing is performed when both
of the conditions are satisfied.
Specify the following values according to the conditions.
: Specified, : Not specified
Step No. Device specification ASCII code Binary code
specification
0 1 0 F
30H 31H 30H 46H 01H 0FH
0 3 0 F
30H 33H 30H 46H 03H 0FH
0 5 0 F
30H 35H 30H 46H 05H 0FH
8 DEVICE ACCESS
8.1 Data to be Specified in Commands 83
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.
*1 When 'FFFFH' is specified to the file , the specified file is searched with the file name and extension. In this case, a read and write
request from a supported device to the CPU module may be delayed more than one sequence scan time.
File No. File name Extension Attribute SFC pattern Block No. Step No. Step No.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
30H 30H 30H 30H 20H 20H 20H 20H 20H 20H 20H 20H 20H 20H 20H 20H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H
(8 digits)
File specification SFC specification
Binary code
00H 00H 20H 20H 20H 20H 20H 20H 20H 20H 20H 20H 20H 20H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H
8 DEVICE ACCESS
84 8.1 Data to be Specified in Commands
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.
ASCII code
Device Mask value Monitor condition value Device specification Monitor condition value
Device
Device number M * 0 0 0 0 0 0 0 0
code
4DH 2AH 30H 30H 30H 30H 30H 30H 30H 30H
Word device value specification Bit device value specification ( Fixed value for dummy )
Binary code
Device
Monitor Monitor
Mask value condition value Device specification condition value 8
Device number Device
code 00H 00H 00H 90H 00H
Word device value specification Bit device value specification ( Fixed value for dummy )
ASCII code
Device Mask value Monitor condition value Device Monitor condition value
0 0 0 0 Device
D * 0 0 0 0 0 0 0 0 0 0 Device number
code
44H 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H
Word device value specification ( Fixed value for dummy ) Bit device value specification
Binary code
Monitor Monitor
Device Mask value condition value Device condition value
Word device value specification ( Fixed value for dummy ) Bit device value specification
8 DEVICE ACCESS
8.1 Data to be Specified in Commands 85
When no device is specified
Set the following when monitor condition without device specification is selected.
ASCII code
D * 0 0 0 0 0 0 0 0 0 0 0 0 0 0 M * 0 0 0 0 0 0 0 0
44H 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 4DH 2AH 30H 30H 30H 30H 30H 30H 30H 30H
Binary code
00H 00H 00H A8H 00H 00H 00H 00H 00H 00H 00H 90H 00H
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. SFC step No.
Specify an SFC program. 0003H 0000H to 013FH (0 to 319) 0000H to 01FFH (0 to 511)
Do not specify SFC program 0000H 0000H 0000H
Ex.
For 0003H
ASCII code Binary code
0 0 0 3
30H 30H 30H 33H 03H 00H
Step No.
Specify the step No., pointer (P) No., or interrupt pointer (I) No. of the sequence program.
Specify a following 4-byte value.
Condition b31 b30 b29 to b0
Specify the step No. of a sequence program 0 0 (Step No. of the arbitrary sequence program)
Specify pointer No. 0 1 (Arbitrary pointer No.)
Specify an interrupt pointer No. 1 0 (Arbitrary interrupt pointer No.)
Do not specify 00000000H
Ex.
When specifying the interrupt pointer I28 (8000001CH)
ASCII code Binary code
8 0 0 0 0 0 1 C
38H 30H 30H 30H 30H 30H 31H 43H 1CH 00H 00H 80H
8 DEVICE ACCESS
86 8.1 Data to be Specified in Commands
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.)
Ex.
Specifying when bit 0 to 14 of D0 reaches 1000 (3E8H) as a condition
Mask value: 7FFFH
ASCII code Binary code
7 F F F
37H 46H 46H 46H FFH 7FH
8
0 3 E 8
30H 33H 45H 38H E8H 03H
0 2
30H 32H 02H
Falling (ONOFF)
0 4
30H 34H 04H
8 DEVICE ACCESS
8.1 Data to be Specified in Commands 87
8.2 Batch Read and Write
Read or write the values of consecutive devices in batch by specifying the number of device points.
When accessing any of the following devices, use the device extension specification (subcommand: 008).
Link direct device
Module access device
CPU buffer memory access device
For the message format for device extension specification, refer to the following section.
Page 438 Read/Write by Device Extension Specification
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of
Command Subcommand Head device
device points
Response data
The value of read device is stored in word units. The data order differs between ASCII code or binary code. (Page 74
Read data, write data)
When the current value of a long timer or a long retentive timer is read, the values of a contact and a coil are also stored in the
response data. A 4-word response data is read per one device. The configuration of the data to be read is as follows:
Data Description
1st word The current value is stored.
2nd word
3rd word b0: The value of the coil is stored.
b1: The value of the contact is stored.
b2 to b15: Used by the system
4th word Used by the system
0 4 0 1
30H 34H 30H 31H 01H 04H
2C frame
2
32H
Subcommand
Type ASCII code Binary code
For MELSEC-Q/L series
0 0 0 0
30H 30H 30H 30H 00H 00H
8 DEVICE ACCESS
88 8.2 Batch Read and Write
Type ASCII code Binary code
For MELSEC iQ-R series
0 0 0 2
30H 30H 30H 32H 02H 00H
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)
Read 16-point bit device by specifying one point of "Number of device points".
Set the head device number for MELSEC-A series module with a multiple of 16.
8 DEVICE ACCESS
8.2 Batch Read and Write 89
Communication example (Reading bit device)
Read the value of M100 to M131 (for 2 words). (Subcommand: for MELSEC-Q/L series)
Device
Subcommand code Head device number Number of device points
0 4 0 1 0 0 0 0 M * 0 0 0 1 0 0 0 0 0 2
30H 34H 30H 31H 30H 30H 30H 30H 4DH 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 32H
(Response data)
1 2 3 4 0 0 0 2
31H 32H 33H 34H 30H 30H 30H 32H
1 2 3 4 0 0 0 2
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 to M100 M131 to M116
Device
Subcommand code
Head device Number of
number device points
01H 04H 00H 00H 64H 00H 00H 90H 02H 00H
(Response data)
3 4 1 2 0 2 0 0
0 = OFF
0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 = ON
M107 to M100 M115 to M108 M123 to M116 M131 to M124
8 DEVICE ACCESS
90 8.2 Batch Read and Write
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.
Device
Subcommand code Head device number Number of device points
0 4 0 1 0 0 0 0 T N 0 0 0 1 0 0 0 0 0 3
30H 34H 30H 31H 30H 30H 30H 30H 54H 4EH 30H 30H 30H 31H 30H 30H 30H 30H 30H 33H
(Response data)
1 2 3 4 0 0 0 2 1 D E F
31H 32H 33H 34H 30H 30H 30H 32H 31H 44H 45H 46H
Device
Subcommand code
Head device Number of
number device points
8
01H 04H 00H 00H 64H 00H 00H C2H 03H 00H
(Response data)
8 DEVICE ACCESS
8.2 Batch Read and Write 91
Batch read in bit units (command: 0401)
Read values from devices in bit units.
When accessing any of the following devices, use the device extension specification (subcommand: 008).
Link direct device
Module access device
CPU buffer memory access device
For the message format for device extension specification, refer to the following section.
Page 438 Read/Write by Device Extension Specification
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of
Command Subcommand Head device device points
Response data
The value of read device is stored in bit units. The data order differs between ASCII code or binary code. (Page 74 Read
data, write data)
0 4 0 1
30H 34H 30H 31H 01H 04H
2C frame
1
31H
Subcommand
Type ASCII code Binary code
For MELSEC-Q/L series
0 0 0 1
30H 30H 30H 31H 01H 00H
0 0 0 3
30H 30H 30H 33H 03H 00H
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
92 8.2 Batch Read and Write
Head device
Specify the head device of the consecutive devices. (Page 67 Devices)
Communication example
Read values of M100 to M107. (Subcommand: for MELSEC-Q/L series)
0 4 0 1 0 0 0 1 M * 0 0 0 1 0 0 0 0 0 8
30H 34H 30H 31H 30H 30H 30H 31H 4DH 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 38H
(Response data)
0 0 0 1 0 0 1 1 0 = OFF
1 = ON
30H 30H 30H 31H 30H 30H 31H 31H
M100 to M107
Device
Subcommand code
Head device Number of
number device points
01H 04H 01H 00H 64H 00H 00H 90H 08H 00H
(Response data)
0 = OFF
1 = ON
00H 01H 00H 11H
M107
to
M106
M101
M100
8 DEVICE ACCESS
8.2 Batch Read and Write 93
Batch write in word units (command: 1401)
Write values to devices in word units.
When accessing any of the following devices, use the device extension specification (subcommand: 008).
Link direct device
Module access device
CPU buffer memory access device
For the message format for device extension specification, refer to the following section.
Page 438 Read/Write by Device Extension Specification
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of
Command Subcommand Head device device points Write data
Response data
There is no response data for this command.
1 4 0 1
31H 34H 30H 31H 01H 14H
2C frame
4
34H
Subcommand
Type ASCII code Binary code
For MELSEC-Q/L series
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 0 2
30H 30H 30H 32H 02H 00H
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
94 8.2 Batch Read and Write
Head device
Specify the head device of the consecutive devices. (Page 67 Devices)
For bit device, read 16-point bit device by specifying one point of "Number of device points".
Set the head device number for MELSEC-A series module with a multiple of 16.
Write data 8
Specify the data to be written for the number of device points in hexadecimal. (Page 74 Read data, write data)
1 4 0 1 0 0 0 0 M * 0 0 0 1 0 0 0 0 0 2 2 3 4 7 A B 9 6
31H 34H 30H 31H 30H 30H 30H 30H 4DH 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 32H 32H 33H 34H 37H 41H 42H 39H 36H
2 3 4 7 A B 9 6
0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 1 0 0 OFF
1 ON
M115 to M100 M131 to M116
01H 14H 00H 00H 64H 00H 00H 90H 02H 00H 47H 23H 96H ABH
4 7 2 3 9 6 A B
0 1 0 0 0 1 1 1 0 0 1 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 0 1 0 1 1 0 OFF
1 ON
M107 to M100 M115 to M108 M123 to M116 M131 to M124
8 DEVICE ACCESS
8.2 Batch Read and Write 95
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)
1 4 0 1 0 0 0 0 D * 0 0 0 1 0 0 0 0 0 3 1 9 9 5 1 2 0 2 1 1 3 0
31H 34H 30H 31H 30H 30H 30H 30H 44H 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 33H 31H 39H 39H 35H 31H 32H 30H 32H 31H 31H 33H 30H
01H 14H 00H 00H 64H 00H 00H A8H 03H 00H 95H 19H 02H 12H 30H 11H
8 DEVICE ACCESS
96 8.2 Batch Read and Write
Batch write in bit units (command: 1401)
Write values to devices in bit units.
When accessing any of the following devices, use the device extension specification (subcommand: 008).
Link direct device
Module access device
CPU buffer memory access device
For the message format for device extension specification, refer to the following section.
Page 438 Read/Write by Device Extension Specification
Message format
The following shows the message format of the request data and response data of the command.
Request data
Command Number of
Subcommand Head device Write data
device points
Response data
There is no response data for this command.
1 4 0 1
31H 34H 30H 31H 01H 14H
2C frame
3
33H
Subcommand
Type ASCII code Binary code
For MELSEC-Q/L series
0 0 0 1
30H 30H 30H 31H 01H 00H
0 0 0 3
30H 30H 30H 33H 03H 00H
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 97
Head device
Specify the head device of the consecutive devices. (Page 67 Devices)
Write data
Specify the value to be written to a device for the number equivalent to the specified number of device points. (Page 74
Read data, write data)
Communication example
Write values to M100 to M107. (Subcommand: for MELSEC-Q/L series)
1 4 0 1 0 0 0 1 M * 0 0 0 1 0 0 0 0 0 8 1 1 0 0 1 1 0 0
31H 34H 30H 31H 30H 30H 30H 31H 4DH 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 38H 31H 31H 30H 30H 31H 31H 30H 30H
0 OFF
1 ON
01H 14H 01H 00H 64H 00H 00H 90H 08H 00H 11H 00H 11H 00H
M107
to
M106
M101
M100
8 DEVICE ACCESS
98 8.2 Batch Read and Write
8.3 Random Read and Write
Read or write device values by specifying the device numbers. It can be specified with discontinuous device numbers.
When accessing any of the following devices, use the device extension specification (subcommand: 008).
Link direct device
Module access device
CPU buffer memory access device
For the message format for device extension specification, refer to the following section.
Page 438 Read/Write by Device Extension Specification
Message format
The following shows the message format of the request data and response data of the command.
Request data
Monitor condition Number of word access
Number of double word
Command Subcommand specification points (m points) access points (n points)
designation
Response data
Data read (first point) Data read (mth point) Data read (first point) Data read (nth point)
The value of read device is stored in word units and in double word units. The data order differs between ASCII code or binary
code. (Page 74 Read data, write data)
0 4 0 3
30H 34H 30H 33H 03H 04H
2C frame
5
35H
8 DEVICE ACCESS
8.3 Random Read and Write 99
Subcommand
The read timing can be changed by specifying monitor conditions according to the selection of subcommand. (Page 81
Monitor condition specification)
For 2C frame, the specification is not required. Functions and specification methods are equivalent to the subcommands that
do not specify monitor conditions for MELSEC-Q/L series.
When do not specify monitor condition
Type ASCII code Binary code
For MELSEC-Q/L series
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 0 2
30H 30H 30H 32H 02H 00H
0 0 4 0
30H 30H 34H 30H 40H 00H
At monitor condition specification, use the subcommand 00C0 for the device extension specification. The
message format for device extension specification is the same as that of 008 . Refer to it by substituting 008
to 00C0.
Page 438 Read/Write by Device Extension Specification
The number of point is specified in the following units depending on device type.
Device type Number of word access points Number of double word access points
Bit device 16-point units 32-point units
Word device, double word device 1 word units 2 word units
When using subcommand for MELSEC-Q/L series module, calculate it as access points 2 in the following
case.
When specifying the file register (ZR) of High Performance model QCPU
Device
Specify the device to be read. (Page 67 Devices)
8 DEVICE ACCESS
100 8.3 Random Read and Write
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.
8 DEVICE ACCESS
8.3 Random Read and Write 101
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.
Number of Number of
word double word
Subcommand access points access points
0 4 0 3 0 0 0 0 0 4 0 3
30H 34H 30H 33H 30H 30H 30H 30H 30H 34H 30H 33H
D * 0 0 0 0 0 0 T N 0 0 0 0 0 0 M * 0 0 0 1 0 0 X * 0 0 0 0 2 0
44H 2AH 30H 30H 30H 30H 30H 30H 54H 4EH 30H 30H 30H 30H 30H 30H 4DH 2AH 30H 30H 30H 31H 30H 30H 58H 2AH 30H 30H 30H 30H 32H 30H
D * 0 0 1 5 0 0 Y * 0 0 0 1 6 0 M * 0 0 1 1 1 1
44H 2AH 30H 30H 31H 35H 30H 30H 59H 2AH 30H 30H 30H 31H 36H 30H 4DH 2AH 30H 30H 31H 31H 31H 31H
(Response data)
1 9 9 5 1 2 0 2 2 0 3 0 4 8 4 9
31H 39H 39H 35H 31H 32H 30H 32H 32H 30H 33H 30H 34H 38H 34H 39H
4 C 5 4 4 F 4 E C 3 D E B 9 A F B A D D B C B 7
34H 43H 35H 34H 34H 46H 34H 45H 43H 33H 44H 45H 42H 39H 41H 46H 42H 41H 44H 44H 42H 43H 42H 37H
8 DEVICE ACCESS
102 8.3 Random Read and Write
Data communication in binary code
(Request data)
Subcommand
00H 00H 00H A8H 00H 00H 00H C2H 64H 00H 00H 90H 20H 00H 00H 9CH
DCH 05H 00H A8H 60H 01H 00H 9DH 57H 04H 00H 90H
(Response data)
95H 19H 02H 12H 30H 20H 49H 48H 4EH 4FH 54H 4CH AFH B9H DEH C3H B7H BCH DDH BAH 8
D0 T0 M115 X2F D1500 D1501 Y17F M1141
to to to to
M100 X20 Y160 M1111
0 OFF 0 OFF
0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1 0 0 0 0 1 1
1 ON 1 ON
M107 to M100 M115 to M108 Y167 to Y160 Y17F to Y178
0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 0 0 OFF 0 OFF
1 0 1 1 0 1 1 1 1 0 1 1 1 0 1 0
1 ON 1 ON
X27 to X20 X2F to X28 M1118 to M1111 M1142 to M1135
8 DEVICE ACCESS
8.3 Random Read and Write 103
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.
0 4 0 3 0 0 4 0 0 3 0 F 0 0 0 1 C O N B 1 Q P G
30H 34H 30H 33H 30H 30H 34H 30H 30H 33H 30H 46H 30H 30H 30H 31H 43H 4FH 4EH 42H 31H 20H 20H 20H 51H 50H 47H 20H
File designation
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 E 8
30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 33H 45H 38H
Monitor Monitor
Device Device Mask condition Device Device condition
code number value value code number value
W * 0 0 0 1 0 0 F F F F 0 0 7 B M * 0 0 0 0 0 0 0 0
57H 2AH 30H 30H 30H 31H 30H 30H 46H 46H 46H 46H 30H 30H 37H 42H 4DH 2AH 30H 30H 30H 30H 30H 30H 30H 30H
0 4 0 3
30H 34H 30H 33H
D * 0 0 0 0 0 0 T N 0 0 0 0 0 0 M * 0 0 0 1 0 0 X * 0 0 0 0 2 0
44H 2AH 30H 30H 30H 30H 30H 30H 54H 4EH 30H 30H 30H 30H 30H 30H 4DH 2AH 30H 30H 30H 31H 30H 30H 58H 2AH 30H 30H 30H 30H 32H 30H
D * 0 0 1 5 0 0 Y * 0 0 0 1 6 0 M * 0 0 1 1 1 1
44H 2AH 30H 30H 31H 35H 30H 30H 59H 2AH 30H 30H 30H 31H 36H 30H 4DH 2AH 30H 30H 31H 31H 31H 31H
(Response data)
It is the same as the communication example when monitor condition is not specified. (Page 102 Data communication in
ASCII code)
8 DEVICE ACCESS
104 8.3 Random Read and Write
Data communication in binary code
(Request data)
Monitor SFC
Subcommand condition File No. File name Extension Attribute Step No. Step No. Block No. pattern
C O N B 1 Q P G
03H 04H 40H 00H 03H 0FH 01H 00H 43H 4FH 4EH 42H 31H 20H 20H 20H 51H 50H 47H 20H E8H 03H 00H 00H 00H 00H 00H 00H 00H 00H
00H 01H 00H B4H FFH FFH 7BH 00H 00H 00H 00H 90H 00H
04H 03H 00H 00H 00H A8H 00H 00H 00H C2H 64H 00H 00H 90H 20H 00H 00H 9CH
DCH 05H 00H A8H 60H 01H 00H 9DH 57H 04H 00H 90H
8
(Response data)
It is the same as the communication example when monitor condition is not specified. (Page 103 Data communication in
binary code)
8 DEVICE ACCESS
8.3 Random Read and Write 105
Random write in word units (test) (command: 1402)
Write values to devices in word units and double word units. It can be specified with discontinuous device numbers.
When accessing any of the following devices, use the device extension specification (subcommand: 008).
Link direct device
Module access device
CPU buffer memory access device
For the message format for device extension specification, refer to the following section.
Page 438 Read/Write by Device Extension Specification
Message format
The following shows the message format of the request data and response data of the command.
Request data
Device (first point) Write data (first point) Device (mth point) Write data (nth point)
Device (first point) Write data (first point) Device (nth point) Write data (nth point)
Response data
There is no response data for this command.
1 4 0 2
31H 34H 30H 32H 02H 14H
2C frame
7
37H
Subcommand
Type ASCII code Binary code
For MELSEC-Q/L series
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 0 2
30H 30H 30H 32H 02H 00H
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
106 8.3 Random Read and Write
Number of word access points, number of double word access points
Specify the number of device points to be written within the following range. (Page 72 Access points)
Access target Range
MELSEC iQ-R series module (subcommand: 0000) 1 (Number of word access points 12) + (Number of double word access
MELSEC-Q/L series module (subcommand: 0000) points 14) 1920 points
MELSEC iQ-R series module (subcommand: 0002, 008) 1 (Number of word access points 12) + (Number of double word access
MELSEC-Q/L series module (subcommand: 0080) points 14) 960 points
MELSEC-QnA series module
Module on other station via MELSEC-QnA series network module
MELSEC-A series module 1 Number of word access points 10 points
The number of point is specified in the following units depending on device type.
Device type Number of word access points Number of word access points
Bit device 16-point units 32-point units
Word device, double word device 1 word units 2 word units
Device
Specify a device to be written. (Page 67 Devices)
Set the head device number with a multiple of 16 for bit device access of MELSEC-A series module.
Write data
Specify the values to be written to device. (Page 74 Read data, write data)
Specify the write data in hexadecimal.
Specify 'Device' and 'Write data' with number of points which are specified in 'Number of word access points'
and 'Number of double word access points'. When the access point is set to '0', the specification is not
required.
8
Communication example
Write values to devices as follows. (Subcommand: for MELSEC-Q/L series)
Item Device to be written
Word access D0, D1, M100 to M115, X20 to X2F
Double word access D1500 to D1501, Y160 to Y17F, M1111 to M1142
8 DEVICE ACCESS
8.3 Random Read and Write 107
Data communication in ASCII code
(Request data)
1 4 0 2 0 0 0 0 0 4 0 3
31H 34H 30H 32H 30H 30H 30H 30H 30H 34H 30H 33H
D * 0 0 0 0 0 0 0 5 5 0 D * 0 0 0 0 0 1 0 5 7 5
44H 2AH 30H 30H 30H 30H 30H 30H 30H 35H 35H 30H 44H 2AH 30H 30H 30H 30H 30H 31H 30H 35H 37H 35H
Device Device
code Device number Write data 1 code Device number Write data 2
M * 0 0 0 1 0 0 0 5 4 0 X * 0 0 0 0 2 0 0 5 8 3
4DH 2AH 30H 30H 30H 31H 30H 30H 30H 35H 34H 30H 58H 2AH 30H 30H 30H 30H 32H 30H 30H 35H 38H 33H
Device
Device for double word access
code Device number Write data 3
D * 0 0 1 5 0 0 0 4 3 9 1 2 0 2 Y * 0 0 0 1 6 0 2 3 7 5 2 6 0 7
44H 2AH 30H 30H 31H 35H 30H 30H 30H 34H 33H 39H 31H 32H 30H 32H 59H 2AH 30H 30H 30H 31H 36H 30H 32H 33H 37H 35H 32H 36H 30H 37H
Device
code Device number Write data 4
M * 0 0 1 1 1 1 0 4 2 5 0 4 7 5
4DH 2AH 30H 30H 31H 31H 31H 31H 30H 34H 32H 35H 30H 34H 37H 35H
0 5 4 0 2 3 0 7
0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 OFF 0 OFF
0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 1 1
1 ON 1 ON
M115 to M100 Y17F to Y178 Y167 to Y160
0 5 8 3 0 4 7 5
0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 1 0 OFF 0 0 0 0 0 1 0 0 0 0 0 1 1 1 0 1 0 1 0 OFF
1 ON 1 ON
X2F to X20 M1142 to M1135 M1118 to M1111
8 DEVICE ACCESS
108 8.3 Random Read and Write
Data communication in binary code
(Request data)
Subcommand
Device for word access Device Device Write Device Device Write
number code data 1 number code data 2
00H 00H 00H A8H 50H 05H 01H 00H 00H A8H 75H 05H 64H 00H 00H 90H 40H 05H 20H 00H 00H 9CH 83H 05H
DCH 05H 00H A8H 02H 12H 39H 04H 60H 01H 00H 9DH 07H 26H 75H 23H 57H 04H 00H 90H 75H 04H 25H 04H
4 0 0 5 0 7 2 3
0 OFF 0 OFF
1 ON 1 ON
0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 1 0 0 1 0 0 0 1 1
M107 to M100 M115 to M108 Y167 to Y160 Y17F to Y178
8 DEVICE ACCESS
8.3 Random Read and Write 109
Random write in bit units (test) (command: 1402)
Write values to devices in bit units. It can be specified with discontinuous device number.
When accessing any of the following devices, use the device extension specification (subcommand: 008).
Link direct device
Module access device
CPU buffer memory access device
For the message format for device extension specification, refer to the following section.
Page 438 Read/Write by Device Extension Specification
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
There is no response data for this command.
Request data
Command
Frame ASCII code Binary code
4C/3C/4E/3E frame
1 4 0 2
31H 34H 30H 32H 02H 14H
2C frame
6
36H
Subcommand
Type ASCII code Binary code
For MELSEC-Q/L series
0 0 0 1
30H 30H 30H 31H 01H 00H
0 0 0 3
30H 30H 30H 33H 03H 00H
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
110 8.3 Random Read and Write
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.
Communication example
Turn M50 OFF, and turn Y2F ON. (Subcommand: for MELSEC-Q/L series)
Number of
bit Device Device
Subcommand access points code Device number Set/reset code Device number Set/reset
1 4 0 2 0 0 0 1 0 2 M * 0 0 0 0 5 0 0 0 Y * 0 0 0 0 2 F 0 1
31H 34H 30H 32H 30H 30H 30H 31H 30H 32H 4DH 2AH 30H 30H 30H 30H 35H 30H 30H 30H 59H 2AH 30H 30H 30H 30H 32H 46H 30H 31H
02H 14H 01H 00H 02H 32H 00H 00H 90H 00H 2FH 00H 00H 9DH 01H
8 DEVICE ACCESS
8.3 Random Read and Write 111
8.4 Batch Read and Write Multiple Blocks
Read or write values for specified multiple blocks by handling consecutive devices as one block.
When communicating with a Universal model QCPU or an LCPU, if other than "Specify service process
execution counts" is selected for "Service Processing Setting" of the CPU module, data separation may occur.
To avoid data separation, select "Specify service process execution counts".
When accessing any of the following devices, use the device extension specification (subcommand: 008).
Link direct device
Module access device
CPU buffer memory access device
For the message format for device extension specification, refer to the following section.
Page 438 Read/Write by Device Extension Specification
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of word Number of bit Block of word Block of word
Command Subcommand device blocks device blocks device device
(m points) (n points) (first point) (mth point)
Response data
The value of read device is stored in hexadecimal. The data order differs between ASCII code or binary code. (Page 74
Read data, write data)
Data for the number of word device blocks Data for the number of bit device blocks
0 4 0 6
30H 34H 30H 36H 06H 04H
8 DEVICE ACCESS
112 8.4 Batch Read and Write Multiple Blocks
Subcommand
Type ASCII code Binary code
For MELSEC-Q/L series
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 0 2
30H 30H 30H 32H 02H 00H
Specify the block with the number of points equivalent to the specified "Number of word device blocks" and
"Number of bit device blocks", respectively. When '0' is specified, this specification is not required.
Device: Specify the head device of the consecutive devices. (Page 67 Devices)
Number of device points: Specify the number of device points to be read. (Page 72 Number of device points)
Specify the total number of device points for each block within the range of 1 to 960.
Word device is 1-word per one point, and bit device is 16-bit for one point.
Use a bit device block when the contact and coil for the following devices are specified.
Timer
Retentive timer
Counter
8 DEVICE ACCESS
8.4 Batch Read and Write Multiple Blocks 113
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)
Subcommand
0 4 0 6 0 0 0 0 0 2 0 3
30H 34H 30H 36H 30H 30H 30H 30H 30H 32H 30H 33H
D * 0 0 0 0 0 0 0 0 0 4 W * 0 0 0 1 0 0 0 0 0 8
44H 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 34H 57H 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 38H
M * 0 0 0 0 0 0 0 0 0 2 M * 0 0 0 1 2 8 0 0 0 2
4DH 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 32H 4DH 2AH 30H 30H 30H 31H 32H 38H 30H 30H 30H 32H
Device Number of
code Device number device points
B * 0 0 0 1 0 0 0 0 0 3
42H 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 33H
(Response data)
0 0 0 8 2 0 3 0 1 5 4 5 2 8 0 0 0 9 7 0 0 1 3 1
30H 30H 30H 38H 32H 30H 33H 30H 31H 35H 34H 35H 32H 38H 30H 30H 30H 39H 37H 30H 30H 31H 33H 31H
D0 D1 D2 D3 W100 to W107
M15 to M0 M31 to M16 M143 to M128 M159 to M144 B10F to B100 B11F to B110 B12F to B120
2 0 3 0 4 8 4 9 C 3 D E 2 8 0 0 0 9 7 0 B 9 A F B 9 A F
32H 30H 33H 30H 34H 38H 34H 39H 43H 33H 44H 45H 32H 38H 30H 30H 30H 39H 37H 30H 42H 39H 41H 46H 42H 39H 41H 46H
M15 to M0
8 DEVICE ACCESS
114 8.4 Batch Read and Write Multiple Blocks
Data communication in binary code
(Request data)
Subcommand
Device Number of Device Number of Device Number of Device Number of Device Number of
Device number code device points Device number code device points Device number code device points Device number code device points Device number code device points
00H 00H 00H A8H 04H 00H 00H 01H 00H B4H 08H 00H 00H 00H 00H 90H 02H 00H 80H 00H 00H 90H 02H 00H 00H 01H 00H A0H 03H 00H
(Response data)
08H 00H 30H 20H 45H 15H 00H 28H 70H 09H 31H 01H 30H 20H 49H 48H DEH C3H 00H 28H 70H 09H AFH B9H AFH B9H
8 DEVICE ACCESS
8.4 Batch Read and Write Multiple Blocks 115
Batch write multiple blocks (command: 1406)
Write 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.
When communicating with a Universal model QCPU or an LCPU, if other than "Specify service process
execution counts" is selected for "Service Processing Setting" of the CPU module, data separation may occur.
To avoid data separation, select "Specify service process execution counts".
When accessing any of the following devices, use the device extension specification (subcommand: 008).
Link direct device
Module access device
CPU buffer memory access device
For the message format for device extension specification, refer to the following section.
Page 438 Read/Write by Device Extension Specification
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of word Number of bit Block of word Block of word
Command Subcommand device blocks device blocks device device
(m points) (n points) (first point) (mth point)
Response data
There is no response data for this command.
1 4 0 6
31H 34H 30H 36H 06H 14H
Subcommand
Type ASCII code Binary code
For MELSEC-Q/L series
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 0 2
30H 30H 30H 32H 02H 00H
8 DEVICE ACCESS
116 8.4 Batch Read and Write Multiple Blocks
Specify the total number of each block within the following range.
Access target Range
MELSEC iQ-R series module (subcommand: 0000) 1Number of word device blocks + Number of bit device blocks120 points
MELSEC-Q/L series module (subcommand: 0000)
MELSEC-QnA series module
MELSEC iQ-R series module (subcommand: 0002, 008) 1Number of word device blocks + Number of bit device blocks60 points
MELSEC-Q/L series module (subcommand: 0080)
Specify the block with the number of points equivalent to the specified "Number of word device blocks" and
"Number of bit device blocks", respectively. When '0' is specified, this specification is not required.
Block (1 point)
Number of Write data
Head device device points
Device: Specify the head device of the consecutive devices. (Page 67 Devices)
Number of device points: Specify the number of device points to be written. (Page 72 Number of device points)
Write data: Specify the data to be written for the number of device points in hexadecimal. (Page 74 Read data, write
data)
Specify the number of device points within the following range.
Subcommand Range
When using MELSEC-Q/L series (0000, 0080) 1 (Total number of each block4) + (Total number of device)960 points
When using MELSEC iQ-R series (0002, 0082) 1(Total number of each block9) + (Total number of device)960 points 8
Word device is 1-word per one point, and bit device is 16-bit for one point.
Use a bit device block when the contact and coil for the following devices are specified.
Timer
Retentive timer
Counter
8 DEVICE ACCESS
8.4 Batch Read and Write Multiple Blocks 117
Communication example
Write values to devices as follows. (Subcommand: for MELSEC-Q/L series)
Subcommand
1 4 0 6 0 0 0 0 0 2 0 3
31H 34H 30H 36H 30H 30H 30H 30H 30H 32H 30H 33H
Device Number of
code Device number device points Write data
D * 0 0 0 0 0 0 0 0 0 4 0 0 0 8 2 8 0 0
44H 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 34H 30H 30H 30H 38H 32H 38H 30H 30H
D0 to D3
Device Number of
code Device number device points Write data
W * 0 0 0 1 0 0 0 0 0 8 0 9 7 0 0 1 3 1
57H 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 38H 30H 39H 37H 30H 30H 31H 33H 31H
W100 to W107
Device Number of
code Device number device points Write data
M * 0 0 0 0 0 0 0 0 0 2 2 0 3 0 4 8 4 9
4DH 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 32H 32H 30H 33H 30H 32H 38H 34H 39H
Device Number of
code Device number device points Write data
M * 0 0 0 1 2 8 0 0 0 2 C 3 D E 2 8 0 0
4DH 2AH 30H 30H 30H 31H 32H 38H 30H 30H 30H 32H 43H 33H 44H 45H 32H 38H 30H 30H
Device Number of
code Device number device points Write data
B * 0 0 0 1 0 0 0 0 0 3 0 9 7 0 B 9 A F
42H 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 33H 30H 39H 37H 30H 42H 39H 41H 46H
B 9 A F
1 0 1 1 1 0 0 1 1 0 1 0 1 1 1 1 0 = OFF
1 = ON
B12F to B120
8 DEVICE ACCESS
118 8.4 Batch Read and Write Multiple Blocks
Data communication in binary code
(Request data)
Subcommand
Number of Number of
Device Device device Device Device device
number code points Write data number code points Write data
00H 00H 00H A8H 04H 00H 08H 00H 00H 28H 00H 01H 00H B4H 08H 00H 70H 09H 31H 01H
D0 to D3 W100 to W107
Number of Number of
Device Device device Device Device device
number code points Write data number code points Write data
00H 00H 00H 90H 02H 00H 30H 20H 49H 48H 80H 00H 00H 90H 02H 00H DEH C3H 00H 28H
Number of
Device Device device
number code points Write data
8
00H 01H 00H A0H 03H 00H 70H 09H AFH B9H
B12F to B120
7 0 0 9
0 1 1 1 0 0 0 0 0 0 0 0 1 0 0 1 0 = OFF
1 = ON
B107 to B100 B10F to B108
8 DEVICE ACCESS
8.4 Batch Read and Write Multiple Blocks 119
8.5 Device Memory Monitor
Read the registered device data, and monitor it.
Monitoring procedure
The following shows the procedure to monitor devices.
2. Execution of monitor
Read values from a registered device. (Page 122 Monitor (command: 0802))
Monitoring with multiple conditions to the device memory of the same CPU module cannot be performed at
the same time. If monitor (command: 0802) is executed while monitor with other conditions is being
performed, the command is completed abnormally.
Register devices to be read with the 'register monitor data' (command: 0801) before executing the 'monitor'
(command: 0802). If the 'monitor' (command: 0802) is executed without the registration, the command is
completed abnormally.
When the access target module is restarted, the registered content is deleted. Register the devices to be
read again with the 'register monitor data' (command: 0801).
8 DEVICE ACCESS
120 8.5 Device Memory Monitor
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
Monitor condition Number of word
access points Number of double word
Command Subcommand specification
(m points) access points (n points)
designation
Response data
There is no response data for this command.
0
30H
8
38H
0
30H
1
31H 01H 08H
8
2C frame
8
38H
The data other than commands is the same as the data specified by 'random read in word units' (command: 0403).
Page 99 Random read in word units (command: 0403)
8 DEVICE ACCESS
8.5 Device Memory Monitor 121
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)
0 8 0 2
30H 38H 30H 32H 02H 08H
2C frame
9
39H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
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
122 8.5 Device Memory Monitor
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.
0 8 0 2 0 0 0 0
30H 38H 30H 32H 30H 30H 30H 30H
(Response data)
1 9 9 5 1 2 0 2 2 0 3 0 4 8 4 9
31H 39H 39H 35H 31H 32H 30H 32H 32H 30H 33H 30H 34H 38H 34H 39H
4 C 5 4 4 F 4 E C 3 D E B 9 A F B A D D B C B 7
34H 43H 35H 34H 34H 46H 34H 45H 43H 33H 44H 45H 42H 39H 41H 46H 42H 41H 44H 44H 42H 43H 42H 37H
8 DEVICE ACCESS
8.5 Device Memory Monitor 123
Data communication in binary code
(Request data)
(Response data)
95H 19H 02H 12H 30H 20H 49H 48H 4EH 4FH 54H 4CH AFH B9H DEH C3H B7H BCH DDH BAH
8 DEVICE ACCESS
124 8.5 Device Memory Monitor
9 LABEL ACCESS
9
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.
Labels
Specify the global label name to be accessed.
The "Label name" is specified by variable length. Specify the length of character string by "Label name length". (Null is
unnecessary at the end of a label name character string.)
ASCII code Binary code
Label name length Label name Label name length Label name
Ex.
When the number of characters is three.
ASCII code Binary code
0 0 0 3
30H 30H 30H 33H 03H 00H
9 LABEL ACCESS
9.1 Data to be Specified in Commands 125
Label name
Specify the character string of a label name.
Ex.
When 'A'
(UTF-16: 'A'= 0041)
ASCII code Binary code
0 0 4 1
30H 30H 34H 41H 41H 00H
Ex.
When the label name is 'Lbl'
Item Value of code corresponds to
character
File name L b l
UTF-16 004C 0062 006C
ASCII code 30303443 30303632 30303643
Binary code 4C00 6200 6C00
Ex.
When the element number of array name 'Lbl' is '20'
Label name length: 7H
Label name character string: Lbl[20]
Item Value of code corresponds to character
File name L b l [ 2 0 ]
UTF-16 004C 0062 006C 005B 0032 0030 005D
ASCII code 30303443 30303632 30303643 30303542 30303332 30303330 30303544
Binary code 4C00 6200 6C00 5B00 3200 3000 5D00
9 LABEL ACCESS
126 9.1 Data to be Specified in Commands
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. 9
(UTF-16: ','= 002C)
Ex.
When the element numbers are 2, 1, 3 of three-dimensional array of array name 'Lbl'
Label name length: AH
Label name character string: Lbl[2,1,3]
Item Value of code corresponds to character
File name L b l [ 2 , 1 , 3 ]
UTF-16 004C 0062 006C 005B 0032 002C 0031 002C 0033 005D
ASCII code 30303443 30303632 30303643 30303542 30303332 30303243 30303331 30303243 30303333 30303544
Binary code 4C00 6200 6C00 5B00 3200 2C00 3100 2C00 3300 5D00
Two-dimensional array and three-dimensional array bit type labels cannot be specified with the 'batch read/
write array type labels' (command: 041A, 141A).
Structure labels
Specify the structure labels by attaching period '.' as an element name. (UTF-16: '.' = 002E)
Specify the element name for the end member. Only specifying a structure name cannot set the whole structure as a target.
Ex.
For the element name 'Data' of the structure name 'Str1'
Label name length: 9H
Label name character string: Str1.Data
Item Value of code corresponds to character
File name S t r 1 . D a t a
UTF-16 0053 0074 0072 0031 002E 0044 0061 0074 0061
ASCII code 30303533 30303734 30303732 30303331 30303245 30303434 30303631 30303734 30303631
Binary code 5300 7400 7200 3100 2E00 4400 6100 7400 6100
Array member
When the structure member is an array type, specify the array element number with square bracket '[ ]' as is the case in array
type label.
Ex.
When the element name 'Data' of structure name 'Str1', and 'Data' is a two-dimensional array element.
Label name length: EH
Label name character string: Str1.Data[1,3]
Item Value of code corresponds to character
File name S t r 1 . D a t a [ 1 , 3 ]
UTF-16 0053 0074 0072 0031 002E 0044 0061 0074 0061 005B 0031 002C 0033 005D
ASCII code 3030 3030 3030 3030 3030 3030 3030 3030 3030 3030 3030 3030 3030 3030
3533 3734 3732 3331 3245 3434 3631 3734 3631 3542 3331 3243 3333 3544
Binary code 5300 7400 7200 3100 2E00 4400 6100 7400 6100 5B00 3100 2C00 3300 5D00
9 LABEL ACCESS
9.1 Data to be Specified in Commands 127
Structure member
When the structure member is a structure type, specify the element name by delimiting with period '.' up to the end member.
Ex.
When specifying the member, 'memberB1', of the structure member name 'memberA3' for the structure type label name
'LabelA'
Label name character string: LabelA.memberA3.memberB1
When arbitrary device is assigned, the structure type label with structure type members cannot be specified.
Ex.
For the contact of timer type label name 'Lbl1'
Label name length: 6H
Label name character string: Lbl1.S
Item Value of code corresponds to character
Label name L b l 1 . S
UTF-16 004C 0062 006C 0031 002E 0053
ASCII code 30303443 30303632 30303643 30303331 30303245 30303533
Binary code 4C00 6200 6C00 3100 2E00 5300
The labels of which data type is timer, counter, retentive timer, long timer, long counter, or long retentive timer
cannot be specified with the 'batch read/write array type labels' (command: 041A, 141A).
9 LABEL ACCESS
128 9.1 Data to be Specified in Commands
Abbreviation specification of label
Abbreviation specification can be used when specifying a structure type label as an access target. 9
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).
Ex.
When a structure type label name 'LabelA' and its structure member name 'memberA3' is specified as abbreviation
specification, they can be abbreviated as follows.
(LabelA= %1, memberA3= %2)
Actual label name Abbreviated label name
LabelA.memberA1 %1.memberA1
LabelA.memberA2 %1.memberA2
LabelA.memberA3.memberB1 %1.%2.memberB1
LabelA.memberA3.memberB2 %1.%2.memberB2
0 0 0 0
30H 30H 30H 30H 00H 00H
Ex.
The example that cannot be abbreviated is as follows:
Actual label name String that cannot be abbreviated String that can be abbreviated
LabelA.memberA3.memberB1 "LabelA.memberA3.memberB1", "LabelA.memberA3" 'LabelA', 'memberA3', 'memberB1'
LabelA.memberA4[1].memberB1 "memberA4", "memberA4[1]" "LabelA", "memberB1"
Label points
Specify the label points which abbreviate a label names by abbreviation specification. (Page 131 Points)
Label specification
Specify the following items for each label for the points specified by label points. (Page 125 Labels)
Label name length: Specify the number of characters of a label name or structure member name.
Label name: Specify a global label name or a structure member name.
Ex.
When a structure type label name 'LabelA' and its structure member name 'memberA3' is specified as abbreviation
specification
9 LABEL ACCESS
9.1 Data to be Specified in Commands 129
(1) LabelA
Item Value of code corresponds to character
Label name L a b e l A
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 m e m b e r A 3
UTF-16 006D 0065 006D 0062 0065 0072 0041 0033
ASCII code 30303644 30303635 30303644 30303632 30303635 30303732 30303431 30303333
Binary code 6D00 6500 6D00 6200 6500 7200 4100 3300
0 0 0 2 0 0 0 6 (1) 0 0 0 8 (2)
30H 30H 30H 32H 30H 30H 30H 36H 30H 30H 30H 38H
In the figure (1) and (2), set the value of "ASCII code" indicated in the table of "Value of code corresponds to character" of
each label name.
(1) (2)
02H 00H 06H 00H 08H 00H
In the figure (1) and (2), set the value of "Binary code" indicated in the table of "Value of code corresponds to character" of
each label name.
9 LABEL ACCESS
130 9.1 Data to be Specified in Commands
Points
Specify the number of the data to be read or written. 9
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.
Ex.
For 3 points
ASCII code Binary code
0 0 0 3
30H 30H 30H 33H 03H 00H
Array points
Specify the number of arrays.
Label points
Specify the number of labels.
9 LABEL ACCESS
9.1 Data to be Specified in Commands 131
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
(decimal) (hexadecimal)
Bit 1 01H
Word [Unsigned]/Bit String [16-bit] 2 02H
Double Word [Unsigned]/Bit String [32-bit] 3 03H
Word [Signed] 4 04H
Double Word [Signed] 5 05H
FLOAT [Single Precision] 6 06H
FLOAT [Double Precision] 7 07H
Time 8 08H
String 9 09H
String[Unicode] 10 0AH
Pointer Cannot be specified.
Timer Contact 1 01H
Counter Coil
Retentive timer
Current value 2 02H
Long timer Contact 1 01H
Long counter Coil
Long retentive timer
Current value 3 03H
For an array type label and a structure type label, the data type of the element from which value is read is stored.
Setting method
Data communication in ASCII code
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
Double Word [Signed]
ASCII code Binary code
0 5
30H 35H 05H
9 LABEL ACCESS
132 9.1 Data to be Specified in Commands
Data length, unit specification
Specify the length of data to be read/written. 9
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.
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Read data or write data are stored in 16 point unit of bit devices (2 bytes).
When data length is not a multiple of 16 at the time of bit specification, '0' is stored in an invalid area.
Byte specification
The value of data length is handled as a number of bytes of read data or write data.
Specify when the data type of a label is other than bit.
ASCII code Binary code
0 0 0 1
30H 30H 30H 31H 01H 00H
Data length
Specify the length of read data or write data.
Specify the following values according to the data type of a label.
Specifying and writing data length which is not suited for the data type of label results in abnormal completion.
Data type Batch read and write array type labels Random read and write
Unit Array data length Data length per 1 point label
specification
Bit Bit units 1 Number of array element 2
Word [Unsigned]/Bit String [16-bit] Byte units 2 Number of array element 2
Double Word [Unsigned]/Bit String [32-bit] 4 Number of array element 4
Word [Signed] 2 Number of array element 2
Double Word [Signed] 4 Number of array element 4
FLOAT [Single Precision] 4 Number of array element 4
FLOAT [Double Precision] 8 Number of array element 8
Time 4 Number of array element 4
String Depend on the number of character strings (1 per 1 character, including end NULL)*1
String [Unicode] Depend on the number of character strings (2 per 1 character, including end NULL)*2
Pointer Cannot be specified.
Timer Contact Cannot be specified. 2
Counter Coil
Retentive timer Current value
Long timer Contact 2
Long counter Coil
Long retentive timer
Current value 4
9 LABEL ACCESS
9.1 Data to be Specified in Commands 133
Data communication in ASCII code
Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
Setting example
Batch read and write of array
For the bit specification, specify the number of bits to be accessed.
Unit specification: Bit
Label: Bit type 3 points
Array data length: 1 bit Number of array element (3) = 3 bits
ASCII code Binary code
0 0 0 3
30H 30H 30H 33H 03H 00H
For byte specification, specify the data length of the label to be accessed in byte unit.
Unit specification: Byte
Label: Word type 5 points
Array data length: 2 bytes (5) = 10 bytes
ASCII code Binary code
0 0 0 A
30H 30H 30H 3AH 0AH 00H
0 0 0 2
30H 30H 30H 32H 02H 00H
The character string type [Unicode] will be 2 bytes per one character of UTF-16 code.
Label: Character string type [Unicode] one point
"Data Length of Character String Data Type" of an Engineering tool: 32
Data length: Number of characters (32 + 1) Data length per one character string (2) = 66 (42H)
ASCII code Binary code
0 0 4 2
30H 30H 34H 32H 42H 00H
9 LABEL ACCESS
134 9.1 Data to be Specified in Commands
Read data, write data
The read data is stored for reading, and the data to be written is stored for writing. 9
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 74
Read data, write data)
Ex.
For bit type label 6 points
b15 b0
0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1
Ex.
For read data of 1-point character string type (ASCII code) label
Label character string: 'ABCD' (4 characters)
"Data Length of Character String Data Type" of an Engineering tool: 32
Data length: Number of characters (32 + 1) Data length per one character string (1) = 34 (22H)
ASCII code Binary code
B A D C NULL NULL
A B C D NULL NULL
4 2 4 1 4 4 4 3 0 0 0 0
41H 42H 43H 44H 00H 00H
34H 32H 34H 32H 34H 34H 34H 33H 30H 30H 30H 30H
When communicating ASCII code character string data in ASCII code, data is rearranged every two
characters and stored.
9 LABEL ACCESS
9.1 Data to be Specified in Commands 135
9.2 Batch Read and Write
Read/write data by specifying the continuous element of array in batch.
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
The read array data is stored for the number of array points which are specified with request data.
0 4 1 A
30H 34H 31H 41H 1AH 04H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Array points
Specify the point of array to be read. (Page 131 Points)
Abbreviation specification
Specify the label name length and label name to be abbreviated. (Page 129 Abbreviation specification of label)
When do not abbreviate, specify '0'.
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
9 LABEL ACCESS
136 9.2 Batch Read and Write
Array specification
Specify the details of arrays for number of arrays specified to array points.
9
Unit Fixed Array data
Label name length Label name specification values length
0 0
30H 30H 00H
Array data
The read array data is stored for number of arrays which are specified with array point.
Unit
Data type ID Array data length Read data
specification
When unit specification is bit specification, read data are stored in 16-bit (2-byte) units.
9 LABEL ACCESS
9.2 Batch Read and Write 137
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:
b15 b0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
Subcommand Array points Abbreviation specification Label name length Label name Unit specification (Fixed value) Array data length
0 4 1 A 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 6 (1) 0 0 0 0 0 0 0 2
30H 34H 31H 41H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 30H 30H 30H 30H 36H 30H 30H 30H 30H 30H 30H 30H 32H
In the figure (1), set the value of "ASCII code" indicated in the following table.
(1) Lbl[2]
Item Value of code corresponds to character
Label name L b l [ 2 ]
UTF-16 004C 0062 006C 005B 0032 005D
ASCII code 30303443 30303632 30303643 30303542 30303332 30303544
(Response data)
0 0 0 1 0 1 0 0 0 0 0 2 0 2
30H 30H 30H 31H 30H 31H 30H 30H 30H 30H 30H 32H 30H 32H
(Fixed value)
Array Abbreviation Label name Unit Array data
Label name
Subcommand points specification length specification length
L b l [ 2 ]
1AH 04H 00H 00H 01H 00H 00H 00H 06H 00H 4CH 00H 62H 00H 6CH 00H 5BH 00H 32H 00H 5DH 00H 00H 00H 02H 00H
(Response data)
Data type ID
Array Unit Array data Read
points specification length data
9 LABEL ACCESS
138 9.2 Batch Read and Write
Communication example (Byte specification)
For one-dimensional array type label 'Lbl', read 5-word data from Lbl [2].
9
Data communication in ASCII code
(Request data)
Subcommand Array points Abbreviation specification Label name length Label name Unit specification (Fixed value) Array data length
0 4 1 A 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 6 (1) 0 1 0 0 0 0 0 A
30H 34H 31H 41H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 30H 30H 30H 30H 36H 30H 31H 30H 30H 30H 30H 30H 41H
In the figure (1), set the value of "ASCII code" indicated in the following table.
(1) Lbl[2]
Item Value of code corresponds to character
Label name L b l [ 2 ]
UTF-16 004C 0062 006C 005B 0032 005D
ASCII code 30303443 30303632 30303643 30303542 30303332 30303544
(Response data)
Data Unit
Array points Array data length Read data
type ID specification
0 0 0 1 0 2 0 1 0 0 0 A 0 0 4 4 0 0 6 1 0 0 7 4 0 0 6 1 0 0 3 1
30H 30H 30H 31H 30H 33H 30H 31H 30H 30H 30H 41H 30H 30H 34H 34H 30H 30H 36H 31H 30H 30H 37H 34H 30H 30H 36H 31H 30H 30H 33H 31H
(Fixed value)
Array Abbreviation Label name Unit Array data
Label name
Subcommand points specification length specification length
L b l [ 2 ]
1AH 04H 00H 00H 01H 00H 00H 00H 06H 00H 4CH 00H 62H 00H 6CH 00H 5BH 00H 32H 00H 5DH 00H 01H 00H 0AH 00H
(Response data)
Unit specification
Array Data Array data
points type ID length Read data
01H 00H 02H 01H 0AH 00H 44H 00H 61H 00H 74H 00H 61H 00H 31H 00H
9 LABEL ACCESS
9.2 Batch Read and Write 139
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
Label name T y p 1
UTF-16 0054 0079 0070 0031
ASCII code 30303534 30303739 30303730 30303331
Binary code 5400 7900 7000 3100
(2)Typ1.led[2]
Item Value of code corresponds to character
Abbreviated notation % 1 . l e d [ 2 ]
UTF-16 0025 0031 002E 006C 0065 0064 005B 0032 005D
ASCII code 30303235 30303331 30303245 30303643 30303635 30303634 30303542 30303332 30303544
Binary code 2500 3100 2E00 6C00 6500 6400 5B00 3200 5D00
(3)Typ1.No[1]
Item Value of code corresponds to character
Abbreviated notation % 1 . N o [ 1 ]
UTF-16 0025 0031 002E 004E 006F 005B 0031 005D
ASCII code 30303235 30303331 30303245 30303445 30303646 30303542 30303331 30303544
Binary code 2500 3100 2E00 4E00 6F00 5B00 3100 5D00
0 4 1 A 0 0 0 0 0 0 0 2 0 0 0 1 0 0 0 4 (1)
30H 34H 31H 41H 30H 30H 30H 30H 30H 30H 30H 32H 30H 30H 30H 31H 30H 30H 30H 34H
Abbreviation specification
Label name length Label name Unit specification (Fixed value) Array data length
0 0 0 9 (2) 0 1 0 0 0 0 0 8
30H 30H 30H 39H 30H 31H 30H 30H 30H 30H 30H 38H
Label name length Label name Unit specification (Fixed value) Array data length
0 0 0 8 (3) 0 1 0 0 0 0 0 4
30H 30H 30H 38H 30H 31H 30H 30H 30H 30H 30H 34H
In the figure (1) to (3), set the value of "ASCII code" indicated in the table of "Value of code corresponds to character" of each
label.
(Response data)
9 LABEL ACCESS
140 9.2 Batch Read and Write
Array points Data type ID Unit specification Array data length Read data
0 0 0 2 0 2 0 1 0 0 0 8 0 0 3 1 0 0 3 2 0
30H 30H 30H 32H 30H 32H 30H 31H 30H 30H 30H 38H 30H 30H 33H 31H 30H 30H 33H 32H 30H 30H 33H 33H 30H 30H 33H 34H
0 3 3 0 0 3 4
9
Read data of Typ1.led
0 3 0 1 0 0 0 4 0 0 3 0 0 0 3 1
30H 33H 30H 31H 30H 30H 30H 34H 30H 30H 33H 30H 30H 30H 33H 31H
9 LABEL ACCESS
9.2 Batch Read and Write 141
Data communication in binary code
(Request data)
(1)
1AH 04H 00H 00H 02H 00H 01H 00H 04H 00H
Abbreviation specification
(Fixed value) (Fixed value)
Label name Unit Array data Label name Unit Array data
length Label name specification length length Label name specification length
(2) (3)
09H 00H 01H 00H 08H 00H 0BH 00H 01H 00H 04H 00H
In the figure (1) to (3), set the value of "Binary code" indicated in the table of "Value of code corresponds to character" of each
label.
(Response data)
02H 00H 03H 01H 08H 00H 31H 00H 32H 00H 33H 00H 34H 00H 03H 01H 04H 00H 30H 00H 31H 00H
9 LABEL ACCESS
142 9.2 Batch Read and Write
Batch write array type labels (command: 141A)
Write the values in batch with specifying the consecutive array elements. 9
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.
Request data
Array Array
Array points Abbreviation
Command Subcommand specification specification
(n points) specification
(first point) (nth point)
Response data
There is no response data for this command.
1 4 1 A
31H 34H 31H 41H 1AH 14H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Array points
Specify the point of array to be written. (Page 131 Points)
Abbreviation specification
Specify the label name length and label name to be abbreviated. (Page 129 Abbreviation specification of label)
When do not abbreviate, specify '0'.
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Array specification
Specify the details of arrays for number of arrays specified to array points.
Unit Fixed
Label name length Label name Array data length Write data
specification values
9 LABEL ACCESS
9.2 Batch Read and Write 143
Fixed value: '0'.
ASCII code Binary code
0 0
30H 30H 00H
b15 b0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 4 1 A 0 0 0 0 0 0 0 1 0 0 0 0
31H 34H 31H 41H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 30H
Label name length Label name Unit specification (Fixed value) Array data length Write data
0 0 0 6 (1) 0 0 0 0 0 0 0 2 0 0 0 2
30H 30H 30H 36H 30H 30H 30H 30H 30H 30H 30H 32H 30H 30H 30H 32H
In the figure (1), set the value of "ASCII code" indicated in the following table.
(1) Lbl[2]
Item Value of code corresponds to character
Label name L b l [ 2 ]
UTF-16 004C 0062 006C 005B 0032 005D
ASCII code 30303443 30303632 30303643 30303542 30303332 30303544
(Fixed value)
Array Abbreviation Label name Unit Array data Write
Label name
Subcommand points specification length specification length data
L b l [ 2 ]
1AH 14H 00H 00H 01H 00H 00H 00H 06H 00H 4CH 00H 62H 00H 6CH 00H 5BH 00H 32H 00H 5DH 00H 00H 00H 02H 00H 02H 00H
9 LABEL ACCESS
144 9.2 Batch Read and Write
Communication example (Byte specification)
For one-dimensional array type label 'Lbl', write 5-word data from Lbl [2].
9
Data communication in ASCII code
(Request data)
Subcommand Array points Abbreviation specification Label name length Label name Unit specification (Fixed value)
1 4 1 A 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 6 (1) 0 1 0 0
31H 34H 31H 41H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 30H 30H 30H 30H 36H 30H 31H 30H 30H
0 0 0 A 0 0 4 4 0 0 6 1 0 0 7 4 0 0 6 1 0 0 3 1
30H 30H 30H 41H 30H 30H 34H 34H 30H 30H 36H 31H 30H 30H 37H 34H 30H 30H 36H 31H 30H 30H 33H 31H
In the figure (1), set the value of "ASCII code" indicated in the following table.
(1) Lbl[2]
Item Value of code corresponds to character
Label name L b l [ 2 ]
UTF-16 004C 0062 006C 005B 0032 005D
ASCII code 30303443 30303632 30303643 30303542 30303332 30303544
L b l [ 2 ]
1AH 14H 00H 00H 01H 00H 00H 00H 06H 00H 4CH 00H 62H 00H 6CH 00H 5BH 00H 32H 00H 5DH 00H
(Fixed value)
Unit Array data
Write data
specification length
01H 00H 0AH 00H 44H 00H 61H 00H 74H 00H 61H 00H 31H 00H
(2)Typ1.led[5]
Item Value of code corresponds to character
Abbreviated notation % 1 . l e d [ 5 ]
UTF-16 0025 0031 002E 006C 0065 0064 005B 0035 005D
ASCII code 30303235 30303331 30303245 30303643 30303635 30303634 30303542 30303335 30303544
Binary code 2500 3100 2E00 6C00 6500 6400 5B00 3500 5D00
9 LABEL ACCESS
9.2 Batch Read and Write 145
(3)Typ1.No[7]
Item Value of code corresponds to character
Abbreviated notation % 1 . N o [ 7 ]
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
Subcommand Array points Number of abbreviated points Label name length Label name
1 4 1 A 0 0 0 0 0 0 0 2 0 0 0 1 0 0 0 4 (1)
31H 34H 31H 41H 30H 30H 30H 30H 30H 30H 30H 32H 30H 30H 30H 31H 30H 30H 30H 34H
0 0 0 9 (2)
30H 30H 30H 39H
Unit specification (Fixed value) Array data length Write data of (2)
0 1 0 0 0 0 0 8 1 2 3 4 5 6 7 8 9 A B C D E F 0
30H 31H 30H 30H 30H 30H 30H 38H 31H 32H 33H 34H 35H 36H 37H 38H 39H 41H 42H 43H 44H 45H 46H 30H
0 0 0 8 (3)
30H 30H 30H 38H
Unit specification (Fixed value) Array data length Write data of (3)
0 1 0 0 0 0 0 4 1 2 3 4 5 6 7 8
30H 31H 30H 30H 30H 30H 30H 34H 31H 32H 33H 34H 35H 36H 37H 38H
In the figure (1) to (3), set the value of "ASCII code" indicated in the table of "Value of code corresponding to character" of
each label name.
(1)
1AH 14H 00H 00H 02H 00H 01H 00H 04H 00H
(Fixed value)
Unit Array data
Label name length Label name specification length Write data of (2)
(2)
09H 00H 01H 00H 08H 00H 34H 12H 78H 56H BCH 9AH F0H DEH
(Fixed value)
Unit Array data
Label name length Label name specification length Write data of (3)
(3)
08H 00H 01H 00H 04H 00H 34H 12H 78H 56H
In the figure (1) to (3), set the value of "Binary code" indicated in the table of "Value of code corresponding to character" of
each label name.
9 LABEL ACCESS
146 9.2 Batch Read and Write
9.3 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
9
elements of array, use batch read and write command. (Page 136 Batch Read and Write)
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
The data of read label is stored for the number of label points specified with request data.
0 4 1 C
30H 34H 31H 43H 1CH 04H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Label points
Specify the point of label to read. (Page 131 Points)
Abbreviation specification
Specify the label name length and label name to be abbreviated. (Page 129 Abbreviation specification of label)
When do not abbreviate, specify '0'.
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Label specification
Specify the label name and label length of global label for the specified number of label points. (Page 125 Labels)
For a structure type label or array type label, specify the data of each element.
9 LABEL ACCESS
9.3 Random Read and Write 147
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
Data type ID Read data length Read data
data
Communication example
Read data from 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
Label name L b l 2
UTF-16 004C 0062 006C 0032
ASCII code 30303443 30303632 30303643 30303332
Binary code 4C00 6200 6C00 3200
(2) Lbl1
Item Value of code corresponds to character
Label name L b l 1
UTF-16 004C 0062 006C 0031
ASCII code 30303443 30303632 30303643 30303331
Binary code 4C00 6200 6C00 3100
(3) Lbl2.Lbl[2]
Item Value of code corresponds to character
Abbreviated notation % 1 . L b l [ 2 ]
UTF-16 0025 0031 002E 004C 0062 006C 005B 0032 005D
ASCII code 30303235 30303331 30303245 30303443 30303632 30303643 30303542 30303332 30303544
Binary code 2500 3100 2E00 4C00 6200 6C00 5B00 3200 5D00
(4) Lbl3
Item Value of code corresponds to character
Label name L b l 3
UTF-16 004C 0062 006C 0033
ASCII code 30303443 30303632 30303643 30303333
Binary code 4C00 6200 6C00 3300
9 LABEL ACCESS
148 9.3 Random Read and Write
Data communication in ASCII code
(Request data)
Subcommand Label points Number of abbreviated points Label name length Label name
9
0 4 1 C 0 0 0 0 0 0 0 3 0 0 0 1 0 0 0 4 (1)
30H 34H 31H 43H 30H 30H 30H 30H 30H 30H 30H 33H 30H 30H 30H 31H 30H 30H 30H 34H
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.
(Response data)
Data Spare
Label points Read data length Read data
type ID data
0 0 0 3 0 1 0 0 0 0 0 2 0 0 0 1
30H 30H 30H 33H 30H 31H 30H 30H 30H 30H 30H 32H 30H 30H 30H 31H
0 2 0 0 0 0 0 2 0 0 3 1 0 2 0 0 0 0 0 2 0 0 0 1
30H 32H 30H 30H 30H 30H 30H 32H 30H 30H 33H 31H 30H 32H 30H 30H 30H 30H 30H 32H 30H 30H 30H 31H
(1)
1CH 04H 00H 00H 03H 00H 01H 00H 04H 00H
In the figure (1) to (4), set the value of "Binary code" indicated in the table of "Value of code corresponding to character" of
each label name.
(Response data)
03H 00H 01H 00H 02H 00H 01H 00H 02H 00H 02H 00H 31H 00H 02H 00H 02H 00H 01H 00H
Label data (1st point) Label data (2nd point) Label data (3rd point)
9 LABEL ACCESS
9.3 Random Read and Write 149
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
Response data
There is no response data for this command.
1 4 1 B
31H 34H 31H 42H 1BH 14H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Label points
Specify the number of label points to be written. (Page 131 Points)
Abbreviation specification
Specify the label name length and label name to be abbreviated. (Page 125 Labels)
When do not abbreviate, specify '0'.
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Label specification
Specify the label name and write data for the specified number of label points.
Label name length Label name Write data length Write data
9 LABEL ACCESS
150 9.3 Random Read and Write
Communication example
Write data to three labels.
9
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
Label name L b l 2
UTF-16 004C 0062 006C 0032
ASCII code 30303443 30303632 30303643 30303332
Binary code 4C00 6200 6C00 3200
(2) Lbl1
Item Value of code corresponds to character
Label name L b l 1
UTF-16 004C 0062 006C 0031
ASCII code 30303443 30303632 30303643 30303331
Binary code 4C00 6200 6C00 3100
(3) Lbl2.Lbl[2]
Item Value of code corresponds to character
Abbreviated notation % 1 . L b l [ 2 ]
UTF-16 0025 0031 002E 004C 0062 006C 005B 0032 005D
ASCII code 30303235 30303331 30303245 30303443 30303632 30303643 30303542 30303332 30303544
Binary code 2500 3100 2E00 4C00 6200 6C00 5B00 3200 5D00
(4) Lbl3
Item Value of code corresponds to character
Label name L b l 3
UTF-16 004C 0062 006C 0033
ASCII code 30303443 30303632 30303643 30303333
Binary code 4C00 6200 6C00 3300
9 LABEL ACCESS
9.3 Random Read and Write 151
Data communication in ASCII code
(Request data)
Subcommand Label points Number of abbreviated points Label name length Label name
1 4 1 B 0 0 0 0 0 0 0 3 0 0 0 1 0 0 0 4 (1)
31H 34H 31H 42H 30H 30H 30H 30H 30H 30H 30H 33H 30H 30H 30H 31H 30H 30H 30H 34H
Label name length Label name Write data length Write data
0 0 0 4 (2) 0 0 0 2 0 0 0 1
30H 30H 30H 34H 30H 30H 30H 32H 30H 30H 30H 31H
Label name length Label name Write data length Write data
0 0 0 9 (3) 0 0 0 2 0 0 3 1
30H 30H 30H 39H 30H 30H 30H 32H 30H 30H 33H 31H
Label name length Label name Write data length Write data
0 0 0 4 (4) 0 0 0 2 0 0 0 1
30H 30H 30H 34H 30H 30H 30H 32H 30H 30H 30H 31H
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.
(1)
1BH 14H 00H 00H 03H 00H 01H 00H 04H 00H
(2)
04H 00H 02H 00H 01H 00H
(3)
09H 00H 02H 00H 31H 00H
(4)
04H 00H 02H 00H 01H 00H
In the figure (1) to (4), set the value of "Binary code" indicated in the table of "Value of code corresponding to character" of
each label name.
9 LABEL ACCESS
152 9.3 Random Read and Write
10 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).
10
Page 442 Accessing module access devices
Page 67 DEVICE ACCESS
The command can only be used for C24 (including multidrop connection station) and E71 connected to an
external device. It cannot be used via network.
This command is processed by C24/E71 connected to the CPU module without waiting for the END process.
Start address
Specify the start address of the buffer memory to be read/written.
Ex.
When the head area address is 1E1H
ASCII code Binary code
0 0 0 0 0 1 E 1
30H 30H 30H 30H 30H 31H 45H 31H E1H 01H 00H 00H
Ex.
For 5 words and 20 words
Number of device points ASCII code Binary code
5 words
0 0 0 5
30H 30H 30H 35H 05H 00H
20 words
0 0 1 4
30H 30H 31H 34H 14H 00H
Ex.
When the data for one buffer memory address is 09C1H
ASCII code Binary code
0 9 C 1
30H 39H 43H 31H C1H 09H
Message format
The following shows the message format of the request data and response data of the command. 10
Request data
Response data
The value read from the buffer memory is stored. The data order differs depending on the type of code, ASCII code or binary
code.
Page 154 Read data, write data
0 6 1 3
30H 36H 31H 33H 13H 06H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Start address
Specify the buffer memory start address to be read. (Page 153 Start address)
Word length
Specify the word length of the buffer memory to be read. (Page 154 Word length)
Specification range: 1H to 1E0H (480)
0 6 1 3 0 0 0 0 0 0 0 0 0 0 7 8 0 0 0 A
30H 36H 31H 33H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 37H 38H 30H 30H 30H 41H
(Response data)
Read data 1 Read data 2 Read data 10
0 5 0 0 0 9 C 1 0 0 C 8
30H 35H 30H 30H 30H 39H 43H 31H 30H 30H 43H 38H
13H 06H 00H 00H 78H 00H 00H 00H 0AH 00H
(Response data)
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 10
controller system.
Message format
The following shows the message format of the request data and response data of the command.
Request data
Word
Command Subcommand Start address Write data 1 Write data n
length
Response data
There is no response data for this command.
1 6 1 3
31H 36H 31H 33H 13H 16H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Start address
Specify the buffer memory start address to be written. (Page 153 Start address)
Word length
Specify the word length of the buffer memory to be written. (Page 154 Word length)
Specification range: 1H to 1E0H(480)
Write data
Specify the data to be written in the buffer memory. (Page 154 Read data, write data)
1 6 1 3 0 0 0 0 0 0 0 0 2 6 8 0 0 0 0 4 2 0 0 0 0 0 0 0
31H 36H 31H 33H 30H 30H 30H 30H 30H 30H 30H 30H 32H 36H 38H 30H 30H 30H 30H 34H 32H 30H 30H 30H 30H 30H 30H 30H
Write Write
Start address Word length data 1 data 4
13H 16H 00H 00H 80H 26H 00H 00H 04H 00H 00H 20H 00H 00H
Accessible modules
10
The following shows the accessible intelligent functional modules to buffer memory.
When accessing buffer memory of MELSEC-A series special function modules, use the command of 1C/1E frame.
1C frame: Page 383 Read and write Buffer Memory of Special Function Module
1E frame: Page 432 Read and Write Buffer Memory of Special Function Module
Start address
Specify the start address of the buffer memory to be read/written.
Calculation method
To access the buffer memory of the intelligent function module which consisted of word units by byte unit, specify a start
address calculated by byte unit.
Calculate the start address as follows:
Start address = (Buffer memory address 2) + Additional value of a module
For the arbitrary additional value of the module, refer to the following section.
Page 159 Accessing buffer memory with calculating a start address
Ex.
When specifying Q62DA buffer memory address 18H
(18H2) + 1008H = 30H + 1008H = 1038H
Ex.
When the start address is 1038H
ASCII code Binary code
0 0 0 0 1 0 3 8
30H 30H 30H 30H 31H 30H 33H 38H 38H 10H 00H 00H
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. 10
Number of bytes = (Number of buffer memory address 2)
Ex.
When accessing the buffer memory address 160 to 161 (A0H to A1H)
(161- 160 + 1) 2 = 2 2 = 4 bytes
Ex.
For 20 bytes
Number of device points ASCII code Binary code
20 words
0 0 1 4
30H 30H 31H 34H 14H 00H
Module number
Specify the start input/output number of an intelligent function module to be accessed.
For the module number, specify the value obtained by dividing the start input/output number by 16 in 4 digits (hexadecimal).
Ex.
When accessing the positioning module whose start input/output number is 0080H
Module number ASCII code Binary code
For QD70P4:
0008H
0 0 0 8
30H 30H 30H 38H 08H 00H
Y Y X/Y Y Y
Input/output signal 00 to 20 to 30 to 50 to 70 to
based on the remote I/O station 1F 2F 4F 6F 8F
Ex.
When the data for one buffer memory address is 09C1H
ASCII code Binary code
C 1 0 9
43H 31H 30H 39H C1H 09H
When reading data from the following buffer memory addresses, 0H to 2H (additional value of the start address: 10000H)
Buffer memory Read 6 bytes from address 0H Read 4 bytes from address 1H
Address Stored data Start Read data (byte unit) Start Read data (byte unit)
Word unit Byte unit address ASCII code Binary code address ASCII code Binary code
0H 0003H 03H 10000H 30H, 33H 03H
00H 30H, 30H 00H
1H 0001H 01H 30H, 31H 01H 10002H 30H, 31H 01H
00H 30H, 30H 00H 30H, 30H 00H
2H 0012H 12H 31H, 32H 12H 31H, 32H 12H
00H 30H, 30H 00H 30H, 30H 00H
Message format
The following shows the message format of the request data and response data of the command. 10
Request data
Response data
The value read from the buffer memory is stored.
Page 162 Read data, write data
0 6 0 1
30H 36H 30H 31H 01H 06H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Start address
Specify the buffer memory start address to be read. (Page 160 Start address)
Number of bytes
Specify the number of bytes of the buffer memory to be read. (Page 161 Number of bytes)
Specification range: 2H to 780H (1920)
Module number
Specify the intelligent function module to be read. (Page 161 Module number)
0 6 0 1 0 0 0 0 0 0 0 0 1 0 0 A 0 0 0 4 0 0 0 3
30H 36H 30H 31H 30H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 41H 30H 30H 30H 34H 30H 30H 30H 33H
(Response data)
Read data
0 1 0 0 1 2 0 0
30H 31H 30H 30H 31H 32H 30H 30H
Number of Module
Start address bytes No.
01H 06H 00H 00H 0AH 10H 00H 00H 04H 00H 03H 00H
(Response data)
Read data
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 10
controller system.
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
There is no response data for this command.
1 6 0 1
31H 36H 30H 31H 01H 16H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Start address
Specify the buffer memory start address to be written. (Page 160 Start address)
Number of bytes
Specify the number of bytes of the buffer memory to be written. (Page 161 Number of bytes)
Specification range: 2H to 780H (1920)
Module number
Specify the intelligent function module to be written. (Page 161 Module number)
Write data
Specify the data to be written in the buffer memory. (Page 162 Read data, write data)
1 6 0 1 0 0 0 0 0 0 0 0 1 0 0 A 0 0 0 4 0 0 0 3
31H 36H 30H 31H 30H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 41H 30H 30H 30H 34H 30H 30H 30H 33H
Write data
F 4 0 1 E 8 0 3
46H 34H 30H 31H 45H 38H 30H 33H
Number of Module
Start address bytes No. Write data
01H 16H 00H 00H 0AH 10H 00H 00H 04H 00H 03H 00H F4H 01H E8H 03H
Setting method
Data communication in ASCII code
Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
Clear mode
Select the range of the device memory to be cleared by the initialization processing at remote RUN.
When the device initial values are set, they will be reflected after the process with the selected clear mode.
Setting method
Data communication in ASCII code
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
0 0
30H 30H 00H
Clear outside the Clear the device memory outside the range of latch.
range of latch
0 1
30H 31H 01H
All clear Clear all device memory including the range of latch.
0 2
30H 32H 02H
Model name
The character string of a model name is stored in 16-digit ASCII code.
If the read model name is less than 16 characters, a space (20H) is stored for the shortage of the characters.
The model name is stored in ASCII code while communicating in binary code.
Ex.
For Q02HCPU
ASCII code, binary code
Q 0 2 H C P U
51H 30H 32H 48H 43H 50H 55H 20H 20H 20H 20H 20H 20H 20H 20H 20H
Model code
The model code of the module is stored.
Ex.
For Q02HCPU (41H)
ASCII code Binary code
0 0 4 1
30H 30H 34H 31H 41H 00H
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 11
code '0360H' are stored.
MELSEC-L series
Model name Model code
L02SCPU, L02SCPU-P 0543H
L02CPU, L02CPU-P 0541H
L06CPU, L06CPU-P 0544H
L26CPU, L26CPU-P 0545H
L26CPU-BT, L26CPU-PBT 0542H
LJ72GF15-T2 0641H
MELSEC-Q series
Model name Model code
Q00JCPU 0250H
Q00CPU 0251H
Q01CPU 0252H
Q02CPU, Q02HCPU, Q02PHCPU 0041H
Q06HCPU, Q06PHCPU 0042H
Q12HCPU, Q12PHCPU 0043H
Q25HCPU, Q25PHCPU 0044H
Q12PRHCPU 004BH
Q25PRHCPU 004CH
Q00UJCPU 0260H
Q00UCPU 0261H
Q01UCPU 0262H
Q02UCPU 0263H
Q03UDCPU, Q03UDECPU 0268H
Q03UDVCPU 0366H
Q04UDHCPU, Q04UDEHCPU 0269H
Q04UDVCPU 0367H
Q06UDHCPU, Q06UDEHCPU 026AH
Q06UDVCPU 0368H
Q10UDHCPU, Q10UDEHCPU 0266H
Q13UDHCPU, Q13UDEHCPU 026BH
Q13UDVCPU 036AH
Q20UDHCPU, Q20UDEHCPU 0267H
Q26UDHCPU, Q26UDEHCPU 026CH
Q26UDVCPU 036CH
Q50UDEHCPU 026DH
Q100UDEHCPU 026EH
QS001CPU 0230H
Ex.
For 4 characters, 32 characters
Access target ASCII code Binary code
MELSEC-Q/L series module
(4 characters fixed)
0 0 0 4
30H 30H 30H 34H 04H 00H
Remote password
The remote password is set by Engineering tool.
Specify the remote password in ASCII code while communicating in binary code.
Ex.
When password is 'ABCDEF'
ASCII code, binary code
A B C D E F
41H 42H 43H 44H 45H 46H
Ex.
For 5 bytes
ASCII code Binary code
0 0 0 5
30H 30H 30H 35H 05H 00H
Loopback data
The following characters can be used.
0 to 9 (30H to 39H)
A to F (41H to 46H)
Specify the loopback data in ASCII code while communicating in binary code.
Ex.
For 'ABCDEF'
ASCII code, binary code
A B C D E F
41H 42H 43H 44H 45H 46H
The communication error information to be initialized can be specified by turning the corresponding bit ON (1).
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.
Ex.
When initializing C/N, P/S, PRO, and SIO (bit 1 to 4) with MELSEC-Q/L series C24.
Item ASCII code Binary code
Communication error information (CH1)
0 0 1 E
30H 30H 31H 45H 1EH 00H
0 0 0 0
30H 30H 30H 30H 00H 00H
Ex.
For MELSEC iQ-R series
Item ASCII code Binary code
Communication error information (CH1)
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 0 0
30H 30H 30H 30H 00H 00H
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. 11
When the system protection of the access target module is enabled, the remote operation cannot be
performed and an error response will be returned. Disable the system protection of the CPU module.
For E71, the communication using UDP/IP is recommended. For the communication using TCP/IP, re-
establishment of the connection is required because the connection is disconnected at resetting CPU
module.
One communication of command provides remote operation for 1 station.
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 RUN status.
Message format
The following shows the message format of the request data and response data of the command.
Request data
Fixed
Command Subcommand Mode Clear mode values
Response data
There is no response data for this command.
1 0 0 1 DLE
31H 30H 30H 31H 01H 10H 10H 01H 10H
*1 For C24, the additional code is added. (Page 35 Additional code (10H))
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Mode
Select the operation when the request target module is already in remote operation by other device. (Page 167 Mode)
0001H: Do not execute forcibly
0003H: Execute forcibly
Clear mode
Select the range of the device memory to be cleared by the initialization processing at remote RUN. (Page 167 Clear
mode)
00H: Do not clear
01H: Clear only outside the latch range
02H: All clear
Fixed value
Fixed to '0'.
ASCII code Binary code
0 0
30H 30H 00H
Communication example
Remote RUN is performed when the mode is set to "Do not execute forcibly", and the clear mode is set to "All clear".
Clear
Mode
mode
1 0 0 1 0 0 0 0 0 0 0 1 0 2 0 0
31H 30H 30H 31H 30H 30H 30H 30H 30H 30H 30H 31H 30H 32H 30H 30H
Clear
Mode mode
Message format
The following shows the message format of the request data and response data of the command.
Request data
Command Subcommand
Fixed 11
values
Response data
There is no response data for this command.
1 0 0 2 DLE
31H 30H 30H 32H 02H 10H 10H 02H 10H
*1 For C24, the additional code is added. (Page 35 Additional code (10H))
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Fixed value
The value is '0001H'.
Communication example
Perform remote STOP.
1 0 0 2 0 0 0 0 0 0 0 1
31H 30H 30H 32H 30H 30H 30H 30H 30H 30H 30H 31H
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.
Request data
Response data
There is no response data for this command.
1 0 0 3 DLE
31H 30H 30H 33H 03H 10H 10H 03H 10H
*1 For C24, the additional code is added. (Page 35 Additional code (10H))
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Mode
Select the operation when the request target module is already in remote operation by other device. (Page 167 Mode)
0001H: Do not execute forcibly
0003H: Execute forcibly
Communication example
Remote PAUSE is performed when the mode is set to "Do not execute forcibly".
1 0 0 3 0 0 0 0 0 0 0 1
31H 30H 30H 33H 30H 30H 30H 30H 30H 30H 30H 31H
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. The command will be terminated abnormally. Clear the remote STOP or remote
PAUSE before executing the command.
11
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.
1 0 0 5 DLE
31H 30H 30H 35H 05H 10H 10H 05H 10H
*1 For C24, the additional code is added. (Page 35 Additional code (10H))
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Fixed value
The value is '0001H'.
Communication example
Perform remote latch clear.
1 0 0 5 0 0 0 0 0 0 0 1
31H 30H 30H 35H 30H 30H 30H 30H 30H 30H 30H 31H
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,
If a remote RESET operation enable/disable setting exists in the access target parameter, set it to enable.
Remote RESET may not be performed due to the hardware error of the access target device.
When performing remote RESET, the response message may not be returned because the access target
CPU is reset.
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.
1 0 0 6 DLE
31H 30H 30H 36H 06H 10H 10H 06H 10H
*1 For C24, the additional code is added. (Page 35 Additional code (10H))
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Fixed value
The value is '0001H'.
Communication example
Perform remote RESET.
1 0 0 6 0 0 0 0 0 0 0 1
31H 30H 30H 36H 30H 30H 30H 30H 30H 30H 30H 31H
Message format
The following shows the message format of the request data and response data of the command.
Request data
Command Subcommand
11
Response data
Model name and model code are stored. (Page 168 Model name and model code)
Discriminate the model name of the CPU with the model code.
0 1 0 1
30H 31H 30H 31H 01H 01H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Communication example
Execute the command for Q02UCPU to read the model name and model code.
0 1 0 1 0 0 0 0
30H 31H 30H 31H 30H 30H 30H 30H
(Response data)
Q 0 2 U C P U 0 2 6 3
51H 30H 32H 55H 43H 50H 55H 20H 20H 20H 20H 20H 20H 20H 20H 20H 30H 32H 36H 33H
(Response data)
Q 0 2 U C P U
51H 30H 32H 55H 43H 50H 55H 20H 20H 20H 20H 20H 20H 20H 20H 20H 63H 02H
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.
For the modem connection, access route must be set as the same route as that of the connected station (host
station).
(Page 45 ACCESS ROUTE SETTINGS)
Execution procedure
The communication with the module in which the remote password is set, follow the procedure shown below.
3. Access processing
Perform data communication by various commands of MC protocol.
All the commands received when the remote password is locked will be an error response. Perform data
communication after the unlock processing.
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 11
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 Subcommand Remote password
length
Response data
There is no response data for this command.
1 6 3 0
31H 36H 33H 30H 30H 16H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Remote password
Specify the set remote password. (Page 170 Remote password)
Remote password
Subcommand Remote password
length
1 6 3 0 0 0 0 0 0 0 0 4 1 2 3 4
31H 36H 33H 30H 30H 30H 30H 30H 30H 30H 30H 34H 31H 32H 33H 34H
1 2 3 4
30H 16H 00H 00H 04H 00H 31H 32H 33H 34H
Remote password
Subcommand
length
1 6 3 0 0 0 0 0 0 0 1 A
31H 36H 33H 30H 30H 30H 30H 30H 30H 30H 31H 41H
Remote password
a b c d e f g h i j k l m n o p q r s t u v w x y z
61H 62H 63H 64H 65H 66H 67H 68H 69H 6AH 6BH 6CH 6DH 6EH 6FH 70H 71H 72H 73H 74H 75H 76H 77H 78H 79H 7AH
Remote password
a b c d e f g h i j k l m n o p q r s t u v w x y z
61H 62H 63H 64H 65H 66H 67H 68H 69H 6AH 6BH 6CH 6DH 6EH 6FH 70H 71H 72H 73H 74H 75H 76H 77H 78H 79H 7AH
When the command is sent to the locked module, the lock status is not changed. (The password verification is
not performed.)
Message format 11
The following shows the message format of the request data and response data of the command.
Request data
Remote password
Command Subcommand Remote password
length
Response data
There is no response data for this command.
1 6 3 1
31H 36H 33H 31H 31H 16H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Remote password
Specify the set remote password. (Page 170 Remote password)
1 6 3 1 0 0 0 0 0 0 0 4 1 2 3 4
31H 36H 33H 31H 30H 30H 30H 30H 30H 30H 30H 34H 31H 32H 33H 34H
1 2 3 4
31H 16H 00H 00H 04H 00H 31H 32H 33H 34H
Remote password
Subcommand
length
1 6 3 1 0 0 0 0 0 0 1 A
31H 36H 33H 31H 30H 30H 30H 30H 30H 30H 31H 41H
Remote password
a b c d e f g h i j k l m n o p q r s t u v w x y z
61H 62H 63H 64H 65H 66H 67H 68H 69H 6AH 6BH 6CH 6DH 6EH 6FH 70H 71H 72H 73H 74H 75H 76H 77H 78H 79H 7AH
Remote password
a b c d e f g h i j k l m n o p q r s t u v w x y z
61H 62H 63H 64H 65H 66H 67H 68H 69H 6AH 6BH 6CH 6DH 6EH 6FH 70H 71H 72H 73H 74H 75H 76H 77H 78H 79H 7AH
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.
11
Loopback test (command: 0619)
Perform the test to check whether the communication between the external device and connected station is normal. By
performing the loopback test, the connection with external devices and operation of data communication can be checked.
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of
Command Subcommand Loopback data
loopback data
Response data
The same data as "Number of loopback data" and "Loopback data" specified for request message is stored. (Page 171
Loopback data)
Number of Loopback
loopback data data
0 6 1 9
30H 36H 31H 39H 19H 06H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
0 6 1 9 0 0 0 0 0 0 0 5 A B C D E
30H 36H 31H 39H 30H 30H 30H 30H 30H 30H 30H 35H 41H 42H 43H 44H 45H
(Response data)
0 0 0 5 A B C D E
30H 30H 30H 35H 41H 42H 43H 44H 45H
Number of
Loopback data
Subcommand loopback data
A B C D E
19H 06H 00H 00H 05H 00H 41H 42H 43H 44H 45H
(Response data)
Number of
Loopback data
loopback data
A B C D E
05H 00H 41H 42H 43H 44H 45H
The command can only be used for C24 (including multidrop connection station) connected to the external
device. It 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
Response data
There is no response data for this command.
1 6 1 7
31H 36H 31H 37H 17H 16H
0 0 0 5
30H 30H 30H 35H 05H 00H
CH2 side
0 0 0 A
30H 30H 30H 41H 0AH 00H
For C24 of MELSEC-Q/L series, 0 to 3 bits of subcommands are equivalent to the following functions of C24.
The settings in the table above is recommended, even though the initialization can be performed with the
values (0001H to 000FH) which combined ON/OFF arbitrarily.
Bit 0: CH1 Error initialization request (YE) ON
Bit 1: CH2 Error initialization request (YF) ON
Bit 2: LED for CH1 OFF, communication error information initialization request (buffer memory address: 0H)
ON
Bit 3: LED for CH2 OFF, communication error information initialization request (buffer memory address: 1H)
ON
Communication example
Perform the following operations for CH1 interface of QJ71C24N-R2.
ERR LED: OFF
Input signal XE "Error occurrence": OFF
Buffer memory 513 (201H) "LED lighting status, communication error status": Initialized (all items are OFF)
Error code of buffer memory: Initialized (clear)
1 6 1 7 0 0 0 5 0 0 F F 0 0 0 0
31H 36H 33H 31H 30H 30H 30H 35H 30H 30H 46H 46H 30H 30H 30H 30H
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. 11
Request data
Command Subcommand
Response data
There is no response data for this command.
1 6 1 7
31H 36H 31H 37H 17H 16H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Communication example
Turn COM.ERR.LED OFF.
1 6 1 7 0 0 0 0
31H 36H 33H 31H 30H 30H 30H 30H
Subcommand
2. Check if there is a file from which the file information is not read.
When "Number of file information" of the response data is in the status as shown below, it indicates that file information of all
the files have been read. Complete the processing.
MELSEC-Q/L series (when using subcommand '0000'): "Number of file information" < "Number of requested file"
MELSEC iQ-R series (when using subcommand '0040'): "Number of file information" = -1 (FFFFH)
3. Read the file information from a file from which the file information is not read.
Specify "Number of requested file" = 36 (upper limit) to the request data, and execute the command.
For "Head file No.", specify one of the following value.
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)
The correct information cannot be obtained if the file operation is performed from other devices while reading
information of all the files in the directory. Do not perform file operation from other devices while reading file
information.
12 FILE CONTROL
190 12.1 Execution Procedure
Procedure to read files
1. 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)
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 193 Procedure to delete files
Page 192 Procedure to create new file and write data
12 FILE CONTROL
12.1 Execution Procedure 191
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 DAT Page 192 When creation of temporary file is
required
Sequence program file QPG PRG
Device comment file QCD DCM
Device initial value file QDI DID
FB file PFB
File other than above Page 192 When creation of temporary file is
not required
Before creating a file, secure the free space of the target memory. It can be checked and secured by an
Engineering tool.
3. Create a file with the target file extension using the copy function.
After copying a file, delete the temporary file of the copy source as necessary.
Page 226 Copy file (command: 1824)
Page 223 Delete file (command: 1822)
12 FILE CONTROL
192 12.1 Execution Procedure
Procedure to delete files
1. 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)
12 FILE CONTROL
12.1 Execution Procedure 193
12.2 Considerations
The following shows the considerations for file control.
12 FILE CONTROL
194 12.2 Considerations
12.3 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 file
control.
Password
Specify the password of the file to be accessed.
The specification of a password differs depending on the module. Specify a password which corresponds to the module of
access target.
For details on the password, refer to the manual of access target module.
Access target Password to be set Sub command Data specified by Message 12
MELSEC-Q series module Password (4 characters) 0000 Password character string (fixed to 4 characters)
File password 32 (4 characters)
MELSEC-L series module File password 32 (4 to 32 characters) 0004 Password character string (fixed to 32 characters)*1
MELSEC iQ-R series module File password (6 to 32 characters) 0040 Number of password characters, password character string
(variable length)
Ex.
When the password is 'ABCD'
ASCII code, binary code
A B C D
41H 42H 43H 44H
When setting the password with the file password 32 function of High-speed universal model QCPU, set it with
four characters.
12 FILE CONTROL
12.3 Data to be specified in commands 195
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.
Ex.
When the password is 'ABCDEF'
ASCII code, binary code
A B C D E F
41H 42H 43H 44H 45H 46H 20H 20H 20H
(32 digits)
12 FILE CONTROL
196 12.3 Data to be specified in commands
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.
Specify the password character string in ASCII code during data communication in binary code as well.
Ex.
Password is "ABCDEFGHIJKLMNOPQRSTUVWXYZ" (26 characters)
ASCII code Binary code
Number of characters Password character string Number of characters Password character string
0 0 1 A A B C D Z A B C D Z
30H 30H 31H 41H 41H 42H 43H 44H 5AH 1AH 00H 41H 42H 43H 44H 5AH
0 0 0 0
30H 30H 30H 30H 00H 00H
12 FILE CONTROL
12.3 Data to be specified in commands 197
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
0003H Device/label memory (file storage area) Standard RAM
0004H Data memory Standard ROM
The program memory of RCPU cannot be accessed. When reading/writing program files, use the data
memory. (Page 194 Access for '$MELPRJ$' folder of RCPU)
Setting method
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.
Ex.
Drive No. is '0003H'
ASCII code Binary code
0 0 0 3
30H 30H 30H 33H 03H 00H
12 FILE CONTROL
198 12.3 Data to be specified in commands
File No.
This is a number for module to control files.
File No. can be obtained by following command.
Page 217 Search directory/file information (command: 1811)
Ex.
1FH
ASCII code Binary code
0 0 1 F
30H 30H 31H 46H 1FH 00H
Ex.
For 1FH
ASCII code Binary code
0 0 0 0 0 0 1 F
30H 30H 30H 30H 30H 30H 31H 46H 1FH 00H 00H 00H
12 FILE CONTROL
12.3 Data to be specified in commands 199
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.
Ex.
Number of file is 3
ASCII code Binary code
0 0 0 3
30H 30H 30H 33H 03H 00H
Number of characters
This indicates the number of characters of variable length character string to be specified.
Setting method
Data communication in ASCII code
Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
Number of characters is 86 characters (56H)
ASCII code Binary code
0 0 5 6
30H 30H 35H 36H 56H 00H
Directory specification
Specify the absolute path to a file to be accessed.
Specify 'Path name' with variable length. The length of data is specified in 'Number of characters'. (Page 200 Number of
characters)
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
12 FILE CONTROL
200 12.3 Data to be specified in commands
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.
Ex.
Folder root folder 'A' 12
(UTF-16: 'A'= 0041)
ASCII code Binary code
0 0 4 1
30H 30H 34H 31H 41H 00H
12 FILE CONTROL
12.3 Data to be specified in commands 201
File name specification
Specify the file name to be accessed.
A file name differs in specification by the module. Specify a corresponding file name for the module of access target. For
details of usable file name, refer to the manual of module for access target.
Access target Usable file name Sub command Data specified by Message
MELSEC-Q/L series module File name (up to 8 characters) and 0000 File name (8 characters fixed) and extension (3
extension (3 characters) 0004 characters fixed)
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
characters) and extension name character string (including the path and extension)
Specify with Unicode character string.
Files other than the one described as usable files in the manuals of modules are for system. Do not change
the file name.
(8 digits) (3 digits)
Specify the file name and the extension in ASCII code during data communication in binary code as well.
Ex.
The file name and the extension are "ABCDEFGH.QPG".
ASCII code, binary code
A B C D E F G H Q P G
41H 42H 43H 44H 45H 46H 47H 48H 51H 50H 47H
12 FILE CONTROL
202 12.3 Data to be specified in commands
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.
Specify the length of character string with "number of characters". (Page 200 Number of characters)
ASCII code Binary code
Number of characters File name + "." + Extension Number of characters File name + "." + Extension
Ex.
File name and the extension are "ABC.QPG". (7 characters including a period)
ASCII code Binary code
0 0 0 7 A B C . Q P G A B C . Q P G
30H 30H 30H 37H 41H 42H 43H 2EH 51H 50H 47H 07H 00H 41H 42H 43H 2EH 51H 50H 47H
12 FILE CONTROL
12.3 Data to be specified in commands 203
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 200 Number of characters)
ASCII code Binary code
Number of characters File name + "." + Extension Number of characters File name + "." + Extension
Ex.
When the file name and the extension are 'LINE\LINE.CSV' (13 characters)
ASCII code Binary code
0 0 0 D LINE/LINE.CSV LINE/LINE.CSV
30H 30H 30H 44H 0DH 00H
12 FILE CONTROL
204 12.3 Data to be specified in commands
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 OFF
0 0 0 1
30H 30H 30H 31H 01H 00H
ON
0 0 2 1 12
30H 30H 32H 31H 21H 00H
0 0 0 0
30H 30H 30H 30H 00H 00H
ON
0 0 2 0
30H 30H 32H 30H 20H 00H
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.
0 0 1 1
30H 30H 31H 31H 11H 00H
ON
0 0 3 1
30H 30H 33H 31H 31H 00H
0 0 1 0
30H 30H 31H 30H 10H 00H
ON
0 0 3 0
30H 30H 33H 30H 30H 00H
Do not access the directory (folder) in which the value other than above is stored in the attribute since it is reserved for system
use.
12 FILE CONTROL
12.3 Data to be specified in commands 205
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.
Ex.
For April 1, 2010
0 0 1 1 1 1 0 0 1 0 0 0 0 0 0 1
3 C 8 1
33H 43H 38H 31H 81H 3CH
12 FILE CONTROL
206 12.3 Data to be specified in commands
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.
Ex.
When 20:50:58
1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 1
A 6 5 D
41H 36H 35H 44H 5DH A6H
File size
This indicates the file capacity in byte units.
Setting method
Data communication in ASCII code
Convert the numerical value to 8-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
The file size is 7168 bytes
ASCII code Binary code
0 0 0 0 1 C 0 0
30H 30H 30H 30H 31H 43H 30H 30H 00H 1CH 00H 00H
12 FILE CONTROL
12.3 Data to be specified in commands 207
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*1 ASCII code data.
Ex.
For AH
ASCII code Binary code
0 0 0 A
30H 30H 30H 3AH 0AH 00H
Offset address
Specify the address (one address/one byte) from the head (offset address: 0H) of each file with an even number.
Offset address
0
Data
(File size) -1
Setting method
Data communication in ASCII code
Convert the numerical value to 8-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
Offset address is 780H(1920)
ASCII code Binary code
0 0 0 0 0 7 8 0
30H 30H 30H 30H 30H 37H 38H 30H 80H 07H 00H 00H
12 FILE CONTROL
208 12.3 Data to be specified in commands
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.
Ex.
Number of bytes is 780H(1920)
12
ASCII code Binary code
0 7 8 0
30H 37H 38H 30H 80H 07H
Read data
The data which have been read is stored.
The "Read data" is variable length. The length of data is specified with "Number of bytes read".
Write data
The data to be written is stored.
The "Write data" is variable length. The length of data is specified with "Number of bytes written".
The order of data must be the same as the read data.
12 FILE CONTROL
12.3 Data to be specified in commands 209
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
0 0 0 0
30H 30H 30H 30H 00H 00H
For writing
0 1 0 0
30H 31H 30H 30H 00H 01H
Close type
Specify a target to be closed with the 'close file' (command: 182A).
File to unlock ASCII code Binary code
A file specified by the file pointer
0 0 0 0
30H 30H 30H 30H 00H 00H
All files
0 0 0 1
30H 30H 30H 31H 01H 00H
0 0 0 2
30H 30H 30H 32H 02H 00H
When all files are specified for unlock, the external device that executes the close (command: 182A) closes all files being
open regardless of the hierarchy of drive No. or directory (folder). (There is no difference between 0001H and 0002H.)
The files which were opened by the other devices cannot be closed.
Executing the command to files locked by the other external device results in abnormal completion of the command.
12 FILE CONTROL
210 12.3 Data to be specified in commands
12.4 File Check
Read directory (folder), file name, file creation date and time, and file No. in the specified drive.
The presence of files to be accessed and the file No. to access can be checked.
Message format
The following shows the message format of the request data and response data of the command. 12
Request data
Command Subcommand Fixed values Drive No. Head file No. Number of Directory
requested files specification
Response data
Number of file Last edit Last edit
information Last file No. File date and File size File date and File size
(n points) time time
1 8 1 0 DLE
*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
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 4 0
30H 30H 34H 30H 40H 00H
12 FILE CONTROL
12.4 File Check 211
Fixed value
Specify 30H in 4 bytes.
ASCII code, binary code
Drive No.
Specify the access target drive. (Page 198 Drive No.)
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'.
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
When checking all files in the specified directory (folder), refer to the following section.
Page 190 Procedure to read information from all files in directory (folder)
File No. is also assigned for the system-reserved data that cannot acquire the directory/file information,
therefore, the "Last file No." may differ from the file No. of the last file for the read file information.
Acquire the file No. using the following command.
Page 217 Search directory/file information (command: 1811)
Use "Last file No." in the following process.
Page 190 Procedure to read information from all files in directory (folder)
12 FILE CONTROL
212 12.4 File Check
Directory/file information
Information for number of file information is stored.
When folders exist in the specified storage destination, the information for the folder is also read.
The information of the current directory (.) and the parent directory (..) are read at the same time.
12 FILE CONTROL
12.4 File Check 213
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
1 8 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 3 0 0 0 0
31H 38H 31H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 33H 30H 30H 30H 30H
(Response data)
A B C D E F G H Q P G 0 0 0 1
41H 42H 43H 44H 45H 46H 47H 48H 51H 50H 47H 30H 30H 30H 31H (18 bytes)
Last edit time Last edit date Spare data File size
A 6 5 D 3 C 8 1 0 0 0 0 0 4 0 0
41H 36H 35H 44H 33H 43H 38H 31H 30H 30H 30H 30H 30H 34H 30H 30H
Head
Drive file Number of Directory specification
Subcommand (Fixed value) No. No. file requests (Fixed values)
10H 18H 00H 00H 30H 30H 30H 30H 00H 00H 01H 00H 03H 00H 00H 00H
(Response data)
A B C D E F G H Q P G
41H 42H 43H 44H 45H 46H 47H 48H 51H 50H 47H 01H 00H (9 bytes) 5DH A6H 81H 3CH 00H 04H 00H 00H
1k byte
File "20 h 58 m 58 s" "April 1, 2010"
12 FILE CONTROL
214 12.4 File Check
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.
(1) SUBDIR (6 characters)
Item Value of code corresponds to character
Path name S U B D I R
UTF-16 0053 0055 0042 0044 0049 0052
ASCII code 30303533 30303535 30303432 30303434 30303439 30303532
12
Binary code 5300 5500 4200 4400 4900 5200
Subcommand (Fixed value) Drive No. Head file No. Number of requested files
1 8 1 0 0 0 4 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 1 0 0 0 3
31H 38H 31H 30H 30H 30H 34H 30H 30H 30H 30H 30H 30H 30H 30H 34H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 33H
0 0 0 6 (1)
30H 30H 30H 36H
Directory specification
In the figure (1), set the value of "ASCII code" in the table of "Value of code corresponds to character" in "Path name".
12 FILE CONTROL
12.4 File Check 215
(Response data)
Number of characters
File name Attribute Spare data
0 0 0 8 (2) 0 0 0 1
30H 30H 30H 38H 30H 30H 30H 31H (18 bytes)
File
Last edit time Last edit date Spare data File size
A 6 5 D 3 C 8 1 0 0 0 0 0 4 0 0
41H 36H 35H 44H 33H 43H 38H 31H 30H 30H 30H 30H 30H 34H 30H 30H
"20 h 58 m 58 s" "April 1, 2010" 1k byte
In the figure (2), set the value of "ASCII code" in the table of "Value of code corresponds to character" in "File name".
(1)
10H 18H 40H 00H 30H 30H 30H 30H 04H 00H 01H 00H 00H 00H 03H 00H 06H 00H
Directory specification
In the figure (1), set the value of "Binary code" in the table of "Value of code corresponds to character" in "Path name".
(Response data)
Number of file
information Last file No.
Number of
characters Last edit Last edit Spare
File name Attribute Spare data time date data File size
(2)
08H 00H 01H 00H (9 bytes) 5DH A6H 81H 3CH 00H 04H 00H 00H
"20 h 58 m 58 s" "April 1, 1k byte
File 2010"
In the figure (2), set the value of "Binary code" in the table of "Value of code corresponds to character" in "File name".
12 FILE CONTROL
216 12.4 File Check
Search directory/file information (command: 1811)
Read the file No. of the specified file.
The file No. indicates the registration number of a file when the file is written to the module.
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of file
Command Subcommand Fixed values 1 Drive No. Fixed values 2 File name
name characters
Response data
12
File No. is stored. (Page 199 File No.)
If the file with the specified name does not exist, the command completes abnormally.
1 8 1 1
31H 38H 31H 31H 11H 18H
Sub command
Item ASCII code Binary code
For MELSEC-Q/L series
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 4 0
30H 30H 34H 30H 40H 00H
Fixed value 1
Specify the following fixed value.
MELSEC iQ-R series (when using subcommand '0040'): Specify '0'.
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H 00H 00H
Drive No.
Specify the access target drive. (Page 198 Drive No.)
12 FILE CONTROL
12.4 File Check 217
Fixed value 2
Specify '0'.
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
1 8 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 A B C . Q P G
31H 38H 31H 31H 30H 30H 30H 30H 20H 20H 20H 20H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 37H 41H 42H 43H 2EH 51H 50H 47H
(Response data)
File No.
0 0 0 6
30H 30H 30H 36H
A B C . Q P G
11H 18H 00H 00H 20H 20H 20H 20H 00H 00H 00H 00H 07H 00H 41H 42H 43H 2EH 51H 50H 47H
(Response data)
File No.
06H 00H
12 FILE CONTROL
218 12.4 File Check
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
File name L I N E \ L I N E . C S V
UTF-16 004C 0049 004E 0045 005C 004C 0049 004E 0045 002E 0043 0053 0056
ASCII code 3030 3030 3030 3030 3030 3030 3030 3030 3030 3030 3030 3030 3030
3443 3439 3445 3435 3543 3443 3439 3445 3435 3245 3433 3533 3536
Binary code 4C00 4900 4E00 4500 5C00 4C00 4900 4E00 4500 2E00 4300 5300 5600
12
Data communication in ASCII code
(Request data)
Subcommand (Fixed value 1) Drive No. (Fixed value 2) Number of file name characters File name
1 8 1 1 0 0 4 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 D (1)
31H 38H 31H 31H 30H 30H 34H 30H 30H 30H 30H 30H 30H 30H 30H 34H 30H 30H 30H 30H 30H 30H 30H 44H
In the figure (1), set the value of "ASCII code" in the table of "Value of code corresponds to character" in "File name".
(Response data)
File No.
0 0 0 0 0 0 0 6
30H 30H 30H 30H 30H 30H 39H 36H
(1)
11H 18H 40H 00H 00H 00H 00H 00H 04H 00H 00H 00H 0DH 00H
In the figure (1), set the value of "Binary code" in the table of "Value of code corresponds to character" in "File name".
(Response data)
File No.
12 FILE CONTROL
12.4 File Check 219
12.5 File Creation and Deletion
Create a new file or delete a file.
The time on a module is registered as the last edit date and time in a file created using this function.
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of file
Command Subcommand Password Drive No. File size File name
name characters
Response data
There is no response data for this command.
1 8 2 0
31H 38H 32H 30H 20H 18H
Sub command
Item ASCII code Binary code
For MELSEC-Q/L series
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 4 0
30H 30H 34H 30H 40H 00H
Password
Specify the following fixed value.
MELSEC iQ-R series (when using subcommand '0040'): Specify '0'.
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H 00H 00H
12 FILE CONTROL
220 12.5 File Creation and Deletion
Drive No.
Specify the access target drive. (Page 198 Drive No.)
File size
Specify the file capacity in byte unit. (Page 207 File size)
1 8 2 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0
31H 38H 32H 30H 30H 30H 30H 30H 20H 20H 20H 20H 30H 30H 30H 30H 30H 30H 30H 30H 34H 30H 30H 30H
Number of file
name characters File name
0 0 0 7 A B C . C S V
30H 30H 30H 37H 41H 42H 43H 2EH 43H 53H 56H
A B C . C S V
20H 18H 00H 00H 20H 20H 20H 20H 00H 00H 00H 40H 00H 00H 07H 00H 41H 42H 43H 2EH 43H 53H 56H
12 FILE CONTROL
12.5 File Creation and Deletion 221
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)
Item Value of code corresponds to character
File name L I N E . C S V
UTF-16 004C 0049 004E 0045 002E 0043 0053 0056
ASCII code 30303443 30303439 30303445 30303435 30303245 30303433 30303533 30303536
Binary code 4C00 4900 4E00 4500 2E00 4300 5300 5600
1 8 2 0 0 0 4 0 0 0 0 0 0 0 0 4 0 0 0 0 1 C 0 0 0 0 0 8 (1)
31H 38H 32H 30H 30H 30H 34H 30H 30H 30H 30H 30H 30H 30H 30H 34H 30H 30H 30H 30H 31H 43H 30H 30H 30H 30H 30H 38H
In the figure (1), set the value of "ASCII code" in the table of "Value of code corresponds to character" in "File name".
(1)
20H 18H 40H 00H 00H 00H 00H 00H 04H 00H 00H 1CH 00H 00H 08H 00H
In the figure (1), set the value of "Binary code" in the table of "Value of code corresponds to character" in "File name".
12 FILE CONTROL
222 12.5 File Creation and Deletion
Delete file (command: 1822)
Delete a file.
If files are deleted while a programmable controller system is in operation, the system may be stopped.
Determine the timing of file deletion for the entire programmable controller system.
The files on which the 'open file' command is being executed cannot be deleted. Close the file before
deleting it. (Page 236 Open file (command: 1827), Page 244 Close file (command: 182A))
The file being executed cannot be deleted when CPU module is state of RUN. Delete the file after placing
CPU module to the STOP state. (Page 463 Applicable Commands for Online Program Change) 12
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
There is no response data for this command.
1 8 2 2
31H 38H 32H 32H 22H 18H
Sub command
Item ASCII code Binary code
For MELSEC-Q series
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 0 4
30H 30H 30H 34H 04H 00H
0 0 4 0
30H 30H 34H 30H 40H 00H
Password
Specify the password of the file. (Page 195 Password)
Drive No.
Specify the access target drive. (Page 198 Drive No.)
12 FILE CONTROL
12.5 File Creation and Deletion 223
Number of file name characters, file name
Specify the file name to be deleted. (Page 202 File name specification)
Subcommand Password Drive No. Number of file name characters File name
1 8 2 2 0 0 0 0 1 2 3 4 0 0 0 0 0 0 0 7 A B C . Q P G
31H 38H 32H 32H 30H 30H 30H 30H 31H 32H 33H 34H 30H 30H 30H 30H 30H 30H 30H 37H 41H 42H 43H 2EH 51H 50H 47H
1 2 3 4 A B C . Q P G
22H 18H 00H 00H 31H 32H 33H 34H 00H 00H 07H 00H 41H 42H 43H 2EH 51H 50H 47H
1 8 2 2 0 0 0 4 A b C d 1 2 3 4 0 0 0 0
31H 38H 32H 32H 30H 30H 30H 34H 41H 62H 43H 64H 31H 32H 33H 34H 20H 20H 30H 30H 30H 30H
Number of file
name characters File name
0 0 0 8 M A I N . Q P G
30H 30H 30H 38H 4DH 41H 49H 4EH 2EH 51H 50H 47H
A b C d 1 2 3 4 M A I N . Q P G
22H 18H 04H 00H 41H 62H 43H 64H 31H 32H 33H 34H 20H 20H 00H 00H 08H 00H 4DH 41H 49H 4EH 2EH 51H 50H 47H
12 FILE CONTROL
224 12.5 File Creation and Deletion
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
File name L I N E . C S V
UTF-16 004C 0049 004E 0045 002E 0043 0053 0056
ASCII code 30303443 30303439 30303445 30303435 30303245 30303433 30303533 30303536
Binary code 4C00 4900 4E00 4500 2E00 4300 5300 5600
12
Data communication in ASCII code
(Request data)
Number of
Subcommand password characters Password
1 8 2 2 0 0 4 0 0 0 1 A A B C D Z
31H 38H 32H 32H 30H 30H 34H 30H 30H 30H 31H 41H 41H 42H 43H 44H 54H
0 0 0 4 0 0 0 8 (1)
30H 30H 30H 34H 30H 30H 30H 38H
In the figure (1), set the value of "ASCII code" in the table of "Value of code corresponds to character" in "File name".
A B C D Z (1)
22H 18H 40H 00H 1AH 00H 41H 42H 43H 44H 5AH 04H 00H 0DH 00H
In the figure (1), set the value of "Binary code" in the table of "Value of code corresponds to character" in "File name".
12 FILE CONTROL
12.5 File Creation and Deletion 225
Copy file (command: 1824)
Copy a file.
When this command is executed to files of parameter and a program being executed, place CPU module in
the STOP status. (Page 463 Commands that cannot be executed during RUN)
Message format
The following shows the message format of the request data and response data of the command.
Request data
Command Subcommand Fixed Password Drive No. Number of file File name
values name characters
Copy destination
Number of file
Password Drive No. File name
name characters
Copy source
Response data
There is no response data for this command.
1 8 2 4
31H 38H 32H 34H 24H 18H
Sub command
Item ASCII code Binary code
For MELSEC-Q series
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 0 4
30H 30H 30H 34H 04H 00H
0 0 4 0
30H 30H 34H 30H 40H 00H
Fixed value
Specify '0'.
ASCII code Binary code
30H 30H 30H 30H 30H 00H 00H 00H 00H 00H
(16 characters) (8 bytes)
12 FILE CONTROL
226 12.5 File Creation and Deletion
Password
Specify the password of the access target file. (Page 195 Password)
Drive No.
Specify the access target drive. (Page 198 Drive No.)
Subcommand Fixed values (16 characters) Password Drive No. Number of file name characters File name
1 8 2 4 0 0 0 0 0 0 0 0 1 2 3 4 0 0 0 0 0 0 0 7 C B A . Q P G
31H 38H 32H 34H 30H 30H 30H 30H 30H 30H 30H 30H 31H 32H 33H 34H 30H 30H 30H 30H 30H 30H 30H 37H 43H 42H 41H 2EH 51H 50H 47H
Copy destination
1 2 3 4 0 0 0 0 0 0 0 7 A B C . Q P G
31H 32H 33H 34H 30H 30H 30H 30H 30H 30H 30H 37H 41H 42H 43H 2EH 51H 50H 47H
Copy source
1 2 3 4 C B A . Q P G
24H 18H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 31H 32H 33H 34H 00H 00H 07H 00H 43H 42H 41H 2EH 51H 50H 47H
Copy destination
1 2 3 4 A B C . Q P G
31H 32H 33H 34H 00H 00H 07H 00H 41H 42H 43H 2EH 51H 50H 47H
Copy source
12 FILE CONTROL
12.5 File Creation and Deletion 227
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
Copy source file name: DEST.QPG
1 8 2 4 0 0 0 4 0 0 0 0
31H 38H 32H 34H 30H 30H 30H 34H 30H 30H 30H 30H
Number of file
Password (fixed to 32 characters) Drive No. name characters File name
A b C d 1 2 3 4 0 0 0 0 0 0 0 8 D E S T . Q P G
41H 62H 43H 64H 31H 32H 33H 34H 20H 20H 30H 30H 30H 30H 30H 30H 30H 38H 44H 45H 53H 54H 2EH 51H 50H 47H
Copy destination
Number of file
Password (fixed to 32 characters) Drive No. name characters File name
A b C d 1 2 3 4 0 0 0 0 0 0 0 8 M A I N . Q P G
41H 62H 43H 64H 31H 32H 33H 34H 20H 20H 30H 30H 30H 30H 30H 30H 30H 38H 4DH 41H 49H 4EH 2EH 51H 50H 47H
Copy source
24H 18H 04H 00H 00H 00H 00H 00H 00H 00H 00H 00H
A b C d 1 2 3 4 D E S T . Q P G
41H 62H 43H 64H 31H 32H 33H 34H 20H 20H 00H 00H 08H 00H 44H 45H 53H 54H 2EH 51H 50H 47H
Copy destination
A b C d 1 2 3 4 M A I N . Q P G
41H 62H 43H 64H 31H 32H 33H 34H 20H 20H 00H 00H 08H 00H 4DH 41H 49H 4EH 2EH 51H 50H 47H
Copy source
12 FILE CONTROL
228 12.5 File Creation and Deletion
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.
(1) LINE.CSV (8 characters)
Item Value of code corresponds to character
File name L I N E . C S V
UTF-16 004C 0049 004E 0045 002E 0043 0053 0056
ASCII code 30303443 30303439 30303445 30303435 30303245 30303433 30303533 30303536
Binary code 4C00 4900 4E00 4500 2E00 4300 5300 5600
12
Data communication in ASCII code
(Request data)
Subcommand Fixed values (16 characters)
1 8 2 4 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
31H 38H 32H 34H 30H 30H 34H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H
Number of Number of
copy destination Copy destination Copy destination copy destination Copy destination
password characters password drive No. file name characters file name
0 0 1 A A B C D Z 0 0 0 4 0 0 0 8 (1)
30H 30H 31H 41H 41H 42H 43H 44H 54H 30H 30H 30H 34H 30H 30H 30H 38H
Number of Number of
copy source Copy source Copy source copy source Copy source
password characters password drive No. file name characters file name
0 0 1 A A B C D Z 0 0 0 2 0 0 0 8 (1)
30H 30H 31H 41H 41H 42H 43H 44H 54H 30H 30H 30H 32H 30H 30H 30H 38H
In the figure (1), set the value of "ASCII code" in the table of "Value of code corresponds to character" in "File name".
A B C D Z (1)
24H 18H 04H 00H 00H 00H 00H 00H 00H 00H 00H 00H 1AH 00H 41H 42H 43H 44H 54H 04H 00H 08H 00H
Number of
copy source Copy Number of copy
password source source file name
characters Copy source password drive No. characters Copy source file name
A B C D Z (1)
1AH 00H 41H 42H 43H 44H 5AH 02H 00H 08H 00H
In the figure (1), set the value of "Binary code" in the table of "Value of code corresponds to character" in "File name".
12 FILE CONTROL
12.5 File Creation and Deletion 229
12.6 File Modification
Read or write data from/to the specified file. Lock the file with the open/close file command during reading or writing so that
the file contents will not be changed from other devices. The file is not required to be locked with the open file command when
commands other than read/write file command are executed.
When modifying the file attributes and the last edit date and time, executing the open command is not required.
When this command is executed to files of parameter and a program being executed, place CPU module in
the STOP status. (Page 463 Commands that cannot be executed during RUN)
Message format
The following shows the message format of the request data and response data of the command.
Request data
Command Subcommand Password Drive No. Attribute Number of file File name
name characters
Response data
There is no response data for this command.
1 8 2 5
31H 38H 32H 35H 25H 18H
Sub command
Item ASCII code Binary code
For MELSEC-Q series
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 0 4
30H 30H 30H 34H 04H 00H
0 0 4 0
30H 30H 34H 30H 40H 00H
Password
Specify the password of the access target file. (Page 195 Password)
12 FILE CONTROL
230 12.6 File Modification
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.
Subcommand Password Drive No. Attribute Number of file name characters File name
1 8 2 5 0 0 0 0 1 2 3 4 0 0 0 0 0 0 0 1 0 0 0 7 A B C . Q P G
31H 38H 32H 35H 30H 30H 30H 30H 31H 32H 33H 34H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 37H 41H 42H 43H 2EH 51H 50H 47H
Subcommand Password Drive No. Attribute Number of file name characters File name
1 2 3 4 A B C . Q P G
25H 18H 00H 00H 31H 32H 33H 34H 00H 00H 01H 00H 07H 00H 41H 42H 43H 2EH 51H 50H 47H
1 8 2 5 0 0 0 4 A b C d 1 2 3 4 0 0 0 0 0 0 0 1
31H 38H 32H 35H 30H 30H 30H 34H 41H 62H 43H 64H 31H 32H 33H 34H 20H 20H 30H 30H 30H 30H 30H 30H 30H 31H
Number of file
name characters File name
0 0 0 8 M A I N . Q P G
30H 30H 30H 38H 4DH 41H 49H 4EH 2EH 51H 50H 47H
Subcommand Password (fixed to 32 characters) Drive No. Attribute Number of file name characters File name
A b C d 1 2 3 4 M A I N . Q P G
25H 18H 04H 00H 41H 62H 43H 64H 31H 32H 33H 34H 20H 20H 00H 00H 01H 00H 08H 00H 4DH 41H 49H 4EH 2EH 51H 50H 47H
12 FILE CONTROL
12.6 File Modification 231
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)
Item Value of code corresponds to character
File name L I N E . C S V
UTF-16 004C 0049 004E 0045 002E 0043 0053 0056
ASCII code 30303443 30303439 30303445 30303435 30303245 30303433 30303533 30303536
Binary code 4C00 4900 4E00 4500 2E00 4300 5300 5600
1 8 2 5 0 0 4 0 0 0 1 A A B C D Z
31H 38H 32H 35H 30H 30H 34H 30H 30H 30H 31H 41H 41H 42H 43H 44H 5AH
0 0 0 4 0 0 0 1 0 0 0 8 (1)
30H 30H 30H 34H 30H 30H 30H 31H 30H 30H 30H 38H
A B C D Z (1)
25H 18H 40H 00H 1AH 00H 41H 42H 43H 44H 5AH 04H 00H 01H 00H 08H 00H
12 FILE CONTROL
232 12.6 File Modification
Modify file creation date and time (command: 1826)
Modify the file creation date and time.
When this command is executed to files of parameter and a program being executed, place CPU module in
the STOP status. (Page 463 Commands that cannot be executed during RUN)
Message format
The following shows the message format of the request data and response data of the command.
Request data
12
Fixed Date to Time to Number of file
Command Subcommand Drive No. File name
values change change name characters
Response data
There is no response data for this command.
1 8 2 6
31H 38H 32H 36H 26H 18H
Sub command
Item ASCII code Binary code
For MELSEC-Q/L series
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 4 0
30H 30H 34H 30H 40H 00H
Fixed value
Specify '0'.
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H 00H 00H
Drive No.
Specify the access target drive. (Page 198 Drive No.)
12 FILE CONTROL
12.6 File Modification 233
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
1 8 2 6 0 0 0 0 0 0 0 0 0 0 0 0 3 C 8 1 A 6 5 D
31H 38H 32H 36H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 33H 43H 38H 31H 41H 36H 35H 44H
Number of
file name characters File name
0 0 0 7 A B C . Q P G
30H 30H 30H 37H 41H 42H 43H 2EH 51H 50H 47H
A B C . Q P G
26H 18H 00H 00H 00H 00H 00H 00H 00H 00H 81H 3CH 5DH A6H 07H 00H 41H 42H 43H 2EH 51H 50H 47H
12 FILE CONTROL
234 12.6 File Modification
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.
(1) LINE.CSV (8 characters)
Item Value of code corresponds to character
File name L I N E . C S V
UTF-16 004C 0049 004E 0045 002E 0043 0053 0056
ASCII code 30303443 30303439 30303445 30303435 30303245 30303433 30303533 30303536
12
Binary code 4C00 4900 4E00 4500 2E00 4300 5300 5600
1 8 2 6 0 0 4 0 0 0 0 0 0 0 0 4 3 C 8 1 A 6 5 D
31H 38H 32H 36H 30H 30H 34H 30H 30H 30H 30H 30H 30H 30H 30H 34H 33H 43H 38H 31H 41H 36H 35H 44H
Number of file
name characters File name
0 0 0 8 (1)
30H 30H 30H 38H
(1)
26H 18H 40H 00H 00H 00H 00H 00H 04H 00H 81H 3CH 5DH A6H 08H 00H
12 FILE CONTROL
12.6 File Modification 235
Open file (command: 1827)
Open a file and lock the file so that the file contents are not modified from other devices.
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of file
Command Subcommand Password Open mode Drive No. File name
name characters
Response data
The file pointer No. is stored. (Page 208 File pointer No.)
1 8 2 7
31H 38H 32H 37H 27H 18H
Sub command
Item ASCII code Binary code
For MELSEC-Q series
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 0 4
30H 30H 30H 34H 04H 00H
0 0 4 0
30H 30H 34H 30H 40H 00H
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)
Open for read: 0000H
Open for write: 0100H
12 FILE CONTROL
236 12.6 File Modification
Drive No.
Specify the access target drive. (Page 198 Drive No.)
Subcommand Password Open mode Drive No. Number of file name characters File name
1 8 2 7 0 0 0 0 1 2 3 4 0 1 0 0 0 0 0 0 0 0 0 7 A B C . Q P G
31H 38H 32H 37H 30H 30H 30H 30H 31H 32H 33H 34H 30H 31H 30H 30H 30H 30H 30H 30H 30H 30H 30H 37H 41H 42H 43H 2EH 51H 50H 47H
(Response data)
0 0 0 0
30H 30H 30H 30H
Drive No.
Number of file
Subcommand Password Open mode name characters File name
1 2 3 4 A B C . Q P G
27H 18H 00H 00H 31H 32H 33H 34H 00H 01H 00H 00H 07H 00H 41H 42H 43H 2EH 51H 50H 47H
(Response data)
File
pointer No.
00H 00H
12 FILE CONTROL
12.6 File Modification 237
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
1 8 2 7 0 0 0 4 A b C d 1 2 3 4 0 1 0 0 0 0 0 0
31H 38H 32H 37H 30H 30H 30H 34H 41H 62H 43H 64H 31H 32H 33H 34H 20H 20H 30H 31H 30H 30H 30H 30H 30H 30H
Number of file
name characters File name
0 0 0 8 M A I N . Q P G
30H 30H 30H 38H 4DH 41H 49H 4EH 2EH 51H 50H 47H
(Response data)
0 0 0 0
30H 30H 30H 30H
Drive No.
Number of file
Subcommand Password (fixed to 32 characters) Open mode name characters File name
A b C d 1 2 3 4 M A I N . Q P G
27H 18H 04H 00H 41H 62H 43H 64H 31H 32H 33H 34H 20H 20H 00H 01H 00H 00H 08H 00H 4DH 41H 49H 4EH 2EH 51H 50H 47H
(Response data)
File
pointer No.
00H 00H
12 FILE CONTROL
238 12.6 File Modification
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)
Item Value of code corresponds to character
File name L I N E . C S V
UTF-16 004C 0049 004E 0045 002E 0043 0053 0056
ASCII code 30303443 30303439 30303445 30303435 30303245 30303433 30303533 30303536
12
Binary code 4C00 4900 4E00 4500 2E00 4300 5300 5600
1 8 2 7 0 0 4 0 0 0 1 A A B C D Z
31H 38H 32H 37H 30H 30H 34H 30H 30H 30H 31H 41H 41H 42H 43H 44H 5AH
Number of file
Open mode Drive No. name characters File name
0 1 0 0 0 0 0 4 0 0 0 8 (1)
30H 31H 30H 30H 30H 30H 30H 34H 30H 30H 30H 38H
(Response data)
0 0 0 0
30H 30H 30H 30H
A B C D Z (1)
27H 18H 40H 00H 1AH 00H 41H 42H 43H 44H 34H 00H 01H 04H 00H 08H 00H
(Response data)
File
pointer No.
00H 00H
12 FILE CONTROL
12.6 File Modification 239
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 Subcommand File pointer No. Offset address
bytes read
Response data
The data which have been read is stored.
1 8 2 8
31H 38H 32H 38H 28H 18H
Sub command
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Offset address
Specify the start address to start reading. (Page 208 Offset address)
When the file size is 1921 bytes or more, use an offset address and read data divide into multiple steps. The
file size can be checked by reading directory/file information (command: 1810).
Page 211 Read directory/file information (command: 1810)
Read data
The contents of the read file are stored.
12 FILE CONTROL
240 12.6 File Modification
Communication example
Read the file under the following conditions:
File pointer No.: 0
Number of bytes read: 1K bytes
1 8 2 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0
31H 38H 32H 38H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 34H 30H 30H
(Response data)
12
Number of bytes read Read data
0 4 0 0 (Contents of a file)
30H 34H 30H 30H
28H 18H 00H 00H 00H 00H 00H 00H 00H 00H 00H 04H
(Response data)
Number of
bytes read Read data
(Contents of a file)
00H 04H
12 FILE CONTROL
12.6 File Modification 241
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 463 Commands that cannot be executed during RUN)
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of
Command Subcommand File pointer No. Offset address Write data
bytes written
Response data
The number of data bytes written in the file is stored. (Page 209 Number of bytes)
1 8 2 9
31H 38H 32H 39H 29H 18H
Sub command
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Offset address
Specify the start address to start writing. (Page 208 Offset address)
Writing data to a file of which drive name is '00H' (program memory): Specify the address in multiples of 4 (0, 4, 8,... in
decimal notation).
Writing data to a file of which drive name is other than '00H': Specify the addresses in even numbered addresses (0, 2, 4, 6,
8,... In decimal notation).
Write data to the file within the file size reserved by creating new file.
When the file size is 1921 bytes or more, use an offset address and write data divide into multiple steps. The
file size can be checked by reading directory/file information (command: 1810).
Page 211 Read directory/file information (command: 1810)
12 FILE CONTROL
242 12.6 File Modification
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
Subcommand File pointer No. Offset address Number of bytes written Write data
12
1 8 2 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 (Contents of a file)
31H 38H 32H 39H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 34H 30H 30H
(Response data)
Number of bytes written
0 4 0 0
30H 34H 30H 30H
(Contents of a file)
29H 18H 00H 00H 00H 00H 00H 00H 00H 00H 00H 04H
(Response data)
Number of
bytes written
00H 04H
12 FILE CONTROL
12.6 File Modification 243
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
Response data
There is no response data for this command.
1 8 2 A
31H 38H 32H 41H 2AH 18H
Sub command
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Close type
Specify the file to be closed. (Page 210 Close type)
When closing a file specified by file pointer, specify '0'.
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
The locked files which have been opened by other devices cannot be unlocked.
Executing the command to files which have been opened by the other external device results in abnormal completion of the
command.
12 FILE CONTROL
244 12.6 File Modification
Communication example
Close the file under the following conditions:
File pointer No.: 0
Close type: 2
1 8 2 A 0 0 0 0 0 0 0 0 0 0 0 2
31H 38H 32H 41H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 32H
12 FILE CONTROL
12.6 File Modification 245
13 SERIAL COMMUNICATION MODULE
DEDICATED COMMANDS
This chapter explains the dedicated commands for serial communication module.
Sum check
Control code such as an access route Arbitrary data Control code
code
Control code or sum check code in the message are registered as a default registration frame.
The data such as an access route can be registered to the user frame.
By using the user frame, the following data communication can be performed.
Transmission of on-demand data by MC protocol
Data communication by nonprocedural protocol
This section explains the commands for an external device to register, delete, and read user frames to C24. For transmission
and reception of data using a user frame, refer to the following manual.
MELSEC-Q/L Serial Communication Module User's Manual (Application)
MELSEC iQ-R Serial Communication Module User's Manual (Application)
The command can only be used for C24 (including multidrop connection station) connected to the external
device. It cannot be used via network.
This command is processed by the connected C24/E71 without waiting for the END processing by CPU
module.
Frame No.
Specify the number of target user frame.
Type Setting value Registration destination Remarks
Default registration frame 1H to 3E7H ROM for C24 operating system Read only
User frame 3E8H to 4AFH Flash ROM of C24 Read, write, delete
8001H to 801FH Buffer memory of C24 (addresses 1B00H to 1FF6H) Read, write, delete
Ex.
For 3E8H
ASCII code Binary code
0 3 E 8
30H 33H 45H 38H E8 03H
For the number of registration data byte, calculate the variable data as 2 bytes.
For the number of frame byte, calculate the variable data as 1 byte.
For the variable data, refer to the following manuals.
MELSEC-Q/L Serial Communication Module User's Manual (Application)
MELSEC iQ-R Serial Communication Module User's Manual (Application)
Ex.
When the registration data is ETX + variable data (sum check code) + CR + LF
Number of registration data byte = 1-byte (ETX) + 2-byte (variable data) + 1-byte (CR) + 1-byte (LF) = 5
Number of frame byte = 1-byte (ETX) + 1-byte (variable data) + 1-byte (CR) + 1-byte (LF) = 4
Item ASCII code Binary code
Number of registration data byte
0 0 0 5
30H 30H 30H 35H 05H 00H
0 0 0 4
30H 30H 30H 34H 04H 00H
Ex.
When the registration data is ETX + Variable data (sum check code) + CR + LF
ASCII code Binary code
0 3 F F F 1 0 D 0 A
30H 33H 46H 46H 46H 31H 30H 44H 30H 41H 03H FFH F0H 0DH 0AH
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
The read registration data is stored.
Registration data
byte count
Frame byte
count
Registration data 13
0 6 1 0 DLE
30H 36H 31H 30H 10H 10H 06H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Frame No.
Specify the number of user frame to be read. (Page 247 Frame No.)
Type Setting value Registration destination
Default registration frame 1H to 3E7H ROM for C24 operating system
User frame 3E8H to 4AFH Flash ROM of C24
8001H to 801FH Buffer memory of C24 (addresses 1B00H to 1FF6H)
When the frame No. whose user frame is not registered is specified, an error occurs and an abnormal
response is returned.
Registration data
The data content of user frames to be registered is stored. (Page 248 Registration data)
0 6 1 0 0 0 0 0 0 3 E 8
30H 36H 31H 30H 30H 30H 30H 30H 30H 38H 45H 38H
(Response data)
Number of
registration data byte Number of frame byte ETX Variable data CR LF
0 0 0 5 0 0 0 4 0 3 F F F 1 0 D 0 A
30H 30H 30H 35H 30H 30H 30H 34H 30H 33H 46H 46H 46H 31H 30H 44H 30H 41H
Registration data
Frame
Subcommand No.
(Response data)
Number of Number of Variable
registration
data byte frame byte ETX data CR LF
Registration data
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.
MELSEC iQ-R Serial Communication Module User's Manual (Application)
When registering a user frame with the same frame No. again, deleted the user frame first and registered
again. If it is attempted to register a user frame by specifying an already registered frame No., an error occurs
and an abnormal response is returned.
Message format
13
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 Registration data
frame byte
data byte
Response data
There is no response data for this command.
1 6 1 0 DLE
31H 36H 31H 30H 10H 10H 16H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Frame No.
Specify the number of user frame to be registered. (Page 247 Frame No.)
Type Setting value Registration destination
User frame 3E8H to 4AFH Flash ROM of C24
8001H to 801FH Buffer memory of C24 (addresses 1B00H to 1FF6H)
Registration data
Store the content of user frame data to be registered. (Page 248 Registration data)
1 6 1 0 0 0 0 0 0 3 E 8 0 0 0 5 0 0 0 4 0 3 F F F 1 0 D 0 A
31H 36H 31H 30H 30H 30H 30H 30H 30H 38H 45H 38H 30H 30H 30H 35H 30H 30H 30H 34H 30H 33H 46H 46H 46H 31H 30H 44H 30H 41H
Registration data
10H 10H 16H 00H 00H E8H 03H 05H 00H 04H 00H 03H FFH F1H 0DH 0AH
Registration data
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.
1 6 1 0 DLE
31H 36H 31H 30H 10H 10H 16H
Subcommand
ASCII code Binary code
0 0 0 1
30H 30H 30H 31H 01H 00H
Frame No.
Specify the number of user frame to be deleted. (Page 247 Frame No.)
Type Setting value Registration destination
User frame 3E8H to 4AFH Flash ROM of C24
8001H to 801FH Buffer memory of C24 (addresses 1B00H to 1FF6H)
When the frame No. whose user frame is not registered is specified, an error occurs and an abnormal
response is returned.
0 0 0 0
30H 30H 30H 30H 00H 00H
1 6 1 0 0 0 0 1 0 3 E 8 0 0 0 0 0 0 0 0
31H 36H 31H 30H 30H 30H 30H 31H 30H 33H 45H 38H 30H 30H 30H 30H 30H 30H 30H 30H
10H 10H 16H 01H 00H E8H 03H 00H 00H 00H 00H
The command can only be used for C24 (including multidrop connection station) connected to the external
device. It cannot be used via network.
The global signal is turned OFF by powering OFF, resetting, or switching the mode of CPU module.
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.
1 6 1 8
31H 36H 31H 38H 18H 16H
Subcommand
Item ASCII code Binary code
OFF
0 0 0 0
30H 30H 30H 30H 00H 00H
ON
0 0 0 1
30H 30H 30H 31H 01H 00H
0 0 0 1
30H 30H 30H 31H 01H 00H
0 0 0 2
30H 30H 30H 32H 02H 00H
The target station (all stations/only 1 specified station) of which global signal is turned ON/OFF is specified by
a station No.
Page 50 Station No.
1 6 1 8 0 0 0 1 0 0 0 1
31H 36H 31H 38H 30H 30H 30H 31H 30H 30H 30H 31H
Global signal
Command Subcommand specification
1 6 1 8 0 0 0 0 0 0 0 1
31H 36H 31H 38H 30H 30H 30H 30H 30H 30H 30H 31H
Global signal
Command Subcommand specification
The command can only be used for C24 (including multidrop connection station) connected to the external
device. It cannot be used via network.
This function is equivalent to EOT, CL during data communication in ASCII code. Use the control codes, EOT,
CL during data communication in ASCII code. (Page 34 EOT(04H), CL(0CH))
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.
15H 16H
Subcommand
Binary code
00H 00H
Subcommand
The command can only be used for C24 (including multidrop connection station) connected to the external
device. It cannot be used via network.
0 1
30H 31H 01H
CH2
0 2
30H 32H 02H
Switching instruction
Select which specify the contents to be switched, by data in the command or by Engineering tool.
Bit Item Setting of Engineering tool OFF (0) ON (1)
b0 Mode No. Communication protocol setting Specified by Engineering tool Specified by command
b1 Transmission Transmission setting
setting
b2 Communicati Communication speed setting
on speed
b3 to b7 (Fixed to '0')
Ex.
When the switching instruction is '1' (Only mode No. is specified by command)
ASCII code Binary code
0 1
30H 31H 01H
Ex.
When mode No. is '1' (MC protocol (Format 1))
ASCII code Binary code
0 1
30H 31H 01H
E 6
45H 36H E6H
The communication speed that can be set differs depending on the module or channel.
For the communication speed setting, refer to the following manuals.
MELSEC iQ-R Serial Communication Module User's Manual (Application)
MELSEC-Q/L Serial Communication Module User's Manual (Application)
Ex.
For communication speed 05H (9600 bps)
ASCII code Binary code
0 5
30H 35H 05H
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
There is no response data for this command.
1 6 1 2
31H 36H 31H 32H 12H 16H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Channel No.
Specify the target interface (CH1/CH2). (Page 259 Channel No.)
Switching instruction
Select which specify the contents to be switched, by data in the command or by Engineering tool. (Page 259 Switching
instruction)
: Specified by command, : Specified by Engineering tool
Switching instruction Mode No. Transmission setting Communication speed
0
1
2
3
4
5
6
7
Mode No.
Specify the operation mode within the range of 1H to 9H or FFH. (Page 260 Mode No.)
When the setting by command enabled (Switching instruction: 1, 3, 5, or 7), the operation mode is changed according to the
specified value.
As for the setting by command is disabled (Switching instruction: 0, 2, 4, or 6), the operation mode is changed according to
the Communication protocol setting set with Engineering tool
Even when the setting by command is disabled, specify the value (1 to 9H or FFH). (Do not specify '0'.)
0 0
30H 30H 00H
Communication speed
Specify the communication speed. (Page 262 Communication speed)
When the setting by command is enabled (Switching instruction: 4, 5, 6, or 7), the communication speed is changed according
to the specified value.
When the setting by command is disabled (Switching instruction: 0, 1, 2, or 3), the communication speed is changed
according to the communication speed setting set with Engineering tool.
When the setting is invalid, specify '0'.
ASCII code Binary code
0 0
30H 30H 00H
1 6 1 2 0 0 0 0 0 1 0 7 0 1 B 0 0 5
31H 36H 31H 32H 30H 30H 30H 30H 30H 31H 30H 37H 30H 30H 42H 30H 30H 35H
Command Subcommand
13
The command can only be used for C24 (including multidrop connection station) connected to the external
device. It cannot be used via network.
0 0
30H 30H 00H
1 second
0 1
30H 31H 01H
1 minute
0 2
30H 32H 02H
Cycle time
Specify the time interval (period for 1 cycle) that C24 reads the monitoring information from CPU module.
When the error monitoring is performed, the CPU monitoring result is stored in the response data as a CPU status
information.
The following values are stored in the CPU status information.
Specified value CPU status
0000H During normal operation 13
0001H Module warning occurring
0002H Module error/module system error occurring
0 1 0 0 0 0 0 0 0 0 0 1 Device data
30H 31H 30H 30H 30H 30H 30H 30H 30H 30H 30H 31H
Device data
Monitoring condition
When 'fixed cycle send' is specified with the programmable controller CPU monitoring function, specify '0'.
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
When 'condition match send' is specified with the Programmable controller CPU monitoring function, specify the value below.
The timing to send the result can be selected.
Edge trigger transmission: Send the result when the condition matches.
Level trigger transmission: Send the result in the cycle time interval during the condition matches
Edge trigger Level trigger Monitoring condition Device type that can be
transmission transmission specified
0001H 0101H ON/OFF status of device = ON/OFF status of monitoring Bit device
condition
Device value = Monitoring condition value Word device
0002H 0102H ON/OFF status of device ON/OFF status of monitoring Bit device
condition
Device value Monitoring condition value Word device
0 0 0 0
30H 30H 30H 30H 00H 00H
When 'condition match send' is specified with the Programmable controller CPU monitoring function, specify the value below.
Monitoring condition value Monitoring condition value Device type
0000H OFF Bit device
0001H ON
0000H to FFFFH Numerical value Word device
Message format
The following shows the message format of the request data and response data of the command.
Request data
Programmable Number of registered
Command Subcommand Cycle time unit Cycle time controller CPU Transmission method word blocks
monitoring function (m points)
13
Number of registered Block
Block
bit blocks CPU error monitoring (mth point)
(first point)
(n points)
Response data
The device information of the monitoring result and programmable controller CPU status information are stored.
CPU status
information
The response data of this command will be sent as same as that of the on-demand function.
For the transmission methods and its timing of monitoring result, refer to the following manuals.
MELSEC iQ-R Serial Communication Module User's Manual (Application)
MELSEC-Q/L Serial Communication Module User's Manual (Application)
0 6 3 0
30H 36H 33H 30H 30H 06H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Transmission method
Fixed '0'.
ASCII code Binary code
0 0
30H 30H 00H
0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 5 0 0 0 1
30H 31H 30H 30H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 35H 30H 30H 30H 31H 00H 00H 00H 01H 01H 00H 05H 00H 01H 00H
Block (1 point)
Monitoring start device: Specify the device code and device number. (Page 67 Devices)
Number of registered points: Specify the device points from the start device in word units. (Page 72 Number of device
points)
Monitoring condition: Specify the monitoring condition and transmission method for the device to be registered. (Page
267 Monitoring condition)
Monitoring condition value: Specify a value to judge the conditions have been matched or ON/OFF state of the bit.
(Page 268 Monitoring condition value) 13
2 1 0 2
32H 31H 30H 32H 02H 21H
Block (1 point)
Monitoring start device: Device code and device number are stored. (Page 67 Devices)
Number of registered points: Number of device data points is stored in word unit. (Page 72 Number of device points)
Device data: The device value is stored.
The order of device data differ depending on the setting of "Word/byte units designation" in Engineering tool.
For byte units, handle the word data as 2-byte data and send the numerical values from the lower byte (L: bits 0 to 7).
Ex.
2 points data of word device (1234H, 5678H)
Word unit (0)
ASCII code Binary code
1 2 3 4 5 6 7 8
31H 32H 33H 34H 35H 36H 37H 38H 12H 34H 56H 78H
3 4 1 2 7 8 5 6
33H 34H 31H 32H 37H 38H 35H 36H 34H 12H 78H 56H
0 6 3 0 0 0 0 0 0 1 0 0 1 E 0 1 0 0 0 2 0 1 0 1
30H 36H 33H 30H 30H 30H 30H 30H 30H 31H 30H 30H 31H 45H 30H 31H 30H 30H 30H 32H 30H 31H 30H 31H
D * 0 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0
44H 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 34H 30H 30H 30H 30H 30H 30H 30H 30H
D0 to D3
W * 0 0 0 1 0 0 0 0 0 8 0 0 0 0 0 0 0 0
57H 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 38H 30H 30H 30H 30H 30H 30H 30H 30H
W100 to D107
M * 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0
4DH 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 32H 30H 30H 30H 30H 30H 30H 30H 30H
M0 to M31
0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 5 0 0 0 1
30H 31H 30H 30H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 35H 30H 30H 30H 31H
(Response data)
2 1 0 2 0 1 0 2 0 1 0 1
32H 31H 30H 32H 30H 31H 30H 32H 30H 31H 30H 31H
D * 0 0 0 0 0 0 0 0 0 4 (1)
44H 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 34H
M * 0 0 0 0 0 0 0 0 0 2 (2)
4DH 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 32H
0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1
30H 31H 30H 30H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 31H
In the figure (1) and (2), set the value of "ASCII Code" in the table of "Device data" of each response data.
The order of device data differ depending on the setting of "Word/byte units designation" in Engineering tool.
Programmable controller
Cycle time unit CPU monitoring function Number of registered word blocks
Transmission Number of registered bit blocks
Subcommand Cycle time method CPU error monitoring
30H 06H 00H 00H 01H 1EH 00H 01H 00H 02H 01H 01H
Word device registration (First point) Word device registration (Second point)
Monitoring start Number of Monitoring Monitoring Monitoring start Number of Monitoring Monitoring
device registered points condition condition value device registered points condition condition value
00H 00H 00H A8H 04H 00H 00H 00H 00H 00H 00H 10H 00H B4H 08H 00H 00H 00H 00H 00H
D0 to D3 W100 to W107
00H 00H 00H 90H 02H 00H 00H 00H 00H 00H 00H 00H 00H 01H 01H 00H 05H 00H 01H 00H
M0 to M31
(Response data)
(1) (2)
00H 00H 00H A8H 04H 00H 00H 00H 00H 90H 02H 00H
00H 00H 00H 01H 01H 00H 01H 00H 00H 00H
In the figure (1) and (2), set the value to "Binary code" in the tables of "Device data" of each response data.
The order of device data differ depending on the setting of "Word/byte units designation" in Engineering tool.
0 6 3 0 0 0 0 0 0 1 0 0 1 E 0 2 0 0 0 2 0 1 0 1
30H 36H 33H 30H 30H 30H 30H 30H 30H 31H 30H 30H 31H 45H 30H 32H 30H 30H 30H 32H 30H 31H 30H 31H
D * 0 0 0 0 0 0 0 0 0 4 0 0 0 1 0 0 6 3
44H 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 34H 30H 30H 30H 31H 30H 30H 36H 33H
D0 to D3 D0=99
W * 0 0 0 1 0 0 0 0 0 8 0 0 0 2 0 0 0 0
13
57H 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 38H 30H 30H 30H 32H 30H 30H 30H 30H
M * 0 0 0 0 0 0 0 0 0 2 0 0 0 2 0 0 0 0
4DH 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 32H 30H 30H 30H 32H 30H 30H 30H 30H
M0 to M31 M0OFF
0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 5 0 0 0 1
30H 31H 30H 30H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 35H 30H 30H 30H 31H
(Response data)
When the condition (D0 = 99) of word device registration (first point) is established
Programmable Number Number
Number of
Fixed value controller CPU of registered of registered CPU error
monitoring function word blocks bit blocks monitoring Monitoring start device registered points Device data
2 1 0 2 0 2 0 1 0 0 0 0 D * 0 0 0 0 0 0 0 0 0 4 (1)
32H 31H 30H 32H 30H 32H 30H 31H 30H 30H 30H 30H 44H 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 34H
2 1 0 2 0 2 0 0 0 1 0 M * 0 0 0 0 0 0 0 0 0 2 (2)
32H 31H 30H 32H 30H 32H 30H 30H 30H 31H 30H 30H 4DH 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 32H
When the condition of CPU error monitoring is established(Module warning being generated)
Programmable Number Number
Fixed value controller CPU of registered of registered CPU error Fixed value Device data
monitoring function word blocks bit blocks monitoring
2 1 0 2 0 2 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1
32H 31H 30H 32H 30H 32H 30H 30H 30H 30H 30H 31H 30H 31H 30H 30H 30H 30H 30H 30H 30H 30H 30H 32H 30H 30H 30H 32H
In the figure (1) and (2), set the value of "ASCII Code" in the table of "Device data" of each response data.
The order of device data differ depending on the setting of "Word/byte units designation" in Engineering tool.
30H 06H 00H 00H 01H 1EH 00H 02H 00H 02H 01H 01H
Word device registration (first point) Word device registration (second point)
Monitoring Number of Monitoring Monitoring Monitoring Number of Monitoring Monitoring
start device registered points condition condition value start device registered points condition condition value
00H 00H 00H A8H 04H 00H 01H 00H 63H 00H 00H 10H 00H B4H 08H 00H 02H 00H 00H 00H
00H 00H 00H 90H 02H 00H 02H 00H 00H 00H 00H 00H 00H 01H 01H 00H 05H 00H 01H 00H
M0 to M31 M0OFF
(Response data)
When the condition (D0 = 99) of word device registration (first point) is established
Number of registered word blocks
Programmable Number of registered bit blocks
controller CPU
monitoring function CPU error monitoring Number of
Monitoring start device registered points Device data
(1)
02H 21H 02H 01H 00H 00H 00H 00H 00H A8H 04H 00H
When the condition (M0 OFF) of bit device registration (first point) is established
Number of registered word blocks
Programmable Number of registered bit blocks
controller CPU
monitoring function CPU error monitoring Number of
Monitoring start device registered points Device data
(2)
02H 21H 02H 00H 01H 00H 00H 00H 00H 90H 02H 00H
When the condition of CPU error monitoring is established(Module warning being generated)
Number of registered word blocks
Programmable Number of registered bit blocks
controller CPU
monitoring function CPU error monitoring
Fixed value Device data
02H 21H 02H 00H 00H 01H 00H 00H 00H 01H 01H 00H 01H 00H 00H 00H
In the figure (1) and (2), set the value of "Binary code" in the tables of "Device data" of each response data.
The order of device data differ depending on the setting of "Word/byte units designation" in Engineering tool.
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.
0 6 3 1
30H 36H 33H 31H 31H 06H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
0 6 3 1 0 0 0 0
30H 36H 30H 31H 30H 30H 30H 30H
Subcommand
The command can only be used for C24 connected to the external device on 1:1 basis. It cannot be used via
network.
If the on-demand function is used with multidrop connection of 1:n station or m:n station, the on-demand data
will be collapsed and proper data is not sent.
The setting content can be checked and changed by using any of the following Engineering tools.
GX Works3 (Module parameter)
GX Works2, GX Configurator-SC
For details on the setting items and buffer memory, refer to the following manuals.
MELSEC iQ-R Serial Communication Module User's Manual (Application)
MELSEC-Q/L Serial Communication Module User's Manual (Application)
2. Execute the serial communication module dedicated instruction 'G (P). ONDEMAND'.
MELSEC iQ-R Programming Manual (Instructions, Standard Functions/Function Blocks)
MELSEC-Q/L Serial Communication Module User's Manual (Application)
2. Judge whether the received message is issued from the on-demand function by "PC No.".
For the message of on-demand function, 'PC No.' will be 'FE'. (Page 52 Network No., PC No.)
When sending on-demand data or response data, the timeout check is performed by send monitoring timer
(timer 2). if a timeout error occurs, change the send monitoring time (timer 2).
When C24 is receiving request message of other command from external device
C24 sends on-demand data before the response message to the external device is sent.
Full-duplex communication: C24 sends on-demand data during the request message from the external device is being
received.
CPU module
G(P).ONDEMAND
Half-duplex communication: C24 sends on-demand data after the request message from the external device has been
received.
CPU module
G(P).ONDEMAND
CPU module
G(P).ONDEMAND
When using 2C/3C/4C frame (Format 1 to 4), register the message format of each format in the user frame.
Page 29 Message Formats of Each Protocol
For the user frames, refer to the following manuals.
MELSEC iQ-R Serial Communication Module User's Manual (Application)
MELSEC-Q/L Serial Communication Module User's Manual (Application)
Message format 13
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.
Response data
01H 21H
Transmission data
The transmission data specified in the dedicated instruction 'G(P).ONDEMAND' is stored.
The order of data differ depending on the setting of "Word/byte units designation" in Engineering tool.
For byte units, regard the word data as 2-byte data and send numerical values from lower byte (L: bits 0 to 7).
Ex.
When transmitting 2-word data (1234H, 5678H)
Word unit (0)
ASCII code Binary code
1 2 3 4 5 6 7 8
31H 32H 33H 34H 35H 36H 37H 38H 12H 34H 56H 78H
3 4 1 2 7 8 5 6
33H 34H 31H 32H 37H 38H 35H 36H 34H 12H 78H 56H
Transmission data
1 2 3 4 5 6 7 8
31H 32H 33H 34H 35H 36H 37H 48H
This part explains the specifications when using MELSEC-QnA series devices.
285
14 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.
QnA-compatible frame
The following frames have compatibility with the message protocol and the message format for MELSEC-QnA series.
Frame Compatible message format Accessible range
4C frame Dedicated protocols for MELSEC-QnA series serial communication modules Page 45 Accessible range of 4C frame
(QnA extension frame)
3C frame Dedicated protocols for MELSEC-QnA series serial communication modules Page 46 Accessible range of 3C frame
(QnA frame)
2C frame Dedicated protocols for MELSEC-QnA series serial communication modules Page 46 Accessible range of 2C frame
(QnA simplified frame)
3E frame Message formats for MELSEC-QnA series Ethernet interface modules Page 48 Accessible range of 4E frame, 3E frame
*1 QnA series Ethernet interface modules can be relayed between networks when using the module with the function version B or later.
Check the function version with the production date printed on the rating plate on the side of the module.
(Manufactured date: Year (lower two digits), Month (two digits), function version (one digit))
14.3 Considerations
The following shows the considerations when using MELSEC-QnA series devices.
There are some commands that cannot be executed while the CPU module is in RUN. Refer to the following
section.
Page 463 Applicable Commands for Online Program Change
For the number of points processed per communication, refer to the following section.
Page 465 Number of Processing per One Communication
File control
Function Command Description Subcommand
Read file Without header 0201 Reads a file list (file name, last edit date and time, file size). 0000
information statement
table With header 0202 Reads a file list (header statement attached to a file, file name, last edit date 0000
statement and time, file size).
Read file presence 0203 Reads existence of specified file, file No., and file size. 0000
(Search file)
Read file No. usage status 0204 Reads file No. usage status. 0000
Read file 0206 Reads content of file. 0000
Lock file 0808 Locks the file in order to prevent the file contents from being edited from other 0001 Register
devices while accessing the specified file.
Unlocks the file. 0000 Deregister
Create new file (Register file 1202 Secures the file area for the specified file name. 0000
name)
Write to file 1203 Writes the specified data (n byte) to a file. 0000 Arbitrary data
Writes the specified data (1 word) for a file for n bytes. 0001 Identical data
(FILL)
Modify file information 1204 Modifies the date and time of the last edit of the file. 0000 Modify last
edit date and
time
Modifies the file name and file size. 0001 File name,
size
Modifies the file name, file size, and last edit date and time. 0002 Batch modify
Delete file 1205 Deletes a file. 0000
Copy file 1206 Copies a file. 0000
A cluster is the minimum unit when files are stored to drive memory (such as memory card) and the memory
containing data is managed by FAT*1.
The size of one cluster of each QnACPU drive is as follows:
Internal memory : 4096 bytes
Other memory : 512 bytes
For example, if a data less than 512 bytes is written to a memory card, one cluster of drive memory is used to
write the data.
If 513 to 1024 bytes of data are written, two clusters of drive memory is used to write the data. 15
*1 An abbreviation for 'File Allocation Table'. A table used by the operating system to manage the location of files on the drive memory.
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.
When a keyword has already registered, specify the same keyword.
Ex.
When the registered keyword is '012345'
Values converted to binary code Transmission order
01H, 23H, 45H 45H, 23H, 01H
Ex.
When the keyword registered is '012300'
Values converted to binary code Transmission order
01H, 23H, 00H 00H, 23H, 01H
Setting flag
A data that indicates whether the keyword registered to the specified drive is specified to the keyword above.
Cluster No.
A data to specify the first cluster No. within the range of drive memory whose usage status is to be read. Specify the data in
multiples of 16 (00H, 10H, 20H... in hexadecimal notation). 15
Data communication in ASCII code
Convert the cluster No. which is higher than '00H' to 4-digit (hexadecimal) ASCII code, and send it from the upper digits.
Specify the number of clusters to be read within the range of the usable memory size after formatting the drive
to be read from.
Number of clusters = Usable memory size/Number of bytes in one cluster (4096 or 512)
For the number of bytes in one cluster, refer to the following section.
Page 289 Defragment drive memory
Ex.
0: Empty, 1: Used
Cluster b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 Values for 16 bits
First 16 clusters 0*1 0 1 1 1 1 0 0 1 1 1 1 1 1 1 1*2 3CFFH
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 003FH
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000H
Last 16 clusters 0*3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000H
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.
Capacity of consecutive free area (size) = number of consecutive free cluster 4096 or 512 (byte)
When the consecutive area is insufficient, perform the following memory defragmentation.
Page 295 Defragment drive memory (command: 1207)
Message format
The following shows the message format of the request data and response data of the command.
Request data
ASCII
Number of
0 2 0 5 Subcommand Keyword Setting flag Drive name Cluster No. clusters to
30H 32H 30H 35H be read
Binary
15
Setting Cluster Number
Subcommand Keyword Drive name of clusters
flag No.
to be read
05H 02H
Response data
The free cluster table is stored. The order of data differs depending on the ASCII code or binary code.
Page 292 Free cluster table
0 2 0 5
30H 32H 30H 35H 05H 02H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Keyword
Set whether to allow/prohibit access to a drive. (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
Read the usage status of the drive memory, and specify the QnACPU drive to be defragmented. (Page 291 Drive name)
Cluster No.
Specify the first cluster No. within the range of drive memory whose usage status is to be read. (Page 291 Cluster No.)
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.
Subcommand Keyword Setting flag Drive name Cluster No. Number of clusters to be read
0 2 0 5 0 0 0 0 0 1 2 3 4 5 0 1 0 0 0 1 0 0 0 0 0 0 2 0
30H 32H 30H 35H 30H 30H 30H 30H 30H 31H 32H 33H 34H 35H 30H 31H 30H 30H 30H 31H 30H 30H 30H 30H 30H 30H 32H 30H
(Response data)
Setting
flag
Cluster No.
Number of
Subcommand Keyword Drive name clusters to be read
05H 02H 00H 00H 01H 45H 23H 01H 01H 00H 00H 00H 20H 00H
(Response data)
Message format
The following shows the message format of the request data and response data of the command.
Request data
ASCII
Binary
Setting
Subcommand Keyword Drive name
flag
Response data
There is no response data for this command.
15
In the following cases, an error occurs and an abnormal response will be returned.
When QnACPU is protected by system protection.
When the keyword registered in the specified drive is not specified.
When the drive memory is faulty (defective cluster, etc.).
When the subdirectory is created by using an IC memory card read/writer.
When the file is not stored in one consecutive area by using an IC memory card read/writer.
1 2 0 7
31H 32H 30H 37H 07H 12H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
Keyword
Set whether to allow/prohibit access to a drive. (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
Read the usage status of the drive memory, and specify the QnACPU drive to be defragmented. (Page 291 Drive name)
1 2 0 7 0 0 0 0 0 1 2 3 4 0 0 1 0 0 0 1
31H 32H 30H 37H 30H 30H 30H 30H 30H 31H 32H 33H 34H 30H 30H 31H 30H 30H 30H 31H
Setting
flag
07H 12H 00H 00H 01H 40H 23H 01H 01H 00H
Editing files
The files read from CPU module are used for storage on an external device.
The external device cannot edit the content of a file read from CPU module.
Data read/write
When the data of the entire file size cannot be read/written in a single communication, use several communications to read/
write the data.
The file size can be verified using the following functions. 15
Function Reference
Read file information table function Page 308 Read file information table without header statement (command: 0201)
Page 311 Read file information table with header statement (command: 0202)
Read file presence function Page 314 Read file presence (Search file) (command: 0203)
System protection
If the CPU module is protected by system protection when using the following functions, an error occurs and an abnormal
completion message is returned.
Function Reference
Create new file (Register file name) Page 323 Create new file (Register file name) (command: 1202)
Write to file Page 325 Write to file (command: 1203)
Delete file Page 335 Delete file (command: 1205)
Copy file Page 337 Copy file (command: 1206)
Modify file information (date created, attribute) Page 329 Modify file information (command: 1204)
Registration of keyword
When registering a keyword in the file, keep the registered keyword.
When accessing the following files, specifying the registered keyword when opening or reading/writing to that file is required.
Parameter file
Program files
File attribute
The file attribute is valid only when the following functions are used. For other commands, the attribute is handled as a
dummy.
Function Reference
Read file information table function Page 308 Read file information table without header statement (command: 0201)
Page 311 Read file information table with header statement (command: 0202)
Create new file (Register file name) Page 323 Create new file (Register file name) (command: 1202)
Modify file information (date created, attribute) Page 329 Modify file information (command: 1204)
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 290 Keyword
Setting flag
A data that indicates whether the keyword registered to the specified drive is specified to the keyword above.
For the content of the data, refer to the following section.
Page 290 Setting flag
File No.
A value to specify the registered number when a file specified by file name and extension is registered (written) to CPU
module, or the registration number when registering to CPU module.
Ex.
1FH
ASCII code Binary code
0 0 1 F
30H 30H 31H 46H 1FH 00H
The file No. of the registered file can be checked using the following functions.
Page 308 Read file information table without header statement (command: 0201)
Page 311 Read file information table with header statement (command: 0202)
Page 314 Read file presence (Search file) (command: 0203)
The unused file No. at registering new file can be checked using the following function.
Page 316 Read file No. usage status (command: 0204)
Files not described in the user's manual (function explanation, program fundamentals) of the CPU module
used may also be shown for file control. Do not access them since they are for the system use.
Ex.
When the file name is 'ABC.QPG'
File name: ABC QPG ( indicates a space)
Attribute
Add an attribute a file.
Specify the attribute with 1 byte.
Specify '20H' as an attribute value (disk files that can be read/written) at a new file creation and when a dummy is specified.
When the attribute of the created file is not changed, the attribute of readable/writable disk file will be attached.
The attributes for the existing files can be checked using the following functions.
Page 308 Read file information table without header statement (command: 0201)
Page 311 Read file information table with header statement (command: 0202)
The attribute of the created files can be changed between '01H' (Read Only file) '20H' (readable/writable
disk file).
Page 329 Modify file information (command: 1204)
Ex.
April 1st, 2010
0 0 1 1 1 1 0 0 1 0 0 0 0 0 0 1
3 C 8 1
33H 43H 38H 31H 81H 3CH
Ex.
When 20:50:58
1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 1
A 6 5 D
41H 36H 35H 44H 5DH A6H
Ex.
When the file size is 7168 bytes
ASCII code Binary code
0 0 0 0 1 C 0 0
30H 30H 30H 30H 31H 43H 30H 30H 00H 1CH 00H 00H
Header statement
A header statement given to the file specified by Engineering tool supporting QnACPU (up to 32 characters).
Ex.
The header statement at the registration is '1 line-PC5'
The header statement becomes '1 line-PC5...' , and is sequentially sent from '1'. (: indicating a space.)
Ex.
The header statement at registration is '1 line-PC5'
The header statement becomes 31H, 20H, 6CH, 69H, 6EH, 65H, 2DH, 50H, 43H, 35H, 20H, 20H..., and is sequentially sent
from 31H.
Offset address
A data to specify the start address of the file range for which data is read and written.
Specify the address (one address/one byte) from the head (offset address: 0H) of each file with an even number.
Read data, write data (for batch read and batch write functions)
A data read from or to be written to the file in the CPU module.
Data order
When reading data: Store the data to the external device without changing the order of data read from the CPU module.
When writing data: Specify the data without changing the order of data read from CPU module.
Capacity
A data to reserve the file area on the specified disk when registering a new file. Specify the data in the number of bytes.
A new file with the same contents as the existing file can be registered from an external device.
The size of the relevant existing file must be checked using the read file information table function.
Page 308 Read file information table without header statement (command: 0201)
Page 311 Read file information table with header statement (command: 0202)
Page 314 Read file presence (Search file) (command: 0203)
0 0 0 0
30H 30H 30H 30H 00H 00H
Modifying the file creation date and time (command: 1204, subcommand: 0000)
04H, 08H, 0CH, 14H, 18H, or 1CH can be specified with 16 bits.
Bit string b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Specification range 0 0 0 0 0 0 0 0 0 0 0 1/0 1/0 1/0 0 0
Modifying the file name and file size (command: 1204, subcommand: 0001)
01H, 02H, 03H, 20H, 21H, 22H, or 23H can be specified with 16 bits.
Bit string b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Specification range 0 0 0 0 0 0 0 0 0 0 1/0 0 0 0 1/0 1/0
Ex.
File No. usage
0: Not used, 1: Used
Bit string b7 b6 b5 b4 b3 b2 b1 b0 Values for 8 bits
*1 *2
1st byte 1 1 0 1 0 0 1 1 D3H
2nd byte 1 0 1 1 1 0 0 1 B9H
3rd byte 0 1 1 1 1 0 1 0 7AH
4th byte 1 0 0 1 0 1 1 0 96H
5th byte 0 1 1 1 0 0 0 1 71H
31st byte 0 0 0 0 0 0 0 0 FFH
32nd byte 0*3 0 0 0 0 0 0 0 FFH
Specified value and contents of the file lock mode (Other values cannot be specified.)
Specified value Content to be specified
0000H Unlock the locked file normally.
0002H Unlock the locked file forcefully.
15
Store the following file information of the file (for storage) read to an external device.
File No.
File name and file attribute
File size
3. Before changing the file size, change the QnACPU status to STOP. *1
4. Delete an unnecessary file when free area is insufficient. Or, increase consecutive free area.*1
Page 307 Procedure for deleting files
Page 295 Defragment drive memory (command: 1207)
10. Check the file No. of the created file only when creating a new file.
Page 314 Read file presence (Search file) (command: 0203)
*1 Use the remote STOP function (Page 175 Remote STOP (command: 1002)) to place the QnACPU into the STOP status before
defragmenting the memory. After the completion of the processing of this section, the remote RUN function (Page 173 Remote RUN
(command: 1001)) can be used to set the QnACPU to the RUN status.
2. Delete a file. *1
Page 335 Delete file (command: 1205)
*1 Determine the file deletion timing for the entire system, including the QnACPU and related devices.
Message format
The following shows the message format of the request data and response data of the command.
Request data
ASCII
Subcommand Keyword Setting flag Drive name File No. Number of requested files
Binary
Setting Number of
Subcommand flag Keyword Drive name File No. requested files
Response data
0 2 0 1
30H 32H 30H 31H 01H 02H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
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 298 Drive name, Drive No.)
File No.
A data to specify the registration number of files. (Page 298 File No.)
Specify within the following range.
1 File No. 256
File No.
This indicates the registration number of a file. (Page 298 File No.)
15
File name
Character string data of a file name. (Page 299 File name, extension, and attribute)
Extension
A character string data of extension of a file. (Page 299 File name, extension, and attribute)
Attribute
A data that indicates the file attribute (applicability of data read/write). (Page 299 File name, extension, and attribute)
File size
A data that indicates the capacity of the current file in number of bytes. (Page 301 File size)
The total number of registered files is the current total number of files registered in the specified drive.
When all the files are not registered within the specified file number range, the number of file information will
be the number of files registered in the specified range (number of file information to be returned).
Subcommand Keyword Setting flag Drive name File No. Number of requested files
(Response data)
Total number of Number of file
registered files information
File No. File name Extension Attribute Time of last update Date of last update File size
File No. File name Extension Attribute Time of last update Date of last update File size
Setting
flag File No.
Number of
Subcommand Keyword Drive name requested files
(Response data)
Total number of Number of file File information 1 (Information of file No. 10)
Last edit time File size
registered files information
File No. File name Extension Attribute Last edit date
File information 2 (Information of file No. 11) Last edit time File size
File No. File name Extension Attribute Last edit date
Message format
The following shows the message format of the request data and response data of the command.
Request data
ASCII
Number of
Subcommand Keyword Setting flag Drive name File No.
requested files
Binary
Setting Number of
Subcommand Keyword Drive name File No. requested
flag
files
Response data
15
Total number of Number of file Last edit Last edit File size Header File information
registered files information File No. File name Extension Attribute
time date statement (nth point)
0 2 0 2
30H 32H 30H 32H 02H 02H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
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 298 Drive name, Drive No.)
File No.
A data to specify the registration number of files. (Page 298 File No.)
Specify within the following range.
1 File No. 256
File No.
This indicates the registration number of a file. (Page 298 File No.)
File name
Character string data of a file name. (Page 299 File name, extension, and attribute)
Extension
A character string data of extension of a file. (Page 299 File name, extension, and attribute)
Attribute
A data that indicates the file attribute (applicability of data read/write). (Page 299 File name, extension, and attribute)
File size
A data that indicates the capacity of the current file in number of bytes. (Page 301 File size)
Header statement
The header statement attached to the file specified with Engineering tool. (Page 301 Header statement)
The total number of registered files is the current total number of files registered in the designated drive.
When all the files are not registered within the specified file number range, the number of file information will
be the number of files registered in the specified range (number of file information to be returned).
Subcommand Keyword Setting flag Drive name File No. Number of requested files
(Response data)
File No. File name Extension Attribute Last edit time Last edit date File size
15
(20 hours 50 minutes 58 seconds) (January 8, 1996)
Header statement (32 characters) File information 2 (Information of file No. 11)
(The order of data items is the same as that of file information 1.)
Setting
flag File No.
Number of
Subcommand Keyword Drive name requested files
(Response data)
Total number of Number of file File information 1 (Information of file No. 10) File size
Last edit time
registered files information
File No. File name Extension Attribute Last edit date
Header statement (32 characters) File information 2 (Information of file No. 11)
(The order of data items is the same as that of file information 1.)
Message format
Request data
ASCII
Subcommand Keyword Setting flag Drive name File name Extension Attribute
Binary
Setting
Subcommand flag Keyword Drive name File name Extension Attribute
Response data
If the specified file does not exist, an error occurs and the end code at the occurrence of error is returned.
0 2 0 3
30H 32H 30H 33H 03H 02H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
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 298 Drive name, Drive No.)
File name
Character string data of a file name. (Page 299 File name, extension, and attribute)
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)
Handle the file attribute to be read as dummy data.
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.
Drive name: 1 (RAM area of memory card A)
File name: ABC12.QPG
Subcommand Keyword Setting flag Drive name File name Extension Attribute
(Response data)
15
Setting
flag
Subcommand Keyword Drive name File name Extension Attribute
(Response data)
Message format
Request data
ASCII
Binary
Setting
Subcommand Keyword Drive name
flag
Response data
The file No. of usage status is stored. (Page 304 File No. usage)
When a drive memory that cannot store maximum of 256 files is specified, the file No. of which file cannot be
stored (shortage) will be in use (the corresponding bit will be '1').
0 2 0 4
30H 32H 30H 34H 04H 02H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
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 298 Drive name, Drive No.)
(Response data)
Setting
flag
Subcommand Keyword Drive name
15
(Response data)
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.
Additionally, save the read data to the external device.
Check the file size with the following function.
Page 308 Read file information table without header statement (command: 0201)
Page 311 Read file information table with header statement (command: 0202)
Page 314 Read file presence (Search file) (command: 0203)
Message format
Request data
ASCII
Binary
Setting
Subcommand Keyword Drive name File No.
flag
Offset Number of
File name Extension Attribute
address bytes read
Response data
The read data are stored.
Page 302 Read data, write data (for batch read and batch write functions)
0 2 0 6
30H 32H 30H 36H 06H 02H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
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 298 Drive name, Drive No.)
File No. 15
A data to specify the registration number of files. (Page 298 File No.)
Specify within the following range.
1 File No. 256
File name
Character string data of a file name. (Page 299 File name, extension, and attribute)
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)
Handle the file attribute to be read as dummy data.
Offset address
A data to specify the start address of the range from which data is read to a file. (Page 301 Offset address)
Specify within the following range.
0 Address (specify with even address) (File size - 1)
(Response data)
Setting
flag File No.
Subcommand Keyword Drive name File name
Offset address
Extension Attribute Number of bytes read
(Response data)
Restarting QnACPU (such as resetting CPU module) with the file lock registered results in the file lock
deregistered state.
Message format
Request data
Command Subcommand File lock mode Drive name File No. File name Extension Attribute
Response data
There is no response data for this command.
0 8 0 8
15
30H 38H 30H 38H 08H 08H
Subcommand
Register
ASCII code Binary code
0 0 0 1
30H 30H 30H 31H 01H 00H
Deregister
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
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.)
File No.
A data to specify the registration number of files. (Page 298 File No.)
File name
Character string data of a file name. (Page 299 File name, extension, and attribute)
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)
The attribute assigned by a new file creation, etc. is valid as the attribute of the file that will be locked and unlocked. When
registering and deregistering file lock, handle the file attribute as dummy data.
File lock
mode File No.
A new file can be created on the specified drive memory within the size of consecutive unused clusters.
Creating a new file considering the rest of the capacity for future use is recommended.
The QnACPU management time is registered as the last edit date and time to a new file created using this
function.
Message format
Request data
ASCII
Subcommand Keyword Setting flag Drive name Fixed value Fixed value
Binary
Subcommand
Setting Keyword Drive name Fixed value Fixed value
flag
Fixed
File name Extension Attribute Size
value
Response data
File No. is stored. (Page 298 File No.)
1 2 0 2
31H 32H 30H 32H 02H 12H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
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)
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 299 File name, extension, and attribute)
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)
Specify '20H' (readable/writable disk file) for the attribute of a new file.
Capacity
A data to reserve the file area on the specified disk when registering a new file. It is specified with the number of bytes.
(Page 302 Capacity)
Communication example
Read the data written in the specified file under the following condition.
Drive name: 1 (RAM area of memory card A)
File name: ABC12.QPG
Capacity: 172 bytes
(Response data)
0 0 0 A
30H 30H 30H 41H
Subcommand
Setting
Command flag Keyword Drive name Fixed value Fixed value File name Extension
02H 12H 00H 00H 01H 00H 23H 01H 01H 00H 00H 00H 00H 00H 41H 42H 43H 31H 32H 20H 20H 20H 51H 50H 47H
(Response data)
A0H 00H
The maximum number of data bytes to be read per one time is static.
For batch writing, all the data read from QnACPU and stored to an external device must be written to the
specified file with adjusting the offset address and number of bytes written and divide them for several
times.
For writing identical data, adjust the offset address and number of bytes written, and divide them and write
arbitrary 1 word data within the range of specified file for several times. Note that, if the data size to be
written remains 1 byte, the numerical value of upper bytes of 1 word data (bit 8 to 15) is not written since the
data write is performed in byte units.
Message format
Request data
ASCII
Subcommand Keyword Setting flag Drive name File No. File name Extension Attribute
15
Binary
Setting
Subcommand Keyword Drive name File No. File name Extension Attribute
flag
Response data
There is no response data for this command.
An error occurs If one of the following files is specified while the QnACPU is in RUN, and error end code will
be returned.
Parameter file
Currently executing file in the built-in RAM (drive name: 00H)
1 2 0 3
31H 32H 30H 33H 03H 12H
Subcommand
Type ASCII code Binary code
Batch write
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 0 1
30H 30H 30H 31H 01H 00H
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 298 Drive name, Drive No.)
File No.
A data to specify the registration number of files. (Page 298 File No.)
File name
Character string data of a file name. (Page 299 File name, extension, and attribute)
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)
The attribute assigned by a new file creation, etc. is valid as the attribute of the file to which data is written. When writing data,
handle the attribute as dummy data.
Offset address
A data which specifies the start address of the range in which data is written to a file. (Page 301 Offset address)
Specify within the following range.
0 Address (File size - 1)
Writing data to file of which drive name is '00H' (built-in RAM): Specify with multiples of 4 (0, 4, 8, ... in decimal notation).
Writing to the file of which drive name is other than '00H': Specify with even number (for decimal data, 0, 2, 4, 6, 8, ...).
Write data
Data to be written to a file. (Page 302 Read data, write data (for batch read and batch write functions))
15
Write data (For 416 bytes)
Setting
flag File No.
Subcommand Keyword Drive name File name
File name Extension Attribute Offset address Number of bytes written Write data
Setting
flag File No.
Subcommand Keyword Drive name File name
Message format
Request data
Modify file creation date and time (subcommand: 0000)
ASCII
Subcommand Keyword Setting flag Drive name File No. File name Extension Attribute
Binary
15
pattern time date
ASCII
Binary
The size can be modified only while the QnACPU is in STOP. A consecutive free area of the specified size is
necessary on the specified drive. The free area can be checked by reading memory usage status shown in
the following section.
Page 293 Read drive memory usage status (command: 0205)
ASCII
Binary
Response data
There is no response data for this command.
An error occurs If one of the following files is specified while the QnACPU is in RUN, and error end code will
be returned.
Parameter file
Currently executing file in the built-in RAM (drive name: 00H)
1 2 0 4
31H 32H 30H 34H 04H 12H
Subcommand
Type ASCII code Binary code
Modify file creation date and time
0 0 0 0
30H 30H 30H 30H 00H 00H
0 0 0 1
30H 30H 30H 31H 01H 00H
0 0 0 2
30H 30H 30H 32H 02H 00H
Keyword 15
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 298 Drive name, Drive No.)
File No.
A data to specify the registration number of files. (Page 298 File No.)
Specify within the following range.
1 File No. 256
File name
Character string data of a file name. (Page 299 File name, extension, and attribute)
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)
The attribute can only be modified between 01H (read only file) 20H (read/write enabled file)
Modification pattern
A data to specify which information is to modify when modifying information (file name, size, created date and time) of the
existing file. (Page 303 Modification pattern (for changing file name and file size))
File size
A data that indicates the capacity of the current file in number of bytes. (Page 301 File size)
Fixed value
Send '0000' (at the time of ASCII code) or 0000H (at the time of binary code). (Page 303 Fixed value)
File name Extension Attribute Modification pattern Last edit time Last edit date
Setting
flag File No.
Attribute
(Before modification)
Extension
File name (Before modification) Modification pattern File name (After modification)
(Before modification)
Attribute
15
(After modification)
Extension
(After modification) File size Fixed value
Setting
flag File No.
Subcommand Keyword Drive name
Setting
flag File No.
Subcommand Keyword Drive name
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.
Program file (.QPG)
Parameter file (.QPA)
Boot setting file (.QBT)
Message format
Request data
ASCII
Subcommand Keyword Setting flag Drive name File No. File name Extension Attribute
Binary
15
Setting Drive
Subcommand flag Keyword File No. File name Extension Attribute
name
Response data
There is no response data for this command.
1 2 0 5
31H 32H 30H 35H 05H 12H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
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 298 Drive name, Drive No.)
File No.
A data to specify the registration number of files. (Page 298 File No.)
File name
Character string data of a file name. (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.
Drive name: 1 (RAM area of memory card A)
File No.: 1
File name: ABC12.QPG
Setting
flag File No.
Subcommand Keyword Drive name
Message format
Request data
ASCII
Subcommand
Number
Keyword Setting flag Drive name File No. File name Extension Attribute Offset address of bytes Copy mode
read
Copy source
Keyword Setting flag Drive name File No. File name Extension Attribute Offset address
15
Copy destination
Number
Setting File Offset Copy
Subcommand Keyword Drive File No. Extension Attribute of bytes
flag name name address mode
read
Copy source
Copy destination
Response data
There is no response data for this command.
An error occurs If one of the following files is specified while the QnACPU is in RUN, and error end code will
be returned.
Parameter file
Currently executing file in the built-in RAM (drive name: 00H)
1 2 0 6
31H 32H 30H 36H 06H 12H
Subcommand
ASCII code Binary code
0 0 0 0
30H 30H 30H 30H 00H 00H
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 298 Drive name, Drive No.)
File No.
A data to specify the registration number of files. (Page 298 File No.)
File name
Character string data of a file name. (Page 299 File name, extension, and attribute)
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)
The attribute assigned by a new file creation, etc. is valid as the attribute of the source and destination files. When copying a
file, handle the attribute as dummy data.
Offset address
A data to specify the start address of the range from which data is read to a file. (Page 301 Offset address)
Specify within the following range.
Offset address: 0 Address (File size - 1)
Copy to the file whose drive name is '00H' (Built-in RAM): Specify with multiples of 4 (0, 4, 8, ... in decimal notation).
Copy to the file whose drive name is other than '00H': Specify with even number (for decimal data, 0, 2, 4, 6, 8, ...).
Copy mode
A data to specify whether to copy the last edit time and data of the source file to the target file at the completion of copying.
When the time and date are not copied, the QnACPU management time at a new file creation will remain. (Page 305
Copy mode)
Copy source
File name Extension Attribute Offset address Number of bytes read Copy mode
15
Copy source
Copy destination
Copy destination
Setting
flag File No.
Subcommand Keyword Drive name File name
Copy source
Offset
address
Copy destination
This part explains the specifications when using MELSEC-A series devices.
341
16 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.
A compatible frame
The following frames have compatibility with the message protocol and the message format for MELSEC-A series.
Frame Compatible message format Accessible range
1C frame Dedicated protocols for MELSEC-A series computer link modules Page 47 Accessible range of 1C frame
1E frame Message formats for MELSEC-A series Ethernet interface modules Page 49 Accessible range of 1E frame
16
Message format
Request message
Data by the format Access route Request data Data by the format
Station PC No.
Character area
No.
Station PC No.
No.
Setting data
Set the following items.
Item Description Reference
Data by format The message formats differ depending on the set format (Format 1 to Page 29 Message Formats of Each Protocol
Format 4).
Access route Station No. Specify the station to be connected from an external device. Page 50 Station No.
PC No. Specify the network module station No. of an access target. Page 52 Network No., PC No.
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 Reference
command common
command
Sym ASCII code Sym ASCII code
bol bol
Device memory read and write BR 42H, 52H JR 4AH, 52H Page 354 Batch read (bit units) (command: BR, JR)
WR 57H, 52H QR 51H, 52H Page 356 Batch read (word units) (command: WR, QR)
BW 42H, 57H JW 4AH, 57H Page 358 Batch write (bit units) (command: BW, JW)
WW 57H, 57H QW 51H, 57H Page 360 Batch write (word units) (command: WW, QW)
BT 42H, 54H JT 4AH, 54H Page 362 Test (random write) (bit units) (command: BT, JT)
WT 57H, 54H QT 51H, 54H Page 364 Test (random write) (word units) (command: WT, QT)
BM 42H, 4DH JM 4AH, 4DH Page 367 Register monitor data (bit units) (command: BM, JM)
WM 57H, 4DH QM 51H, 4DH Page 368 Register monitor data (word units) (command: WM, QM)
MB 4DH, 42H MJ 4DH, 4AH Page 369 Monitor (bit units) (command: MB, MJ)
MN 4DH, 4EH MQ 4DH, 51H Page 370 Monitor (word units) (command: MN, MQ)
Read and write extended file ER 45H. 52H Page 375 Batch read (command: ER)
register EW 45H, 57H Page 376 Batch write (command: EW)
NR 4EH, 52H Page 381 Direct read (command: NR)
NW 4EH, 57H Page 382 Direct write (command: NW)
ET 45H, 54H Page 377 Test (random write) (command: ET)
EM 45H, 4DH Page 379 Register monitor data (command: EM)
ME 4DH, 45H Page 380 Monitor (command: ME)
Read/write buffer memory of TR 54H, 52H Page 386 Batch read (command: TR)
special function module TW 54H, 57H Page 388 Batch write (command: TW)
Loopback test TT 54H, 54H Page 389 Loopback test (Command: TT)
Setting method
Use the commands by converting to 2-digit (hexadecimal) ASCII codes.
Ex.
Device memory batch read (BR) in bit unit
B R
42H 52H
Setting method
Specify the wait time within the range of 0 to 150 ms in 10 ms units.
Convert 0H to FH (0 to 15) to 1-digit (hexadecimal) ASCII codes regarding 10 ms as 1H.
Ex.
When the message wait time is 100 ms
If the following value is set to message wait in request message, after passing 100 ms or more, transmission of a response
message will be started.
A
41H
Character area
The content of the character areas differs depending on the command.
The character area of request data is equivalent to the character A area and the character C area of the dedicated protocols
for A series computer link module. The character are of response data is equivalent to the character B area of a dedicated
protocols.
Character area A: A data that C24 instructs the CPU module to perform the read request specified by command.
Character area B: A data that C24 returns to a request specified by a command.
Character area C: A data that C24 instructs the CPU module to perform the write request specified by command.
External device
Response message that can be abbreviated
Command Message wait (Normal completion)
Character ACK
ENQ
Request message area A
Transmission order Response message Character
Supported devices STX
area B
MELSEC
POWER
Q25HCPU
MODE
S
T
N
O
RUN
MO DE
SD
PRM
D LINK
RD
QJ71C24
CH1. CH2.
QJ71E71
RUN
INIT.
ERR.
COM.ERR
(Normal completion : The
Error code
ERR.
ERR.
USER
BAT.
CH1.
SD RD
10BASE-T
or
BOOT
RS-232
CH.2
SDA
10BASE
Response message NAK
(Abnormal completion)
IN SG 1
PULL 2
SDB
USB (FG) 3
RDA
4
OUT
(FG)
5
RS-232 RDB
6
+12V
RS-422 12G
MITSUBISHI /485 7
External device
Character
Request message ENQ area C
RS-232
Response message
CH.2 10BASE
NAK
PULL
USB
IN
SDA
SG
SDB
(FG)
2
1
(Abnormal completion)
3
RDA
4
OUT
(FG)
5
RS-232 RDB
6
+12V
RS-422 12G
MITSUBISHI /485 7
Error code
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.
MELSEC iQ-R Serial Communication Module User's Manual (Application)
Q Corresponding Serial Communication Module User's Manual (Basic)
MELSEC-L Serial Communication Module User's Manual (Basic)
Setting method
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
For error code 05H
0 5
30H 35H
*1 Use the dedicated commands for extended registers to read/write extended file registers from/to ACPU.
*2 The devices for the five types of commands (BM, JM, WM, QM, EM) for registering monitor data can be registered simultaneously in
C24 for each interface.
When accessing modules other than ACPU, there is a restriction for the accessible device range.
Page 350 Considerations when accessing devices other than ACPU module
To read and write the extended file register, use the commands dedicated to the extended file register.
Page 371 Read and Write Extended File Register
Considerations
The considerations when reading/writing device memory using the commands described in this section.
Timer, counter
Device Device
code Device number code Device number
Ex.
Current value of input (X) 40 and timer (T) 10
Device ACPU common command AnA/AnUCPU common command
Input (X) 40
X 0 0 4 0 X 0 0 0 0 4 0
58H 30H 30H 34H 30H 58H 30H 30H 30H 30H 34H 30H
T S 0 1 0 T S 0 0 0 1 0
54H 4EH 30H 31H 30H 54H 4EH 30H 30H 30H 31H 30H
Do not write data to the devices which cannot be written in the range of the special relays (M9000 to M9255)
and special registers (D9000 to D9255). For details on the special relays and special registers, refer to
manual of ACPU to be accessed.
The range of M, L, and S devices can be specified for MELSEC-A series CPU module, however, if the range
of M is specified by L or S or vice versa, they are processed equivalently.
For word unit specification, the head device number of bit device must be specified in multiple of 16.
For special relay M9000 or later, (9000 + multiple of 16) can be specified.
Ex.
5 points, 20 points, 256 points
Number of device points ASCII code
5 points
0 5
30H 35H
20 points
1 4
31H 34H
256 points
0 0
30H 30H
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
The value of read device is stored in bit units. (Page 74 Read data, write data)
B R J R
42H 52H 4AH 52H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Head device
Specify the head device. (Page 351 Device codes, device numbers)
B R A X 0 0 4 0 0 5
42H 52H 41H 58H 30H 30H 34H 30H 30H 35H
J R A X 0 0 0 0 4 0 0 5
4AH 52H 41H 58H 30H 30H 30H 30H 34H 30H 30H 35H
(Response data)
Data read
0 1 1 0 1
30H 31H 31H 30H 31H
(X40) (X41) (X42) (X43) (X44)
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of device
Command Message wait Head device points
(Number of words)
Response data
The value of read device is stored in word units. (Page 74 Read data, write data)
W R Q R
57H 52H 51H 52H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Head device
Specify the head device. (Page 351 Device codes, device numbers)
When specifying bit devices, set the head device No. in multiples of 16 (0, 16, ... in decimal notation).
W R 0 X 0 0 4 0 0 2
57H 52H 30H 58H 30H 30H 34H 30H 30H 32H
Q R 0 X 0 0 0 0 4 0 0 2
51H 52H 30H 58H 30H 30H 30H 30H 34H 30H 30H 32H
(Response data)
Data read
W R 0 T N 1 2 3 0 2
57H 52H 30H 54H 4EH 31H 32H 33H 30H 32H
Q R 0 T N 0 0 1 2 3 0 2
51H 52H 30H 54H 4EH 30H 30H 31H 32H 33H 30H 32H
(Response data)
Data read
7 B C 9 1 2 3 4
37H 42H 43H 39H 31H 32H 33H 34H
(T123) (T124)
Message format
The following shows the message format of the request data and response data of the command.
Request data
ACPU common command
Command Message wait Head device Number of Write data for the number of
device points device points
Response data
There is no response data for this command.
B W J W
42H 57H 4AH 57H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Head device
Specify the head device. (Page 351 Device codes, device numbers)
B W 0 M 0 9 0 3 0 5 0 1 1 0 1
42H 57H 30H 4DH 30H 39H 30H 33H 30H 35H 30H 30H 30H 31H 30H
(M903) (M904) (M905) (M906) (M907)
J W 0 M 0 0 0 9 0 3 0 5 0 1 1 0 1
4AH 57H 30H 4DH 30H 30H 30H 39H 30H 33H 30H 35H 30H 30H 30H 31H 30H
(M903) (M904) (M905) (M906) (M907)
Message format
The following shows the message format of the request data and response data of the command.
Request data
Command Message wait Head device Number of Write data for the number of
device points device points
Response data
There is no response data for this command.
W W Q W
57H 57H 51H 57H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Head device
Specify the head device. (Page 351 Device codes, device numbers)
When specifying bit devices, set the head device No. in multiples of 16 (0, 16, ... in decimal notation).
W W 0 M 0 6 4 0 0 2 2 3 4 7 A B 9 6
57H 57H 30H 4DH 30H 36H 34H 30H 30H 32H 32H 33H 34H 37H 41H 42H 39H 36H
(M671) to (M656)
0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 1
(M655) to (M640)
Q W 0 M 0 0 0 6 4 0 0 2 2 3 4 7 A B 9 6
51H 57H 30H 4DH 30H 30H 30H 36H 34H 30H 30H 32H 32H 33H 34H 37H 41H 42H 39H 36H
(M671) to (M656)
0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 1
(M655) to (M640)
W W 0 D 0 0 0 0 0 2 1 2 3 4 A C D 7
57H 57H 30H 44H 30H 30H 30H 30H 30H 32H 31H 32H 33H 34H 41H 43H 44H 37H
(D0) (D1)
Q W 0 D 0 0 0 0 0 0 0 2 1 2 3 4 A C D 7
51H 57H 30H 44H 30H 30H 30H 30H 30H 30H 30H 32H 31H 32H 33H 34H 41H 43H 44H 37H
(D0) (D1)
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
There is no response data for this command.
B T J T
42H 54H 4AH 54H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Device
Specify the device to test. (Page 351 Device codes, device numbers)
Set/Reset
0 (30H): Reset (OFF)
1 (31H): Set (ON)
B T 0 0 3 M 0 0 5 0 1 B 0 3 1 A 0 Y 0 0 2 F 1
42H 54H 30H 30H 33H 4DH 30H 30H 35H 30H 31H 42H 30H 33H 31H 41H 31H 59H 30H 30H 32H 46H 31H
J T 0 0 3 M 0 0 0 0 5 0 1 B 0 0 0 3 1 A 0
4AH 54H 30H 30H 33H 4DH 30H 30H 30H 30H 35H 30H 31H 42H 30H 30H 30H 33H 31H 41H 31H
Set/
Device reset
Y 0 0 0 0 2 F 1
59H 30H 30H 30H 30H 32H 46H 31H
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of Device Device
Write data Write data
Command Message wait device points (first point) (first point) (nth point) (nth point)
(n points)
Response data
There is no response data for this command.
W T Q T
57H 54H 51H 54H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Device
Specify the device to test. (Page 351 Device codes, device numbers)
Write data
Store 4-digit data per one device point. (Page 353 Read data, write data)
When specifying bit devices, set the head device No. in multiples of 16 (0, 16, ... in decimal notation).
W T 0 0 3 D 0 5 0 0 1 2 3 4 Y 0 1 0 0 B C A 9
57H 54H 30H 30H 33H 44H 30H 35H 30H 30H 31H 32H 33H 34H 59H 30H 31H 30H 30H 42H 43H 41H 39H
C N 1 0 0 0 0 6 4
43H 4EH 31H 30H 30H 30H 30H 36H 34H
1 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1
Q T 0 0 3 D 0 0 0 5 0 0 1 2 3 4 Y 0 0 0 1 0 0 B C A 9
51H 54H 30H 30H 33H 44H 30H 30H 30H 35H 30H 30H 31H 32H 33H 34H 59H 30H 30H 30H 31H 30H 30H 42H 43H 41H 39H
C N 0 0 1 0 0 0 0 6 4
43H 4EH 30H 30H 31H 30H 30H 30H 30H 36H 34H
1 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1
Monitoring procedure
1. Process the monitor data registration (Edit of commands for registration and transmission of device specification.)
ACPU common commands: BM, WM
AnA/AnUCPU common commands: JM, QM
4. If do not change the devices to be monitored, return to step 2, and repeat the process.
When monitoring data as the procedure shown above, the monitor data registration is required. If monitoring
data without registering the data, a protocol error occurs.
The content of registered monitor data are deleted when C24 is rebooted.
The devices can be registered for each command for bit units (BM or JM), word units (WM or QM), or the
extended file register (EM) in C24. (Monitoring extended file registerPage 378 Monitor (command: EM,
ME))
When registering device memory of the CPU module as a monitor data from more than one C24s on the
same station, the recently registered device memory will be available since the registration data is
overwritten.
Request data
Number of
Device Device
Command Message wait device points
(first point) (nth point)
(n points)
Command
ACPU common AnA/AnUCPU
common
B M J M
42H 4DH 4AH 4DH
Message wait: Specify the delayed time of the response transmission. (Page 347 Message wait)
Number of device points: Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper
digits.
Device: Specify the devices to be monitored. (Page 351 Device codes, device numbers)
Response data
There is no response data for this command.
Message wait
Number of
device points Device Device Device
B M 0 0 3 X 0 0 4 0 Y 0 0 6 0 T S 1 2 3
42H 4DH 30H 30H 33H 58H 30H 35H 34H 30H 59H 30H 30H 36H 30H 54H 53H 31H 32H 33H
Message wait
Number of
device points Device Device Device
J M 0 0 3 X 0 0 0 0 4 0 Y 0 0 0 0 6 0 T S 0 0 1 2 3
4AH 4DH 30H 30H 33H 58H 30H 30H 30H 30H 34H 30H 59H 30H 30H 30H 30H 36H 30H 54H 53H 30H 30H 31H 32H 33H
Request data
Number of
Device Device
Command Message wait device points
(first point) (nth point)
(n points)
Command
ACPU common AnA/AnUCPU common
W M Q M
57H 4DH 51H 4DH
Message wait: Specify the delayed time of the response transmission. (Page 347 Message wait)
Number of device points: Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper
digits.
Device: Specify the devices to be monitored. (Page 351 Device codes, device numbers)
Response data
There is no response data for this command.
Message wait
Number of
device points Device Device Device Device
W M 0 0 4 D 0 0 1 5 W 0 1 1 E T N 1 2 3 Y 0 0 6 0
57H 4DH 30H 30H 34H 44H 30H 30H 31H 35H 57H 30H 31H 31H 45H 54H 4EH 31H 32H 33H 59H 30H 30H 36H 30H
Message wait
Number of
device points Device Device Device
Q M 0 0 4 D 0 0 0 0 1 5 W 0 0 0 1 1 E T N 0 0 1 2 3
51H 4DH 30H 30H 34H 44H 30H 30H 30H 30H 31H 35H 57H 30H 30H 30H 31H 31H 45H 54H 4EH 30H 30H 31H 32H 33H
Device
Y 0 0 0 0 6 0
59H 30H 30H 30H 30H 36H 30H
Request data
Command
ACPU common AnA/AnUCPU common
M B M J
4DH 42H 4DH 4AH
Message wait: Specify the delayed time of the response transmission. (Page 347 Message wait)
Response data
The value of read device is stored in bit units. (Page 74 Read data, write data)
Communication example
Monitor bit devices specified with monitor data registration under the following conditions.
Message wait: 0 ms
Registered devices for monitoring: 3 points (3 bits) of contacts for X040, Y060 and T123.
(Request data)
When using MB (ACPU common command)
Message wait
M B 0
4DH 42H 30H
Message wait
M J 0
4DH 4AH 30H
(Response data)
1 0 1
31H 30H 31H
(X040) (Y060) (Contact of T123)
The bit device memory registered with WM command is monitored using MN command.
The bit device memory registered with QM command is monitored using MQ command.
Request data
Command
ACPU common AnA/AnUCPU common
M N M Q
4DH 4EH 4DH 51H
Message wait: Specify the delayed time of the response transmission. (Page 347 Message wait)
Response data
The value of read device is stored in word units. (Page 74 Read data, write data)
Communication example
Monitor bit devices or word devices specified with monitor data registration under the following conditions.
Message wait: 0 ms
Registered devices for monitoring: Current values of D15, W11E, T123, and 4 points (4 words) of Y060 to Y06F.
(Request data)
When using MN (ACPU common command)
Message wait
M N 0
4DH 4EH 30H
Message wait
M Q 0
4DH 51H 30H
(Response data)
0 0
8191
8191
8192
0
Area of
to block No.2
to Block No.2
16383
16384
8191
1 word 1 word
The AnA/AnUCPU common commands can be used for reading/writing data to the extended file register of
block number 1 to 256. In addition, the commands can be used regardless of the existence of file register
parameter.
When accessing the file register (R) set by parameter or when accessing it by specifying block number, use
ACPU common commands.
Device 0
number Area of
to
block No.1
8191
8192
Area of
to block No.2
16383
Block No.3 to 9 do not exist
16384
to Area of
block No.10
24575
24576
Area of
to block No.11
The following table shows the range of device numbers to be specified when using AnA/AnUCPU common commands for 28
blocks per each block.
Device number Position of target block Device number Position of target block
0 to 8191 First block R0 to R8191 114688 to 122879 15th block R0 to R8191
8192 to 16383 2nd block R0 to R8191 122880 to 131071 16th block R0 to R8191
16384 to 24575 3rd block R0 to R8191 131072 to 139263 17th block R0 to R8191
24576 to 32767 4th block R0 to R8191 139264 to 147455 18th block R0 to R8191
32768 to 40959 5th block R0 to R8191 147456 to 155647 19th block R0 to R8191
40960 to 49151 6th block R0 to R8191 155648 to 163839 20th block R0 to R8191
49152 to 57343 7th block R0 to R8191 163840 to 172031 21st block R0 to R8191
57344 to 65535 8th block R0 to R8191 172032 to 180223 22nd block R0 to R8191
65536 to 73727 9th block R0 to R8191 180224 to 188415 23rd block R0 to R8191
73728 to 81919 10th block R0 to R8191 188416 to 196607 24th block R0 to R8191
81920 to 90111 11th block R0 to R8191 196608 to 204799 25th block R0 to R8191
90112 to 98303 12th block R0 to R8191 204800 to 212991 26th block R0 to R8191
98304 to 106495 13th block R0 to R8191 212992 to 221183 27th block R0 to R8191
106496 to 114687 14th block R0 to R8191 221184 to 229375 28th block R0 to R8191
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)'
When the block number is 3 digits
'Block number (3 digits)' + 'Device number (4 digits)'
Specification When the block No. is less than 2 digits When the block No. is 3 digits
example
0 5 R 8 1 9 0 1 0 2 8 1 9 0
Request data
Response data
The value of read device is stored in word units. (Page 74 Read data, write data)
E R
45H 52H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Communication example
Read data of 2 points (R8190 and R8191) of block number 12 under the following conditions.
Message wait: 0 ms
Block number: 12
Head device: R8190
Number of device points: 2 points (2 words)
(Request data)
E R 0 1 2 R 8 1 9 0 0 2
45H 52H 30H 31H 32H 52H 38H 31H 39H 30H 30H 32H
(Response data)
Data read
1 2 3 4 7 A B C
(Decimal : 4660) (Decimal : 31420)
31H 32H 33H 34H 37H 41H 42H 43H
(R8190 in NO.12) (R8191 in NO.12)
Message format
The following shows the message format of the request data and response data of the command.
Request data
E W Number of
Message wait Head device No. Write data for the number of device points
device points
45H 57H
Response data
There is no response data for this command.
E W
45H 57H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Communication example
Write data of 3 points (R7010 to R7012) of block number 5 under the following conditions.
Message wait: 0 ms
Block number: 5
Head device: R7010
Number of device points: 3 points (3 words)
(Request data)
Request data
Data for the number of device points
E T Number of
Message wait Device No. Write data
device points
45H 54H
Response data
There is no response data for this command.
E T
45H 54H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Device number
Specify the block number and device number to be test with 7 digits. (Page 374 Device number)
Write data
Store 4 characters per one device point.
Communication example
Write data of three points (3 words) randomly under the following conditions.
Message wait: 0 ms
Number of device points: 3 points (3 words)
Device: Set R1234H to R1050 of block number 5, 1A1BH to R2121 of block number 7, and 506H to R3210 of block number
10.
(Request data)
Message wait
Number of
device points Device Write data Device Write data
E T 0 0 3 0 5 R 1 0 5 0 1 2 3 4 0 7 R 2 1 2 1 1 A 1 B
45H 54H 30H 30H 33H 30H 35H 52H 31H 30H 35H 30H 31H 32H 33H 34H 30H 37H 52H 32H 31H 32H 31H 31H 41H 31H 42H
1 0 R 3 2 1 0 0 5 0 6
31H 30H 52H 33H 32H 31H 30H 30H 35H 30H 36H
Monitoring procedure
1. Process the monitor data registration (Edit of EM command and transmission of device specification.)
Page 379 Register monitor data (command: EM)
4. If do not change the devices to be monitored, return to step 2, and repeat the process.
When monitoring data as the procedure shown above, the monitor data registration is required. If monitoring
data without registering the data, a protocol error occurs.
The content of registered monitor data are deleted when C24 is rebooted.
Five kinds of monitor data can be registered for the extended file register (EM), device memory in bit units
(BM or JM), and word units (WM or QM).
When registering device memory of the CPU module as a monitor data from more than one external
devices on the same station, the recently registered device memory will be available since the registration
data is overwritten. (Monitoring device memory Page 366 Monitor (Command: BM, JM, WM, QM, MB,
MJ, MN, MQ))
Request data
Command
ACPU common
E M
45H 4DH
Message wait: Specify the delayed time of the response transmission. (Page 347 Message wait)
Number of device points: Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper
digits.
Device number: Specify the block number and device number of the device to be monitored with 7 digits. (Page 374
Device number)
Response data
There is no response data for this command.
Communication example
Perform monitor data registration of 4 points (4 words) under the following conditions.
Message wait: 0 ms
Number of device points: 4 points (4 words)
Device number: Register R1234 of block number 5, R2345 of block number 6, R3055 of block number 15, and R8000 of
block number 17.
(When the extended file register of block number 1 to 8 and 10 to 17 exist.)
Message wait
Number of
device points Device No. Device No. Device No.
E M 0 0 4 0 5 R 1 2 3 4 0 6 R 2 3 4 5 1 5 R 3 0 5 5
45H 4DH 30H 30H 34H 30H 35H 52H 31H 32H 33H 34H 30H 36H 52H 32H 33H 34H 35H 31H 35H 52H 33H 30H 35H 35H
Device No.
1 7 R 8 0 0 0
31H 37H 52H 38H 30H 30H 30H
Message format
Request data
M E Message wait
4DH 45H
Response data
The value of read device is stored in word units. (Page 74 Read data, write data)
M E
4DH 45H
Message wait: Specify the delayed time of the response transmission. (Page 347 Message wait)
Communication example
Monitor data of 4 points (4 word) specified with monitor data registration under the following conditions.
Message wait: 0 ms
Registered devices for monitoring: R1234 of block number 5, R2345 of block number 6, R3055 of block number 15, and 4-
point of R8000 of block number 17.
(Request data)
Message wait
M E 0
4DH 45H 30H
(Response data)
Request data
Response data
The value of read device is stored in word units. (Page 74 Read data, write data)
N R
4EH 52H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Communication example
Read data of 2 points (R8190 and R8191) of block number 2 under the following conditions.
Message wait: 0 ms
Block number: 2
Head device: R8190
Number of device points: 2 points (2 words)
(Request data)
Message wait
Number of device points
Head device No. (Number of words)
N R 0 0 0 1 6 3 8 2 0 2
4EH 52H 30H 30H 30H 31H 36H 33H 38H 32H 30H 32H
(Response data)
Data read
1 2 3 4 7 A B C
(Decimal : 4660) (Decimal : 31420)
31H 32H 33H 34H 37H 41H 42H 43H
(R8190 in No.2) (R8191 in No.2)
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of
N W Message wait Head device No. Write data for the number of device points
device points
4EH 57H
Response data
There is no response data for this command.
N W
4EH 57H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Communication example
Write data of 3 points under the following conditions.
Message wait: 0 ms
Write data: Write R8190 and R8191 of block number 12 and RO of block number 13.
(When the extended file register of block number 1 to 8 and 10 to 13 exist.)
Number of device points: 3 points (3 words)
(Request data)
Start address
Specify the start address of the buffer memory to be read/written.
Convert the numerical value to 5-digit ASCII code (hexadecimal), and send it from the upper digits.
Calculation method
Calculate the start address as follows:
Start address = (Buffer memory address 2) + the arbitrary additional value of a module
For the additional values (buffer memory start address) for each module, refer to the following section.
Page 385 Accessible modules
Ex.
When specifying buffer memory address 1H of AD61
(1H2) + 80H = 82H
Byte length
Specify the byte length of the special function module buffer memory data to be read/written.
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
A module that assign the first part of the slots as empty slots (AD72, A84AD, etc.)
(Empty Special
slot) function
module Module No. "02H"
16 points 32 points
00 to 0F 10 to 2F
Ex.
A module that assign the last part of the slots as empty slots (A61LS, etc.)
Special (Empty
function slot)
module Module No. "01H"
32 points 16 points
00 to 0F 20 to 2F
Ex.
A module in which both assignment of special function module and I/O assignment exist (A81CPU)
Special Input
function module
module Module No. "03H"
64 points 64 points
00 to 3F 40 to 7F
Message format
The following shows the message format of the request data and response data of the command.
Request data
T R Special function
Message wait Start address Byte length
module No.
54H 52H
Response data
The value read from the buffer memory is stored.
2-digit ASCII code data is stored per 1 byte of buffer memory data.
T R
54H 52H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Start address
Specify the start address of the buffer memory to be read in five digits. (Page 386 Start address)
Byte length
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Specify the byte length within the following ranges:
1 Byte length 128
The content of one data may cross 2 or 3 bytes depending on the special function module. For the
specifications of byte length, refer to the manual of each module.
Message wait Start address Byte length Special function module No.
T R 0 0 0 7 F 0 0 4 1 3
54H 52H 30H 30H 30H 37H 46H 30H 30H 34H 31H 33H
(Response data)
Data read
Buffer memory
Start address
1 2 7 8 4 3 6 5 (7F0H) 7812H
31H 32H 37H 38H 34H 33H 36H 35H (7F2H) 6543H
7F0H 7F2H
Message format
The following shows the message format of the request data and response data of the command.
Request data
T W Message wait Start address Byte length Special function Write data
module No.
54H 57H
Response data
There is no response data for this command.
T W
54H 57H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Start address
Specify the start address of the buffer memory to be written in five digits. (Page 386 Start address)
Byte length
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Specify the byte length within the following ranges:
1 Byte length 128
Write data
Store the data written to buffer memory.
The content of one data may cross 2 or 3 bytes depending on the special function module. For the
specifications of byte length, refer to the manual of each module.
Communication example
Write data of 4 bytes under the following conditions.
Message wait: 0 ms
Start address: 27FAH
Byte length: 4 bytes
Special function module No.: 13 (input/output signals are 120H to 13FH)
(Request data)
27FAH 27FCH
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
Character Loopback
length data
T T
54H 54H
Message wait
Specify the delayed time of the response transmission. (Page 347 Message wait)
Character length
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Specify the character length within the following range:
1 Character length 254
Loopback data
Store the loopback data for character length.
Loopback data
The same data as request data is stored.
Message wait
Character length Loopback data
T T 0 0 5 A B C D E
54H 54H 30H 30H 35H 41H 42H 43H 44H 45H
(Response data)
Character length
Loopback data
0 5 A B C D E
30H 35H 41H 42H 43H 44H 45H
Message format
Request message
Setting data
Set the following items.
Item Description Reference
Header A header of Ethernet. Normally, it is added automatically. Page 392 Header
Subheader Set the command type. Page 392 Subheader
PC No. Specify the network module station No. of an access target. Page 393 PC No.
ACPU monitoring Set the wait time up to the completion of reading and writing processing. Page 394 ACPU monitoring timer
timer
Request data Set the commands that indicates request content. Page 397 Read and Write Device Memory
Page 418 Read and Write Extended File Register
Response data For the response data, store the read data for the command at normal
Page 432 Read and Write Buffer Memory of Special
completion. Refer to "Response data" rows of each command.
Function Module
End code The command processing result is stored. Page 395 End code, Abnormal code
Abnormal code
Subheader
Set the command type. (Page 396 Commands and Function List for 1E Frame)
The setting values for each command are as follows.
Function Subheader Reference
Request Response
message message
Read and write device memory 00H 80H Page 403 Batch read in bit units (command: 00)
01H 81H Page 405 Batch read in word units (command: 01)
02H 82H Page 407 Batch write in bit units (command: 02)
03H 83H Page 409 Batch write in word units (command: 03)
04H 84H Page 410 Test in bit units (random write) (command: 04)
05H 85H Page 412 Test in word units (random write) (command: 05)
06H 86H Page 415 Register monitor data(command: 06, 07)
07H 87H Page 415 Register monitor data(command: 06, 07)
08H 88H Page 416 Monitor in bit units (command: 08)
09H 89H Page 417 Monitor in word units (command: 09)
Read and write extended file register 17H 97H Page 419 Batch read (command: 17)
18H 98H Page 421 Batch write (command: 18)
19H 99H Page 423 Test (random write) (command: 19)
1AH 9AH Page 426 Register monitor data (command: 1A)
1BH 9BH Page 427 Monitoring (command: 1B)
3BH BBH Page 428 Direct read (command: 3B)
3CH BCH Page 430 Direct write (command: 3C)
Read and write buffer memory of special 0EH 8EH Page 434 Batch read (command: 0E)
function module 0FH 8FH Page 436 Batch write (command: 0F)
Setting method
Data communication in ASCII code
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
Device memory batch read (word units)
Request message
ASCII code Binary code
0 0
30H 30H 00H
Response message
ASCII code Binary code
8 0
38H 30H 80H
Connected station
(Host station) :Access target station
External device
Connected station
(host station)
Network
Other station
:Access target station
Setting method
Data communication in ASCII code
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
Accessing the connected station (host station)
ASCII code Binary code
F F
46H 46H FFH
0 3
30H 33H 03H
The station No. of the network module can be checked by using the following parameters of Engineering tool.
GX Developer and GX Works2: "Network Parameter"
GX Works3: "Module Parameter"
The network module station No. is set in decimal. However, the PC No. is set in hexadecimal.
When specifying the network of the access target is required, set "Valid Module During Other Station Access"
with an Engineering tool.
When accessing QnACPU or ACPU for the first time, the wait time for CPU monitoring timer is required before
receiving a response message because QnACPU identifies the CPU type. Be sure to set a value within the
range of recommended range.
Setting method
Data communication in ASCII code
Convert the numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
When specifying '10H' for the monitoring timer
ASCII code Binary code
0 0 1 0
30H 30H 31H 30H 10H 00H
End code
At normal completion, '0' is stored. 18
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.
QCPU User's Manual (Hardware Design, Maintenance and Inspection)
MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection)
Q Corresponding Ethernet Interface Module User's Manual (Basic)
MELSEC-L Ethernet Interface Module User's Manual (Basic)
Abnormal code
When an end code is '5BH', the details of abnormal content are displayed.
Setting method
Data communication in ASCII code
Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits.
Ex.
Normal completion
ASCII code Binary code
0 0
30H 30H 00H
1 0
31H 30H 10H
When error code '5BH' and an abnormal code '10H' (PC No. error) are returned,
ASCII code Binary code
5 B 1 0
35H 42H 31H 30H 5BH 10H
*1 Use the dedicated commands for extended registers when performing extended file registers read/write.
*2 The devices that can be registered to E71 is for 1 command out of the three types of commands (06H, 07H, 1AH).
The specified device recently used by any of the above commands is registered to E71.
To read and write the extended file register, use the commands dedicated to the extended file register.
Page 418 Read and Write Extended File Register
Considerations
Ex.
Data register (D) 1234 (device number is decimal)
Convert a device number to hexadecimal. '1234' (decimal)'4D2' (hexadecimal)
ASCII code Binary code
4 4 2 0 0 0 0 0 0 4 D 2
34H 34H 32H 30H 30H 30H 30H 30H 30H 34H 44H 32H D2H 04H 00H 00H 20H 44H
For the values of each device code, refer to the following section.
: Space
Device name Symbol Type Representation Device code
Input X Bit Hexadecimal X 5820H
Output Y Bit Hexadecimal Y 5920H
Internal relay (include in latch relay and step relay) M/L/S Bit Decimal M 4D20H
Annunciator F Bit Decimal F 4620H
Link relay B Bit Hexadecimal B 4220H
Timer Current value T Word Decimal TN 544EH
Contact Bit Decimal TS 5453H
Coil Bit Decimal TC 5443H
Counter Current value C Word Decimal CN 434EH
Contact Bit Decimal CS 4353H
Coil Bit Decimal CC 4343H
Data register D Word Decimal D 4420H
Link register W Word Hexadecimal W 5720H
File register R Word Decimal R 5220H
Access the devices within the range that can be used in the access target CPU.
For the accessible device range, refer to the following section.
Page 399 Accessible device range
For word unit specification, the head device number of bit device must be specified in multiple of 16.
For special relay M9000 or later, (9000 + multiple of 16) can be specified.
Do not write data to the devices which cannot be written in the range of the special relays (M9000 to M9255)
and special registers (D9000 to D9255). For details on the special relays and special registers, refer to
manual of ACPU to be accessed.
For L and S, perform accessing by specifying 'M' (For example, to access L100, specify M100.)
Do not write data to the devices which cannot be written in the range of the special relays (M9000 to M9255)
and special registers (D9000 to D9255). For details on the special relays and special registers, refer to the
programming manual of ACPU.
For L and S, perform accessing by specifying 'M' (For example, to access L100, specify M100.)
Ex.
5 points, 20 points, 256 points
Number of device points ASCII code Binary code
5 points
0 5
30H 35H 05H
20 points
1 4
31H 34H 14H
256 points
0 0
30H 30H 00H
Message format
The following shows the message format of the request data and response data of the command. 18
Specify the command type by subheader. (Page 392 Subheader)
Request data
Number of device
Head device Fixed value
points
Response data
The data for the number of device points are stored.
(Page 402 Read data, write data)
For ASCII code, when the number of device points are specified in an odd number, one byte of dummy data
(30H) will be added to the response data. For example, if a data for three points are read, data for four points
is returned. The last byte will be a dummy data.
Fixed value
Fixed to '0'.
ASCII code Binary code
0 0
30H 30H 00H
4 D 2 0 0 0 0 0 0 0 6 4 0 C 0 0
34H 44H 32H 30H 30H 30H 30H 30H 30H 30H 36H 34H 30H 43H 30H 30H
(Response data)
1 0 1 0 1 0 1 0 1 0 1 0
31H 30H 31H 30H 31H 30H 31H 30H 31H 30H 31H 30H
(M100) to (M111)
(Response data)
1 0 1 0 1 0 1 0 1 0 1 0
(M100) to (M111)
Message format 18
The following shows the message format of the request data and response data of the command.
Request data
Number of device
Head device Fixed value
points
Response data
The data for the number of device points are stored.
The order of data differs depending on the ASCII code or binary code. (Page 402 Read data, write data)
Fixed value
Fixed to '0'.
ASCII code Binary code
0 0
30H 30H 00H
5 9 2 0 0 0 0 0 0 0 4 0 0 2 0 0
35H 39H 32H 30H 30H 30H 30H 30H 30H 30H 34H 30H 30H 32H 30H 30H
(Response data)
8 2 9 D 5 5 3 E
38H 32H 39H 44H 35H 35H 33H 45H
1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 1 1 1 0
(Response data)
1 0 0 1 1 1 0 1 1 0 0 0 0 0 1 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 0 1
Message format
The following shows the message format of the request data and response data of the command. 18
Request data
Response data
There is no response data for this command.
Fixed value
Fixed to '0'.
ASCII code Binary code
0 0
30H 30H 00H
Write data
Stored data for the number of device points to be written.
0 (30H): OFF
1 (31H): ON
Head device Number of device points Data for the number of specified device points
4 4 2 0 0 0 0 0 0 0 3 2 0 3 0 0 1 1 0 1
34H 44H 32H 30H 30H 30H 30H 30H 30H 30H 33H 32H 30H 43H 30H 30H 31H 31H 30H 31H
(M50) to (M61)
32H 00H 00H 00H 20H 4DH 0CH 00H 01H 11H 01H 00H 00H 01H
0 1 1 1 0 1 0 0 0 0 0 1
(M50) to (M61)
Message format 18
The following shows the message format of the request data and response data of the command.
Request data
Response data
There is no response data for this command.
Fixed value
Fixed to '0'.
ASCII code Binary code
0 0
30H 30H 00H
Write data
Stored data for the number of device points to be written.
The order of data differs depending on the ASCII code or binary code. (Page 402 Read data, write data)
Communication example
Write the devices in the CPU module with E71 mounted under the following conditions.
Head device: D100
Number of device points: 3 points
Head device Number of device points Data for the number of specified device points
4 4 2 0 0 0 0 0 0 0 6 4 0 3 0 0 1 2 3 4 9 8 7 6 0 1 0 9
34H 34H 32H 30H 30H 30H 30H 30H 30H 30H 36H 34H 30H 33H 30H 30H 31H 32H 33H 34H 39H 38H 37H 36H 30H 31H 30H 39H
(D100) (D101) (D102)
Head device Number of device points Data for the number of specified device points
64H 00H 00H 00H 20H 44H 03H 00H 34H 12H 76H 98H 09H 01H
(D100) (D101) (D102)
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.
Response data
There is no response data for this command.
Fixed value
Fixed to '0'.
ASCII code Binary code
0 0
30H 30H 00H
Specified device
Specify the bit devices to be set/reset. (Page 397 Device codes and device numbers)
ON/OFF specification
Specify set/reset.
Processing ASCII code Binary code
Reset
0 0
30H 30H 00H
Set
0 1
30H 31H 01H
0 3 0 0 5 9 2 0 0 0 0 0 0 0 9 4 0 1
30H 33H 30H 30H 35H 39H 32H 30H 30H 30H 30H 30H 30H 30H 39H 34H 30H 31H
(ON)
(Y94)
Specified device ON/OFF specification
(second point) (second point)
4 D 2 0 0 0 0 0 0 0 3 C 0 0
34H 44H 32H 30H 30H 30H 30H 30H 30H 30H 33H 43H 30H 30H
(OFF)
(M60)
4 2 2 0 0 0 0 0 0 0 2 6 0 1
34H 32H 32H 30H 30H 30H 30H 30H 30H 30H 32H 36H 30H 31H
(ON)
(B26)
Number of Specified device ON/OFF specification Specified device ON/OFF specification Specified device ON/OFF specification
device points (first point) (first point) (second point) (second point) (third point) (third point)
03H 00H 94H 00H 00H 00H 20H 59H 01H 3CH 00H 00H 00H 20H 4DH 00H 26H 00H 00H 00H 20H 42H 01H
(Y94) (ON) (M60) (OFF) (B26) (ON)
Message format
The following shows the message format of the request data and response data of the command.
Request data
Number of device Specified device ON/OFF Specified device ON/OFF
points Fixed value specification specification
(first point) (nth point)
(n points) (first point) (nth point)
Response data
There is no response data for this command.
Fixed value
Fixed to '0'.
ASCII code Binary code
0 0
30H 30H 00H
Specified device
Specify the device to be set/reset. (Page 397 Device codes and device numbers)
ON/OFF specification
Store the data to be written.
0 3 0 0 5 9 2 0 0 0 0 0 0 0 8 0 7 B 2 9
30H 33H 30H 30H 35H 39H 32H 30H 30H 30H 30H 30H 30H 30H 38H 30H 37H 42H 32H 39H
(Y80)
0 1 1 1 1 0 1 1 0 0 1 0 1 0 0 1
5 7 2 0 0 0 0 0 0 0 2 6 1 2 3 4
35H 37H 32H 30H 30H 30H 30H 30H 30H 30H 32H 36H 31H 32H 33H 34H
(1234H)
(W26)
4 3 4 E 0 0 0 0 0 0 1 2 0 0 5 0
34H 33H 34H 45H 30H 30H 30H 30H 30H 30H 31H 32H 30H 30H 35H 30H
(50H)
(Current value of C18)
Number of Specified device ON/OFF specification Specified device ON/OFF specification Specified device ON/OFF specification
device points (first point) (first point) (second point) (second point) (third point) (third point)
03H 00H 80H 00H 00H 00H 20H 59H 29H 7BH 26H 00H 00H 00H 20H 57H 34H 12H 12H 00H 00H 00H 4EH 43H 50H 00H
(Y80) (W26) (1234H) (Current value of C18) (50H)
0 0 1 0 1 0 0 1 0 1 1 1 1 0 1 1
4. If do not change the devices to be monitored, return to step 2, and repeat the process.
When monitoring data as the procedure shown above, the monitor data registration is required. If monitoring
data without registering the data, a protocol error occurs.
The content of registered monitor data is deleted when turning the power OFF or the resetting the CPU
module.
There are three types of commands for monitor data registration; expansion file register, device memory bit
unit, and device memory word unit. The recently registered one command out of three types of commands
can be registered to E71.
When registering device memory of the CPU module as a monitoring data from more than one external
devices on the same station, the recently registered device memory will be available since the registration
data is overwritten.
Request data 18
Number of device points Fixed Device number Device number
(n points) value (first point) (nth point)
Number of device points: Specify the number of devices to be registered as a monitoring data. (Page 402 Number of
device points)
Fixed value: '0'.
ASCII code Binary code
0 0
30H 30H 00H
Device number: Specify the device number to be registered as a monitor data. (Page 397 Device codes and device
numbers)
When specifying bit devices at monitor data registration in word unit, set the device numbers in multiples of 16
( 0, 16, ... in decimal notation).
Response data
There is no response data for this command.
Communication example
Register devices as a monitoring data in the CPU module with E71 mounted under the following conditions.
Number of device points: 3 points
Device number: Y46, M12, B2C
(Request data)
(ASCII code)
0 3 0 0 5 9 2 0 0 0 0 0 0 0 4 6
30H 33H 30H 30H 35H 39H 32H 30H 30H 30H 30H 30H 30H 30H 34H 36H
(Y46)
4 D 2 0 0 0 0 0 0 0 0 C 4 2 2 E 0 0 0 0 0 0 2 C
34H 44H 32H 30H 30H 30H 30H 30H 30H 30H 30H 43H 34H 32H 32H 45H 30H 30H 30H 30H 30H 30H 32H 43H
(M12) (B2C)
(Binary code)
03H 00H 46H 00H 00H 00H 20H 59H 0CH 00H 00H 00H 20H 4DH 2CH 00H 00H 00H 20H 42H
(Y46) (M12) (B2C)
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. For example, if the number of device points registered to be monitored is
three points, data for four points is returned. The last byte will be a dummy data.
Communication example
Monitor the devices registered with monitor data registration in the CPU module with E71 mounted under the following
conditions.
Number of registered device points: 3 points
Number of registered device numbers: Y46, M12, B2C
(Response data)
(ASCII code)
Subheader
8 8 0 0 1 0 1 0
38H 38H 30H 30H 31H 30H 31H 30H
(Y46) (B2C)
(M12) Dummy data
(Binary code)
Subheader End code Data for the number of specified device points
1 0 1 0
(Y46) (B2C)
(M12) Dummy data
Request data
There is no request data for this command.
Response data
18
The value of the read device is stored in word units.
The order of data differs depending on the ASCII code or binary code.
Communication example
Monitor the devices registered with monitor data registration in the CPU module with E71 mounted under the following
conditions.
Number of registered device numbers: Y50 to 5F, D38, W1E
(Response data)
(ASCII code)
End code
8 9 0 0 E 5 6 D 1 2 3 4 5 6 7 8
38H 39H 30H 30H 45H 35H 36H 44H 31H 32H 33H 34H 35H 36H 37H 38H
(D38) (W1E)
1 1 1 0 0 1 0 1 0 1 1 0 1 1 0 1
(Binary code)
Subheader End code Data for the number of specified device points
0 1 1 0 1 1 0 1 1 1 1 0 0 1 0 1
For the considerations when reading and writing extended file register, refer to the following section.
Page 371 Considerations for reading and writing extended file register
For the specification method of the extended file register, refer to the following section.
Page 372 Specification method for extended file register
Block number
Specify the block number of the extended file register.
Device number
Specify the device number of the extended file register.
When reading or writing (command: 3B, 3C) extended file register directly, refer to the following section.
Page 373 Device number (address) specification using AnA/AnUCPU common commands
Message format
The following shows the message format of the request data and response data of the command. 18
Request data
(ASCII code)
Number of device
Block No. Device number 0 0
points
30H 30H
(Binary code)
Number of device
Device number Block No.
points
00H
Response data
The data for the number of device points are stored.
The order of data differs depending on the ASCII code or binary code. (Page 402 Read data, write data)
Block number
Specify the block number of the extended file register to be read. (Page 418 Block number)
0 0 0 2 5 2 2 0 0 0 0 0 0 0 4 6 0 3 0 0
30H 30H 30H 32H 35H 32H 32H 30H 30H 30H 30H 30H 30H 30H 34H 36H 30H 33H 30H 30H
(Response data)
1 2 3 4 8 7 6 5 0 1 3 F
31H 32H 33H 34H 38H 37H 36H 35H 30H 31H 33H 46H
(R70 in No.2) (R71 in No.2) (R72 in No.2)
46H 00H 00H 00H 20H 52H 02H 00H 03H 00H
(Response data)
Message format
The following shows the message format of the request data and response data of the command. 18
Request data
(ASCII code)
Block No. Device number Number of device 0 0 Data for the number of
points specified device points
30H 30H
(Binary code)
Response data
There is no response data for this command.
Block number
Specify the block number of the extended file register to be written. (Page 418 Block number)
0 0 0 3 5 2 2 0 0 0 0 0 0 0 6 4 0 3 0 0
30H 30H 30H 33H 35H 32H 32H 30H 30H 30H 30H 30H 30H 30H 36H 34H 30H 33H 30H 30H
0 1 0 9 9 8 7 6 1 2 3 4
30H 31H 30H 39H 39H 38H 37H 36H 31H 32H 33H 34H
(R100 in No.3) (R101 in No.3) (R102 in No.3)
Number of device points Data for the number of specified device points
Block
Device number No.
64H 00H 00H 00H 20H 52H 03H 00H 03H 00H 09H 01H 76H 98H 34H 12H
Message format
The following shows the message format of the request data and response data of the command. 18
Request data
(ASCII code)
(Binary code)
Number of device
Device number Block No. Write data
points
00H
Response data
There is no response data for this command.
Device number
Specify the head device of the extended file register to be written. (Page 418 Device number)
Block number
Specify the block number of the extended file register to be written. (Page 418 Block number)
Write data
Store the data to be written to the extended file registers.
0 2 0 0 0 0 0 2 5 2 2 0 0 0 0 0 0 0 1 A 1 2 3 4
30H 32H 30H 30H 30H 30H 30H 32H 35H 32H 32H 30H 30H 30H 30H 30H 30H 30H 31H 41H 31H 32H 33H 34H
0 0 0 3 5 2 2 0 0 0 0 0 0 0 1 3 0 1 0 9
30H 30H 30H 33H 35H 32H 32H 30H 30H 30H 30H 30H 30H 30H 31H 33H 30H 31H 30H 39H
02H 00H 1AH 00H 00H 00H 20H 52H 02H 00H 34H 12H 13H 00H 00H 00H 20H 52H 03H 00H 09H 01H
4. If do not change the devices to be monitored, return to step 2, and repeat the process.
When monitoring data as the procedure shown above, the monitor data registration is required. If monitoring
data without registering the data, an error occurs (END code: 57H).
The content of registered monitor data is deleted when turning the power OFF or the resetting the CPU
module.
There are three types of commands for monitor data registration; extended file register, device memory bit
unit, and device memory word unit. The recently registered one command out of three types of commands
can be registered to E71.
When registering device memory of the CPU module as a monitoring data from more than one external
devices on the same station, the recently registered device memory will be available since the registration
data is overwritten.
Request data
(ASCII code)
(Binary code)
Number of device
points Device number Block No.
00H
Number of device points: Specify the number of points of the extended file registers to be registered as a monitor data.
(Page 402 Number of device points)
Device number: Specify the extended file registers to be registered as a monitor data. (Page 418 Device number)
Block number: Specify the block number of the extended file registers to be registered as a monitor data. (Page 418
Block number)
Response data
There is no response data for this command.
Communication example
Register devices as a monitoring data in the CPU module with E71 mounted under the following conditions.
Data to be registered: R15 of block number 2 and R28 of block number 3
(Request data)
(ASCII code)
0 2 0 0 0 0 0 2 5 2 2 0 0 0 0 0 0 0 0 6
30H 32H 30H 30H 30H 30H 30H 32H 35H 32H 32H 30H 30H 30H 30H 30H 30H 30H 30H 46H
0 0 0 3 5 2 2 0 0 0 0 0 0 0 1 C
30H 30H 30H 33H 35H 32H 32H 30H 30H 30H 30H 30H 30H 30H 31H 43H
(Binary code)
Number of
device points Device number Block No. Device number Block No.
02H 00H 0FH 00H 00H 00H 20H 52H 02H 00H 1CH 00H 00H 00H 20H 52H 03H 00H
Response data
18
Store the monitoring result.
Communication example
Monitor the following extended file registers registered by monitor data registration.
Monitor data registration: R15 in block number 2 and R28 in block number 3
(Response data)
(ASCII code)
Monitoring result
E 5 6 D 1 2 3 4
45H 35H 36H 44H 31H 32H 33H 34H
(R15 in block No.2) (R28 in block No.3)
(Binary code)
Monitoring result
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
The data for the number of device points are stored.
(Page 402 Read data, write data)
Fixed value
Fixed to '0'.
ASCII code Binary code
0 0
30H 30H 00H
0 0 0 2 5 2 2 0 0 0 0 0 0 0 4 6 0 4 0 0
30H 30H 30H 32H 35H 32H 32H 30H 30H 30H 30H 30H 30H 30H 34H 36H 30H 34H 30H 30H
(Response data)
1 2 3 4 8 7 6 5 0 1 3 F 0 0 2 0
31H 32H 33H 34H 38H 37H 36H 35H 30H 31H 33H 46H 30H 30H 32H 30H
(R70 in No.0) (R71 in No.0) (R72 in No.0) (R73 in No.0)
(Response data)
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
There is no response data for this command.
Fixed value
Fixed to '0'.
ASCII code Binary code
0 0
30H 30H 00H
Device number Number of device points Data for the number of specified device points
5 2 2 0 0 0 0 0 0 0 6 4 0 3 0 0 0 1 0 9 9 8 7 6 1 2 3 4
35H 32H 32H 30H 30H 30H 30H 30H 30H 30H 36H 34H 30H 33H 30H 30H 30H 31H 30H 39H 39H 38H 37H 36H 31H 32H 33H 34H
(R100 in No.0) (R101 in No.0) (R102 in No.0)
64H 00H 00H 00H 20H 52H 03H 00H 09H 01H 76H 98H 34H 12H
Start address
Specify the start address of the buffer memory to be read/written.
The value to specify is the same as 1C frame.
Page 384 Special function module No.
Ex.
When the head area address is 1E1H
ASCII code Binary code
0 0 0 1 E 1
30H 30H 30H 31H 45H 31H E1H 01H 00H
Ex.
For 5 bytes, 20 bytes, 256 bytes.
Number of device points ASCII code Binary code
5 bytes
0 5
30H 35H 05H
20 bytes
1 4
31H 34H 14H
256 bytes
0 0
30H 30H 00H
Accessible modules
Special function modules that can be accessed buffer memory are the same as 1C frame.
Page 385 Accessible modules
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
The data read from buffer memory is stored. (Page 433 Read data, write data)
Byte length
Specify the byte length of buffer memory to be read.
Specify '00H' when the number of device points is to 256 points. (Page 433 Byte length)
Fixed value
Fixed to '0'.
ASCII code Binary code
0 0
30H 30H 00H
0 0 0 7 F 0 0 4 1 3 0 0
30H 30H 30H 37H 46H 30H 30H 34H 31H 33H 30H 30H
(Response data)
Data read
0 9 1 8 2 0 3 4
30H 39H 31H 38H 32H 30H 33H 34H
(7F0H) (7F1H) (7F2H) (7F3H)
Byte length
Head Special function module No.
address
(Response data)
Data read
(7F1H) (7F2H)
(7F0H) (7F3H)
Message format
The following shows the message format of the request data and response data of the command.
Request data
Response data
There is no response data for this command.
Byte length
Specify the byte length of buffer memory to be read.
Specify '00H' when the number of device points is to 256 points. (Page 433 Byte length)
Fixed value
Fixed to '0'.
ASCII code Binary code
0 0
30H 30H 00H
Write data
Store the data to be written in a buffer memory. (Page 433 Read data, write data)
Special function
module No. Write data
Start address Byte length
0 0 0 7 5 0 0 4 1 3 0 0 0 1 2 3 4 5 6 7
30H 30H 30H 37H 35H 30H 30H 34H 31H 33H 30H 30H 30H 31H 32H 33H 34H 35H 36H 37H
(750H) (751H) (752H) (753H)
Byte length
Special function
Start module No. Write data
address
50H 07H 00H 04H 13H 00H 01H 23H 45H 67H
(751H) (752H)
(750H) (753H)
Binary
Device
Extension
When extension is modification Device Extension
Indirect
Device number
code
specification
specification Direct memory specification
specified modification
specification
With commands which can specify more than one device, the devices listed in the following section can be
accessed by specifying '0' for "Extension specification", "Extension specification modification", "Direct
memory specification".
Page 70 Device code list
However, when 008 or 00C0 is specified by "Subcommand", specify the device in the message format
shown in this section. Message formats with extension not specified and message formats with extension
specified cannot coexist in the same message.
APPENDICES APPENDIX
438 Appendix 1 Read/Write by Device Extension Specification
Subcommands for device extension specification
Use the following subcommands for extension specification.
Item ASCII code Binary code
For When accessing in word units
MELSEC-Q/
0 0 8 0
L series
30H 30H 38H 30H 80H 00H
0 0 8 1
30H 30H 38H 31H 81H 00H
0 0 8 3
30H 30H 38H 33H 83H 00H
APPENDICES APPENDIX
Appendix 1 Read/Write by Device Extension Specification 439
Accessing link direct devices
Access link devices of the network modules such as remote input (RX), remote output (RY), and link special relay (SB).
J \
Extension Device Device number
specification code
0 0 J 0 0 0 0 0 0
30H 30H 4AH 30H 30H 30H 30H 30H 30H
(3 digits) (2 digits) (6 digits)
0 0 J 0 0 0 0 0 0 0 0
30H 30H 4AH 30H 30H 30H 30H 30H 30H 30H 30H
(4 digits) (10 digits)
APPENDICES APPENDIX
440 Appendix 1 Read/Write by Device Extension Specification
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.
Binary code: Send 2-byte numerical values from the lower byte (L: bits 0 to 7).
Ex.
For network No.8
ASCII code Binary code
J 0 0 8
4AH 30H 30H 38H 08H 00H
Using the index register of CPU module, the access target network No. can be specified indirectly.
Page 446 Access to index the network No. and start input/output number
Using the index register of CPU module, the access target device number can be specified indirectly.
Page 447 Access to index the device number
0 0 8 0 0 0 J 0 0 1 0 0 0 W * 0 0 0 1 0 0 0 0 0
30H 30H 38H 30H 30H 30H 4AH 30H 30H 31H 30H 30H 30H 57H 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H
80H 00H 00H 00H 00H 01H 00H B4H 00H 00H 01H 00H F9H
APPENDICES APPENDIX
Appendix 1 Read/Write by Device Extension Specification 441
Accessing module access devices
Access buffer memory of an intelligent function module.
U \G
Extension Device Device number
specification code
0 0 U 0 0 0 0 0 0
30H 30H 55H 30H 30H 30H 30H 30H 30H
(2 digits) (6 digits)
0 0 U 0 0 0 0 0 0 0 0
30H 30H 55H 30H 30H 30H 30H 30H 30H 30H 30H
(4 digits) (10 digits)
APPENDICES APPENDIX
442 Appendix 1 Read/Write by Device Extension Specification
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.
Binary code: Send 2-byte numerical values from the lower byte (L: bits 0 to 7).
Ex.
Start input/output number 0010H of a module
ASCII code Binary code
U 0 0 1
55H 30H 30H 31H 01H 00H
Indirect specification of the start input/output number can also be performed by using the CPU module index
register.
Page 446 Access to index the network No. and start input/output number
Using the index register of CPU module, the access target device number can be specified indirectly.
Page 447 Access to index the device number
A
0 0 8 0 0 0 U 0 0 3 0 0 0 G * 0 0 0 0 0 1 0 0 0
30H 30H 38H 30H 30H 30H 55H 30H 30H 33H 30H 30H 30H 47H 2AH 30H 30H 30H 30H 30H 31H 30H 30H 30H
80H 00H 00H 00H 01H 00H 00H ABH 00H 00H 03H 00H F8H
APPENDICES APPENDIX
Appendix 1 Read/Write by Device Extension Specification 443
Accessing CPU buffer memory access device
Access the buffer memory of RCPU.
U \
Extension Device code Device number
ifi ti
The following device access commands can be used for access.
Function Command Subcommand
Batch read 0401 0082
Batch write 1401 0082
Random read 0403 0082
Random write 1402 0082
Batch read multiple blocks 0406 0082
Batch write multiple blocks 1406 0082
Register monitor data 0801 0082
0 0 U 3 E 0 0 0 0 0 0 0 0
30H 30H 55H 33H 45H 30H 30H 30H 30H 30H 30H 30H 30H
(4 digits) (10 digits)
Data to be specified
Extension specification
Specify the start input/output number of CPU module with the upper 3 digits of 4-digit 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.
Binary code: Send 2-byte numerical values from the lower byte (L: bits 0 to 7).
The start input/output numbers of CPU modules to be specified are as shown below.
CPU number Start input/output number of CPU module Value to be specified
CPU No.1 3E00H 3E0H
CPU No.2 3E10H 3E1H
CPU No.3 3E20H 3E2H
CPU No.4 3E30H 3E3H
Ex.
APPENDICES APPENDIX
444 Appendix 1 Read/Write by Device Extension Specification
For CPU No.4 (start input/output number: 3E30H)
ASCII code Binary code
U 3 E 3
55H 33H 45H 33H E3H 03H
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
Using the index register of CPU module, the access target device number can be specified indirectly.
Page 447 Access to index the device number
Subcommand
Extension Device
Device number
A
specification code
0 0 8 2 0 0 U 3 E 0 0 0 0 0 G * * * 0 0 0 0 0 0 0 0 0 1 0 0 0 0
30H 30H 38H 32H 30H 30H 55H 33H 45E 30H 30H 30H 30H 30H 47H 2AH 2AH 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 30H
82H 00H 00H 00H 01H 00H 00H 00H ABH 00H 00H 00H E0H 03H FAH
APPENDICES APPENDIX
Appendix 1 Read/Write by Device Extension Specification 445
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
J \ U \
+ +
Z Z
Extension specification modification Extension specification modification
The access target can be switched with one message, by changing the value of the index register in CPU module programs.
Ex.
The access target can be switched by changing the value of 'Z0', when multiple network modules are mounted onto the
access target.
Network number
(offset value) Z0
APPENDICES APPENDIX
446 Appendix 1 Read/Write by Device Extension Specification
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
+
Z
Device modification
The access target can be switched with one message, by changing the value of the index register in CPU module programs.
Ex.
When accessing D4 by specifying D0 and Z0
Device number
(Offset value) Z0
(Stored value) 4
Z0 4
Similar to the way of access to D4 by the following program. A
+ D0
(Device number) 0 MOVP K4 Z0
D4 (Access destination)
D5 MOVP K D0Z0
Ex.
When accessing M16 to M31 by specifying M0 and Z0 (Word units)
Device number
(Offset value) Z0
APPENDICES APPENDIX
Appendix 1 Read/Write by Device Extension Specification 447
Message format for device extension specification
Data communication in ASCII code
Extension
Extension Device Device
0 0 specification Device number
specification code modification
30H 30H modification
J \ U \ X
+ + + + +
Z Z Z Z Z
Extension specification Device Extension specification Device Device
modification modification modification modification modification
Data to be specified
Extension specification, device code, and device number
Specify the access target network No. and the offset value of the start input/output number for extension specification.
When indexing a network No. and start input/output number by "Extension specification modification", the values specified by
"Extension specification" will be the offset value.
When indexing a device number by "Device modification", the values specified by "Device number" will be the offset value.
For the data to be specified for each access device, refer to the following table.
Item Reference
Link direct device Page 441 Data to be specified
Module access device Page 443 Data to be specified
CPU buffer memory access device Page 444 Data to be specified
Specify '0' when accessing devices other than link direct device, module access device, and CPU buffer memory access
device.
Binary code
Specify '0'.
00H 00H
APPENDICES APPENDIX
448 Appendix 1 Read/Write by Device Extension Specification
Extension specification modification
Specify the index register to be used when indexing the value specified by 'Extension specification'.
Access target Devices ASCII code Binary code
to be Device code Device number Device number Fixed
used value
MELSEC iQ-R Index Specify 'Z' and Specify the device number in decimal (2- Specify in hexadecimal. 40H
series module register space with 2-digit digit ASCII code). (Specification range: 00H to 18H)
ASCII code. (Specification range: 0 to 24)
Long index Specify 'LZ' with 2- Specify the device number in decimal (2- Specify in hexadecimal. 80H
register digit ASCII code. digit ASCII code). (Specification range: 00H to 0CH)
(Specification range: 0 to 12)
MELSEC-Q/L series Index Specify 'Z' with 1- Specify the device number in decimal (2- Specify in hexadecimal. 40H
module register digit ASCII code. digit ASCII code). (Specification range: 0 to F)
(Specification range: 0 to 15)
Ex.
Index register (Z0)
Subcommand type ASCII code Binary code
For MELSEC-Q/L series
Z 0 0
00H 40H
5AH 30H 30H
Z 0 0
5AH 20H 30H 30H 00H 40H
Ex.
Long index register (LZ0)
Subcommand type ASCII code Binary code
For MELSEC iQ-R series A
L Z 0 0
4CH 5AH 30H 30H 00H 80H
0 0 0
30H 30H 30H 00H 00H
0 0 0 0
30H 30H 30H 30H 00H 00H
Device modification
Specify the number of index register when indexing device number.
The data to be specified is the same as extension specification modification. (Page 449 Extension specification
modification)
APPENDICES APPENDIX
Appendix 1 Read/Write by Device Extension Specification 449
Communication example (indexing network No.)
Access W100 (J1Z0\W100) of network No.1 + Z0 by specifying subcommand 0080.
0 0 8 0 0 0 J 0 0 1 Z 0 0 W * 0 0 0 1 0 0 0 0 0
30H 30H 38H 30H 30H 30H 4AH 30H 30H 31H 5AH 30H 30H 57H 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H
80H 00H 00H 00H 00H 01H 00H B4H 00H 40H 01H 00H F9H
0 0 8 0 0 0 0 0 0 0 0 0 0 D * 0 0 0 1 0 0 Z 0 4
30H 30H 38H 30H 30H 30H 30H 30H 30H 30H 30H 30H 30H 44H 2AH 30H 30H 30H 31H 30H 30H 5AH 30H 34H
80H 00H 04H 40H 64H 00H 00H A8H 00H 00H 00H 00H 00H
APPENDICES APPENDIX
450 Appendix 1 Read/Write by Device Extension Specification
Accessing devices for indirect specification
Access the device corresponding to the address stored in the word device (2 points).
Store the address of the access target device in the device for the indirect specification, and represent the data as '@ + device
for indirect specification'.
Indirect Device
specification code Device number
@
+
Z
Device modification
0 @ 0 0 0 0 0 0 0 Device Device
Device number
code modification
30H 40H 30H 30H 30H 30H 30H 30H 30H
Device Device
number code
H 8H 00H 00H 00H 00H 00H
Indirect specification
Device modification
APPENDICES APPENDIX
Appendix 1 Read/Write by Device Extension Specification 451
Data to be specified
Device code and device number
Specify the devices for indirect specification. (Page 67 Devices)
Indirect specification can be used only for word devices.
When indexing a device number by "Device modification", the values specified by "Device number" will be the offset value.
For the values of device codes, refer to the following section.
Page 70 Device code list
Device modification
Specify the number of index register when the device number is indirectly specified with index register.
Access target Devices ASCII code Binary code
to be Device code Device number Device number Fixed
used value
MELSEC iQ-R Index Specify 'Z' and Specify the device number in decimal (2- Specify in hexadecimal. 48H
series module register space with 2-digit digit ASCII code). (Specification range: 00H to 18H)
ASCII code. (Specification range: 0 to 24)
Long index Specify 'LZ' with 2- Specify the device number in decimal (2- Specify in hexadecimal. 88H
register digit ASCII code. digit ASCII code). (Specification range: 00H to 0CH)
(Specification range: 0 to 12)
MELSEC-Q/L series Index Specify 'Z' with 1- Specify the device number in decimal (2- Specify in hexadecimal. 48H
module register digit ASCII code. digit ASCII code). (Specification range: 0 to F)
(Specification range: 0 to 15)
Ex.
Index register (Z0)
Subcommand type ASCII code Binary code
For MELSEC-Q/L series
Z 0 0
00H 48H
5AH 30H 30H
Z 0 0
5AH 20H 30H 30H 00H 48H
Ex.
For long index register (LZ0)
Subcommand type ASCII code Binary code
For MELSEC iQ-R series
L Z 0 0
4CH 5AH 30H 30H 00H 88H
0 0 0
30H 30H 30H 00H 08H
0 0 0 0
30H 30H 30H 30H 00H 08H
APPENDICES APPENDIX
452 Appendix 1 Read/Write by Device Extension Specification
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.
ADRSET D100 D0
D100 (Access destination)
0 0 8 0 0 @ 0 0 0 0 0 0 0 D * 0 0 0 0 0 0 0 0 0
30H 30H 38H 30H 30H 40H 30H 30H 30H 30H 30H 30H 30H 44H 2AH 30H 30H 30H 30H 30H 30H 30H 30H 30H
80H 00H 00H 08H 00H 00H 00H A8H 00H 00H 00H 00H 00H
ADRSET D100 D4
D100 (Access destination)
0 0 8 0 0 @ 0 0 0 0 0 0 0 D * 0 0 0 0 0 0 Z 0 2
30H 30H 38H 30H 30H 40H 30H 30H 30H 30H 30H 30H 30H 44H 2AH 30H 30H 30H 30H 30H 30H 5AH 30H 32H
80H 00H 02H 48H 00H 00H 00H A8H 00H 00H 00H 00H 00H
APPENDICES APPENDIX
Appendix 1 Read/Write by Device Extension Specification 453
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.
For the number of scans required for processing a read/write request, refer to the following section.
Page 459 Number of scans required for processing
For the number of points processed per communication, refer to the following section.
Page 465 Number of Processing per One Communication
Reading data
E
N
Q
External device
Message wait time (TW) T4
C24
S
T
X
Read
transmission
CPU module
T0 T1 T2
Program
END 0 END 0 END 0 END 0 END
Writing data
E
N
Q
External device
Message wait time (TW) T4
C24
Checking the RUN/ A
STOP of the CPU C
K
Write
transmission
Write
transmission
Writing data
CPU module
T0 T1 T2 T5 T3
Program
END 0 END 0 END 0 END 0 END
The communication between C24 and CPU module is always performed after END. Therefore, the scan
time becomes longer according to the communication time (the time to interrupt to the CPU module).
The number of scans required for processing to request read/write operation to the CPU module differs
depending on the content of the request. For example, when a read operation that requires a scan is
requested, it takes an extra time of 1 scan + T2.
The number of scans required for the processing varies depending on the Service Processing Setting. It can
be set in the parameter settings of Engineering tool. For details of Service Processing Setting, refer to the
user's manual of the CPU module used.
APPENDICES APPENDIX
454 Appendix 2 Processing Time
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 scan time) + T2) or TW] + Response message transmission time (T4)
(When the value exceeds TW)
1000
T0, T4 = number of bits for 1 byte at transmission ( 1 + 7/8 + 0/1 + 1/2 ) number of bytes
Transmission rate
Stop bit
Start bit (1 or 2)
Data length Parity bit
(7 or 8) (0 or 1)
APPENDICES APPENDIX
Appendix 2 Processing Time 455
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).
Transmission time (T1) = (Transmission delay time + 1 scan time of the station on which the C24/E71 is loaded or internal processing time) (n + 1)
*1 (When this value is more than the internal processing time.) *2 *3
*1 Refer to the transmission delay time in the manual of the network system.
*2 n=6
When performing the initial communication to the relevant station after powering ON or resetting CPU
When performing communication to stations excluding the currently communicated 16 stations
n=1
When performing the second communication when the number of communication stations is 16 or less
When performing the second communication to the 16 stations communicated last
*3 When online program change is disabled in C24/E71, '1' is added only when writing data from external device.
(Set "Online change" with the "Switch setting" or "Parameter setting" of Engineering tool.)
Ex.
Normal transmission delay time
Ex.
Worst-case transmission delay time
APPENDICES APPENDIX
456 Appendix 2 Processing Time
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 23 When accessing CPU module)
Data transmission to the CPU module other than connected station (host station) on CC-Link IE,
MELSECNET/H, or MELSECNET/10 may be delayed considerably depending on conditions. The
transmission delay time can be shortened by limiting communication between an external device and the CPU
module to the station with C24/E71 mounted, and communicating with programmable controllers on other
stations by data link (LB, LW).
Transmission time (T1) = (Transmission delay time + 1 link scan time or internal processing time) (n + 1)
*1 (When this value is more than the internal processing time.) *2 *3
*1 Refer to the transmission delay time in the reference manual (remote I/O network) of the network system.
*2 n=6
When performing the initial communication to the relevant station after starting link.
When communicating with stations other than the latest 16 stations communicated with.
n=1
When performing the second communication when the number of communication stations is 16 or less
When performing the second communication to the 16 stations communicated last A
*3 When online program change is disabled in C24/E71, '1' is added only when writing data from external device.
(Set the parameter in the Switch Setting for C24. As for E71, set it in Operation Settings using Engineering tool.)
Ex.
When master station is one station
APPENDICES APPENDIX
Appendix 2 Processing Time 457
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 23 When accessing CPU module)
Data transmission to the CPU module other than connected station (host station) on MELSECNET/H may be
delayed considerably depending on conditions. The transmission delay time can be shortened by limiting
communication between an external device and the CPU module to the station with C24/E71 mounted, and
communicating with programmable controllers on other stations by data link (LB, LW).
APPENDICES APPENDIX
458 Appendix 2 Processing Time
Number of scans required for processing
APPENDICES APPENDIX
Appendix 2 Processing Time 459
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 1 1
Batch read in bit units 0001 0003 1 1
Batch write in word units 1401 0000 0002 1 2
Batch write in bit units 0001 0003 1 2
Random read and Random read in word units 0403 0000 0002 1 1
write
Random write in word units (test) 1402 0000 0002 1 2
Random write in bit units (test) 0001 0003 1 2
Batch read and write Batch read multiple blocks 0406 0000 0002 1 1
multiple blocks
Batch write multiple blocks 1406 0000 0002 1 2
Monitor device Register monitor data 0801 0000 0002 0 0
memory
Monitor 0802 0000 1 1
Buffer memory Intelligent function Batch read 0601 0000 1 1
access module
Batch write 1601 0000 1 2
Module control Remote control Read CPU model name 0101 0000 1 1
File control File check Read directory/file information 1810 0000 0040 1 1
Search directory/file information 1811 0000 0040 1 1
File creation and Create new file 1820 0000 0040 1 2
deletion
Delete file 1822 0000 0040 1 2
Copy file 1824 0000 0040 1 2
File modification Modify file attribute 1825 0000 0040 1 2
Modify file creation date and time 1826 0000 0040 1 2
Open file 1827 0000 0040 1 1
Read file 1828 0000 0040 1 1
Write to file 1829 0000 0040 1 2
Close file 182A 0000 0040 1 1
APPENDICES APPENDIX
460 Appendix 2 Processing Time
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.
Host station
Personal computer
Communication using engineering tool
1 2 3 4 1 2 1 Communication using the MC protocol
By setting routing parameters (communication route) in advance, accessing programmable controllers in the
following network systems are available.
CC-Link IE Controller Network
CC-Link IE Field Network A
MELSECNET/H
MELSECNET/10
Ethernet
Up to 8 target networks (relay stations: 7 stations) can be accessed.
When using C24/E71 in the multiple CPU system of RCPU, refer to the following manual.
MELSEC iQ-R Module Configuration Manual
APPENDICES APPENDIX
Appendix 3 Compatibility with Multiple CPU Systems 461
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) from external devices
Control CPU (set with Engineering tool) and non-control CPU of C24/E71 can be accessed.
The usable commands vary depending on the access target QCPU (control CPU, non-control CPU).
Using C24/E71 of which function version is A is also possible. In this case, QCPU No.1 is the control CPU of C24/E71.
Only the control CPU of C24/E71 can be accessed when accessing QCPU on the connected station (host station) from
external devices.
APPENDICES APPENDIX
462 Appendix 3 Compatibility with Multiple CPU Systems
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. The commands not listed in the following tables can be used
regardless of the CPU STOP/RUN status.
File handling
The file operation to specify the following files cannot be performed during RUN.
Type Command CPU module Target file
Write Copy file (command: 1824) RCPU Current execution file*1
Modify file attribute (command: 1825) Q/LCPU Parameter file (*.QPA)
Modify file creation date and time (command: 1826)
Current execution file of program
Write to file (command: 1829) memory (Drive name: 00H)
Write to file (command: 1203) QnACPU Parameter file (*.QPA)
Copy file (command: 1206) Currently executing file in the
Modify file information (command: 1204) built-in RAM (drive name: 00H)
Modify file name, attribute, file size (command: 1204)
Batch modify file information (command: 1204)
Deleting Delete file (command: 1822) RCPU Current execution file*1
Q/LCPU Program file (*.QPG)
Delete file (command: 1205) QnACPU
Parameter file (*.QPA)
Boot setting file (*.QBT) A
*1 For details on the operations for the files of RCPU, refer to the following manual.
MELSEC iQ-R CPU Module User's Manual (Application)
Module control
Type Command CPU module
Remote control Remote latch clear (command: 1005) RCPU
Remote RESET (command: 1006)
Q/LCPU
Defragmentation of Defragment drive memory (command: 1207) QnACPU
drive memory
APPENDICES APPENDIX
Appendix 4 Applicable Commands for Online Program Change 463
Commands for 4C /3C/2C/4E/3E frame
Type Command 4C, 3C, 4E, 3E 2C
Device access Batch write in word units 1401 4
Batch write in bit units 3
Random write in word units (test) 1402 7
Random write in bit units (test) 6
Batch write multiple blocks 1406
Label access Batch write array type labels 141A
Random write labels 1418
File control Create new file 1820
Delete file 1822
Copy file*1 1824
Modify file attribute 1825
Modify file creation date and time 1826
Write to file 1829
Create new file 1202
Write to file 1203
Modify file information 1204
Delete file 1205
*1 For E71, data can be copied even if Online program change function is set to prohibit.
GX Works3
C24: "Module Parameter" screen (transmission setting)
E71: "Module Parameter" screen (Own Node Settings)
GX Works2
C24: "Switch Settings" screen of Intelligent functional module (Transmission setting)
E71: "Ethernet Operation Setting" screen
GX Developer
C24: "Switch Setting for I/O and Intelligent Function Module" screen (Switch 1, b6 of switch 3)
E71: "Ethernet Operation Setting" screen
APPENDICES APPENDIX
464 Appendix 4 Applicable Commands for Online Program Change
Appendix 5 Number of Processing per One
Communication
The following shows the number of processing per one communication with each command.
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 471 Accessible Modules for Each Command
Function Command Subcommand Condition Number of points processed per
communication
R/Q/L QnA A
Batch read Batch read in word units 0401 0000 Word device points 960 points 480 points 64 points
and write 0002
Bit device points 960 words 480 words 32 words
(15360 (7680 (512 points)
points) points)
Batch read in bit units 0001 C24 7904 points 3952 points 256 points
0003
E71 (ASCII code) 3584 points 1792 points
E71 (Binary code) 7168 points 3584 points
Batch write in word units 1401 0000 Word device points 960 points 480 points 64 points
0002
Bit device points 960 words 480 words 10 words
(15360 (7680 (160 points)
points) points) A
Batch write in bit units 0001 C24 7904 points 3952 points 160 points
0003
E71 (ASCII code) 3584 points 1792 points
E71 (Binary code) 7168 points 3584 points
Random Random read in word units 0403 0000 Number of word access 192 points 96 points
read and points + Number of double
0002 96 points
write word access points
008
Random write in word units 1402 0000 (Number of word access 1920 points 960 points 10 points
(test) points 12) + (Number of
0002 960 points
double word access points
008
14)
Random write in bit units 0001 Number of bit access points 188 points 94 points 20 points
(test)
0003 94 points
008
Batch read Batch read multiple blocks 0406 0000 Number of word device blocks 120 points
and write + Number of bit device blocks
0002 60 points
multiple
008
blocks
Batch write multiple blocks 1406 0000 120 points
0002 60 points
008
Monitor Register monitor data 0801 0000 Number of word access 192 points 96 points
device points + Number of double
0002 96 points
memory word access points
008
Monitor 0802 0000 Read data (Number of registered points)
APPENDICES APPENDIX
Appendix 5 Number of Processing per One Communication 465
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 Random read labels 041C 0000
Random write labels 141B 0000
Module control
Function Command Subcommand Number of points processed per
communication
Remote control Remote RUN 1001 0000 (1 station)
Remote STOP 1002 0000 (1 station)
Remote PAUSE 1003 0000 (1 station)
Remote latch clear 1005 0000 (1 station)
Remote RESET 1006 0000 (1 station)
Read CPU model name 0101 0000 (1 station)
Remote password Unlock 1630 0000
Lock 1631 0000
Loopback test 0619 0000 960 bytes (applicable only with a connected
station)
Clear error information 1617 000 (1 station)
APPENDICES APPENDIX
466 Appendix 5 Number of Processing per One Communication
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 0000 (for 1)
0004
0040
Copy file 1824 0000 (for 1)
0004
0040
File modification Modify file attribute 1825 0000 (for 1)
0004
0040
Modify file creation date and 1826 0000 (for 1)
time 0040
Open file 1827 0000 (for 1)
0004
0040
Read file 1828 0000 1920 bytes
0040
Write to file 1829 0000 1920 bytes
0040
Close file 182A 0000 (for 1)
0040
APPENDICES APPENDIX
Appendix 5 Number of Processing per One Communication 467
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 0202 0000 (for 16)
statement
Read file presence 0203 0000 (for 1)
(Search file)
Read file No. usage status 0204 0000 (for 256)
Read file 0206 0000 960 bytes
Lock file 0808 0001 (for 1)
0000
Create new file (Register file name) 1202 0000 (for 1)
Write to file 1203 0000 960 bytes
0001 For file size
Modify file information 1204 0000 (for 1)
0001
0002
Delete file 1205 0000 (for 1)
Copy file 1206 0000 480 bytes
APPENDICES APPENDIX
468 Appendix 5 Number of Processing per One Communication
Commands for 2C frame
Refer to the processing points of the corresponding commands for 4C/3C/4E/3E frame
*1 For ACPU other than AnA/AnU, device X (input) has two processing points per point. When the X is included in the specified device, set
the number of device points to meet the following.
((Specified points for X 2) + Specified points for other devices) Number of points processed per communication.
If only X is specified, the number of points processed per one communication will be one half the value shown in the table.
APPENDICES APPENDIX
Appendix 5 Number of Processing per One Communication 469
Commands for 1E frame
Function Command Number of points processed per communication
Device memory Batch read Bit units 00H 256 points
Word units Bit device 01H 128 words (2048 points)
Word device 256 points
Batch write Bit units 02H 256 points
Word units Bit device 03H 40 words (640 points)
Word device 256 points
Test (random write) Bit units 04H 80 points
Word units Bit device 05H 40 words (640 points)
Word device 40 points
Register monitor data Bit units 06H 40 points*1
Word units Bit device 07H 20 words (320 points)*1
Word device 20 points
Monitor Bit units 08H Number of registered points
Word units 09H Number of registered points
Extended file Batch read 17H 256 points
register
Batch write 18H 256 points
Test (random write) 19H 40 points
Register monitor data 1AH 20 points
Monitor 1BH
Direct read 3BH 256 points
Direct write 3CH 256 points
Special function Batch read 0EH 256 bytes (128 words)
module Batch write 0FH 256 bytes (128 words)
*1 For ACPU other than AnA/AnU, device X (input) has two processing points per point. When the X is included in the specified device, set
the number of device points to meet the following.
((Specified points for X 2) + Specified points for other devices) Number of points processed per communication.
If only X is specified, the number of points processed per one communication will be one half the value shown in the table.
APPENDICES APPENDIX
470 Appendix 5 Number of Processing per One Communication
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.
Device access
: Executable, : Executable (with restrictions), : Not executable
Function Command Subcommand Access target Reference
CPU module Remote I/O Head
R L Q QnA A QS H 10 R L
*1 *1
Batch read 0401 0000 Page 88 Batch read in word
and write 0080 units (command: 0401)
0002 *2 *2 A
0082
0001 *1 *1 Page 92 Batch read in bit
0081 units (command: 0401)
0003 *2 *2
0083
1401 0000 *1 *1 Page 94 Batch write in word
0080 units (command: 1401)
0002 *2 *2
0082
0001 *1 *1 Page 97 Batch write in bit
0081 units (command: 1401)
0003 *2 *2
0083
Random 0403 0000 *1 *1 Page 99 Random read in
read and 0080 word units (command: 0403)
write 0040 *3
00C0
0002 *2 *2
0082
1402 0000 *1 *1 Page 106 Random write in
0080 word units (test) (command:
0002 *2 *2 1402)
0082
0001 *1 *1 Page 110 Random write in bit
0081 units (test) (command: 1402)
0003 *2 *2
0083
APPENDICES APPENDIX
Appendix 6 Accessible Modules for Each Command 471
Function Command Subcommand Access target Reference
CPU module Remote I/O Head
R L Q QnA A QS H 10 R L
Batch read 0406 0000 *1 *4 *1 Page 112 Batch read multiple
and write 0080 blocks (command: 0406)
multiple
0002 *2 *2
blocks
0082
1406 0000 *1 *4 *1 Page 116 Batch write multiple
0080 blocks (command: 1406)
0002 *2 *2
0082
Monitor 0801 0000 *1 *1 Page 121 Register monitor
device 0080 data (command: 0801)
memory
0040 *3
00C0
0002 *2 *2
0082
0802 0000 Page 122 Monitor
(command: 0802)
*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.
*4 QnACPU and Q2AS(H) CPU with the version 9707B or later can be used.
Label access
The command can be used when both access target and connected station are MELSEC iQ-R series module.
Page 125 LABEL ACCESS
*1 The command can only be used for C24 (including multidrop connection station) and E71 connected to the external device.
APPENDICES APPENDIX
472 Appendix 6 Accessible Modules for Each Command
Module control
: Executable, : Executable (with restrictions), : Not executable
Function Command Subcommand Access target Reference
CPU module Remote I/O Head
R L Q QnA A QS H 10 R L
Remote 1001 0000 Page 173 Remote RUN
control (command: 1001)
1002 0000 Page 175 Remote STOP
(command: 1002)
1003 0000 Page 176 Remote PAUSE
(command: 1003)
1005 0000 Page 177 Remote latch clear
(command: 1005)
1006 0000 Page 178 Remote RESET
(command: 1006)
0101 0000 Page 179 Read CPU model
name (command: 0101)
Remote 1630 0000 *1 Page 181 Unlock (command:
password 1630)
1631 0000 *2 Page 183 Lock (command:
1631)
Loopback 0619 0000 *1 Page 185 Loopback test
test (command: 0619)
Clear error 1617 0000 *1 Page 187 Turn indicator LED
information OFF, initialize error code
(command: 1617)
*1 The command can only be used for C24 (including multidrop connection station) and E71 connected to the external device.
*2 The command can only be used for E71 connected to an external device.
File control A
: Executable, : Executable (with restrictions), : Not executable
Function Command Subcommand Access target Reference
CPU module Remote I/O Head
R L Q QnA A QS H 10 R L
File check 1810 0000 Page 211 Read directory/file
information (command:
0040 *1 *1
1810)
1811 0000 Page 217 Search directory/
file information (command:
0040 *1 *1
1811)
File 1820 0000 Page 220 Create new file
creation *1 *1 (command: 1820)
0040
and
deletion 1822 0000 *2 *2 Page 223 Delete file
(command: 1822)
0004 *3
0040 *1 *1
*2
1824 0000 *2 Page 226 Copy file
*3 (command: 1824)
0004
0040 *1 *1
APPENDICES APPENDIX
Appendix 6 Accessible Modules for Each Command 473
Function Command Subcommand Access target Reference
CPU module Remote I/O Head
R L Q QnA A QS H 10 R L
Modify file 1825 0000 *2 *2 Page 230 Modify file
attribute (command: 1825)
0004 *3
0040 *1 *1
1826 0000 Page 233 Modify file
creation date and time
0040 *1 *1
(command: 1826)
1827 0000 *2 *2 Page 236 Open file
*3 (command: 1827)
0004
0040 *1 *1
1828 0000 Page 240 Read file
(command: 1828)
1829 0000 Page 242 Write to file
(command: 1829)
182A 0000 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.
*1 Specify the device with the specification method of MELSEC-Q/L series. The added new devices their ranges cannot be specified.
APPENDICES APPENDIX
474 Appendix 6 Accessible Modules for Each Command
Commands for 1C frame
: Executable, :Not executable
Function Command Access target Reference
CPU module Remote I/O Head
R L Q*1 QnA A QS H R
Device Batch Bit units BR *2 *2 *2 *2 *2 *2 *2 Page 354 Batch read (bit
memory read JR units) (command: BR,
JR)
Word units WR *2 *2 *2 *2 *2 *2 *2 Page 356 Batch read
QR (word units) (command:
WR, QR)
Batch Bit units BW *2 *2 *2 *2 *2 *2 Page 358 Batch write
write JW (bit units) (command:
BW, JW)
Word units WW *2 *2 *2 *2 *2 *2 Page 360 Batch write
QW (word units) (command:
WW, QW)
Test Bit units BT *2 *2 *2 *2 *2 *2 Page 362 Test (random
(random JT write) (bit units)
write) (command: BT, JT)
Word units WT *2 *2 *2 *2 *2 *2 Page 364 Test (random
QT write) (word units)
(command: WT, QT)
Register Bit units BM *2 *2 *2 *2 *2 *2 Page 367 Register
monitor JM monitor data (bit units)
data (command: BM, JM)
Word units WM *2 *2 *2 *2 *2 *2 Page 368 Register
QM monitor data (word units)
(command: WM, QM)
Monitor Bit units MB Page 369 Monitor (bit
MJ units) (command: MB,
MJ)
A
Word units MN Page 370 Monitor (word
MQ units) (command: MN,
MQ)
Extended Batch read ER Page 375 Batch read
file (command: ER)
register
Batch write EW Page 376 Batch write
(command: EW)
Test (random write) ET Page 377 Test (random
write) (command: ET)
Register monitor data EM Page 379 Register
monitor data (command:
EM)
Monitor ME Page 380 Monitor
(command: ME)
Direct Word units NR Page 381 Direct read
read (command: NR)
Direct Word units NW Page 382 Direct write
write (command: NW)
Special Batch read TR Page 386 Batch read
function (command: TR)
module
Batch write TW Page 388 Batch write
(command: TW)
Loopback test TT *3 Page 389 Loopback test
(Command: TT)
*1 When accessing Universal model QCPU, use the module with a serial number whose first five digits are '10102' or later. If using a
module with a serial number whose first five digits are '10101' or earlier, access with 2C/3C/4C frame.
*2 Read/write the devices within the range of AnCPU, AnNCPU, AnACPU, or AnUCPU. The added new devices and their ranges cannot
be specified.
*3 The command can only be used for C24 (including multidrop connection station) connected to the external device.
APPENDICES APPENDIX
Appendix 6 Accessible Modules for Each Command 475
Commands for 1E frame
: Executable, :Not executable
Function Command Access target Reference
CPU module
L Q*1 Qn A QS
A
Device memory Batch read Bit units 00H *2 *2 *2 *2 Page 403 Batch read in bit units (command: 00)
*2 *2 *2
Word units 01H *2 Page 405 Batch read in word units (command: 01)
Batch write Bit units 02H *2 *2 *2 Page 407 Batch write in bit units (command: 02)
Word units 03H *2 *2 *2 Page 409 Batch write in word units (command: 03)
*2 *2
Test (random Bit units 04H *2 Page 410 Test in bit units (random write) (command:
write) 04)
Word units 05H *2 *2 *2 Page 412 Test in word units (random write) (command:
05)
Register Bit units 06H *2 *2 *2 Page 415 Register monitor data(command: 06, 07)
monitor Word units 07H *2
*2
*2
data*3
Monitor Bit units 08H Page 416 Monitor in bit units (command: 08)
Page 417 Monitor in word units (command: 09)
Word units 09H
Extended file Batch read 17H Page 419 Batch read (command: 17)
register Batch write 18H Page 421 Batch write (command: 18)
Test (random write) 19H Page 423 Test (random write) (command: 19)
Register monitor data*3 1AH Page 426 Register monitor data (command: 1A)
Monitor 1BH Page 427 Monitoring (command: 1B)
Direct read 3BH Page 428 Direct read (command: 3B)
Direct write 3CH Page 430 Direct write (command: 3C)
Special function Batch read 0EH Page 434 Batch read (command: 0E)
module
Batch write 0FH Page 436 Batch write (command: 0F)
*1 When accessing Universal model QCPU, use the module with a serial number whose first five digits are '10102' or later. If using a
module with a serial number whose first five digits are '10101' or earlier, access with 3E/4E frame.
In addition, when accessing a built-in Ethernet port CPU, refer to the following manual.
QnUCPU User's Manual (Communication via Built-in Ethernet Port)
*2 Read/write the devices within the range of AnACPU. The added new devices and their ranges cannot be specified.
*3 The devices that can be registered to E71 is for 1 command out of the three types of commands (06H, 07H, 1AH).
The specified device recently used by any of the above commands is registered to E71.
APPENDICES APPENDIX
476 Appendix 6 Accessible Modules for Each Command
Appendix 7 Setting Examples
This section explains the setting example of the message.
Device reading
Format 1 (sum check enabled), 3C frame
Access target: QCPU of the connected station (host station)
Command: Batch read in word units (command: 0401)
Device: M100 to M131 (for 2 words)
0 4 0 1 0 0 0 0 M * 0 0 0 1 0 0 0 0 0 2 0 A A
30H 34H 30H 31H 30H 30H 30H 30H 4DH 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 32H 30H 41H
The subtotal of the additional value of binary data = 3DFH
*1 The addition result of the sum check range: 22BH + 18F = 3BAH
*2 The value of read data corresponds to the access target device as follows.
1 2 3 4 0 0 0 2
31H 32H 33H 34H 30H 30H 30H 32H
1 2 3 4 0 0 0 2
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 to M100 M131 to M116
APPENDICES APPENDIX
Appendix 7 Setting Examples 477
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)
Request data
Command Subcommand Device code Head device number Number of device points
1 4 0 1 0 0 0 0 M * 0 0 0 1 0 0 0 0 0 2
31H 34H 30H 31H 30H 30H 30H 30H 4DH 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 32H
The subtotal of the additional value of binary data = 3E0H
*1 The addition result of the sum check range: 22BH + 3E0H + 1C2H = 7CDH
*2 The value of write data corresponds to the access target device as follows.
2 3 4 7 A B 9 6
32H 33H 34H 37H 41H 42H 39H 36H
2 3 4 7 A B 9 6
0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 1 0 0 OFF
1 ON
M115 to M100 M131 to M116
APPENDICES APPENDIX
478 Appendix 7 Setting Examples
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)
Command: Batch read in word units (command: 0401)
Device: M100 to M131 (for 2 words)
*1 Frame ID No. (1 byte) + Access route (7 bytes) + Request data (10 bytes)
*2 The addition result of the sum check range: 30BH + FBH = 406H
2. Receive the result. A
Response message (Normal completion: Response data)
Control code Number of data Frame ID Access route
bytes*1 No. Station Network No. PC No. Request Request Self-
No. destination destination station
module I/O No. module station No.
No.
DLE STX 16 bytes 4C frame Host station
10H 02H 10H 10H 00H F8H 00H 00H FFH FFH 03H 00H 00H
*2 The subtotal of the additional value of binary data = 309H
Response ID Normal Response data (read data)*4 Control code Sum check code*3
code completion code
FFFFH 0000H M100 to M115 M116 to M131 DLE ETX 4 F
FFH FFH 00H 00H 34H 12H 02H 00H 10H 03H 34H 46H
The subtotal of the additional value of binary data = 246H
*1 Frame ID No. (1 byte) + Access route (7 bytes) + Response ID code (2 bytes) + Normal completion code (2 bytes) + Response data (4
bytes)
*2 Additional code. Calculate the sum check code except for the additional code. (Page 35 Additional code (10H))
*3 The addition result of the sum check range: 309H + 246h = 54FH
*4 The value of read data corresponds to the access target device as follows.
3 4 1 2 0 2 0 0
0 = OFF
0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 = ON
M107 to M100 M115 to M108 M123 to M116 M131 to M124
APPENDICES APPENDIX
Appendix 7 Setting Examples 479
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)
*1 Frame ID No. (1 byte) + Access route (7 bytes) + Request data (14 bytes)
*2 The addition result of the sum check range: 30FH + 2B6H = 5C5H
*3 The value of write data corresponds to the access target device as follows.
4 7 2 3 9 6 A B
0 = OFF
0 1 0 0 0 1 1 1 0 0 1 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 0 1 0 1 1 1 = ON
M107 to M100 M115 to M108 M123 to M116 M131 to M124
2. Receive the result.
Response message (Normal completion: No response data)
Control code Number of data Frame ID Access route
bytes*1 No. Station Network No. PC No. Request Request Self-
No. destination destination station
module I/O No. module station No.
No.
DLE STX 12 bytes 4C frame Host station
10H 02H 0CH 00H F8H 00H 00H FFH FFH 03H 00H 00H
The subtotal of the additional value of binary data = 305H
Response ID code Normal completion code Control code Sum check code*2
FFFFH 0000H DLE ETX 0 3
FFH FFH 00H 00H 10H 03H 30H 33H
The subtotal of the additional value of binary data = 1FEH
*1 Frame ID No. (1 byte) + Access route (7 bytes) + Response ID code (2 bytes) + Normal completion code (2 bytes)
*2 The addition result of the sum check range: 305H + 1FEH = 503H
APPENDICES APPENDIX
480 Appendix 7 Setting Examples
Setting examples of message for Ethernet interface module
The following shows the setting example when using a command from an Ethernet interface module.
Device reading
ASCII code, 3E frame
Access target: QCPU of the connected station (host station)
Command: Batch read in word units (command: 0401)
Device: M100 to M131 (for 2 words)
Request data
Command Subcommand Device code Head device number Number of device points
0 4 0 1 0 0 0 0 M * 0 0 0 1 0 0 0 0 0 2
30H 34H 30H 31H 30H 30H 30H 30H 4DH 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 32H
1 2 3 4 0 0 0 2
31H 32H 33H 34H 30H 30H 30H 32H
1 2 3 4 0 0 0 2
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 to M100 M131 to M116
APPENDICES APPENDIX
Appendix 7 Setting Examples 481
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)
Request data
Command Subcommand Device code Head device number Number of device points
1 4 0 1 0 0 0 0 M * 0 0 0 1 0 0 0 0 0 2
31H 34H 30H 31H 30H 30H 30H 30H 4DH 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 32H
Request data
Write data*2
2 3 4 7 A B 9 6
32H 33H 34H 37H 41H 42H 39H 36H
2 3 4 7 A B 9 6
32H 33H 34H 37H 41H 42H 39H 36H
2 3 4 7 A B 9 6
0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 1 0 0 OFF
1 ON
M115 to M100 M131 to M116
APPENDICES APPENDIX
482 Appendix 7 Setting Examples
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)
Command: Batch read in word units (command: 0401)
Device: M100 to M131 (for 2 words)
Request data
Command Subcommand Head device number Device code Number of device
points
0401 0000 100 M 2
01H 04H 00H 00H 64H 00H 00H 90H 02H 00H
3 4 1 2 0 2 0 0
0 = OFF
0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 = ON
M107 to M100 M115 to M108 M123 to M116 M131 to M124
APPENDICES APPENDIX
Appendix 7 Setting Examples 483
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)
Request data
Command Subcomman Head device Device code Number of Write data*2
d number device points
1401 0000 100 M 2 M100 to M115 M116 to M131
01H 14H 00H 00H 64H 00H 00H 90H 02H 00H 47H 23H 96H ABH
4 7 2 3 9 6 A B
0 = OFF
0 1 0 0 0 1 1 1 0 0 1 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 0 1 0 1 1 1 = ON
M107 to M100 M115 to M108 M123 to M116 M131 to M124
2. Receive the result.
Response message (Normal completion: No response data)
Subheader Access route Response data End code
Network No. PC No. Request Request length*1
destination destination
module I/O No. module station
No.
3E frame (response) Host station 2 0000H
D0H 00H 00H FFH FFH 03H 00H 02H 00H 00H 00H
APPENDICES APPENDIX
484 Appendix 7 Setting Examples
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
External device
Connected station
(Host station) :Access target station
: Unnecessary
Access target Frame Station No. Network No. PC No. Request Request Self-
destination destination station
module I/O No. module station No.
No.
Connected station (host 4C 00 00 FF 03FF 00 00
station)
3C 00 00 FF 00
2C 00 00
1C 00 FF
4E/3E 00 FF 03FF 00
1E FF
Multiple CPU system 4C 00 00 FF 03E0 00 00
(Multiple CPU No.1)
4E/3E 00 FF 03E0 00
Redundant system 4C 00 00 FF 03D0 00 00 A
(Control system CPU)
4E/3E 00 FF 03D0 00
Specify the CPU module of an access target in the request destination module I/O No.
Page 57 Accessing multiple CPU system, redundant system
APPENDICES APPENDIX
Appendix 7 Setting Examples 485
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.
The following shows setting examples for accessing a multidrop connection station.
External device
Multidrop connection
Station No.1
:Access target station
(Station specified to the station No.)
External device
Multidrop connection
(Global function)
: Unnecessary
Access target Frame Station No. Network No. PC No. Request Request Self-
destination destination station
module I/O No. module station No.
No.
Multidrop connection station 4C 01 00 FF 03FF 00 00
Station No.1
3C 01 00 FF 00
2C 01 00
1C 01 FF
All stations connected with a 4C FF 00 FF 03FF 00 00
multidrop connection
3C FF 00 FF 00
(Global function)
2C FF 00
Multidrop connection station 4C 01 00 FF 03FF 00 1F
(At m:n connection)
3C 01 00 FF 1F
Station No.1
Station No.31 (1FH) of the 2C 01 1F
external device
APPENDICES APPENDIX
486 Appendix 7 Setting Examples
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. and the request destination module station No. For the request destination I/O No.,
specify the value obtained by dividing the start input/output number by 16 in 4 digits (hexadecimal).
The following shows the setting example of the cases below.
Multidrop connection source module of the relay station: Start input/output number 0050H (request destination module I/O
No.0005H)
Multidrop connection station of the access target: Station No.1
External device
: Unnecessary
Access target Frame Station No. Network No. PC No. Request Request Self-
destination destination station
module I/O No. module station No.
No.
Multidrop connection station 4E/3E 00 FF 0005 01
External device
Connected station
(Host station) Station No.2
Network
No.1 :Access target station
(Station specified to the network No. and PC No.)
Other stations
: Unnecessary
Access target Frame Station No. Network No. PC No. Request Request Self-
destination destination station
module I/O No. module station No.
No.
Other station via network 4C 00 01 02 03FF 00 00
Network No.1
3C 00 01 02 00
Station No.2
4E/3E 01 02 03FF 00
Other station accessed 4C 00 FE 02 03FF 00 00
via the network module
3C 00 FE 02 00
set in the "Valid Module
During Other Station 1C 00 02
Access" setting. 4E/3E FE 02 03FF 00
Station No.2
1E 02
APPENDICES APPENDIX
Appendix 7 Setting Examples 487
Connecting with a multidrop link and via network
The following shows setting examples for connecting with a multidrop connection and via network.
: Unnecessary
Access target Frame Station No. Network No. PC No. Request Request Self-
destination destination station
module I/O No. module station No.
No.
Other stations via 4C 01 01 02 03FF 00 00
network from a multidrop
3C 01 01 02 00
connection
External device
Connected station (Relay station) Multidrop connection
(Host station)
Station No.2 :Station specified to the network No.
and PC No.
Network
No.1 :Station specified to the request
Station No.1 destination module I/O No.
Start
:Access target station
input/output No.
(Station specified to the request
0005 destination module station No.)
: Unnecessary
Access target Frame Station No. Network No. PC No. Request Request Self-
destination destination station
module I/O No. module station No.
No.
Multidrop connection 4C 00 01 02 0005 01 00
station via network
4E/3E 01 02 0005 01
APPENDICES APPENDIX
488 Appendix 7 Setting Examples
MEMO
APPENDICES APPENDIX
Appendix 7 Setting Examples 489
INDEX
0 to 9 H
1C frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 28,47 Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42
1E frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 40,49
2C frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 28,46
I
3C frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 28,46
3E frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 40,48 Index modification . . . . . . . . . . . . . . . . . . . . . . .446
4C frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 28,45 Intelligent function module . . . . . . . . . . . . . . . . .159
4E frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 40,48
K
A
Keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290
Accessible module . . . . . . . . . . . . . . . . . . . . . . 20
Accessible range . . . . . . . . . . . . . . . . . . . . . . . 20
ACPU monitoring timer . . . . . . . . . . . . . . . . . . 394 L
Additional code . . . . . . . . . . . . . . . . . . . . . . . . . 35 Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . . 28,39 LED OFF . . . . . . . . . . . . . . . . . . . . . . . . . 187,189
Link device. . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
B Loopback test. . . . . . . . . . . . . . . . . . . . . . 185,389
D O
Device . . . . . . . . . . . . . . . . . . . . . . 14,67,350,397 On-demand function . . . . . . . . . . . . . . . . . . . . .280
Device code . . . . . . . . . . . . . . . . . . . . 68,351,397 Online program change . . . . . . . . . . . . . . . . . . .463
Device extension specification . . . . . . . . . . . . . 438 Other station . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Drive memory . . . . . . . . . . . . . . . . . . . . . . . . . 289
P
E
Password. . . . . . . . . . . . . . . . . . . . . . . . . . . . .195
Error code . . . . . . . . . . . . . . . . . . . . . . . . . 38,348 PC No. . . . . . . . . . . . . . . . . . . . . . . . . . . . 52,393
Error information . . . . . . . . . . . . . . . . . . . . . . . . 44 Processing time . . . . . . . . . . . . . . . . . . . . . . . .454
Extended file register . . . . . . . . . . . . . . . . . 371,418 Processing timing of CPU module . . . . . . . . . . . .23
Programmable controller CPU monitoring
F function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .266
File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190,297
Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 R
Format 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Relay station . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Format 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Remote operation . . . . . . . . . . . . . . . . . . . . . . .173
Format 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Remote password . . . . . . . . . . . . . . . . . . . . . . .180
Format 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Request destination module I/O number . . . . . . . .55
Format 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Request destination module station No. . . . . . . . .55
Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28,40 Request message . . . . . . . . . . . . . . . . . . . . . . . .14
Frame ID No. . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Response message . . . . . . . . . . . . . . . . . . . . . .14
G S
Global function . . . . . . . . . . . . . . . . . . . . . . . . 255 Self-station No.. . . . . . . . . . . . . . . . . . . . . . . . . .59
Serial communication function . . . . . . . . . . . 21,460
Serial number. . . . . . . . . . . . . . . . . . . . . . . . . . .42
490
Special function module . . . . . . . . . . . . . . . 383,432
Station No. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Subheader . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Sum check code . . . . . . . . . . . . . . . . . . . . . . . . 36
T
Transmission sequence initialization function . . . 258
Transmission time when accessing other
stations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
U
User frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
491
REVISIONS
*The manual number is given on the bottom left of the back cover.
Revision date *Manual number Description
December 1999 SH(NA)-080008-A Due to the transition to the e-Manual, the details of revision have been deleted.
to to
July 2013 SH(NA)-080008-S
June 2014 SH(NA)-080008-T Complete revision (layout change)
Added models
RJ71C24, RJ71C24-R2, RJ71C24-R4
July 2014 SH(NA)-080008-U Minor correction.
August 2015 SH(NA)-080008-V Added or modified parts
Section 6.2, Section 8.1, Section 8.2, Section 8.3, Section 8.4, Section 8.5, Chapter 9, Section 12.4,
Appendix 7
May 2016 SH(NA)-080008-W Added or modified parts
Section 3.2, Section 6.2, Section 8.1, Section 8.2, Section 8.3, Section 8.4, Chapter 9, Section 11.1,
Section 12.4, Appendix 6
492
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.
However, if repairs are required onsite at domestic or overseas location, expenses to send an engineer will be solely at
the customer's discretion. Mitsubishi shall not be held responsible for any re-commissioning, maintenance, or testing
on-site that involves replacement of the failed module.
[Gratis Warranty Term]
The gratis warranty term of the product shall be for one year after the date of purchase or delivery to a designated place.
Note that after manufacture and shipment from Mitsubishi, the maximum distribution period shall be six (6) months, and
the longest gratis warranty term after manufacturing shall be eighteen (18) months. The gratis warranty term of repair
parts shall not exceed the gratis warranty term before repairs.
[Gratis Warranty Range]
(1) The range shall be limited to normal use within the usage state, usage methods and usage environment, etc., which
follow the conditions and precautions, etc., given in the instruction manual, user's manual and caution labels on the
product.
(2) Even within the gratis warranty term, repairs shall be charged for in the following cases.
1. Failure occurring from inappropriate storage or handling, carelessness or negligence by the user. Failure caused
by the user's hardware or software design.
2. Failure caused by unapproved modifications, etc., to the product by the user.
3. When the Mitsubishi product is assembled into a user's device, Failure that could have been avoided if functions
or structures, judged as necessary in the legal safety measures the user's device is subject to or as necessary by
industry standards, had been provided.
4. Failure that could have been avoided if consumable parts (battery, backlight, fuse, etc.) designated in the
instruction manual had been correctly serviced or replaced.
5. Failure caused by external irresistible forces such as fires or abnormal voltages, and Failure caused by force
majeure such as earthquakes, lightning, wind and water damage.
6. Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi.
7. Any other failure found not to be the responsibility of Mitsubishi or that admitted not to be so by the user.
2. Onerous repair term after discontinuation of production
(1) Mitsubishi shall accept onerous product repairs for seven (7) years after production of the product is discontinued.
Discontinuation of production shall be notified with Mitsubishi Technical Bulletins, etc.
(2) Product supply (including repair parts) is not available after production is discontinued.
3. Overseas service
Overseas, repairs shall be accepted by Mitsubishi's local overseas FA Center. Note that the repair conditions at each FA
Center may differ.
4. Exclusion of loss in opportunity and secondary loss from warranty liability
Regardless of the gratis warranty term, Mitsubishi shall not be liable for compensation to:
(1) Damages caused by any cause found not to be the responsibility of Mitsubishi.
(2) Loss in opportunity, lost profits incurred to the user by Failures of Mitsubishi products.
(3) Special damages and secondary damages whether foreseeable or not, compensation for accidents, and
compensation for damages to products other than Mitsubishi products.
(4) Replacement by the user, maintenance of on-site equipment, start-up test run and other tasks.
5. Changes in product specifications
The specifications given in the catalogs, manuals or technical documents are subject to change without prior notice.
493
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.
In some cases, trademark symbols such as '' or '' are not specified in this manual.
494
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.