This is a new article series、 which uses Mitsubishi’s RJ71SEIP91-T4 for various communication tests.
This time, we will explain how to build CIP Safety Class 0 communication between RJ71SEIP91-T4, OMRON NX1-9000 and SL5500 from 0. RJ71SEIP91-T4 is the Adapter and OMRON NX1-9000 is the Scanner.
Come on, let’s enjoy FA.
Reference Link
Reference Video
Mitsubishi.Open box with RJ71SEIP91-T4!
Safety Communications
The CIP Safety module acts as an originator or target, establishing a connection with a CIP Safety compatible device and performing safety communication in a fixed scan.
Safety communication can be done in two ways
- Instance communication using instance ID
- Tag communication using tag names
This is the setting available when RJ71SEIP91-T4 is configured as Target.
This is the setting available when RJ71SEIP91-T4 is configured as the originator.
Overview
Let’s take a look at CIP Safety’s communication.
CIP Safety Module As Consumer
Set the CIP Safety module to initiator/consumer when receiving data from a CIP Safety enabled device between the CIP Safety module (consumer) and the input device (producer).
The state of the external device is stored in the safety input of the CIP Safety-enabled input device (producer).
The transfer of security data stores the safety input status of the CIP Safety-enabled input device (producer) in the safety device (receive data) of the CPU module connected to the CIP Safety module (consumer).
CIP Safety Module As Consumer
Set the CIP Safety module to target/ and producer when sending data to a CIP Safety enabled device between the CIP Safety module (producer) and the output device (consumer).
The safety device (send data) of the CPU module connected to the CIP Safety module (producer) is in the ON command.
By transferring safety data, the state of the safety devices of the CPU module connected to the CIP Safety module (producer) is stored in the safety outputs of the CIP Safety-enabled output device (consumer).
Outputs the safety output status of the CIP safety-enabled output device (consumer) to an external device.
Safety response time
The safety response time is the total response time (maximum value) from the input device (e.g., sensor or switch) to the output device (e.g., actuator).In the example of the system configuration shown here, the safety response time is the time from pressing the emergency stop switch until the robot stops.
Calculation formula
The total safety response time is the sum of the response time of the safety communication unit and the response time of the safety device.
Response time of the safety communication part (ms)
Implementation
We will now build the CIP Safety connection and safety program.
Mels Side
First set up the Mitsubishi and RJ71SEIP91-T4 sides.
Create New Project
Start GXWORKS3 and add a new project by going to Project>New.
The R32SF Safety PLC was used in this article.
To use the Safety PLC, a User name and Password must be set in the project.
Set User name and Password, and press “Ok” to proceed.
Once the project is created, click Setting Change.
Put on the Use Module Label Option.
Done!A project has been created.
Module Configuration
To configure Hardware Configuration, click on Module Configuration.
This is the Module Configuration screen.
Add R35B
Drop IQ-R Series>Main Base>R35B and add the Base Unit used in this article.
Done!
Add R61P
The next step is to add the power supply module used in this article at Power Supply>R61P.
Done!
Add PLC into PLC Rack
Drop the R32SF Safety PLC into the CPU Slot.
Done!So I installed the CPU in Rack.
Add R6SFM
CPU Extension>R6SFM to add CPU safety extension units.
Done!
Add RJ71SEIP91-T4
Finally, drop Network>RJ71SEIP91-T4 into Slot1.
Done!
Save the Configuration
Next, save the Module Configuration.
OK to proceed.
M+Global
Since we have just enabled the Module Label use setting, a Global Variable List named Label>Global Label>M+Global has been added.
M+Global has now defined labels for the CPUs and modules used in this article (RJ71SEIP91-T4, of course).
Check your Configuration
Convert>Rebuild All once to check for Hardware Configuration problems.
Reset User
Let’s initialize the PLC data and reset all the data in case you forgot the Password of the R32SF Safety PLC main unit, click Online>User Authentication>Initialize all PLC Data.
Write User Data
Next, in order to write the User Data for this project to the CPU, go to Online>User Authentication>Write User information to PLC to write the User data to R32SF Safety PLC.
Proceed with Yes.
Proceed further with Yes.
Done!
Write to PLC
Execute Online>Write to PLC to write the Hardware Configuration to the CPU once.
Check RJ71SEIP91-T4 IP Address
Click Diagnosis>System Monitor to see the IP address of the current RJ71SEIP91-T4.
Double-click the RJ71SEIP91-T4 module.
You can check the diagnostic information of RJ71SEIP91-T4 and open the Module Information List Tab.
Detailed information on RJ71SEIP91-T4 is displayed and P1=192.168.250.11 is confirmed.
Configure Ethernet/IP Network
Next, to build the Ethernet/IP network, double-click RJ71SEIP91-T4>CIP Safety Configuration Tool to launch the tool.
Enable Safety Target
To enable Safety Target Class 0 communication on the RJ71SEIP91-T4, select the network to be used and check the box under >General>Operation Mode>Safety Target (Class 0).
A tab for “Safety Target (Class 0)” has been added to the CIP Configuration Tool.
Add Class0 Instance
Next, Instance for Class0 communication is set.
Direction
Sets the Class0 Instance communication method.
- T->O is the output data from the RJ71SEIP91-T4 viewpoint.
- O->T becomes input data from RJ71SEIP91-T4 viewpoint.
Instance Number
The next step is to set the Instance number of the corresponding Class 0 communication.(from 528)
Size
Size sets the data size (in bytes) to be exchanged for each connection.
Max Subscribers
Sets the maximum number of simultaneous connections for multicast communication.This item is valid only when the direction is T->O.
Safety Operation
Next, open the Safety Tab.
Safety Reset
Perform a safety reset on the safety communication portion of the RJ71SEIP91-T4 to reset the TUNID.
Click Reset.
Proceed with Yes.
Done!
Restart the PLC.
Edit your TUNID
Click the Edit button to set the TUNID of the RJ71SEIP91-T4.
It can be set either time-based or manually. In this case, the TUNID is set manually.
Set TUNID
Finally, click on the Set TUNID button and set the TUNID for the RJ71SEIP91-T4.
Done!
Listing
Click Configuration>Listing to check the CIP Safety connection for RJ71SEIP91-T4.
Communication configuration parameters for each CIP Safety are now displayed in the CIP Configuration Tool.
Mapping
Click on Safety Communication Module > CPU Data Exchange Tab for data mapping.
This is the configuration screen for Mapping between CIP Safety<->CPU.
Receive Labels Data
This one sets the label name of the input data in the receiving device.
Cons. Status Prod. Status
Sets the label name for the internal Consumer safety connection status.
Receive Devices
Set up a receiving device within GXWORKS.
Send Labels
Sets the label name of the sending device.
Send Devices
Set the transmitting device with CIP Safety.
Export Label to GxWorks3
Finally, click on the “GxWorks3 Copy Labels” button to paste the mapping settings you have set up in the tool into your GxWorks3 project.
Label>Global Label>right click>Add New Data.
Set Safety in the Category item.
Enter the Global Label List name and confirm with OK.
Done!
Open the Safety Global Label List and click on “Show Details”.
Next, use Ctrl+V to paste the label you just set.
Done!
Add Shared GVL
次はStandard/Safety SharedのGlobal Label Listを追加します。
Define variables to be used in safe and non-safe programs.
NonSafety-Program
Create a non-safety program.
The RJ71SEIP91-T4 acquires the communication start signal and the status of each connection as shown in the figure below.
RJ71SEIP91_1.stEIPCls1_P1.uSet_CommunicationStartupRequest_D:=1; gModuleOK:=RJ71SEIP91_1.bSts_ModuleReady; gConnection528OK:=RJ71SEIP91_1.stCIP_Safety_P1.bnDataLinkStatus_Out_D[1]; gConnection529OK:=RJ71SEIP91_1.stCIP_Safety_P1.bnDataLinkStatus_In_D[2]; |
Safey Program
Now to create a safety program, Fixed Scan>Right click>Add New Data.
Select Category as Safety.
Set Data type to Program Block.
Mitsubishi’s safety program can be created with Ladder only.
Done!
Here is the safety program created by Mitsubishi for this project.
Rung1/2
This checks the status of Instance 528 and Instance 529, and whether the RJ71SEIP91-T4 unit is experiencing errors.
Rung3/4/5
Here is the data to be sent to OMRON NX1 via CIP Safety.
Rung6/7
Here is the data received from OMRON NX1.
Write
Download your project to the CPU by going to Online>Write to PLC.
Reset Power
Finally, turn the IQ-R CPU back on.
OMRON Side
The next step is to set up the OMRON side.
Download EDS File
Download the EDS File for Mitsubishi’s RJ71SEIP91-T4 at the Link below.
https://emea.mitsubishielectric.com/fa/products/cnt/plc/allcpu/rj71seip91-t4.html#downloads
New Project
Start Sysmac Studio and create a new project.
Configure IP Address
Open Configuration and Setup>Controller Setup>build in EtherNet/IP Port and set the IP address according to your application.
Configure Safety
We will build the CIP Safety connection and safety program on the Sysmac Studio side.
Insert SL5500
To insert the SL5500 used in this article into Hardware Configuration, click CPU/Expansion Racks>CPU Rack.
Add SL5500 to the project from the Toolbox.
Done!
The next step is to set up SL5500 (safety part) from the Drop-List.
Sysmac Studio is now on the SL5500 configuration screen.
Configure CIP Safety Connection
Open Connection Settings to add a CIP Safety (Originator) connection on the SL5500.
This is the CIP Safety connection screen.
Safety Network Number
Sets the Safety Network number for Network1.
This time set to Manual 0004 1.
Done!
Open EDS File via EZ
We want to know the Safety Class Communication Instance number of RJ71SEIP91-T4, so open the EDS File of RJ71SEIP91-T4 with the EZ-EDS tool.
Install EDS File
Click EDS Library for CIP Safety to create an EDS File for RJ71SEIP91-T4.
Click New EDS File.
This is the EDS File creation screen in Sysmac Studio.
Vendor ID
The Vendor ID should match the RJ71SEIP91-T4 Vendor ID value displayed in EZ-EDS.
Vendor Name
The Vendor Name should match the RJ71SEIP91-T4 Vendor Name value displayed in EZ-EDS.
Product Type
Product Type should match the RJ71SEIP91-T4 Product Type value displayed in EZ-EDS.
Product Type String
The Product Type String should match the RJ71SEIP91-T4 Product Type String value displayed in EZ-EDS.
Product Code
The Product Code should match the RJ71SEIP91-T4 Product Code value displayed in EZ-EDS.
Product Name
The Product Name should match the RJ71SEIP91-T4 Product Name value displayed in EZ-EDS.
Major Revision
Major Revision should match the RJ71SEIP91-T4 Major Revision value displayed in EZ-EDS.
Minor Revision
Minor Revision should match the RJ71SEIP91-T4 Minor Revision value displayed in EZ-EDS.
Safety Input‐ Input Assembly Instance
The Input Assembly Instance in the Safety Input item should be set according to the T->O>Instance number set in the CIP Configuration Tool of the RJ71SEIP91-T4.
Safety Input‐ Output Assembly Instance
Next, open Connection Manager>Connection4-Safety Input Assembly to find the Safety Input – Output Assembly Instanec number.
At the bottom, there is an item called Connection Path, where 64 is the Safety Input – Output Assembly Instanec number (in hexadecimal).
So, set 100 for Safety Input – Output Assembly Instance.
Safety Input‐ Size
The data size of the Safety Input Assembly should match the data size set in the CIP Configuration Tools.
Safety Output‐ Input Assembly Instance
Now click again on EZ-EDS Tools>Connection Manager>Safety Output Assembly to find the Input Assembly Instance number for the Safety Output.
You can see that the Safety Output-Input Assembly Instance number in the Connection Path is 64 (in hexadecimal).
So, set 100 for Safety Output – Input Assembly Instance.
Next to Connection Path, there is a Create/Decode Path button.
It is possible to disassemble the Path of the corresponding Connection with the EZ-EDS tool.
Safety Output‐ Output Assembly Instance
The Output Assembly Instance in the Safety Output item should be set to match the O->T>Instance number set in the CIP Configuration Tool for RJ71SEIP91-T4.
Safety Output‐ Data Size
The data size of the Safety Output Assembly should match the data size set in the CIP Configuration Tools.
How to Know the Assembly ID?
So, how to find the actual Safety Assembly number of the RJ71SEIP91-T4 in the EZ-EDS tool?
We can see that this Param54 can be set from 1-1023.
Configuration Assembly
Finally, the Configuration Assembly Instance number of RJ71SEIP91-T4 can also be found from the Connection Path.Here we see that Connection Path=64 (hexadecimal).
Set 100 for Configuration Assembly.
Result
Here is the result of this time’s RJ71SEIP91-T4 configuration, which will proceed with OK.
OK to proceed.
Done!EDS File for RJ71SEIP91-T4 has been generated.
Insert RJ71SEIP91‐T4
Next, to add RJ71SEIP91-T4 to the CIP Safety network, select the EDS File you just generated > right click > Insert.
Done!RJ71SEIP91-T4 has been added.
IP Address
Set the IP address of the RJ71SEIP91-T4.
Let’s match the RJ71SEIP91-T4 to the IP configured in the CIP Configuration Tools on the Mitsubishi side.
EPI
Let’s adapt EPI to the application as well.
Instance Name
The Instance Name will be used later when defining variables.
I/O Mapping
Next, we want to use the data exchanged by RJ71SEIP91-T4 and CIP Safety in the safety program, so we open the I/O Map.
This is the Safety variable setting screen.
RJ71SEIP91-T4>Safety input>Safety Input Data Byte1>Right click>Create Device Variable with Prefix to automatically generate the safety variable.
Set the Prefix and proceed with OK.
Done!
Use the same operation to define safety variables for other safety input and output areas.
Safety Program
To create a safety program this time, open Program0 in Programming>POUs>Programs>Default.
Internal
These are the internal variables used in this article, and there are also safe and non-safe variables.
Program
Here is the safety program we have created.
Network1
Network 1 is always ON for safety data (Byte 1, Bit 0) sent to RJ71SEIP91-T4.
Network2
Network 2 switches the internal safety variable sONOFF ON/OFF with the safety Function Block of SF_SR.
Network3
If sONOFF is True as a result of Network 3’s operation on Network 2, the safety data (Byte 1, Bit 7) sent to RJ71SEIP91-T4 is turned ON.
Network4
If sONOFF is False as a result of Network 4’s operation on Network 2, the safety data (Byte 1, Bit 6) sent to RJ71SEIP91-T4 is turned ON.
Network5
Data received by Network 5 from RJ71SEIP91-T4 (Byte 4, 0,1,2nd Bit) is used as the emergency stop input for SF_EmergencyStop, and the result of Block calculation is sent to RJ71SEIP91-T4The result of the Block calculation is used to reflect the safety data (Byte4, 0th Bit) to be sent to the RJ71SEIP91-T4.
Download Configuration
Finally, Controller>Online to download the safety program to the NX1 CPU.
Transfer>To Controller.
Proceed with Execute.
Proceed with Yes.
Proceed with Yes.
Please wait a moment…
Proceed with Yes.
Done!
Download Ethernet/IP Connection Settings
Next, download the Ethernet/IP connection settings to the Controller by going to Tools>Ethernet/IP Connection Setting.
Right-click Port1>Edit.
Click Transfer to Controller to transfer the Ethernet/IP settings to the NX1 Controller.
Proceed with Yes.
Choose to stop the CPU to transfer Ethernet/IP settings.
Please wait a moment…
Proceed with Yes.
Download Safety
The last step is to download the safety program.
Controller>Online.
Switch the SL5500 to PROGRAM Mode.
Proceed with Yes.
OK to proceed.
OK to proceed.
Done!
Next, enter Debug Mode.
Proceed with Yes.
Yesで進みます。
Done!
OK to proceed.
Proceed with Yes.
If a Password is set, enter the Password and press OK to proceed.
Compile a safety project with Verify Validation.
Proceed with Yes.
Done!
OK to proceed.
Go RUN MODE
Switches the CPU to RUN MODE.
Proceed with Yes.
Proceed with Yes.
Done!
Proceed with Ok.
OK to proceed.
OK to proceed.
Result
RJ71SEIP91-T4 and OMRON NX1 SL5500 are also in normal.
Use the CIP Safety Monitor to check the current RJ71SEIP91-T4 and connection status.
Both Safety Input and Safety Output are in good condition.
Next, let’s look at the Safety program on the OMRON side.
Turn on 3 Bits of RJ71SEIP91-T4 in GXWROKS3 to OMRON via CIP Safety.
Done!The OMRON NX side received the data successfully.
The RJ71SEIP91-T4 also successfully received the data sent by the OMRON NX side.