0% found this document useful (0 votes)
92 views44 pages

Melsec Iq-R Profibus-Dp Module Function Block Reference

This function block executes a READ (Class 1) service to a specified PROFIBUS-DP slave via acyclic communication. It takes inputs like the target slave address and data length, and outputs include status flags and the read data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views44 pages

Melsec Iq-R Profibus-Dp Module Function Block Reference

This function block executes a READ (Class 1) service to a specified PROFIBUS-DP slave via acyclic communication. It takes inputs like the target slave address and data length, and outputs include status flags and the read data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

MELSEC iQ-R PROFIBUS-DP Module

Function Block Reference


CONTENTS
CHAPTER 1 MODULE FUNCTION BLOCK (FB) LIST 2

CHAPTER 2 PROFIBUS-DP MODULE 4


2.1 M+RJ71PB91V_ProfibusClass1Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 M+RJ71PB91V_ProfibusClass1Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 M+RJ71PB91V_AlarmAcquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

CONTENTS
2.4 M+RJ71PB91V_SlaveExtDiagInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.5 M+RJ71PB91V_ProfibusClass2Initiate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.6 M+RJ71PB91V_ProfibusClass2Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.7 M+RJ71PB91V_ProfibusClass2Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.8 M+RJ71PB91V_ProfibusClass2Abort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.9 M+RJ71PB91V_S_NotifyMstExtDiagInfo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

INSTRUCTION INDEX 37

REVISIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40

1
1 MODULE FUNCTION BLOCK (FB) LIST
This chapter lists the module function blocks used for the MELSEC iQ-R PROFIBUS-DP module.
Name*1 Description
M+RJ71PB91V_ProfibusClass1Read Executes the READ (Class 1) service to the specified DP-Slave via the acyclic communication.
M+RJ71PB91V_ProfibusClass1Write Executes the WRITE (Class 1) service to the specified DP-Slave via the acyclic communication.
M+RJ71PB91V_AlarmAcquisition Acquires up to eight alarm or status information data created in an arbitrary DP-Slave.
M+RJ71PB91V_SlaveExtDiagInfo Acquires the detailed information of the error that has occurred during data exchange.
M+RJ71PB91V_ProfibusClass2Initiate Executes the INITIATE (Class 2) service to the specified DP-Slave via the acyclic communication.
M+RJ71PB91V_ProfibusClass2Read Executes the READ (Class 2) service via the acyclic communication to the DP-Slave connected using the
INITIATE (Class 2) service.
M+RJ71PB91V_ProfibusClass2Write Executes the WRITE (Class 2) service via the acyclic communication to the DP-Slave connected using the
INITIATE (Class 2) service.
M+RJ71PB91V_ProfibusClass2Abort Executes the ABORT (Class 2) service to the specified DP-Slave via the acyclic communication.
M+RJ71PB91V_S_NotifyMstExtDiagInfo Requests the notification of extended diagnostic information or notification of correction of the relevant error from
DP-Slave to DP-Master.

*1 A name ends in the module FB version information such as "_00A"; however, this reference manual leaves out it.

1 MODULE FUNCTION BLOCK (FB) LIST


2
MEMO
1

1 MODULE FUNCTION BLOCK (FB) LIST


3
2 PROFIBUS-DP MODULE

2.1 M+RJ71PB91V_ProfibusClass1Read

Name
M+RJ71PB91V_ProfibusClass1Read

Overview
Item Description
Functional This module FB executes the READ (Class 1) service to the specified DP-Slave via the acyclic communication.
overview
Symbol
M+RJ71PB91V_ProfibusClass1Read

(1) B: i_bEN o_bENO: B (9)

(2) UW: i_uRequestInstructionNo o_bOK: B (10)

(3) UW: i_uFDLAddress o_bErr: B (11)

(4) UW: i_uDataLength o_uErrID: UW (12)

(5) UW: i_uSlotNo o_uReadData: UW (13)

(6) UW: i_uIndex o_uDataLength: UW (14)

(7) DUT: i_stInputManagement o_u3DetailedErrorCode: UW (15)

(8) DUT: i_stServiceResponseArea o_stOutputManagement: DUT (16)

o_stServiceRequestArea: DUT (17)

Labels
■Input arguments
No. Variable name Name Data type Scope Description
(1) i_bEN Execution Bit  On: The module FB is activated.
command Off: The module FB is not activated.
(2) i_uRequestInstructionNo Request instruction Word [unsigned]/bit 1 to 8 Specifies the target request instruction number.
number string [16 bits]
(3) i_uFDLAddress FDL address Word [unsigned]/bit 0 to 125 Specifies the target FDL address.
string [16 bits] (00H to
7DH)
(4) i_uDataLength Read data length Word [unsigned]/bit 1 to 240 Specifies the read data length in bytes.
string [16 bits]
(5) i_uSlotNo Slot number Word [unsigned]/bit 0 to 254 Specifies the target slot number.
string [16 bits]
(6) i_uIndex Index Word [unsigned]/bit 0 to 255 Specifies the target index.
string [16 bits]
(7) i_stInputManagement PROFIBUS input Structure  Specifies the global label for the PROFIBUS input
management area management area.
(8) i_stServiceResponseAre Service response Structure  Specifies the global label for the service response area.
a area

2 PROFIBUS-DP MODULE
4 2.1 M+RJ71PB91V_ProfibusClass1Read
■Output arguments
No. Variable name Name Data type Default Description
value
(9) o_bENO Execution status Bit Off On: In execution
Off: Not in execution
(10) o_bOK Normal completion Bit Off The on state indicates that the module FB processing has
been completed successfully.
2
(11) o_bErr Error completion Bit Off The on state indicates that the module FB processing has
been completed with an error.
(12) o_uErrID Error ID Word [unsigned]/bit 0 The error ID for the request instruction sent via the acyclic
string [16 bits] communication is stored.
(13) o_uReadData Storage location of Word [unsigned]/bit 0 The start number of the device where the read data will be
read data string [16 bits] saved is stored.
(14) o_uDataLength Read data length Word [unsigned]/bit 0 The read data length in bytes is stored.
string [16 bits]
(15) o_u3DetailedErrorCode Error details Word [unsigned]/bit 0 Error details for the request instruction sent via the acyclic
string [16 bits] (0..2) communication are stored.
(16) o_stOutputManagement PROFIBUS output Structure 0 The global label for the PROFIBUS output management area
management area is stored.
(17) o_stServiceRequestArea Service request Structure 0 The global label for the service request area is stored.
area

FB details
Item Description
Available device Module RJ71PB91V
CPU module RCPU
Engineering tool GX Works3
Language FBD
Number of basic 785 steps
steps The number of steps of the module FB embedded in a program depends on the CPU module used, the input/output definitions, and the
option setting of GX Works3.
For the option setting of GX Works3, refer to the GX Works3 Operating Manual.
Processing This module FB reads the cyclic data of the Class 1 service from the DP-Slave using one request instruction out of eight usable request
instructions.
When i_bEN (execution command) is turned on, it executes the READ service request/response processing using the request instruction
specified with i_uRequestInstructionNo (request instruction number) to the DP-Slave specified with i_uFDLAddress (FDL address).
Upon receipt of a response from the DP-Slave, o_bOK (normal completion) is turned on.
In the event of a response error, o_bErr (error completion) is turned on, and o_uErrID (error ID) and o_u3DetailedErrorCode (error details)
are stored.
FB compilation Macro type
method
FB operation Executes when FB is turned on
Input condition for None
FB_EN

2 PROFIBUS-DP MODULE
2.1 M+RJ71PB91V_ProfibusClass1Read 5
Item Description
Timing chart of I/O ■When the operation is completed successfully
signals
ON
i_bEN OFF

ON
o_bENO OFF

READ service request/


(1) (2) (1)
response processing
ON
o_bOK OFF

o_uReadData (3)

o_bErr OFF

o_uErrID

(1) Unexecuted
(2) Executed
(3) Read data
■When the operation is completed with an error

ON
i_bEN OFF

ON
o_bENO OFF

READ service request/


(1) (2) (1)
response processing
o_bOK OFF

o_uReadData
ON

o_bErr OFF

o_uErrID (3)

o_u3DetailedErrorCode (4)

(1) Unexecuted
(2) Executed
(3) Error ID
(4) Error details
Precautions • Before using this module FB in the program, update the PROFIBUS labels. ( MELSEC iQ-R PROFIBUS-DP Module User's Manual
(Application))
• This module FB does not include the error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) turns on. By turning off i_bEN
(execution command), o_bOK (normal completion) and o_bErr (error completion) are turned off, and o_uErrID (error ID) is cleared to 0.
• Use eight request instructions separately.

2 PROFIBUS-DP MODULE
6 2.1 M+RJ71PB91V_ProfibusClass1Read
Error ID and error details
For o_uErrID (error ID) and o_u3DetailedErrorCode (error details), refer to the following.
Stored value Description Action
0100H The request instruction number is out of Check whether the specified request instruction number is correct or not, then execute it again.

Other than
the setting range.
The status code of RJ71PB91V  MELSEC iQ-R PROFIBUS-DP Module User's Manual (Application)
2
0100H

Operation parameters
M+RJ71PB91V_ProfibusClass1Read has no operation parameters.

2 PROFIBUS-DP MODULE
2.1 M+RJ71PB91V_ProfibusClass1Read 7
2.2 M+RJ71PB91V_ProfibusClass1Write

Name
M+RJ71PB91V_ProfibusClass1Write

Overview
Item Description
Functional This module FB executes the WRITE (Class 1) service to the specified DP-Slave via the acyclic communication.
overview
Symbol
M+RJ71PB91V_ProfibusClass1Write

(1) B: i_bEN o_bENO: B (10)

(2) UW: i_uRequestInstructionNo o_bOK: B (11)

(3) UW: i_uFDLAddress o_bErr: B (12)

(4) UW: i_uDataLength o_uErrID: UW (13)

(5) UW: i_uSlotNo o_uDataLength: UW (14)

(6) UW: i_uIndex o_u3DetailedErrorCode: UW (15)

(7) UW: i_uWriteData o_stOutputManagement: DUT (16)

(8) DUT: i_stInputManagement o_stServiceRequestArea: DUT (17)

(9) DUT: i_stServiceResponseArea

Labels
■Input arguments
No. Variable name Name Data type Scope Description
(1) i_bEN Execution Bit  On: The module FB is activated.
command Off: The module FB is not activated.
(2) i_uRequestInstructionNo Request instruction Word [unsigned]/bit 1 to 8 Specifies the target request instruction number.
number string [16 bits]
(3) i_uFDLAddress FDL address Word [unsigned]/bit 0 to 125 Specifies the target FDL address.
string [16 bits] (00H to
7DH)
(4) i_uDataLength Write data length Word [unsigned]/bit 1 to 240 Specifies the write data length in bytes.
string [16 bits]
(5) i_uSlotNo Slot number Word [unsigned]/bit 0 to 254 Specifies the target slot number.
string [16 bits]
(6) i_uIndex Index Word [unsigned]/bit 0 to 255 Specifies the target index.
string [16 bits]
(7) i_uWriteData Storage location of Word [unsigned]/bit  Specifies the start number of the device where the write data
the write data string [16 bits] are saved.
(8) i_stInputManagement PROFIBUS input Structure  Specifies the global label for the PROFIBUS input
management area management area.
(9) i_stServiceResponseAre Service response Structure  Specifies the global label for the service response area.
a area

2 PROFIBUS-DP MODULE
8 2.2 M+RJ71PB91V_ProfibusClass1Write
■Output arguments
No. Variable name Name Data type Default Description
value
(10) o_bENO Execution status Bit Off On: In execution
Off: Not in execution
(11) o_bOK Normal completion Bit Off The on state indicates that the module FB processing has
been completed successfully.
2
(12) o_bErr Error completion Bit Off The on state indicates that the module FB processing has
been completed with an error.
(13) o_uErrID Error ID Word [unsigned]/bit 0 The error ID for the request instruction sent via the acyclic
string [16 bits] communication is stored.
(14) o_uDataLength Write data length Word [unsigned]/bit 0 The write data length in bytes is stored.
string [16 bits]
(15) o_u3DetailedErrorCode Error details Word [unsigned]/bit 0 Error details for the request instruction sent via the acyclic
string [16 bits] (0..2) communication are stored.
(16) o_stOutputManagement PROFIBUS output Structure 0 The global label for the PROFIBUS output management area
management area is stored.
(17) o_stServiceRequestArea Service request Structure 0 The global label for the service request area is stored.
area

FB details
Item Description
Available device Module RJ71PB91V
CPU module RCPU
Engineering tool GX Works3
Language FBD
Number of basic 785 steps
steps The number of steps of the module FB embedded in a program depends on the CPU module used, the input/output definitions, and the
option setting of GX Works3.
For the option setting of GX Works3, refer to the GX Works3 Operating Manual.
Processing This module FB writes the cyclic data of the Class 1 service to the DP-Slave using one request instruction out of eight usable request
instructions.
When i_bEN (execution command) is turned on, it executes the WRITE service request/response processing using the request instruction
specified with i_uRequestInstructionNo (request instruction number) to the DP-Slave specified with i_uFDLAddress (FDL address).
Set the data length with i_uDataLength (write data length).
Upon receipt of a response from the DP-Slave, o_bOK (normal completion) is turned on.
In the event of a response error, o_bErr (error completion) is turned on, and o_uErrID (error ID) and o_u3DetailedErrorCode (error details)
are stored.
FB compilation Macro type
method
FB operation Executes when FB is turned on
Input condition for None
FB_EN

2 PROFIBUS-DP MODULE
2.2 M+RJ71PB91V_ProfibusClass1Write 9
Item Description
Timing chart of I/O ■When the operation is completed successfully
signals
ON
i_bEN OFF

ON
o_bENO OFF

i_uWriteData (1)

Write service request/


(2) (3) (2)
response processing
ON
o_bOK OFF

o_bErr OFF

o_uErrID

(1) Write data


(2) Unexecuted
(3) Executed
■When the operation is completed with an error

ON
i_bEN OFF

ON
o_bENO OFF

i_uWriteData (1)

Write service request/


(2) (3) (2)
response processing

o_bOK OFF

ON
o_bErr OFF

o_uErrID (4)

o_u3DetailedErrorCode (5)

(1) Write data


(2) Unexecuted
(3) Executed
(4) Error ID
(5) Error details
Precautions • Before using this module FB in the program, update the PROFIBUS labels. ( MELSEC iQ-R PROFIBUS-DP Module User's Manual
(Application))
• This module FB does not include the error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) turns on. By turning off i_bEN
(execution command), o_bOK (normal completion) and o_bErr (error completion) are turned off, and o_uErrID (error ID) is cleared to 0.
• Use eight request instructions separately.

2 PROFIBUS-DP MODULE
10 2.2 M+RJ71PB91V_ProfibusClass1Write
Error ID and error details
For o_uErrID (error ID) and o_u3DetailedErrorCode (error details), refer to the following.
Stored value Description Action
0100H The request instruction number is out of Check whether the specified request instruction number is correct or not, then execute it again.

Other than
the setting range.
The status code of RJ71PB91V  MELSEC iQ-R PROFIBUS-DP Module User's Manual (Application)
2
0100H

Operation parameters
M+RJ71PB91V_ProfibusClass1Write has no operation parameters.

2 PROFIBUS-DP MODULE
2.2 M+RJ71PB91V_ProfibusClass1Write 11
2.3 M+RJ71PB91V_AlarmAcquisition

Name
M+RJ71PB91V_AlarmAcquisition

Overview
Item Description
Functional This module FB acquires up to eight alarm or status information data created in an arbitrary DP-Slave.
overview
Symbol
M+RJ71PB91V_AlarmAcquisition

(1) B: i_bEN o_bENO: B (7)

(2) UW: i_uFDLAddress o_bOK: B (8)

(3) UW: i_uRequestCode o_bErr: B (9)

(4) UW: i_b8ReturnAckAlarmDataNo o_uErrID: UW (10)

(5) DUT: i_stInputManagement o_stOutputManagement: DUT (11)

(6) DUT: i_stAlarmResultArea o_stAlarmRequestArea: DUT (12)

Labels
■Input arguments
No. Variable name Name Data type Scope Description
(1) i_bEN Execution Bit  On: The module FB is activated.
command Off: The module FB is not activated.
(2) i_uFDLAddress FDL address Word [unsigned]/bit 0 to 125 Specifies the target FDL address.
string [16 bits] (00H to 7DH)
(3) i_uRequestCode Request code Word [unsigned]/bit 1500H to Specifies the request code from the following options.
string [16 bits] 1502H 1500H: Alarm read request with no ACK
1501H: Alarm ACK request
1502H: Alarm read request with ACK
(4) i_b8ReturnAckAlarmData ACK data number Bit (0..7) Only when the Specifies the number of the acquired alarm data to which
No request code is the ACK is returned.
1501H (alarm
ACK request)
(5) i_stInputManagement PROFIBUS input Structure  Specifies the global label for the PROFIBUS input
management area management area.
(6) i_stAlarmResultArea Alarm response Structure  Specifies the global label for the alarm response area.
area

■Output arguments
No. Variable name Name Data type Default Description
value
(7) o_bENO Execution status Bit Off On: In execution
Off: Not in execution
(8) o_bOK Normal completion Bit Off The on state indicates that the module FB processing has
been completed successfully.
(9) o_bErr Error completion Bit Off The on state indicates that the module FB processing has
been completed with an error.
(10) o_uErrID Error ID Word [unsigned]/bit 0 The error ID for the alarm read request instruction is
string [16 bits] stored.
(11) o_stOutputManagement PROFIBUS output Structure 0 The global label for the PROFIBUS output management
management area area is stored.
(12) o_stAlarmRequestArea Alarm request area Structure 0 The global label for the alarm request area is stored.

2 PROFIBUS-DP MODULE
12 2.3 M+RJ71PB91V_AlarmAcquisition
FB details
Item Description
Available device Module RJ71PB91V
CPU module RCPU
Engineering tool GX Works3
2
Language FBD
Number of basic 792 steps
steps The number of steps of the module FB embedded in a program depends on the CPU module used, the input/output definitions, and the
option setting of GX Works3.
For the option setting of GX Works3, refer to the GX Works3 Operating Manual.
Processing This module FB sends the alarm acquisition request to an arbitrarily DP-Master in the network and acquires up to eight created alarm or
status information data.
When i_bEN (execution command) is turned on, it executes the alarm acquisition processing to the DP-Slave specified with
i_uFDLAddress (FDL address).
Upon receipt of a response from the DP-Slave, o_bOK (normal completion) is turned on.
In the event of a response error, o_bErr (error completion) is turned on and o_uErrID (error ID) is stored.
FB compilation Macro type
method
FB operation Executes when FB is turned on
Input condition for None
FB_EN
Timing chart of I/O ■When the operation is completed successfully
signals
ON
i_bEN OFF

ON
o_bENO OFF

Alarm acquisition
(1) (2) (1)
processing
ON
o_bOK OFF

Alarm or status
(3)
information

o_bErr OFF

(1) Unexecuted
(2) Executed
(3) Alarm data
■When the operation is completed with an error

ON
i_bEN OFF

ON
o_bENO OFF

Alarm acquisition (1) (2) (1)


processin

o_bOK OFF

Alarm or status
information
ON
o_bErr OFF

(1) Unexecuted
(2) Executed

2 PROFIBUS-DP MODULE
2.3 M+RJ71PB91V_AlarmAcquisition 13
Item Description
Precautions • Before using this module FB in the program, update the PROFIBUS labels. ( MELSEC iQ-R PROFIBUS-DP Module User's Manual
(Application))
• This module FB does not include the error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.

Error ID
The status code of RJ71PB91V is stored in o_uErrID (error ID). ( MELSEC iQ-R PROFIBUS-DP Module User's Manual
(Application))

Operation parameters
M+RJ71PB91V_AlarmAcquisition has no operation parameters.

2 PROFIBUS-DP MODULE
14 2.3 M+RJ71PB91V_AlarmAcquisition
2.4 M+RJ71PB91V_SlaveExtDiagInfo

Name
M+RJ71PB91V_SlaveExtDiagInfo
2
Overview
Item Description
Functional The detailed information of the error that has occurred during data exchange is acquired.
overview
Symbol
M+RJ71PB91V_SlaveExtDiagInfo

(1) B: i_bEN o_bENO: B (5)

(2) UW: i_uFDLAddress o_bOK: B (6)

(3) DUT: i_stInputManagement o_bErr: B (7)

(4) DUT: i_stExtDiagnosticsResultArea o_uErrID: UW (8)

o_stOutputManagement: DUT (9)

o_stExtDiagnosticsRequestArea: DUT (10)

Labels
■Input arguments
No. Variable name Name Data type Scope Description
(1) i_bEN Execution Bit  On: The module FB is activated.
command Off: The module FB is not activated.
(2) i_uFDLAddress FDL address Word 0 to 125 Specifies the target FDL address.
[unsigned]/bit (00H to
string [16 bits] 7DH)
(3) i_stInputManagement PROFIBUS input Structure 0 Specifies the global label for the PROFIBUS input
management area management area.
(4) i_stExtDiagnosticsResultArea Extended Structure 0 Specifies the global label for the extended diagnostic
diagnostic information read response area.
information read
response area

■Output arguments
No. Variable name Name Data type Default Description
value
(5) o_bENO Execution status Bit Off On: In execution
Off: Not in execution
(6) o_bOK Normal completion Bit Off The on state indicates that the module FB processing has
been completed successfully.
(7) o_bErr Error completion Bit Off The on state indicates that the module FB processing has
been completed with an error.
(8) o_uErrID Error ID Word 0 The error ID for the extended diagnostic information read
[unsigned]/bit request instruction is stored.
string [16 bits]
(9) o_stOutputManagement PROFIBUS output Structure 0 The global label for the PROFIBUS output management area
management area is stored.
(10) o_stExtDiagnosticsRequestAre Extended Structure 0 The global label for the extended diagnostic information read
a diagnostic request area is stored.
information read
request area

2 PROFIBUS-DP MODULE
2.4 M+RJ71PB91V_SlaveExtDiagInfo 15
FB details
Item Description
Available device Module RJ71PB91V
CPU module RCPU
Engineering tool GX Works3
Language FBD
Number of basic 621 steps
steps The number of steps of the module FB embedded in a program depends on the CPU module used, the input/output definitions, and the
option setting of GX Works3.
For the option setting of GX Works3, refer to the GX Works3 Operating Manual.
Processing This module FB sends the extended diagnostic error information acquisition request to the specified DP-Slave to acquire the detailed
information of the error that has occurred during data exchange.
When i_bEN (execution command) is turned on, it executes the extended diagnostic information acquisition request processing to the DP-
Slave specified with i_uFDLAddress (FDL address).
Upon receipt of a response from the DP-Slave, o_bOK (normal completion) is turned on.
In the event of a response error, o_bErr (error completion) is turned on and o_uErrID (error ID) is stored.
FB compilation Macro type
method
FB operation Executes when FB is turned on
Input condition for None
FB_EN
Timing chart of I/O ■When the operation is completed successfully
signals
ON
i_bEN OFF

ON
o_bENO OFF

Extended diagnostic
information
(1) (2) (1)
acquisition request
processing
ON
o_bOK OFF

Extended diagnostic
(3)
information

o_bErr OFF

(1) Unexecuted
(2) Executed
(3) Extended diagnostic information data
■When the operation is completed with an error

ON
i_bEN OFF

ON
o_bENO OFF

Extended diagnostic
information
(1) (2) (1)
acquisition request
processing

o_bOK OFF

Extended diagnostic
information
ON
o_bErr OFF

(1) Unexecuted
(2) Executed

2 PROFIBUS-DP MODULE
16 2.4 M+RJ71PB91V_SlaveExtDiagInfo
Item Description
Precautions • Before using this module FB in the program, update the PROFIBUS labels. ( MELSEC iQ-R PROFIBUS-DP Module User's Manual
(Application))
• This module FB does not include the error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.

Error ID 2
The status code of RJ71PB91V is stored in o_uErrID (error ID). ( MELSEC iQ-R PROFIBUS-DP Module User's Manual
(Application))

Operation parameters
M+RJ71PB91V_SlaveExtDiagInfo has no operation parameters.

2 PROFIBUS-DP MODULE
2.4 M+RJ71PB91V_SlaveExtDiagInfo 17
2.5 M+RJ71PB91V_ProfibusClass2Initiate

Name
M+RJ71PB91V_ProfibusClass2Initiate

Overview
Item Description
Functional This module FB executes the INITIATE (Class 2) service to the specified DP-Slave via the acyclic communication.
overview
Symbol
M+RJ71PB91V_ProfibusClass2Initiate

(1) B: i_bEN o_bENO: B (13)

(2) UW: i_uRequestInstructionNo o_bOK: B (14)

(3) UW: i_uFDLAddress o_bErr: B (15)

(4) UW: i_uTimeoutTransmission o_uErrID: UW (16)

(5) UW: i_uAlignment o_uCommRefNo: UW (17)

(6) UW: i_uFeaturesSupported o_uMaxLenDataUnit: UW (18)

(7) UW: i_uProfileFeaturesSupported o_uFeaturesSupported: UW (19)

(8) UW: i_uProfileIdentNumber o_uProfileFeaturesSupported: UW (20)

(9) UW: i_uS_LenType o_uProfileIdentNo: UW (21)

(10) UW: i_uD_LenType o_uS_Type: UW (22)

(11) DUT: i_stInputManagement o_uS_Len: UW (23)

(12) DUT: i_stServiceResponseArea o_uD_Type: UW (24)

o_uD_Len: UW (25)

o_u3DetailedErrorCode: UW (26)

o_stOutputManagement: DUT (27)

o_stServiceRequestArea: DUT (28)

Labels
■Input arguments
No. Variable name Name Data type Scope Description
(1) i_bEN Execution Bit  On: The module FB is activated.
command Off: The module FB is not activated.
(2) i_uRequestInstructionNo Request instruction Word [unsigned]/bit 1 to 8 Specifies the target request instruction number.
number string [16 bits]
(3) i_uFDLAddress FDL address Word [unsigned]/bit 0 to 125 Specifies the target FDL address.
string [16 bits] (00H to 7DH)
(4) i_uTimeoutTransmission Transmission Word [unsigned]/bit 0 to 65535*1 Specifies the transmission timeout value.
timeout value string [16 bits]
(5) i_uAlignment Alignment Word [unsigned]/bit 0 to 65535*1 Specifies the Alignment.
string [16 bits]
(6) i_uFeaturesSupported Features Word [unsigned]/bit 0 to 65535*1 Specifies the Features Supported.
Supported string [16 bits]
(7) i_uProfileFeaturesSuppor Profile Features Word [unsigned]/bit 0 to 65535*1 Specifies the Profile Features Supported.
ted Supported string [16 bits]

2 PROFIBUS-DP MODULE
18 2.5 M+RJ71PB91V_ProfibusClass2Initiate
No. Variable name Name Data type Scope Description
(8) i_uProfileIdentNumber Profile Ident Word [unsigned]/bit 0 to 65535*1 Specifies the Profile Ident Number.
Number string [16 bits]
(9) i_uS_LenType Send source type Word [unsigned]/bit Higher order: 0 Higher order: Specifies the send source type.
and size string [16 bits] to 255*1 Lower order: Specifies the send source size.
Lower order: 0

(10) i_uD_LenType Destination type Word [unsigned]/bit


to 255*1
Higher order: 0 Higher order: Specifies the destination type.
2
and size string [16 bits] to 255*1 Lower order: Specifies the destination size.
Lower order: 0
to 255*1
(11) i_stInputManagement PROFIBUS input Structure  Specifies the global label for the PROFIBUS input
management area management area.
(12) i_stServiceResponseAre Service response Structure  Specifies the global label for the service response area.
a area

*1 The setting range varies depending on the specifications of the DP-Slave.

■Output arguments
No. Variable name Name Data type Default Description
value
(13) o_bENO Execution status Bit Off On: In execution
Off: Not in execution
(14) o_bOK Normal completion Bit Off The on state indicates that the module FB processing has
been completed successfully.
(15) o_bErr Error completion Bit Off The on state indicates that the module FB processing has
been completed with an error.
(16) o_uErrID Error ID Word [unsigned]/bit 0 The error ID for the request instruction sent via the acyclic
string [16 bits] communication is stored.
(17) o_uCommRefNo CommRef number Word [unsigned]/bit 0 The communication reference number that is included in
string [16 bits] the response format of the INITIATE (Class 2) service is
stored.
(18) o_uMaxLenDataUnit Maximum data unit Word [unsigned]/bit 0 The maximum data unit length is stored.
length string [16 bits]
(19) o_uFeaturessSupported Supported Word [unsigned]/bit 0 The supported functions are stored.
functions string [16 bits]
(20) o_uProfileFeaturesSuppo Supported profiles Word [unsigned]/bit 0 The supported profile functions are stored.
rted string [16 bits]
(21) o_uProfileIdentNo Profile ID Word [unsigned]/bit 0 The supported profile ID is stored.
string [16 bits]
(22) o_uS_Type Send source Word [unsigned]/bit 0 The send source address parameter type is stored.
address parameter string [16 bits]
type
(23) o_uS_Len Send source Word [unsigned]/bit 0 The send source address parameter size is stored.
address parameter string [16 bits]
size
(24) o_uD_Type Destination Word [unsigned]/bit 0 Stores the destination address parameter type.
address parameter string [16 bits]
type
(25) o_uD_Len Destination Word [unsigned]/bit 0 The destination address parameter size is stored.
address parameter string [16 bits]
size
(26) o_u3DetailedErrorCode Error details Word [unsigned]/bit 0 Error details for the request instruction sent via the acyclic
string [16 bits] (0..2) communication are stored.
(27) o_stOutputManagement PROFIBUS output Structure 0 The global label for the PROFIBUS output management
management area area is stored.
(28) o_stServiceRequestArea Service request Structure 0 The global label for the service request area is stored.
area

2 PROFIBUS-DP MODULE
2.5 M+RJ71PB91V_ProfibusClass2Initiate 19
FB details
Item Description
Available device Module RJ71PB91V
CPU module RCPU
Engineering tool GX Works3
Language FBD
Number of basic 844 steps
steps The number of steps of the module FB embedded in a program depends on the CPU module used, the input/output definitions, and the
option setting of GX Works3.
For the option setting of GX Works3, refer to the GX Works3 Operating Manual.
Processing This module FB establishes the line connection to the specified DP-Slave using one request instruction out of eight request instructions
usable in the acyclic communication.
When i_bEN (execution command) is turned on, it executes the INITIATE service request/response processing using the request
instruction specified with i_uRequestInstructionNo (request instruction number) to the DP-Slave specified with i_uFDLAddress (FDL
address).
When the communication with the DP-Slave is successfully established, o_bOK (normal completion) is turned on and the CommRef
number is stored in o_uCommRefNo (CommRef number).
In the event of a response error, o_bErr (error completion) is turned on, and o_uErrID (error ID) and o_u3DetailedErrorCode (error details)
are stored.
FB compilation Macro type
method
FB operation Executes when FB is turned on
Input condition for None
FB_EN
Timing chart of I/O ■When the operation is completed successfully
signals
ON
i_bEN OFF

ON
o_bENO OFF

INITIATE service request/


(1) (2) (1)
response processing
ON
o_bOK OFF

INITIATE service response


(3)
data

o_bErr OFF

o_uErrID

(1) Unexecuted
(2) Executed
(3) Response data

2 PROFIBUS-DP MODULE
20 2.5 M+RJ71PB91V_ProfibusClass2Initiate
Item Description
Timing chart of I/O ■When the operation is completed with an error
signals
ON
i_bEN OFF

ON
o_bENO OFF
2
INITIATE service request/
(1) (2) (1)
response processing

o_bOK OFF

INITIATE service response


data
ON
o_bErr OFF

o_uErrID (3)

o_u3DetailedErrorCode (4)

(1) Unexecuted
(2) Executed
(3) Error ID
(4) Error details
Precautions • Before using this module FB in the program, update the PROFIBUS labels. ( MELSEC iQ-R PROFIBUS-DP Module User's Manual
(Application))
• This module FB does not include the error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) turns on. By turning off i_bEN
(execution command), o_bOK (normal completion) and o_bErr (error completion) are turned off, and o_uErrID (error ID) is cleared to 0.
• Acyclic communication has eight request instructions. Data of each channel can be read/written from/to the DP-Slave at a specified
timing independently of data exchange.

Error ID and error details


For o_uErrID (error ID) and o_u3DetailedErrorCode (error details), refer to the following.
Stored value Description Action
0100H The request instruction number is out of Check whether the specified request instruction number is correct or not, then execute it again.
the setting range.
Other than The status code of RJ71PB91V  MELSEC iQ-R PROFIBUS-DP Module User's Manual (Application)
0100H

Operation parameters
M+RJ71PB91V_ProfibusClass2Initiate has no operation parameters.

2 PROFIBUS-DP MODULE
2.5 M+RJ71PB91V_ProfibusClass2Initiate 21
2.6 M+RJ71PB91V_ProfibusClass2Read

Name
M+RJ71PB91V_ProfibusClass2Read

Overview
Item Description
Functional This module FB executes the READ (Class 2) service via the acyclic communication to the DP-Slave connected using the INITIATE
overview (Class 2) service.
Symbol
M+RJ71PB91V_ProfibusClass2Read

(1) B: i_bEN o_bENO: B (10)

(2) UW: i_uRequestInstructionNo o_bOK: B (11)

(3) UW: i_uFDLAddress o_bErr: B (12)

(4) UW: i_uCommRefNo o_uErrID: UW (13)

(5) UW: i_uDataLength o_uReadData: UW (14)

(6) UW: i_uSlotNo o_uDataLength: UW (15)

(7) UW: i_uIndex o_u3DetailedErrorCode: UW (16)

(8) DUT: i_stInputManagement o_stOutputManagement: DUT (17)

(9) DUT: i_stServiceResponseArea o_stServiceRequestArea: DUT (18)

Labels
■Input arguments
No. Variable name Name Data type Scope Description
(1) i_bEN Execution Bit  On: The module FB is activated.
command Off: The module FB is not activated.
(2) i_uRequestInstructionNo Request instruction Word [unsigned]/bit 1 to 8 Specifies the target request instruction number.
number string [16 bits]
(3) i_uFDLAddress FDL address Word [unsigned]/bit 0 to 125 Specifies the target FDL address.
string [16 bits] (00H to
7DH)
(4) i_uCommRefNo CommRef number Word [unsigned]/bit 0 to 126 Stores the CommRef number that is included in the response
string [16 bits] format of the INITIATE (Class 2) service.
(5) i_uDataLength Read data length Word [unsigned]/bit 1 to 240 Specifies the read data length in bytes.
string [16 bits]
(6) i_uSlotNo Slot number Word [unsigned]/bit 0 to 254 Specifies the target slot number.
string [16 bits]
(7) i_uIndex Index Word [unsigned]/bit 0 to 255 Specifies the target index.
string [16 bits]
(8) i_stInputManagement PROFIBUS input Structure  Specifies the global label for the PROFIBUS input management
management area area.
(9) i_stServiceResponseAre Service response Structure  Specifies the global label for the service response area.
a area

2 PROFIBUS-DP MODULE
22 2.6 M+RJ71PB91V_ProfibusClass2Read
■Output arguments
No. Variable name Name Data type Default Description
value
(10) o_bENO Execution status Bit Off On: In execution
Off: Not in execution
(11) o_bOK Normal completion Bit Off The on state indicates that the module FB processing has been
completed successfully.
2
(12) o_bErr Error completion Bit Off The on state indicates that the module FB processing has been
completed with an error.
(13) o_uErrID Error ID Word [unsigned]/bit 0 The error ID for the request instruction sent via the acyclic
string [16 bits] communication is stored.
(14) o_uReadData Storage location of Word [unsigned]/bit 0 The start number of the device where the read data will be
read data string [16 bits] saved is stored.
(15) o_uDataLength Read data length Word [unsigned]/bit 0 The read data length in bytes is stored.
string [16 bits]
(16) o_u3DetailedErrorCode Error details Word [unsigned]/bit 0 Error details for the request instruction sent via the acyclic
string [16 bits] (0..2) communication are stored.
(17) o_stOutputManagement PROFIBUS output Structure 0 The global label for the PROFIBUS output management area is
management area stored.
(18) o_stServiceRequestArea Service request Structure 0 The global label for the service request area is stored.
area

FB details
Item Description
Available device Module RJ71PB91V
CPU module RCPU
Engineering tool GX Works3
Language FBD
Number of basic 817 steps
steps The number of steps of the module FB embedded in a program depends on the CPU module used, the input/output definitions, and the
option setting of GX Works3.
For the option setting of GX Works3, refer to the GX Works3 Operating Manual.
Processing Using one request instruction out of eight request instructions usable in the acyclic communication, this module FB reads the data from
the DP-Slave connected using the INITIATE (Class 2) service.
When i_bEN (execution command) is turned on, it executes the READ service request/response processing using the request instruction
specified with i_uRequestInstructionNo (request instruction number) to the DP-Slave specified with i_uFDLAddress (FDL address).
When the communication with the DP-Slave is successfully established, o_bOK (normal completion) is turned on.
In the event of a response error, o_bErr (error completion) is turned on, and o_uErrID (error ID) and o_u3DetailedErrorCode (error details)
are stored.
FB compilation Macro type
method
FB operation Executes when FB is turned on
Input condition for None
FB_EN

2 PROFIBUS-DP MODULE
2.6 M+RJ71PB91V_ProfibusClass2Read 23
Item Description
Timing chart of I/O ■When the operation is completed successfully
signals
ON
i_bEN OFF

ON
o_bENO OFF

READ service request/


(1) (2) (1)
response processing
ON
o_bOK OFF

o_uReadData (3)

o_bErr OFF

o_uErrID

(1) Unexecuted
(2) Executed
(3) Read data
Timing chart of I/O ■When the operation is completed with an error
signals
ON
i_bEN OFF

ON
o_bENO OFF

READ service request/


(1) (2) (1)
response processing

o_bOK OFF

o_uReadData

ON
o_bErr OFF

o_uErrID (3)

o_u3DetailedErrorCode (4)

(1) Unexecuted
(2) Executed
(3) Error ID
(4) Error details
Precautions • Before using this module FB in the program, update the PROFIBUS labels. ( MELSEC iQ-R PROFIBUS-DP Module User's Manual
(Application))
• This module FB does not include the error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) turns on. By turning off i_bEN
(execution command), o_bOK (normal completion) and o_bErr (error completion) are turned off, and o_uErrID (error ID) is cleared to 0.
• Acyclic communication has eight request instructions. Data of each request instruction can be read/written from/to the DP-Slave at a
specified timing independently of data exchange.
• This READ (Class 2) service can be executed only to the DP-Slaves connected using the INITIATE (Class 2) service.

2 PROFIBUS-DP MODULE
24 2.6 M+RJ71PB91V_ProfibusClass2Read
Error ID and error details
For o_uErrID (error ID) and o_u3DetailedErrorCode (error details), refer to the following.
Stored value Description Action
0100H The request instruction number is out of Check whether the specified request instruction number is correct or not, then execute it again.

Other than
the setting range.
The status code of RJ71PB91V  MELSEC iQ-R PROFIBUS-DP Module User's Manual (Application)
2
0100H

Operation parameters
M+RJ71PB91V_ProfibusClass2Read has no operation parameters.

2 PROFIBUS-DP MODULE
2.6 M+RJ71PB91V_ProfibusClass2Read 25
2.7 M+RJ71PB91V_ProfibusClass2Write

Name
M+RJ71PB91V_ProfibusClass2Write

Overview
Item Description
Functional This module FB executes the WRITE (Class 2) service via the acyclic communication to the DP-Slave connected using the INITIATE
overview (Class 2) service.
Symbol
M+RJ71PB91V_ProfibusClass2Write

(1) B: i_bEN o_bENO: B (11)

(2) UW: i_uRequestInstructionNo o_bOK: B (12)

(3) UW: i_uFDLAddress o_bErr: B (13)

(4) UW: i_uCommRefNo o_uErrID: UW (14)

(5) UW: i_uDataLength o_uDataLength: UW (15)

(6) UW: i_uSlotNo o_u3DetailedErrorCode: UW (16)

(7) UW: i_uIndex o_stOutputManagement: DUT (17)

(8) UW: i_uWriteData o_stServiceRequestArea: DUT (18)

(9) DUT: i_stInputManagement

(10) DUT: i_stServiceResponseArea

Labels
■Input arguments
No. Variable name Name Data type Scope Description
(1) i_bEN Execution Bit  On: The module FB is activated.
command Off: The module FB is not activated.
(2) i_uRequestInstructionNo Request instruction Word [unsigned]/bit 1 to 8 Specifies the target request instruction number.
number string [16 bits]
(3) i_uFDLAddress FDL address Word [unsigned]/bit 0 to 125 Specifies the target FDL address.
string [16 bits] (00H to
7DH)
(4) i_uCommRefNo CommRef number Word [unsigned]/bit 0 to 126 Stores the CommRef number that is included in the response
string [16 bits] format of the INITIATE (Class 2) service.
(5) i_uDataLength Write data length Word [unsigned]/bit 1 to 240 Specifies the write data length in bytes.
string [16 bits]
(6) i_uSlotNo Slot number Word [unsigned]/bit 0 to 254 Specifies the target slot number.
string [16 bits]
(7) i_uIndex Index Word [unsigned]/bit 0 to 255 Specifies the target index.
string [16 bits]
(8) i_uWriteData Storage location of Word [unsigned]/bit  Specifies the start number of the device where the write data
the write data string [16 bits] are saved.
(9) i_stInputManagement PROFIBUS input Structure  Specifies the global label for the PROFIBUS input
management area management area.
(10) i_stServiceResponseAre Service response Structure  Specifies the global label for the service response area.
a area

2 PROFIBUS-DP MODULE
26 2.7 M+RJ71PB91V_ProfibusClass2Write
■Output arguments
No. Variable name Name Data type Default Description
value
(11) o_bENO Execution status Bit Off On: In execution
Off: Not in execution
(12) o_bOK Normal completion Bit Off The on state indicates that the module FB processing has
been completed successfully.
2
(13) o_bErr Error completion Bit Off The on state indicates that the module FB processing has
been completed with an error.
(14) o_uErrID Error ID Word [unsigned]/bit 0 The error ID for the request instruction sent via the acyclic
string [16 bits] communication is stored.
(15) o_uDataLength Write data length Word [unsigned]/bit 0 The write data length in bytes is stored.
string [16 bits]
(16) o_u3DetailedErrorCode Error details Word [unsigned]/bit 0 Error details for the request instruction sent via the acyclic
string [16 bits] (0..2) communication are stored.
(17) o_stOutputManagement PROFIBUS output Structure 0 The global label for the PROFIBUS output management area
management area is stored.
(18) o_stServiceRequestArea Service request Structure 0 The global label for the service request area is stored.
area

FB details
Item Description
Available device Module RJ71PB91V
CPU module RCPU
Engineering tool GX Works3
Language FBD
Number of basic 817 steps
steps The number of steps of the module FB embedded in a program depends on the CPU module used, the input/output definitions, and the
option setting of GX Works3.
For the option setting of GX Works3, refer to the GX Works3 Operating Manual.
Processing Using one request instruction out of eight request instructions usable in the acyclic communication, this module FB writes the data of the
DP-Slave connected using the INITIATE (Class 2) service.
When i_bEN (execution command) is turned on, it executes the WRITE service request/response processing using the request instruction
specified with i_uRequestInstructionNo (request instruction number) to the DP-Slave specified with i_uFDLAddress (FDL address).
When the communication with the DP-Slave is successfully established, o_bOK (normal completion) is turned on.
In the event of a response error, o_bErr (error completion) is turned on, and o_uErrID (error ID) and o_u3DetailedErrorCode (error details)
are stored.
FB compilation Macro type
method
FB operation Executes when FB is turned on
Input condition for None
FB_EN

2 PROFIBUS-DP MODULE
2.7 M+RJ71PB91V_ProfibusClass2Write 27
Item Description
Timing chart of I/O ■When the operation is completed successfully
signals
ON
i_bEN OFF

ON
o_bENO OFF

i_uWriteData (1)

WRITE service request/


(2) (3) (2)
response processing

ON
o_bOK OFF

o_bErr OFF

o_uErrID

(1) Write data


(2) Unexecuted
(3) Executed
Timing chart of I/O ■When the operation is completed with an error
signals
ON
i_bEN OFF

ON
o_bENO OFF

i_uWriteData (1)

WRITE service request/


(2) (3) (2)
response processing

o_bOK OFF

ON
o_bErr OFF

o_uErrID (4)

o_u3DetailedErrorCode (5)

(1) Write data


(2) Unexecuted
(3) Executed
(4) Error ID
(5) Error details
Precautions • Before using this module FB in the program, update the PROFIBUS labels. ( MELSEC iQ-R PROFIBUS-DP Module User's Manual
(Application))
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) turns on. By turning off i_bEN
(execution command), o_bOK (normal completion) and o_bErr (error completion) are turned off, and o_uErrID (error ID) is cleared to 0.
• Acyclic communication has eight request instructions. Data of each channel can be read/written from/to the DP-Slave at a specified
timing independently of data exchange.
• The WRITE (Class 2) service of this module FB can be executed only to the DP-Slaves connected using the INITIATE (Class 2) service.

2 PROFIBUS-DP MODULE
28 2.7 M+RJ71PB91V_ProfibusClass2Write
Error ID and error details
For o_uErrID (error ID) and o_u3DetailedErrorCode (error details), refer to the following.
Stored value Description Action
0100H The request instruction number is out of Check whether the specified request instruction number is correct or not, then execute it again.

Other than
the setting range.
The status code of RJ71PB91V  MELSEC iQ-R PROFIBUS-DP Module User's Manual (Application)
2
0100H

Operation parameters
M+RJ71PB91V_ProfibusClass2Write has no operation parameters.

2 PROFIBUS-DP MODULE
2.7 M+RJ71PB91V_ProfibusClass2Write 29
2.8 M+RJ71PB91V_ProfibusClass2Abort

Name
M+RJ71PB91V_ProfibusClass2Abort

Overview
Item Description
Functional This module FB executes the ABORT (Class 2) service to the specified DP-Slave via the acyclic communication.
overview
Symbol
M+RJ71PB91V_ProfibusClass2Abort

(1) B: i_bEN o_bENO: B (7)

(2) UW: i_uRequestInstructionNo o_bOK: B (8)

(3) UW: i_uFDLAddress o_bErr: B (9)

(4) UW: i_uCommRefNo o_uErrID: UW (10)

(5) DUT: i_stInputManagement o_stOutputManagement: DUT (11)

(6) DUT: i_stServiceResponseArea o_stServiceRequestArea: DUT (12)

Labels
■Input arguments
No. Variable name Name Data type Scope Description
(1) i_bEN Execution Bit  On: The module FB is activated.
command Off: The module FB is not activated.
(2) i_uRequestInstructionNo Request instruction Word [unsigned]/bit 1 to 8 Specifies the target request instruction number.
number string [16 bits]
(3) i_uFDLAddress FDL address Word [unsigned]/bit 0 to 125 Specifies the target FDL address.
string [16 bits] (00H to
7DH)
(4) i_uCommRefNo CommRef number Word [unsigned]/bit 0 to 126 Stores the CommRef number that is included in the response
string [16 bits] format of the INITIATE (Class 2) service.
(5) i_stInputManagement PROFIBUS input Structure  Specifies the global label for the PROFIBUS input
management area management area.
(6) i_stServiceResponseAre Service response Structure  Specifies the global label for the service response area.
a area

2 PROFIBUS-DP MODULE
30 2.8 M+RJ71PB91V_ProfibusClass2Abort
■Output arguments
No. Variable name Name Data type Default Description
value
(7) o_bENO Execution status Bit Off On: In execution
Off: Not in execution
(8) o_bOK Normal completion Bit Off The on state indicates that the module FB processing has
been completed successfully.
2
(9) o_bErr Error completion Bit Off The on state indicates that the module FB processing has
been completed with an error.
(10) o_uErrID Error ID Word [unsigned]/bit 0 The error ID for the request instruction sent via the acyclic
string [16 bits] communication is stored.
(11) o_stOutputManagement PROFIBUS output Structure 0 The global label for the PROFIBUS output management area
management area is stored.
(12) o_stServiceRequestArea Service request Structure 0 The global label for the service request area is stored.
area

FB details
Item Description
Available device Module RJ71PB91V
CPU module RCPU
Engineering tool GX Works3
Language FBD
Number of basic 755 steps
steps The number of steps of the module FB embedded in a program depends on the CPU module used, the input/output definitions, and the
option setting of GX Works3.
For the option setting of GX Works3, refer to the GX Works3 Operating Manual.
Processing This module FB disconnects the line connection to the specified DP-Slave using one request instruction out of eight request instructions
usable in the acyclic communication.
When i_bEN (execution command) is turned on, it executes the ABORT service request/response processing using the request
instruction specified with i_uRequestInstructionNo (request instruction number) to the DP-Slave specified with i_uFDLAddress (FDL
address).
When the communication with the DP-Slave is successfully established, o_bOK (normal completion) is turned on.
In the event of a response error, o_bErr (error completion) is turned on and o_uErrID (error ID) is stored.
FB compilation Macro type
method
FB operation Executes when FB is turned on
Input condition for None
FB_EN
Timing chart of I/O ■When the operation is completed successfully
signals
ON
i_bEN OFF

ON
o_bENO OFF

ABORT service request/


(1) (2) (1)
response processing

ON
o_bOK OFF

o_bErr OFF

o_uErrID

(1) Unexecuted
(2) Executed

2 PROFIBUS-DP MODULE
2.8 M+RJ71PB91V_ProfibusClass2Abort 31
Item Description
Timing chart of I/O ■When the operation is completed with an error
signals
ON
i_bEN OFF

ON
o_bENO OFF

ABORT service request/


(1) (2) (1)
response processing

o_bOK OFF

ON
o_bErr OFF

o_uErrID (3)

(1) Unexecuted
(2) Executed
(3) Error ID
Precautions • Before using this module FB in the program, update the PROFIBUS labels. ( MELSEC iQ-R PROFIBUS-DP Module User's Manual
(Application))
• This module FB does not include the error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (error completion) turns on. By turning off i_bEN
(execution command), o_bOK (normal completion) and o_bErr (error completion) are turned off, and o_uErrID (error ID) is cleared to 0.
• Acyclic communication has eight request instructions. Data of each channel can be read/written from/to the DP-Slave at a specified
timing independently of data exchange.

Error ID
The status code of RJ71PB91V is stored in o_uErrID (error ID). ( MELSEC iQ-R PROFIBUS-DP Module User's Manual
(Application))

Operation parameters
M+RJ71PB91V_ProfibusClass2Abort has no operation parameters.

2 PROFIBUS-DP MODULE
32 2.8 M+RJ71PB91V_ProfibusClass2Abort
2.9 M+RJ71PB91V_S_NotifyMstExtDiagInfo

Name
M+RJ71PB91V_S_NotifyMstExtDiagInfo
2
Overview
Item Description
Functional This module FB requests the notification of extended diagnostic information or notification of correction of the relevant error from DP-
overview Slave to DP-Master.
Symbol
M+RJ71PB91V_S_NotifyMstExtDiagInfo

(1) B: i_bEN o_bENO: B (5)

(2) DUT: i_stModule o_bOK: B (6)

(3) UW: i_uDataLength o_bErr: B (7)

(4) UW: i_uSendData o_uModuleErrId: UW (8)

Labels
■Input arguments
No. Variable name Name Data type Scope Description
(1) i_bEN Execution Bit  On: The module FB is activated.
command Off: The module FB is not activated.
(2) i_stModule Module label Structure  Specifies the target module to which the module FB is
executed.
Specify the module label of the target module.
(3) i_uDataLength Data length of Word [unsigned]/bit 0 to 24 0: Notification of correction of the relevant error
extended string [16 bits] 1 to 24: Data length of extended diagnostic information
diagnostic
information
(4) i_uSendData Storage location for Word [unsigned]/bit  Specifies the start address of the device where extended
extended string [16 bits] diagnostic information is saved.
diagnostic
information

2 PROFIBUS-DP MODULE
2.9 M+RJ71PB91V_S_NotifyMstExtDiagInfo 33
■Output arguments
No. Variable name Name Data type Default Description
value
(5) o_bENO Execution status Bit Off On: In execution
Off: Not in execution
(6) o_bOK Normal completion Bit Off The on state indicates that the module FB processing has
been completed successfully.
(7) o_bErr Error completion Bit Off The on state indicates that the module FB processing has
been completed with an error.
(8) o_uModuleErrId Error code Word [unsigned]/bit 0 The error code is stored.
string [16 bits]

FB details
Item Description
Available device Module RJ71PB91V
CPU module RCPU
Engineering tool GX Works3
Language Ladder
Number of basic 76 steps
steps The number of steps of the module FB embedded in a program depends on the CPU module used, the input/output definitions, and the
option setting of GX Works3.
For the option setting of GX Works3, refer to the GX Works3 Operating Manual.
Processing This module FB provides the DP-Master with notification of extended diagnostic information or notification of correction of the relevant
error that has occurred during data exchange.
Notification of extended diagnostic information or notification of correction of the relevant error is requested when i_bEN (execution
command) is turned on.
• When the data length of extended diagnostic information is set to other than 0, extended diagnostic information is notified.
• When the data length of extended diagnostic information is set to 0, correction of the relevant error is notified.
When the processing is completed successfully, o_bOK (normal completion) is turned on.
When the processing is completed with an error, o_bErr (error completion) is turned on, and an error code is stored in o_uModuleErrId
(error code).
Processing is stopped when i_bEN (execution command) is turned off before the sending of the module FB is completed. However,
notification of extended diagnostic information may be completed depending on the timing of the stoppage.
FB compilation Macro type
method
FB operation Pulse type (execution of multiple scans)
Input condition for None
FB_EN

2 PROFIBUS-DP MODULE
34 2.9 M+RJ71PB91V_S_NotifyMstExtDiagInfo
Item Description
Timing chart of I/O ■When the operation is completed successfully
signals
ON
i_bEN OFF

ON
o_bENO OFF
2
Extended diagnostic
(1) (2) (1)
notification processing

Extended diagnostic
(3)
information
ON
o_bOK OFF

o_bErr OFF

o_uModuleErrId

(1) Unexecuted
(2) Executing
(3) Extended diagnostic information data (update)
■When the operation is completed with an error

ON
i_bEN OFF

ON
o_bENO OFF

Extended diagnostic
(1) (2) (1)
notification processing

Extended diagnostic
information

o_bOK OFF

ON

o_bErr OFF

o_uModuleErrId (3)

(1) Unexecuted
(2) Executing
(3) Error code
Precautions • This module FB does not include the error processing. Program the error recovery processing separately in accordance with the
required system operation.
• Turn off i_bEN (execution command) after o_bOK (normal completion) or o_bErr (completed with an error) is turned on. By turning off
i_bEN (execution command), o_bOK (normal completion) and o_bErr (error completion) are turned off, and o_uModuleErrId (error
code) is cleared to 0.
• This module FB can be executed only while ‘During data exchange signal’ (X1) is turned on. Set the interlock so that i_bEN (execution
command) is executed while ‘During data exchange signal’ (X1) is turned on.

Error code
Stored value Description Action
4001H Data length of extended diagnostic Check the data length of extended diagnostic information.
information is out of the setting range.

Operation parameters
M+RJ71PB91V_S_NotifyMstExtDiagInfo has no operation parameters.

2 PROFIBUS-DP MODULE
2.9 M+RJ71PB91V_S_NotifyMstExtDiagInfo 35
MEMO

2 PROFIBUS-DP MODULE
36 2.9 M+RJ71PB91V_S_NotifyMstExtDiagInfo
INSTRUCTION INDEX

M
M+RJ71PB91V_AlarmAcquisition . . . . . . . . . . . . 12
M+RJ71PB91V_ProfibusClass1Read . . . . ...... 4
M+RJ71PB91V_ProfibusClass1Write . . . . ...... 8
M+RJ71PB91V_ProfibusClass2Abort . . . . . . . . . 30
M+RJ71PB91V_ProfibusClass2Initiate . . . . . . . . 18
M+RJ71PB91V_ProfibusClass2Read . . . . . . . . . 22
M+RJ71PB91V_ProfibusClass2Write . . . . . . . . . 26
M+RJ71PB91V_SlaveExtDiagInfo . . . . . . . . . . . 15
M+RJ71PB91V_S_NotifyMstExtDiagInfo . . . . . . . 33

37
MEMO

38
REVISIONS
*The manual number is given on the bottom left of the back cover.
Revision date *Manual number Description
December 2017 BCN-P5999-0914-A First edition
April, 2018 BCN-P5999-0914-B  Added or modified parts
Chapter 1, Section 2.9

Japanese manual number: BCN-P5999-0913-B


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

 2017 MITSUBISHI ELECTRIC CORPORATION

39
TRADEMARKS
PROFIBUS is a trademark of PROFIBUS Nutzerorganisation e.V.
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.

40 BCN-P5999-0914-B
BCN-P5999-0914-B(1804)

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.

Specifications subject to change without notice.

You might also like