PROFInet How-To Guide E-series
This guide provides instructions for how to start using PROFINET with Universal Robots.
NOTE: All files are available for download at the bottom of this page.
This guide is valid for: e-Series Software version 5.12
Note: older or newer software versions may behave differently.
1. setup
1. ROBOT: Tap the Installation tab and, under Fieldbus, select PROFINET. Tap Enable.
- Save the installation for the changes to take effect the next time the installation is loaded.
2. ROBOT: The yellow LED indicates PROFINET is running on the robot. No PLC/IO controller is connected to the robot.
3. PLC: Open a project in Siemens TIA Portal.
- In the Project Tree of the Project view, navigate to: Online access -> {your network adapter}.
- Click Update accessible devices.
4. PLC: Identify the robot and the PLC you want to connect. Assign IP addresses and names to the equipment.
- Expand the desired accessible device and double-click Online & diagnostics.
- In the device's diagnostics page, expand Functions and click Assign IP address.
- Enter the desired IP address and subnet mask, and tap Assign IP address.
- Still in the diagnostics page click Assign name.
- Set the PROFINET device name and click Assign name .
5. PLC: Import the Universal Robots' GSD file.
- Navigate to Options ->Manage general station description files (GSD).
- Select to the right GSD and install.
6. PLC: In the top of the project tree access Devices & networks.
- Locate the UR I/O device in the catalog path: Other field devices->PROFINET IO->I/O->Universal Robots A/S->Collaborative Robot->V1.0
- Drag-and-drop it into the network view and connect the PLC and the I/O device by dragging a line between their (green) PN/IE ports.
7. PLC: Double-click the I/O device in the Network view.
- All modules are pluggable, and are named according to their corresponding slot numbers.
- Each module can be drag-and-dropped from the Catalog->Module to the empty fields in the Device overview.
- In this example all modules are plugged in. Notice how the input addresses (I) and output addresses (Q) are assigned, since you will need these to access the data.
8. PLC: Double-click the I/O device in the Device view to get the module description.
- In the General tab select Ethernet addresses, and select Use IP protocol.
- Set the same IP address as those assigned to the online device.
- Deselect Generate PROFINET device name automatically and type in the same PROFINET device name as the one assigned to the online device.
9. PLC:
This step requires PLC firmware version 4.0 or higher.
- Navigate to External source files.
- In the project tree, double-click Add new external file to open the file UR_datastruct.udt.
- Import the user-defined data types by right clicking the newly added external source file and select Generate blocks from source.
- In the PLC tags (or your own Data Block), create tags corresponding to the modules you have enabled. Make sure the input addresses (I) and output addresses (Q) of the tags match those of the modules.
If all modules are enabled and placed in order in the IO memory, create a single PLC input tag of the data type: UR_T2O and a single PLC output tag of the data type: UR_O2T to map all data.
Both are visible in PLC data types in the project tree.
10. PLC: Download the program to the PLC.
- In the menu bar click the download icon and tap Start search in the download dialog.
- Select the PLC and click Load.
11. PLC: Confirm all blocks, tags and modules in the project tree are green.
12. ROBOT: Confirm the LED in the Installation tab is green.
13. PLC: In the project tree, navigate to your tag table (or Data Block) and expand your input tag to inspect values sent from the robot.
2. Specifications
The following sections provide an overview of some important information to get started.
2.0.1. Demo Sample Program
Sample files for this example are available for download at the bottom of this page:
- UR_profinet_demo.zap13: archived project file that can be loaded into the TIA Portal v13 (select Project->Retrieve)
- ur-pn-demo.urp: demo program for the robot
PLC (used in example)
- Siemens S7-1200, 1212C AC/DC/Rly
- Totally Integrated Automation Portal V13, STEP 7 Basic
Robot
- UR3, UR5 or UR 10 running PolyScope v. 3.3
2.0.2. I/O Message Format
For details about how the IO format is distributed between the modules, see: pn-iomessage.pdf
The robot has 10 pluggable modules:
- Seven modules containing the data that can be read from the robot
- Three modules containining data that can be set on the robot
All modules are optional, but are fixed to a specific slot according to their names: e.g. the UR_3_T2O_Joints can be plugged into slot 3, contain data from the robot (T) to the PLC (O), namely joint measurements.
Note: When using output I/Os, it is important to set the mask accordingly.
User-defined Data Types
- For PLCs S7-1200 and S7-1500 (PLC Firmware v4.0 or higher): UR_datastruct.udt (can be imported into TIA Portal)
- For PLCs S7-200, S7-300 and S7-400: URI.AWL, URO.AWL (can be imported into SIMATIC and TIA Portal)
The UDT/AWL files contain user-defined data types and can be used to import the message format.
Note: If you import the UR data structure (the .udt file) and only plug in some of the modules, make sure to use the right user defined data types and match the input address (I) or output address (Q) of the module with the address of the data types in the tag table. This is also necessary if you drag the modules in "out of order", e.g. the module to slot 5 before the module to slot 2.
GSD file
GSDML-V2.42-UR-PROFIsafe-20220517.xml.zip. (Note that the folder name is PROFIsafe but some of the files are compatible with PROFInet)
2.0.3. Script Functions
Script Functions for synchronizing a program with a PLC:
- read_input_boolean_register(address)
- read_input_float_register(address)
- read_input_integer_register(address)
- read_output_boolean_register(address)
- read_output_float_register(address)
- read_output_integer_register(address)
- write_output_boolean_register(address, value)
- write_output_float_register(address, value)
- write_output_integer_register(address, value)
2.0.4. Notes
- If you change the IP of the robot in Network Settings while PROFINET is enabled, disable PROFINET and enable it again before the changes take effect.
- If the IP of the robot is changed using external PROFINET tools, e.g. through the TIA software, the changes will take effect immediately.
- The lower range (bool[0:63], int[0:23], float[0:23]) of the gp input and output registers is reserved for FieldBus/PLC interface usage. The upper range (bool[64:127], int[24:47], float[24:47]) can be used by external RTDE clients (i.e URCAPS).
3. Demo
This demo is provided to show a basic example of how to communicate between the PLC and the UR robot. The demo allows you to set two numbers in PLC output registers.
The robot retrieves the numbers, calculates their sum and stores the result in a PLC input register.
1. PLC: Navigate to the Main Program Block and set integer registers URO."Reg 1".Ints.Register[0] and URO."Reg 1".Ints.Register[1] to some values and download the program to the PLC
2. ROBOT: Open ur-pn-demo.urp and run the program. Navigate to the Variables tab and confirm the numbers are received.
4. Robot Modes
Mode | Description |
-1 | ROBOT_MODE_NO_CONTROLLER |
0 | ROBOT_MODE_DISCONNECTED |
1 | ROBOT_MODE_CONFIRM_SAFETY |
2 | ROBOT_MODE_BOOTING |
3 | ROBOT_MODE_POWER_OFF |
4 | ROBOT_MODE_POWER_ON |
5 | ROBOT_MODE_IDLE |
6 | ROBOT_MODE_BACKDRIVE |
7 | ROBOT_MODE_RUNNING |
8 | ROBOT_MODE_UPDATING_FIRMWARE |
5. Video Guides
Italian Original : Profinet connection between robot and PLC - YouTube
English Translated : Profinet connection between robot and PLC - YouTube