2.4 RapidPlan Controller Profinet Interface User Guide
- 1 Overview
- 2 Hardware Requirement
- 3 Profinet I/O Data Mapping
- 4 RTR controller I/O module slot assignment
- 5 Export ID’s
- 6 Getting started with Profinet communication on RapidPlan
- 7 Typical Move command timing sequence
- 7.1 Move
- 7.2 Combined Move
- 8 Programming Notes
- 9 Known issues
- 10 Typical communication latencies
- 11 GSD file
Overview
As a preliminary feature, Profinet is supported in RapidPlan 2.4. Please contact Realtime Robotics for technical support.
Hardware Requirement
RTR controller V1: Startech ST1000SPEXI add-on card is required.
RTR Runtime Controller.
Profinet I/O Data Mapping
To download an offline copy of the I/O data mapping, click the icon below and save:
General rules of I/O mapping
Input: from RTR controller to PLC.
Output: from PLC to RTR controller.
all byte and bit offsets are 0-based.
if not defined on bit level, bytes are unsigned integers(0-255).
integers and DINT's are signed and Cyclic values unless specified otherwise.
all bit level requests are edge triggered unless specified as cyclic.
default values should always be 0 unless specified otherwise.
if there's a command conflict due to shared data fields between 2 commands, e.g., SetAlternateLocation with specified config, and a move to pose/config, both commands will be rejected and a command error code will be given.
max. # of presets per robot: 255;
max. # of object states: 255;
max. # of stateful objects: 32
max. # of targets per project: 16777215 (0xFFFFFF);max # of move segments per Combined Move: 10
Time-based trigger functionality from the Move command is excluded from the I/O map because the PLC can track the Move status and create its own time-based triggers.
RTR controller I/O module slot assignment
Input: from RTR controller to PLC.
Output: from PLC to RTR controller.
slot 1 is always reserved for 16 byte RTR controller input
slot 2 is always reserved for 16 byte RTR controller output
slot 3 is always reserved for 32 byte object states input
slot 4 is always reserved for 32 byte object states output
slot 5 is always reserved for 48 byte DSM input
slot 6 is always reserved for 48 byte DSM output
slot 7 is always reserved for 64 byte robot 1 input
slot 8 is always reserved for 64 byte robot 1 output
and so on for robot 2, to robot 16, for the slots thereafter. For each robot, it always starts with 64 bytes of input and then 64 bytes of output.
slot 1 to slot 6 are always fixed(not editable) and required.
from slot 7 and beyond, there can be no gaps. For example, a user can't have robot 1, and robot 5 for a 2-robot cell. It must be robot 1 and robot 2. The robot ID numbers are generated by appliance as part of the export lookup table and the same rule is followed.
Export ID’s
In order to address RapidPlan objects efficiently in a Profinet interface, symbolic names must be replaced by numerical values. Therefore, a lookup table is generated by Appliance and can be download from the Control Panel. Anytime a RapidPlan project is changed during runtime, or targets are updated/added/removed, the lookup table must be re-exported and PLC programs must be updated accordingly.
robots: 0-15
stateful object ID: 0-31
robot preset ID: 0-255(0xFF) - may be the same under different robots
frame ID and target ID: 0-16777215(0xFFFFFF) - globally unique
object states ID: 0-255 - may be the same under different object ID
Any time a project is loaded in Control Panel, or targets are added or deleted or renamed, the user is responsible to re-download the updated ID file from CP.
Up to 2 external axes are supported by the PNIO data map. There’s no specific look up value for each external axis. External axis#1 is always the axis with lower actuator index number.
An example:
robots:
Robot1: 0
Robot2: 1
presets:
Robot1:
default: 0
Robot2:
Preset2_torch: 0
Preset1_no_eoat: 1
Preset3_weld: 2
targets:
r1home: 0
r1t1: 1
r1t2: 2
r1a1: 3
r1a2: 4
r1up: 5
r1t3: 6
r1t4: 7
r1t5: 8
r1a3: 9
r1a45: 10
r1alt: 11
r2home: 12
r2t1: 13
r2up: 14
r2a1: 15
r2t2: 16
r2t3: 17
r2a2: 18
r2a3: 19
r2t4: 20
r2a4: 21
r2alt: 22
frames:
r1_default_tcp: 0
r2_default_tcp: 1
origin_frame: 2
r1_tcp: 3
r2_no_eoat_tcp: 4
r2_torch_tcp: 5
r2_weld_tcp: 6
objects:
torch_latch: 0
weld_gun_latch: 1
vertical_beam: 2
states:
torch_latch:
present: 0
Suppressed: 1
weld_gun_latch:
present: 0
Suppressed: 1
vertical_beam:
present: 0
Suppressed: 1
Getting started with Profinet communication on RapidPlan
Ethernet interface used by Profinet must be named
fieldbus
.
To rename an ethernet interface(e.g., enp2s0
) in Ubuntu:
sudo ip link set enp2s0 down
sudo ip link set enp2s0 name fieldbus
sudo ip link set fieldbus up
2. Environment variable must be set - this should be done automatically when a megadeb is installed.
If not done automatically:
sudo systemctl set-environment RAPIDPLAN_PROFINET_ENABLE=true
3. Profinet must be enabled from Control Panel - Settings - Network.
If the Profinet Enabled toggle is turned on, appliance must be restarted for the function to start working.
sudo systemctl restart rtr_appliance_app.service
Profinet can be enabled without a loaded project. However, in order to export ID lookup table, a project must be loaded.
4. If Profinet is enabled for the first time, a Profinet device name must be assigned using TIA Portal. Once assigned, the device name is persistent.
5. IP address is assigned by the PLC after Profinet device name is assigned.
Typical Move command timing sequence
Move
Combined Move
Programming Notes
A Siemens PLC library and an application example is available upon request.
To reset fault mode, the OperationMode output needs to be manually reset, before the reset output is set.
Some API commands only work in Config mode, while others only work in Operation mode. Mode interlock logic is recommended.
Known issues
Triggers are not supported as part of a move command.
When appliance restarts, the Ubuntu OS routing table is added with a duplicate default gateway pointing to the IP address assigned by the PLC. This is causing loss of internet access until the duplicate default gateway in the Ubuntu routing table is manually cleared. This is related to Ubuntu OS. Workaround: after Profinet is running, issue
sudo ip route del default
to restore internet access from the RTR controller.Occasionally the PLC triggers a Profinet watchdog error. This is due to the Ubuntu Desktop OS is not optimized for real-time communication. OS thread priority should be fine tuned. Workaround: increase the number of retries in the Profinet device IO settings in TIA Portal, while keeping the same 2mS update time.
The Profinet driver is tested on RTR controllers(V1 and runtime) only.
DSM boxes, objects, and frames are tracked in the Profinet look up ID table. When items are created or removed, their Profinet IO mappings are handled as such, the handler retrieves the new id of the entity, and publishes it with Profinet. However, this does not cover cases where an external command source elicits a change in the DSM that’s unknown to a PLC.
Typical communication latencies
The charts below measure the time delay between a move command sent by a PLC and the ACK signal received by a PLC, with PNIO update time = 2mS.
GSD file