0% found this document useful (0 votes)
9 views236 pages

bcnp59990381t

This document provides safety precautions and conditions of use for Mitsubishi Electric's MELSEC iQ-R series programmable controllers, emphasizing the importance of adhering to guidelines to prevent hazardous situations. It categorizes safety warnings into 'WARNING' and 'CAUTION' levels and outlines prohibited applications where the product should not be used. Additionally, it introduces the relevant products and modules associated with the MELSEC iQ-R series and encourages users to familiarize themselves with the manual for proper handling.

Uploaded by

Mar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views236 pages

bcnp59990381t

This document provides safety precautions and conditions of use for Mitsubishi Electric's MELSEC iQ-R series programmable controllers, emphasizing the importance of adhering to guidelines to prevent hazardous situations. It categorizes safety warnings into 'WARNING' and 'CAUTION' levels and outlines prohibited applications where the product should not be used. Additionally, it introduces the relevant products and modules associated with the MELSEC iQ-R series and encourages users to familiarize themselves with the manual for proper handling.

Uploaded by

Mar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 236

MELSEC iQ-R Ethernet, CC-Link IE, and

MELSECNET/H Function Block Reference


SAFETY PRECAUTIONS
(Read these precautions before using Mitsubishi Electric programmable controllers.)
Before using the products described under "Relevant products", please read this manual and the relevant manuals carefully
and pay full attention to safety to handle the products correctly.
The precautions given in this manual are concerned with the products only. For the safety precautions of the programmable
controller system, refer to the MELSEC iQ-R Module Configuration Manual.
In this manual, the safety precautions are classified into two levels: " WARNING" and " CAUTION".

Indicates that incorrect handling may cause hazardous conditions, resulting in


WARNING death or severe injury.

Indicates that incorrect handling may cause hazardous conditions, resulting in


CAUTION minor or moderate injury or property damage.

Under some circumstances, failure to observe the precautions given under " CAUTION" may lead to serious
consequences.
Observe the precautions of both levels because they are important for personal and system safety.
Make sure that the end users read this manual and then keep the manual in a safe place for future reference.

1
CONDITIONS OF USE FOR THE PRODUCT
(1) MELSEC 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 ELECTRIC 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 ELECTRIC USER'S, 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 Electric 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 Electric 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 Electric representative in your region.
(3) Mitsubishi Electric shall have no responsibility or liability for any problems involving programmable controller trouble and
system trouble caused by DoS attacks, unauthorized access, computer viruses, and other cyberattacks.

INTRODUCTION
Thank you for purchasing the Mitsubishi Electric MELSEC iQ-R series programmable controllers.
This manual describes the module function blocks for the relevant products listed below.
Before using the products, please read this manual and the relevant manuals carefully and develop familiarity with the
functions and performance of the MELSEC iQ-R series programmable controller to handle the products correctly.
When applying the program examples provided in this manual to an actual system, ensure the applicability and confirm that it
will not cause system control problems.
Please make sure that the end users read this manual.

Relevant products
Item Model
Ethernet-equipped module RJ71EN71, R04ENCPU, R08ENCPU, R16ENCPU, R32ENCPU, R120ENCPU
CC-Link IE TSN master/local module RJ71GN11-T2, RJ71GN11-SX
CC-Link IE TSN Plus master/local module RJ71GN11-EIP
CC-Link IE Controller Network module RJ71GP21-SX, RJ71GP21S-SX
CC-Link IE Field Network master/local module RJ71GF11-T2
MELSECNET/H network module RJ71LP21-25, RJ71BR11

2
CONTENTS
SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
RELEVANT MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
GENERIC TERMS AND ABBREVIATIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8

CONTENTS
CHAPTER 1 OVERVIEW 9
1.1 Function Block (FB) List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2 How to Obtain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

CHAPTER 2 Ethernet-EQUIPPED MODULE FB 15


2.1 M+model_DeviceRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 M+model_DeviceWrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.3 M+model_Send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.4 M+model_Recv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.5 M+model_RemoteStopRun. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.6 M+model_ReadTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.7 M+model_WriteTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.8 M+model_ConnectionOpen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.9 M+model_ConnectionClose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.10 M+model_Recv_Socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.11 M+model_Send_Socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2.12 M+model_Refresh_Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
2.13 M+model_SLMP_DeviceRead_IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
2.14 M+model_SLMP_DeviceWrite_IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

CHAPTER 3 CC-Link IE TSN MASTER/LOCAL MODULE FB 79


3.1 M+model_DeviceRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
3.2 M+model_DeviceWrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
3.3 M+model_Send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
3.4 M+model_Recv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
3.5 M+model_RemoteStopRun. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
3.6 M+model_SLMP_DeviceRead_IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
3.7 M+model_SLMP_DeviceWrite_IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.8 M+model_SetAddress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
3.9 M+model_SetParameterX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
3.10 M+model_RemoteRead. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
3.11 M+model_RemoteWrite. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
3.12 M+model_RemoteReset_IP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
3.13 M+model_RemoteReset2_IP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

CHAPTER 4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB 151


4.1 M+model_DeviceRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
4.2 M+model_DeviceWrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
4.3 M+model_Send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
4.4 M+model_Recv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

3
4.5 M+model_RemoteStopRun. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
4.6 M+model_SLMP_DeviceRead_IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
4.7 M+model_SLMP_DeviceWrite_IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
4.8 M+model_RemoteRead. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
4.9 M+model_RemoteWrite. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
4.10 M+model_RemoteReset_IP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
4.11 M+model_RemoteReset2_IP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
4.12 M+model_ConnectionOpen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
4.13 M+model_ConnectionClose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
4.14 M+model_Recv_Socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
4.15 M+model_Send_Socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
4.16 M+model_Refresh_Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

CHAPTER 5 CC-Link IE Controller Network-EQUIPPED MODULE FB 174


5.1 M+model_DeviceRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
5.2 M+model_DeviceWrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
5.3 M+model_Send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
5.4 M+model_Recv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
5.5 M+model_RemoteStopRun. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
5.6 M+model_ReadTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
5.7 M+model_WriteTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
5.8 M+model_StationNoSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
5.9 M+model_RedundantSystem_GetAddress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

CHAPTER 6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB 188


6.1 M+model_DeviceRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
6.2 M+model_DeviceWrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
6.3 M+model_Send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
6.4 M+model_Recv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
6.5 M+model_RemoteStopRun. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
6.6 M+model_ReadTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
6.7 M+model_WriteTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
6.8 M+model_SetParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
6.9 M+model_SetParameterRedundant. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
6.10 M+model_StationNoSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
6.11 M+model_RedundantSystem_GetAddress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
6.12 M+model_ReadSystemTypeInformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
6.13 M+model_ReadSystemStatusInformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
6.14 M+model_RemoteReset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

CHAPTER 7 MELSECNET/H NETWORK MODULE FB 220


7.1 M+model_DeviceRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
7.2 M+model_DeviceWrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
7.3 M+model_Send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
7.4 M+model_Recv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
7.5 M+model_RemoteStopRun. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
7.6 M+model_ReadTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
7.7 M+model_WriteTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
7.8 M+model_RedundantSystem_GetAddress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

4
INSTRUCTION INDEX 229

REVISIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231
TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .232

CONTENTS

5
RELEVANT MANUALS
Manual name [manual number] Description Available
form
MELSEC iQ-R Ethernet, CC-Link IE, and Specifications of the module FBs of the following: e-Manual
MELSECNET/H Function Block Reference • MELSEC iQ-R Ethernet-equipped module PDF
[BCN-P5999-0381] (this manual) • CC-Link IE TSN master/local module
• CC-Link IE TSN Plus master/local module
• CC-Link IE Controller Network module
• CC-Link IE Field Network master/local module
• MELSECNET/H network module
MELSEC iQ-R Programming Manual (Module Dedicated instructions for the intelligent function modules e-Manual
Dedicated Instructions) PDF
[SH-081976ENG]
MELSEC iQ-R CPU Module User's Manual Memory, functions, devices, and parameters of the CPU module Print book
(Application)
e-Manual
[SH-081264ENG]
PDF
MELSEC iQ-R Ethernet User's Manual (Application) Functions, parameter settings, programming, troubleshooting, I/O signals, and Print book
[SH-081257ENG] buffer memory of Ethernet e-Manual
PDF
MELSEC iQ-R CC-Link IE TSN User's Manual Functions, parameter settings, troubleshooting, I/O signals, and buffer memory of Print book
(Application) CC-Link IE TSN
e-Manual
[SH-082129ENG]
PDF
MELSEC iQ-R CC-Link IE TSN Plus Master/Local Specifications, procedures before operation, system configuration, wiring, functions, Print book
Module User's Manual parameter settings, programming, troubleshooting, I/O signals, and buffer memory
e-Manual
[SH-082472ENG] of the CC-Link IE TSN Plus master/local module
PDF
MELSEC iQ-R CC-Link IE Controller Network User's Functions, parameter settings, troubleshooting, and buffer memory of CC-Link IE Print book
Manual (Application) Controller Network
e-Manual
[SH-081258ENG]
PDF
MELSEC iQ-R CC-Link IE Field Network User's Functions, parameter settings, programming, troubleshooting, I/O signals, and Print book
Manual (Application) buffer memory of CC-Link IE Field Network e-Manual
[SH-081259ENG]
PDF
MELSEC iQ-R MELSECNET/H Network Module Functions, parameter settings, programming, troubleshooting, and buffer memory of Print book
User's Manual (Application) MELSEC iQ-R MELSECNET/H network module
e-Manual
[SH-082204ENG] PDF

e-Manual refers to the Mitsubishi Electric 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.
• Sample programs can be copied to an engineering tool.

6
TERMS
Unless otherwise specified, this manual uses the following terms.
Term Description
Engineering tool A tool used for setting up programmable controllers, programming, debugging, and maintenance
Module label A label that represents one of memory areas (I/O signals and buffer memory areas) specific to each module in a given
character string.
For the module used, GX Works3 automatically generates this label, which can be used as a global label.

7
GENERIC TERMS AND ABBREVIATIONS
Unless otherwise specified, this manual uses the following generic terms and abbreviations.
Generic term/abbreviation Description
CC-Link IE Controller Network-equipped module An RJ71GP21-SX CC-Link IE Controller Network module, an RJ71GP21S-SX CC-Link IE
Controller Network module, and the following modules when the CC-Link IE Controller Network
function is used:
• RJ71EN71
• RnENCPU (network part)
CC-Link IE Field Network-equipped master/local module An RJ71GF11-T2 CC-Link IE Field Network master/local module and the following modules when
the CC-Link IE Field Network function is used:
• RJ71EN71
• RnENCPU (network part)
Ethernet-equipped module A generic term for the following modules when the Ethernet function is used:
• RJ71EN71
• RnENCPU (network part)
MELSECNET/H An abbreviation for the MELSECNET/H network system
RnENCPU (network part) A module on the right-hand side of the RnENCPU ( MELSEC iQ-R Ethernet/CC-Link IE User's
Manual (Startup))

8
1 OVERVIEW
1
The FBs described in this reference are module FBs (for GX Works3) to be used in the MELSEC iQ-R series network
modules and the Ethernet function of the CPU module.

1.1 Function Block (FB) List


This section lists the module FBs described in this reference. An FB name ends in the FB version information such as "_00A";
however, this reference manual leaves out it.
The following symbols represent network modules.
• Ethernet: Ethernet-equipped module
• CCIETSN: CC-Link IE TSN master/local module (T2: RJ71GN11-T2, SX: RJ71GN11-SX)
• CCIETSN Plus: CC-Link IE TSN Plus master/local module
• CCIEC: CC-Link IE Controller Network-equipped module
• CCIEF: CC-Link IE Field Network-equipped master/local module
• NET/H: MELSECNET/H network module

: Available, : Not available


Name Description Ethernet CCIETSN CCIETSN CCIEC CCIEF NET/H
Plus
M+model_DeviceRead Reads data by specifying a device in the      
programmable controller of another station.
M+model_DeviceWrite Writes data by specifying a device in the      
programmable controller of another station.
M+model_Send Sends data to the programmable controller of      
another station.
M+model_Recv Reads the data received from the      
programmable controller of another station.
M+model_RemoteStopRun Sends a remote STOP/RUN request to the      
programmable controller of another station.
M+model_ReadTime Reads clock data from the programmable      
controller of another station to adjust the time
of the programmable controller CPU of own
station.
M+model_WriteTime Writes the clock data of the programmable      
controller of own station to another station to
adjust the time of the programmable
controller CPU of another station.
M+model_ConnectionOpen Opens (establishes) a connection.      
M+model_ConnectionClose Closes (disconnects) the connection.      
M+model_Recv_Socket Reads the data received from the external      
device through socket communication or fixed
buffer communication.
M+model_Send_Socket Sends data to the external device through      
socket communication or fixed buffer
communication.
M+model_Refresh_Data Transfers module label data.      
M+model_SLMP_DeviceRead_IP Reads data from the SLMP-compatible      
device specified by an IP address.
M+model_SLMP_DeviceWrite_IP Writes data to the SLMP-compatible device      
specified by an IP address.
M+model_SetAddress Sets the station number or IP address for the      
own station.
M+model_SetParameterX Sets parameters for a module.  T2:     
SX: 
M+model_RemoteRead Reads data from the buffer memory of the  T2:     
remote station in units of words. SX: 
M+model_RemoteWrite Writes data to the buffer memory of the  T2:     
remote station in units of words. SX: 

1 OVERVIEW
1.1 Function Block (FB) List 9
Name Description Ethernet CCIETSN CCIETSN CCIEC CCIEF NET/H
Plus
M+model_RemoteReset_IP Sends the remote STOP of an SLMP request      
to the target station specified by an IP
address and then sends the remote RESET.
M+model_RemoteReset2_IP Sends the remote RESET of an SLMP      
request to the target station specified by an IP
address.
M+model_SetParameter Sets the parameters in the master,      
submaster, and local stations.
M+model Sets the parameters in the master station in      
_SetParameterRedundant the redundant system.
M+model_StationNoSet Sets the station number of the own station.      
M+model_RedundantSystem Identifies the control system or standby      *1
_GetAddress system in the target (another station)
redundant system and acquires the address
of the control system or standby system in the
redundant system.
M+model Reads the model information of the system      
_ReadSystemTypeInformation configuration module of the intelligent device
station (remote head module).
M+model Reads the status information of the system      
_ReadSystemStatusInformation configuration module of the intelligent device
station (remote head module).
M+model_RemoteReset Sends a remote STOP request to the target      
station and then sends a remote RESET
request.

*1 This FB cannot be used for the RJ71BR11.

1.2 How to Obtain


Module FBs are installed at the same time as installing GX Works3; however, the module FBs in this reference may not be
installed with some versions of GX Works3. It is recommended to install the latest version of GX Works3.

1 OVERVIEW
10 1.2 How to Obtain
1.3 System Configuration
The following shows the system configuration for using the module FBs in this reference.
1
For the specifications of modules to be used, refer to the user's manual for each module.

Ethernet-equipped module

(1) (2) (3) (3)

(1) Own station


(2) External device
(3) Other stations

CC-Link IE TSN master/local module


■RJ71GN11-T2

(1) (2) (3)

(1) Own station


(2) Another station
(3) Remote I/O module or other devices

■RJ71GN11-SX
(1) (2) (2)

(3)

(1) Master station


(2) Local station
(3) Network No.1

1 OVERVIEW
1.3 System Configuration 11
CC-Link IE TSN Plus master/local module
TSN HUB

(1) (2)

(3)

(1) Own station


(2) Another station
(3) Remote I/O module or other devices

CC-Link IE Controller Network module


■When performing communications between the control station and normal station
(1) (2)

(3)

(1) Control station


(2) Normal station
(3) Network No.1

■When performing communications between the control station and normal station in a
redundant system

(1) (2) (3)

(1) Control station (station No.1) in the control system (system A)


(2) Normal station (station No.2) in the standby system (system B)
(3) Normal station (station No.3)

1 OVERVIEW
12 1.3 System Configuration
CC-Link IE Field Network master/local module
■When performing communications between the master station and local station 1
(1) (2)

(3)

(1) Master station


(2) Local station
(3) Network No.1

■When performing communications between the master station and intelligent device station
(remote head module)
(1) (2)

(1) Master station


(2) Intelligent device station

■When using the modules in the redundant master station configuration

(1) (2) (3)

(1) Master station (control system)


(2) Slave station
(3) Submaster station (standby system)

1 OVERVIEW
1.3 System Configuration 13
MELSECNET/H network module
■When performing communications between the control station and normal station
• Optical loop system
(1) (2)

(1) Control station (station No.1)


(2) Normal station (station No.2)
• Coaxial bus system

(1) (2)

(4) (3) (4)

(1) Control station (station No.1)


(2) Normal station (station No.2)
(3) Coaxial bus system
(4) Terminating resistor

■When performing communications between the control station and normal station in a
redundant system

(1) (2) (3)

(1) Control station (station No.1) in the control system (system A)


(2) Normal station (station No.2) in the standby system (system B)
(3) Normal station (station No.3)

1 OVERVIEW
14 1.3 System Configuration
2 Ethernet-EQUIPPED MODULE FB

2.1 M+model_DeviceRead
2
Name
■RJ71EN71, RnENCPU (network part)
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_EE_DeviceRead RJ71EN71(E+E) 
M+RJ71EN71_C_DeviceRead RJ71EN71(CCIEC) _RJ71EN71(CCIEC)
M+RJ71EN71_EC_DeviceRead RJ71EN71(E+CCIEC) _RJ71EN71(E+IEC)
M+RJ71EN71_F_DeviceRead RJ71EN71(CCIEF) _RJ71EN71(CCIEF)
M+RJ71EN71_EF_DeviceRead RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RJ71GP21(S)-SX
M+RJ71GP21_DeviceRead

■RJ71GF11-T2
M+RJ71GF11_DeviceRead

■RJ71LP21-25
M+RJ71LP21_DeviceRead

■RJ71BR11
M+RJ71BR11_DeviceRead

Overview
Item Description
Overview Reads data by specifying a device in the programmable controller of another station.
Symbol
M+RJ71GF11_DeviceRead
(1) B: i_bEN o_bENO: B (7)
(2) DUT: i_stModule o_bOK: B (8)
(3) UW: i_u2TargetAddress o_bErr: B (9)
(4) UW: i_uDataLength o_uErrId: UW (10)
(5) S: i_s32TargetDevice o_uReadData: UW (11)
(6) UW: i_uChannel

pbi_uCPU_Type (12)
pbi_uResendCountMax (13)
pbi_uTimeUnit (14)
pbi_uMonitorTime (15)
pbi_bStationSpecific (16)
pbo_uResendCount (17)
pbo_u4ErrTime (18)
pbo_uErrNetworkNo (19)
pbo_uErrStationNo (20)

The above FB is an example for the RJ71GF11-T2.

2 Ethernet-EQUIPPED MODULE FB
2.1 M+model_DeviceRead 15
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: EN71_EE_1, EN71_EF_1, EN71_F_1, GF11_1, GP21_1,
LP21_1, BR11_1)
(3) i_u2TargetAddress Target station Word  Specify the network number and station number of the target station when
address [Unsigned]/ "Target station address specification method" is off. When specifying the
Bit String address using a label, use an array as the data type.
[16-bit] • 1st word: Network number (1 to 239)
(0..1) • 2nd word: Station number
Station number of Ethernet or CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 126: Master operating station
• 1 to 120: Local station, remote device station, intelligent device station,
submaster station
Station number of MELSECNET/H
• 1 to 64
Specify the IP address of the target station when "Target station address
specification method" is on (Ethernet only). Specify the third and fourth
octets to the 1st word, and first and second octets to the 2nd word. When
specifying the address using a label, use an array as the data type.
• 00000001H to FFFFFFFEH
Note that the fourth octet cannot be set to 0 or 255 (FFH).

b15 b8 b7 b0
+0 3 4
+1 1 2

1 to 4: IP address octet
(4) i_uDataLength Read data length Word  Specify the number of words to be read.
[Unsigned]/ • When reading data from RCPU, QCPU, or LCPU: 1 to 8192 words
Bit String • When reading data from QnACPU: 1 to 480 words
[16-bit] When specifying 961 words or more, specify 9 or 10 in "Own station
channel".
(5) i_s32TargetDevice Target station read Character  Specify the start address of the target station from which data is to be read.
device string (32) The following cannot be specified as an argument. Specifying any of the
following may cause a CPU error (2820H: Device/label/buffer memory
specification incorrect).
• Dynamically specified array elements (Example: wLabel[D0])
• Digit-specified labels (Example: K4bLabel)
• Indirectly specified devices (Example: @W0)
• Local devices (Example: #D0)
(6) i_uChannel Own station channel Word  Specify the channel to be used by the own station.
[Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
Bit String
[16-bit]

2 Ethernet-EQUIPPED MODULE FB
16 2.1 M+model_DeviceRead
■Output arguments
No. Variable name Name Data type Description Default
value
(7) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(8) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
2
(9) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(10) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/
Bit String
[16-bit]
(11) o_uReadData Read data storage Word Specify the start number of the device for storing the read data 0
device [Unsigned]/ The following cannot be specified as an argument. Specifying any of the
Bit String following may cause a CPU error (2820H: Device/label/buffer memory
[16-bit] specification incorrect).
• Dynamically specified array elements (Example: wLabel[D0])
• Digit-specified labels (Example: K4bLabel)
• Indirectly specified devices (Example: @W0)
• Local devices (Example: #D0)

■Operation parameters
No. Variable name Name Data type Range Description Default
value
(12) pbi_uCPU_Type Target station CPU Word 0000H, 03D0H Specify the CPU type of the target station. 0
type [Unsigned]/Bit to 03D3H, • 0000H: To CPU of target station (control CPU)
String [16-bit] 03E0H to • 03D0H: To control system CPU
03E3H, 03FFH • 03D1H: To standby system CPU
• 03D2H: To system A CPU
• 03D3H: To system B CPU
• 03E0H: To multiple CPU No.1
• 03E1H: To multiple CPU No.2
• 03E2H: To multiple CPU No.3
• 03E3H: To multiple CPU No.4
• 03FFH: To CPU of target station (control CPU)
(13) pbi_uResendCountM Maximum number of Word 0 to 15 Specify the number of resends to be performed if 5
ax resends [Unsigned]/Bit the data transfer is not completed within the
String [16-bit] monitoring time specified by "Arrival monitoring
time".
• 0 to 15
(14) pbi_uTimeUnit Arrival monitoring Word 0, 1 Specify the unit of the "Arrival monitoring time". 0
time unit [Unsigned]/Bit • 0: 1s
String [16-bit] • 1: 100ms
(15) pbi_uMonitorTime Arrival monitoring Word  Specify the monitoring time until completion of 0
time (Ethernet) [Unsigned]/Bit processing.
String [16-bit] If "Arrival monitoring time unit" is set to 1s, specify
the TCP resend timer value or a greater value for
the monitoring time until completion of processing.
If the processing is not completed within the
monitoring time, data is resent until the value
specified in "Maximum number of resends" is
reached.
• 0 to TCP resend timer value: Time represented
by "TCP resend timer value"
• Effective range ("TCP resend timer value" + 1)
to 16383: ("TCP resend timer value" + 1)
seconds to 16383s
When "Arrival monitoring time unit" is set to 100ms
• Effective range 1 to 65535: 1 to 65535  100ms
Arrival monitoring  Specify the monitoring time until completion of 0: 10s
time (CC-Link IE processing. If the processing is not completed
Controller Network, within the monitoring time, data is resent until the
CC-Link IE Field value specified in "Maximum number of resends"
Network, is reached.
MELSECNET/H) When "Arrival monitoring time unit" is set to 1s
• Effective range 1 to 32767: 1s to 32767s
When "Arrival monitoring time unit" is set to 100ms
• Effective range 1 to 65535: 1 to 65535  100ms

2 Ethernet-EQUIPPED MODULE FB
2.1 M+model_DeviceRead 17
No. Variable name Name Data type Range Description Default
value
(16) pbi_bStationSpecific Target station Bit On or off Specify the specification method of a target station. Off
address specification • Off: Use the network number and station
method number.
• On: Use the IP address (IPv4). (Ethernet only).

■Public variables
No. Variable name Name Data type Description Default
value
(17) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit]
(18) pbo_u4ErrTime Error occurrence Word [Unsigned]/Bit Clock data at the time of error occurrence is stored. 0
time String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(19) pbo_uErrNetworkNo Error detection Word [Unsigned]/Bit The network number of the station in which an error was detected 0
network number String [16-bit] is stored.
(20) pbo_uErrStationNo Error-detected Word [Unsigned]/Bit The station number of the station in which an error was detected is 0
station number String [16-bit] stored.
Station number of Ethernet or CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 1 to 120: Local station, remote device station, intelligent device
station, submaster station
Station number of MELSECNET/H
• 1 to 64

FB details
Item Description
Available device Target module • RJ71GF11-T2
• RJ71GP21(S)-SX
• RJ71EN71
• RnENCPU (network part)
• RJ71LP21-25
• RJ71BR11
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 85 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution command) is turned on, this function reads device data from another station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN

2 Ethernet-EQUIPPED MODULE FB
18 2.1 M+model_DeviceRead
Item Description
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO
2
o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.READ instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 19 Error codes appears, the initial label value files by
each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error codes
Error code Reference
4000H to 4FFFH  MELSEC iQ-R CPU Module User's Manual (Application)
6F00H to 6FFFH
C000H to CFFFH  MELSEC iQ-R Ethernet User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
E000H to EFFFH  MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
F000H to FFFFH  MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)

2 Ethernet-EQUIPPED MODULE FB
2.1 M+model_DeviceRead 19
2.2 M+model_DeviceWrite

Name
■RJ71EN71, RnENCPU (network part)
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_EE_DeviceWrite RJ71EN71(E+E) 
M+RJ71EN71_C_DeviceWrite RJ71EN71(CCIEC) _RJ71EN71(CCIEC)
M+RJ71EN71_EC_DeviceWrite RJ71EN71(E+CCIEC) _RJ71EN71(E+IEC)
M+RJ71EN71_F_DeviceWrite RJ71EN71(CCIEF) _RJ71EN71(CCIEF)
M+RJ71EN71_EF_DeviceWrite RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RJ71GP21(S)-SX
M+RJ71GP21_DeviceWrite

■RJ71GF11-T2
M+RJ71GF11_DeviceWrite

■RJ71LP21-25
M+RJ71LP21_DeviceWrite

■RJ71BR11
M+RJ71BR11_DeviceWrite

Overview
Item Description
Overview Writes data by specifying a device in the programmable controller of another station.
Symbol
M+RJ71GF11_DeviceWrite
(1) B: i_bEN o_bENO: B (8)
(2) DUT: i_stModule o_bOK: B (9)
(3) UW: i_u2TargetAddress o_bErr: B (10)
(4) UW: i_uDataLength o_uErrId: UW (11)
(5) UW: i_uWriteData
(6) S: i_s32TargetDevice
(7) UW: i_uChannel

pbi_uCPU_Type (12)
pbi_uTargetStation (13)
pbi_bArrivalConfirm (14)
pbi_uResendCountMax (15)
pbi_uTimeUnit (16)
pbi_uMonitorTime (17)
pbi_bStationSpecific (18)
pbo_uResendCount (19)
pbo_u4ErrTime (20)
pbo_uErrNetworkNo (21)
pbo_uErrStationNo (22)

The above FB is an example for the RJ71GF11-T2.

2 Ethernet-EQUIPPED MODULE FB
20 2.2 M+model_DeviceWrite
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
2
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: EN71_EE_1, EN71_EF_1, EN71_F_1, GF11_1, GP21_1,
LP21_1, BR11_1)
(3) i_u2TargetAddress Target station Word  Specify the network number and station number of the target station when
address [Unsigned]/ "Target station address specification method" is off. When specifying the
Bit String numbers using a label, use an array as the data type.
[16-bit] ■When "Target station specification method" is set to 0 to specify a station
(0..1) number
• 1st word: Network number (1 to 239)
• 2nd word: Station number
Station number of Ethernet or CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 126: Master operating station
• 1 to 120: Local station, remote device station, intelligent device station,
submaster station
Station number of MELSECNET/H
• 1 to 64
■When "Target station specification method" is set to 1 to specify a group
• 1st word: Network number (1 to 239)
• 2nd word: Transient transmission group number (1 to 32)
■When "Target station specification method" is set to 2 to specify all
stations
• 1st word: Network number (1 to 239)
• 2nd word: 0 (The setting is ignored.)
Specify the IP address of the target station when "Target station address
specification method" is on (Ethernet only). Specify the third and fourth
octets to the 1st word, and first and second octets to the 2nd word. When
specifying the address using a label, use an array as the data type.
• 00000001H to FFFFFFFEH
Note that the fourth octet cannot be set to 0 or 255 (FFH).

b15 b8 b7 b0
+0 3 4
+1 1 2

1 to 4: IP address octet
(4) i_uDataLength Write data length Word  Specify the number of words to be written.
[Unsigned]/ • When writing to RCPU, QCPU, or LCPU: 1 to 8192 words
Bit String • When writing to QnACPU: 1 to 480 words
[16-bit] When specifying 961 words or more, specify 9 or 10 in "Own station
channel".
(5) i_uWriteData Write data storage Word  Specify the start device of own station containing the write data.
device [Unsigned]/ The following cannot be specified as an argument. Specifying any of the
Bit String following may cause a CPU error (2820H: Device/label/buffer memory
[16-bit] specification incorrect).
• Dynamically specified array elements (Example: wLabel[D0])
• Digit-specified labels (Example: K4bLabel)
• Indirectly specified devices (Example: @W0)
• Local devices (Example: #D0)
(6) i_s32TargetDevice Target station write Character  Specify the start device of the target station to which data is to be written.
device string (32) The following cannot be specified as an argument. Specifying any of the
following may cause a CPU error (2820H: Device/label/buffer memory
specification incorrect).
• Dynamically specified array elements (Example: wLabel[D0])
• Digit-specified labels (Example: K4bLabel)
• Indirectly specified devices (Example: @W0)
• Local devices (Example: #D0)

2 Ethernet-EQUIPPED MODULE FB
2.2 M+model_DeviceWrite 21
No. Variable name Name Data type Range Description
(7) i_uChannel Own station channel Word  Specify the channel to be used by the own station.
[Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
Bit String
[16-bit]

■Output arguments
No. Variable name Name Data type Description Default
value
(8) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(9) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(10) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(11) o_uErrId Error code Word [Unsigned]/ An error code is stored at error completion. 0
Bit String [16-bit]

■Operation parameters
No. Variable name Name Data type Range Description Default
value
(12) pbi_uCPU_Type Target station CPU Word 0000H, Specify the CPU type of the target station. 0
type [Unsigned]/ 03D0H to • 0000H: To CPU of target station (control CPU)
Bit String 03D3H, • 03D0H: To control system CPU
[16-bit] 03E0H to • 03D1H: To standby system CPU
03E3H, • 03D2H: To system A CPU
03FFH • 03D3H: To system B CPU
• 03E0H: To multiple CPU No.1
• 03E1H: To multiple CPU No.2
• 03E2H: To multiple CPU No.3
• 03E3H: To multiple CPU No.4
• 03FFH: To CPU of target station (control CPU)
(13) pbi_uTargetStation Target station Word 0 to 2 Specify the specification method of a target station. 0
specification method [Unsigned]/ • 0: Station number specification  Station with the station
Bit String number specified in "Target station address"
[16-bit] • 1: Group specification (only when "OFF (No)" is specified
in "Arrival acknowledgment")  All stations of the
transient transmission group number specified in "Arrival
station address" (For the CC-Link IE Field Network, the
value 1 cannot be specified.)
• 2: All stations (only when "OFF (No)" is specified in
"Arrival acknowledgment")  All stations of the network
number specified in "Arrival station address" (broadcast
excluding own station)

2 Ethernet-EQUIPPED MODULE FB
22 2.2 M+model_DeviceWrite
No. Variable name Name Data type Range Description Default
value
(14) pbi_bArrivalConfirm Arrival Bit On or off Specify whether to use arrival acknowledgment. Off
acknowledgment ■Off: No check
• When the target station is within the own network,
sending data from the own station completes the
sending.
2
(1)
Es Ts

(1) Completion
Es: Execution source
Ts: Target station
• When the target station is within another network, data
arrival to the relay station within the own network
completes the sending.

(1)
Es Rs Ts

(1) Completion
Es: Execution source
Rs: Relay station
Ts: Target station
■On: Check
Sending data is completed when the data is written to the
target station.

(1)
Ts Es Rs Ts
(1)

(1) Completion
Es: Execution source
Rs: Relay station
Ts: Target station
(15) pbi_uResendCountM Maximum number of Word 0 to 15 Specify the number of resends to be performed if the data 5
ax resends [Unsigned]/ transfer is not completed within the monitoring time
Bit String specified by "Arrival monitoring time".
[16-bit] • 0 to 15
(16) pbi_uTimeUnit Arrival monitoring Word 0, 1 Specify the unit of the "Arrival monitoring time". 0
time unit [Unsigned]/ • 0: 1s
Bit String • 1: 100ms
[16-bit]
(17) pbi_uMonitorTime Arrival monitoring Word  Specify the monitoring time until completion of processing. 0
time (Ethernet) [Unsigned]/ If "Arrival monitoring time unit" is set to 1s, specify the TCP
Bit String resend timer value or a greater value for the monitoring
[16-bit] time until completion of processing. If the processing is not
completed within the monitoring time, data is resent until
the value specified in "Maximum number of resends" is
reached.
• 0 to TCP resend timer value: Time represented by "TCP
resend timer value"
• Effective range ("TCP resend timer value" + 1) to 16383:
("TCP resend timer value" + 1) seconds to 16383s
When "Arrival monitoring time unit" is set to 100ms
• Effective range 1 to 65535: 1 to 65535  100ms
Arrival monitoring  Specify the monitoring time until completion of processing. 0: 10s
time (CC-Link IE If the processing is not completed within the monitoring
Controller Network, time, data is resent until the value specified in "Maximum
CC-Link IE Field number of resends" is reached.
Network, When "Arrival monitoring time unit" is set to 1s
MELSECNET/H) • Effective range 1 to 32767: 1s to 32767s
When "Arrival monitoring time unit" is set to 100ms
• Effective range 1 to 65535: 1 to 65535  100ms
(18) pbi_bStationSpecific Target station Bit On or off Specify the specification method of a target station. Off
address specification • Off: Use the network number and station number.
method • On: Use the IP address (IPv4). (Ethernet only).

2 Ethernet-EQUIPPED MODULE FB
2.2 M+model_DeviceWrite 23
■Public variables
No. Variable name Name Data type Description Default
value
(19) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit]
(20) pbo_u4ErrTime Error occurrence time Word [Unsigned]/Bit Clock data at the time of error occurrence is stored. 0
String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H
(Saturday))
(21) pbo_uErrNetworkNo Error detection network Word [Unsigned]/Bit The network number of the station in which an error was 0
number String [16-bit] detected is stored.
(22) pbo_uErrStationNo Error-detected station Word [Unsigned]/Bit The station number of the station in which an error was 0
number String [16-bit] detected is stored.
Station number of Ethernet or CC-Link IE Controller
Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 1 to 120: Local station, remote device station, intelligent
device station, submaster station
Station number of MELSECNET/H
• 1 to 64

FB details
Item Description
Available device Target module • RJ71GF11-T2
• RJ71GP21(S)-SX
• RJ71EN71
• RnENCPU (network part)
• RJ71LP21-25
• RJ71BR11
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 90 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function writes device data to another station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN

2 Ethernet-EQUIPPED MODULE FB
24 2.2 M+model_DeviceWrite
Item Description
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO
2
o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.WRITE instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 25 Error codes appears, the initial label value files by
each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error codes
Error code Reference
4000H to 4FFFH  MELSEC iQ-R CPU Module User's Manual (Application)
6F00H to 6FFFH
C000H to CFFFH  MELSEC iQ-R Ethernet User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
E000H to EFFFH  MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
F000H to FFFFH  MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)

2 Ethernet-EQUIPPED MODULE FB
2.2 M+model_DeviceWrite 25
2.3 M+model_Send

Name
■RJ71EN71, RnENCPU (network part)
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_EE_Send RJ71EN71(E+E) 
M+RJ71EN71_C_Send RJ71EN71(CCIEC) _RJ71EN71(CCIEC)
M+RJ71EN71_EC_Send RJ71EN71(E+CCIEC) _RJ71EN71(E+IEC)
M+RJ71EN71_F_Send RJ71EN71(CCIEF) _RJ71EN71(CCIEF)
M+RJ71EN71_EF_Send RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RJ71GP21(S)-SX
M+RJ71GP21_Send

■RJ71GF11-T2
M+RJ71GF11_Send

■RJ71LP21-25
M+RJ71LP21_Send

■RJ71BR11
M+RJ71BR11_Send

Overview
Item Description
Overview Sends data to the programmable controller of another station.
Symbol
M+RJ71GF11_Send
(1) B: i_bEN o_bENO: B (9)
(2) DUT: i_stModule o_bOK: B (10)
(3) UW: i_uTargetNetworkNo o_bErr: B (11)
(4) UW: i_uTargetStationNo o_uErrId: UW (12)
(5) UW: i_uChannel
(6) UW: i_uTargetChannel
(7) UW: i_uDataLength
(8) UW: i_uSendData

pbi_uTargetStation (13)
pbi_bArrivalConfirm (14)
pbi_uResendCountMax (15)
pbi_uMonitorTime (16)
pbo_uResendCount (17)
pbo_u4ErrTime (18)
pbo_uErrNetworkNo (19)
pbo_uErrStationNo (20)

The above FB is an example for the RJ71GF11-T2.

2 Ethernet-EQUIPPED MODULE FB
26 2.3 M+model_Send
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
2
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: EN71_EE_1, EN71_EF_1, EN71_F_1, GF11_1, GP21_1,
LP21_1, BR11_1)
(3) i_uTargetNetworkNo Target network Word 1 to 239 Specify the network number of the target station.
number [Unsigned]/
Bit String
[16-bit]
(4) i_uTargetStationNo Target station Word  Specify the station number of the target station or the transient
number [Unsigned]/ transmission group number.
Bit String ■When "Target station specification method" is set to 0 to specify a
[16-bit] station number
Station number of Ethernet or CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 126: Master operating station
• 1 to 120: Local station, remote device station, intelligent device station,
submaster station
Station number of MELSECNET/H
• 1 to 64
■When "Target station specification method" is set to 1 to specify a
group
Specify the transient transmission group number.
• 1 to 32
■When "Target station specification method" is set to 2 to specify all
stations
The setting is ignored.
(5) i_uChannel Own station channel Word  Specify the channel to be used by the own station.
[Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated
Bit String Instructions)
[16-bit]
(6) i_uTargetChannel Target station data Word 1 to 8 Specify the channel of the target station for storing data.
storage channel [Unsigned]/ When the target station is a CC-Link IE Field Network master/local
Bit String module, specify 1 or 2.
[16-bit]
(7) i_uDataLength Send data length Word  Specify the number of words to be sent.
[Unsigned]/ • When the target station is RCPU, QCPU, or LCPU: 1 to 960 words
Bit String • When the target station is QnACPU: 1 to 480 words
[16-bit]
(8) i_uSendData Send data storage Word  Specify the start device of own station containing the send data.
device [Unsigned]/ The following cannot be specified as an argument. Specifying any of the
Bit String following may cause a CPU error (2820H: Device/label/buffer memory
[16-bit] specification incorrect).
• Dynamically specified array elements (Example: wLabel[D0])
• Digit-specified labels (Example: K4bLabel)
• Indirectly specified devices (Example: @W0)
• Local devices (Example: #D0)

■Output arguments
No. Variable name Name Data type Description Default
value
(9) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(10) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(11) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(12) o_uErrId Error code Word [Unsigned]/Bit An error code is stored at error completion. 0
String [16-bit]

2 Ethernet-EQUIPPED MODULE FB
2.3 M+model_Send 27
■Operation parameters
No. Variable name Name Data type Range Description Default
value
(13) pbi_uTargetStation Target station Word 0 to 2 Specify the specification method of a target station. 0
specification method [Unsigned]/ • 0: Station number specification  Station with the station
Bit String [16- number specified in "Target station number"
bit] • 1: Group specification (only when "OFF (No)" is specified
in "Arrival acknowledgment")  All stations of the
transient transmission group number specified in "Target
station number" (For the CC-Link IE Field Network, the
value 1 cannot be specified.)
• 2: All stations (only when "OFF (No)" is specified in
"Arrival acknowledgment")  All stations of the network
number specified in "Target network number" (broadcast
excluding own station)
(14) pbi_bArrivalConfirm Arrival Bit On or off Specify whether to use arrival acknowledgment. Off
acknowledgment ■Off: No check
• When the target station is within the own network,
sending data from the own station completes the
sending.

(1)
Es Ts

(1) Completion
Es: Execution source
Ts: Target station
• When the target station is within another network, data
arrival to the relay station within the own network
completes the sending.

(1)
Es Rs Ts

(1) Completion
Es: Execution source
Rs: Relay station
Ts: Target station
■On: Check
Sending data is completed when the data is written to the
target station.

(1)
Ts Es Rs Ts
(1)

(1) Completion
Es: Execution source
Rs: Relay station
Ts: Target station
(15) pbi_uResendCountM Maximum number of Word 0 to 15 Specify the number of resends to be performed if the data 5
ax resends [Unsigned]/ transfer is not completed within the monitoring time
Bit String [16- specified by "Arrival monitoring time".
bit] • 0 to 15
(16) pbi_uMonitorTime Arrival monitoring Word 0 to 16383 Specify the TCP resend timer value or a greater value for 0
time (Ethernet) [Unsigned]/ the monitoring time until completion of processing. If the
Bit String [16- processing is not completed within the monitoring time,
bit] data is resent until the value specified in "Maximum
number of resends" is reached.
• 0 to TCP resend timer value: Time represented by "TCP
resend timer value"
• ("TCP resend timer value" + 1) to 16383: ("TCP resend
timer value" + 1) seconds to 16383s
Arrival monitoring 0, 1 to Specify the monitoring time until completion of processing. 0
time (CC-Link IE 32767 If the processing is not completed within the monitoring
Controller Network, time, data is resent until the value specified in "Maximum
CC-Link IE Field number of resends" is reached.
Network, • 0: 10s
MELSECNET/H) • 1 to 32767: 1 to 32767s

2 Ethernet-EQUIPPED MODULE FB
28 2.3 M+model_Send
■Public variables
No. Variable name Name Data type Description Default
value
(17) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit]
(18) pbo_u4ErrTime Error occurrence
time
Word [Unsigned]/Bit
String [16-bit] (0..3)
Clock data at the time of error occurrence is stored.
1st word
0
2
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(19) pbo_uErrNetworkNo Error detection Word [Unsigned]/Bit The network number of the station in which an error was detected 0
network number String [16-bit] is stored.
(20) pbo_uErrStationNo Error-detected Word [Unsigned]/Bit The station number of the station in which an error was detected 0
station number String [16-bit] is stored.
Station number of Ethernet or CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 1 to 120: Local station, remote device station, intelligent device
station, submaster station
Station number of MELSECNET/H
• 1 to 64

2 Ethernet-EQUIPPED MODULE FB
2.3 M+model_Send 29
FB details
Item Description
Available device Target module • RJ71GF11-T2
• RJ71GP21(S)-SX
• RJ71EN71
• RnENCPU (network part)
• RJ71LP21-25
• RJ71BR11
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 75 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function sends a message to another station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code

2 Ethernet-EQUIPPED MODULE FB
30 2.3 M+model_Send
Item Description
Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.SEND instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU 2
Module User's Manual (Application)) If an error code that is not described in Page 31 Error codes appears, the initial label value files by
each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error codes
Error code Reference
4000H to 4FFFH  MELSEC iQ-R CPU Module User's Manual (Application)
6F00H to 6FFFH
C000H to CFFFH  MELSEC iQ-R Ethernet User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
E000H to EFFFH  MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
F000H to FFFFH  MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)

2 Ethernet-EQUIPPED MODULE FB
2.3 M+model_Send 31
2.4 M+model_Recv

Name
■RJ71EN71, RnENCPU (network part)
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_EE_Recv RJ71EN71(E+E) 
M+RJ71EN71_C_Recv RJ71EN71(CCIEC) _RJ71EN71(CCIEC)
M+RJ71EN71_EC_Recv RJ71EN71(E+CCIEC) _RJ71EN71(E+IEC)
M+RJ71EN71_F_Recv RJ71EN71(CCIEF) _RJ71EN71(CCIEF)
M+RJ71EN71_EF_Recv RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RJ71GP21(S)-SX
M+RJ71GP21_Recv

■RJ71GF11-T2
M+RJ71GF11_Recv

■RJ71LP21-25
M+RJ71LP21_Recv

■RJ71BR11
M+RJ71BR11_Recv

Overview
Item Description
Overview Reads the data received from the programmable controller of another station.
Symbol
M+RJ71GF11_Recv
(1) B: i_bEN o_bENO: B (4)
(2) DUT: i_stModule o_bOK: B (5)
(3) UW: i_uRecvChannel o_bErr: B (6)
o_uErrId: UW (7)
o_uRecvDataLength: UW (8)
o_uRecvData: UW (9)

pbi_bReadTiming (10)
pbi_uMonitorTime (11)
pbo_uResendCount (12)
pbo_u4ErrTime (13)
pbo_uErrNetworkNo (14)
pbo_uErrStationNo (15)
pbo_uSendNetworkNo (16)
pbo_uSendStationNo (17)
pbo_uSendChannel (18)

The above FB is an example for the RJ71GF11-T2.

2 Ethernet-EQUIPPED MODULE FB
32 2.4 M+model_Recv
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
2
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: EN71_EE_1, EN71_EF_1, EN71_F_1, GF11_1, GP21_1,
LP21_1, BR11_1)
(3) i_uRecvChannel Receive data storage Word  Specify the channel containing the data to be read.
channel [Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated
Bit String [16- Instructions)
bit]

■Output arguments
No. Variable name Name Data type Description Default
value
(4) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(5) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(6) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(7) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/Bit
String [16-bit]
(8) o_uRecvDataLength Receive data length Word The number of received data is stored. 0
[Unsigned]/Bit • 1 to 960 words
String [16-bit]
(9) o_uRecvData Receive data storage Word Specify the start number of the device for storing received data. 0
device [Unsigned]/Bit The following cannot be specified as an argument. Specifying any of the
String [16-bit] following may cause a CPU error (2820H: Device/label/buffer memory
specification incorrect).
• Dynamically specified array elements (Example: wLabel[D0])
• Digit-specified labels (Example: K4bLabel)
• Indirectly specified devices (Example: @W0)
• Local devices (Example: #D0)

■Operation parameters
No. Variable name Name Data type Range Description Default
value
(10) pbi_bReadTiming Read timing Bit On Specify the timing of executing data read processing. On
• On: Start reading in the first END processing after the
module FB starts.
(11) pbi_uMonitorTime Arrival monitoring Word 0 to 16383 Specify the TCP resend timer value or a greater value for 0
time (Ethernet) [Unsigned]/ the monitoring time until completion of processing (the
Bit String setting is valid only when "Read timing" is on). When the
[16-bit] processing is not completed normally within the monitoring
time, the processing is completed with an error.
• 0 to TCP resend timer value: Time represented by "TCP
resend timer value"
• ("TCP resend timer value" + 1) to 16383: ("TCP resend
timer value" + 1) seconds to 16383s
Arrival monitoring 0, 1 to Specify the monitoring time until completion of processing 0
time (CC-Link IE 32767 (the setting is valid only when "Read timing" is on). When
Controller Network, the processing is not completed normally within the
CC-Link IE Field monitoring time, the processing is completed with an error.
Network, • 0: 10s
MELSECNET/H) • 1 to 32767: 1 to 32767s

2 Ethernet-EQUIPPED MODULE FB
2.4 M+model_Recv 33
■Public variables
No. Variable name Name Data type Description Default
value
(12) pbo_uResendCount Number of resends Word The number of resends performed (result) is stored. 0
[Unsigned]/
Bit String
[16-bit]
(13) pbo_u4ErrTime Error occurrence Word Clock data at the time of error occurrence is stored. 0
time [Unsigned]/ 1st word
Bit String • Upper 8 bits: Month (01H to 12H)
[16-bit] (0..3) • Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(14) pbo_uErrNetworkNo Error detection Word The network number of the station in which an error was detected is 0
network number [Unsigned]/ stored.
Bit String
[16-bit]
(15) pbo_uErrStationNo Error-detected Word The station number of the station in which an error was detected is stored. 0
station number [Unsigned]/ Station number of Ethernet or CC-Link IE Controller Network
Bit String • 1 to 120
[16-bit] Station number of CC-Link IE Field Network
• 125: Master station
• 1 to 120: Local station, remote device station, intelligent device station,
submaster station
Station number of MELSECNET/H
• 1 to 64
(16) pbo_uSendNetwork Send station network Word The network number of the send station is stored. 0
No number [Unsigned]/
Bit String
[16-bit]
(17) pbo_uSendStationN Send station number Word The station number of the send station is stored. 0
o [Unsigned]/ Station number of Ethernet or CC-Link IE Controller Network
Bit String • 1 to 120
[16-bit] Station number of CC-Link IE Field Network
• 125: Master station
• 1 to 120: Local station, remote device station, intelligent device station,
submaster station
Station number of MELSECNET/H
• 1 to 64
(18) pbo_uSendChannel Channel used by Word The channel number used by the send station is stored. 0
send station [Unsigned]/ 1 to 8
Bit String
[16-bit]

2 Ethernet-EQUIPPED MODULE FB
34 2.4 M+model_Recv
FB details
Item Description
Available device Target module • RJ71GF11-T2
• RJ71GP21(S)-SX
• RJ71EN71
• RnENCPU (network part) 2
• RJ71LP21-25
• RJ71BR11
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 94 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function receives a message from another station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code

2 Ethernet-EQUIPPED MODULE FB
2.4 M+model_Recv 35
Item Description
Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.RECV instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 36 Error codes appears, the initial label value files by
each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R Ethernet User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
E000H to EFFFH  MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
F000H to FFFFH  MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)

2 Ethernet-EQUIPPED MODULE FB
36 2.4 M+model_Recv
2.5 M+model_RemoteStopRun

Name
■RJ71EN71, RnENCPU (network part) 2
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_EE_RemoteStopRun RJ71EN71(E+E) 
M+RJ71EN71_C_RemoteStopRun RJ71EN71(CCIEC) _RJ71EN71(CCIEC)
M+RJ71EN71_EC_RemoteStopRun RJ71EN71(E+CCIEC) _RJ71EN71(E+IEC)
M+RJ71EN71_F_RemoteStopRun RJ71EN71(CCIEF) _RJ71EN71(CCIEF)
M+RJ71EN71_EF_RemoteStopRun RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RJ71GP21(S)-SX
M+RJ71GP21_RemoteStopRun

■RJ71GF11-T2
M+RJ71GF11_RemoteStopRun

■RJ71LP21-25
M+RJ71LP21_RemoteStopRun

■RJ71BR11
M+RJ71BR11_RemoteStopRun

Overview
Item Description
Overview Sends a remote STOP/RUN request to the programmable controller of another station.
Symbol
M+RJ71GF11_RemoteStopRun
(1) B: i_bEN o_bENO: B (7)
(2) DUT: i_stModule o_bOK: B (8)
(3) UW: i_uTargetNetworkNo o_bErr: B (9)
(4) UW: i_uTargetStationNo o_uErrId: UW (10)
(5) UW: i_uChannel
(6) UW: i_uRemoteType

pbi_uCPU_Type (11)
pbi_uTargetStation (12)
pbi_uForciblyRun (13)
pbi_uDeviceClear (14)
pbi_uResendCountMax (15)
pbi_uMonitorTime (16)
pbo_uResendCount (17)
pbo_u4ErrTime (18)
pbo_uErrNetworkNo (19)
pbo_uErrStationNo (20)

The above FB is an example for the RJ71GF11-T2.

2 Ethernet-EQUIPPED MODULE FB
2.5 M+model_RemoteStopRun 37
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: EN71_EE_1, EN71_EF_1, EN71_F_1, GF11_1, GP21_1,
LP21_1, BR11_1)
(3) i_uTargetNetworkNo Target network Word 1 to 239 Specify the network number of the target station.
number [Unsigned]/
Bit String [16-
bit]
(4) i_uTargetStationNo Target station Word  Specify the station number of the target station or the transient
number [Unsigned]/ transmission group number.
Bit String [16- ■When "Target station specification method" is set to 0 to specify a
bit] station number
Station number of Ethernet or CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 126: Master operating station
• 1 to 120: Local station, remote device station, intelligent device station,
submaster station
Station number of MELSECNET/H
• 1 to 64
■When "Target station specification method" is set to 1 to specify a
group
Specify the transient transmission group number.
• 1 to 32
■When "Target station specification method" is set to 2 to specify all
stations
The setting is ignored.
(5) i_uChannel Own station channel Word  Specify the channel to be used by the own station.
[Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated
Bit String [16- Instructions)
bit]
(6) i_uRemoteType Remote operation Word 1, 2 Specify remote RUN or STOP.
[Unsigned]/ • 1: Remote RUN
Bit String [16- • 2: Remote STOP
bit]

■Output arguments
No. Variable name Name Data type Description Default
value
(7) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(8) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(9) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(10) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/Bit
String [16-bit]

2 Ethernet-EQUIPPED MODULE FB
38 2.5 M+model_RemoteStopRun
■Operation parameters
No. Variable name Name Data type Range Description Default
value
(11) pbi_uCPU_Type Target station CPU Word 0000H, 03D0H Specify the CPU type of the target station. 0
type [Unsigned]/Bit to 03D3H, • 0000H: To CPU of target station (control CPU)
String [16-bit] 03E0H to • 03D0H: To control system CPU
03E3H, 03FFH • 03D1H: To standby system CPU 2
• 03D2H: To system A CPU
• 03D3H: To system B CPU
• 03E0H: To multiple CPU No.1
• 03E1H: To multiple CPU No.2
• 03E2H: To multiple CPU No.3
• 03E3H: To multiple CPU No.4
• 03FFH: To CPU of target station (control CPU)
(12) pbi_uTargetStation Target station Word 0 to 2 Specify the specification method of a target station. 0
specification method [Unsigned]/Bit • 0: Station number specification  Station with the
String [16-bit] station number specified in "Target station
number"
• 1: Group specification  All stations of the
transient transmission group number specified in
"Target station number" (For the CC-Link IE Field
Network, the value 1 cannot be specified.)
• 2: All stations  All stations of the network
number specified in "Target network number"
(simultaneous broadcast except own station)
(13) pbi_uForciblyRun Specification of Word 1, 2 ■"Remote operation": 1 (remote RUN) 1
forced remote RUN [Unsigned]/Bit Specify whether to forcibly execute remote RUN.
String [16-bit] The forcible execution function enables forcible
execution of remote RUN from another station
when a station which executed remote STOP can
no longer execute remote RUN.
• 1: Not forcibly executed
• 2: Forcibly executed
■"Remote operation": 2 (remote STOP)
Any setting here is ignored and the following setting
is always used.
• 2: Forcibly executed
(14) pbi_uDeviceClear Specification of Word 0 to 2 ■"Remote operation": 1 (remote RUN) 0
device clear at [Unsigned]/Bit Specify how to handle the CPU module device
remote RUN String [16-bit] memory after remote RUN is executed.
• 0: Do not clear.
• 1: Clear (except the latch range).
• 2: Clear (including the latch range).
■"Remote operation": 2 (remote STOP)
Any setting here is ignored.
(15) pbi_uResendCountM Maximum number of Word 0 to 15 Specify the number of resends to be performed if 5
ax resends [Unsigned]/Bit the data transfer is not completed within the
String [16-bit] monitoring time specified by "Arrival monitoring
time".
(16) pbi_uMonitorTime Arrival monitoring Word 0 to 16383 Specify the TCP resend timer value or a greater 0
time (Ethernet) [Unsigned]/Bit value for the monitoring time until completion of
String [16-bit] processing. If the processing is not completed
within the monitoring time, data is resent until the
value specified in "Maximum number of resends" is
reached.
• 0 to TCP resend timer value: Time represented
by "TCP resend timer value"
• ("TCP resend timer value" + 1) to 16383: ("TCP
resend timer value" + 1) seconds to 16383s
Arrival monitoring 0, 1 to 32767 Specify the monitoring time until completion of 0
time (CC-Link IE processing. If the processing is not completed
Controller Network, within the monitoring time, data is resent until the
CC-Link IE Field value specified in "Maximum number of resends" is
Network, reached.
MELSECNET/H) • 0: 10s
• 1 to 32767: 1 to 32767s

2 Ethernet-EQUIPPED MODULE FB
2.5 M+model_RemoteStopRun 39
■Public variables
No. Variable name Name Data type Description Default
value
(17) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit]
(18) pbo_u4ErrTime Error occurrence Word [Unsigned]/Bit Clock data at the time of error occurrence is stored. 0
time String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(19) pbo_uErrNetworkNo Error detection Word [Unsigned]/Bit The network number of the station in which an error was 0
network number String [16-bit] detected is stored.
(20) pbo_uErrStationNo Error-detected Word [Unsigned]/Bit The station number of the station in which an error was 0
station number String [16-bit] detected is stored.
Station number of Ethernet or CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 1 to 120: Local station, remote device station, intelligent
device station, submaster station
Station number of MELSECNET/H
• 1 to 64

FB details
Item Description
Available device Target module • RJ71GF11-T2
• RJ71GP21(S)-SX
• RJ71EN71
• RnENCPU (network part)
• RJ71LP21-25
• RJ71BR11
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 122 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution command) is turned on, this function performs remote STOP/RUN for other stations.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN

2 Ethernet-EQUIPPED MODULE FB
40 2.5 M+model_RemoteStopRun
Item Description
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO
2
o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.REQ instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 41 Error codes appears, the initial label value files by
each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error codes
Error code Reference
4000H to 4FFFH  MELSEC iQ-R CPU Module User's Manual (Application)
6F00H to 6FFFH
C000H to CFFFH  MELSEC iQ-R Ethernet User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
E000H to EFFFH  MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
F000H to FFFFH  MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)

2 Ethernet-EQUIPPED MODULE FB
2.5 M+model_RemoteStopRun 41
2.6 M+model_ReadTime

Name
■RJ71EN71, RnENCPU (network part)
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_EE_ReadTime RJ71EN71(E+E) 
M+RJ71EN71_C_ReadTime RJ71EN71(CCIEC) _RJ71EN71(CCIEC)
M+RJ71EN71_EC_ReadTime RJ71EN71(E+CCIEC) _RJ71EN71(E+IEC)
M+RJ71EN71_F_ReadTime RJ71EN71(CCIEF) _RJ71EN71(CCIEF)
M+RJ71EN71_EF_ReadTime RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RJ71GP21(S)-SX
M+RJ71GP21_ReadTime

■RJ71GF11-T2
M+RJ71GF11_ReadTime

■RJ71LP21-25
M+RJ71LP21_ReadTime

■RJ71BR11
M+RJ71BR11_ReadTime

Overview
Item Description
Overview Reads clock data from the programmable controller of another station to adjust the time of the programmable controller CPU of own
station.
Symbol
M+RJ71GF11_ReadTime
(1) B: i_bEN o_bENO: B (6)
(2) DUT: i_stModule o_bOK: B (7)
(3) UW: i_uTargetNetworkNo o_bErr: B (8)
(4) UW: i_uTargetStationNo o_uErrId: UW (9)
(5) UW: i_uChannel

pbi_uCPU_Type (10)
pbi_uResendCountMax (11)
pbi_uMonitorTime (12)

The above FB is an example for the RJ71GF11-T2.

2 Ethernet-EQUIPPED MODULE FB
42 2.6 M+model_ReadTime
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
2
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: EN71_EE_1, EN71_EF_1, EN71_F_1, GF11_1, GP21_1,
LP21_1, BR11_1)
(3) i_uTargetNetworkNo Target network Word 1 to 239 Specify the network number of the target station.
number [Unsigned]/
Bit String
[16-bit]
(4) i_uTargetStationNo Target station number Word  Specifies the station number of the target station.
[Unsigned]/ Station number of Ethernet or CC-Link IE Controller Network
Bit String • 1 to 120
[16-bit] Station number of CC-Link IE Field Network
• 125: Master station
• 126: Master operating station
• 1 to 120: Local station, remote device station, intelligent device station,
submaster station
Station number of MELSECNET/H
• 1 to 64
(5) i_uChannel Own station channel Word  Specify the channel to be used by the own station.
[Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated
Bit String Instructions)
[16-bit]

■Output arguments
No. Variable name Name Data type Description Default
value
(6) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(7) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(8) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(9) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/Bit
String [16-bit]

2 Ethernet-EQUIPPED MODULE FB
2.6 M+model_ReadTime 43
■Operation parameters
No. Variable name Name Data type Range Description Default
value
(10) pbi_uCPU_Type Target station CPU Word 0000H, 03D0H Specify the CPU type of the target station. 0
type [Unsigned]/Bit to 03D3H, • 0000H: To CPU of target station (control CPU)
String [16-bit] 03E0H to • 03D0H: To control system CPU
03E3H, 03FFH • 03D1H: To standby system CPU
• 03D2H: To system A CPU
• 03D3H: To system B CPU
• 03E0H: To multiple CPU No.1
• 03E1H: To multiple CPU No.2
• 03E2H: To multiple CPU No.3
• 03E3H: To multiple CPU No.4
• 03FFH: To CPU of target station (control CPU)
(11) pbi_uResendCountMax Maximum number Word 0 to 15 Specify the number of resends to be performed if 5
of resends [Unsigned]/Bit the data transfer is not completed within the
String [16-bit] monitoring time specified by "Arrival monitoring
time".
(12) pbi_uMonitorTime Arrival monitoring Word 0 to 16383 Specify the TCP resend timer value or a greater 0
time (Ethernet) [Unsigned]/Bit value for the monitoring time until completion of
String [16-bit] processing. If the processing is not completed
within the monitoring time, data is resent until the
value specified in "Maximum number of resends"
is reached.
• 0 to TCP resend timer value: Time represented
by "TCP resend timer value"
• ("TCP resend timer value" + 1) to 16383: ("TCP
resend timer value" + 1) seconds to 16383s
Arrival monitoring 0, 1 to 32767 Specify the monitoring time until completion of 0
time (CC-Link IE processing. If the processing is not completed
Controller Network, within the monitoring time, data is resent until the
CC-Link IE Field value specified in "Maximum number of resends"
Network, is reached.
MELSECNET/H) • 0: 10s
• 1 to 32767: 1 to 32767s

FB details
Item Description
Available device Target module • RJ71GF11-T2
• RJ71GP21(S)-SX
• RJ71EN71
• RnENCPU (network part)
• RJ71LP21-25
• RJ71BR11
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 133 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function reads clock data from another station to adjust the time of the
programmable controller CPU of own station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN

2 Ethernet-EQUIPPED MODULE FB
44 2.6 M+model_ReadTime
Item Description
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO
2
o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.REQ instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 45 Error codes appears, the initial label value files by
each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error codes
Error code Reference
4000H to 4FFFH  MELSEC iQ-R CPU Module User's Manual (Application)
6F00H to 6FFFH
C000H to CFFFH  MELSEC iQ-R Ethernet User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
E000H to EFFFH  MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
F000H to FFFFH  MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)

2 Ethernet-EQUIPPED MODULE FB
2.6 M+model_ReadTime 45
2.7 M+model_WriteTime

Name
■RJ71EN71, RnENCPU (network part)
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_EE_WriteTime RJ71EN71(E+E) 
M+RJ71EN71_C_WriteTime RJ71EN71(CCIEC) _RJ71EN71(CCIEC)
M+RJ71EN71_EC_WriteTime RJ71EN71(E+CCIEC) _RJ71EN71(E+IEC)
M+RJ71EN71_F_WriteTime RJ71EN71(CCIEF) _RJ71EN71(CCIEF)
M+RJ71EN71_EF_WriteTime RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RJ71GP21(S)-SX
M+RJ71GP21_WriteTime

■RJ71GF11-T2
M+RJ71GF11_WriteTime

■RJ71LP21-25
M+RJ71LP21_WriteTime

■RJ71BR11
M+RJ71BR11_WriteTime

Overview
Item Description
Overview Writes the clock data of the programmable controller of own station to another station to adjust the time of the programmable controller
CPU of another station.
Symbol
M+RJ71GF11_WriteTime
(1) B: i_bEN o_bENO: B (6)
(2) DUT: i_stModule o_bOK: B (7)
(3) UW: i_uTargetNetworkNo o_bErr: B (8)
(4) UW: i_uTargetStationNo o_uErrId: UW (9)
(5) UW: i_uChannel

pbi_uCPU_Type (10)
pbi_uTargetStation (11)
pbi_uResendCountMax (12)
pbi_uMonitorTime (13)

The above FB is an example for the RJ71GF11-T2.

2 Ethernet-EQUIPPED MODULE FB
46 2.7 M+model_WriteTime
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
2
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: EN71_EE_1, EN71_EF_1, EN71_F_1, GF11_1, GP21_1,
LP21_1, BR11_1)
(3) i_uTargetNetworkNo Target network Word 1 to 239 Specify the network number of the target station.
number [Unsigned]/
Bit String
[16-bit]
(4) i_uTargetStationNo Target station Word  Specify the station number of the target station or the transient
number [Unsigned]/ transmission group number.
Bit String ■When "Target station specification method" is set to 0 to specify a
[16-bit] station number
Station number of Ethernet or CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 126: Master operating station
• 1 to 120: Local station, remote device station, intelligent device station,
submaster station
Station number of MELSECNET/H
• 1 to 64
■When "Target station specification method" is set to 1 to specify a
group
Specify the transient transmission group number.
• 1 to 32
■When "Target station specification method" is set to 2 to specify all
stations
The setting is ignored.
(5) i_uChannel Own station channel Word  Specify the channel to be used by the own station.
[Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated
Bit String Instructions)
[16-bit]

■Output arguments
No. Variable name Name Data type Description Default
value
(6) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(7) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(8) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(9) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/Bit
String [16-bit]

2 Ethernet-EQUIPPED MODULE FB
2.7 M+model_WriteTime 47
■Operation parameters
No. Variable name Name Data type Range Description Default
value
(10) pbi_uCPU_Type Target station CPU Word 0000H, 03D0H to Specify the CPU type of the target station. 0
type [Unsigned]/Bit 03D3H, 03E0H • 0000H: To CPU of target station (control CPU)
String [16-bit] to 03E3H, 03FFH • 03D0H: To control system CPU
• 03D1H: To standby system CPU
• 03D2H: To system A CPU
• 03D3H: To system B CPU
• 03E0H: To multiple CPU No.1
• 03E1H: To multiple CPU No.2
• 03E2H: To multiple CPU No.3
• 03E3H: To multiple CPU No.4
• 03FFH: To CPU of target station (control CPU)
(11) pbi_uTargetStation Target station Word 0 to 2 Specify the specification method of a target station. 0
specification method [Unsigned]/Bit • 0: Station number specification  Station with
String [16-bit] the station number specified in "Target station
number"
• 1: Group specification  All stations of the
transient transmission group number specified
in "Target station number" (For the CC-Link IE
Field Network, the value 1 cannot be specified.)
• 2: All stations  All stations of the network
number specified in "Target network number"
(simultaneous broadcast except own station)
(12) pbi_uResendCountM Maximum number of Word 0 to 15 Specify the number of resends to be performed if 5
ax resends [Unsigned]/Bit the data transfer is not completed within the
String [16-bit] monitoring time specified by "Arrival monitoring
time".
(13) pbi_uMonitorTime Arrival monitoring Word 0 to 16383 Specify the TCP resend timer value or a greater 0
time (Ethernet) [Unsigned]/Bit value for the monitoring time until completion of
String [16-bit] processing. If the processing is not completed
within the monitoring time, data is resent until the
value specified in "Maximum number of resends"
is reached.
• 0 to TCP resend timer value: Time represented
by "TCP resend timer value"
• ("TCP resend timer value" + 1) to 16383: ("TCP
resend timer value" + 1) seconds to 16383s
Arrival monitoring 0, 1 to 32767 Specify the monitoring time until completion of 0
time (CC-Link IE processing. If the processing is not completed
Controller Network, within the monitoring time, data is resent until the
CC-Link IE Field value specified in "Maximum number of resends"
Network, is reached.
MELSECNET/H) • 0: 10s
• 1 to 32767: 1 to 32767s

2 Ethernet-EQUIPPED MODULE FB
48 2.7 M+model_WriteTime
FB details
Item Description
Available device Target module • RJ71GF11-T2
• RJ71GP21(S)-SX
• RJ71EN71
• RnENCPU (network part) 2
• RJ71LP21-25
• RJ71BR11
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 133 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function writes clock data to another station to adjust the time of the programmable
controller CPU of the station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code

2 Ethernet-EQUIPPED MODULE FB
2.7 M+model_WriteTime 49
Item Description
Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.REQ instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 50 Error codes appears, the initial label value files by
each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error codes
Error code Reference
4000H to 4FFFH  MELSEC iQ-R CPU Module User's Manual (Application)
6F00H to 6FFFH
C000H to CFFFH  MELSEC iQ-R Ethernet User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
E000H to EFFFH  MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
F000H to FFFFH  MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)

2 Ethernet-EQUIPPED MODULE FB
50 2.7 M+model_WriteTime
2.8 M+model_ConnectionOpen

Name
■RJ71EN71, RnENCPU (network part) 2
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_EE_ConnectionOpen RJ71EN71(E+E) 
M+RJ71EN71_EC_ConnectionOpen RJ71EN71(E+CCIEC) _RJ71EN71(E+IEC)
M+RJ71EN71_EF_ConnectionOpen RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RCPU, RnENCPU (CPU part)


M+RCPU_ConnectionOpen

Overview
Item Description
Overview Opens (establishes) a connection.
Symbol
M+RCPU_ConnectionOpen
(1) B: i_bEN o_bENO: B (4)
(2) DUT: i_stModule o_bOK: B (5)
(3) UW: i_uConnectionNo o_bErr: B (6)
o_uErrId: UW (7)

pbi_bUseParameters 0 (8)
pbi_uProtocol 0 (9)
pbi_uOpen_System 0 (10)
pbi_uConnUsage 0 (11)
pbi_bProcedure 0 (12)
pbi_uExist_Confirm 0 (13)
pbi_uLocal_Port_No 4096 (14)
pbi_uTarget_Port_No 4096 (15)
pbi_u2IP_Address 0 (16)
pbi_bEnable_Online_Change 0 (17)
pbi_bData_Code 0 (18)

The above FB is an example for the CPU module.

2 Ethernet-EQUIPPED MODULE FB
2.8 M+model_ConnectionOpen 51
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be
executed.
Specify the module label of the modules.
(Example: EN71_EE_1, EN71_EF_1, RCPU)
(3) i_uConnectionNo Connection No. Word • RCPU (CPU part for the Specify the number of the connection to be
[Unsigned]/ RnENCPU): 1 to 16 opened.
Bit String • RJ71EN71: 1 to 128
[16-bit] • RnENCPU (network part): 1 to 64

■Output arguments
No. Variable name Name Data type Description Default
value
(4) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(5) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(6) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(7) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/Bit
String [16-bit]

2 Ethernet-EQUIPPED MODULE FB
52 2.8 M+model_ConnectionOpen
■Operation parameters
No. Variable name Name Data type Range Description Default
value
(8) pbi_bUseParameters Parameter used Bit On or off Specify whether to use the parameter values set by the Off
engineering tool or the following operation parameter
values when processing for opening a connection.
• Off: Performs open processing according to the external 2
device configuration setting made by the engineering
tool. (The following operation parameters need not be
set. Any settings are ignored if made.)
• On: Performs open processing according to the following
operation parameters.
(9) pbi_uProtocol Protocol Word 0, 1 Select the protocol to be used for the connection to be 0
[Unsigned]/ opened.
Bit String • 0: TCP/IP
[16-bit] • 1: UDP/IP
(10) pbi_uOpen_System Open method Word 0 to 2 Select the connection open method. 0
[Unsigned]/ • 0: Active open or UDP/IP
Bit String • 1: Unpassive open
[16-bit] • 2: Fullpassive open
(11) pbi_uConnUsage Connection use Word 0 to 2 Specify the purpose of the connection: sending, receiving, 0
application [Unsigned]/ or pairing open with regard to the external device.
Bit String • 0: Send
[16-bit] • 1: Receive
• 2: Pairing open (The value 2 can be set for the
connection No.1 to No.7 and No.9 to No.15.)
Valid only when connection No.1 to 16 is used with the
RJ71EN71 or the RnENCPU (network part).
For the RCPU (CPU part for the RnENCPU), the setting is
ignored because it does not support communications using
a fixed buffer.
(12) pbi_bProcedure Communication Bit On or off Specify whether to use a communication procedure. Off
procedure • Off: Procedure not used
• On: Procedure used
Valid only when connection No.1 to 16 is used with the
RJ71EN71 or the RnENCPU (network part).
For the RCPU (CPU part for the RnENCPU), the setting is
ignored because it does not support communications using
a fixed buffer.
(13) pbi_uExist_Confirm Alive check Word 0 to 2 Specify whether to enable the arrive check function (with 0
[Unsigned]/ the use mode).
Bit String • 0: Disable the alive check.
[16-bit] • 1: Enable KeepAlive (in TCP/IP mode only).
• 2: Enable the alive check with UDP (in UDP/IP mode
only)
Valid only when connection No.1 to 16 is used with the
RJ71EN71 or the RnENCPU (network part).
For the RCPU (CPU part for the RnENCPU), the setting is
ignored because it does not support communications using
a fixed buffer.
(14) pbi_uLocal_Port_No Own node port Word 1 to 4999, Specify the port number of the own node. 4096
number [Unsigned]/ 5010 to Port numbers 1 to 1023 are generally reserved port
Bit String 65534 numbers (WELL KNOWN PORT NUMBERS), and
[16-bit] therefore port numbers 1024 to 4999 and 5010 to 65534
should be used.
(15) pbi_uTarget_Port_No Destination port Word 1 to Specify the destination port number. 4096
number [Unsigned]/ 65534, With the connection that is assigned port No.65535 (only
Bit String 65535 when the UDP/IP protocol is selected), data is received
[16-bit] through all port numbers. Data cannot be sent with the
connection which is assigned port No.65535 and therefore
a port number from 1 to 65534 should be specified to send
data.

2 Ethernet-EQUIPPED MODULE FB
2.8 M+model_ConnectionOpen 53
No. Variable name Name Data type Range Description Default
value
(16) pbi_u2IP_Address IP address of external Word 0.0.0.1 to Specify the IP address of an external device. 192.168.1.
device [Unsigned]/ 255.255.2 Specify the third and fourth octets to the 1st word, and first 1
Bit String 55.255 and second octets to the 2nd word. (C0A8010
[16-bit] (00000001 Specify 255.255.255.255 (FFFFFFFFH) when performing 1H)
(0..1) H to simultaneous broadcast.
FFFFFFFF
b15 b8 b7 b0
H)
+0 (3) (4)
+1 (1) (2)

(1) to (4): IP address octet


(17) pbi_bEnable_Online_ Online program Bit On or off Specify whether to enable or disable the online program Off
Change change change.
• Off: Disable
• On: Enable
Valid only for the RJ71EN71 or the RnENCPU (network
part). For the RCPU (CPU part for the RnENCPU), the
setting is ignored. Set this item in the module parameters
of the CPU module.
(18) pbi_bData_Code Communication data Bit On or off Set the communication code used. Off
code • Off: Binary code
• On: ASCII code
Valid only for the RJ71EN71 or the RnENCPU (network
part). For the RCPU (CPU part for the RnENCPU), the
setting is ignored. Set this item in the module parameters
of the CPU module.

FB details
Item Description
Available device Target module • RCPU (CPU part for the RnENCPU)
• RJ71EN71
• RnENCPU (network part)
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 171 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution command) is turned on, this function opens (establishes) a connection for data communication with an external
device.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)

2 Ethernet-EQUIPPED MODULE FB
54 2.8 M+model_ConnectionOpen
Item Description
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO
2
o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions ■Specifications of the FBs
• This module FB cannot be executed for the connection that is being used by another module FB or a dedicated instruction. An error
occurs if this module FB is executed for the connection in use.
• When open processing is performed according to the content of the operation parameter with pbi_bUseParameters set to ON, the
available communication means are the fixed-buffer communications and socket communications only.
• If this FB is executed for the connection for which parameters are already set by "External Device Connection Configuration Setting",
make settings so that the parameters specified by this FB are overwritten.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 55 Error codes appears, the initial label value files by
each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.
■Operations of the FBs
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.

Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R Ethernet User's Manual (Application)

2 Ethernet-EQUIPPED MODULE FB
2.8 M+model_ConnectionOpen 55
2.9 M+model_ConnectionClose

Name
■RJ71EN71, RnENCPU (network part)
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_EE_ConnectionClose RJ71EN71(E+E) 
M+RJ71EN71_EC_ConnectionClose RJ71EN71(E+CCIEC) _RJ71EN71(E+IEC)
M+RJ71EN71_EF_ConnectionClose RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RCPU, RnENCPU (CPU part)


M+RCPU_ConnectionClose

Overview
Item Description
Overview Closes (disconnects) the connection.
Symbol
M+RCPU_ConnectionClose
(1) B: i_bEN o_bENO: B (4)
(2) DUT: i_stModule o_bOK: B (5)
(3) UW: i_uConnectionNo o_bErr: B (6)
o_uErrId: UW (7)

pbo_uErrConn_No 0 (8)

The above FB is an example for the CPU module.

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution Bit  On: Start FB.
command Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be
executed.
Specify the module label of the modules.
(Example: EN71_EE_1, EN71_EF_1, RCPU)
(3) i_uConnectionNo Connection No. Word • RCPU (CPU part for the Specify the number of the connection to be closed.
[Unsigned]/ RnENCPU): 1 to 16 This function closes all connections if 65535
Bit String • RJ71EN71: 1 to 128 (FFFFH) is specified.
[16-bit] • RnENCPU (network part): 1 to 64

■Output arguments
No. Variable name Name Data type Description Default
value
(4) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(5) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(6) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(7) o_uErrId Error code Word [Unsigned]/ An error code is stored at error completion. 0
Bit String [16-bit]

2 Ethernet-EQUIPPED MODULE FB
56 2.9 M+model_ConnectionClose
■Public variables
No. Variable name Name Data type Description Default
value
(8) pbo_uErrConn_No Error connection Word [Unsigned]/ The number of the connection for which close processing was 0
No. Bit String [16-bit] completed with an error is stored.
If 65535 (FFFFH) is specified in "Connection No." (i_uConnectionNo),
the number of the connection for which close processing was first
completed with an error is stored.
2

FB details
Item Description
Available device Target module • RCPU (CPU part for the RnENCPU)
• RJ71EN71
• RnENCPU (network part)
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 86 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing • When i_bEN (execution command) is turned on, this function closes a connection for data communication with an external device.
• The function closes all connections if 65535 (FFFFH) is specified for "Connection No." (i_uConnectionNo) in the input argument.
• If the function fails to close even one connection among those specified to be closed, it is completed with an error.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code

2 Ethernet-EQUIPPED MODULE FB
2.9 M+model_ConnectionClose 57
Item Description
Precautions • This module FB cannot be executed for the connection that is being used by another module FB or a dedicated instruction. An error
occurs if this module FB is executed for the connection in use.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R Ethernet User's Manual (Application)

2 Ethernet-EQUIPPED MODULE FB
58 2.9 M+model_ConnectionClose
2.10 M+model_Recv_Socket

Name
■RJ71EN71, RnENCPU (network part) 2
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_EE_Recv_Socket RJ71EN71(E+E) 
M+RJ71EN71_EC_Recv_Socket RJ71EN71(E+CCIEC) _RJ71EN71(E+IEC)
M+RJ71EN71_EF_Recv_Socket RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RCPU, RnENCPU (CPU part)


M+RCPU_Recv_Socket

Overview
Item Description
Overview Reads the data received from the external device through socket communications or fixed buffer communications.
Symbol
(1) M+RCPU_Recv_Socket o_bENO: B (4)
B: i_bEN
(2) DUT: i_stModule o_bOK: B (5)
(3) UW: i_uConnectionNo o_bErr: B (6)
o_uErrId: UW (7)
o_uRecvData: UW (8)

pbi_bReadTiming 0 (9)

The above FB is an example for the CPU module.

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution Bit  On: Start FB.
command Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be
executed.
Specify the module label of the modules.
(Example: EN71_EE_1, EN71_EF_1, RCPU)
(3) i_uConnectionNo Connection No. Word • RCPU (CPU part for the Specify the number of the connection to be received.
[Unsigned]/ RnENCPU): 1 to 16
Bit String • RJ71EN71: 1 to 128
[16-bit] • RnENCPU (network part): 1 to 64

2 Ethernet-EQUIPPED MODULE FB
2.10 M+model_Recv_Socket 59
■Output arguments
No. Variable name Name Data type Description Default
value
(4) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(5) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(6) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(7) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/Bit
String [16-bit]
(8) o_uRecvData Receive data Word Specify the receive data length and the start number of the device for 0
storage destination [Unsigned]/Bit storing received data. The data that has been read is stored sequentially
String [16-bit] in ascending order of addresses as shown below.
• When the data unit is word
1st word: Receive data length (unit: word)
2nd to nth word: Receive data 1 to m

• When the data unit is byte


1st word: Receive data length (unit: byte)
2nd to nth word:

b15 b8 b7 b0
(2) (1)
·
(4) (3)

(1) Receive data 1


(2) Receive data 2
(3) Receive data m-1
(4) Receive data m
The data format, unit, and data length range of receive data vary
depending on the module type and connection number.
Receive data is stored in the word area in order from the first half (b0 to
b7) to the second half (b8 to b15).
The following cannot be specified as an argument. Specifying any of the
following may cause a CPU error (2820H: Device/label/buffer memory
specification incorrect).
• Dynamically specified array elements (Example: wLabel[D0])
• Digit-specified labels (Example: K4bLabel)
• Indirectly specified devices (Example: @W0)
• Local devices (Example: #D0)

■Operation parameters
No. Variable name Name Data Range Description Default value
type
(9) pbi_bReadTiming Read timing Bit On or off Specify the timing of executing data read • RCPU (CPU part for the
processing. RnENCPU): Off
• Off: Start reading soon after the module FB • RJ71EN71, RnENCPU
starts. (network part): On
• On: Start reading in the first END processing
after the module FB starts.

FB details
Item Description
Available device Target module • RCPU (CPU part for the RnENCPU)
• RJ71EN71
• RnENCPU (network part)
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 109 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function reads the data received to the connection specified by the input argument.

2 Ethernet-EQUIPPED MODULE FB
60 2.10 M+model_Recv_Socket
Item Description
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Timing chart of I/O • For normal completion
signals

i_bEN 2
o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This module FB cannot be executed for the connection that is being used by another module FB or a dedicated instruction. An error
occurs if this module FB is executed for the connection in use.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.
■For the RCPU (CPU part for the RnENCPU)
• The execution command of this FB can be executed at any timing. However, when executing it after receiving data, SD1506 (Socket
communications reception status signal) or corresponding module label must be added to conditions of the execution.
• When the module FB is executed by specifying ON (start reading in the first END processing after the FB starts) in operation parameter
"Read timing", the module FB extends the scan time to complete data read processing within one END processing.
■For the RJ71EN71 or the RnENCPU (network part)
• The execution command of this FB can be executed at any timing. However, when executing it after receiving data, 'Socket/fixed buffer
reception status signal' (Un\G1900016 to Un\G1900023) must be added to conditions of the execution.
• When the module FB is executed by specifying OFF (Start reading soon after the module FB starts) in operation parameter "Read
timing", processing completes in a single scan.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 61 Error codes appears, the initial label value files by
each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.

Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R Ethernet User's Manual (Application)

2 Ethernet-EQUIPPED MODULE FB
2.10 M+model_Recv_Socket 61
2.11 M+model_Send_Socket

Name
■RJ71EN71, RnENCPU (network part)
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_EE_Send_Socket RJ71EN71(E+E) 
M+RJ71EN71_EC_Send_Socket RJ71EN71(E+CCIEC) _RJ71EN71(E+IEC)
M+RJ71EN71_EF_Send_Socket RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RCPU, RnENCPU (CPU part)


M+RCPU_Send_Socket

Overview
Item Description
Overview Sends data to the external device through socket communications or fixed buffer communications.
Symbol
(1) M+RCPU_Send_Socket o_bENO: B (5)
B: i_bEN
(2) DUT: i_stModule o_bOK: B (6)
(3) UW: i_uConnectionNo o_bErr: B (7)

(4) UW: i_uSendData o_uErrId: UW (8)

The above FB is an example for the CPU module.

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution Bit  On: Start FB.
command Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: EN71_EE_1, EN71_EF_1, RCPU)
(3) i_uConnectionNo Connection No. Word • RCPU (CPU part for the Specify the number of the connection to be sent.
[Unsigned]/ RnENCPU): 1 to 16
Bit String • RJ71EN71: 1 to 128
[16-bit] • RnENCPU (network
part): 1 to 64

2 Ethernet-EQUIPPED MODULE FB
62 2.11 M+model_Send_Socket
No. Variable name Name Data type Range Description
(4) i_uSendData Send data storage Word  Specify the send data length and the start number of the
destination [Unsigned]/ device containing the send data.*1
Bit String • When the data unit is word
[16-bit] 1st word: Send data length (unit: word)
2nd to nth word: Send data 1 to send data m
• When the data unit is byte
1st word: Send data length (unit: byte) 2
2nd to nth word:

b15 b8 b7 b0
(2) (1)
·
(4) (3)

(1) Send data 1


(2) Send data 2
(3) Send data m-1
(4) Send data m
The data format and data length range of send data vary
depending on the module type and the setting of the
connection used.
Data is sent in the word area in order from the first half (b0 to
b7) to the second half (b8 to b15).
The following cannot be specified as an argument. Specifying
any of the following may cause a CPU error (2820H: Device/
label/buffer memory specification incorrect).
• Dynamically specified array elements (Example:
wLabel[D0])
• Digit-specified labels (Example: K4bLabel)
• Indirectly specified devices (Example: @W0)
• Local devices (Example: #D0)

*1 The data unit and the range of send data length differ depending on the communication method of parameters and communication data
code setting as follows.

Parameter setting Data unit Send data length


Communication method Communication data code
Communications using a fixed buffer (procedure Binary Word 1 to 5113
used)
ASCII Word 1 to 2556
Communications using a fixed buffer (procedure Binary/ASCII Byte 1 to 10238
not used)
Socket communications Binary/ASCII Byte 1 to 10238

■Output arguments
No. Variable name Name Data type Description Default
value
(5) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(6) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(7) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(8) o_uErrId Error code Word [Unsigned]/Bit An error code is stored at error completion. 0
String [16-bit]

2 Ethernet-EQUIPPED MODULE FB
2.11 M+model_Send_Socket 63
FB details
Item Description
Available device Target module • RCPU (CPU part for the RnENCPU)
• RJ71EN71
• RnENCPU (network part)
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 60 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function sends the data to the external device of the connection specified by the
input argument.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This module FB cannot be executed for the connection that is being used by another module FB or a dedicated instruction. An error
occurs if this module FB is executed for the connection in use.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R Ethernet User's Manual (Application)

2 Ethernet-EQUIPPED MODULE FB
64 2.11 M+model_Send_Socket
2.12 M+model_Refresh_Data

Name
This FB is displayed as follows on the engineering tool depending on the settings.
2
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_EE_Refresh_Data RJ71EN71(E+E) 
M+RJ71EN71_EC_Refresh_Data RJ71EN71(E+CCIEC) _RJ71EN71(E+IEC)
M+RJ71EN71_EF_Refresh_Data RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

Overview
Item Description
Overview Transfers module label data.
Symbol
M+RCPU_Refresh_Data
(1) B: i_bEN o_bENO: B (3)
(2) DUT: i_stModule

The above FB is an example for the CPU module.

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: EN71_EE_1, EN71_EF_1, RCPU)

■Output arguments
No. Variable name Name Data type Description Default value
(3) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.

2 Ethernet-EQUIPPED MODULE FB
2.12 M+model_Refresh_Data 65
FB details
Item Description
Available device Target module • RJ71EN71
• RnENCPU (network part)
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 33 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function transfers the following buffer memory data of the RJ71EN71 or the
RnENCPU (network part) to the module label.
• Open completion signal (addresses 1900000 to 1900007)
• Open request signal (addresses 1900008 to 1900015)
• Socket/fixed buffer reception status signal (addresses 1900016 to 1900023)
FB compilation Macro type
method
FB operation ON-time execution type
Timing chart of I/O
signals i_bEN

o_bENO

Precautions When another FB is used, write the program so that scan is executed every time at the beginning of the program.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error code
This FB has no error code.

2 Ethernet-EQUIPPED MODULE FB
66 2.12 M+model_Refresh_Data
2.13 M+model_SLMP_DeviceRead_IP

Name
M+RCPU_SLMP_DeviceRead_IP
2
Overview
Item Description
Overview Reads data from the SLMP-compatible device specified by an IP address. The external device must support SLMP command (Device
Read).
Symbol
M+RCPU_SLMP_DeviceRead_IP
(1) B: i_bEN o_bENO: B (10)
(2) DUT: i_stModule o_bOK: B (11)
(3) UW: i_u2IP_Address o_bErr: B (12)
(4) UW: i_uSubCommand o_uErrId: UW (13)
(5) UW: i_uDeviceCode o_uReadData:UW (14)

(6) UW: i_u2DeviceNo


(7) UW: i_uDevicePoints
(8) UW: i_uChannel
(9) UW: i_uTarget_Port_No

pbi_uRequestModuleIO (15)
pbi_uResendCountMax (16)
pbi_uMonitorTime (17)
pbo_uResendCount (18)
pbo_u4ErrTime (19)
pbo_u2ErrIP_Address (20)

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be
executed.
Specify the module label of the modules.
(3) i_u2IP_Address IP address of external Word [Unsigned]/Bit 0.0.0.1 to Specify the IP address of an external device.
device String [16-bit] (0..1) 255.255.255.254 Specify the third and fourth octets to the 1st word,
(00000001H to and first and second octets to the 2nd word.
FFFFFFFEH) Note that the fourth octet cannot be set to 0 or 255
(FFH).

b15 b8 b7 b0
+0 (3) (4)
+1 (1) (2)

(1) to (4): IP address octet


(4) i_uSubCommand Sub command Word [Unsigned]/Bit  Specify the read unit and specification method of a
String [16-bit] device.
■0th bit: Read unit
0: In units of words
1: In units of bits
■1st bit: Specification method of the device is read
0: Specify the device code in 2 digits and the start
device number in 6 digits (for MELSEC-Q/L series).
1: Specify the device code in 4 digits and the start
device number in 8 digits (for MELSEC iQ-R series).

2 Ethernet-EQUIPPED MODULE FB
2.13 M+model_SLMP_DeviceRead_IP 67
No. Variable name Name Data type Range Description
(5) i_uDeviceCode Device code*1 Word [Unsigned]/Bit  Specify the device code of the device to be read in
String [16-bit] binary code.
• When the 1st bit of the subcommand is 0: 2 digits
• When the 1st bit of the subcommand is 1: 4 digits
(6) i_u2DeviceNo Head device No. Word [Unsigned]/Bit  Specify the start device number of the device to be
String [16-bit] (0..1) read in binary code.
• When the 1st bit of the subcommand is 0: 6 digits
• When the 1st bit of the subcommand is 1: 8 digits
(7) i_uDevicePoints Number of device Word [Unsigned]/Bit  Specify the number of device points of the device to
points String [16-bit] be read in binary code.
• When the 0th bit of the subcommand is 0: 1 to 960
• When the 0th bit of the subcommand is 1: 1 to
3972
(8) i_uChannel Own station channel Word [Unsigned]/Bit 1 to 9 Specify the channel to be used by the own station.
String [16-bit] Since whether or not a serial number*2 is given to the
request message depends on the channel, specify
the channel as follows according to the application.
• 1: No serial number is given
• 2 to 9: Serial number is given
(9) i_uTarget_Port_No Destination port Word [Unsigned]/Bit 1 to 65534 Specify the UDP port number of an external device.
number String [16-bit]

*1 For details on each device code, refer to the following.


 SLMP Reference Manual
*2 Give the serial numbers when sending several request messages to the same SLMP-compatible device. Serial numbers to be given are
automatically numbered by the system. For the serial number, refer to the following.
 SLMP Reference Manual

2 Ethernet-EQUIPPED MODULE FB
68 2.13 M+model_SLMP_DeviceRead_IP
■Output arguments
No. Variable name Name Data type Description Default
value
(10) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(11) o_bOK Normal completion Bit The FB has been processed normally when this argument is
on.
Off
2
(12) o_bErr Error completion Bit The FB has been processed abnormally when this argument Off
is on.
(13) o_uErrId Error code Word [Unsigned]/Bit An error code is stored at error completion. 0
String [16-bit]
(14) o_uReadData Read data storage Word [Unsigned]/Bit Specify the start device number of the device for storing the 0
destination String [16-bit] read data. The read data is stored in binary code.
■When the 0th bit of the subcommand is 0
The device data is read in units of words.
Example: When reading the bit device M100 to M115 (one
word) in units of words
1st word:
b15 b8 b7 b0
1 2 3 4

0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
M115 M100

Example: When reading the word device D0 to D2 in units of


words
1st word:
b15 b8 b7 b0
1 2 3 4

D0
2nd word:
b15 b8 b7 b0
0 0 0 2

D1
3rd word:
b15 b8 b7 b0
1 D E F

D2
■When the 0th bit of the subcommand is 1
The device data is read in units of bits.
Example: When reading the bit device M100 to M107 in units
of bits
1st word:
b15 b8 b7 b0
0 1 0 0
M102 M103 M100 M101
2nd word:
b15 b8 b7 b0

1 1 0 0

M106 M107 M104 M105

2 Ethernet-EQUIPPED MODULE FB
2.13 M+model_SLMP_DeviceRead_IP 69
■Operation parameters
No. Variable name Name Data type Range Description Default
value
(15) pbi_uRequestModuleIO Requested module I/ Word 03D0H to 03D3H, 03E0H to Specify the module of the access 03FFH
O No. [Unsigned]/ 03E3H, 03FFH destination.
Bit String [16- • 03D0H: Control system CPU
bit] • 03D1H: Standby system CPU
• 03D2H: System A CPU
• 03D3H: System B CPU
• 03FFH: Own station, control CPU
• 03E0H: Multiple CPU No.1
• 03E1H: Multiple CPU No.2
• 03E2H: Multiple CPU No.3
• 03E3H: Multiple CPU No.4
(16) pbi_uResendCountMax Maximum number of Word 0 to 15 Specify the number of resends to be 5
resends [Unsigned]/ performed if the data transfer is not
Bit String [16- completed within the monitoring
bit] time specified by pbi_uMonitorTime
(Arrival monitoring time).
• 0 to 15
(17) pbi_uMonitorTime Arrival monitoring Word 0, 1 to 32767 Specify the monitoring time until 0
time [Unsigned]/ completion of processing. If the
Bit String [16- processing is not completed within
bit] the monitoring time, data is resent
until the value specified in
pbi_uResendCountMax (Maximum
number of resends) is reached.
• 0: 10s
• 1 to 32767: 1 to 32767s

■Public variables
No. Variable name Name Data type Description Default
value
(18) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit]
(19) pbo_u4ErrTime Error occurrence time Word [Unsigned]/Bit Clock data at the time of error occurrence is stored. 0
String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(20) pbo_u2ErrIP_Address Error-detected station Word [Unsigned]/Bit The IP address of the station in which an error was detected is 0
IP address String [16-bit] (0..1) stored.
The third and fourth octets are stored in the 1st word, and first
and second octets are stored in the 2nd word.

b15 b8 b7 b0
+0 (3) (4)
+1 (1) (2)

(1) to (4): IP address octet

2 Ethernet-EQUIPPED MODULE FB
70 2.13 M+model_SLMP_DeviceRead_IP
FB details
Item Description
Available device Target module • RnCPU*1
• RnENCPU (CPU part)*1
CPU module • RnCPU*1
• RnENCPU*1 2
*2
Engineering tool GX Works3
Language Ladder diagram
Number of basic 190 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing • When i_bEN (execution command) is turned on, this function reads device data from the SLMP-compatible device.
• Execute this FB while the IP address for an external device is specified.
• This FB uses Read command (command: 0401) of the SLMP. The message of the SLMP command is a binary code. ( SLMP
Reference Manual)
FB compilation Macro type
method
FB operation ON-time execution type
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code

2 Ethernet-EQUIPPED MODULE FB
2.13 M+model_SLMP_DeviceRead_IP 71
Item Description
Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system
and required operations.
• This FB uses the SLMPSND instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off
i_bEN (execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is
cleared to 0.
• In this FB, access devices (such as link direct device) that are accessed by the extension specification of the SLMP cannot be read.
• In this FB, stations in other network cannot be set as the target station.
• When this FB is executed for the port of an external device where the remote password is set, execute this FB after performing the
unlock processing of the remote password. When this FB is executed for the port of an external device where the remote password
is set, an error will occur.
• The target station must support "Read (command: 0401)" of the SLMP command.
• This FB is for communications in binary code only. (Communications using ASCII code cannot be performed.)
• This FB uses UDP communications. Set the protocol setting of the external device to UDP.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R
CPU Module User's Manual (Application)) If an error code that is not described in Page 72 Error codes appears, the initial label
value files by each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to
the boot file setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

*1 The supported firmware version is "17" or later.


*2 The supported version is "1.020W" or later.

Error codes
Error code Description Action
100H A value out of the range is set in the number of device points Set the value within the setting range in the number of device
(i_uDevicePoints) of the argument. points (i_uDevicePoints).
C000H to CFFFH  MELSEC iQ-R Ethernet User's Manual (Application)

2 Ethernet-EQUIPPED MODULE FB
72 2.13 M+model_SLMP_DeviceRead_IP
2.14 M+model_SLMP_DeviceWrite_IP

Name
M+RCPU_SLMP_DeviceWrite_IP
2
Overview
Item Description
Overview Writes data to the SLMP-compatible device specified by an IP address. The external device must support SLMP command (Device Write).
Symbol
M+RCPU_SLMP_DeviceWrite_IP
(1) B: i_bEN o_bENO: B (11)
(2) DUT: i_stModule o_bOK: B (12)
(3) UW: i_u2IP_Address o_bErr: B (13)
(4) UW: i_uSubCommand o_uErrId: UW (14)
(5) UW: i_uDeviceCode
(6) UW: i_u2DeviceNo
(7) UW: i_uDevicePoints
(8) UW: i_uWriteData
(9) UW: i_uChannel
(10) UW: i_uTarget_Port_No
pbi_uRequestModuleIO (15)
pbi_uResendCountMax (16)
pbi_uMonitorTime (17)
pbo_uResendCount (18)
pbo_u4ErrTime (19)
pbo_u2ErrIP_Address (20)

2 Ethernet-EQUIPPED MODULE FB
2.14 M+model_SLMP_DeviceWrite_IP 73
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(3) i_u2IP_Address IP address of external Word [Unsigned]/Bit 0.0.0.1 to Specify the IP address of the target station.
device String [16-bit] (0..1) 255.255.255.254 Specify the third and fourth octets to the 1st word, and
(1H to first and second octets to the 2nd word.
FFFFFFFEH) Note that the fourth octet cannot be set to 0 or 255
(FFH).

b15 b8 b7 b0
+0 (3) (4)
+1 (1) (2)

(1) to (4): IP address octet


(4) i_uSubCommand Sub command Word [Unsigned]/Bit  Specify the write unit and specification method of a
String [16-bit] device.
■0th bit: Write unit
0: In units of words
1: In units of bits
■Specification method of the device is written
0: Specify the device code in 2 digits and the start
device number in 6 digits (for MELSEC-Q/L series).
1: Specify the device code in 4 digits and the start
device number in 8 digits (for MELSEC iQ-R series).
(5) i_uDeviceCode Device code*1 Word [Unsigned]/Bit  Specify the device code of the device to be written in
String [16-bit] binary code.
• When the 1st bit of the subcommand is 0: 2 digits
• When the 1st bit of the subcommand is 1: 4 digits
(6) i_u2DeviceNo Head device No. Word [Unsigned]/Bit  Specify the start device number of the device to be
String [16-bit] (0..1) written in binary code.
• When the 1st bit of the subcommand is 0: 6 digits
• When the 1st bit of the subcommand is 1: 8 digits
(7) i_uDevicePoints Number of device Word [Unsigned]/Bit  Specify the number of device points of the device to be
points String [16-bit] written in binary code.
• When the 0th bit of the subcommand is 0: 1 to 960
• When the 0th bit of the subcommand is 1: 1 to 3972

2 Ethernet-EQUIPPED MODULE FB
74 2.14 M+model_SLMP_DeviceWrite_IP
No. Variable name Name Data type Range Description
(8) i_uWriteData Write data storage Word [Unsigned]/Bit  Specify the start device number of the device for storing
destination String [16-bit] the write data.
■When the 0th bit of the subcommand is 0
The device data is written in units of words.
Example: When writing the bit device M100 to M115
(one word) in units of words
1st word: 2
b15 b8 b7 b0
1 2 3 4

0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
M115 M100
Example: When writing the word device D0 to D2 in
units of words
1st word:
b15 b8 b7 b0
1 2 3 4

D0
2nd word:
b15 b8 b7 b0
0 0 0 2

D1
3rd word:
b15 b8 b7 b0
1 D E F

D2
■When the 0th bit of the subcommand is 1
The device data is written in units of bits.
Example: When writing the bit device M100 to M107 in
units of bits
1st word:
b15 b8 b7 b0
0 1 0 0
M102 M103 M100 M101
2nd word:
b15 b8 b7 b0

1 1 0 0

M106 M107 M104 M105

(9) i_uChannel Own station channel Word [Unsigned]/Bit 1 to 9 Specify the channel to be used by the own station.
String [16-bit] Since whether or not a serial number*2 is given to the
request message depends on the channel, specify the
channel as follows according to the application.
• 1: No serial number is given
• 2 to 9: Serial number is given
(10) i_uTarget_Port_No Destination port Word [Unsigned]/Bit 1 to 65534 Specify the UDP port number of an external device.
number String [16-bit]

*1 For details on each device code, refer to the following.


 SLMP Reference Manual
*2 Give the serial numbers when sending several request messages to the same SLMP-compatible device. Serial numbers to be given are
automatically numbered by the system. For the serial number, refer to the following.
 SLMP Reference Manual

2 Ethernet-EQUIPPED MODULE FB
2.14 M+model_SLMP_DeviceWrite_IP 75
■Output arguments
No. Variable name Name Data type Description Default
value
(11) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(12) o_bOK Normal completion Bit The FB has been processed normally when this argument is Off
on.
(13) o_bErr Error completion Bit The FB has been processed abnormally when this argument Off
is on.
(14) o_uErrId Error code Word [Unsigned]/Bit An error code is stored at error completion. 0
String [16-bit]

■Operation parameters
No. Variable name Name Data type Range Description Default
value
(15) pbi_uRequestModuleIO Requested module I/ Word 03D0H to 03D3H, 03E0H to Specify the module of the access 03FFH
O No. [Unsigned]/ 03E3H, 03FFH destination.
Bit String [16- • 03D0H: Control system CPU
bit] • 03D1H: Standby system CPU
• 03D2H: System A CPU
• 03D3H: System B CPU
• 03FFH: Own station, control
CPU
• 03E0H: Multiple CPU No.1
• 03E1H: Multiple CPU No.2
• 03E2H: Multiple CPU No.3
• 03E3H: Multiple CPU No.4
(16) pbi_uResendCountMax Maximum number of Word 0 to 15 Specify the number of resends to 5
resends [Unsigned]/ be performed if the data transfer is
Bit String [16- not completed within the
bit] monitoring time specified by
pbi_uMonitorTime (Arrival
monitoring time).
• 0 to 15
(17) pbi_uMonitorTime Arrival monitoring Word 0, 1 to 32767 Specify the monitoring time until 0
time [Unsigned]/ completion of processing. If the
Bit String [16- processing is not completed within
bit] the monitoring time, data is resent
until the value specified in
pbi_uResendCountMax (Maximum
number of resends) is reached.
• 0: 10s
• 1 to 32767: 1 to 32767s

2 Ethernet-EQUIPPED MODULE FB
76 2.14 M+model_SLMP_DeviceWrite_IP
■Public variables
No. Variable name Name Data type Description Default
value
(18) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit]
(19) pbo_u4ErrTime Error occurrence time Word [Unsigned]/Bit
String [16-bit] (0..3)
Clock data at the time of error occurrence is stored.
1st word
0
2
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(20) pbo_u2ErrIP_Address Error-detected station Word [Unsigned]/Bit The IP address of the station in which an error was detected is 0
IP address String [16-bit] (0..1) stored.
The third and fourth octets are stored in the 1st word, and first
and second octets are stored in the 2nd word.

b15 b8 b7 b0
+0 (3) (4)
+1 (1) (2)

(1) to (4): IP address octet

FB details
Item Description
Available device Target module • RnCPU*1
• RnENCPU (CPU part)*1
CPU module • RnCPU*1
• RnENCPU*1
Engineering tool GX Works3*2
Language Ladder diagram
Number of basic 210 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing • When i_bEN (execution command) is turned on, this function writes device data of the SLMP-compatible device.
• Execute this FB while the IP address for an external device is specified.
• This FB uses Write command (command: 1401) of the SLMP. The message of the SLMP command is a binary code. ( SLMP
Reference Manual)
FB compilation Macro type
method
FB operation ON-time execution type

2 Ethernet-EQUIPPED MODULE FB
2.14 M+model_SLMP_DeviceWrite_IP 77
Item Description
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system
and required operations.
• This FB uses the SLMPSND instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off
i_bEN (execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is
cleared to 0.
• In this FB, access devices (such as link direct device) that are accessed by the extension specification of the SLMP cannot be
written.
• In this FB, stations in other network cannot be set as the target station.
• When this FB is executed for the port of an external device where the remote password is set, execute this FB after performing the
unlock processing of the remote password. When this FB is executed for the port of an external device where the remote password
is set, an error will occur.
• The target station must support "Write (command: 1401)" of the SLMP command.
• This FB is for communications in binary code only. (Communications using ASCII code cannot be performed.)
• This FB uses UDP communications. Set the protocol setting of the external device to UDP.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R
CPU Module User's Manual (Application)) If an error code that is not described in Page 78 Error codes appears, the initial label
value files by each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to
the boot file setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

*1 The supported firmware version is "17" or later.


*2 The supported version is "1.020W" or later.

Error codes
Error code Description Action
100H A value out of the range is set in the number of device points Set the value within the setting range in the number of device
(i_uDevicePoints) of the argument. points (i_uDevicePoints).
C000H to CFFFH  MELSEC iQ-R Ethernet User's Manual (Application)

2 Ethernet-EQUIPPED MODULE FB
78 2.14 M+model_SLMP_DeviceWrite_IP
3 CC-Link IE TSN MASTER/LOCAL MODULE FB

3.1 M+model_DeviceRead

Name
■RJ71GN11-T2 3
M+RJ71GN11_DeviceRead

■RJ71GN11-SX
M+RJ71GN11_SX_DeviceRead

■RJ71GN11-EIP
M+RJ71GN11_SE_DeviceRead

Overview
Item Description
Overview Reads data by specifying a device in the programmable controller of another station.
Symbol
M+RJ71GN11_DeviceRead
(1) B: i_bEN o_bENO: B (7)
(2) DUT: i_stModule o_bOK: B (8)
(3) UW: i_u2TargetAddress o_bErr: B (9)
(4) UW: i_uDataLength o_uErrId: UW (10)
(5) S: i_s32TargetDevice o_uReadData: UW (11)
(6) UW: i_uChannel

pbi_uCPU_Type (12)
pbi_uResendCountMax (13)
pbi_uTimeUnit (14)
pbi_uMonitorTime (15)
pbi_bStationSpecific (16)
pbo_uResendCount (17)
pbo_u4ErrTime (18)
pbo_uErrStationAddress1 (19)
pbo_uErrStationAddress2 (20)

The above FB is an example for the RJ71GN11-T2.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.1 M+model_DeviceRead 79
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: GN11_1, GN11_SX_1, GN11_SE_1)
(3) i_u2TargetAddress Target station Word  Specify the network number and station number of the target station when
address [Unsigned]/ "Target station address specification method" is off. When specifying the
Bit String address using a label, use an array as the data type.
[16-bit] • 1st word: Network number (1 to 239)
(0..1) • 2nd word: Station number
Station number of Ethernet or CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 126: Master operating station
• 1 to 120: Local station, remote device station, intelligent device station,
submaster station
Station number of CC-Link IE TSN
• 125: Master station
• 1 to 120: Local station

Specify the IP address of the target station when "Target station address
specification method" is on. Specify the third and fourth octets to the 1st
word, and first and second octets to the 2nd word. When specifying the
address using a label, use an array as the data type.
• Ethernet, CC-Link IE TSN
00000001H to FFFFFFFEH
Specify a value within the range of 1 to 254 (FEH) for the fourth octet.

b15 b8 b7 b0
+0 3 4
+1 1 2

1 to 4: IP address octet
(4) i_uDataLength Read data length Word  Specify the number of words to be read.
[Unsigned]/ ■When reading data from the RCPU, QCPU, or LCPU
Bit String • For channel 1 to channel 8: 1 to 960 words
[16-bit] • For channel 9 and channel 10: 1 to 8192 words
■When reading data from the QnACPU
• 1 to 480 words
(5) i_s32TargetDevice Target station read Character  Specify the start address of the target station from which data is to be read.
device string (32)
(6) i_uChannel Own station channel Word  Specify the channel to be used by the own station.
[Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
Bit String
[16-bit]

■Output arguments
No. Variable name Name Data type Description Default
value
(7) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(8) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(9) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(10) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/
Bit String
[16-bit]
(11) o_uReadData Read data storage Word Specify the start number of the device for storing the read data 0
device [Unsigned]/
Bit String
[16-bit]

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


80 3.1 M+model_DeviceRead
■Operation parameters
No. Variable name Name Data type Range Description Default
value
(12) pbi_uCPU_Type Target station CPU Word 0000H, 03D0H Specify the CPU type of the target station. 0
type [Unsigned]/Bit to 03D3H, • 0000H: To CPU of target station (control CPU)
String [16-bit] 03E0H to • 03D0H: To control system CPU
03E3H, 03FFH • 03D1H: To standby system CPU
• 03D2H: To system A CPU
• 03D3H: To system B CPU
• 03E0H: To multiple CPU No.1
• 03E1H: To multiple CPU No.2 3
• 03E2H: To multiple CPU No.3
• 03E3H: To multiple CPU No.4
• 03FFH: To CPU of target station (control CPU)
(13) pbi_uResendCountM Maximum number of Word 0 to 15 Specify the number of resends to be performed if 5
ax resends [Unsigned]/Bit the data transfer is not completed within the
String [16-bit] monitoring time specified by "Arrival monitoring
time".
• 0 to 15
(14) pbi_uTimeUnit Arrival monitoring Word 0, 1 Specify the unit of the "Arrival monitoring time".*1 0
time unit [Unsigned]/Bit • 0: 1s
String [16-bit] • 1: 100ms
(15) pbi_uMonitorTime Arrival monitoring Word 0 to 65535 Specify the monitoring time until completion of 0: 10s
time [Unsigned]/Bit processing. If the processing is not completed
String [16-bit] within the monitoring time, data is resent until the
value specified in "Maximum number of resends"
is reached.
When "Arrival monitoring time unit" is set to 1s
• Effective range 1 to 32767: 1s to 32767s
When "Arrival monitoring time unit" is set to 100ms
• Effective range 1 to 65535: 1 to 65535  100ms
(16) pbi_bStationSpecific Target station Bit On or off Specify the specification method of a target station. Off
address specification • Off: Use the network number and station
method number.
• On: Use the IP address (IPv4). (Ethernet and
CC-Link IE TSN only).

*1 Set the lower 2 bits (bit 0 and 1) of the set value to bit 8 and 9 of the control data (error completion type) of the READ instruction.
For the dedicated instruction, the error (D24AH) occurs if the lower 2 bits exceed the effective range.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.1 M+model_DeviceRead 81
■Public variables
No. Variable name Name Data type Description Default
value
(17) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit] If an error was detected, the number of resends performed (result)
between error detection and resend stop is stored.
(18) pbo_u4ErrTime Error occurrence Word [Unsigned]/Bit Clock data at the time of error occurrence is stored. 0
time String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(19) pbo_uErrStationAddr Error-detected Word [Unsigned]/Bit ■When "Target station address specification method" is off 0
ess1 station address 1 String [16-bit] The network number of the station in which an error was detected
is stored.
■When "Target station address specification method" is on
The IP addresses (the third and fourth octets) of the station in
which an error was detected are stored. (Ethernet and CC-Link IE
TSN only)
Example: When the IP address is 192.168.1.2
0102h
(20) pbo_uErrStationAddr Error-detected Word [Unsigned]/Bit ■When "Target station address specification method" is off 0
ess2 station address 2 String [16-bit] The station number of the station in which an error was detected is
stored.
• Ethernet or CC-Link IE Controller Network
0001H to 0078H (1 to 120)
• CC-Link IE Field Network
007DH (125): Master station
0001H to 0078H (1 to 120): Local station, remote device station,
intelligent device station, submaster station
• CC-Link IE TSN
007DH: Master station
0001H to 0078H (1 to 120): Slave station
■When "Target station address specification method" is on
The IP addresses (the first and second octets) of the station in
which an error was detected are stored. (Ethernet and CC-Link IE
TSN only)
Example: When the IP address is 192.168.1.2
C0A8h

FB details
Item Description
Available device Target module • RJ71GN11-T2
• RJ71GN11-SX
• RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 82 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution command) is turned on, this function reads device data from another station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


82 3.1 M+model_DeviceRead
Item Description
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

3
o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.READ instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 83 Error codes appears, the initial label value files by
each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.1 M+model_DeviceRead 83
3.2 M+model_DeviceWrite

Name
■RJ71GN11-T2
M+RJ71GN11_DeviceWrite

■RJ71GN11-SX
M+RJ71GN11_SX_DeviceWrite

■RJ71GN11-EIP
M+RJ71GN11_SE_DeviceWrite

Overview
Item Description
Overview Writes data by specifying a device in the programmable controller of another station.
Symbol
M+RJ71GN11_DeviceWrite
(1) B: i_bEN o_bENO: B (8)
(2) DUT: i_stModule o_bOK: B (9)
(3) UW: i_u2TargetAddress o_bErr: B (10)
(4) UW: i_uDataLength o_uErrId: UW (11)
(5) UW: i_uWriteData
(6) S: i_s32TargetDevice
(7) UW: i_uChannel

pbi_uCPU_Type (12)
pbi_bArrivalConfirm (13)
pbi_uResendCountMax (14)
pbi_uTimeUnit (15)
pbi_uMonitorTime (16)
pbi_bStationSpecific (17)
pbi_uTargetStation (18)
pbo_uResendCount (19)
pbo_u4ErrTime (20)
pbo_uErrStationAddress1 (21)
pbo_uErrStationAddress2 (22)

The above FB is an example for the RJ71GN11-T2.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


84 3.2 M+model_DeviceWrite
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: GN11_1, GN11_SX_1, GN11_SE_1)
(3) i_u2TargetAddress Target station Word  Specify the network number and station number of the target station when 3
address [Unsigned]/ "Target station address specification method" is off. When specifying the
Bit String address using a label, use an array as the data type.
[16-bit] ■When "Target station specification method" is set to 0 to specify a station
(0..1) number
• 1st word: Network number (1 to 239)
• 2nd word: Station number
Station number of Ethernet or CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 126: Master operating station
• 1 to 120: Local station, remote device station, intelligent device station,
submaster station
CC-Link IE TSN
• 125: Master station
• 1 to 120: Local station
■When "Target station specification method" is set to 1 to specify a group
(CC-Link IE Field Network is not supported.)
• 1st word: Network number (1 to 239)
• 2nd word: Transient transmission group number (1 to 32)
■When "Target station specification method" is set to 2 to specify all
stations
• 1st word: Network number (1 to 239)
• 2nd word: 0 (The setting is ignored.)
Specify the IP address of the target station when "Target station address
specification method" is on. Specify the third and fourth octets to the 1st
word, and first and second octets to the 2nd word. When specifying the
address using a label, use an array as the data type.
• Ethernet, CC-Link IE TSN
00000001H to FFFFFFFEH
Specify a value within the range of 1 to 254 (FEH) for the fourth octet.

b15 b8 b7 b0
+0 3 4
+1 1 2

1 to 4: IP address octet
(4) i_uDataLength Write data length Word  Specify the number of words to be written.
[Unsigned]/ ■When writing data to the RCPU, QCPU, or LCPU
Bit String • For channel 1 to channel 8: 1 to 960 words
[16-bit] • For channel 9 and channel 10: 1 to 8192 words
■When writing data to the QnACPU
• 1 to 480 words
(5) i_uWriteData Write data storage Word  Specify the start device of own station containing the write data.
device [Unsigned]/
Bit String
[16-bit]
(6) i_s32TargetDevice Target station write Character  Specify the start device of the target station to which data is to be written.
device string (32)
(7) i_uChannel Own station channel Word  Specify the channel to be used by the own station.
[Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
Bit String
[16-bit]

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.2 M+model_DeviceWrite 85
■Output arguments
No. Variable name Name Data type Description Default
value
(8) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(9) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(10) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(11) o_uErrId Error code Word [Unsigned]/ An error code is stored at error completion. 0
Bit String [16-bit]

■Operation parameters
No. Variable name Name Data type Range Description Default
value
(12) pbi_uCPU_Type Target station CPU Word 0000H, Specify the CPU type of the target station. 0
type [Unsigned]/ 03D0H to • 0000H: To CPU of target station (control CPU)
Bit String 03D3H, • 03D0H: To control system CPU
[16-bit] 03E0H to • 03D1H: To standby system CPU
03E3H, • 03D2H: To system A CPU
03FFH • 03D3H: To system B CPU
• 03E0H: To multiple CPU No.1
• 03E1H: To multiple CPU No.2
• 03E2H: To multiple CPU No.3
• 03E3H: To multiple CPU No.4
• 03FFH: To CPU of target station (control CPU)
(13) pbi_bArrivalConfirm Arrival Bit On or off Specify whether to use arrival acknowledgment. Off
acknowledgment ■Off: No check
• When the target station is within the own network,
sending data from the own station completes the
sending.

(1)
Es Ts

(1) Completion
Es: Execution source
Ts: Target station
• When the target station is within another network, data
arrival to the relay station within the own network
completes the sending.

(1)
Es Rs Ts

(1) Completion
Es: Execution source
Rs: Relay station
Ts: Target station
■On: Check
Sending data is completed when the data is written to the
target station.

(1)
Ts Es Rs Ts
(1)

(1) Completion
Es: Execution source
Rs: Relay station
Ts: Target station
(14) pbi_uResendCountM Maximum number of Word 0 to 15 Specify the number of resends to be performed if the data 5
ax resends [Unsigned]/ transfer is not completed within the monitoring time
Bit String specified by "Arrival monitoring time".
[16-bit] • 0 to 15
(15) pbi_uTimeUnit Arrival monitoring Word 0, 1 Specify the unit of the "Arrival monitoring time".*1 0
time unit [Unsigned]/ • 0: 1s
Bit String • 1: 100ms
[16-bit]

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


86 3.2 M+model_DeviceWrite
No. Variable name Name Data type Range Description Default
value
(16) pbi_uMonitorTime Arrival monitoring Word 0 to 65535 Specify the monitoring time until completion of processing. 0: 10s
time [Unsigned]/ If the processing is not completed within the monitoring
Bit String time, data is resent until the value specified in "Maximum
[16-bit] number of resends" is reached.
When the "Arrival monitoring time unit" is set to 0
• 0: 10s
• Effective range 1 to 32767: 1s to 32767s
When the "Arrival monitoring time unit" is set to 1
• 0: 10s
• Effective range 1 to 65535: 1 to 65535  100ms 3
(17) pbi_bStationSpecific Target station Bit On or off Specify the specification method of a target station. Off
address specification • Off: Use the network number and station number.
method • On: Use the IP address (IPv4). (Ethernet and CC-Link IE
TSN only).
(18) pbi_uTargetStation Target station Word 0 to 2 Specify the specification method of a target station. 0
specification method [Unsigned]/ • 0: Station number specification  Station with the station
Bit String number specified in "Target station address"
[16-bit] • 1: Group specification (only when "OFF (No)" is specified
in "Arrival acknowledgment")  All stations of the
transient transmission group number specified in "Arrival
station address" (For the CC-Link IE Field Network, the
value 1 cannot be specified.)
• 2: All stations (only when "OFF (No)" is specified in
"Arrival acknowledgment")  All stations of the network
number specified in "Arrival station address" (broadcast
excluding own station)

*1 Set the lower 2 bits (bit 0 and 1) of the set value to bit 8 and 9 of the control data (execution/error completion type) of the WRITE
instruction.
For the dedicated instruction, the error (D24AH) occurs if the lower 2 bits exceed the effective range.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.2 M+model_DeviceWrite 87
■Public variables
No. Variable name Name Data type Description Default
value
(19) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit] If an error was detected, the number of resends performed
(result) between error detection and resend stop is stored.
(20) pbo_u4ErrTime Error occurrence time Word [Unsigned]/Bit Clock data at the time of error occurrence is stored. 0
String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H
(Saturday))
(21) pbo_uErrStationAddress Error-detected station Word [Unsigned]/Bit ■When "Target station address specification method" is off 0
1 address 1 String [16-bit] The network number of the station in which an error was
detected is stored.
■When "Target station address specification method" is on
The IP addresses (the third and fourth octets) of the station
in which an error was detected are stored. (Ethernet and
CC-Link IE TSN only)
Example: When the IP address is 192.168.1.2
0102h
(22) pbo_uErrStationAddress Error-detected station Word [Unsigned]/Bit ■When "Target station address specification method" is off 0
2 address 2 String [16-bit] The station number of the station in which an error was
detected is stored.
• Ethernet or CC-Link IE Controller Network
0001H to 0078H (1 to 120)
• CC-Link IE Field Network
007DH (125): Master station
0001H to 0078H (1 to 120): Local station, remote device
station, intelligent device station, submaster station
• CC-Link IE TSN
007DH: Master station
0001H to 0078H (1 to 120): Slave station
■When "Target station address specification method" is on
The IP addresses (the first and second octets) of the
station in which an error was detected are stored. (Ethernet
and CC-Link IE TSN only)
Example: When the IP address is 192.168.1.2
C0A8h

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


88 3.2 M+model_DeviceWrite
FB details
Item Description
Available device Target module • RJ71GN11-T2
• RJ71GN11-SX
• RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 102 steps 3
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function writes device data to another station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.WRITE instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 90 Error codes appears, the initial label value files by
each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.2 M+model_DeviceWrite 89
Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


90 3.2 M+model_DeviceWrite
3.3 M+model_Send

Name
■RJ71GN11-T2
M+RJ71GN11_Send

■RJ71GN11-SX
M+RJ71GN11_SX_Send 3
■RJ71GN11-EIP
M+RJ71GN11_SE_Send

Overview
Item Description
Overview Sends data to the programmable controller of another station.
Symbol
M+RJ71GN11_Send
(1) B: i_bEN o_bENO: B (8)
(2) DUT: i_stModule o_bOK: B (9)
(3) UW: i_u2TargetAddress o_bErr: B (10)
(4) UW: i_uChannel o_uErrId: UW (11)
(5) UW: i_uTargetChannel
(6) UW: i_uDataLength
(7) UW: i_uSendData

pbi_bArrivalConfirm (12)
pbi_uResendCountMax (13)
pbi_uMonitorTime (14)
pbi_bStationSpecific (15)
pbi_uTargetStation (16)
pbo_uResendCount (17)
pbo_u4ErrTime (18)
pbo_uErrStationAddress1 (19)
pbo_uErrStationAddress2 (20)

The above FB is an example for the RJ71GN11-T2.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.3 M+model_Send 91
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: GN11_1, GN11_SX_1, GN11_SE_1)
(3) i_u2TargetAddress Target station Word  Specify the network number and station number of the target station
address [Unsigned]/ when "Target station address specification method" is off. When
Bit String specifying the address using a label, use an array as the data type.
[16-bit] (0..1) ■When "Target station specification method" is set to 0 to specify a
station number
• 1st word: Network number (1 to 239)
• 2nd word: Station number
Station number of Ethernet or CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 126: Master operating station
• 1 to 120: Local station, remote device station, intelligent device station,
submaster station
CC-Link IE TSN
• 125: Master station
• 1 to 120: Local station
■When "Target station specification method" is set to 1 to specify a
group
(CC-Link IE Field Network is not supported.)
• 1st word: Network number (1 to 239)
• 2nd word: Transient transmission group number (1 to 32)
■When "Target station specification method" is set to 2 to specify all
stations
• 1st word: Network number (1 to 239)
• 2nd word: 0 (The setting is ignored.)
Specify the IP address of the target station when "Target station address
specification method" is on. Specify the third and fourth octets to the 1st
word, and first and second octets to the 2nd word. When specifying the
address using a label, use an array as the data type.
• CC-Link IE TSN
00000001H to FFFFFFFEH
Specify a value within the range of 1 to 254 (FEH) for the fourth octet.

b15 b8 b7 b0
+0 3 4
+1 1 2

1 to 4: IP address octet
(4) i_uChannel Own station channel Word  Specify the channel number to be used for data transmission by own
[Unsigned]/ station.
Bit String  MELSEC iQ-R Programming Manual (Module Dedicated
[16-bit] Instructions)
(5) i_uTargetChannel Target station data Word 1 to 8 Specify the channel of the target station for storing data.
storage channel [Unsigned]/ When the target station is a CC-Link IE Field Network master/local
Bit String module, specify 1 or 2.
[16-bit]
(6) i_uDataLength Send data length Word  Specify the number of words to be sent.
[Unsigned]/ • When the target station is RCPU, QCPU, or LCPU: 1 to 960 words
Bit String • When the target station is QnACPU: 1 to 480 words
[16-bit]
(7) i_uSendData Send data storage Word  Specify the start device of own station containing the send data.
device [Unsigned]/
Bit String
[16-bit]

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


92 3.3 M+model_Send
■Output arguments
No. Variable name Name Data type Description Default
value
(8) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(9) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(10) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(11) o_uErrId Error code Word [Unsigned]/Bit An error code is stored at error completion. 0
String [16-bit]
3
■Operation parameters
No. Variable name Name Data type Range Description Default
value
(12) pbi_bArrivalConfirm Arrival Bit On or off Specify whether to use arrival acknowledgment. Off
acknowledgment ■Off: No check
• When the target station is within the own network,
sending data from the own station completes the
sending.

(1)
Es Ts

(1) Completion
Es: Execution source
Ts: Target station
• When the target station is within another network, data
arrival to the relay station within the own network
completes the sending.

(1)
Es Rs Ts

(1) Completion
Es: Execution source
Rs: Relay station
Ts: Target station
■On: Check
Sending data is completed when the data is written to the
target station.

(1)
Ts Es Rs Ts
(1)

(1) Completion
Es: Execution source
Rs: Relay station
Ts: Target station
(13) pbi_uResendCountM Maximum number of Word 0 to 15 Specify the number of resends to be performed if the data 5
ax resends [Unsigned]/ transfer is not completed within the monitoring time
Bit String [16- specified by "Arrival monitoring time".
bit] • 0 to 15
(14) pbi_uMonitorTime Arrival monitoring Word 0, 1 to Specify the monitoring time until completion of processing. 0
time [Unsigned]/ 32767 If the processing is not completed within the monitoring
Bit String [16- time, data is resent until the value specified in "Maximum
bit] number of resends" is reached.
• 0: 10s
• Effective range 1 to 32767: 1s to 32767s
(15) pbi_bStationSpecific Target station Bit On or off Specify the specification method of a target station. Off
address specification • Off: Use the network number and station number.
method • On: Use the IP address (IPv4). (CC-Link IE TSN only).

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.3 M+model_Send 93
No. Variable name Name Data type Range Description Default
value
(16) pbi_uTargetStation Target station Word 0 to 2 Specify the specification method of a target station. 0
specification method [Unsigned]/ • 0: Station number specification  Station with the station
Bit String [16- number specified in "Target station address"
bit] • 1: Group specification  All stations of the transient
transmission group number specified in "Target station
address" (For the CC-Link IE Field Network, the value 1
cannot be specified.)
• 2: All stations  All stations of the network number
specified in "Target station address" (simultaneous
broadcast except own station)

■Public variables
No. Variable name Name Data type Description Default
value
(17) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit] If an error was detected, the number of resends performed
(result) between error detection and resend stop is stored.
(18) pbo_u4ErrTime Error occurrence Word [Unsigned]/Bit Clock data at the time of error occurrence is stored. 0
time String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(19) pbo_uErrStationAddr Error-detected Word [Unsigned]/Bit ■When "Target station address specification method" is off 0
ess1 station address 1 String [16-bit] The network number of the station in which an error was detected
is stored.
■When "Target station address specification method" is on
The IP addresses (the third and fourth octets) of the station in
which an error was detected are stored. (CC-Link IE TSN only)
Example: When the IP address is 192.168.1.2
0102h
(20) pbo_uErrStationAddr Error-detected Word [Unsigned]/Bit ■When "Target station address specification method" is off 0
ess2 station address 2 String [16-bit] The station number of the station in which an error was detected
is stored.
• Ethernet or CC-Link IE Controller Network
0001H to 0078H (1 to 120)
• CC-Link IE Field Network
007DH (125): Master station
0001H to 0078H (1 to 120): Local station, remote device station,
intelligent device station, submaster station
• CC-Link IE TSN
007DH: Master station
0001H to 0078H (1 to 120): Slave station
■When "Target station address specification method" is on
The IP addresses (the first and second octets) of the station in
which an error was detected are stored. (CC-Link IE TSN only)
Example: When the IP address is 192.168.1.2
C0A8h

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


94 3.3 M+model_Send
FB details
Item Description
Available device Target module • RJ71GN11-T2
• RJ71GN11-SX
• RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 93 steps 3
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function sends a message to another station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.SEND instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 96 Error codes appears, the initial label value files by
each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.3 M+model_Send 95
Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


96 3.3 M+model_Send
3.4 M+model_Recv

Name
■RJ71GN11-T2
M+RJ71GN11_Recv

■RJ71GN11-SX
M+RJ71GN11_SX_Recv 3
■RJ71GN11-EIP
M+RJ71GN11_SE_Recv

Overview
Item Description
Overview Reads the data received from the programmable controller of another station.
Symbol
M+RJ71GN11_Recv
(1) B: i_bEN o_bENO: B (4)
(2) DUT: i_stModule o_bOK: B (5)
(3) UW: i_uRecvChannel o_bErr: B (6)
o_uErrId: UW (7)
o_uRecvDataLength: UW (8)
o_uRecvData: UW (9)

pbi_bReadTiming (10)
pbi_uMonitorTime (11)
pbi_bStationSpecific (12)
pbo_uResendCount (13)
pbo_u4ErrTime (14)
pbo_uErrStationAddress1 (15)
pbo_uErrStationAddress2 (16)
pbo_uSendStationAddress1 (17)
pbo_uSendStationAddress2 (18)
pbo_uSendChannel (19)

The above FB is an example for the RJ71GN11-T2.

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: GN11_1, GN11_SE_1)
(3) i_uRecvChannel Receive data storage Word  Specify the channel containing the data to be read.
channel [Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated
Bit String [16- Instructions)
bit]

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.4 M+model_Recv 97
■Output arguments
No. Variable name Name Data type Description Default
value
(4) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(5) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(6) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(7) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/Bit
String [16-bit]
(8) o_uRecvDataLength Receive data length Word The number of received data is stored. 0
[Unsigned]/Bit 1 to 960 words
String [16-bit]
(9) o_uRecvData Receive data storage Word Specify the start number of the device for storing received data. 0
device [Unsigned]/Bit
String [16-bit]

■Operation parameters
No. Variable name Name Data type Range Description Default
value
(10) pbi_bReadTiming Read timing Bit On Specify the timing of executing data read processing. On
• On: Start reading in the first END processing after the
module FB starts.
(11) pbi_uMonitorTime Arrival monitoring Word 0, 1 to Specify the monitoring time until completion of processing 0
time [Unsigned]/ 32767 (the setting is valid only when "Read timing" is on). When
Bit String the processing is not completed normally within the
[16-bit] monitoring time, the processing is completed with an error.
• 0: 10s
• Effective range 1 to 32767: 1s to 32767s
(12) pbi_bStationSpecific Sending station Bit On or off Specify the sending station address display method Off
address display • Off: Use the network number and station number.
method • On: Use the IP address (IPv4). (CC-Link IE TSN only).

■Public variables
No. Variable name Name Data type Description Default
value
(13) pbo_uResendCount Number of resends Word 0 is stored in this area. 0
[Unsigned]/
Bit String
[16-bit]
(14) pbo_u4ErrTime Error occurrence Word Clock data at the time of error occurrence is stored. 0
time [Unsigned]/ 1st word
Bit String • Upper 8 bits: Month (01H to 12H)
[16-bit] (0..3) • Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(15) pbo_uErrStationAddr Error-detected Word ■When "Sending station address display method" is off 0
ess1 station address 1 [Unsigned]/ The network number of the station in which an error was detected is
Bit String stored.
[16-bit] ■When "Sending station address display method" is on
The IP addresses (the third and fourth octets) of the station in which an
error was detected are stored. (CC-Link IE TSN only)
Example: When the IP address is 192.168.1.2
0102h

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


98 3.4 M+model_Recv
No. Variable name Name Data type Description Default
value
(16) pbo_uErrStationAddr Error-detected Word ■When "Sending station address display method" is off 0
ess2 station address 2 [Unsigned]/ The station number of the station in which an error was detected is stored.
Bit String • Ethernet or CC-Link IE Controller Network
[16-bit] 0001H to 0078H (1 to 120)
• CC-Link IE Field Network
007DH (125): Master station
0001H to 0078H (1 to 120): Local station, remote device station, intelligent
device station, submaster station
• CC-Link IE TSN
007DH: Master station 3
0001H to 0078H (1 to 120): Slave station
■When "Sending station address display method" is on
The IP addresses (the first and second octets) of the station in which an
error was detected are stored. (CC-Link IE TSN only)
Example: When the IP address is 192.168.1.2
C0A8h
(17) pbo_uSendStationAd Sending station Word ■When "Sending station address display method" is off 0
dress1 address 1 [Unsigned]/ The network number and station number of the sending station are stored.
Bit String ■When "Sending station address display method" is on
[16-bit] The IP addresses (the third and fourth octets) of the sending station are
stored. (CC-Link IE TSN only)
Example: When the IP address is 192.168.1.2
0102h
(18) pbo_uSendStationAd Sending station Word ■When "Sending station address display method" is off 0
dress2 address 2 [Unsigned]/ The station number of the sending station is stored.
Bit String • Ethernet or CC-Link IE Controller Network
[16-bit] 0001H to 0078H (1 to 120)
• CC-Link IE Field Network
007DH (125): Master station
0001H to 0078H (1 to 120): Local station, remote device station, intelligent
device station, submaster station
• CC-Link IE TSN
007DH: Master station
0001H to 0078H (1 to 120): Slave station
■When "Sending station address display method" is on
The IP addresses (the first and second octets) of the sending station are
stored. (CC-Link IE TSN only)
Example: When the IP address is 192.168.1.2
C0A8h
(19) pbo_uSendChannel Channel used by Word The channel number used by the send station is stored. 0
sending station [Unsigned]/ 1 to 8
Bit String
[16-bit]

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.4 M+model_Recv 99
FB details
Item Description
Available device Target module • RJ71GN11-T2
• RJ71GN11-SX
• RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 76 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function receives a message from another station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.RECV instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 101 Error codes appears, the initial label value files
by each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


100 3.4 M+model_Recv
Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.4 M+model_Recv 101
3.5 M+model_RemoteStopRun

Name
■RJ71GN11-T2
M+RJ71GN11_RemoteStopRun

■RJ71GN11-SX
M+RJ71GN11_SX_RemoteStopRun

■RJ71GN11-EIP
M+RJ71GN11_SE_RemoteStopRun

Overview
Item Description
Overview Sends a remote STOP/RUN request to the programmable controller of another station.
Symbol
M+RJ71GN11_RemoteStopRun
(1) B: i_bEN o_bENO: B (6)
(2) DUT: i_stModule o_bOK: B (7)
(3) UW: i_u2TargetAddress o_bErr: B (8)
(4) UW: i_uChannel o_uErrId: UW (9)
(5) UW: i_uRemoteType

pbi_uCPU_Type (10)
pbi_uResendCountMax (11)
pbi_uMonitorTime (12)
pbi_bStationSpecific (13)
pbi_uTargetStation (14)
pbi_uForciblyRun (15)
pbi_uDeviceClear (16)
pbo_uResendCount (17)
pbo_u4ErrTime (18)
pbo_uErrStationAddress1 (19)
pbo_uErrStationAddress2 (20)

The above FB is an example for the RJ71GN11-T2.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


102 3.5 M+model_RemoteStopRun
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: GN11_1, GN11_SX_1, GN11_SE_1)
(3) i_u2TargetAddress Target station Word  Specify the network number and station number of the target station 3
address [Unsigned]/ when "Target station address specification method" is off. When
Bit String [16- specifying the address using a label, use an array as the data type.
bit] (0..1) ■When "Target station specification method" is set to 0 to specify a
station number
• 1st word: Network number (1 to 239)
• 2nd word: Station number
Station number of Ethernet or CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 126: Master operating station
• 1 to 120: Local station, remote device station, intelligent device station,
submaster station
CC-Link IE TSN
• 125: Master station
• 1 to 120: Local station
■When "Target station specification method" is set to 1 to specify a
group
(CC-Link IE Field Network is not supported.)
• 1st word: Network number (1 to 239)
• 2nd word: Transient transmission group number (1 to 32)
■When "Target station specification method" is set to 2 to specify all
stations
• 1st word: Network number (1 to 239)
• 2nd word: 0 (The setting is ignored.)
Specify the IP address of the target station when "Target station address
specification method" is on. Specify the third and fourth octets to the 1st
word, and first and second octets to the 2nd word. When specifying the
address using a label, use an array as the data type.
• CC-Link IE TSN
00000001H to FFFFFFFEH
Specify a value within the range of 1 to 254 (FEH) for the fourth octet.

b15 b8 b7 b0
+0 3 4
+1 1 2

1 to 4: IP address octet
(4) i_uChannel Own station channel Word  Specify the channel to be used by the own station.
[Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated
Bit String [16- Instructions)
bit]
(5) i_uRemoteType Remote operation Word 1, 2 Specify remote RUN or STOP.
[Unsigned]/ • 1: Remote RUN
Bit String [16- • 2: Remote STOP
bit]

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.5 M+model_RemoteStopRun 103
■Output arguments
No. Variable name Name Data type Description Default
value
(6) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(7) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(8) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(9) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/Bit
String [16-bit]

■Operation parameters
No. Variable name Name Data type Range Description Default
value
(10) pbi_uCPU_Type Target station CPU Word 0000H, 03D0H Specify the CPU type of the target station. 0
type [Unsigned]/Bit to 03D3H, • 0000H: To CPU of target station (control CPU)
String [16-bit] 03E0H to • 03D0H: To control system CPU
03E3H, 03FFH • 03D1H: To standby system CPU
• 03D2H: To system A CPU
• 03D3H: To system B CPU
• 03E0H: To multiple CPU No.1
• 03E1H: To multiple CPU No.2
• 03E2H: To multiple CPU No.3
• 03E3H: To multiple CPU No.4
• 03FFH: To CPU of target station (control CPU)
(11) pbi_uResendCountM Maximum number of Word 0 to 15 Specify the number of resends to be performed if 5
ax resends [Unsigned]/Bit the data transfer is not completed within the
String [16-bit] monitoring time specified by "Arrival monitoring
time".
(12) pbi_uMonitorTime Arrival monitoring Word 0, 1 to 32767 Specify the monitoring time until completion of 0
time [Unsigned]/Bit processing. If the processing is not completed
String [16-bit] within the monitoring time, data is resent until the
value specified in "Maximum number of resends" is
reached.
• 0: 10s
• Effective range 1 to 32767: 1s to 32767s
(13) pbi_bStationSpecific Target station Bit On or off Specify the specification method of a target station. Off
address specification • Off: Use the network number and station number.
method • On: Use the IP address (IPv4). (CC-Link IE TSN
only).
(14) pbi_uTargetStation Target station Word 0 to 2 Specify the specification method of a target station. 0
specification method [Unsigned]/Bit • 0: Station number specification  Station with the
String [16-bit] station number specified in "Target station
address"
• 1: Group specification  All stations of the
transient transmission group number specified in
"Target station address" (For the CC-Link IE Field
Network, the value 1 cannot be specified.)
• 2: All stations  All stations of the network
number specified in "Target station address"
(simultaneous broadcast except own station)
(15) pbi_uForciblyRun Specification of Word 1, 2 ■"Remote operation": 1 (remote RUN) 1
forced remote RUN [Unsigned]/Bit Specify whether to forcibly execute remote RUN.
String [16-bit] The forcible execution function enables forcible
execution of remote RUN from another station
when a station which executed remote STOP can
no longer execute remote RUN.
• 1: Not forcibly executed
• 2: Forcibly executed
■"Remote operation": 2 (remote STOP)
Any setting here is ignored and the following setting
is always used.
• 2: Forcibly executed

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


104 3.5 M+model_RemoteStopRun
No. Variable name Name Data type Range Description Default
value
(16) pbi_uDeviceClear Specification of Word 0 to 2 ■"Remote operation": 1 (remote RUN) 0
device clear at [Unsigned]/Bit Specify how to handle the CPU module device
remote RUN String [16-bit] memory after remote RUN is executed.
• 0: Do not clear.
• 1: Clear (except the latch range).
• 2: Clear (including the latch range).
■"Remote operation": 2 (remote STOP)
Any setting here is ignored.

■Public variables 3
No. Variable name Name Data type Description Default
value
(17) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit] If an error was detected, the number of resends performed
(result) between error detection and resend stop is stored.
(18) pbo_u4ErrTime Error occurrence Word [Unsigned]/Bit Clock data at the time of error occurrence is stored. 0
time String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(19) pbo_uErrStationAddress Error-detected Word [Unsigned]/Bit ■When "Target station address specification method" is off 0
1 station address 1 String [16-bit] The network number of the station in which an error was
detected is stored.
■When "Target station address specification method" is on
The IP addresses (the third and fourth octets) of the station in
which an error was detected are stored. (Ethernet and CC-Link
IE TSN only)
Example: When the IP address is 192.168.1.2
0102h
(20) pbo_uErrStationAddress Error-detected Word [Unsigned]/Bit ■When "Target station address specification method" is off 0
2 station address 2 String [16-bit] The station number of the station in which an error was
detected is stored.
• Ethernet or CC-Link IE Controller Network
0001H to 0078H (1 to 120)
• CC-Link IE Field Network
007DH (125): Master station
0001H to 0078H (1 to 120): Local station, remote device
station, intelligent device station, submaster station
• CC-Link IE TSN
007DH: Master station
0001H to 0078H (1 to 120): Slave station
■When "Target station address specification method" is on
The IP addresses (the first and second octets) of the station in
which an error was detected are stored. (Ethernet and CC-Link
IE TSN only)
Example: When the IP address is 192.168.1.2
C0A8h

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.5 M+model_RemoteStopRun 105
FB details
Item Description
Available device Target module • RJ71GN11-T2
• RJ71GN11-SX
• RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 204 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function performs remote STOP/RUN for other stations.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.REQ instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 107 Error codes appears, the initial label value files
by each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


106 3.5 M+model_RemoteStopRun
Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.5 M+model_RemoteStopRun 107
3.6 M+model_SLMP_DeviceRead_IP

Name
■RJ71GN11-T2
M+RJ71GN11_SLMP_DeviceRead_IP

■RJ71GN11-SX
M+RJ71GN11_SX_SLMP_DeviceRead_IP

■RJ71GN11-EIP
M+RJ71GN11_SE_SLMP_DeviceRead_IP

Overview
Item Description
Overview Reads data from the SLMP-compatible device by specifying IP address.
Symbol
M+RJ71GN11_SLMP_DeviceRead_IP
(1) B: i_bEN o_bENO: B (10)
(2) DUT: i_stModule o_bOK: B (11)
(3) UW: i_u2IP_Address o_bErr: B (12)
(4) UW: i_uSubCommand o_uErrId: UW (13)
(5) UW: i_uDeviceCode o_uReadData: UW (14)
(6) UW: i_u2DeviceNo
(7) UW: i_uDevicePoints
(8) UW: i_uChannel
(9) UW: i_uTarget_Port_No

pbi_uRequestModuleIO (15)
pbi_uResendCountMax (16)
pbi_uMonitorTime (17)
pbo_uResendCount (18)
pbo_u4ErrTime (19)
pbo_uErrIP_Address_3rd_4th (20)
pbo_uErrIP_Address_1st_2nd (21)

The above FB is an example for the RJ71GN11-T2.

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be
executed.
Specify the module label of the modules.
(Example: GN11_1, GN11_SX_1, GN11_SE_1)
(3) i_u2IP_Address IP address of external Word [Unsigned]/Bit 00000001H to Specify the IP address of an external device. Specify
device String [16-bit] (0..1) DFFFFFFEH the third and fourth octets to the 1st word, and first
and second octets to the 2nd word. Specify a value
within the range of 1 to 254 (FEH) for the fourth octet.

b15 b8 b7 b0

+0 3: 1~255 4: 1~254
+1 1: 1~223 2: 1~255

1 to 4: IP address octet

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


108 3.6 M+model_SLMP_DeviceRead_IP
No. Variable name Name Data type Range Description
(4) i_uSubCommand Sub command Word [Unsigned]/Bit  Specify the read unit and specification method of a
String [16-bit] device.
• 0th bit: Specify whether the device is read in units
of words or in units of bits.
0: In units of words
1: In units of bits
• 1st bit: Specify the combination of the number of
digits of the device code and start device number of
the device to be read.
0: Specify the device code in 2 digits and the start
device number in 6 digits (for MELSEC-Q/L series).
1: Specify the device code in 4 digits and the start
3
device number in 8 digits (for MELSEC iQ-R series).
(5) i_uDeviceCode Device code Word [Unsigned]/Bit  Specify the device code of the device to be read in
String [16-bit] binary code.
• When the 1st bit of the subcommand is 0: 2 digits
• When the 1st bit of the subcommand is 1: 4 digits
(6) i_u2DeviceNo Head device No. Word [Unsigned]/Bit  Specify the start device number of the device to be
String [16-bit] (0..1) read in binary code.
• When the 1st bit of the subcommand is 0: 6 digits
• When the 1st bit of the subcommand is 1: 8 digits
(7) i_uDevicePoints Number of device Word [Unsigned]/Bit  Specify the number of device points of the device to
points String [16-bit] be read in binary code.
• When the 0th bit of the subcommand is 0: 1 to 960
• When the 0th bit of the subcommand is 1: 1 to
3972

(8) i_uChannel Own station channel Word [Unsigned]/Bit 1 to 17 Specify the channel to be used by the own station.*1
String [16-bit]  MELSEC iQ-R Programming Manual (Module
Dedicated Instructions)
(9) i_uTarget_Port_No Destination port Word [Unsigned]/Bit 1 to 65534 Specify the UDP port number of an external device.
number String [16-bit] For the port number to specify, check the manual for
the external device.

*1 Set 1 when not adding a serial No. Set 2 to 9 when adding a serial No. Set 10 to 17 when communicating using the station number
extension frame.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.6 M+model_SLMP_DeviceRead_IP 109
■Output arguments
No. Variable name Name Data type Description Default
value
(10) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(11) o_bOK Normal completion Bit The FB has been processed normally when this argument is Off
on.
(12) o_bErr Error completion Bit The FB has been processed abnormally when this argument Off
is on.
(13) o_uErrId Error code Word [Unsigned]/Bit An error code is stored at error completion. 0
String [16-bit]
(14) o_uReadData Read data storage Word [Unsigned]/Bit Specify the start device number of the device for storing the 0
destination String [16-bit] read data.
• When the 0th bit of the subcommand is 0, the device data
is read in units of words.
Example: When reading the bit device M100 to M115 (one
word) in units of words
1st word:
b15 b8 b7 b0
1 2 3 4

0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
M115 ... M100

Example: When reading the word device D0 to D2 in units of


words
1st word:

b15 b8 b7 b0
1 2 3 4

D0

2nd word:

b15 b8 b7 b0
0 0 0 2

D1

3rd word:

b15 b8 b7 b0
1 D E F

D2

• When the 0th bit of the subcommand is 1, read the device


data in units of bits.
Example: When reading the bit device M100 to M107 in units
of bits
1st word:

b15 b8 b7 b0
0 1 0 0
M102 M103 M100 M101

2nd word:

b15 b8 b7 b0

1 1 0 0

M106 M107 M104 M105

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


110 3.6 M+model_SLMP_DeviceRead_IP
■Operation parameters
No. Variable name Name Data type Range Description Default
value
(15) pbi_uRequestModuleIO Requested module I/ Word 03E0H to 03E3H, 03FFH Specify the module of the access 03FFH
O No. [Unsigned]/ destination.
Bit String [16- • 03E0H: Multiple CPU No.1
bit] • 03E1H: Multiple CPU No.2
• 03E2H: Multiple CPU No.3
• 03E3H: Multiple CPU No.4
• 03FFH: Own station, control CPU
(16) pbi_uResendCountMax Maximum number of Word 0 to 15 Specify the number of resends to be 5 3
resends [Unsigned]/ performed if the data transfer is not
Bit String [16- completed within the monitoring
bit] time specified by "Arrival monitoring
time".
• 0 to 15
(17) pbi_uMonitorTime Arrival monitoring Word 0, 1 to 32767 Specify the monitoring time until 0
time [Unsigned]/ completion of processing. If the
Bit String [16- processing is not completed within
bit] the monitoring time, data is resent
until the value specified in
"Maximum number of resends" is
reached.
• 0: 10s
• Effective range 1 to 32767: 1s to
32767s

■Public variables
No. Variable name Name Data type Description Default
value
(18) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit] If an error was detected, the number of resends performed
(result) between error detection and resend stop is stored.
(19) pbo_u4ErrTime Error occurrence time Word [Unsigned]/Bit Clock data at the time of error occurrence is stored.*1 0
String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(20) pbo_uErrIP_Address_ Error-detected device Word [Unsigned]/Bit The IP addresses (the third and fourth octets) of the device in 0
3rd_4th IP addresses (the third String [16-bit] which an error was detected are stored.*1
and fourth octets) Example: When the IP address is 192.168.1.2
0102h
(21) pbo_uErrIP_Address_ Error-detected device Word [Unsigned]/Bit The IP addresses (the first and second octets) of the device in 0
1st_2nd IP addresses (the first String [16-bit] which an error was detected are stored.*1
and second octets) Example: When the IP address is 192.168.1.2
C0A8h

*1 The value is stored only when the dedicated instruction was completed with an error.
The value set to the external device IP address of the input argument is stored in the error-detected device IP addresses (the third and
fourth octets) and the error-detected device IP addresses (the first and second octets).

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.6 M+model_SLMP_DeviceRead_IP 111
FB details
Item Description
Available device Target module • RJ71GN11-T2
• RJ71GN11-SX
• RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 248 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing • When i_bEN (execution command) is turned on, this function reads device data from the SLMP-compatible device.
• This FB is executed specifying the IP address of an external device.
• This FB uses Device Read (command: 0401) of the SLMP for the Read command. The message of the SLMP command is a binary
code. ( SLMP Reference Manual)
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


112 3.6 M+model_SLMP_DeviceRead_IP
Item Description
Timing chart of I/O • For normal completion
signals
i_bEN

o_bENO

o_bOK

3
o_bErr

o_uErrId 0H

pbo_u4ErrTime 0H

pbo_uErrIP_Address_3rd_4th,
0H
pbo_uErrIP_Address_1st_2nd

• For error completion (When the dedicated instruction was completed with an error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

pbo_u4ErrTime 0H (2)

pbo_uErrIP_Address_3rd_4th,
0H (3)
pbo_uErrIP_Address_1st_2nd

(1) Error code


(2) Error occurrence time
(3) Error-detected device IP address
• For error completion (When the dedicated instruction was completed successfully but the end code indicates an error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

pbo_u4ErrTime 0H

pbo_uErrIP_Address_3rd_4th,
0H
pbo_uErrIP_Address_1st_2nd

(1) Error code

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.6 M+model_SLMP_DeviceRead_IP 113
Item Description
Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system
and required operations.
• This FB uses the GP.SLMPSND instruction. Even if the target device has sent an abnormal response, the GP.SLMPSND instruction
is completed successfully. In this FB, the instruction is determined to be completed successfully or completed with an error by the
end code of the response frame. When the instruction was determined to be completed with an error by the end code, the end code
is stored to the error code of the output argument. When the GP.SLMPSND instruction is completed successfully, the values are not
stored to the error occurrence time of the public variable, the error-detected device IP addresses (the third and fourth octets), and
the error-detected device IP addresses (the first and second octets).*1
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off
i_bEN (execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is
cleared to 0.
• In this FB, access devices (such as link direct device) that are accessed by the extension specification of the SLMP cannot be read.
• In this FB, stations in other network cannot be set as the target station.
• For the port of an external device where the remote password is set, execute this FB after performing the unlock processing of the
remote password. When this FB is executed for the port of an external device where the remote password is set, an error will occur.
• The target station must support "Device Read (command: 0401H)" of the SLMP command.
• This FB is for communications in binary code only. (Communications using ASCII code cannot be performed.)
• This FB uses UDP/IP communications.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R
CPU Module User's Manual (Application)) If an error code that is not described in Page 114 Error codes appears, the initial label
value files by each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to
the boot file setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

*1 If 0 (initial value) is stored in the error occurrence time, the error-detected device IP addresses (the third and fourth octets), and the
error-detected device IP addresses (the first and second octets), check and take actions using the manuals for the SLMP-compatible
device used.

Error codes
Error code Reference
0100H When the read unit is set to 0 (in units of words), a number other than 1 to 960 is specified.
When the read unit is set to 1 (in units of bits), a number other than 1 to 3972 is specified.
1000H to 3FFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
 MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual
4000H to 4FFFH  MELSEC iQ-R CPU Module User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
 MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


114 3.6 M+model_SLMP_DeviceRead_IP
3.7 M+model_SLMP_DeviceWrite_IP

Name
■RJ71GN11-T2
M+RJ71GN11_SLMP_DeviceWrite_IP

■RJ71GN11-SX
M+RJ71GN11_SX_SLMP_DeviceWrite_IP 3
■RJ71GN11-EIP
M+RJ71GN11_SE_SLMP_DeviceWrite_IP

Overview
Item Description
Overview Writes data to the SLMP-compatible device specified by an IP address.
Symbol
M+RJ71GN11_SLMP_DeviceWrite_IP
(1) B: i_bEN o_bENO: B (11)
(2) DUT: i_stModule o_bOK: B (12)
(3) UW: i_u2IP_Address o_bErr: B (13)
(4) UW: i_uSubCommand o_uErrId: UW (14)
(5) UW: i_uDeviceCode

(6) UW: i_u2DeviceNo


(7) UW: i_uDevicePoints
(8) UW: i_uWriteData
(9) UW: i_uChannel
(10) UW: i_uTarget_Port_No

pbi_uRequestModuleIO (15)
pbi_uResendCountMax (16)
pbi_uMonitorTime (17)
pbo_uResendCount (18)
pbo_u4ErrTime (19)
pbo_uErrIP_Address_3rd_4th (20)
pbo_uErrIP_Address_1st_2nd (21)

The above FB is an example for the RJ71GN11-T2.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.7 M+model_SLMP_DeviceWrite_IP 115
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: GN11_1, GN11_SX_1, GN11_SE_1)
(3) i_u2IP_Address IP address of external Word [Unsigned]/Bit 00000001H to Specify the IP address of the target station. Specify the
device String [16-bit] (0..1) DFFFFFFEH third and fourth octets to the 1st word, and first and
second octets to the 2nd word. Specify a value within
the range of 1 to 254 (FEH) for the fourth octet.

b15 b8 b7 b0

+0 3: 1~255 4: 1~254
+1 1: 1~223 2: 1~255

1 to 4: IP address octet
(4) i_uSubCommand Sub command Word [Unsigned]/Bit  Specify the write unit and specification method of a
String [16-bit] device.
• 0th bit: Specify whether the device is written in units
of words or in units of bits.
0: In units of words
1: In units of bits
• 1st bit: Specify the combination of the number of
digits of the device code and start device number of
the device to be written.
0: Specify the device code in 2 digits and the start
device number in 6 digits (for MELSEC-Q/L series).
1: Specify the device code in 4 digits and the start
device number in 8 digits (for MELSEC iQ-R series).
(5) i_uDeviceCode Device code Word [Unsigned]/Bit  Specify the device code of the device to be written in
String [16-bit] binary code.
• When the 1st bit of the subcommand is 0: 2 digits
• When the 1st bit of the subcommand is 1: 4 digits
(6) i_u2DeviceNo Head device No. Word [Unsigned]/Bit  Specify the start device number of the device to be
String [16-bit] (0..1) written in binary code.
• When the 1st bit of the subcommand is 0: 6 digits
• When the 1st bit of the subcommand is 1: 8 digits
(7) i_uDevicePoints Number of device Word [Unsigned]/Bit  Specify the number of device points of the device to be
points String [16-bit] written in binary code.
• When the 0th bit of the subcommand is 0
1 to 960
• When the 0th bit of the subcommand is 1
Own station channel is 1 to 9: 1 to 3972
Own station channel is 10 to 17: 1 to 3960

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


116 3.7 M+model_SLMP_DeviceWrite_IP
No. Variable name Name Data type Range Description
(8) i_uWriteData Write data storage Word [Unsigned]/Bit  Specify the start device number of the device for storing
destination String [16-bit] the write data.
• When the 0th bit of the subcommand is 0, the device
data is written in units of words.
Example: When writing the bit device M100 to M115
(one word) in units of words
1st word:
b15 b8 b7 b0
1 2 3 4

3
0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
M115 ... M100
Example: When writing the word device D0 to D2 in
units of words
1st word:

b15 b8 b7 b0
1 2 3 4

D0

2nd word:

b15 b8 b7 b0
0 0 0 2

D1

3rd word:

b15 b8 b7 b0
1 D E F

D2

• When the 0th bit of the subcommand is 1, the device


data is written in units of bits.
Example: When writing the bit device M100 to M107 in
units of bits
1st word:

b15 b8 b7 b0
0 1 0 0
M102 M103 M100 M101

2nd word:

b15 b8 b7 b0

1 1 0 0

M106 M107 M104 M105

(9) i_uChannel Own station channel Word [Unsigned]/Bit 1 to 17 Specify the channel to be used by the own station.*1
String [16-bit]  MELSEC iQ-R Programming Manual (Module
Dedicated Instructions)
(10) i_uTarget_Port_No Destination port Word [Unsigned]/Bit 1 to 65534 Specify the UDP port number of an external device.
number String [16-bit] For the port number to specify, check the manual for
the external device.

*1 Set 1 when not adding a serial No. Set 2 to 9 when adding a serial No. Set 10 to 17 when communicating using the station number
extension frame.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.7 M+model_SLMP_DeviceWrite_IP 117
■Output arguments
No. Variable name Name Data type Description Default
value
(11) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(12) o_bOK Normal completion Bit The FB has been processed normally when this argument is Off
on.
(13) o_bErr Error completion Bit The FB has been processed abnormally when this argument Off
is on.
(14) o_uErrId Error code Word [Unsigned]/Bit An error code is stored at error completion. 0
String [16-bit]

■Operation parameters
No. Variable name Name Data type Range Description Default
value
(15) pbi_uRequestModuleIO Requested module I/ Word 03E0H to 03E3H, 03FFH Specify the module of the access 03FFH
O No. [Unsigned]/ destination.
Bit String [16- • 03E0H: Multiple CPU No.1
bit] • 03E1H: Multiple CPU No.2
• 03E2H: Multiple CPU No.3
• 03E3H: Multiple CPU No.4
• 03FFH: Own station, control
CPU
(16) pbi_uResendCountMax Maximum number of Word 0 to 15 Specify the number of resends to 5
resends [Unsigned]/ be performed if the data transfer is
Bit String [16- not completed within the
bit] monitoring time specified by
"Arrival monitoring time".
• 0 to 15
(17) pbi_uMonitorTime Arrival monitoring Word 0, 1 to 32767 Specify the monitoring time until 0
time [Unsigned]/ completion of processing. If the
Bit String [16- processing is not completed within
bit] the monitoring time, data is resent
until the value specified in
"Maximum number of resends" is
reached.
• 0: 10s
• Effective range 1 to 32767: 1s to
32767s

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


118 3.7 M+model_SLMP_DeviceWrite_IP
■Public variables
No. Variable name Name Data type Description Default
value
(18) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit] If an error was detected, the number of resends performed
(result) between error detection and resend stop is stored.
(19) pbo_u4ErrTime Error occurrence time Word [Unsigned]/Bit Clock data at the time of error occurrence is stored.*1 0
String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word 3
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(20) pbo_uErrIP_Address_ Error-detected device Word [Unsigned]/Bit The IP addresses (the third and fourth octets) of the device in 0
3rd_4th IP addresses (the third String [16-bit] which an error was detected are stored.*1
and fourth octets) Example: When the IP address is 192.168.1.2
0102h
(21) pbo_uErrIP_Address_ Error-detected device Word [Unsigned]/Bit The IP addresses (the first and second octets) of the device in 0
1st_2nd IP addresses (the first String [16-bit] which an error was detected are stored.*1
and second octets) Example: When the IP address is 192.168.1.2
C0A8h

*1 The value is stored only when the dedicated instruction was completed with an error.
The value set to the external device IP address of the input argument is stored in the error-detected device IP addresses (the third and
fourth octets) and the error-detected device IP addresses (the first and second octets).

FB details
Item Description
Available device Target module • RJ71GN11-T2
• RJ71GN11-SX
• RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 268 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing • When i_bEN (execution command) is turned on, this function writes device data of the SLMP-compatible device.
• This FB is executed specifying the IP address of an external device.
• This FB uses Device Write (command: 1401) of the SLMP for the Write command. The message of the SLMP command is a binary
code. ( SLMP Reference Manual)
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.7 M+model_SLMP_DeviceWrite_IP 119
Item Description
Timing chart of I/O • For normal completion
signals
i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

pbo_u4ErrTime 0H

pbo_uErrIP_Address_3rd_4th,
0H
pbo_uErrIP_Address_1st_2nd

• For error completion (When the dedicated instruction was completed with an error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

pbo_u4ErrTime 0H (2)

pbo_uErrIP_Address_3rd_4th,
0H (3)
pbo_uErrIP_Address_1st_2nd

(1) Error code


(2) Error occurrence time
(3) Error-detected device IP address
• For error completion (When the dedicated instruction was completed successfully but the end code indicates an error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

pbo_u4ErrTime 0H

pbo_uErrIP_Address_3rd_4th,
0H
pbo_uErrIP_Address_1st_2nd

(1) Error code

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


120 3.7 M+model_SLMP_DeviceWrite_IP
Item Description
Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system
and required operations.
• This FB uses the GP.SLMPSND instruction. Even if the target device has sent an abnormal response, the GP.SLMPSND instruction
is completed successfully. In this FB, the instruction is determined to be completed successfully or completed with an error by the
end code of the response frame. When the instruction was determined to be completed with an error by the end code, the end code
is stored to the error code of the output argument. When the GP.SLMPSND instruction is completed successfully, the values are not
stored to the error occurrence time of the public variable, the error-detected device IP addresses (the third and fourth octets), and
the error-detected device IP addresses (the first and second octets).*1
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off
i_bEN (execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is
cleared to 0.
• In this FB, access devices (such as link direct device) that are accessed by the extension specification of the SLMP cannot be
3
written.
• In this FB, stations in other network cannot be set as the target station.
• For the port of an external device where the remote password is set, execute this FB after performing the unlock processing of the
remote password. When this FB is executed for the port of an external device where the remote password is set, an error will occur.
• The target station must support "Device Write (command: 1401H)" of the SLMP command.
• This FB is for communications in binary code only. (Communications using ASCII code cannot be performed.)
• This FB uses UDP/IP communications.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R
CPU Module User's Manual (Application)) If an error code that is not described in Page 121 Error codes appears, the initial label
value files by each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to
the boot file setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

*1 If 0 (initial value) is stored in the error occurrence time, the error-detected device IP addresses (the third and fourth octets), and the
error-detected device IP addresses (the first and second octets), check and take actions using the manuals for the SLMP-compatible
device used.

Error codes
Error code Reference
0100H When the read unit is set to 0 (in units of words), a number other than 1 to 960 is specified.
When the read unit is set to 1 (in units of bits) and the own station channel is 1 to 9: A number other than 1 to 3972 is specified.
When the read unit is set to 1 (in units of bits) and the own station channel is 10 to 17: A number other than 1 to 3960 is specified.
1000H to 3FFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
 MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual
4000H to 4FFFH  MELSEC iQ-R CPU Module User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
 MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.7 M+model_SLMP_DeviceWrite_IP 121
3.8 M+model_SetAddress

Name
■RJ71GN11-T2
M+RJ71GN11_SetAddress

■RJ71GN11-SX
M+RJ71GN11_SX_SetAddress

Overview
Item Description
Overview Sets the station number/IP address for the own station.
Symbol
M+RJ71GN11_SetAddress
(1) B: i_bEN o_bENO: B (5)
(2) DUT: i_stModule o_bOK: B (6)
(3) UW: i_uStationNo o_bErr: B (7)
(4) UW: i_u2IPAddress o_uErrId: UW (8)

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution Bit  On: Start FB.
command Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: GN11_1, GN11_SX_1)
(3) i_uStationNo Station number of Word 0 to 120 Specify the station number to be set.
the own station [Unsigned]/ Master station: 0
Bit String Local station: 1 to 120
[16-bit]
(4) i_u2IPAddress IP address Word 00000001H Specify the IP address to be set. When specifying the numbers using a label,
[Unsigned]/ to use an array as the data type.
Bit String DFFFFFFEH
b15 b8 b7 b0
[16-bit]
(0..1) +0 3 4
+1 1 2

1 to 4: IP address octet

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


122 3.8 M+model_SetAddress
■Output arguments
No. Variable name Name Data type Description Default
value
(5) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(6) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(7) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(8) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/
Bit String 3
[16-bit]

FB details
Item Description
Available device Target module • RJ71GN11-T2
• RJ71GN11-SX
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 50 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing Set the station number/IP address when i_bEN (execution instruction) is turned on.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.8 M+model_SetAddress 123
Item Description
Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.UINI instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• When the broadcast address or the reserved address is set to the IP address, the data may not link. Do not set the broadcast address
and the reserved address to the IP address.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
D000H to DFFFH

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


124 3.8 M+model_SetAddress
3.9 M+model_SetParameterX

Name
M+RJ71GN11_SetParameterX

Overview
Item Description 3
Overview Sets parameters for a module.
Symbol
M+RJ71GN11_SetParameterX
(1) B: i_bEN o_bENO: B (8)
(2) DUT: i_stModule o_bOK: B (9)
(3) UW: i_uTotalStations o_bErr: B (10)
(4) UW: i_u2175NetworkConfigurationSet o_uErrId: UW (11)
(5) UW: i_u16ReservedStationSet
(6) UW: i_u16ErrInvalidStationSet
(7) UW: i_u11CommunicationCycleSet

pbi_uTopologySet (12)
pbi_bNetworkConfigurationSetFlg (13)
pbi_bReservedStationSetFlg (14)
pbi_bErrInvalidStationSetFlg (15)
pbi_bDatalinkFaultyStationSet (16)
pbi_bCPU_StopOutputSet (17)
pbi_bCPU_StopErrOutputSet (18)
pbi_bClassSet (19)
pbi_uDisconnectionDetectionSet (20)
pbi_uCommModeSet (21)
pbi_bCommSpeedSet (22)

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution Bit  On: Start FB.
command Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the instance of the module label as an argument.
(Example: GN11_1)
(3) i_uTotalStations Total number of Word 2 to 121 Specify the total number of stations of network module connected.
stations [Unsigned]/
Bit String
[16-bit]
(4) i_u2175NetworkCo Network Word  Specify the start address of the storage location of network configuration setting
nfigurationSet configuration [Unsigned]/ data.
setting data Bit String Set data for the number of stations specified in "Total number of stations".
[16-bit] (Page 127 Network configuration setting data)
(0..2174)

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.9 M+model_SetParameterX 125
No. Variable name Name Data type Range Description
(5) i_u16ReservedStat Reserved station Word  Specify the start address of the storage location of the reserved-station setting
ionSet setting data [Unsigned]/ data.
Bit String Setting: Specify a reserved station.
[16-bit] • 0: Not specified (default)
(0..15) • 1: Specified

b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0


+0 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
+1 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
+2 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
+3 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
+4 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65
+5 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81
+6 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97
+7 - 120 119 118 117 116 115 114 113
+8 -
+9 -
+10 -
+11 -
+12 -
+13 -
+14 -
+15 -

Numbers 1 to 120 in the table indicate station numbers.


The master station cannot be specified as a reserved station.
(6) i_u16ErrInvalidStat Error invalid Word  Specify the start address of the storage location of the error invalid station
ionSet station setting [Unsigned]/ setting.
data Bit String Setting: Specify an error invalid station.
[16-bit] • 0: Not specified (default)
(0..15) • 1: Specified

b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0


+0 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
+1 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
+2 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
+3 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
+4 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65
+5 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81
+6 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97
+7 - 120 119 118 117 116 115 114 113
+8 -
+9 -
+10 -
+11 -
+12 -
+13 -
+14 -
+15 -

Numbers 1 to 120 in the table indicate station numbers.


The master station cannot be specified as a reserved station.
(7) i_u11Communicati Communication Word  Specify the communication cycle. ( Page 128 Communication cycle setting
onCycleSet cycle setting data [Unsigned]/ data)
Bit String
[16-bit]
(0..10)

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


126 3.9 M+model_SetParameterX
■Network configuration setting data
Element Item name Range Description
number
0 For 1st Station setting information  Set the station type, number of occupied stations, and station number.
module
b15 b12 b11 b8 b7 b0
(master
station) (3) (2) (1)

(1) Station number


0 (fixed)
(2) Number of occupied stations
1 (fixed)
3
(3) Station type
15: Master station (fixed)
1 to 6 Not used  
7 to 8 LB offset 0 to 32752 Set the offset value from the head of LB in increments of 16 points.
9 to 10 Number of LB points 0 to 32768 Set the number of LB points in increments of 16 points.
11 to 12 LW offset 0 to 16383 Set the offset value from the head of LW.
13 to 14 Number of LW points 0 to 16384 Set the number of LW points.
15 For 2nd Station setting information  Set the station type, number of occupied stations, and station number.
module
b15 b12 b11 b8 b7 b0
(slave
station) (3) (2) (1)

(1) Station number


1 to 120
(2) Number of occupied stations
1 (fixed)
(3) Station type
0: Remote station
1: Local station
16 to 17 RX/RY offset 0 to 16368 Set the offset value from the head of RX/RY in increments of 16 points.
18 Number of RX/RY points 0 to 16384 Set the number of RX/RY points in increments of 16 points.
19 to 20 RWr/RWw offset 0 to 8188 Set the offset value from the head of RWr/RWw in increments of 4 points.
21 Number of RWr/RWw 0 to 8192 Set the number of RWr/RWw points in increments of 4 points.
points
22 to 23 LB offset 0 to 32752 Set the offset value from the head of LB in increments of 16 points.
24 to 25 Number of LB points 0 to 32768 Set the number of LB points in increments of 16 points.
26 to 27 LW offset 0 to 16383 Set the offset value from the head of LW.
28 to 29 Number of LW points 0 to 16384 Set the number of LW points.
30 to 31 IP address 00000001H Set the IP address.
to • 30: Set the IP address (the third and fourth octets) of the target station.
DFFFFFFEH
b15 b8 b7 b0
(1 to
3758096382) 3 4

• 31: Set the IP address (the first and second octets).

b15 b8 b7 b0

1 2

Only for the slave station, set the IP address. For the master station, the IP address
setting is not required.
32 Communication cycle 0 to 2 0: Standard cycle
setting 1: Medium speed
2: Low speed
33 to 2174 For 3rd to 121st module (slave station)
For setting details, refer to the 2nd module (15 to 32).

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.9 M+model_SetParameterX 127
• Set for all the stations.
If the specified total number of stations does not match the individual station setting data, the total number of individual
stations specified in the total number of stations takes precedence. Any individual station information exceeding the total
number of stations is ignored.
Example) When the station information of ten stations is set even if the total number of stations is two.
 The 1st and 2nd information is enabled and parameters which are set the 3rd to 10th station information are ignored.

■Communication cycle setting data


Element Item Description Setting range
number
0 Setting in increments of Specify whether to set the communication cycle interval in increments of 1s. 0, 1
1s • 0: Not set
• 1: Set
1 Communication cycle Set the communication cycle interval setting. Left
2 interval setting ■When the "Setting in increments of 1s" is set to "0"
[Specification method]
Set one of the following value to the element number 1. (The values set to the element
number 2 are ignored.)
• 2: 125.00s
• 3: 250.00s
• 4: 500.00s
• 5: 1000.00s
• 6: 2000.00s
• 7: 4000.00s
• 8: 8000.00s*1
[Setting range]
2 to 8
[Example]
For 250.00s: element number 1  3, element number 2  0
■When the "Setting in increments of 1s" is set to "1"
[Specification method]
• Element number 1: Set the value in units of ms.
• Element number 2: Set the value in units of s.
[Setting range]
125.00s to 10000.00s*2
[Example]
For 162.00s: element number 1  0, element number 2  162
3 Not used  
4 System reservation time Set the system reservation time. 0, 1
• 0: 20.00s
• 1: 200.00s
5 Cyclic transmission time Set the cyclic transmission time of the CC-Link IE TSN. Left
6 ■Specification method
• Element number 5: Set the value in units of ms.
• Element number 6: Set the value in units of s.
■Setting range
5s to 9966.00s*3
■When the value is 38s (0ms, 38s)
• Element number 5: 0
• Element number 6: 38
7 Not used  
8
9 Medium speed Specify the medium speed cycle for the communication cycle interval set in "Communication 4 (fixed)
cycle interval setting". (Unit: double)
10 Low speed Specify the low speed cycle for the communication cycle interval set in "Communication 16 (fixed)
cycle interval setting". (Unit: double)

*1 The supported firmware version is "04" or later.


*2 The setting range for the firmware version with "03" or earlier is 125.00s to 4000.00s.
*3 The setting range for the firmware version with "03" or earlier is 5s to 3966.00s.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


128 3.9 M+model_SetParameterX
■Output arguments
No. Variable name Name Data type Description Default
value
(8) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(9) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(10) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(11) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/Bit
String [16-bit] 3
■Operation parameters
: Can be set, : Cannot be set
No. Variable Name Data type Range Description Default Master Local
name value station station
(12) pbi_uTopologyS Network Word 0, 1 Specify the network topology. 0  
et topology setting [Unsigned]/Bit • 0: Line topology, star topology, or
String [16-bit] coexistence of star and line topologies
• 1: Ring topology*2
(13) pbi_bNetworkCo Presence of Bit Off, on Specify whether to enable/disable the network Off  
nfigurationSetFlg network configuration setting data.
configuration • Off: Disable
setting data • On: Enable
(14) pbi_bReservedS Presence of Bit Off, on Specify whether to enable/disable the reserved Off  
tationSetFlg reserved station station setting data.
setting data • Off: Disable
• On: Enable
(15) pbi_bErrInvalidS Presence of Bit Off, on Specify whether to enable/disable the error Off  
tationSetFlg error invalid invalid station setting data.
station setting • Off: Disable
data • On: Enable
(16) pbi_bDatalinkFa Data link faulty Bit Off, on Specify whether to hold or clear the input data Off  
ultyStationSet station setting from a data link faulty station.
• Off: Clear
• On: Hold
(17) pbi_bCPU_Stop Output setting Bit Off, on Specify whether to hold or clear the output data Off  
OutputSet for CPU STOP when the operating status of a CPU module is
STOP.
• Off: Hold
• On: Clear
(18) pbi_bCPU_Stop Output setting Bit Off, on Specify whether to hold or clear the output data Off  
ErrOutputSet for CPU stop when the a CPU module caused a stop error.
error • Off: Clear
• On: Hold
(19) pbi_bClassSet CC-Link IE TSN Bit Off, on Set the CC-Link IE TSN Class of the slave ON  
Class setting station to be connected.
• Off: Coexistence of CC-Link IE TSN Class B
and A or CC-Link IE TSN Class A
• On: CC-Link IE TSN Class B
(20) pbi_uDisconnect Disconnection Word 1 to 3 Set the continuous communications failure 2 (4  
ionDetectionSet detection setting [Unsigned]/Bit count before the slave station is detected to be times)
String [16-bit] disconnected.
• 1: 2 times
• 2: 4 times
• 3: 8 times
(21) pbi_uCommMod Communication Word 0, 1 Set communication mode. 0  
eSet mode setting [Unsigned]/Bit • 0: Unicast
String [16-bit] • 1: Multicast*1
(22) pbi_bCommSpe Communication Bit Off, on Set the communication speed. Off  
edSet speed setting • Off: 1Gbps
• On: 100Mbps*1

*1 The supported firmware version is "04" or later.


*2 The supported firmware version is "10" or later.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.9 M+model_SetParameterX 129
FB details
Item Description
Available device Target module RJ71GN11-T2
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 93 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution command) is turned on, this function sets parameters for a module.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.CCPASETX instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• Before executing the FB, execute the M+model_SetAddress of the module FB or the UINI instruction of the dedicated instruction, and
set the station number and IP address (regardless of the "Station number/IP address setting" set from the module parameter of the
engineering tool).
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 131 Error codes appears, the initial label value files
by each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


130 3.9 M+model_SetParameterX
Error codes
Error code Reference
0101H The value out of the effective range is specified to the network topology setting.
C000H to CFFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
D000H to DFFFH

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.9 M+model_SetParameterX 131
3.10 M+model_RemoteRead

Name
■RJ71GN11-T2
M+RJ71GN11_RemoteRead

■RJ71GN11-EIP
M+RJ71GN11_SE_RemoteRead

Overview
Item Description
Overview Reads data from the buffer memory area of the remote station in units of words.
Symbol
M+RJ71GN11_RemoteRead
(1) B: i_bEN o_bENO: B (7)
(2) DUT: i_stModule o_bOK: B (8)
(3) UW: i_u2TargetAddress o_bErr: B (9)
(4) UD: i_udTargetBuffer o_uErrId: UW (10)
(5) UW: i_uDataLength o_uReadData: UW (11)
(6) UW: i_uChannel

pbi_uTargetStartIO (12)
pbi_uResendCountMax (13)
pbi_uMonitorTime (14)
pbi_bStationSpecific (15)
pbo_uResendCount (16)

The above FB is an example for the RJ71GN11-T2.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


132 3.10 M+model_RemoteRead
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution Bit  On: Start FB.
command Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: GN11_1, GN11_SE_1)
(3) i_u2TargetAddress Target station Word  Specify the network number and station number of the target station when 3
address [Unsigned]/ "Target station address specification method" is off. When specifying the
Bit String numbers using a label, use an array as the data type.
[16-bit] 1st word: Network number (1 to 239)
(0..1) 2nd word: Station number
• Station number of CC-Link IE TSN
1 to 120: Remote station
Specify the IP address of the target station when "Target station address
specification method" is on. When specifying the numbers using a label, use an
array as the data type.
• CC-Link IE TSN
00000001H to DFFFFFFEH
Specify a value within the range of 1 to 254 (FEH) for the fourth octet.

b15 b8 b7 b0
+0 3 4
+1 1 2

1 to 4: IP address octet
(4) i_udTargetBuffer Read buffer Double 00000000H Specify the start buffer memory address of the target station containing the read
memory of the word to data.
target station [Unsigned]/ FFFFFFFFH
Bit String
[32-bit]
(5) i_uDataLength Read data Word 1 to 240 Specify the number of read data points (in units of words).
length [Unsigned]/
Bit String
[16-bit]
(6) i_uChannel Own station Word 1 to 32 Specify the channel to be used by the own station.
channel [Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
Bit String
[16-bit]

■Output arguments
No. Variable name Name Data type Description Default
value
(7) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(8) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(9) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(10) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/
Bit String
[16-bit]
(11) o_uReadData Read data storage Word Specify the start number of the device for storing the read data 0
device [Unsigned]/
Bit String
[16-bit]

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.10 M+model_RemoteRead 133
■Operation parameters
No. Variable name Name Data type Range Description Default
value
(12) pbi_uTargetStartIO Start input/output Word 0000H Specify the start input/output number of the target station. 0000H
number of the target [Unsigned]/
station Bit String
[16-bit]
(13) pbi_uResendCountM Maximum number of Word 0 to 15 Specify the number of resends to be performed if the data 5
ax resends [Unsigned]/ transfer is not completed within the monitoring time
Bit String specified by "Arrival monitoring time".
[16-bit] 0 to 15
(14) pbi_uMonitorTime Arrival monitoring Word 0 to 32767 Specify the monitoring time until completion of processing. 0: 10s
time [Unsigned]/ If the processing is not completed within the monitoring
Bit String time, data is resent until the value specified in the
[16-bit] "Maximum number of resends" is reached.
• 0: 10s
• Effective range 1 to 32767: 1s to 32767s
(15) pbi_bStationSpecific Target station address Bit Off, on Specify the specification method of a target station. Off
specification method • Off: Use the network number and station number.
• On: Use the IP address (IPv4). (CC-Link IE TSN only).

■Public variables
No. Variable name Name Data type Description Default
value
(16) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit] If an error was detected, the number of resends performed (result)
between error detection and resend stop is stored.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


134 3.10 M+model_RemoteRead
FB details
Item Description
Available device Target module • RJ71GN11-T2
• RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 97 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option 3
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function writes device data to the programmable controller of another station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.REMFRDIP instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 136 Error codes appears, the initial label value files
by each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.10 M+model_RemoteRead 135
Error codes
Error code Reference
4000H to 4FFFH  Manual for the target station used
C000H to CFFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


136 3.10 M+model_RemoteRead
3.11 M+model_RemoteWrite

Name
■RJ71GN11-T2
M+RJ71GN11_RemoteWrite

■RJ71GN11-EIP
M+RJ71GN11_SE_RemoteWrite 3
Overview
Item Description
Overview Writes data to the buffer memory area of the remote station in units of words.
Symbol
M+RJ71GN11_RemoteWrite
(1) B: i_bEN o_bENO: B (8)
(2) DUT: i_stModule o_bOK: B (9)
(3) UW: i_u2TargetAddress o_bErr: B (10)
(4) UD: i_udTargetBuffer o_uErrId: UW (11)
(5) UW: i_uWriteData
(6) UW: i_uDataLength
(7) UW: i_uChannel

pbi_uTargetStartIO (12)
pbi_uResendCountMax (13)
pbi_uMonitorTime (14)
pbi_bStationSpecific (15)
pbo_uResendCount (16)

The above FB is an example for the RJ71GN11-T2.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.11 M+model_RemoteWrite 137
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution Bit  On: Start FB.
command Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: GN11_1, GN11_SE_1)
(3) i_u2TargetAddress Target station Word  Specify the network number and station number of the target station when
address [Unsigned]/ "Target station address specification method" is off. When specifying the
Bit String numbers using a label, use an array as the data type.
[16-bit] 1st word: Network number (1 to 239)
(0..1) 2nd word: Station number
• Station number of CC-Link IE TSN
1 to 120: Remote station
Specify the IP address of the target station when "Target station address
specification method" is on. When specifying the numbers using a label, use an
array as the data type.
• CC-Link IE TSN
00000001H to DFFFFFFEH
Specify a value within the range of 1 to 254 (FEH) for the fourth octet.

b15 b8 b7 b0
+0 3 4
+1 1 2

1 to 4: IP address octet
(4) i_udTargetBuffer Target station Double 00000000 Specify the start buffer memory address of the target station to which the data is
write buffer word H to written.
[Unsigned]/ FFFFFFFF
Bit String H
[32-bit]
(5) i_uWriteData Write data storage Word  Specify the start device of own station containing the write data.
device [Unsigned]/
Bit String
[16-bit]
(6) i_uDataLength Write data length Word 1 to 240 Specify the number of write data points (in units of words).
[Unsigned]/
Bit String
[16-bit]
(7) i_uChannel Own station Word 1 to 32 Specify the channel to be used by the own station.
channel [Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
Bit String
[16-bit]

■Output arguments
No. Variable name Name Data type Description Default
value
(8) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(9) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(10) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(11) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/
Bit String
[16-bit]

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


138 3.11 M+model_RemoteWrite
■Operation parameters
No. Variable name Name Data type Range Description Default
value
(12) pbi_uTargetStartIO Start input/output Word 0000H Specify the start input/output number of the target station. 0000H
number of the target [Unsigned]/
station Bit String
[16-bit]
(13) pbi_uResendCountM Maximum number of Word 0 to 15 Specify the number of resends to be performed if the data 5
ax resends [Unsigned]/ transfer is not completed within the monitoring time
Bit String
[16-bit]
specified by "Arrival monitoring time".
0 to 15 3
(14) pbi_uMonitorTime Arrival monitoring Word 0 to 32767 Specify the monitoring time until completion of processing. If 0: 10s
time [Unsigned]/ the processing is not completed within the monitoring time,
Bit String data is resent until the value specified in the "Maximum
[16-bit] number of resends" is reached.
• 0: 10s
• Effective range 1 to 32767: 1s to 32767s
(15) pbi_bStationSpecific Target station Bit Off, on Specify the specification method of a target station. Off
address specification • Off: Use the network number and station number.
method • On: Use the IP address (IPv4). (CC-Link IE TSN only).

■Public variables
No. Variable name Name Data type Description Default
value
(16) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit] If an error was detected, the number of resends performed (result)
between error detection and resend stop is stored.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.11 M+model_RemoteWrite 139
FB details
Item Description
Available device Target module • RJ71GN11-T2
• RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 97 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function writes device data to another station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.REMTODIP instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 141 Error codes appears, the initial label value files
by each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


140 3.11 M+model_RemoteWrite
Error codes
Error code Reference
4000H to 4FFFH  Manual for the target station used
C000H to CFFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.11 M+model_RemoteWrite 141
3.12 M+model_RemoteReset_IP

Name
■RJ71GN11-T2
M+RJ71GN11_RemoteReset_IP

■RJ71GN11-SX
M+RJ71GN11_SX_RemoteReset_IP

■RJ71GN11-EIP
M+RJ71GN11_SE_RemoteReset_IP

Overview
Item Description
Overview Sends the remote STOP of an SLMP request to the target station specified by an IP address and then sends the remote RESET.
Symbol
M+RJ71GN11_RemoteReset_IP
(1) B: i_bEN o_bENO: B (6)
(2) DUT: i_stModule o_bOK: B (7)
(3) UW: i_u2TargetAddress o_bErr: B (8)
(4) UW: i_uTarget_Port_No o_uErrId: UW (9)
(5) UW: i_uChannel

pbo_u4ErrTime (10)
pbo_uErrIP_Address_3rd_4th (11)
pbo_uErrIP_Address_1st_2nd (12)

The above FB is an example for the RJ71GN11-T2.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


142 3.12 M+model_RemoteReset_IP
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution Bit  On: Start FB.
command Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: GN11_1, GN11_SX_1, GN11_SE_1)
(3) i_u2TargetAddress IP address of Word Right Specify the IP address of an external device. When specifying the address using 3
external device [Unsigned]/ a label, use an array as the data type.
Bit String • 00000001H to DFFFFFFEH
[16-bit] Specify a value within the range of 1 to 254 (FEH) for the fourth octet.
(0..1)
b15 b8 b7 b0
+0 3 4
+1 1 2

1 to 4: IP address octet
(4) i_uTarget_Port_No Destination port Word 1 to 65534 Specify the UDP port number of an external device.
number [Unsigned]/ For the port number to specify, check the manual for the external device.
Bit String
[16-bit]
(5) i_uChannel Own station Word 1 to 17 Specify the channel to be used by the own station.*1
channel [Unsigned]/
Bit String
[16-bit]

*1 To perform communications using the frame without the serial number on this FB, specify 1 to the own station channel. When a number
of 2 to 9 is specified, this FB communicates using the frame with the serial number. When a number of 10 to 17 is specified, this FB
communicates using the station number extension frame.

■Output arguments
No. Variable name Name Data type Description Default
value
(6) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(7) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(8) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(9) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/
Bit String
[16-bit]

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.12 M+model_RemoteReset_IP 143
■Public variables
No. Variable name Name Data type Description Default
value
(10) pbo_u4ErrTime Error occurrence Word [Unsigned]/Bit Clock data at the time of error occurrence is stored.*1 0
time String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(11) pbo_uErrIP_Address Error-detected Word [Unsigned]/Bit The IP addresses (the third and fourth octets) of the station in 0
_3rd_4th device IP addresses String [16-bit] which an error was detected are stored.*1
(the third and fourth Example: When the IP address is 192.168.1.2
octets) 0102h
(12) pbo_uErrIP_Address Error-detected Word [Unsigned]/Bit The IP addresses (the first and second octets) of the station in 0
_1st_2nd device IP addresses String [16-bit] which an error was detected are stored.*1
(the first and second Example: When the IP address is 192.168.1.2
octets) C0A8h

*1 The value is stored only when the dedicated instruction was completed with an error.
The value set to the target station address of the input argument is stored in the error-detected device IP addresses (the third and fourth
octets) and the error-detected device IP addresses (the first and second octets).

FB details
Item Description
Available device Target module • RJ71GN11-T2
• RJ71GN11-SX
• RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 362 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution command) is turned on, this function sends the remote STOP of an SLMP request to the target station and then
sends the remote RESET.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


144 3.12 M+model_RemoteReset_IP
Item Description
Timing chart of I/O • For normal completion
signals
i_bEN

o_bENO

o_bOK

3
o_bErr

o_uErrId 0H

pbo_u4ErrTime 0H

pbo_uErrIP_Address_3rd_4th,
0H
pbo_uErrIP_Address_1st_2nd

• For error completion (When the dedicated instruction was completed with an error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

pbo_u4ErrTime 0H (2)

pbo_uErrIP_Address_3rd_4th,
0H (3)
pbo_uErrIP_Address_1st_2nd

(1) Error code


(2) Error occurrence time
(3) Error-detected station address
• For error completion (When the dedicated instruction was completed successfully but the end code indicates an error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

pbo_u4ErrTime 0H

pbo_uErrIP_Address_3rd_4th,
0H
pbo_uErrIP_Address_1st_2nd

(1) Error code

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.12 M+model_RemoteReset_IP 145
Item Description
Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.SLMPSND instruction. Even if the target device has sent an abnormal response, the GP.SLMPSND instruction is
completed successfully. In this FB, the instruction is determined to be completed successfully or completed with an error by the end
code of the response frame. When the instruction was determined to be completed with an error by the end code, the end code is
stored to the error code of the output argument.
• When the GP.SLMPSND instruction is completed successfully, the values are not stored to the error occurrence time of the public
variable, the error-detected device IP addresses (the third and fourth octets), and the error-detected device IP addresses (the first and
second octets).*1
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• When the remote RESET request is sent and completed successfully, o_bOK (normal completion) is turned on. Whether the target
station is actually reset remotely or not depends on the target station status.
• In this FB, stations in other network cannot be set as the target station.
• The target station must support "Remote STOP (command: 1002H)" and "Remote Reset (command: 1006H)" of the SLMP command.
• This FB uses UDP/IP communications.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

*1 If 0 (initial value) is stored in the error occurrence time, the error-detected device IP addresses (the third and fourth octets), and the
error-detected device IP addresses (the first and second octets), check and take actions using the manuals for the SLMP-compatible
device used.

Error codes
Error code Reference
1000H to 3FFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
 MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual
4000H to 4FFFH  MELSEC iQ-R CPU Module User's Manual (Application)
D000H to DFFFH  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
 MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


146 3.12 M+model_RemoteReset_IP
3.13 M+model_RemoteReset2_IP

Name
■RJ71GN11-T2
M+RJ71GN11_RemoteReset2_IP

■RJ71GN11-SX
M+RJ71GN11_SX_RemoteReset2_IP 3
■RJ71GN11-EIP
M+RJ71GN11_SE_RemoteReset2_IP

Overview
Item Description
Overview Sends the remote RESET of an SLMP request to the target station specified by an IP address.
Symbol
M+RJ71GN11_RemoteReset2_IP
(1) B: i_bEN o_bENO: B (6)
(2) DUT: i_stModule o_bOK: B (7)
(3) UW: i_u2TargetAddress o_bErr: B (8)
(4) UW: i_uTarget_Port_No o_uErrId: UW (9)
(5) UW: i_uChannel

pbo_u4ErrTime (10)
pbo_uErrIP_Address_3rd_4th (11)
pbo_uErrIP_Address_1st_2nd (12)

The above FB is an example for the RJ71GN11-T2.

Labels
■Input arguments
No. Variable name Name Data Range Description
type
(1) i_bEN Execution Bit  On: Start FB.
command Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: GN11_1, GN11_SX_1, GN11_SE_1)
(3) i_u2TargetAddress IP address of Word Right Specify the IP address of an external device. When specifying the address using
external device [Unsigned] a label, use an array as the data type.
/Bit String • 00000001H to DFFFFFFEH
[16-bit] Specify a value within the range of 1 to 254 (FEH) for the fourth octet.
(0..1)
b15 b8 b7 b0
+0 3 4
+1 1 2

1 to 4: IP address octet
(4) i_uTarget_Port_No Destination port Word 1 to 65534 Specify the UDP port number of an external device.
number [Unsigned] For the port number to specify, check the manual for the external device.
/Bit String
[16-bit]
(5) i_uChannel Own station Word 1 to 17 Specify the channel to be used by the own station.*1
channel [Unsigned]
/Bit String
[16-bit]

*1 To perform communications using the frame without the serial number on this FB, specify 1 to the own station channel. When a number
of 2 to 9 is specified, this FB communicates using the frame with the serial number. When a number of 10 to 17 is specified, this FB
communicates using the station number extension frame.

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.13 M+model_RemoteReset2_IP 147
■Output arguments
No. Variable name Name Data Description Default
type value
(6) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(7) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(8) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(9) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]
/Bit String
[16-bit]

■Public variables
No. Variable name Name Data type Description Default
value
(10) pbo_u4ErrTime Error occurrence Word [Unsigned]/Bit Clock data at the time of error occurrence is stored.*1 0
time String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(11) pbo_uErrIP_Address Error-detected Word [Unsigned]/Bit The IP addresses (the third and fourth octets) of the station in 0
_3rd_4th device IP addresses String [16-bit] which an error was detected are stored.*1
(the third and fourth Example: When the IP address is 192.168.1.2
octets) 0102h
(12) pbo_uErrIP_Address Error-detected Word [Unsigned]/Bit The IP addresses (the first and second octets) of the station in 0
_1st_2nd device IP addresses String [16-bit] which an error was detected are stored.*1
(the first and second Example: When the IP address is 192.168.1.2
octets) C0A8h

*1 The value is stored only when the dedicated instruction was completed with an error.
The value set to the target station address of the input argument is stored in the error-detected device IP addresses (the third and fourth
octets) and the error-detected device IP addresses (the first and second octets).

FB details
Item Description
Available device Target module • RJ71GN11-T2
• RJ71GN11-SX
• RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 171 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution command) is turned on, this function sends the remote RESET of an SLMP request to the target station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


148 3.13 M+model_RemoteReset2_IP
Item Description
Timing chart of I/O • For normal completion
signals
i_bEN

o_bENO

o_bOK

3
o_bErr

o_uErrId 0H

pbo_u4ErrTime 0H

pbo_uErrIP_Address_3rd_4th,
0H
pbo_uErrIP_Address_1st_2nd

• For error completion (When the dedicated instruction was completed with an error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

pbo_u4ErrTime 0H (2)

pbo_uErrIP_Address_3rd_4th,
0H (3)
pbo_uErrIP_Address_1st_2nd

(1) Error code


(2) Error occurrence time
(3) Error-detected station address
• For error completion (When the dedicated instruction was completed successfully but the end code indicates an error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

pbo_u4ErrTime 0H

pbo_uErrIP_Address_3rd_4th,
0H
pbo_uErrIP_Address_1st_2nd

(1) Error code

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


3.13 M+model_RemoteReset2_IP 149
Item Description
Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.SLMPSND instruction. Even if the target device has sent an abnormal response, the GP.SLMPSND instruction is
completed successfully. In this FB, the instruction is determined to be completed successfully or completed with an error by the end
code of the response frame. When the instruction was determined to be completed with an error by the end code, the end code is
stored to the error code of the output argument.
• When the GP.SLMPSND instruction is completed successfully, the values are not stored to the error occurrence time of the public
variable, the error-detected device IP addresses (the third and fourth octets), and the error-detected device IP addresses (the first and
second octets).*1
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• When the remote RESET request is sent and completed successfully, o_bOK (normal completion) is turned on. Whether the target
station is actually reset remotely or not depends on the target station status.
• In this FB, stations in other network cannot be set as the target station.
• The external device must support SLMP command (Remote Reset (1006H)).
• This FB uses UDP/IP communications.

*1 If 0 (initial value) is stored in the error occurrence time, the error-detected device IP addresses (the third and fourth octets), and the
error-detected device IP addresses (the first and second octets), check and take actions using the manuals for the SLMP-compatible
device used.

Error codes
Error code Reference
1000H to  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
3FFFH  MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual
4000H to  MELSEC iQ-R CPU Module User's Manual (Application)
4FFFH
D000H to  MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
DFFFH  MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

3 CC-Link IE TSN MASTER/LOCAL MODULE FB


150 3.13 M+model_RemoteReset2_IP
4 CC-Link IE TSN Plus MASTER/LOCAL
MODULE FB
4.1 M+model_DeviceRead
The FB is the same as M+model_DeviceRead of the CC-Link IE TSN master/local module FB. ( Page 79
M+model_DeviceRead)

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


4.1 M+model_DeviceRead 151
4.2 M+model_DeviceWrite
The FB is the same as M+model_DeviceWrite of the CC-Link IE TSN master/local module FB. ( Page 84
M+model_DeviceWrite)

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


152 4.2 M+model_DeviceWrite
4.3 M+model_Send
The FB is the same as M+model_Send of the CC-Link IE TSN master/local module FB. ( Page 91 M+model_Send)

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


4.3 M+model_Send 153
4.4 M+model_Recv
The FB is the same as M+model_Recv of the CC-Link IE TSN master/local module FB. ( Page 97 M+model_Recv)

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


154 4.4 M+model_Recv
4.5 M+model_RemoteStopRun
The FB is the same as M+model_RemoteStopRun of the CC-Link IE TSN master/local module FB. ( Page 102
M+model_RemoteStopRun)

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


4.5 M+model_RemoteStopRun 155
4.6 M+model_SLMP_DeviceRead_IP
The FB is the same as M+model_SLMP_DeviceRead_IP of the CC-Link IE TSN master/local module FB. ( Page 108
M+model_SLMP_DeviceRead_IP)

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


156 4.6 M+model_SLMP_DeviceRead_IP
4.7 M+model_SLMP_DeviceWrite_IP
The FB is the same as M+model_SLMP_DeviceWrite_IP of the CC-Link IE TSN master/local module FB. ( Page 115
M+model_SLMP_DeviceWrite_IP)

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


4.7 M+model_SLMP_DeviceWrite_IP 157
4.8 M+model_RemoteRead
The FB is the same as M+model_RemoteRead of the CC-Link IE TSN master/local module FB. ( Page 132
M+model_RemoteRead)

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


158 4.8 M+model_RemoteRead
4.9 M+model_RemoteWrite
The FB is the same as M+model_RemoteWrite of the CC-Link IE TSN master/local module FB. ( Page 137
M+model_RemoteWrite)

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


4.9 M+model_RemoteWrite 159
4.10 M+model_RemoteReset_IP
The FB is the same as M+model_RemoteReset_IP of the CC-Link IE TSN master/local module FB. ( Page 142
M+model_RemoteReset_IP)

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


160 4.10 M+model_RemoteReset_IP
4.11 M+model_RemoteReset2_IP
The FB is the same as M+model_RemoteReset2_IP of the CC-Link IE TSN master/local module FB. ( Page 147
M+model_RemoteReset2_IP)

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


4.11 M+model_RemoteReset2_IP 161
4.12 M+model_ConnectionOpen

Name
M+RJ71GN11_SE_ConnectionOpen

Overview
Item Description
Overview Opens (establishes) a connection for data communication with an external device.
Symbol
M+RJ71GN11_SE_ConnectionOpen
(1) B:i_bEN o_bENO:B (4)
(2) DUT:i_stModule o_bOK:B (5)
(3) UW:i_uConnectionNo o_bErr:B (6)
o_uErrId:UW (7)

pbi_bUseParameters (8)
pbi_uProtocol (9)
pbi_uOpen_System (10)
pbi_uLocal_Port_No (11)
pbi_uTarget_Port_No (12)
pbi_u2IP_Address (13)

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be
executed.
Specify the module label of the modules.
(Example: GN11_SE_1)
(3) i_uConnectionNo Connection No. Word 1 to 16 Specify the number of the connection to be
[Unsigned]/ opened.
Bit String • 1 to 8: Port 1, socket communications
[16-bit] • 9 to 16: Port 2, socket communications

■Output arguments
No. Variable name Name Data type Description Default
value
(4) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(5) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(6) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(7) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/Bit
String [16-bit]

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


162 4.12 M+model_ConnectionOpen
■Operation parameters
No. Variable name Name Data type Range Description Default
value
(8) pbi_bUseParameters Parameter used Bit On or off Specify whether to use the parameter values set by the Off
engineering tool or the following operation parameter
values when processing for opening a connection.
• Off: Performs open processing according to the external
device connection configuration setting made by the
engineering tool. (The following operation parameters
need not be set. Any settings are ignored if made.)
• On: Performs open processing according to the
following operation parameters.
(9) pbi_uProtocol Protocol Word 0, 1 Select the protocol to be used for the connection to be 0
[Unsigned]/ opened.
Bit String • 0: TCP/IP 4
[16-bit] • 1: UDP/IP
(10) pbi_uOpen_System Open method Word 0 to 2 Select the connection open method. 0
[Unsigned]/ • 0: Active open or UDP/IP
Bit String • 1: Unpassive open
[16-bit] • 2: Fullpassive open
(11) pbi_uLocal_Port_No Own node port Word 1024 to Specify the port number of the own node. 4096
number [Unsigned]/ 65534*1
Bit String
[16-bit]
(12) pbi_uTarget_Port_No Destination port Word 1024 to 65535 Specify the destination port number. 4096
number [Unsigned]/ With the connection that is assigned to port No.65535
Bit String (only when the UDP/IP protocol is selected), data is
[16-bit] received through all port number.
(13) pbi_u2IP_Address IP address of Word 0.0.0.1 to Specify the IP address of an external device. 192.168.1.
external device [Unsigned]/ 255.255.255.25 Specify the third and fourth octets to the 1st word, and first 1
Bit String 5 (00000001H and second octets to the 2nd word. (C0A8010
[16-bit] to Specify 255.255.255.255 (FFFFFFFFH) when performing 1H)
FFFFFFFFH)*2 simultaneous broadcast.

b15 b8 b7 b0
+0 (3) (4)
+1 (1) (2)

(1) to (4): IP address octet

*1 The following port numbers cannot be used.


20, 21, 161, 162, 5000 to 5011, 45237 to 45239, 61440 to 61442, 61448, 61460 to 61464, 61500, 61501, 62000 to 65534
*2 When 0.0.0.0 is specified, the device operates with the default value.

FB details
Item Description
Available device Target module RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 102 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to the GX Works3 Operating Manual.
Processing When i_bEN (execution command) is turned on, this function opens (establishes) a connection for data communication with an external
device.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


4.12 M+model_ConnectionOpen 163
Item Description
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB cannot be executed for the connection that is being used by another FB or a dedicated instruction. An error occurs if this FB is
executed for the connection in use.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• If this FB is executed for the connection for which parameters are already set by "External Device Connection Configuration Setting",
make settings so that the parameters specified by this FB are overwritten.
• When open processing is performed according to the content of the operation parameter with pbi_bUseParameters (parameter used)
set to ON, the available communication means is the socket communications only.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application))

Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


164 4.12 M+model_ConnectionOpen
4.13 M+model_ConnectionClose

Name
M+RJ71GN11_SE_ConnectionClose

Overview
Item Description
Overview Closes (disconnects) a connection for data communication with an external device.
Symbol
M+RJ71GN11_SE_ConnectionClose
(1) B:i_bEN o_bENO:B (4) 4
(2) DUT:i_stModule o_bOK:B (5)
(3) UW:i_uConnectionNo o_bErr:B (6)
o_uErrId:UW (7)

pbo_uErrConn_No (8)

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be
executed.
Specify the module label of the modules.
(Example: GN11_SE_1)
(3) i_uConnectionNo Connection No. Word 1 to 16 Specify the number of the connection to be
[Unsigned]/ closed.
Bit String • 1 to 8: Port 1, socket communications
[16-bit] • 9 to 16: Port 2, socket communications

■Output arguments
No. Variable name Name Data type Description Default
value
(4) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(5) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(6) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(7) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/Bit
String [16-bit]

■Public variables
No. Variable name Name Data type Description Default
value
(8) pbo_uErrConn_No Error connection Word [Unsigned]/ The number of the connection for which close processing was 0
No. Bit String [16-bit] completed with an error is stored.
If 65535 (FFFFH) is specified in i_uConnectionNo (connection No.), the
number of the connection for which close processing was first
completed with an error is stored.

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


4.13 M+model_ConnectionClose 165
FB details
Item Description
Available device Target module RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 84 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to the GX Works3 Operating Manual.
Processing • When i_bEN (execution command) is turned on, this function closes a connection for data communication with an external device.
• The function closes all connections if 65535 (FFFFH) is specified for i_uConnectionNo (connection No.) in the input argument.
• If the function fails to close even one connection among those specified to be closed, it is completed with an error.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB cannot be executed for the connection that is being used by another FB or a dedicated instruction. An error occurs if this FB is
executed for the connection in use.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.

Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


166 4.13 M+model_ConnectionClose
4.14 M+model_Recv_Socket

Name
M+RJ71GN11_SE_Recv_Socket

Overview
Item Description
Overview Reads the data received through socket communications.
Symbol
M+RJ71GN11_SE_Recv_Socket
(1) B:i_bEN o_bENO:B (4) 4
(2) DUT:i_stModule o_bOK:B (5)
(3) UW:i_uConnectionNo o_bErr:B (6)
o_uErrId:UW (7)

o_uRecvData:UW (8)

pbo_uReadTiming (9)

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be
executed.
Specify the module label of the modules.
(Example: GN11_SE_1)
(3) i_uConnectionNo Connection No. Word 1 to 16 Specify the number of the connection to which
[Unsigned]/ received data is to be read out.
Bit String • 1 to 8: Port 1, socket communications
[16-bit] • 9 to 16: Port 2, socket communications

■Output arguments
No. Variable name Name Data type Description Default
value
(4) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(5) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(6) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(7) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/Bit
String [16-bit]

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


4.14 M+model_Recv_Socket 167
No. Variable name Name Data type Description Default
value
(8) o_uRecvData Receive data storage Word Specify the start number of the device for storing the receive data 0
destination [Unsigned]/Bit length and received data. The data that has been read is stored
String [16-bit] sequentially in ascending order of addresses as shown below.
• 1st word: Receive data length (unit: byte)
• 2nd word (upper 8 bits): Receive data 1
• 2nd word (lower 8 bits): Receive data 2
• 3rd word (upper 8 bits): Receive data 3
• 3rd word (lower 8 bits): Receive data 4

• n(th) word (upper 8 bits): Receive data (n-1)2-1
• n(th) word (lower 8 bits): Receive data (n-1)2
The range of receive data length varies depending on the connection
No.
• Connection No.1 to No.8: 1 to 2046
• Connection No.9 to No.16: 1 to 10238
Receive data is stored in the word area in order from the first half (b0 to
b7) to the second half (b8 to b15).

■Operation parameters
No. Variable name Name Data Range Description Default
type value
(9) pbi_bReadTiming Read timing Bit On or off Specify the timing of executing data read processing. On
• Off: Start reading soon after the FB starts.
• On: Start reading in the first END processing after the FB
starts.

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


168 4.14 M+model_Recv_Socket
FB details
Item Description
Available device Target module RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 58 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to the GX Works3 Operating Manual.
Processing When i_bEN (execution command) is turned on, this function reads the received data to the connection specified by the input argument.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
4
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • The execution command of this FB can be executed at any timing. However, when executing it after receiving data, 'Socket reception
status signal' (Un\G6291472) must be added to conditions of the execution.
• This FB cannot be executed for the connection that is being used by another FB or a dedicated instruction. An error occurs if this FB is
executed for the connection in use.
• When the FB is executed while OFF (Start reading soon after the FB starts) is specified in operation parameter "Read timing",
processing completes in a single scan.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.

Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


4.14 M+model_Recv_Socket 169
4.15 M+model_Send_Socket

Name
M+RJ71GN11_SE_Send_Socket

Overview
Item Description
Overview Sends the data to the external device of the specified connection.
Symbol
M+RJ71GN11_SE_Send_Socket
(1) B:i_bEN o_bENO:B (5)
(2) DUT:i_stModule o_bOK:B (6)
(3) UW:i_uConnectionNo o_bErr:B (7)

(4) UW:i_uSendData o_uErrId:UW (8)

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be
executed.
Specify the module label of the modules.
(Example: GN11_SE_1)
(3) i_uConnectionNo Connection No. Word 1 to 16 Specify the number of the connection of an
[Unsigned]/ external device to which the data is to be sent.
Bit String • 1 to 8: Port 1, socket communications
[16-bit] • 9 to 16: Port 2, socket communications
(4) i_uSendData Send data storage Word  Specify the start number of the device containing
destination [Unsigned]/ the send data length and data to be sent.
Bit String • 1st word: Send data length (unit: byte)
[16-bit] • 2nd word (upper 8 bits): Send data 1
• 2nd word (lower 8 bits): Send data 2
• 3rd word (upper 8 bits): Send data 3
• 3rd word (lower 8 bits): Send data 4

• n(th) word (upper 8 bits): Send data (n-1)2-1
• n(th) word (lower 8 bits): Send data (n-1)2
The range of send data length varies depending
on the connection No.
• Connection No.1 to No.8: 1 to 2046
Connection No.9 to No.16: 1 to 10238

■Output arguments
No. Variable name Name Data type Description Default
value
(5) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(6) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(7) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(8) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/Bit
String [16-bit]

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


170 4.15 M+model_Send_Socket
FB details
Item Description
Available device Target module RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 41 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to the GX Works3 Operating Manual.
Processing When i_bEN (execution command) is turned on, this function sends the data to the external device of the connection specified by the input
argument.
FB compilation
method
Macro type
4
FB operation Pulse type (multiple-scan execution type)
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB cannot be executed for the connection that is being used by another FB or a dedicated instruction. An error occurs if this FB is
executed for the connection in use.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.

Error codes
Error code Reference
C000H to CFFFH  MELSEC iQ-R CC-Link IE TSN Plus Master/Local Module User's Manual

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


4.15 M+model_Send_Socket 171
4.16 M+model_Refresh_Data

Name
M+RJ71GN11_SE_Refresh_Data

Overview
Item Description
Overview Transfers the data from the buffer memory in the target module to the module label.
Symbol
M+RJ71GN11_SE_Refresh_Data
(1) B:i_bEN o_bENO:B (3)
(2) DUT:i_stModule

Labels
■Input arguments
No. Variable name Name Data Range Description
type
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structure  Specify the module for which the FB is to be
executed.
Specify the module label of the modules.
(Example: GN11_SE_1)

■Output arguments
No. Variable name Name Data type Description Default
value
(3) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


172 4.16 M+model_Refresh_Data
FB details
Item Description
Available device Target module RJ71GN11-EIP
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 44 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to the GX Works3 Operating Manual.
Processing When i_bEN (execution command) is turned on, this function transfers the following buffer memory data of the target module to the
module label.
• 'Open completion signal' (Un\G6291456)
• 'Open request signal' (Un\G6291464) 4
• 'Socket reception status signal' (Un\G6291472)
FB compilation Macro type
method
FB operation ON-time execution type
Timing chart of I/O
signals i_bEN

o_bENO

Precautions When another FB is used, write the program so that this FB is executed every scan, at the beginning of the program.

Error codes
This FB has no error code.

4 CC-Link IE TSN Plus MASTER/LOCAL MODULE FB


4.16 M+model_Refresh_Data 173
5 CC-Link IE Controller Network-EQUIPPED
MODULE FB
5.1 M+model_DeviceRead
The FB is the same as M+model_DeviceRead of the Ethernet-equipped module FB. ( Page 15 M+model_DeviceRead)

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


174 5.1 M+model_DeviceRead
5.2 M+model_DeviceWrite
The FB is the same as M+model_DeviceWrite of the Ethernet-equipped module FB. ( Page 20 M+model_DeviceWrite)

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


5.2 M+model_DeviceWrite 175
5.3 M+model_Send
The FB is the same as M+model_Send of the Ethernet-equipped module FB. ( Page 26 M+model_Send)

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


176 5.3 M+model_Send
5.4 M+model_Recv
The FB is the same as M+model_Recv of the Ethernet-equipped module FB. ( Page 32 M+model_Recv)

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


5.4 M+model_Recv 177
5.5 M+model_RemoteStopRun
The FB is the same as M+model_RemoteStopRun of the Ethernet-equipped module FB. ( Page 37
M+model_RemoteStopRun)

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


178 5.5 M+model_RemoteStopRun
5.6 M+model_ReadTime
The FB is the same as M+model_ReadTime of the Ethernet-equipped module FB. ( Page 42 M+model_ReadTime)

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


5.6 M+model_ReadTime 179
5.7 M+model_WriteTime
The FB is the same as M+model_WriteTime of the Ethernet-equipped module FB. ( Page 46 M+model_WriteTime)

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


180 5.7 M+model_WriteTime
5.8 M+model_StationNoSet

Name
■RJ71EN71, RnENCPU (network part)
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_C_StationNoSet RJ71EN71(CCIEC) _RJ71EN71(CCIEC)
M+RJ71EN71_EC_StationNoSet RJ71EN71(E+CCIEC) _RJ71EN71(E+IEC)
M+RJ71EN71_F_StationNoSet RJ71EN71(CCIEF) _RJ71EN71(CCIEF)
M+RJ71EN71_EF_StationNoSet RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RJ71GP21(S)-SX
M+RJ71GP21_StationNoSet 5
■RJ71GF11-T2
M+RJ71GF11_StationNoSet

Overview
Item Description
Overview Sets the station number of the own station.
Symbol
M+RJ71GP21_StationNoSet
(1) B: i_bEN o_bENO: B (4)
(2) DUT: i_stModule o_bOK: B (5)
(3) UW: i_uSetStationNo o_bErr: B (6)
o_uErrId: UW (7)

The above FB is an example for the RJ71GP21-SX.

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structures  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(Example: EN71_EE_1, EN71_EF_1, EN71_F_1, GF11_1, GP21_1)
(3) i_uSetStationNo Setting station Word 1 to 120 Specifies the station number to be set.
number [Unsigned]/
Bit String
[16-bit]

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


5.8 M+model_StationNoSet 181
■Output arguments
No. Variable name Name Data type Description Default
value
(4) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(5) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(6) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(7) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/
Bit String
[16-bit]

FB details
Item Description
Available device Target module • RJ71EN71
• RJ71GP21(S)-SX
• RJ71GF11-T2
• RnENCPU (network part)
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 44 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function sets the station number of the own station.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


182 5.8 M+model_StationNoSet
Item Description
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)


5
i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.UINI instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error codes
Error code Reference
D000H to DFFFH  MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
E000H to EFFFH  MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


5.8 M+model_StationNoSet 183
5.9 M+model_RedundantSystem_GetAddress

Name
■RJ71GP21(S)-SX
M+RJ71GP21_RedundantSystem_GetAddress

■RJ71GF11-T2
M+RJ71GF11_RedundantSystem_GetAddress

■RJ71LP21-25
M+RJ71LP21_RedundantSystem_GetAddress

Overview
Item Description
Overview Identifies the control system or standby system in the target (another station) redundant system and acquires the address of the control
system or standby system in the redundant system.
Symbol
M+RJ71GP21_RedundantSystem_GetAddress
(1) B: i_bEN o_bENO: B (5)
(2) DUT: i_stModule o_bOK: B (6)
(3) UW: i_u2SystemA_TargetAddress o_bErr: B (7)
(4) UW: i_u2SystemB_TargetAddress o_uErrId: UW (8)
o_u2TargetAddress: UW (9)

pbi_uTargetSystem_Type (10)

The above FB is an example for the RJ71GP21-SX.

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structures  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(3) i_u2SystemA_Target System A target Word  Specify the network number and station number of the system A target
Address station address [Unsigned]/ station.
Bit String • 1st word: Network number (1 to 239)
[16-bit] • 2nd word: Station number
(0..1) Network number
• Set the network number same as that of the FB executing station.
Station number of CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 1 to 120: Local station, submaster station
Station number of MELSECNET/H
• 1 to 64
(4) i_u2SystemB_Target System B target Word  Specify the network number and station number of the system B target
Address station address [Unsigned]/ station.
Bit String • 1st word: Network number (1 to 239)
[16-bit] • 2nd word: Station number
(0..1) Network number
• Set the network number same as that of the FB executing station.
Station number of CC-Link IE Controller Network
• 1 to 120
Station number of CC-Link IE Field Network
• 125: Master station
• 1 to 120: Local station, submaster station
Station number of MELSECNET/H
• 1 to 64

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


184 5.9 M+model_RedundantSystem_GetAddress
■Output arguments
No. Variable name Name Data type Description Default
value
(5) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(6) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(7) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(8) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/
Bit String
[16-bit]
(9) o_u2TargetAddress Target station Word The target station address of the current control system or standby system 0
address [Unsigned]/ in the target redundant system is stored.
Bit String • 1st word: Network number (1 to 239)
[16-bit] • 2nd word: Station number
(0..1) Network number
• The network number same as that of the FB executing station is stored.
Station number of CC-Link IE Controller Network
• 1 to 120
5
Station number of CC-Link IE Field Network
• 125: Master station
• 1 to 120: Local station, submaster station
Station number of MELSECNET/H
• 1 to 64

■Operation parameters
No. Variable name Name Data type Range Description Default
value
(10) pbi_uTargetSystem_T Target system type Word 0 to 1 Specify the type of the target system. 0
ype [Unsigned]/ • 0: Control system
Bit String • 1: Standby system
[16-bit]

FB details
Item Description
Available device Target module • RJ71GF11-T2*1
• RJ71GP21(S)-SX
• RJ71LP21-25
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic • RJ71GF11-T2: 425 steps
steps • RJ71GP21(S)-SX: 237 steps
• RJ71LP21-25: 237 steps
The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function identifies the control system or standby system in the target (another
station) redundant system and acquires the address of the control system or standby system in the redundant system.
This FB is used in combination with the following FBs.
• DeviceRead
• DeviceWrite
• Send
• RemoteStopRun
• ReadTime
• WriteTime
The procedure when this FB is used with DeviceRead is shown below. To execute DeviceRead to the control system in the redundant
system, execute DeviceRead to the target station address of the control system which is acquired by this FB.
 Specify the system A and system B target station addresses and execute this FB. (Specify the control system.)
 The target station address of the control system is output.
 Set the target station address of the control system to i_u2TargetAddress of DeviceRead and execute DeviceRead.
 DeviceRead is executed to the control system.
FB compilation Macro type
method
FB operation ON-time execution type

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


5.9 M+model_RedundantSystem_GetAddress 185
Item Description
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

o_u2TargetAddress 0H (1) 0H

(1) Target station address


• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

o_u2TargetAddress 0H

(1) Error code


Precautions • When using this FB, set "Module Label" for the refresh target device of SB and SW in "Refresh Setting" of "Basic Settings".
• This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB can be executed only for the redundant system of the same network number.
• This FB cannot be executed for redundant line configuration on CC-Link IE Field Network.
• This FB is enabled when 'Baton pass status of own station' (SB0047) is on.
• When the target station is the master station or submaster station, this FB cannot detect whether it is in a redundant system.
• Even when the station number which does not exist in the network configuration setting is specified, it may completed successfully.
• For "System A target station address" and "System B target station address", specify the addresses of the pairing-set stations. In CC-
Link IE Field Network, specify the addresses of the pairing-set stations or the combination of the master station and submaster station.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

*1 The supported firmware version is "12" or later.

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


186 5.9 M+model_RedundantSystem_GetAddress
Error codes
Error code Description Action
100H A value out of the range is set in a target station address of the Correct the range of the target station address.
argument.
101H The network number of the target station differs from that of the FB Set the network number same as that of the FB executing station.
executing station.
102H The same value is set in the system A and system B target station Set the different value in the system A and system B target
addresses of the argument. station addresses.
200H The target station (station of control system or standby system) does not Correct the network connection of the target station.
exist in a network.
201H The target station is not in a redundant system. Execute this FB to a redundant system.
202H "Module Label" is not selected for the refresh target device in "Refresh Set "Module Label" for the refresh target device in "Refresh
Setting" of "Basic Settings". setting" of "Basic Settings".

5 CC-Link IE Controller Network-EQUIPPED MODULE FB


5.9 M+model_RedundantSystem_GetAddress 187
6 CC-Link IE Field Network-EQUIPPED MASTER/
LOCAL MODULE FB
6.1 M+model_DeviceRead
The FB is the same as M+model_DeviceRead of the Ethernet-equipped module FB. ( Page 15 M+model_DeviceRead)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


188 6.1 M+model_DeviceRead
6.2 M+model_DeviceWrite
The FB is the same as M+model_DeviceWrite of the Ethernet-equipped module FB. ( Page 20 M+model_DeviceWrite)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.2 M+model_DeviceWrite 189
6.3 M+model_Send
The FB is the same as M+model_Send of the Ethernet-equipped module FB. ( Page 26 M+model_Send)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


190 6.3 M+model_Send
6.4 M+model_Recv
The FB is the same as M+model_Recv of the Ethernet-equipped module FB. ( Page 32 M+model_Recv)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.4 M+model_Recv 191
6.5 M+model_RemoteStopRun
The FB is the same as M+model_RemoteStopRun of the Ethernet-equipped module FB. ( Page 37
M+model_RemoteStopRun)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


192 6.5 M+model_RemoteStopRun
6.6 M+model_ReadTime
The FB is the same as M+model_ReadTime of the Ethernet-equipped module FB. ( Page 42 M+model_ReadTime)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.6 M+model_ReadTime 193
6.7 M+model_WriteTime
The FB is the same as M+model_WriteTime of the Ethernet-equipped module FB. ( Page 46 M+model_WriteTime)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


194 6.7 M+model_WriteTime
6.8 M+model_SetParameter

Name
■RJ71EN71, RnENCPU (network part)
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_F_SetParameter RJ71EN71(CCIEF) _RJ71EN71(CCIEF)
M+RJ71EN71_EF_SetParameter RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RJ71GF11-T2
M+RJ71GF11_SetParameter

Overview
Item Description
Overview Sets the parameters in the master, submaster, and local stations.
Symbol
6
M_RJ71GF11_SetParameter
(1) B: i_bEN o_bENO: B (7)
(2) DUT: i_stModule o_bOK: B (8)
(3) UW: i_uTotalStations o_bErr: B (9)
(4) UW: i_u605NetworkConfigurationSet o_uErrId: UW (10)
(5) UW: i_u8ReservedStationSet
(6) UW: i_u8ErrInvalidStationSet

pbi_uConstantLinkScanTime (11)
pbi_uIpAddress (12)
pbi_bNetworkConfigurationSetFlg (13)
pbi_bReservedStationSetFlg (14)
pbi_bErrInvalidStationSetFlg (15)
pbi_bSubMasterSet (16)
pbi_bIP_PacketTransferFlg (17)
pbi_bDatalinkFaultyStationSet (18)
pbi_bCPU_StopOutputSet (19)
pbi_bCPU_StopErrOutputSet (20)
pbi_bLinkScanModeSet (21)
pbi_bTopologySet (22)
pbi_bMasterReturnSet (23)
pbi_bSubMasterOperateParam (24)

The above FB is an example for the RJ71GF11-T2.

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.8 M+model_SetParameter 195
Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution Bit  On: Start FB.
command Off: Do not start FB.
(2) i_stModule Module label Structures  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(3) i_uTotalStations Total number of Word 1 to 120, Specify the total number of the slave stations connected.
slave stations [Unsigned]/ 121 • 1 to 120: Applicable when "Presence of submaster function" is off (disabled)
Bit String • 1 to 121: Applicable when "Presence of submaster function" is on (enabled)
[16-bit]
(4) i_u605NetworkCon Network Word  Specify the start address of the storage location of network configuration setting
figurationSet configuration [Unsigned]/ data.
setting data Bit String When specifying the address using a label, use an array as the data type.
[16-bit] Set data for the number of stations specified in "Total number of slave stations".
(0..604) ( Page 197 Network configuration setting data)
(5) i_u8ReservedStati Reserved station Word  Specify the start address of the storage location of the reserved-station setting
onSet setting data [Unsigned]/ data.
Bit String When specifying the address using a label, use an array as the data type.
[16-bit] Setting: Specify an error invalid station. (No default value)
(0..7) • 0: Not specified
• 1: Specified

b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0


+0 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
+1 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
+2 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
+3 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
+4 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65
+5 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81
+6 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97
+7 - 120 119 118 117 116 115 114 113

Numbers 1 to 120 in the table indicate station numbers.


(6) i_u8ErrInvalidStati Error invalid Word  Specify the start address of the storage location of the error invalid station
onSet station setting [Unsigned]/ setting.
data Bit String When specifying the address using a label, use an array as the data type.
[16-bit] Setting: Specify a reserved station.
(0..7) • 0: Not specified
• 1: Specified
If both an error invalid station and a reserved station are specified for the same
station, the reserved station will take priority.

b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0


+0 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
+1 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
+2 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
+3 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
+4 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65
+5 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81
+6 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97
+7 - 120 119 118 117 116 115 114 113

Numbers 1 to 120 in the table indicate station numbers.

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


196 6.8 M+model_SetParameter
■Network configuration setting data
Element Item name Range Description
number
0 For 1st Slave station setting  Specify the station type and number.
module information
b15 b12 b11 b8 b7 b0
(1) (2) (3)

(4) (5)

(1) Station type


(2) Fixed to 1
(3) Station number
(4) 0: Remote I/O station, 1: Remote device station, 2: Intelligent device station, 3:
Local station (master-slave system), 4: Submaster station, F: Master station
(5) 0: Master station, 1 to 120: Station number
1 RX/RY offset 0 to 16368 Specify the offset value from the head of RX/RY in increments of 16 points.
2 Number of RX/RY points  Specify the number of RX/RY points in increments of 16 points.
• Master station, local station: 0 to 2048
• Intelligent device station: 0 to 2048
• Remote I/O station: 0 to 64
• Remote device station: 0 to 128
3 RWr/RWw offset 0 to 8188 Specify the offset value from the head of RWr/RWw/LW in increments of 4 points.
4 Number of RWr/RWw  Specify the number of RWr/RWw points in increments of 16 points.
6
points • Master station, local station: 0 to 1024
• Intelligent device station: 0 to 1024
• Remote device station: 0 to 64
5 to 599 Setting for the 2nd to 120th module
600 For 121st Slave station setting Same as for the 1st module
module information
601 RX/RY offset
602 Number of RX/RY points
603 RWr/RWw offset
604 Number of RWr/RWw
points

If the specified total number of slave stations does not match the individual station setting data, the total number of individual
stations specified in the total number of slave stations take precedence and any individual station information exceeding the
total number of slave stations is ignored. Note that 1 is added to the total number of slave stations when "Presence of
submaster function" is on (enabled).
Example) When the station information of 10 stations is set even if the total number of slave stations is 2.
 The 1st and 2nd information is enabled and parameters which are set the 3rd to 10th station information are ignored.

■Output arguments
No. Variable name Name Data Description Default
type value
(7) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(8) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(9) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(10) o_uErrId Error code Word An error code is stored at error completion. 0
[unsigned]

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.8 M+model_SetParameter 197
■Operation parameters
: Can be set, : Cannot be set
No. Variable Name Data type Range Description Default Master Submaster Local
name value station station station
(11) pbi_uConstant Constant link Word 0, 1 to Specify the constant link scan time. 0  *1 
LinkScanTime scan time [Unsigned]/ 200 • 0: Not set (default value)
Bit String • 1 to 200: 1ms to 200ms
[16-bit]
(12) pbi_uIpAddres Upper 2 digits Word  Set the IP address when the IP packet 0  *1 
s of IP address [Unsigned]/ transfer function is used. Only the upper
Bit String two digits (1st and 2nd octets) of a 4-
[16-bit] digit IP address can be set. The 3rd and
4th digits are each determined
automatically from the network number
and station number (master station is
125).
(13) pbi_bNetwork Presence of Bit Off, on Specify whether to enable/disable the Off  *1 
Configuration network network configuration setting data.
SetFlg configuration • Off: Disable
setting data • On: Enable
(14) pbi_bReserve Presence of Bit Off, on Specify whether to enable/disable the Off  *1 
dStationSetFlg reserved reserved station specification data.
station • Off: Disable
specification • On: Enable
data
(15) pbi_bErrInvali Presence of Bit Off, on Specify whether to enable/disable the Off  *1 
dStationSetFlg error invalid error invalid station setting data.
station setting • Off: Disable
data • On: Enable
(16) pbi_bSubMast Presence of Bit Off, on Specify whether to use the submaster Off   
erSet submaster function
function • Off: Do not use.
• On: Use.
(17) pbi_bIP_Pack Presence of IP Bit Off, on Specify whether to enable/disable the IP Off  *1 
etTransferFlg packet address. (Specify whether to enable/
transfer disable the IP packet transfer function.)
function • Off: Disable
• On: Enable
(18) pbi_bDatalink Data link faulty Bit Off, on Specify whether to hold or clear the input Off   
FaultyStationS station setting data from a data link faulty station.
et • Off: Clear
• On: Hold
(19) pbi_bCPU_St Output setting Bit Off, on Specify whether to hold or clear the Off   
opOutputSet for CPU STOP output data when the operating status of
a CPU module is STOP.
• Off: Hold
• On: Clear
(20) pbi_bCPU_St Output setting Bit Off, on Specify whether to hold or clear the Off   
opErrOutputS for CPU stop output data when the a CPU module
et error caused a stop error.
• Off: Clear
• On: Hold
(21) pbi_bLinkScan Link scan Bit Off, on Specify whether to perform a link scan Off   
ModeSet mode setting and sequence scan synchronously or
asynchronously. (Valid when "Constant
link scan time" is 0 (no setting))
• Off: Asynchronous
• On: Synchronous
(22) pbi_bTopology Network Bit Off, on Specify the network topology. Off  *1 
Set topology • Off: Line topology, star topology, or
setting coexistence of star and line topologies
• On: Ring topology

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


198 6.8 M+model_SetParameter
No. Variable Name Data type Range Description Default Master Submaster Local
name value station station station
(23) pbi_bMasterR Master station Bit Off, on Specify the operation mode applicable Off   
eturnSet return time when the master station returns.
operation • Off: The master station returns as the
setting master operating station.
• On: The master station returns as the
submaster operating station.
(24) pbi_bSubMast Submaster Bit Off, on Specify which station parameters Off   
erOperatePar station (master or own station) should be used
am parameter for the submaster station to work.
operation • Off: The submaster station operates
setting with the parameters of the master
station.
• On: The submaster station operates
with the parameters of the own
(submaster) station.

*1 Valid only when "Submaster station parameter operation setting" is ON (Operating with the parameters of the own (submaster) station)

FB details
Item Description
Available device Target module • RJ71EN71
• RJ71GF11-T2
6
• RnENCPU (network part)
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 79 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution command) is turned on, this function sets parameters for a module.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.8 M+model_SetParameter 199
Item Description
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.CCPASET instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

Error codes
Error code Reference
D000H to DFFFH  MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


200 6.8 M+model_SetParameter
6.9 M+model_SetParameterRedundant

Name
M+RJ71GF11_SetParameterRedundant

Overview
Item Description
Overview Sets the parameters in the master station in the redundant system.
Symbol
M+RJ71GF11_SetParameterRedundant
(1) B: i_bEN o_bENO: B (8)
(2) DUT: i_stModule o_bOK: B (9)
(3) UW: i_uTotalStations o_bErr: B (10)
(4) UW: i_u605NetworkConfigurationSet o_uErrId: UW (11)
(5) UW: i_u8ReservedStationSet
(6) UW: i_u8ErrInvalidStationSet
(7) UW: i_u16RedundantSystemSet 6
pbi_uConstantLinkScanTime (12)
pbi_uIpAddress (13)
pbi_uMonitoringTime (14)
pbi_bNetworkConfigurationSetFlg (15)
pbi_bReservedStationSetFlg (16)
pbi_bErrInvalidStationSetFlg (17)
pbi_bRedundantSystemFlg (18)
pbi_bSubMaseterSet (19)
pbi_bIP_PacketTransferFlg (20)
pbi_bMonitoringTimeFlg (21)
pbi_bDatalinkFautlyStationSet (22)
pbi_bCPU_StopOutputSet (23)
pbi_bCPU_StopErrOutputSet (24)
pbi_bLinkScanModeSet (25)
pbi_bTopologySet (26)
pbi_bMasterReturnSet (27)
pbi_bSubMasterOperateParam (28)

Labels
■Input arguments
No. Variable Name Data type Range Description
name
(1) i_bEN Execution Bit  On: Start FB.
command Off: Do not start FB.
(2) i_stModule Module label Structures  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(3) i_uTotalStations Total number of Word [Unsigned]/ 1 to 120, 121 Specify the total number of the slave stations connected.
slave stations Bit String [16-bit] 1 to 120: Applicable when "Presence of submaster function" is off
(disabled)
1 to 121: Applicable when "Presence of submaster function" is on
(enabled)
(4) i_u605NetworkC Network Word [Unsigned]/  Specify the start address of the storage location of network configuration
onfigurationSet configuration Bit String [16-bit] setting data.
setting data (0..604) When specifying the address using a label, use an array as the data type.
Set data for the number of stations specified in "Total number of slave
stations". ( Page 203 Network configuration setting data)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.9 M+model_SetParameterRedundant 201
No. Variable Name Data type Range Description
name
(5) i_u8ReservedSt Reserved Word [Unsigned]/  Specify the start address of the storage location of the reserved-station
ationSet station setting Bit String [16-bit] setting data.
data (0..7) Setting: Specify a reserved station.
• 0: Not specified
• 1: Specified

b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0


+0 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
+1 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
+2 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
+3 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
+4 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65
+5 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81
+6 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97
+7 - 120 119 118 117 116 115 114 113

Numbers 1 to 120 in the table indicate station numbers.


(6) i_u8ErrInvalidSta Error invalid Word [Unsigned]/  Specify the start address of the storage location of the error invalid station
tionSet station setting Bit String [16-bit] setting.
data (0..7) Setting: Specify an error invalid station.
• 0: Not specified
• 1: Specified
If both an error invalid station and a reserved station are specified for the
same station, the reserved station will take priority.

b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0


+0 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
+1 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
+2 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
+3 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
+4 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65
+5 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81
+6 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97
+7 - 120 119 118 117 116 115 114 113

Numbers 1 to 120 in the table indicate station numbers.


(7) i_u16Redundant Redundant Word [Unsigned]/  ■Element number 0 to 7
SystemSet system setting Bit String [16-bit] Specify the system switching monitoring target station.
data (0..15) • 0: Not specified
• 1: Specified
If a system switching monitoring target station, an error invalid station,
and a reserved station are specified for the same station, the reserved
station will take priority.
If a system switching monitoring target station and an error invalid station
are specified for the same station, the error invalid station will take
priority.

b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0


+0 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
+1 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
+2 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
+3 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
+4 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65
+5 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81
+6 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97
+7 - 120 119 118 117 116 115 114 113

Numbers 1 to 120 in the table indicate station numbers.


■Element number 8 to 15
Fixed to 0

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


202 6.9 M+model_SetParameterRedundant
■Network configuration setting data
Element Item name Range Description
number
0 For 1st Slave station setting  Specify the station type and number.
module information
b15 b12 b11 b8 b7 b0
(1) (2) (3)

(4) (5)

(1) Station type


(2) Fixed to 1
(3) Station number
(4) 0: Remote I/O station, 1: Remote device station, 2: Intelligent device
station, 3: Local station (master-slave system), 4: Submaster station, 5:
Intelligent device station (redundant line), F: Master station
(5) 0: Master station, 1 to 120: Station number
1 RX/RY offset 0 to 16368 Specify the offset value from the head of RX/RY in increments of 16 points.
2 Number of RX/RY points 0 to 2048, 0 to Specify the number of RX/RY points in increments of 16 points.
64, 0 to 128 • Master station, local station: 0 to 2048
• Intelligent device station: 0 to 2048
• Remote I/O station: 0 to 64
• Remote device station: 0 to 128
3 RWr/RWw offset 0 to 8188 Specify the offset value from the head of RWr/RWw/LW in increments of 4 6
points.
4 Number of RWr/RWw points 0 to 1024, 0 to Specify the number of RWr/RWw points in increments of 4 points.
64 • Master station, local station: 0 to 1024
• Intelligent device station: 0 to 1024
• Remote device station: 0 to 64
5 to 599 Setting for the 2nd to 120th module
600 For 121st Slave station setting Same as for the 1st module
module information
601 RX/RY offset
602 Number of RX/RY points
603 RWr/RWw offset
604 Number of RWr/RWw points

If the specified total number of slave stations does not match the individual station setting data, the total number of individual
stations specified in the total number of slave stations take precedence and any individual station information exceeding the
total number of slave stations is ignored. Note that 1 is added to the total number of slave stations when "Presence of
submaster function" is on (enabled).

Ex.
When the station information of 10 stations is set even if the total number of slave stations is 2
The 1st and 2nd information is enabled and parameters which are set to the 3rd to 10th station information are ignored.

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.9 M+model_SetParameterRedundant 203
■Output arguments
No. Variable Name Data type Description Default value
name
(8) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(9) o_bOK Normal Bit The on state indicates that the module FB processing has been Off
completion completed successfully.
(10) o_bErr Error completion Bit The on state indicates that the module FB processing has been Off
completed with an error.
(11) o_uErrId Error code Word [Unsigned]/Bit An error code is stored at error completion. 0
String [16-bit]

■Operation parameters
: Can be set, : Cannot be set (for master station, submaster station, local station, redundant slave station)
No. Variable Name Data type Range Description Default Redundant Redundant line
name value master station
System System System System
A B A B
(12) pbi_uConstant Constant link Word 0, 1 to Specify the constant link scan 0    
LinkScanTime scan time [Unsigned]/ 200 time.
Bit String • 0: Not set (default value)
[16-bit] • 1 to 200: 1ms to 200ms
(13) pbi_uIpAddress Upper 2 Word  Set the IP address when the IP 0    
digits of IP [Unsigned]/ packet transfer function is used.
address Bit String Only the upper two digits (1st
[16-bit] and 2nd octets) of a 4-digit IP
address can be set. The 3rd and
4th digits are each determined
automatically from the network
number and station number
(master station is 125).
(14) pbi_uMonitorin System Word 5 to Set the system switching 2000    
gTime switching [Unsigned]/ 5000 monitoring time.
monitoring Bit String This parameter is enabled when
time [16-bit] the system switching monitoring
time setting is on (Enable).
(15) pbi_bNetworkC Presence of Bit Off, on Specify whether to enable/ Off    
onfigurationSet network disable the network
Flg configuration configuration setting data.
setting data • Off: Disable
• On: Enable
(16) pbi_bReserved Presence of Bit Off, on Specify whether to enable/ Off    
StationSetFlg reserved disable the reserved station
station specification data.
specification • Off: Disable
data • On: Enable
(17) pbi_bErrInvalid Presence of Bit Off, on Specify whether to enable/ Off    
StationSetFlg error invalid disable the error invalid station
station setting data.
setting data • Off: Disable
• On: Enable
(18) Pbi_bRedunda Presence of Bit Off, on Specify whether to enable/ Off    
ntSystemFlg redundant disable the redundant system
system setting data.
setting data • Off: Disable
• On: Enable
(19) pbi_bSubMaset Presence of Bit Off, on Specify whether to use the Off *1  *1 *1
erSet submaster submaster function
function • Off: Do not use.
• On: Use.
(20) pbi_bIP_Packe Presence of Bit Off, on Specify whether to enable/ Off    
tTransferFlg IP packet disable the IP packet transfer
transfer function.
function • Off: Disable
• On: Enable

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


204 6.9 M+model_SetParameterRedundant
No. Variable Name Data type Range Description Default Redundant Redundant line
name value master station
System System System System
A B A B
(21) pbi_bMonitorin System Bit Off, on Specify whether to use the Off    
gTimeFlg switching system switching monitoring
monitoring time setting.
time setting • Off: Disable
• On: Enable
(22) pbi_bDatalinkF Data link Bit Off, on Specify whether to hold or clear Off    
autlyStationSet faulty station the input data from a data link
setting faulty station.
• Off: Clear
• On: Hold
(23) pbi_bCPU_Sto Output Bit Off, on Specify whether to hold or clear Off    
pOutputSet setting for the output data when the
CPU STOP operating status of a CPU
module is STOP.
• Off: Hold
• On: Clear
(24) pbi_bCPU_Sto Output Bit Off, on Specify whether to hold or clear Off    
pErrOutputSet setting for the output data when the a CPU
CPU stop
error
module caused a stop error.
• Off: Clear
6
• On: Hold
(25) pbi_bLinkScan Link scan Bit Off, on Specify whether to perform a link Off    
ModeSet mode setting scan and sequence scan
synchronously or
asynchronously. (Valid when
"Constant link scan time" is 0 (no
setting))
• Off: Asynchronous
• On: Synchronous
(26) pbi_bTopology Network Bit Off, on Specify the network topology. Off    
Set topology • Off: Line topology, star
setting topology, or coexistence of
star and line topologies
• On: Ring topology
(27) pbi_bMasterRe Master Bit Off, on Specify the operation mode Off *2  *2 *2
turnSet station return applicable when the master
time station returns.
operation • Off: The master station returns
setting as the master operating
station.
• On: The master station returns
as the submaster operating
station.
(28) pbi_bSubMaste Submaster Bit Off, on Specify which station Off *3  *3 *3
rOperateParam station parameters (master or own
parameter station) should be used for the
operation submaster station to work.
setting • Off: The submaster station
operates with the parameters
of the master station.
• On: The submaster station
operates with the parameters
of the own (submaster)
station.

*1 For the redundant master station, the parameter is fixed to on (use). For the redundant line, the parameter is fixed to off (not use).
*2 For the redundant master station, the parameter is fixed to on (returning as the submaster operating station). For the redundant line, the
parameter is fixed to off (returning as the master operating station).
*3 These parameters are fixed to on (operating with the parameters of the own (submaster) station).

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.9 M+model_SetParameterRedundant 205
FB details
Item Description
Available device Target module RJ71GF11-T2*1
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic steps 84 steps
The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the
option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution command) is turned on, this function sets parameters for a module.
FB compilation method Macro type
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system
and required operations.
• This FB uses the GP.CCPASETR instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off
i_bEN (execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is
cleared to 0.

*1 The supported firmware version is "59" or later.

Error codes
Error code Reference
D000H to DFFFH  MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


206 6.9 M+model_SetParameterRedundant
6.10 M+model_StationNoSet
The FB is the same as M+model_StationNoSet of the CC-Link IE Controller Network-equipped module FB. ( Page 181
M+model_StationNoSet)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.10 M+model_StationNoSet 207
6.11 M+model_RedundantSystem_GetAddress
The FB is the same as M+model_RedundantSystem_GetAddress of the CC-Link IE Controller Network-equipped module FB.
( Page 184 M+model_RedundantSystem_GetAddress)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


208 6.11 M+model_RedundantSystem_GetAddress
6.12 M+model_ReadSystemTypeInformation

Name
■RJ71EN71, RnENCPU (network part)
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_F_ReadSystemTypeInformation RJ71EN71(CCIEF) _RJ71EN71(CCIEF)
M+RJ71EN71_EF_ReadSystemTypeInformation RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RJ71GF11-T2
M+RJ71GF11_ReadSystemTypeInformation

Overview
Item Description
Overview Reads the system configuration model information of the intelligent device station (remote head module).
Symbol
6
M+RJ71GF11_ReadSystemTypeInformation
(1) B: i_bEN o_bENO: B (5)
(2) DUT: i_stModule o_bOK: B (6)
(3) UW: i_u2TargetAddress o_bErr: B (7)
(4) UW: i_uChannel o_uErrId: UW (8)

o_uUnitTypeData: UW (9)

pbi_uResendCountMax (10)
pbi_uTimeUnit (11)
pbi_uMonitorTime (12)
pbo_uResendCount (13)
pbo_u4ErrTime (14)
pbo_uErrNetworkNo (15)
pbo_uErrStationNo (16)

The above FB is an example for the RJ71GF11-T2.

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structures  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(3) i_u2TargetAddress Target station Word  Specifies the station number of the target station.
address [Unsigned]/ • 1st word: Network number
Bit String • 2nd word: Station number
[16-bit] (1) 0 (The setting is ignored.)
(0..1) (2) Station number
• 1 to 120: Intelligent device station (remote head module)
(4) i_uChannel Own station channel Word  Specify the channel to be used by the own station.
[Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
Bit String
[16-bit]

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.12 M+model_ReadSystemTypeInformation 209
■Output arguments
No. Variable name Name Data type Description Default
value
(5) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(6) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(7) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(8) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/
Bit String
[16-bit]
(9) o_uUnitTypeData Model data storage Word The start number of the device for storing model data is stored. 0
device [Unsigned]/ The following cannot be specified as an argument. Specifying any of the
Bit String following may cause a CPU error (2820H: Device/label/buffer memory
[16-bit] specification incorrect).
• Dynamically specified array elements (Example: wLabel[D0])
• Digit-specified labels (Example: K4bLabel)
• Indirectly specified devices (Example: @W0)
• Local devices (Example: #D0)

■Operation parameters
No. Variable name Name Data type Range Description Default
value
(10) pbi_uResendCountM Maximum number of Word 0 to 15 Specify the number of resends to be performed if the data 5
ax resends [Unsigned]/ transfer is not completed within the monitoring time
Bit String specified by "Arrival monitoring time".
[16-bit] • 0 to 15
(11) pbi_uTimeUnit Arrival monitoring Word 0, 1 Specify the unit of the "Arrival monitoring time". 0
time unit [Unsigned]/ • 0: 1s
Bit String • 1: 100ms
[16-bit]
(12) pbi_uMonitorTime Arrival monitoring Word  Specify the monitoring time until completion of processing. 0: 10s
time [Unsigned]/ If the processing is not completed within the monitoring
Bit String time, data is resent until the value specified in "Maximum
[16-bit] number of resends" is reached.
When "Arrival monitoring time unit" is set to 1s
• Effective range 1 to 32767: 1s to 32767s
When "Arrival monitoring time unit" is set to 100ms
• Effective range 1 to 65535: 1 to 65535  100ms

■Public variables
No. Variable name Name Data type Description Default
value
(13) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit]
(14) pbo_u4ErrTime Error occurrence time Word [Unsigned]/Bit Clock data at the time of error occurrence is stored. 0
String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(15) pbo_uErrNetworkNo Error detection Word [Unsigned]/Bit The network number of the station in which an error was 0
network number String [16-bit] detected is stored.
(16) pbo_uErrStationNo Error-detected station Word [Unsigned]/Bit The station number of the station in which an error was 0
number String [16-bit] detected is stored.
• 125: Master station
• 1 to 120: Local station, intelligent device station, submaster
station

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


210 6.12 M+model_ReadSystemTypeInformation
FB details
Item Description
Available device Target module • RJ71EN71*1
• RJ71GF11-T2*1
• RnENCPU (network part)*1
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 79 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function reads the model information of the system configuration module of the
intelligent device station (remote head module).
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals 6
i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.SINFTYRD instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 212 Error codes appears, the initial label value files
by each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.12 M+model_ReadSystemTypeInformation 211
*1 The supported firmware version is "12" or later.

Error codes
Error code Reference
D000H to DFFFH  MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


212 6.12 M+model_ReadSystemTypeInformation
6.13 M+model_ReadSystemStatusInformation

Name
■RJ71EN71, RnENCPU (network part)
This FB is displayed as follows on the engineering tool depending on the settings.
Name Module model name
RJ71EN71 RnENCPU (network part)
M+RJ71EN71_F_ReadSystemStatusInformation RJ71EN71(CCIEF) _RJ71EN71(CCIEF)
M+RJ71EN71_EF_ReadSystemStatusInformation RJ71EN71(E+CCIEF) _RJ71EN71(E+IEF)

■RJ71GF11-T2
M+RJ71GF11_ReadSystemStatusInformation

Overview
Item Description
Overview Reads the system configuration model status of the intelligent device station (remote head module).
Symbol
6
M+RJ71GF11_ReadSystemStatusInformation
(1) B: i_bEN o_bENO: B (5)
(2) DUT: i_stModule o_bOK: B (6)
(3) UW: i_u2TargetAddress o_bErr: B (7)
(4) UW: i_uChannel o_uErrId: UW (8)

o_uUnitStatusData: UW (9)

pbi_uResendCountMax (10)
pbi_uTimeUnit (11)
pbi_uMonitorTime (12)
pbo_uResendCount (13)
pbo_u4ErrTime (14)
pbo_uErrNetworkNo (15)
pbo_uErrStationNo (16)

The above FB is an example for the RJ71GF11-T2.

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structures  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(3) i_u2TargetAddress Target station Word  Specifies the station number of the target station.
address [Unsigned]/ • 1st word: Network number
Bit String • 2nd word: Station number
[16-bit] (1) 0 (The setting is ignored.)
(0..1) (2) Station number
• 1 to 120: Intelligent device station (remote head module)
(4) i_uChannel Own station channel Word  Specify the channel to be used by the own station.
[Unsigned]/  MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
Bit String
[16-bit]

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.13 M+model_ReadSystemStatusInformation 213
■Output arguments
No. Variable name Name Data type Description Default
value
(5) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(6) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(7) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(8) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/
Bit String
[16-bit]
(9) o_uUnitStatusData Module status data Word The start number of the device for storing module status data is stored. 0
storage device [Unsigned]/ The following cannot be specified as an argument. Specifying any of the
Bit String following may cause a CPU error (2820H: Device/label/buffer memory
[16-bit] specification incorrect).
• Dynamically specified array elements (Example: wLabel[D0])
• Digit-specified labels (Example: K4bLabel)
• Indirectly specified devices (Example: @W0)
• Local devices (Example: #D0)

■Operation parameters
No. Variable name Name Data type Range Description Default
value
(10) pbi_uResendCountM Maximum number of Word 0 to 15 Specify the number of resends to be performed if the data 5
ax resends [Unsigned]/ transfer is not completed within the monitoring time
Bit String specified by "Arrival monitoring time".
[16-bit] • 0 to 15
(11) pbi_uTimeUnit Arrival monitoring Word 0, 1 Specify the unit of the "Arrival monitoring time". 0
time unit [Unsigned]/ • 0: 1s
Bit String • 1: 100ms
[16-bit]
(12) pbi_uMonitorTime Arrival monitoring Word  Specify the monitoring time until completion of processing. 0: 10s
time [Unsigned]/ If the processing is not completed within the monitoring
Bit String time, data is resent until the value specified in "Maximum
[16-bit] number of resends" is reached.
When "Arrival monitoring time unit" is set to 1s
• Effective range 1 to 32767: 1s to 32767s
When "Arrival monitoring time unit" is set to 100ms
• Effective range 1 to 65535: 1 to 65535  100ms

■Public variables
No. Variable name Name Data type Description Default
value
(13) pbo_uResendCount Number of resends Word [Unsigned]/Bit The number of resends performed (result) is stored. 0
String [16-bit]
(14) pbo_u4ErrTime Error occurrence time Word [Unsigned]/Bit Clock data at the time of error occurrence is stored. 0
String [16-bit] (0..3) 1st word
• Upper 8 bits: Month (01H to 12H)
• Lower 8 bits: Lower 2 digits of year (00H to 99H)
2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(15) pbo_uErrNetworkNo Error detection Word [Unsigned]/Bit The network number of the station in which an error was 0
network number String [16-bit] detected is stored.
(16) pbo_uErrStationNo Error-detected station Word [Unsigned]/Bit The station number of the station in which an error was 0
number String [16-bit] detected is stored.
• 125: Master station
• 1 to 120: Local station, intelligent device station, submaster
station

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


214 6.13 M+model_ReadSystemStatusInformation
FB details
Item Description
Available device Target module • RJ71EN71*1
• RJ71GF11-T2*1
• RnENCPU (network part)*1
CPU module RCPU
Engineering tool GX Works3
Language Ladder diagram
Number of basic 79 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function reads the status information of the system configuration module of the
intelligent device station (remote head module).
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN
Timing chart of I/O • For normal completion
signals 6
i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.SINFSTRD instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• This FB uses the label initial value by each program. When the program file using this FB is specified to boot file setting for the boot
operation in the CPU module, specify the initial label value file by each program to the boot file setting as well. ( MELSEC iQ-R CPU
Module User's Manual (Application)) If an error code that is not described in Page 216 Error codes appears, the initial label value files
by each program may not be set to the boot file setting. In this case, specify the initial label value files by each program to the boot file
setting.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.13 M+model_ReadSystemStatusInformation 215
*1 The supported firmware version is "12" or later.

Error codes
Error code Reference
D000H to DFFFH  MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


216 6.13 M+model_ReadSystemStatusInformation
6.14 M+model_RemoteReset

Name
■RJ71EN71, RnENCPU (network part)
M+RJ71EN71_RemoteReset

■RJ71GF11-T2
M+RJ71GF11_RemoteReset

Overview
Item Description
Overview Sends a remote STOP request to the target station and then sends a remote RESET request.
Symbol
M+RJ71GF11_RemoteReset
(1) B: i_bEN o_bENO: B (5)
(2) DUT: i_stModule o_bOK: B (6)
(3)
6
UW: i_uTargetNetworkNo o_bErr: B (7)
(4) UW: i_uTargetStationNo o_uErrId: UW (8)

pbo_u4ErrTime (9)
pbo_uErrNetworkNo (10)
pbo_uErrStationNo (11)

The above FB is an example for the RJ71GF11-T2.

Labels
■Input arguments
No. Variable name Name Data type Range Description
(1) i_bEN Execution command Bit  On: Start FB.
Off: Do not start FB.
(2) i_stModule Module label Structures  Specify the module for which the FB is to be executed.
Specify the module label of the modules.
(3) i_uTargetNetworkNo Target network Word 1 to 239 Specify the network number of the target station.
number [Unsigned]/
Bit String
[16-bit]
(4) i_uTargetStationNo Target station Word  Specifies the station number of the target station.
number [Unsigned]/ • 125: Master station
Bit String • 126: Master operating station
[16-bit] • 1 to 120: Local station, intelligent device station, remote device station,
submaster station

■Output arguments
No. Variable name Name Data type Description Default
value
(5) o_bENO Execution status Bit On: The execution command is turned on. Off
Off: The execution command is turned off.
(6) o_bOK Normal completion Bit The FB has been processed normally when this argument is on. Off
(7) o_bErr Error completion Bit The FB has been processed abnormally when this argument is on. Off
(8) o_uErrId Error code Word An error code is stored at error completion. 0
[Unsigned]/
Bit String
[16-bit]

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.14 M+model_RemoteReset 217
■Public variables
No. Variable name Name Data type Description Default
value
(9) pbo_u4ErrTime Error occurrence Word Clock data at the time of error occurrence is stored. 0
time [Unsigned]/ 1st word
Bit String • Upper 8 bits: Month (01H to 12H)
[16-bit] • Lower 8 bits: Lower 2 digits of year (00H to 99H)
(0..3) 2nd word
• Upper 8 bits: Hour (00H to 23H)
• Lower 8 bits: Day (01H to 31H)
3rd word
• Upper 8 bits: Second (00H to 59H)
• Lower 8 bits: Minute (00H to 59H)
4th word
• Upper 8 bits: Upper 2 digits of year (00H to 99H)
• Lower 8 bits: Day of week (00H (Sunday) to 06H (Saturday))
(10) pbo_uErrNetworkNo Error detection Word The network number of the station in which an error was detected is 0
network number [Unsigned]/ stored.
Bit String
[16-bit]
(11) pbo_uErrStationNo Error-detected Word The station number of the station in which an error was detected is stored. 0
station number [Unsigned]/ • 125: Master station
Bit String • 126: Master operating station
[16-bit] • 1 to 120: Local station, intelligent device station, remote device station,
submaster station

FB details
Item Description
Available device Target module • RJ71EN71*1
• RJ71GF11-T2*1
• RnENCPU (network part)*1
CPU module RCPU
Engineering tool GX Works3*2
Language Ladder diagram
Number of basic 150 steps
steps The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and the option
settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Processing When i_bEN (execution instruction) is turned on, this function sends a remote STOP request to the target station and then sends a remote
RESET request.
FB compilation Macro type
method
FB operation Pulse type (multiple-scan execution type)
Input condition for None
FB_EN

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


218 6.14 M+model_RemoteReset
Item Description
Timing chart of I/O • For normal completion
signals

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId 0H

• For error completion (same as in the case of a module error)

i_bEN

o_bENO 6
o_bOK

o_bErr

o_uErrId 0H (1) 0H

(1) Error code


Precautions • This FB does not include error recovery processing. Please create error recovery processing separately according to the system and
required operations.
• This FB uses the GP.SLMPREQ instruction.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) is turned on. By turning off i_bEN
(execution command), o_bOK (normal completion) or o_bErr (error completion) is turned off and o_uErrId (error code) is cleared to 0.
• When the remote RESET request is sent and completed successfully, o_bOK (normal completion) is turned on. Whether the target
station is actually reset remotely or not depends on the target station status.
• In this FB, stations in other network cannot be set as the target station.
• When this FB is executed, an operation error may occur in the programmable controller CPU. In this case, check the detailed
information of the operation error in event history and correct the input argument of the module FB.

*1 The supported firmware version is "18" or later.


*2 The supported version is "1.035M" or later.

Error codes
Error code Reference
D000H to DFFFH  MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)

6 CC-Link IE Field Network-EQUIPPED MASTER/LOCAL MODULE FB


6.14 M+model_RemoteReset 219
7 MELSECNET/H NETWORK MODULE FB

7.1 M+model_DeviceRead
The FB is the same as M+model_DeviceRead of the Ethernet-equipped module FB. ( Page 15 M+model_DeviceRead)

7 MELSECNET/H NETWORK MODULE FB


220 7.1 M+model_DeviceRead
7.2 M+model_DeviceWrite
The FB is the same as M+model_DeviceWrite of the Ethernet-equipped module FB. ( Page 20 M+model_DeviceWrite)

7 MELSECNET/H NETWORK MODULE FB


7.2 M+model_DeviceWrite 221
7.3 M+model_Send
The FB is the same as M+model_Send of the Ethernet-equipped module FB. ( Page 26 M+model_Send)

7 MELSECNET/H NETWORK MODULE FB


222 7.3 M+model_Send
7.4 M+model_Recv
The FB is the same as M+model_Recv of the Ethernet-equipped module FB. ( Page 32 M+model_Recv)

7 MELSECNET/H NETWORK MODULE FB


7.4 M+model_Recv 223
7.5 M+model_RemoteStopRun
The FB is the same as M+model_RemoteStopRun of the Ethernet-equipped module FB. ( Page 37
M+model_RemoteStopRun)

7 MELSECNET/H NETWORK MODULE FB


224 7.5 M+model_RemoteStopRun
7.6 M+model_ReadTime
The FB is the same as M+model_ReadTime of the Ethernet-equipped module FB. ( Page 42 M+model_ReadTime)

7 MELSECNET/H NETWORK MODULE FB


7.6 M+model_ReadTime 225
7.7 M+model_WriteTime
The FB is the same as M+model_WriteTime of the Ethernet-equipped module FB. ( Page 46 M+model_WriteTime)

7 MELSECNET/H NETWORK MODULE FB


226 7.7 M+model_WriteTime
7.8 M+model_RedundantSystem_GetAddress
The FB is the same as M+model_RedundantSystem_GetAddress of the CC-Link IE Controller Network-equipped module FB.
( Page 184 M+model_RedundantSystem_GetAddress)

7 MELSECNET/H NETWORK MODULE FB


7.8 M+model_RedundantSystem_GetAddress 227
MEMO

7 MELSECNET/H NETWORK MODULE FB


228 7.8 M+model_RedundantSystem_GetAddress
INSTRUCTION INDEX

M M+RJ71EN71_EF_Send_Socket . . . . . . . . . . . . .62
M+RJ71EN71_EF_SetParameter . . . . . . . . . . . .195
M+RCPU_ConnectionClose . . . . . . . . . . . . . . . . 56 M+RJ71EN71_EF_StationNoSet . . . . . . . . . . . .181
M+RCPU_ConnectionOpen . . . . . . . . . . . . . . . . 51 M+RJ71EN71_EF_WriteTime . . . . . . . . . . . . . . .46
M+RCPU_Recv_Socket . . . . . . . . . . . . . . . . . . 59 M+RJ71EN71_F_DeviceRead . . . . . . . . . . . . . . . 15
M+RCPU_Send_Socket . . . . . . . . . . . . . . . . . . 62 M+RJ71EN71_F_DeviceWrite . . . . . . . . . . . . . . . 20
M+RCPU_SLMP_DeviceRead_IP . . . . . . . . . . . 67 M+RJ71EN71_F_ReadSystemStatusInformation
M+RCPU_SLMP_DeviceWrite_IP . . . . . . . . . . . . 73 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213
M+RJ71BR11_DeviceRead . . . . . . . . . . . . . . . . 15 M+RJ71EN71_F_ReadSystemTypeInformation . .209
M+RJ71BR11_DeviceWrite . . . . . . . . . . . . . . . . 20 M+RJ71EN71_F_ReadTime . . . . . . . . . . . . . . . .42
M+RJ71BR11_ReadTime . . . . . . . . . . . . . . . . . 42 M+RJ71EN71_F_Recv . . . . . . . . . . . . . . . . . . . .32
M+RJ71BR11_Recv . . . . . . . . . . . . . . . . . . . . . 32 M+RJ71EN71_F_RemoteStopRun . . . . . . . . . . . .37
M+RJ71BR11_RemoteStopRun . . . . . . . . . . . . . 37 M+RJ71EN71_F_Send . . . . . . . . . . . . . . . . . . . .26
M+RJ71BR11_Send . . . . . . . . . . . . . . . . . . . . . 26 M+RJ71EN71_F_SetParameter . . . . . . . . . . . . .195
M+RJ71BR11_WriteTime . . . . . . . . . . . . . . . . . 46 M+RJ71EN71_F_StationNoSet . . . . . . . . . . . . .181
M+RJ71EN71_C_DeviceRead . . . . . . . . . . . . . . 15 M+RJ71EN71_F_WriteTime . . . . . . . . . . . . . . . .46
M+RJ71EN71_C_DeviceWrite . . . . . . . . . . . . . . 20 M+RJ71EN71_RemoteReset . . . . . . . . . . . . . . .217
M+RJ71EN71_C_ReadTime . . . . . . . . . . . . . . . 42 M+RJ71GF11_DeviceRead . . . . . . . . . . . . . . . . .15
M+RJ71EN71_C_Recv . . . . . . . . . . . . . . . . . . . 32 M+RJ71GF11_DeviceWrite . . . . . . . . . . . . . . . . .20
M+RJ71EN71_C_RemoteStopRun . . . . . . . . . . . 37 M+RJ71GF11_ReadSystemStatusInformation . . .213
M+RJ71EN71_C_Send . . . . . . . . . . . . . . . . . . . 26 M+RJ71GF11_ReadSystemTypeInformation . . . .209
M+RJ71EN71_C_StationNoSet . . . . . . . . . . . . 181 M+RJ71GF11_ReadTime . . . . . . . . . . . . . . . . . .42
M+RJ71EN71_C_WriteTime . . . . . . . . . . . . . . . 46 M+RJ71GF11_Recv . . . . . . . . . . . . . . . . . . . . . .32
M+RJ71EN71_EC_ConnectionClose . . . . . . . . . 56 M+RJ71GF11_RedundantSystem_GetAddress . .184
M+RJ71EN71_EC_ConnectionOpen . . . . . . . . . 51 M+RJ71GF11_RemoteReset . . . . . . . . . . . . . . .217
M+RJ71EN71_EC_DeviceRead . . . . . . . . . . . . . 15 M+RJ71GF11_RemoteStopRun . . . . . . . . . . . . . .37
M+RJ71EN71_EC_DeviceWrite . . . . . . . . . . . . . 20 M+RJ71GF11_Send . . . . . . . . . . . . . . . . . . . . . .26
M+RJ71EN71_EC_ReadTime . . . . . . . . . . . . . . 42 M+RJ71GF11_SetParameter . . . . . . . . . . . . . . .195
M+RJ71EN71_EC_Recv . . . . . . . . . . . . . . . . . . 32 M+RJ71GF11_SetParameterRedundant . . . . . . .201
M+RJ71EN71_EC_Recv_Socket . . . . . . . . . . . . 59 M+RJ71GF11_StationNoSet . . . . . . . . . . . . . . .181
M+RJ71EN71_EC_Refresh_Data . . . . . . . . . . . . 65 M+RJ71GF11_WriteTime . . . . . . . . . . . . . . . . . .46
M+RJ71EN71_EC_RemoteStopRun . . . . . . . . . . 37 M+RJ71GN11_DeviceRead . . . . . . . . . . . . . . . . .79
M+RJ71EN71_EC_Send . . . . . . . . . . . . . . . . . . 26 M+RJ71GN11_DeviceWrite . . . . . . . . . . . . . . . . .84
M+RJ71EN71_EC_Send_Socket . . . . . . . . . . . . 62
M+RJ71EN71_EC_StationNoSet . . . . . . . . . . . 181
M+RJ71GN11_Recv . . . . . . . . . . . . . . . . . . . . . .97
M+RJ71GN11_RemoteRead . . . . . . . . . . . . . . .132
I
M+RJ71EN71_EC_WriteTime . . . . . . . . . . . . . . 46 M+RJ71GN11_RemoteReset2_IP . . . . . . . . . . .147
M+RJ71EN71_EE_ConnectionClose . . . . . . . . . 56 M+RJ71GN11_RemoteReset_IP . . . . . . . . . . . .142
M+RJ71EN71_EE_ConnectionOpen . . . . . . . . . . 51 M+RJ71GN11_RemoteStopRun . . . . . . . . . . . .102
M+RJ71EN71_EE_DeviceRead . . . . . . . . . . . . . 15 M+RJ71GN11_RemoteWrite . . . . . . . . . . . . . . .137
M+RJ71EN71_EE_DeviceWrite . . . . . . . . . . . . . 20 M+RJ71GN11_SE_ConnectionClose . . . . . . . . .165
M+RJ71EN71_EE_ReadTime . . . . . . . . . . . . . . 42 M+RJ71GN11_SE_ConnectionOpen . . . . . . . . .162
M+RJ71EN71_EE_Recv . . . . . . . . . . . . . . . . . . 32 M+RJ71GN11_SE_DeviceRead . . . . . . . . . . . . . .79
M+RJ71EN71_EE_Recv_Socket . . . . . . . . . . . . 59 M+RJ71GN11_SE_DeviceWrite . . . . . . . . . . . . . .84
M+RJ71EN71_EE_Refresh_Data . . . . . . . . . . . . 65 M+RJ71GN11_Send . . . . . . . . . . . . . . . . . . . . . .91
M+RJ71EN71_EE_RemoteStopRun . . . . . . . . . . 37 M+RJ71GN11_SE_Recv . . . . . . . . . . . . . . . . . . .97
M+RJ71EN71_EE_Send . . . . . . . . . . . . . . . . . . 26 M+RJ71GN11_SE_Recv_Socket . . . . . . . . . . . .167
M+RJ71EN71_EE_Send_Socket . . . . . . . . . . . . 62 M+RJ71GN11_SE_Refresh_Data . . . . . . . . . . .172
M+RJ71EN71_EE_WriteTime . . . . . . . . . . . . . . 46 M+RJ71GN11_SE_RemoteRead . . . . . . . . . . . .132
M+RJ71EN71_EF_ConnectionClose . . . . . . . . . 56 M+RJ71GN11_SE_RemoteReset2_IP . . . . . . . .147
M+RJ71EN71_EF_ConnectionOpen . . . . . . . . . . 51 M+RJ71GN11_SE_RemoteReset_IP . . . . . . . . .142
M+RJ71EN71_EF_DeviceRead . . . . . . . . . . . . . 15 M+RJ71GN11_SE_RemoteStopRun . . . . . . . . .102
M+RJ71EN71_EF_DeviceWrite . . . . . . . . . . . . . 20 M+RJ71GN11_SE_RemoteWrite . . . . . . . . . . . .137
M+RJ71EN71_EF_ReadSystemStatusInformation M+RJ71GN11_SE_Send . . . . . . . . . . . . . . . . . . .91
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 M+RJ71GN11_SE_Send_Socket . . . . . . . . . . . .170
M+RJ71EN71_EF_ReadSystemTypeInformation M+RJ71GN11_SE_SLMP_DeviceRead_IP . . . . .108
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 M+RJ71GN11_SE_SLMP_DeviceWrite_IP . . . . .115
M+RJ71EN71_EF_ReadTime . . . . . . . . . . . . . . 42 M+RJ71GN11_SetAddress . . . . . . . . . . . . . . . .122
M+RJ71EN71_EF_Recv . . . . . . . . . . . . . . . . . . 32 M+RJ71GN11_SetParameterX . . . . . . . . . . . . .125
M+RJ71EN71_EF_Recv_Socket . . . . . . . . . . . . 59 M+RJ71GN11_SLMP_DeviceRead_IP . . . . . . . .108
M+RJ71EN71_EF_Refresh_Data . . . . . . . . . . . . 65 M+RJ71GN11_SLMP_DeviceWrite_IP . . . . . . . .115
M+RJ71EN71_EF_RemoteStopRun . . . . . . . . . . 37 M+RJ71GN11_SX_DeviceRead . . . . . . . . . . . . . .79
M+RJ71EN71_EF_Send . . . . . . . . . . . . . . . . . . 26 M+RJ71GN11_SX_DeviceWrite . . . . . . . . . . . . . .84

229
M+RJ71GN11_SX_Recv . . . . . . . . . . . . . . . . . . 97
M+RJ71GN11_SX_RemoteReset2_IP . . . . . . . 147
M+RJ71GN11_SX_RemoteReset_IP . . . . . . . . 142
M+RJ71GN11_SX_RemoteStopRun . . . . . . . . . 102
M+RJ71GN11_SX_Send . . . . . . . . . . . . . . . . . . 91
M+RJ71GN11_SX_SetAddress . . . . . . . . . . . . 122
M+RJ71GN11_SX_SLMP_DeviceRead_IP . . . . 108
M+RJ71GN11_SX_SLMP_DeviceWrite_IP . . . . 115
M+RJ71GP21_DeviceRead . . . . . . . . . . . . . . . . 15
M+RJ71GP21_DeviceWrite . . . . . . . . . . . . . . . . 20
M+RJ71GP21_ReadTime . . . . . . . . . . . . . . . . . 42
M+RJ71GP21_Recv . . . . . . . . . . . . . . . . . . . . . 32
M+RJ71GP21_RedundantSystem_GetAddress
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
M+RJ71GP21_RemoteStopRun . . . . . . . . . . . . . 37
M+RJ71GP21_Send . . . . . . . . . . . . . . . . . . . . . 26
M+RJ71GP21_StationNoSet . . . . . . . . . . . . . . 181
M+RJ71GP21_WriteTime . . . . . . . . . . . . . . . . . 46
M+RJ71LP21_DeviceRead . . . . . . . . . . . . . . . . 15
M+RJ71LP21_DeviceWrite . . . . . . . . . . . . . . . . 20
M+RJ71LP21_ReadTime . . . . . . . . . . . . . . . . . . 42
M+RJ71LP21_Recv . . . . . . . . . . . . . . . . . . . . . 32
M+RJ71LP21_RedundantSystem_GetAddress
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
M+RJ71LP21_RemoteStopRun . . . . . . . . . . . . . 37
M+RJ71LP21_Send . . . . . . . . . . . . . . . . . . . . . 26
M+RJ71LP21_WriteTime . . . . . . . . . . . . . . . . . . 46

230
REVISIONS
*The manual number is given on the bottom left of the back cover.
Revision date *Manual number Description
June 2014 BCN-P5999-0381-A First edition
July 2014 BCN-P5999-0381-B Partial correction
November 2014 BCN-P5999-0381-C ■Added function
CC-Link IE Controller Network function of the RJ71EN71
■Added or modified parts
Section 2.1, 2.2, 3.3, 4.1, 5.1
July 2015 BCN-P5999-0381-D ■Added or modified parts
Section 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.1, 3.2, 3.3, 3.4, 3.5, 4.1, 5.1
January 2016 BCN-P5999-0381-E ■Added or modified parts
Chapter 1, Section 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 4.1, 5.1
May 2016 BCN-P5999-0381-F ■Added or modified parts
Chapter 1, Section 4.2, 5.3, 5.4, 5.5
April 2017 BCN-P5999-0381-G ■Added or modified parts
Section 3.6, 3.7, 5.6
April 2018 BCN-P5999-0381-H ■Added or modified parts
Section 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 4.1, 4.2, 5.1, 5.4, 5.5, 5.6
May 2019 BCN-P5999-0381-I ■Added model
RJ71GN11-T2
■Added or modified parts
Chapter 1, 2, 3, 4, 5, TRADEMARK
May 2019 BCN-P5999-0381-J ■Added or modified part
Chapter 3
October 2019 BCN-P5999-0381-K ■Added or modified part
Section 3.9
November 2019 BCN-P5999-0381-L ■Added or modified parts
Section 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.9, 3.10, 3.11
February 2020 BCN-P5999-0381-M ■Added model
RJ71LP21-25
■Added or modified parts
Chapter 1, Section 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.10, 2.13, 2.14, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
3.7, 3.9, 3.10, 3.11, 4.9, 5.11, 5.12, Chapter 6
March 2020 BCN-P5999-0381-N ■Added or modified part
RELEVANT MANUALS
April 2021 BCN-P5999-0381-O ■Added or modified parts
Section 2.1, 2.2, 2.3, 2.4, 2.10, 2.11
August 2021 BCN-P5999-0381-P ■Added or modified parts
Chapter 1, Section 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 2.10, 2.11, 2.12, 2.13, 2.14, 3.1, 3.2, 3.3,
3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 4.8, 4.9, 5.8, 5.11, 5.12, 5.13
October 2021 BCN-P5999-0381-Q ■Added or modified parts
Section 1.1, 5.9
January 2022 BCN-P5999-0381-R ■Added model
RJ71GN11-EIP
■Added or modified parts
INTRODUCTION, RELEVANT MANUALS, Section 1.1, 1.3, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.10,
3.11, 3.12, Chapter 4
■Chapter number change
Chapter 4 to 6  Chapter 5 to 7
April 2022 BCN-P5999-0381-S ■Added or modified parts
Section 1.1, 3.5, 3.6, 3.7, 3.9, 3.12, 3.13, 4.11
April 2023 BCN-P5999-0381-T ■Added models
RJ71GN11-SX, RJ71BR11
■Added or modified parts
INTRODUCTION, Section 1.1, 1.3, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.8, 3.9,
3.12, 3.13

Japanese manual number: BCN-P5999-0372-T


This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot
be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.

 2014 MITSUBISHI ELECTRIC CORPORATION

231
TRADEMARKS
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.

232 BCN-P5999-0381-T
BCN-P5999-0381-T(2304)

HEAD OFFICE: TOKYO BLDG., 2-7-3, MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN
NAGOYA WORKS: 1-14, YADA-MINAMI 5-CHOME, HIGASHI-KU, NAGOYA 461-8670, JAPAN

When exported from Japan, this manual does not require application to the
Ministry of Economy, Trade and Industry for service transaction permission.

Specifications subject to change without notice.

You might also like