MELSEC iQ-R Ethernet, CC-Link IE, and MELSECNET/H Function Block Reference
MELSEC iQ-R Ethernet, CC-Link IE, and MELSECNET/H Function Block Reference
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) Mitsubishi programmable controller ("the PRODUCT") shall be used in conditions;
        i) where any problem, fault or failure occurring in the PRODUCT, if any, shall not lead to any major or serious accident;
        and
        ii) where the backup and fail-safe function are systematically or automatically provided outside of the PRODUCT for the
        case of any problem, fault or failure occurring in the PRODUCT.
    (2) The PRODUCT has been designed and manufactured for the purpose of being used in general industries.
        MITSUBISHI SHALL HAVE NO RESPONSIBILITY OR LIABILITY (INCLUDING, BUT NOT LIMITED TO ANY AND ALL
        RESPONSIBILITY OR LIABILITY BASED ON CONTRACT, WARRANTY, TORT, PRODUCT LIABILITY) FOR ANY
        INJURY OR DEATH TO PERSONS OR LOSS OR DAMAGE TO PROPERTY CAUSED BY the PRODUCT THAT ARE
        OPERATED OR USED IN APPLICATION NOT INTENDED OR EXCLUDED BY INSTRUCTIONS, PRECAUTIONS, OR
        WARNING CONTAINED IN MITSUBISHI'S USER, INSTRUCTION AND/OR SAFETY MANUALS, TECHNICAL
        BULLETINS AND GUIDELINES FOR the PRODUCT.
        ("Prohibited Application")
        Prohibited Applications include, but not limited to, the use of the PRODUCT in;
        • Nuclear Power Plants and any other power plants operated by Power companies, and/or any other cases in which the
            public could be affected if any problem or fault occurs in the PRODUCT.
        • Railway companies or Public service purposes, and/or any other cases in which establishment of a special quality
            assurance system is required by the Purchaser or End User.
        • Aircraft or Aerospace, Medical applications, Train equipment, transport equipment such as Elevator and Escalator,
            Incineration and Fuel devices, Vehicles, Manned transportation, Equipment for Recreation and Amusement, and
            Safety devices, handling of Nuclear or Hazardous Materials or Chemicals, Mining and Drilling, and/or other
            applications where there is a significant risk of injury to the public or property.
        Notwithstanding the above restrictions, Mitsubishi may in its sole discretion, authorize use of the PRODUCT in one or
        more of the Prohibited Applications, provided that the usage of the PRODUCT is limited only for the specific
        applications agreed to by Mitsubishi and provided further that no special quality assurance or fail-safe, redundant or
        other safety features which exceed the general specifications of the PRODUCTs are required. For details, please
        contact the Mitsubishi representative in your region.
    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 module                                           RJ71GN11-T2
     CC-Link IE Controller Network module                            RJ71GP21-SX, RJ71GP21S-SX
     CC-Link IE Field Network module                                 RJ71GF11-T2
     MELSECNET/H module                                              RJ71LP21-25
2
CONTENTS
SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
RELEVANT MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
GENERIC TERMS AND ABBREVIATIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
                                                                                                                                                                              CONTENTS
CHAPTER 1                  MODULE FUNCTION BLOCK (FB) LIST                                                                                                              8
                                                                                                                                                                              3
    4.9       M+model_RedundantSystem_GetAddress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
    REVISIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197
    TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .198
4
RELEVANT MANUALS
Manual name [manual number]                        Description                                                                       Available form
MELSEC iQ-R Ethernet, CC-Link IE, and              Function blocks used for modules of Ethernet, CC-Link IE, or MELSECNET/H          e-Manual
MELSECNET/H Function Block Reference                                                                                                 PDF
[BCN-P5999-0381] (this manual)
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    Print book
(Application)                                      of CC-Link IE TSN
                                                                                                                                     e-Manual
[SH-082129ENG]
                                                                                                                                     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           Print book
User's Manual (Application)                        memory of 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.
                                                                                                                                                      5
    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.
6
GENERIC TERMS AND ABBREVIATIONS
Unless otherwise specified, this manual uses the following generic terms and abbreviations.
Generic term/abbreviation                      Description
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))
                                                                                                                                          7
    1          MODULE FUNCTION BLOCK (FB) LIST
    This chapter lists the module FBs that can be used in the MELSEC iQ-R series network modules and Ethernet function of the
    CPU module.
    : Available, : Not available
    Name                      Description                            Ethernet-   CC-Link IE   CC-Link IE   CC-Link IE   MELSECNET/H
                                                                     equipped    TSN          Controller   Field        module FB
                                                                     module FB   module FB    Network      Network
                                                                                              module FB    module FB
    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_DeviceRea    Reads data from the SLMP-                                                             
    d_IP                      compatible device by specifying
                              IP address.
    M+model_SLMP_DeviceWrit   Writes data to the SLMP-                                                              
    e_IP                      compatible device by specifying
                              IP address.
    M+model_SetAddress        Sets the station number or IP                                                         
                              address for the own station.
    M+model_SetParameterX     Sets parameters for a module.                                                         
    M+model_RemoteRead        Reads data from the buffer                                                            
                              memory of the remote station in
                              units of words.
    M+model_RemoteWrite       Writes data to the buffer memory                                                      
                              of the remote station in units of
                              words.
  Precautions
When the module FB is executed, an operation error may be occurred 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.
2.1 M+model_DeviceRead
     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
     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)
             2 Ethernet-EQUIPPED MODULE FB
10           2.1 M+model_DeviceRead
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
(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)
(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)
(6)    i_uChannel          Own station channel   Word                       Specify the channel to be used by own station.
                                                 [Unsigned]                   MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
                                                 /Bit String
                                                 [16-bit]
■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 module FB has been processed normally when this argument is on.              Off
(9)    o_bErr              Error completion      Bit           The module 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]
                                                                                                        2 Ethernet-EQUIPPED MODULE FB
                                                                                                                 2.1 M+model_DeviceRead                       11
     ■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
     (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).
            2 Ethernet-EQUIPPED MODULE FB
12          2.1 M+model_DeviceRead
■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 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
                      CPU module                                                             RCPU
                      Engineering tool                                                       GX Works3
Language              Ladder diagram
Number of basic       85 steps
steps                 The number of steps of the FB in a program varies depending on the CPU module used, input and output definition, 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
                                                                                                                         2.1 M+model_DeviceRead                   13
     Item                    Description
     Timing chart of I/O      • For normal completion
     signals
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
     Error code
     Error code            Reference
     4000H to               MELSEC iQ-R CPU Module User's Manual (Application)
     4FFFH
     6F00H to
     6FFFH
     C000H to               MELSEC iQ-R Ethernet User's Manual (Application)
     CFFFH
     D000H to               MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
     DFFFH
     E000H to               MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
     EFFFH
     F000H to               MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)
     FFFFH
            2 Ethernet-EQUIPPED MODULE FB
14          2.1 M+model_DeviceRead
2.2             M+model_DeviceWrite
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_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
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)
                                                                                                          2 Ethernet-EQUIPPED MODULE FB
                                                                                                                   2.2 M+model_DeviceWrite   15
     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: EN71_EE_1, EN71_EF_1, EN71_F_1, GF11_1, GP21_1,
                                                                             LP21_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]
                                                       /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 own station.
                                                       [Unsigned]             MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
                                                       /Bit String
                                                       [16-bit]
           2 Ethernet-EQUIPPED MODULE FB
16         2.2 M+model_DeviceWrite
■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 module FB has been processed normally when this argument is
                                                                      on.
                                                                                                                                                 Off
                                                                                                                                                                2
(10)   o_bErr               Error completion    Bit                   The module FB has been processed abnormally when this argument is          Off
                                                                      on.
(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     Word            0000H,          Specify the CPU type of the target station.                    0
                               CPU 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      [Unsigned]/                     • 0: Station number specification  Station with the station
                               method             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
                                                                                                                   2.2 M+model_DeviceWrite                 17
     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.
                                                                                                              (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_uResendCountMax    Maximum number       Word          0 to 15     Specify the number of resends to be performed if the data         5
                                    of 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                                     time, data is resent until the value specified in "Maximum
                                    Network, CC-Link                               number of resends" is reached.
                                    IE Field 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                                        • Off: Use the network number and station number.
                                    specification                                  • On: Use the IP address (IPv4). (Ethernet only).
                                    method
            2 Ethernet-EQUIPPED MODULE FB
18          2.2 M+model_DeviceWrite
■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                                                                        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))
(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
                                                                                                       2 Ethernet-EQUIPPED MODULE FB
                                                                                                                2.2 M+model_DeviceWrite                  19
     FB details
     Item                  Description
     Available device      Target module                                                           •   RJ71GF11-T2
                                                                                                   •   RJ71GP21(S)-SX
                                                                                                   •   RJ71EN71
                                                                                                   •   RnENCPU (network part)
                                                                                                   •   RJ71LP21-25
                           CPU module                                                             RCPU
                           Engineering tool                                                       GX Works3
     Language              Ladder diagram
     Number of basic       90 steps
     steps                 The number of steps of the FB in a program varies depending on the CPU module used, input and output definition, 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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
            2 Ethernet-EQUIPPED MODULE FB
20          2.2 M+model_DeviceWrite
Error code
Error code   Reference
4000H to      MELSEC iQ-R CPU Module User's Manual (Application)
4FFFH
6F00H to
6FFFH                                                                                                                          2
C000H to      MELSEC iQ-R Ethernet User's Manual (Application)
CFFFH
D000H to      MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
DFFFH
E000H to      MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
EFFFH
F000H to      MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)
FFFFH
                                                                                       2 Ethernet-EQUIPPED MODULE FB
                                                                                                2.2 M+model_DeviceWrite   21
     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
     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)
             2 Ethernet-EQUIPPED MODULE FB
22           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)
(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 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]/
                                                          Bit String
                                                          [16-bit]
■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 module FB has been processed normally when this argument is             Off
                                                                              on.
(11)   o_bErr               Error completion        Bit                       The module FB has been processed abnormally when this argument              Off
                                                                              is on.
(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                         23
     ■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]/Bit                 • 0: Station number specification  Station with the station
                                                          String [16-bit]                  number specified in "Target station number"
                                                                                         • 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]/Bit                 transfer is not completed within the monitoring time
                                                          String [16-bit]                specified by "Arrival monitoring time".
                                                                                          • 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]/Bit                 the monitoring time until completion of processing. If the
                                                          String [16-bit]                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      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
24          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                    25
     FB details
     Item                  Description
     Available device      Target module                                                           •   RJ71GF11-T2
                                                                                                   •   RJ71GP21(S)-SX
                                                                                                   •   RJ71EN71
                                                                                                   •   RnENCPU (network part)
                                                                                                   •   RJ71LP21-25
                           CPU module                                                             RCPU
                           Engineering tool                                                       GX Works3
     Language              Ladder diagram
     Number of basic       75 steps
     steps                 The number of steps of the FB in a program varies depending on the CPU module used, input and output definition, 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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
            2 Ethernet-EQUIPPED MODULE FB
26          2.3 M+model_Send
Error code
Error code   Reference
4000H to      MELSEC iQ-R CPU Module User's Manual (Application)
4FFFH
6F00H to
6FFFH                                                                                                                         2
C000H to      MELSEC iQ-R Ethernet User's Manual (Application)
CFFFH
D000H to      MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
DFFFH
E000H to      MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
EFFFH
F000H to      MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)
FFFFH
                                                                                       2 Ethernet-EQUIPPED MODULE FB
                                                                                                      2.3 M+model_Send   27
     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
     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)
             2 Ethernet-EQUIPPED MODULE FB
28           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)
(3)    i_uRecvChannel      Receive data storage   Word                              Specify the channel containing the data to be read.
                           channel                [Unsigned]/Bit                      MELSEC iQ-R Programming Manual (Module Dedicated
                                                  String [16-bit]                    Instructions)
■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 module FB has been processed normally when this argument is on.       Off
(6)    o_bErr              Error completion       Bit                 The module FB has been processed abnormally when this argument is         Off
                                                                      on.
(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 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              29
     ■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              0
                                  station number      [Unsigned]/       stored.
                                                      Bit String        Station number of Ethernet or CC-Link IE Controller Network
                                                      [16-bit]           • 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
     (16)    pbo_uSendNetworkNo   Send station        Word              The network number of the send station is stored.                                0
                                  network number      [Unsigned]/
                                                      Bit String
                                                      [16-bit]
     (17)    pbo_uSendStationNo   Send station        Word              The station number of the send station is stored.                                0
                                  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
     (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
30          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
                      CPU module                                                             RCPU
                      Engineering tool                                                       GX Works3
Language              Ladder diagram
Number of basic       94 steps
steps                 The number of steps of the FB in a program varies depending on the CPU module used, input and output definition, 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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
                                                                                                               2 Ethernet-EQUIPPED MODULE FB
                                                                                                                              2.4 M+model_Recv                       31
     Error code
     Error code   Reference
     C000H to      MELSEC iQ-R Ethernet User's Manual (Application)
     CFFFH
     D000H to      MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
     DFFFH
     E000H to      MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
     EFFFH
     F000H to      MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)
     FFFFH
         2 Ethernet-EQUIPPED MODULE FB
32       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
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)
                                                                                                      2 Ethernet-EQUIPPED MODULE FB
                                                                                                           2.5 M+model_RemoteStopRun   33
     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)
     (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]/Bit                 transmission group number.
                                                        String [16-bit]                ■When "Target station specification method" is set to 0 to specify a
                                                                                       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 own station.
                                                        [Unsigned]/Bit                  MELSEC iQ-R Programming Manual (Module Dedicated
                                                        String [16-bit]                Instructions)
     (6)     i_uRemoteType        Remote operation      Word              1, 2         Specify remote RUN or STOP.
                                                        [Unsigned]/Bit                 • 1: Remote RUN
                                                        String [16-bit]                • 2: Remote STOP
     ■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 module FB has been processed normally when this argument is on.        Off
     (9)     o_bErr               Error completion      Bit               The module FB has been processed abnormally when this argument is          Off
                                                                          on.
     (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
34          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
                                                    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)
(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_uResendCountMax   Maximum number of      Word              0 to 15         Specify the number of resends to be performed if        5
                             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                      35
     ■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
                           CPU module                                                             RCPU
                           Engineering tool                                                       GX Works3
     Language              Ladder diagram
     Number of basic       122 steps
     steps                 The number of steps of the FB in a program varies depending on the CPU module used, input and output definition, 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
36          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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
Error code
Error code            Reference
4000H to               MELSEC iQ-R CPU Module User's Manual (Application)
4FFFH
6F00H to
6FFFH
C000H to               MELSEC iQ-R Ethernet User's Manual (Application)
CFFFH
D000H to               MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
DFFFH
E000H to               MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
EFFFH
F000H to               MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)
FFFFH
                                                                                                                  2 Ethernet-EQUIPPED MODULE FB
                                                                                                                       2.5 M+model_RemoteStopRun                        37
     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
     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)
             2 Ethernet-EQUIPPED MODULE FB
38           2.6 M+model_ReadTime
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
(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)
(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 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
(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 module FB has been processed normally when this argument is           Off
                                                                     on.
(8)   o_bErr               Error completion        Bit               The module FB has been processed abnormally when this argument            Off
                                                                     is on.
(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                        39
     ■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
                           CPU module                                                             RCPU
                           Engineering tool                                                       GX Works3
     Language              Ladder diagram
     Number of basic       133 steps
     steps                 The number of steps of the FB in a program varies depending on the CPU module used, input and output definition, 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
40          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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
Error code
Error code            Reference
4000H to               MELSEC iQ-R CPU Module User's Manual (Application)
4FFFH
6F00H to
6FFFH
C000H to               MELSEC iQ-R Ethernet User's Manual (Application)
CFFFH
D000H to               MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
DFFFH
E000H to               MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
EFFFH
F000H to               MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)
FFFFH
                                                                                                                  2 Ethernet-EQUIPPED MODULE FB
                                                                                                                             2.6 M+model_ReadTime                       41
     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
     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)
             2 Ethernet-EQUIPPED MODULE FB
42           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)
(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 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 module FB has been processed normally when this argument is               Off
                                                                    on.
(8)   o_bErr               Error completion      Bit                The module FB has been processed abnormally when this argument is             Off
                                                                    on.
(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                        43
     ■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
44          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
                      CPU module                                                             RCPU
                      Engineering tool                                                       GX Works3
Language              Ladder diagram
Number of basic       133 steps
steps                 The number of steps of the FB in a program varies depending on the CPU module used, input and output definition, 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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
                                                                                                               2 Ethernet-EQUIPPED MODULE FB
                                                                                                                          2.7 M+model_WriteTime                      45
     Error code
     Error code   Reference
     4000H to      MELSEC iQ-R CPU Module User's Manual (Application)
     4FFFH
     6F00H to
     6FFFH
     C000H to      MELSEC iQ-R Ethernet User's Manual (Application)
     CFFFH
     D000H to      MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
     DFFFH
     E000H to      MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
     EFFFH
     F000H to      MELSEC iQ-R MELSECNET/H Network Module User's Manual (Application)
     FFFFH
         2 Ethernet-EQUIPPED MODULE FB
46       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)
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)
                                                                                                  2 Ethernet-EQUIPPED MODULE FB
                                                                                                       2.8 M+model_ConnectionOpen   47
     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: 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 module FB has been processed normally when this argument is         Off
                                                                       on.
     (6)    o_bErr            Error completion    Bit                  The module FB has been processed abnormally when this argument is       Off
                                                                       on.
     (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
48         2.8 M+model_ConnectionOpen
■Operation parameters
No.    Variable name         Name               Data          Range         Description                                                     Default
                                                type                                                                                        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 the   0
                                                [Unsigned]                  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 therefore
                                                [16-bit]                    port numbers 1024 to 4999 and 5010 to 65534 should be
                                                                            used.
(15)   pbi_uTarget_Port_No   Destination port   Word          1 to 65534,   Specify the destination port number.                            4096
                             number             [Unsigned]    65535         With the connection that is assigned port No.65535 (only
                                                /Bit String                 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               49
     No.     Variable name         Name                Data          Range          Description                                                      Default
                                                       type                                                                                          value
     (16)    pbi_u2IP_Address      IP address of       Word          0.0.0.1 to     Specify the IP address of an external device.                    192.168.1.1
                                   external device     [Unsigned]    255.255.255.   Specify the third and fourth octets to the 1st word, and first   (C0A80101H)
                                                       /Bit String   255            and second octets to the 2nd word.
                                                       [16-bit]      (00000001H     Specify 255.255.255.255 (FFFFFFFFH) when performing
                                                       (0..1)        to             simultaneous broadcast.
                                                                     FFFFFFFFH)
                                                                                          b15              b8 b7                b0
                                                                                     +0           (3)                  (4)
                                                                                     +1           (1)                  (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     171 steps
     steps               The number of steps of the FB in a program varies depending on the CPU module used, input and output definition, 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
50          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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
Error code
Error code            Reference
C000H to               MELSEC iQ-R Ethernet User's Manual (Application)
CFFFH
                                                                                                                  2 Ethernet-EQUIPPED MODULE FB
                                                                                                                       2.8 M+model_ConnectionOpen                      51
     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)
     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)
     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: 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 module FB has been processed normally when this argument is         Off
                                                                                on.
      (6)     o_bErr               Error completion       Bit                   The module FB has been processed abnormally when this argument is       Off
                                                                                on.
      (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
52           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 in a program varies depending on the CPU module used, input and output definition, 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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
                                                                                                                  2 Ethernet-EQUIPPED MODULE FB
                                                                                                                      2.9 M+model_ConnectionClose                53
     Error code
     Error code   Reference
     C000H to      MELSEC iQ-R Ethernet User's Manual (Application)
     CFFFH
         2 Ethernet-EQUIPPED MODULE FB
54       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)
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)
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: 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                     55
     ■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 module FB has been processed normally when this argument is on.           Off
     (6)     o_bErr                 Error completion       Bit               The module FB has been processed abnormally when this argument is             Off
                                                                             on.
     (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
                                                                                     b15      b8            b7         b0
                                                                                        (2)                      (1)
                                                                                                     ·
                                                                                        (4)                      (3)
     ■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 in a program varies depending on the CPU module used, input and output definition, 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.
     FB compilation        Macro type
     method
     FB operation          Pulse type (multiple-scan execution type)
            2 Ethernet-EQUIPPED MODULE FB
56          2.10 M+model_Recv_Socket
Item                    Description
Timing chart of I/O      • For normal completion
signals
i_bEN
                        o_bENO
                                                                                                                                                                            2
                        o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
Error code
Error code            Reference
C000H to               MELSEC iQ-R Ethernet User's Manual (Application)
CFFFH
                                                                                                                  2 Ethernet-EQUIPPED MODULE FB
                                                                                                                         2.10 M+model_Recv_Socket                      57
     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)
     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)
     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: 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
58           2.11 M+model_Send_Socket
No.     Variable name         Name                  Data          Range                           Description
                                                    type
(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                                            2
                                                                                                  1st word: Send data length (unit: byte)
                                                                                                  2nd to nth word:
                                                                                                         b15      b8            b7         b0
                                                                                                            (2)                      (1)
                                                                                                                         ·
                                                                                                            (4)                      (3)
*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.
■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 module FB has been processed normally when this argument is             Off
                                                                             on.
(7)     o_bErr                Error completion      Bit                      The module FB has been processed abnormally when this argument              Off
                                                                             is on.
(8)     o_uErrId              Error code            Word [Unsigned]/Bit      An error code is stored at error completion.                                0
                                                    String [16-bit]
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 in a program varies depending on the CPU module used, input and output definition, 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)
                                                                                                               2 Ethernet-EQUIPPED MODULE FB
                                                                                                                      2.11 M+model_Send_Socket                        59
     Item                    Description
     Timing chart of I/O      • For normal completion
     signals
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
     Error code
     Error code            Reference
     C000H to               MELSEC iQ-R Ethernet User's Manual (Application)
     CFFFH
            2 Ethernet-EQUIPPED MODULE FB
60          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
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              61
     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 in a program varies depending on the CPU module used, input and output definition, 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.
            2 Ethernet-EQUIPPED MODULE FB
62          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 by specifying 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)
                                    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)
                                                                                                      2 Ethernet-EQUIPPED MODULE FB
                                                                                                    2.13 M+model_SLMP_DeviceRead_IP                       63
     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 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]
           2 Ethernet-EQUIPPED MODULE FB
64         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 module FB has been processed normally when this
                                                                 argument is on.
                                                                                                                                 Off
                                                                                                                                                2
(12)   o_bErr          Error completion    Bit                   The module FB has been processed abnormally when this           Off
                                                                 argument 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
                                                                                    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
                                                                                                2 Ethernet-EQUIPPED MODULE FB
                                                                                              2.13 M+model_SLMP_DeviceRead_IP              65
     ■Operation parameters
     No.     Variable name           Name                    Data type         Range                              Description                                 Default
                                                                                                                                                              value
     (15)    pbi_uRequestModuleIO    Requested module        Word              03D0H to 03D3H, 03E0H to           Specify the module of the access            03FFH
                                     I/O No.                 [Unsigned]/Bit    03E3H, 03FFH                       destination.
                                                             String [16-bit]                                       • 03D0H: Control system CPU
                                                                                                                   • 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          Word              0 to 15                            Specify the number of resends to be         5
                                     of resends              [Unsigned]/Bit                                       performed if the data transfer is not
                                                             String [16-bit]                                      completed within the 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]/Bit                                       completion of processing. If the
                                                             String [16-bit]                                      processing is not completed within 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)
            2 Ethernet-EQUIPPED MODULE FB
66          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 in a program varies depending on the CPU module used, input and output definition, 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 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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
                                                                                                          2 Ethernet-EQUIPPED MODULE FB
                                                                                                        2.13 M+model_SLMP_DeviceRead_IP                 67
     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 be 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 68 Error code 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 code
     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
68          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 by specifying 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                   69
     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)
           2 Ethernet-EQUIPPED MODULE FB
70         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
(9)      i_uChannel           Own station channel   Word [Unsigned]/Bit   1 to 9        Specify the channel to be used by 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]
                                                                                             2 Ethernet-EQUIPPED MODULE FB
                                                                                           2.14 M+model_SLMP_DeviceWrite_IP                         71
     ■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 module FB has been processed normally when this             Off
                                                                                       argument is on.
     (13)    o_bErr                 Error completion         Bit                       The module FB has been processed abnormally when this           Off
                                                                                       argument 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     Word              03D0H to 03D3H, 03E0H to          Specify the module of the access        03FFH
                                      I/O No.              [Unsigned]/Bit    03E3H, 03FFH                      destination.
                                                           String [16-bit]                                      • 03D0H: Control system CPU
                                                                                                                • 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       Word              0 to 15                           Specify the number of resends to be     5
                                      of resends           [Unsigned]/Bit                                      performed if the data transfer is not
                                                           String [16-bit]                                     completed within the 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]/Bit                                      completion of processing. If the
                                                           String [16-bit]                                     processing is not completed within
                                                                                                               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
72          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)
                                                                                                           2 Ethernet-EQUIPPED MODULE FB
                                                                                                         2.14 M+model_SLMP_DeviceWrite_IP                    73
     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 in a program varies depending on the CPU module used, input and output definition, 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 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
     Timing chart of I/O   • For normal completion
     signals
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
            2 Ethernet-EQUIPPED MODULE FB
74          2.14 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 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                   2
                         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 be 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 75 Error code 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 code
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
                                                                                                            2.14 M+model_SLMP_DeviceWrite_IP                         75
     3            CC-Link IE TSN MODULE FB
3.1 M+model_DeviceRead
     Name
     M+RJ71GN11_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)
                                                                             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 RCPU, QCPU, or LCPU: 1 to 960 words
                                                 /Bit String                 • When reading data from QnACPU: 1 to 480 words
                                                 [16-bit]
(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 own station.
                                                 [Unsigned]                   MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
                                                 /Bit String
                                                 [16-bit]
■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 module FB has been processed normally when this argument is on.              Off
(9)    o_bErr              Error completion      Bit           The module 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]
     *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.
FB details
Item                  Description
Available device      Target module                                                         RJ71GN11-T2
                      CPU module                                                            RCPU
                      Engineering tool                                                      GX Works3
Language              Ladder diagram
Number of basic       82 steps
steps                 The number of steps of the FB in a program varies depending on the CPU module used, input and output definition, 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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
     Error code
     Error code            Reference
     C000H to CFFFH         MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
     D000H to DFFFH
Name
M+RJ71GN11_DeviceWrite
Overview
Item         Description                                                                                                                3
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)
                                                                                   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 960 words
                                                       /Bit String           • When writing to QnACPU: 1 to 480 words
                                                       [16-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_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 own station.
                                                       [Unsigned]             MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
                                                       /Bit String
                                                       [16-bit]
■Operation parameters
No.    Variable name            Name                   Data type       Range           Description                                                  Default
                                                                                                                                                    value
(12)   pbi_uCPU_Type            Target station         Word            0000H,          Specify the CPU type of the target station.                  0
                                CPU 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_uResendCountMax      Maximum number         Word            0 to 15         Specify the number of resends to be performed if the data    5
                                of 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]
     *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.
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
     Name
     M+RJ71GN11_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)
                                                                                 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]
     ■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_uResendCountMax        Maximum number          Word               0 to 15      Specify the number of resends to be performed if the data     5
                                        of resends              [Unsigned]/Bit                  transfer is not completed within the monitoring time
                                                                String [16-bit]                 specified by "Arrival monitoring time".
                                                                                                 • 0 to 15
     (14)    pbi_uMonitorTime           Arrival monitoring      Word               0, 1 to      Specify the monitoring time until completion of processing.   0
                                        time                    [Unsigned]/Bit     32767        If the processing is not completed within the monitoring
                                                                String [16-bit]                 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
     (15)    pbi_bStationSpecific       Target station          Bit                On or off    Specify the specification method of a target station.         Off
                                        address                                                 • Off: Use the network number and station number.
                                        specification                                           • On: Use the IP address (IPv4). (CC-Link IE TSN only).
                                        method
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
     Name
     M+RJ71GN11_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)
     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_uRecvChannel         Receive data storage    Word                              Specify the channel containing the data to be read.
                                    channel                 [Unsigned]/Bit                      MELSEC iQ-R Programming Manual (Module Dedicated
                                                            String [16-bit]                    Instructions)
     ■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 module FB has been processed normally when this argument is on.      Off
     (6)     o_bErr                 Error completion        Bit                The module FB has been processed abnormally when this argument is        Off
                                                                               on.
     (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]
■Public variables
No.    Variable name                 Name             Data type     Description                                                                    Default
                                                                                                                                                   value
(13)   pbo_uResendCount              Number of        Word          Zero is stored in this area.                                                   0
                                     resends          [Unsigned]/
                                                      Bit String
                                                      [16-bit]
(14)   pbo_u4ErrTime                 Error            Word          Clock data at the time of error occurrence is stored.                          0
                                     occurrence       [Unsigned]/   1st word
                                     time             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))
(15)   pbo_uErrStationAddress1       Error-detected   Word          ■When "Sending station address display method" is off                          0
                                     station          [Unsigned]/   The network number of the station in which an error was detected is
                                     address 1        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
(16)   pbo_uErrStationAddress2       Error-detected   Word          ■When "Sending station address display method" is off                          0
                                     station          [Unsigned]/   The station number of the station in which an error was detected is stored.
                                     address 2        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 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_uSendStationAddress1      Sending          Word          ■When "Sending station address display method" is off                          0
                                     station          [Unsigned]/   The network number and station number of the sending station are stored.
                                     address 1        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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
Name
M+RJ71GN11_RemoteStopRun
Overview
Item        Description                                                                                                            3
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)
                                                                                   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 own station.
                                                   [Unsigned]/Bit             MELSEC iQ-R Programming Manual (Module Dedicated
                                                   String [16-bit]           Instructions)
  (5)    i_uRemoteType       Remote operation      Word              1, 2    Specify remote RUN or STOP.
                                                   [Unsigned]/Bit            • 1: Remote RUN
                                                   String [16-bit]           • 2: Remote STOP
■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, 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                                                    • Off: Use the network number and station number.
                                specification                                              • On: Use the IP address (IPv4). (CC-Link IE TSN
                                method                                                       only).
(14)   pbi_uTargetStation       Target station       Word               0 to 2             Specify the specification method of a target station.   0
                                specification        [Unsigned]/Bit                        • 0: Station number specification  Station with the
                                method               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        [Unsigned]/Bit                        Specify whether to forcibly execute remote RUN.
                                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
  ■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_uErrStationAddress1     Error-detected         Word [Unsigned]/Bit      ■When "Target station address specification method" is off         0
                                      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_uErrStationAddress2     Error-detected         Word [Unsigned]/Bit      ■When "Target station address specification method" is off         0
                                      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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
Name
M+RJ71GN11_SLMP_DeviceRead_IP
Overview
Item                Description                                                                                                                             3
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)     DUT: i_u2IP_Address                 o_bErr: B        (12)
                        (4)     DUT: i_uSubCommand            o_uErrId: UW           (13)
                        (5)     DUT: i_uDeviceCode       o_uReadData: UW             (14)
                        (6)     DUT: i_u2DeviceNo
                        (7)     DUT: i_uDevicePoints
                        (8)     DUT: i_uChannel
                        (9)     DUT: 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)
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)
(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
  (8)     i_uChannel            Own station channel   Word [Unsigned]/Bit      1 to 17       Specify the channel to be used by 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.
                                                                  0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
                                                                  M115                  ...             M100
                                                                  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
                                                                   b15             b8         b7             b0
                                                                        0      1                   0     0
                                                                    M102     M103             M100     M101
2nd word:
b15 b8 b7 b0
1 1 0 0
  ■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).
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
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   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 code
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)
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)
  Name
  M+RJ71GN11_SLMP_DeviceWrite_IP
  Overview
  Item              Description
  Overview          Writes data to the SLMP-compatible device by specifying 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
                                       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)
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
                                                                                             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
                                                                                             b15              b8     b7            b0
                                                                                                  0       1               0    0
                                                                                               M102     M103         M100     M101
2nd word:
b15 b8 b7 b0
1 1 0 0
  (9)      i_uChannel            Own station channel   Word [Unsigned]/Bit   1 to 17        Specify the channel to be used by 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.
■Operation parameters
No.    Variable name            Name                      Data type         Range                           Description                            Default
                                                                                                                                                   value
(15)   pbi_uRequestModuleIO     Requested module I/O      Word              03E0H to 03E3H, 03FFH           Specify the module of the access       03FFH
                                No.                       [Unsigned]/Bit                                    destination.
                                                          String [16-bit]                                    • 03E0H: Multiple CPU No.1
                                                                                                             • 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]/Bit                                    be performed if the data transfer is
                                                          String [16-bit]                                   not completed within the
                                                                                                            monitoring time specified by
                                                                                                            "Arrival monitoring time".
                                                                                                             • 0 to 15
(17)   pbi_uMonitorTime         Arrival monitoring time   Word              0, 1 to 32767                   Specify the monitoring time until      0
                                                          [Unsigned]/Bit                                    completion of processing. If the
                                                          String [16-bit]                                   processing is not completed 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
  *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
                           CPU module                                                            RCPU
                           Engineering tool                                                      GX Works3
  Language                 Ladder diagram
  Number of basic          268 steps
  steps                    The number of steps of the FB in a program varies depending on the CPU module used, input and output definition, 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)
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
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   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 code
  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)
  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)
Name
M+RJ71GN11_SetAddress
Overview
Item                  Description                                                                                                                                        3
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          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.
(3)    i_uStationNo           Station number       Word          0 to 120           Specify the station number to be set.
                              of the own           [Unsigned]                       Master station: 0
                              station              /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
■Output arguments
No.    Variable name            Name                      Data           Description                                                                   Default
                                                          type                                                                                         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 module FB has been processed normally when this argument is on.           Off
(7)    o_bErr                   Error completion          Bit            The module 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]
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
  Name
  M+RJ71GN11_SetParameterX
  Overview
  Item                 Description
  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_bNetworkConfigurationSetFlg       (12)
                                        pbi_bReservedStationSetFlg       (13)
                                        pbi_bErrInvalidStationSetFlg     (14)
                                      pbi_bDatalinkFaultyStationSet      (15)
                                          pbi_bCPU_StopOutputSet         (16)
                                       pbi_bCPU_StopErrOutputSet         (17)
                                                      pbi_bClassSet      (18)
                                    pbi_uDisconnectionDetectionSet       (19)
                                               pbi_uCommModeSet          (20)
                                              pbi_bCommSpeedSet          (21)
  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 instance of the module label as an argument.
  (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_u2175NetworkConfi    Network            Word                        Specify the start address of the storage location of network configuration setting
          gurationSet            configuration      [Unsigned]                   data.
                                 setting data       /Bit String                  Set data for the number of stations specified in "Total number of stations".
                                                    [16-bit]                     (Page 124 Network configuration setting data)
                                                    (0..2174)
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).
  ■Operation parameters
  : Can be set, : Cannot be set
  No.      Variable            Name                Data          Range        Description                                            Default   Master        Local
           name                                    type                                                                              value     station       station
  (12)     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
  (13)     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
  (14)     pbi_bErrInvalidS    Presence of         Bit           Off, on      Specify whether to enable/disable the error invalid    Off                    
           tationSetFlg        error invalid                                  station setting data.
                               station setting                                 • Off: Disable
                               data                                            • On: Enable
  (15)     pbi_bDatalinkFa     Data link faulty    Bit           Off, on      Specify whether to hold or clear the input data from   Off                    
           ultyStationSet      station setting                                a data link faulty station.
                                                                               • Off: Clear
                                                                               • On: Hold
  (16)     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
  (17)     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
  (18)     pbi_bClassSet       Authentication      Bit           Off, on      Set the authentication Class of the slave station      ON                     
                               class setting                                  connected.
                                                                               • Off: Authentication class B/A stations are mixed
                                                                                 or authentication class A
                                                                               • On: Authentication class B
  (19)     pbi_uDisconnect     Disconnection       Word          1 to 3       Set the continuous communications failure count        2 (4                   
           ionDetectionSet     detection setting   [Unsigned]                 before the slave station is detected to be             times)
                                                   /Bit String                disconnected.
                                                   [16-bit]                    • 1: 2 times
                                                                               • 2: 4 times
                                                                               • 3: 8 times
  (20)     pbi_uCommMod        Communication       Word          0, 1         Set communication mode.                                0                      
           eSet                mode setting        [Unsigned]                 • 0: Unicast
                                                   /Bit String                • 1: Multicast*1
                                                   [16-bit]
  (21)     pbi_bCommSpe        Communication       Bit           Off, on      Set the communication speed.                           Off                    
           edSet               speed setting                                  • Off: 1Gbps
                                                                              • On: 100Mbps*1
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
Name
M+RJ71GN11_RemoteRead
Overview
Item        Description                                                                                                          3
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)
                                                                                      b15               b8 b7             b0
                                                                                 +0           3                       4
                                                                                 +1           1                       2
                                                                                1 to 4: IP address octet
  (4)     i_udTargetBuffer    Read buffer          Double         00000000      Specify the start buffer memory address of the target station containing the read
                              memory of the        word           H to          data.
                              target station       [Unsigned]     FFFFFFFF
                                                   /Bit String    H
                                                   [32-bit]
  (5)     i_uDataLength       Read data length     Word           1 to 240      Specify the number of read data points (in units of words).
                                                   [Unsigned]
                                                   /Bit String
                                                   [16-bit]
  (6)     i_uChannel          Own station          Word           1 to 32       Specify the channel to be used by own station.
                              channel              [Unsigned]                    MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
                                                   /Bit String
                                                   [16-bit]
  ■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 module FB has been processed normally when this argument is on.            Off
  (9)     o_bErr               Error completion          Bit           The module 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]
■Public variables
No.    Variable name          Name                   Data type                Description                                                            Default
                                                                                                                                                     value
(16)   pbo_uResendCount       Number of resends      Word [Unsigned]/         The number of resends performed (result) is stored.                    0
                                                     Bit String [16-bit]      If an error was detected, the number of resends performed (result)
                                                                              between error detection and resend stop is stored.
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
  Name
  M+RJ71GN11_RemoteWrite
  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)
                                                                                   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 own station.
                           channel              [Unsigned]                    MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
                                                /Bit String
                                                [16-bit]
■Output arguments
No.    Variable name        Name                      Data          Description                                                                     Default
                                                      type                                                                                          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 module FB has been processed normally when this argument is on.             Off
(10)   o_bErr               Error completion          Bit           The module 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]
  ■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.
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
Name
M+RJ71GN11_RemoteReset_IP
Overview
Item         Description                                                                                                                3
Overview     Sends a remote STOP request to the target station by specifying IP address and then sends a remote RESET request.
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)
                                                                                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 own station.*1
                              channel              [Unsigned]
                                                   /Bit String
                                                   [16-bit]
  *1    When communicating 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          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 module FB has been processed normally when this argument is on.           Off
  (8)     o_bErr               Error completion          Bit           The module 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]
*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
                      CPU module                                                              RCPU
                      Engineering tool                                                        GX Works3
Language              Ladder diagram
Number of basic       362 steps
steps                 The number of steps of the FB in a program varies depending on the CPU module used, input and output definition, 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
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
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   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 code
Error code       Reference
1000H to          MELSEC iQ-R CC-Link IE TSN User's Manual (Application)
3FFFH
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
  4.1           M+model_DeviceRead
  The FB is the same as M+model_DeviceRead of the Ethernet-equipped module FB. ( Page 10 M+model_DeviceRead)
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)
                                                                                                                                    4
 M+RJ71EN71_EF_StationNoSet                      RJ71EN71(E+CCIEF)                      _RJ71EN71(E+IEF)
■RJ71GP21(S)-SX
M+RJ71GP21_StationNoSet
■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)
  ■Output arguments
  No.    Variable name     Name                Data          Description                                                             Default
                                               type                                                                                  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 module FB has been processed normally when this argument is on.     Off
  (6)    o_bErr            Error completion    Bit           The module 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]
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
Name
■RJ71GP21(S)-SX
M+RJ71GP21_RedundantSystem_GetAddress
■RJ71GF11-T2
M+RJ71GF11_RedundantSystem_GetAddress
■RJ71LP21-25
M+RJ71LP21_RedundantSystem_GetAddress
                                                                                                                                                                     4
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)
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            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
  ■Output arguments
  No.     Variable name         Name                  Data            Description                                                                  Default
                                                      type                                                                                         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 module FB has been processed normally when this argument is on.          Off
  (7)     o_bErr                Error completion      Bit             The module 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
                                                                      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           Range         Description                                                   Default
                                                        type                                                                                       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 in a program varies depending on the CPU module used, input and output definition, and the option
                     settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
o_u2TargetAddress 0H (1) 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
o_u2TargetAddress 0H
  5.1           M+model_DeviceRead
  The FB is the same as M+model_DeviceRead of the Ethernet-equipped module FB. ( Page 10 M+model_DeviceRead)
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                                                                                                                                5
 Item            Description
 Overview        Sets the parameters in the master, submaster, and local stations.
 Symbol
                                                    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)
(4) (5)
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 ten stations is set even if the total number of slave stations is two.
 The first and second information is enabled and parameters which are set the third to tenth 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 module FB has been processed normally when this argument is on.              Off
 (9)    o_bErr                Error completion       Bit               The module 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]
*1 Valid only when "Submaster station parameter operation setting" is ON (Operating with the parameters of the own (submaster) station)
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
  Error code
  Error code            Reference
  D000H to               MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
  DFFFH
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                                                                                                                                                        5
 Item                Description
 Overview            Reads the system configuration model information of the intelligent device station (remote head module).
 Symbol
                                  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)
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           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 own station.
                                                      [Unsigned]                        MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
                                                      /Bit String
                                                      [16-bit]
  ■Operation parameters
  No.     Variable name           Name                      Data             Range         Description                                                       Default
                                                            type                                                                                             value
  (10)    pbi_uResendCountMax     Maximum number of         Word             0 to 15       Specify the number of resends to be performed if the data         5
                                  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. If    0: 10s
                                  time                      [Unsigned]                     the processing is not completed within the monitoring time,
                                                            /Bit String                    data is resent until the value specified in "Maximum number
                                                            [16-bit]                       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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
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                                                                                                                                                        5
 Item                Description
 Overview            Reads the system configuration model status of the intelligent device station (remote head module).
 Symbol
                                 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)
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           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 own station.
                                                      [Unsigned]                        MELSEC iQ-R Programming Manual (Module Dedicated Instructions)
                                                      /Bit String
                                                      [16-bit]
  ■Operation parameters
  No.     Variable name       Name                        Data             Range         Description                                                       Default
                                                          type                                                                                             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. If    0: 10s
                              time                        [Unsigned]                     the processing is not completed within the monitoring time,
                                                          /Bit String                    data is resent until the value specified in "Maximum number
                                                          [16-bit]                       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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
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
                     (1)
                                     M+RJ71GF11_RemoteReset
                              B: i_bEN                          o_bENO: B         (5)
                                                                                                                                                                       5
                     (2)      DUT: i_stModule                    o_bOK: B         (6)
                     (3)      UW: i_uTargetNetworkNo             o_bErr: B        (7)
                     (4)      UW: i_uTargetStationNo       o_uErrId: UW           (8)
                                       pbo_u4ErrTime     (9)
                                   pbo_uErrNetworkNo     (10)
                                    pbo_uErrStationNo    (11)
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          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            Description                                                                      Default
                                                   type                                                                                             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 module FB has been processed normally when this argument is on.              Off
(7)    o_bErr                Error completion      Bit             The module 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]
  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 in a program varies depending on the CPU module used, input and output definition, 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
i_bEN
o_bENO
o_bOK
o_bErr
o_uErrId 0H
o_bENO
o_bOK
o_bErr
o_uErrId 0H (1) 0H
Error code
Error code            Reference
D000H to               MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
DFFFH
  6.1           M+model_DeviceRead
  The FB is the same as M+model_DeviceRead of the Ethernet-equipped module FB. ( Page 10 M+model_DeviceRead)
      6 MELSECNET/H MODULE FB
186   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 15 M+model_DeviceWrite)
                                                                               6 MELSECNET/H MODULE FB
                                                                                   6.2 M+model_DeviceWrite      187
  6.3           M+model_Send
  The FB is the same as M+model_Send of the Ethernet-equipped module FB. ( Page 22 M+model_Send)
      6 MELSECNET/H MODULE FB
188   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 28 M+model_Recv)
                                                                              6 MELSECNET/H MODULE FB
                                                                                      6.4 M+model_Recv   189
  6.5           M+model_RemoteStopRun
  The FB is the same as M+model_RemoteStopRun of the Ethernet-equipped module FB. ( Page 33
  M+model_RemoteStopRun)
      6 MELSECNET/H MODULE FB
190   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 38 M+model_ReadTime)
                                                                             6 MELSECNET/H MODULE FB
                                                                                  6.6 M+model_ReadTime    191
  6.7           M+model_WriteTime
  The FB is the same as M+model_WriteTime of the Ethernet-equipped module FB. ( Page 42 M+model_WriteTime)
      6 MELSECNET/H MODULE FB
192   6.7 M+model_WriteTime
6.8           M+model_RedundantSystem_GetAddress
The FB is the same as M+model_RedundantSystem_GetAddress of the CC-Link IE Controller Network Module FB. (
Page 155 M+model_RedundantSystem_GetAddress)
                                                                                6 MELSECNET/H MODULE FB
                                                                    6.8 M+model_RedundantSystem_GetAddress    193
  MEMO
      6 MELSECNET/H MODULE FB
194   6.8 M+model_RedundantSystem_GetAddress
INSTRUCTION INDEX
M                                                                               M+RJ71EN71_F_ReadTime . . . . . . . . . . . . . . . .38
                                                                                M+RJ71EN71_F_Recv . . . . . . . . . . . . . . . . . . . .28
M+RCPU_ConnectionClose . . . . . . . . . . . . . . . . 52                       M+RJ71EN71_F_RemoteStopRun . . . . . . . . . . . .33
M+RCPU_ConnectionOpen . . . . . . . . . . . . . . . . 47                        M+RJ71EN71_F_Send . . . . . . . . . . . . . . . . . . . .22
M+RCPU_Recv_Socket . . . . . . . . . . . . . . . . . . 55                       M+RJ71EN71_F_SetParameter . . . . . . . . . . . . .167
M+RCPU_Send_Socket . . . . . . . . . . . . . . . . . . 58                       M+RJ71EN71_F_StationNoSet . . . . . . . . . . . . .151
M+RCPU_SLMP_DeviceRead_IP . . . . . . . . . . . 63                              M+RJ71EN71_F_WriteTime . . . . . . . . . . . . . . . .42
M+RCPU_SLMP_DeviceWrite_IP . . . . . . . . . . . . 69                           M+RJ71EN71_RemoteReset . . . . . . . . . . . . . . .183
M+RJ71EN71_C_DeviceRead . . . . . . . . . . . . . . 10                          M+RJ71GF11_DeviceRead . . . . . . . . . . . . . . . . .10
M+RJ71EN71_C_DeviceWrite . . . . . . . . . . . . . . 15                         M+RJ71GF11_DeviceWrite . . . . . . . . . . . . . . . . .15
M+RJ71EN71_C_ReadTime . . . . . . . . . . . . . . . 38                          M+RJ71GF11_ReadSystemStatusInformation . . .179
M+RJ71EN71_C_Recv . . . . . . . . . . . . . . . . . . . 28                      M+RJ71GF11_ReadSystemTypeInformation . . . .175
M+RJ71EN71_C_RemoteStopRun . . . . . . . . . . . 33                             M+RJ71GF11_ReadTime . . . . . . . . . . . . . . . . . .38
M+RJ71EN71_C_Send . . . . . . . . . . . . . . . . . . . 22                      M+RJ71GF11_Recv . . . . . . . . . . . . . . . . . . . . . .28
M+RJ71EN71_C_StationNoSet . . . . . . . . . . . . 151                           M+RJ71GF11_RedundantSystem_GetAddress . .155
M+RJ71EN71_C_WriteTime . . . . . . . . . . . . . . . 42                         M+RJ71GF11_RemoteReset . . . . . . . . . . . . . . .183
M+RJ71EN71_EC_ConnectionClose . . . . . . . . . 52                              M+RJ71GF11_RemoteStopRun . . . . . . . . . . . . . .33
M+RJ71EN71_EC_ConnectionOpen . . . . . . . . . 47                               M+RJ71GF11_Send . . . . . . . . . . . . . . . . . . . . . .22
M+RJ71EN71_EC_DeviceRead . . . . . . . . . . . . . 10                           M+RJ71GF11_SetParameter . . . . . . . . . . . . . . .167
M+RJ71EN71_EC_DeviceWrite . . . . . . . . . . . . . 15                          M+RJ71GF11_StationNoSet . . . . . . . . . . . . . . .151
M+RJ71EN71_EC_ReadTime . . . . . . . . . . . . . . 38                           M+RJ71GF11_WriteTime . . . . . . . . . . . . . . . . . .42
M+RJ71EN71_EC_Recv . . . . . . . . . . . . . . . . . . 28                       M+RJ71GN11_DeviceRead . . . . . . . . . . . . . . . . .76
M+RJ71EN71_EC_Recv_Socket . . . . . . . . . . . . 55                            M+RJ71GN11_DeviceWrite . . . . . . . . . . . . . . . . .81
M+RJ71EN71_EC_Refresh_Data . . . . . . . . . . . . 61                           M+RJ71GN11_Recv . . . . . . . . . . . . . . . . . . . . . .94
M+RJ71EN71_EC_RemoteStopRun . . . . . . . . . . 33                              M+RJ71GN11_RemoteRead . . . . . . . . . . . . . . .129
M+RJ71EN71_EC_Send . . . . . . . . . . . . . . . . . . 22                       M+RJ71GN11_RemoteReset_IP . . . . . . . . . . . .139
M+RJ71EN71_EC_Send_Socket . . . . . . . . . . . . 58                            M+RJ71GN11_RemoteStopRun . . . . . . . . . . . . .99
M+RJ71EN71_EC_StationNoSet . . . . . . . . . . . 151                            M+RJ71GN11_RemoteWrite . . . . . . . . . . . . . . .134
M+RJ71EN71_EC_WriteTime . . . . . . . . . . . . . . 42                          M+RJ71GN11_Send . . . . . . . . . . . . . . . . . . . . . .88
M+RJ71EN71_EE_ConnectionClose . . . . . . . . . 52                              M+RJ71GN11_SetAddress . . . . . . . . . . . . . . . .119
M+RJ71EN71_EE_ConnectionOpen . . . . . . . . . . 47                             M+RJ71GN11_SetParameterX . . . . . . . . . . . . .122
M+RJ71EN71_EE_DeviceRead . . . . . . . . . . . . . 10                           M+RJ71GN11_SLMP_DeviceRead_IP . . . . . . . .105
M+RJ71EN71_EE_DeviceWrite . . . . . . . . . . . . . 15                          M+RJ71GN11_SLMP_DeviceWrite_IP . . . . . . . .112
M+RJ71EN71_EE_ReadTime . . . . . . . . . . . . . . 38
M+RJ71EN71_EE_Recv . . . . . . . . . . . . . . . . . . 28
                                                                                M+RJ71GP21_DeviceRead . . . . . . . . . . . . . . . . .10
                                                                                M+RJ71GP21_DeviceWrite . . . . . . . . . . . . . . . . .15
                                                                                                                                                      I
M+RJ71EN71_EE_Recv_Socket . . . . . . . . . . . . 55                            M+RJ71GP21_ReadTime . . . . . . . . . . . . . . . . . .38
M+RJ71EN71_EE_Refresh_Data . . . . . . . . . . . . 61                           M+RJ71GP21_Recv . . . . . . . . . . . . . . . . . . . . . .28
M+RJ71EN71_EE_RemoteStopRun . . . . . . . . . . 33                              M+RJ71GP21_RedundantSystem_GetAddress . .155
M+RJ71EN71_EE_Send . . . . . . . . . . . . . . . . . . 22                       M+RJ71GP21_RemoteStopRun . . . . . . . . . . . . . .33
M+RJ71EN71_EE_Send_Socket . . . . . . . . . . . . 58                            M+RJ71GP21_Send . . . . . . . . . . . . . . . . . . . . . .22
M+RJ71EN71_EE_WriteTime . . . . . . . . . . . . . . 42                          M+RJ71GP21_StationNoSet . . . . . . . . . . . . . . .151
M+RJ71EN71_EF_ConnectionClose . . . . . . . . . 52                              M+RJ71GP21_WriteTime . . . . . . . . . . . . . . . . . .42
M+RJ71EN71_EF_ConnectionOpen . . . . . . . . . . 47                             M+RJ71LP21_DeviceRead . . . . . . . . . . . . . . . . .10
M+RJ71EN71_EF_DeviceRead . . . . . . . . . . . . . 10                           M+RJ71LP21_DeviceWrite . . . . . . . . . . . . . . . . .15
M+RJ71EN71_EF_DeviceWrite . . . . . . . . . . . . . 15                          M+RJ71LP21_ReadTime . . . . . . . . . . . . . . . . . .38
M+RJ71EN71_EF_ReadSystemStatusInformation                                       M+RJ71LP21_Recv . . . . . . . . . . . . . . . . . . . . . .28
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179   M+RJ71LP21_RedundantSystem_GetAddress . .155
M+RJ71EN71_EF_ReadSystemTypeInformation 175                                     M+RJ71LP21_RemoteStopRun . . . . . . . . . . . . . .33
M+RJ71EN71_EF_ReadTime . . . . . . . . . . . . . . 38                           M+RJ71LP21_Send . . . . . . . . . . . . . . . . . . . . . .22
M+RJ71EN71_EF_Recv . . . . . . . . . . . . . . . . . . 28                       M+RJ71LP21_WriteTime . . . . . . . . . . . . . . . . . .42
M+RJ71EN71_EF_Recv_Socket . . . . . . . . . . . . 55
M+RJ71EN71_EF_Refresh_Data . . . . . . . . . . . . 61
M+RJ71EN71_EF_RemoteStopRun . . . . . . . . . . 33
M+RJ71EN71_EF_Send . . . . . . . . . . . . . . . . . . 22
M+RJ71EN71_EF_Send_Socket . . . . . . . . . . . . 58
M+RJ71EN71_EF_SetParameter . . . . . . . . . . . 167
M+RJ71EN71_EF_StationNoSet . . . . . . . . . . . 151
M+RJ71EN71_EF_WriteTime . . . . . . . . . . . . . . 42
M+RJ71EN71_F_DeviceRead . . . . . . . . . . . . . . 10
M+RJ71EN71_F_DeviceWrite . . . . . . . . . . . . . . 15
M+RJ71EN71_F_ReadSystemStatusInformation 179
M+RJ71EN71_F_ReadSystemTypeInformation . 175
                                                                                                                                                195
  MEMO
196
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
                                                                                                                                                                        197
  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.
198                                                                                             BCN-P5999-0381-N
BCN-P5999-0381-N(2003)
HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN
NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN
  When exported from Japan, this manual does not require application to the
  Ministry of Economy, Trade and Industry for service transaction permission.