El6631 El6632en
El6631 El6632en
El6631 El6632en
EL6631, EL6632
PROFINET CONTROLLER Supplement
Table of contents
1 Foreword .................................................................................................................................................... 5
1.1 Notes on the documentation ............................................................................................................. 5
1.2 Guide through documentation ........................................................................................................... 6
1.3 Notes on information security............................................................................................................ 7
1.4 Safety instructions ............................................................................................................................. 8
1.5 Documentation issue status .............................................................................................................. 9
1.6 Version identification of EtherCAT devices ..................................................................................... 10
1.6.1 General notes on marking................................................................................................ 10
1.6.2 Version identification of EL terminals ............................................................................... 11
1.6.3 Beckhoff Identification Code (BIC) ................................................................................... 12
1.6.4 Electronic access to the BIC (eBIC)................................................................................. 14
7 Appendix .................................................................................................................................................. 91
7.1 FAQ ................................................................................................................................................. 91
7.1.1 Device description file (GSDML) / DAP (DeviceAccessPoint) ......................................... 91
7.1.2 Task configuration............................................................................................................ 92
7.1.3 EL663x-00x0 EtherCAT Terminals .................................................................................. 93
7.1.4 BoxStates of the PROFINET devices .............................................................................. 95
7.2 EtherCAT AL Status Codes ............................................................................................................ 95
7.3 Firmware compatibility .................................................................................................................... 96
7.4 Firmware Update EL/ES/EM/ELM/EP/EPP/ERPxxxx ..................................................................... 97
7.4.1 Device description ESI file/XML ....................................................................................... 98
7.4.2 Firmware explanation..................................................................................................... 101
7.4.3 Updating controller firmware *.efw ................................................................................. 102
7.4.4 FPGA firmware *.rbf ....................................................................................................... 104
7.4.5 Simultaneous updating of several EtherCAT devices .................................................... 108
7.5 Support and Service...................................................................................................................... 109
1 Foreword
This description is only intended for the use of trained specialists in control and automation engineering who
are familiar with the applicable national standards.
It is essential that the documentation and the following notes and explanations are followed when installing
and commissioning these components.
The qualified personnel is obliged to always use the currently valid documentation.
The responsible staff must ensure that the application or use of the products described satisfy all the
requirements for safety, including all the relevant laws, regulations, guidelines and standards.
Disclaimer
The documentation has been prepared with care. The products described are, however, constantly under
development.
We reserve the right to revise and change the documentation at any time and without prior announcement.
No claims for the modification of products that have already been supplied may be made on the basis of the
data, diagrams and descriptions in this documentation.
Trademarks
Beckhoff®, TwinCAT®, TwinCAT/BSD®, TC/BSD®, EtherCAT®, EtherCAT G®, EtherCAT G10®, EtherCAT P®,
Safety over EtherCAT®, TwinSAFE®, XFC®, XTS® and XPlanar® are registered trademarks of and licensed by
Beckhoff Automation GmbH. Other designations used in this publication may be trademarks whose use by
third parties for their own purposes could violate the rights of the owners.
Patent Pending
The EtherCAT Technology is covered, including but not limited to the following patent applications and
patents: EP1590927, EP1789857, EP1456722, EP2137893, DE102015105702 with corresponding
applications or registrations in various other countries.
EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH,
Germany.
Copyright
Title Description
EtherCAT System Documentation (PDF) • System overview
• EtherCAT basics
• Cable redundancy
• Hot Connect
• EtherCAT devices configuration
Explosion Protection for Terminal Notes on the use of the Beckhoff terminal systems in
Systems (PDF) hazardous areas according to ATEX and IECEx
Infrastructure for EtherCAT/Ethernet (PDF) Technical recommendations and notes for design,
implementation and testing
Software Declarations I/O (PDF) Open source software declarations for
Beckhoff I/O components
The documentations can be viewed at and downloaded from the Beckhoff website (www.beckhoff.com) via:
• the “Documentation and Download” area of the respective product page,
• the Download finder,
• the Beckhoff Information System.
In addition, the recommendations from Beckhoff regarding appropriate protective measures should be
observed. Further information regarding information security and industrial security can be found in our
https://www.beckhoff.com/secguide.
Beckhoff products and solutions undergo continuous further development. This also applies to security
functions. In light of this continuous further development, Beckhoff expressly recommends that the products
are kept up to date at all times and that updates are installed for the products once they have been made
available. Using outdated or unsupported product versions can increase the risk of cyber threats.
To stay informed about information security for Beckhoff products, subscribe to the RSS feed at https://
www.beckhoff.com/secinfo.
Exclusion of liability
All the components are supplied in particular hardware and software configurations appropriate for the
application. Modifications to hardware or software configurations other than those described in the
documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.
Personnel qualification
This description is only intended for trained specialists in control, automation and drive engineering who are
familiar with the applicable national standards.
Signal words
The signal words used in the documentation are classified below. In order to prevent injury and damage to
persons and property, read and follow the safety and warning notices.
DANGER
Hazard with high risk of death or serious injury.
WARNING
Hazard with medium risk of death or serious injury.
CAUTION
There is a low-risk hazard that could result in medium or minor injury.
NOTICE
The environment, equipment, or data may be damaged.
Notes
• The elements mentioned above result in the technical designation. EL3314-0000-0016 is used in the
example below.
• EL3314-0000 is the order identifier, in the case of “-0000” usually abbreviated to EL3314. “-0016” is the
EtherCAT revision.
• The order identifier is made up of
- family key (EL, EP, CU, ES, KL, CX, etc.)
- type (3314)
- version (-0000)
• The revision -0016 shows the technical progress, such as the extension of features with regard to the
EtherCAT communication, and is managed by Beckhoff.
In principle, a device with a higher revision can replace a device with a lower revision, unless specified
otherwise, e.g. in the documentation.
Associated and synonymous with each revision there is usually a description (ESI, EtherCAT Slave
Information) in the form of an XML file, which is available for download from the Beckhoff web site.
From 2014/01 the revision is shown on the outside of the IP20 terminals, see Fig. “EL5021 EL terminal,
standard IP20 IO device with batch number and revision ID (since 2014/01)”.
• The type, version and revision are read as decimal numbers, even if they are technically saved in
hexadecimal.
The BIC will be introduced step by step across all product groups.
The BIC is machine-readable and contains information that can also be used by the customer for handling
and product management.
Each piece of information can be uniquely identified using the so-called data identifier
(ANSI MH10.8.2-2016). The data identifier is followed by a character string. Both together have a maximum
length according to the table below. If the information is shorter, spaces are added to it.
Following information is possible, positions 1 to 4 are always present, the other according to need of
production:
Further types of information and data identifiers are used by Beckhoff and serve internal processes.
Example of composite information from positions 1 to 4 and with the above given example value on position
6. The data identifiers are highlighted in bold font:
1P072222SBTNk4p562d71KEL1809 Q1 51S678294
Accordingly as DMC:
BTN
An important component of the BIC is the Beckhoff Traceability Number (BTN, position 2). The BTN is a
unique serial number consisting of eight characters that will replace all other serial number systems at
Beckhoff in the long term (e.g. batch designations on IO components, previous serial number range for
safety products, etc.). The BTN will also be introduced step by step, so it may happen that the BTN is not yet
coded in the BIC.
NOTICE
This information has been carefully prepared. However, the procedure described is constantly being further
developed. We reserve the right to revise and change procedures and documentation at any time and
without prior notice. No claims for changes can be made from the information, illustrations and descriptions
in this information.
The Beckhoff Identification Code (BIC) is applied to the outside of Beckhoff products in a visible place. If
possible, it should also be electronically readable.
The interface that the product can be electronically addressed by is crucial for the electronic readout.
All Beckhoff EtherCAT devices have an ESI-EEPROM which contains the EtherCAT identity with the revision
number. The EtherCAT slave information, also colloquially known as the ESI/XML configuration file for the
EtherCAT master, is stored in it. See the corresponding chapter in the EtherCAT system manual (Link) for
the relationships.
Beckhoff also stores the eBIC in the ESI‑EEPROM. The eBIC was introduced into Beckhoff IO production
(terminals, box modules) in 2020; as of 2023, implementation is largely complete.
The user can electronically access the eBIC (if present) as follows:
• With all EtherCAT devices, the EtherCAT master (TwinCAT) can read the eBIC from the ESI‑EEPROM
◦ From TwinCAT 3.1 build 4024.11, the eBIC can be displayed in the online view.
◦ To do this, check the "Show Beckhoff Identification Code (BIC)" checkbox under
EtherCAT → Advanced Settings → Diagnostics:
◦ Note: As shown in the figure, the production data HW version, FW version, and production date,
which have been programmed since 2012, can also be displayed with "Show production info".
◦ Access from the PLC: From TwinCAT 3.1. build 4024.24, the functions FB_EcReadBIC and
FB_EcReadBTN for reading into the PLC are available in the Tc2_EtherCAT library from
v3.3.19.0.
• EtherCAT devices with a CoE directory may also have the object 0x10E2:01 to display their own eBIC,
which can also be easily accessed by the PLC:
◦ The object 0x10E2 will be preferentially introduced into stock products in the course of necessary
firmware revision.
◦ From TwinCAT 3.1. build 4024.24, the functions FB_EcCoEReadBIC and FB_EcCoEReadBTN for
reading into the PLC are available in the Tc2_EtherCAT library from v3.3.19.0
• The following auxiliary functions are available for processing the BIC/BTN data in the PLC in
Tc2_Utilities as of TwinCAT 3.1 build 4024.24
◦ F_SplitBIC: The function splits the Beckhoff Identification Code (BIC) sBICValue into its
components using known identifiers and returns the recognized substrings in the ST_SplittedBIC
structure as a return value
◦ BIC_TO_BTN: The function extracts the BTN from the BIC and returns it as a return value
• Note: If there is further electronic processing, the BTN is to be handled as a string(8); the identifier
"SBTN" is not part of the BTN.
• Technical background
The new BIC information is written as an additional category in the ESI‑EEPROM during device
production. The structure of the ESI content is largely dictated by the ETG specifications, therefore the
additional vendor-specific content is stored using a category in accordance with the ETG.2010. ID 03
tells all EtherCAT masters that they may not overwrite these data in the event of an update or restore
the data after an ESI update.
The structure follows the content of the BIC, see here. The EEPROM therefore requires approx.
50..200 bytes of memory.
• Special cases
◦ If multiple hierarchically arranged ESCs are installed in a device, only the top-level ESC carries the
eBIC information.
◦ If multiple non-hierarchically arranged ESCs are installed in a device, all ESCs carry the eBIC
information.
◦ If the device consists of several sub-devices which each have their own identity, but only the top-
level device is accessible via EtherCAT, the eBIC of the top-level device is located in the CoE
object directory 0x10E2:01 and the eBICs of the sub-devices follow in 0x10E2:nn.
2 Product description
2.1 Introduction
The PROFINET IO controller (master) is a TwinCAT supplement that turns every Beckhoff PC-based control
system into a PROFINET IO controller. By installing the supplement, a standard Ethernet interface becomes
a PROFINET master. This supplement can be used on PCs and Embedded PCs.
PROFINET can be simply coupled with EtherCAT in connection with the EL663x PROFINET terminal for the
EtherCAT I/O system, wherein the terminal represents a slave on the EtherCAT side but acts as a controller
towards PROFINET. In this way any EtherCAT network can also exchange data with PROFINET IO devices.
There are two kinds of PROFINET: PROFINET I/O and PROFINET CBA. TwinCAT supports PROFINET I/O.
In turn, 4 kinds of cyclic communication are defined within PROFINET I/O: RTClass1 to 3 and RToverUDP.
The TwinCAT PROFINET I/O controller and the EL6631 presently support RTClass1, while the EL6632 can
communicate over RTClass1 and RTClass3. All cycle times defined for RTClass1 are supported, from 1 ms
in power-of-2 steps (1, 2, 4, 8,… ms).
The smallest cycle time presently supported by the EL6632 is 500 µs (for RTClass3).
An Ethernet card with Intel chipset is required in order to use the PROFINET controller Supplement. Install
the RT-Ethernet driver for this card (TwinCAT Ethernet driver - Installation). Once the installation of the driver
has been completed you can create the PROFINET controller in the system manager and connect it to the
hardware (Ethernet card).
The PROFINET controller can be scanned in Config mode (TwinCAT icon is blue) and values can be written
in Freerun mode. The appropriate key must be entered in order to operate TwinCAT in Run mode.
In order to obtain the registration key, send the MAC address of the Ethernet card you are using with the
order. You will then receive the activation code.
MAC address
You can read the MAC address via the System Manager. To do this, append the PROFINET controller
device.
If the real-time driver has been installed correctly, you will be shown the corresponding cards. If no cards are
available for selection, this means that the driver has not been correctly installed.
Select the card to which your PROFINET devices are connected.
The MAC address of the card will be displayed under Adapter -> MAC address. This is now required for the
key.
Switch to the PROFINET tab and press ‘Insert key…’. Now enter the key.
Fig. 10: Entry of the MAC address as the key via "Insert Key"
If the key is accepted the following appears in the Key field: valid pn-controller key.
The EL6631 PROFINET IO Controller (Master) terminal supports the complete real-time function (RT) as
well as extensive diagnostic possibilities. All services in accordance with Conformance Class B are
supported.
Up to 15 PROFINET IO devices can be projected on the EL6631.
Supplement
The TwinCAT Supplement is not required for the EL6631 and EL6632.
TwinCAT Version
The released TwinCAT version is TwinCAT 2.11 R3.
It must be ensured that the target system also corresponds to the TwinCAT version.
Older TwinCAT versions cannot be used!
*) Real applicable approvals/markings see type plate on the side (product marking).
**) If there is another terminal with high power loss (e.g. E-bus current >250 mA) next to the terminal, an
EL9xx0 power feed or separation terminal must be connected in between (recommendation: terminal with E-
bus ASIC).
Ex markings
Standard Marking
ATEX II 3 G Ex nA IIC T4 Gc
IECEx Ex nA IIC T4 Gc
If there are several different errors, then the error that is located at the top of (or higher in) the table is always
displayed.
LEDs starting up
The EL6632 PROFINET-IRT controller terminal offers the complete RT (real time) or IRT (isochronous real-
time) functionality and a wide range of diagnostic options. All services in accordance with Conformance
Class C are supported.
Depending on the cycle time, up to five PROFINET-IRT or up to 15 PROFINET RT devices can be operated
at the EL6632 in a line topology.
Supplement
The TwinCAT Supplement is not required for the EL6631 and EL6632.
TwinCAT Version
The released TwinCAT version is TwinCAT 2.11 R3.
It must be ensured that the target system also corresponds to the TwinCAT version.
Older TwinCAT versions cannot be used!
*) Real applicable approvals/markings see type plate on the side (product marking).
**) If there is another terminal with high power loss (e.g. E-bus current >250 mA) next to the terminal, an
EL9xx0 power feed or separation terminal must be connected in between (recommendation: terminal with E-
bus ASIC).
Ex markings
Standard Marking
ATEX II 3 G Ex nA IIC T4 Gc
IECEx Ex nA IIC T4 Gc
Standards
The fundamental health and safety requirements are fulfilled by compliance with the following standards:
• EN 60079-0:2012+A11:2013
• EN 60079-15:2010
• EN 60079-31:2013 (only for certificate no. KEMA 10ATEX0075 X Issue 9)
Marking
The Beckhoff fieldbus components with standard temperature range certified according to the ATEX directive
for potentially explosive areas bear one of the following markings:
Standards
The fundamental health and safety requirements are fulfilled by compliance with the following standards:
• EN 60079-0:2011
• EN 60079-15:2010
• EN 60079-31:2013 (only for certificate no. IECEx DEK 16.0078X Issue 3)
Marking
Beckhoff fieldbus components that are certified in accordance with IECEx for use in areas subject to an
explosion hazard bear the following markings:
Marking for fieldbus components of certificate IECEx DEK 16.0078 X
no. IECEx DEK 16.0078X Issue 3: Ex nA IIC T4 Gc
Ex tc IIIC T135°C Dc
3.3 UL notice
CAUTION
Application
Beckhoff EtherCAT modules are intended for use with Beckhoff’s UL Listed EtherCAT
System only.
CAUTION
Examination
For cULus examination, the Beckhoff I/O System has only been investigated for risk of fire
and electrical shock (in accordance with UL508 and CSA C22.2 No. 142).
CAUTION
For devices with Ethernet connectors
Not for connection to telecommunication circuits.
Basic principles
UL certification according to UL508. Devices with this kind of certification are marked by this sign:
The optimum installation position requires the mounting rail to be installed horizontally and the connection
surfaces of the EL/KL terminals to face forward (see Fig. Recommended distances for standard installation
position). The terminals are ventilated from below, which enables optimum cooling of the electronics through
convection. “From below” is relative to the acceleration of gravity.
Compliance with the distances shown in Fig. Recommended distances for standard installation position is
recommended.
All other installation positions are characterized by different spatial arrangement of the mounting rail - see
Fig Other installation positions.
The minimum distances to ambient specified above also apply to these installation positions.
WARNING
Risk of electric shock and damage of device!
Bring the bus terminal system into a safe, powered down state before starting installation, disassembly or
wiring of the Bus Terminals!
Mounting
• Fit the mounting rail to the planned assembly location.
and press (1) the terminal module against the mounting rail until it latches in place on the mounting rail
(2).
• Attach the cables.
Demounting
• Remove all the cables. Thanks to the KM/EM connector, it is not necessary to remove all the cables
separately for this, but for each KM/EM connector simply undo 2 screws so that you can pull them off
(fixed wiring)!
• Lever the unlatching hook on the left-hand side of the terminal module upwards with a screwdriver (3).
As you do this
◦ an internal mechanism pulls the two latching lugs (3a) from the top hat rail back into the terminal
module,
◦ the unlatching hook moves forwards (3b) and engages
• In the case 32 and 64 channel terminal modules (KMxxx4 and KMxxx8 or EMxxx4 and EMxxx8) you
now lever the second unlatching hook on the right-hand side of the terminal module upwards in the
same way.
• Pull (4) the terminal module away from the mounting surface.
WARNING
Risk of electric shock and damage of device!
Bring the bus terminal system into a safe, powered down state before starting installation, disassembly or
wiring of the Bus Terminals!
Mounting
• Fit the mounting rail to the planned assembly location.
and press (1) the terminal module against the mounting rail until it latches in place on the mounting rail
(2).
• Attach the cables.
Demounting
• Remove all the cables.
• Lever the unlatching hook back with thumb and forefinger (3). An internal mechanism pulls the two
latching lugs (3a) from the top hat rail back into the terminal module.
• Pull (4) the terminal module away from the mounting surface.
Avoid canting of the module; you should stabilize the module with the other hand, if required.
3.8 Disposal
Products marked with a crossed-out wheeled bin shall not be discarded
with the normal waste stream. The device is considered as waste
electrical and electronic equipment. The national regulations for the
disposal of waste electrical and electronic equipment must be observed.
4 PN controller protocol
For the operation of several EL663x terminals the corresponding PROFINET protocol must be appended
several times. If the terminal assignment is to be modified or checked afterwards, this can take place on the
"Adapter" tab.
4.3.1 PROFINET
This is the NetID via which the PROFINET controller protocol can be reached via AMS.
This is the PortNo via which the PROFINET controller protocol can be reached via AMS. This is always fixed
to 0xFFFF.
This is the NetID to which certain AMS messages (e.g. PN records within the index range 0x1000 - 0x1FFF)
are forwarded by the PROFINET driver. Currently this is always the SystemNetId.
This is the PortNo to which certain AMS messages (e.g. PN records within the index range 0x1000 -
0x1FFF) are forwarded by the PROFINET driver. By default this is the PLC Port 802 of runtime system 1.
The key to enable the PROFINET controller protocol can be entered here. If a valid key has already been
entered, a corresponding message appears in the window and no further entry can be made.
The entered key is confirmed here. The key is thereby checked to ascertain whether or not it is valid. If not, a
corresponding message appears. This button is inactive if a valid key has already been entered.
In future it will be possible to enable the MRP (Media Redundancy Protocol) function via this menu; various
settings can be made for this.
After successful scanning the following dialogue opens (if devices were found).
Various settings or project planning can be carried out for the devices here. These are adopted only when
the corresponding button is explicitly pressed. When setting the name, care must be taken that only
PROFINET-compliant characters are used. This also applies to the IP address; only valid combinations of IP
and subnet are to be used. Name and IP are checked for correctness when setting PROFINET devices.
DCP_SET is acknowledged with an error If this is not the case. Changes that have been made can be read
back by pressing the Rescan button.
In addition the selected device can be signaled. This functionality is PROFINET-specific, but the method by
which the signaling takes place is vendor-specific. As standard, however, the signal must arrive with a
frequency of 2 Hz.
For example, the Beckhoff BK9103 Bus Coupler signals itself by the alternate flashing of two LEDs at a rate
of 2 Hz. This function is very helpful for identifying the devices in this list. The flashing is stopped again by
pressing the button once more. The flashing is stopped by closing the ‘Scan Devices’ window.
Subsequently, one or more devices can be marked with the Ctrl button. The selected device is adopted into
the project by pressing ‘Add Devices’.
GSDML devices
The associated GSDML devices must be located in the ‘..\TwinCAT\Io\ProfiNet’ (TC2) or ’..
\TwinCAT\3.1\Config\Io\Profinet‘ (TC3) folder!
‘Yes’ button:
An attempt is initially made to determine the ModuleIdentNumber of the DAP (Device Access Point) by an
implicit read access. If this fails a corresponding dialog opens containing the possible DAPs, which must
then be selected manually.
If all boxes have been appended, a ‘Reload Devices’ automatically takes place, i.e. the devices (adaptors)
created are transmitted to the PROFINET driver. Subsequently, a distinction is made as to whether the box
is a normal device or a drive with Profidrive support.
If the device is a normal device, the real module equipment (RealIdentificationData) is read out again by an
implicit read access. If it is a Profidrive device, conversely, the required information is read out by a Profidrive
access. A supervisor AR is established for this, within which the required write accesses can take place. The
Submodule interface on the DAP is taken here as the Parameter Access Point. The parameter access takes
place via data record 47, much like the case of the Profibus beforehand. When using Sinamics, however, it
must be noted that such an access is only permitted from version 4.3 SP2. If an older version is used, a
corresponding error message appears and the paramétrisation must take place manually.
Once the automatic module paramétrisation has been completed, a question box appears asking whether
the port data should be read in automatically. Here again, the port connection for the individual devices is
read out via an implicit read access.
The real port connection must be known for the various services. These may be simply diagnostic services,
but the port connection is also required for the automatic device start (via alias) or for the creation of the IRT
planning.
If this dialogue is acknowledged with ‘no’ or if the read access has failed, such a connection can also be
made manually at the individual ports in the TwinCAT project.
If the port connection has been successfully generated, a query also appears in the case of an IRT controller
(e.g. project planning on an EL6632) asking whether all devices are to be automatically connected in IRT
Mode (RTClass3) (provided they support it).
If this is affirmed the cable length is additionally set to 10 m copper cable on all projected ports. The IRT
algorithm requires this information for the calculation of the signal propagation delays. The precise cable
length is not so important here (approx. +/-10 m), because the propagation delays tend to be small at 100
Mbit/s (5 ns/m). If the automatic switchover is not to take place immediately, these points can also be
modified later either on the protocol or on the individual devices (on the interface or port submodule).
‘No’ button:
For each device a check is performed to ascertain whether the GSDML is present in the respective folder (‘..
\TwinCAT\Io\ProfiNet’). If this is the case, the list of possible DAPs is read in. Subsequently a selection
dialogue is opened so that the corresponding DAP can be selected.
Once the devices have been appended in the project, the API below the Box can be accessed and the
modules and submodules can be manually appended via it.
It is quite possible for a device to have several partners on a port in the online view. This is the case, for
example, if a switch is used in PROFINET that does not support LLDP (protocol for neighborhood ID).
In the offline view, on the other hand, partners may have been assigned that don’t exist in the project. This
takes place if the reading of the port properties was activated during automatic scanning and appending. In
this case the device has a ‘neighbor’ that is adopted into the project, but the associated device box is
missing from the *.tsm file. On activating this project the ‘neighbor’ which does not exist in the .tsm file is
ignored in the driver.
On the one hand the type of communication can be specified here. At present only RTClass1 (RT) and
RTClass3 (IRT Top) are supported.
In addition there is an option in this dialogue to specify a general cable length (for IRT only). An approximate
value or the max. cable length is sufficient here, because for the calculation of IRT communication this value
tends to be lower (at 100 Mbaud and copper cable 5 ns/m). For optimization this feature can also be
deactivated again later and the exact cable length can then be entered for each individual device (on the port
submodules).
Furthermore there is an option here to activate an ‘automatic port assignment’. As a result of this the port
connection set in the TwinCAT project is irrelevant. Before each restart of the PN communication the
topology is read out and the IRT communication is calculated on the basis of this. The advantage of this is
that possible cabling errors are minimized. In addition to that the ports can be simply replugged without
having to change and reload the TwinCAT project. Only a restart of the PN communication is required (e.g.
switch terminal to PREOP or disconnect the cable). As a result of this the bootup of the PROFINET
communication can take up to 30 seconds longer. The reason for this is the TTL (TimeToLive) factor in the
LLDP MIB. These are set by default to 20 seconds, i.e. only after this time can it be guaranteed that the port
connection read is also the current one.
Also, an additional offset for all Ti / To values can be specified in this menu.
It must be ensured that the task cycle lies in a PROFINET cycle, i.e. for PROFINET the basic cycle is 31.25
µs. This cycle is then always multiplied by the SendClockFactor (SCF) to obtain the basic cycle. The
SendClockFactor is usually set to 32 for RTClass1. This is also the minimum PN cycle for RTClass1 for the
Beckhoff PROFINET controller and results in the smallest cycle time of 1 ms. Further reductions take place
using a ReductionRatioFactor. This always corresponds to a multiple of the minimum PN cycle. For
RTClass1 the smallest cycle must always be doubled (permissible cycle times (for RTC1) with an SCF of 32
are 1, 2, 4, 8,…, 512).
The SCF can and must be reduced in order to achieve faster cycle times for RTClass3 as well. This is
presently at least 16 for a Beckhoff IRT controller (EL6632), which corresponds in turn to a basic cycle of
500 µs. In the case of such a decrease of the PROFINET cycle, it must be noted that the time of the
triggering task must also be adapted accordingly.
An IP setting can take place here. The selection of the address range need not correspond to the network
card settings. The PROFINET communication spreads its own net, which can be selected here. The IP
settings shown in the above illustration are the default settings, i.e. if nothing is changed the controller uses
these settings. The same applies to the controller name (system name). The corresponding button must be
pressed to change either of these two settings. A check is made to ascertain that the input is correct (e.g. the
format of the controller name must correspond to the PN spec.). These data are then permanently adopted.
If the subnet or gateway is changed, the settings will also be adopted by possible projected devices. There
is also a possibility to modify these settings via a supervisor tool.
In addition the VendorID and DeviceID of the controller can be read out in this dialogue. The server and
client UDP port employed can also be set here. The default settings should, however, be adequate in most
cases.
Furthermore there is a possibility in this dialogue to enable an automatic PROFINET start-up following a
device exchange (including devices without removable media). For correct functioning the nominal topology
must be specified once. On the basis of this information the controller can query the alias names of the
individual devices. Every device that supports alias names generates such a name for each of its ports. This
is composed of the neighborhood IDs (PortId.ChassisId). If this name is queried, the ‘new’ device answers. If
VendorId and DeviceId are correct the device is named with the actual name and a normal PROFINET start-
up can subsequently take place. With this mechanism a complete PROFINET system could also start up
without having named an individual device beforehand.
It is possible to check at a glance which device or box has a problem in the protocol under Box States.
Presently the following error messages are displayed under the “PnIoState”.
As opposed to the state, more than one status can be displayed in the “BoxPnIoDiag”, i.e. the whole thing is
bit-coded and up to 16 pieces of information can be displayed. The following statuses are currently
displayed.
0x0000 = No diagnosis
0xXXX1 = IOC-AR is not established
0xXXX2 = IOC-AR is established
0xXXX4 = IOC-AR is established but no ApplReady
0xXXX8 = IOC-AR is established but module difference
0xXX1X = At least one AlarmCR get diagnosis alarm
0xX1XX = At least one InputCR is invalid
0xX2XX = At least one InputCR Provider is in stop
0xX4XX = At least one InputCR Problemindicator is set
0x1XXX = At least one OutputCR is invalid
0x2XXX = At least one OutputCR Provider is in stop
0x4XXX = At least one OutputCR Problemindicator is set
On the one hand information about the status of the IO Controller Single AR is displayed here. In addition,
collective statuses are formed from the Frame Data statuses of the individual CRs. This applies to the input
and output CRs (currently only one CR is possible, in future several). Furthermore a PROFINET alarm is
also displayed in “PnIoDiag”
ADS Read:
NetId = AMSNETID des PROFINET Controllers
Port = BoxPort (0x1000 + BoxId)
Indexgroup = 0xF829
IndexOffset = 0
Length = sizeof(TPnIoDeviceDiagData);
where:
typedef struct
{
WORD pnioState;
WORD pnioDiag;
WORD NrOfInputCRs;
WORD NrOfOutputCRs;
WORD reserved[8];
} TPnIoDeviceDiagData, *PTPnIoDeviceDiagData;
The Box Status can also be read out via CoE for the EL663x. The index 0xAyy0 (where yy is the Adaptor /
Device number) and the subindex 0x001 must be taken for this.
“AddInfo” indicates whether additional information about the event is available. If this is marked by “Yes”, the
additional information can be fetched and displayed by clicking on the respective message. In the case of a
diagnosis alarm (“Diagnosis” appears), the precise diagnosis information can be fetched at the
corresponding level (device, API or module).
The complete diagnosis buffer is cleared by pressing the “Clear Diag History” button.
The displayed messages can be saved in a .TXT file by pressing the “Export Diag History” button.
The ‘DevState’ variable contains information about the physical communication status of the controller, such
as the link status or whether the transmission resources are still sufficient.
The other variables are the collective PROFINET error and the collective PROFINET status. Both indicate
the number of devices in which a problem has occurred or in which a diagnosis is available, i.e. the error
variable indicates possible problems with the establishment of a connection or reasons for an abort. The
diagnostic variable provides status information about an existing connection.
For further information, please also read the chapter entitled ‘Box States [} 51]'.
An ADSReadWrite is set.
ADS settings
PORT: Port number of the device (take this from the system manager)
DATA
typedef struct {
WORD RW;
#define PN_READ 0
#define PN_WRITE 1
WORD NrOfAR;
DWORD API;
WORD Slot;
WORD SubSlot;
PNIO_RECORD RecordData;
} PNIO_CONFIGRECORD
Sample:
5 Devices at protocol
There is a possibility here to select various PROFINET devices. In Beckhoff devices a search is carried out
via a defined path for the GSDML “..\TwinCAT\Io\ProfiNet" (TC2) or “..\TwinCAT\3.1\Config\Io\Profinet“
(TC3). These should be already present with the TwinCAT installation. If there are several GSDMLs for the
same device here, the one with the latest date is taken. If no device description is found, a corresponding
error message appears. Either the GSDML is copied into the folder and the menu is opened again, or the
same procedure is selected as for the third-party devices. If you click on “PROFINET IO Device”, an option is
offered to navigate to the corresponding GSDML in Windows Explorer. This is then integrated into the
project.
The DNS name from the GSDML is taken as the default name. When appending several devices
simultaneously, the default name is always supplemented by “-No.” (where No. = 1 to n). The name that was
assigned (and with which the device also appears in the tree), is at the same time also the “PROFINET
Station Name”, i.e. the name that must correspond to the name in the device. The device name can be
checked by scanning.
The modules can be attached to the API (Application Profile Interface). The DAP (Device Access Point),
which already brings along fixed properties from the GSDML (e.g. process data, interface and port
submodules, etc.), is always on Slot 0.
This module is always there and cannot be deleted or shifted. Each further module is assigned to a certain
API. The information regarding its identity comes from the GSDML. As standard this is always the API 0.
Alternatively, an API e.g. for the PROFIDRIVE profile or a fieldbus API is also conceivable. By clicking in the
API on “Append PROFINET modules…” a device catalogue is opened from which the corresponding
modules can be selected and appended. If the modules support it (described in GSDML), the submodules
can in turn be appended to them in the same way.
If you are on the “Diagnosis” tab within the API, you can select the corresponding API about which
information is to be obtained. If, for example, the PROFINET device is a drive, then this usually supports the
Profidrive profile, which is identified in turn via API 0x3A00. If the Real Identification Data is to be read from
this API, for example, then this access takes place via the Profidrive profile.
In addition, the “Get Real Configuration” button becomes active within an API (except for drives). It is
possible via this to adopt the read-in data record into the current project. Note that modules that have
already been created will be overwritten when doing this. This means that the links are lost, even in the case
of previously correctly created modules.
When displaying the module differences, additional information is displayed by marking the message.
Diagnosis Data
The available diagnosis can be read out by pressing the “Diagnosis Data” button. At device level all available
diagnosis data for the existing AR is read out here.
A maximum of two diagnosis parameters are displayed in the list; others are marked by “…”. If the individual
message is clicked, all available diagnosis information is displayed in the window below.
These variables are cyclically exchanged with the process image between the PROFINET driver and the
System Manager.
Presently the following error messages are displayed under the PnIoBoxState.
As opposed to the state, more than one status can be displayed in the “PnIoBoxDiag”, i.e. the whole thing is
bit-coded and up to 16 pieces of information can be displayed. The following statuses are currently
displayed.
0x0000 = No diagnosis
0xXXX1 = IOC-AR is not established
0xXXX2 = IOC-AR is established
0xXXX4 = IOC-AR is established but no ApplReady
0xXXX8 = IOC-AR is established but module difference
0xXX1X = At least one AlarmCR get diagnosis alarm
0xX1XX = At least one InputCR is invalid
0xX2XX = At least one InputCR Provider is in stop
0xX4XX = At least one InputCR Problemindicator is set
On the one hand information about the status of the IO Controller Single AR is displayed here. In addition,
collective statuses are formed from the Frame Data statuses of the individual CRs. The whole thing happens
for the input and the output CRs (currently only one is possible; in future the controller will support several
CRs). In addition a PROFINET alarm is also displayed in the “PnIoBoxDiag”
5.3 Settings
In addition the "InstanceID" and the "FrameID" can be changed in this window. However, the default settings
are sufficient for most applications. The Instance ID is incorporated into the formation of the UUID object. A
change should therefore be made only in exceptional cases. When changing the Frame ID the employed
RTClass must be taken into account (e.g. for RTClass1 unicast 0xC000 - 0xFAFF). If the device is on an IRT
controller and all devices have been switched automatically to RTClass3, the FrameID is managed
automatically and there is no input option (marked by “Fast Config”).
In addition the current process data length can be checked in this menu, i.e. the MaxLengths indicate which
process data size is supported by the respective device, while the ActLengths indicate the current process
data length (incl. IOPS and IOCS). The corresponding error message appears if the maximum lengths are
exceeded on appending further modules/submodules.
Various settings for the cycle time can be made on the “Features” tab. The controller cycle time for
RTCLass1 must always correspond to a power of two, starting from 1 ms ( 1, 2, 4, 8…). If an incorrect base
time has been selected, this is indicated by a corresponding message. For RTClass3 the 1 ms base time can
be divided again and again by two (down to min. 31.25 µs). The device cycle time can be changed via the
exponents. The minimum is always the Controller Cycle Time, unless a larger minimum cycle time than that
of the controller is defined in the GSDML. The maximum for RTClass1 is 512 ms. The “SendClockFactor” is
fixed here as the time base with the value 32 (31.25 µs * 32 = 1 ms). The “ReductionRatioFactor” is also
referenced to this, i.e. an RRFactor of 4 means a cycle time of 4 ms. The transmission point can be shifted
again within a cycle via the phase; i.e. where RR = 4 the phase can be 1 - 4. However, this value is only of
importance in the case of a synchronized transmission.
In addition there is an option here to adjust the PROFINET Watchdog factor, i.e. each device monitors the
input of the cyclic data on the basis of this factor. If the factor is set to the default value (3) this means that,
with an RR of 4, three cycles require 12 ms. Hence, a device reacts after 12 ms to missing telegrams (e.g.
with an alarm and/or disconnection of the AR). The limits and values are recalculated each time when
adjusting the individual factors.
5.3.2 BK9xx3
In the case of the Beckhoff K-Bus Coupler (at present BK9103 or BK9053) that is not connected to an
EL663x, an additional menu appears here.
The cyclic process data in the DAP of the Bus Coupler can be accessed easily via this menu.
In addition, a firmware update from the System Manager to the Bus Coupler can be carried out via this
menu. If the update takes place by IP it is important to ensure that the IP address is obtained via the DIP
switches. If this is not the case the connection breaks off during the update, since the memory area of the IP
settings is also formatted and rewritten.
5.3.3 EL663x
If the controller protocol is operated via an EL663x, then an additional menu appears on the devices.
At present only the choice of the PDO mapping is selectable for the controller; i.e. the form in which the
PROFINET process data are mapped to the PDOs on the EtherCAT side is set here.
It is possible to specify the Ti and To factors for IRT-capable devices via this menu. This means the time
during which the data in the device are valid within a cycle, or should be set to valid. The prerequisite is that
this feature is also supported. The GSMDL supplies the information about this. There is always a basic cycle
here (base time). A statement about the minimum possible time comes via the GSDML on the basis of a
minimum factor. The upper limit of the factor is limited by the cycle time employed. The shortest possible
time in which the data could be valid over PROFINET (always in reference to the cycle) is displayed via the
“Time Input Valid” or “Time Output Valid” parameter.
The dialogue appears if the device supports "SharedDevice". The information for this comes from the
GSDML.
There is an option here to allow or forbid the controller to access the individual sub-modules. By default the
controller may access all sub-modules; if SharedInput is supported it is switched off.
• "has output data" - the sub-module has outputs - activation of SharedInput not possible
• "no input data" - the sub-module has no inputs (and also no outputs)
• "no access" - access is blocked
• "true" or "false" - set value for SharedInput
The settings can be changed by double-clicking on the individual sub-modules. If the access to a port or
interface sub-module is changed, then it is changed for all ports or interfaces.
5.4 Modules
In general the submodules have the same diagnostic properties as the modules, i.e. in this case also it is
currently only possible to read out the nominal and actual configuration in TwinCAT. The order of the subslot
numbers is not necessarily the same as the order in the TwinCAT project. Hence, for example, the order in
DAP always starts with the interface submodule (ISM); however, the subslot number of the ISM is defined in
the GSDML and starts at 0x8000. There are 16 possible interfaces (0x8x00), each with up to 256 ports
(0x80xx). An ISM is followed by the Port submodule with the aforementioned subslot number.
If communication takes place over RTClass3, then the PLL window can additionally be set at the interface.
The information here is subdivided into local port information and remote port properties. I.e. the LLDP
protocol (IEEE Std 802.1AB) is prescribed in PROFINET from Conformance Class A (CCA). The devices
exchange neighbourhood IDs via this protocol, so that each port is known to its neighbor. Furthermore, the
Simple Network Management Protocol (SNMP) can be used as an aid at this point. On opening the ‘Port
Diagnosis’ tab, TwinCAT acts as a Network Management Station (NMS) and collects the required device
information via SNMP. In the above illustration, for example, it can be seen that the local Port 1 of the
BK9053 is connected to Port 2 of the BK9103. For correct topology recognition it is important that only
devices are present in the strand that also support the LLDP protocol (this is also applies to switches!).
Selection can be made here between the individual indices. The data can be read and/or written depending
on the access method. The online values are updated when reading back. If an individual index is marked,
then all values within an index will be set to default; if individual values are marked, only these will be reset.
Writable values are changed by double-clicking on the respective line.
6.1 Overview
There are ready-to-use function blocks for the use of the PROFINET controller. The library contains further
function blocks for the EL6631-0010 PROFINET Device Terminal, but these are not part of this
documentation.
(https://infosys.beckhoff.com/content/1033/el6631_el6632/Resources/2595517963/.zip)
I&M functions
6.2 Functions
6.2.1 I&M
Using this function block the PROFINET controller reads all I&M 0 data (Identification & Maintenance) from a
device referenced via the Port input.
The frame structure of the I&M0 function corresponds to the index 0xAFF0 [} 86] according to PROFINET
standard.
VAR_INPUT
VAR_INPUT
bStart : BOOL;
NETID : T_AmsNetId;(* AMS Net ID from Controller *)
PORT : T_AmsPort; (* Port used by Controller to communicate with Device *)
END_VAR
PORT: Port via which the controller communicates with the device (port = Device ID + 1000 hex)
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
IM_AFF0 : str_IM_0xAFF0;
bError : BOOL;
iErrorID : UDINT;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
While Busy = TRUE, no new command will be accepted at the inputs.
IM_AFF0: Output of the I&M0 frame supplied by the device in a structure. str_IM_0xAFF0.
bError: In the event of an error during the command transfer, this output is set once the bBusy output has
been reset.
iErrorID: Supplies an ADS error number when the output bError is set.
Using this function block the PROFINET controller reads all I&M1 data (Information & Maintenance) from a
device referenced via the Port input.
The frame structure of the I&M1 function corresponds to the index 0xAFF1 [} 86] according to PROFINET
standard.
VAR_INPUT
VAR_INPUT
bStart : BOOL;
NETID : T_AmsNetId;(* AMS Net ID from Controller *)
PORT : T_AmsPort; (* Port used by Controller to communicate with Device *)
END_VAR
PORT: Port via which the controller communicates with the device (port = Device ID + 1000 hex)
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
st_IM_TagFunction : STRING(32);
st_IM_TagLocation : STRING(22);
bError : BOOL;
iErrorID : UDINT;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
While Busy = TRUE, no new command will be accepted at the inputs.
st_IM_TagLocation: label read out for the installation site of the device.
bError: In the event of an error during the command transfer, this output is set once the bBusy output has
been reset.
iErrorID: Supplies an ADS error number when the output bError is set.
Using this function block the PROFINET controller writes all I&M1 data (Identification & Maintenance) data to
a device referenced via the Port input.
The frame structure of the I&M1 function corresponds to the index 0xAFF1 [} 86] according to PROFINET
standard.
VAR_INPUT
VAR_INPUT
bStart : BOOL;
NETID : T_AmsNetId;(* AMS Net ID from Controller *)
PORT : T_AmsPort; (* Port used by Controller to communicate with Device *)
st_IM_TagFunction : STRING(32);
st_IM_TagLocation : STRING(22);
END_VAR
PORT: Port via which the controller communicates with the device (port = Device ID + 1000 hex)
st_IM_TagFunction: With this string the functional description is saved to the device.
st_IM_TagLocation: With this string the installation site is saved to the device.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
iErrorID : UDINT;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
While Busy = TRUE, no new command will be accepted at the inputs.
bError: In the event of an error during the command transfer, this output is set once the bBusy output has
been reset.
iErrorID: Supplies an ADS error number when the output bError is set..
Using this function block the PROFINET controller reads all I&M 2 data (Identification & Maintenance) from a
device referenced via the Port input.
The frame structure of the I&M2 function corresponds to the index 0xAFF2 [} 87] according to PROFINET
standard.
VAR_INPUT
VAR_INPUT
bStart : BOOL;
NETID : T_AmsNetId;(* AMS Net ID from Controller *)
PORT : T_AmsPort; (* Port used by Controller to communicate with Device *)
END_VAR
PORT: Port via which the controller communicates with the device (port = Device ID + 1000 hex)
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
str_Date : TIMESTRUCT; (*YYYY-MM-DD HH:MM*)
bError : BOOL;
iErrorID : UDINT;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
While Busy = TRUE, no new command will be accepted at the inputs.
str_Date: Returns the date of installation of the device in the format < YYYY-MM-DD HH:MM >.
bError: In the event of an error during the command transfer, this output is set once the bBusy output has
been reset.
iErrorID: Supplies an ADS error number when the output bError is set.
Using this function block the PROFINET controller writes all I&M 2 data (Identification & Maintenance) data
to a device referenced via the Port input.
The frame structure of the I&M2 function corresponds to the index 0xAFF2 [} 87] according to PROFINET
standard.
VAR_INPUT
VAR_INPUT
bStart : BOOL;
NETID : T_AmsNetId;(* AMS Net ID from Controller *)
PORT : T_AmsPort; (* Port used by Controller to communicate with Device *)
str_Date : TIMESTRUCT;(*YYYY-MM-DD HH:MM*)
END_VAR
PORT: Port via which the controller communicates with the device (port = Device ID + 1000hex)
str_Date : Writes a date (e.g. date of installation of the device) to the device in the format < YYYY-MM-DD
HH:MM >.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
iErrorID : UDINT;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
While Busy = TRUE, no new command will be accepted at the inputs.
bError: If an error should occur during the transmission of the command, this output is set after the bBusy
output has been reset.
iErrorID: Supplies an ADS error number when the output bError is set.
Using this function block the PROFINET controller reads all I&M3 data (Identification & Maintenance) from a
device referenced via the Port input.
The frame structure of the I&M3 function corresponds to the index 0xAFF3 [} 87] according to PROFINET
standard.
VAR_INPUT
VAR_INPUT
bStart :
BOOL; NETID : T_AmsNetId;(* AMS Net ID from Controller *)
PORT : T_AmsPort; (* Port used by Controller to communicate with Device *)
END_VAR
PORT: Port via which the controller communicates with the device (port = Device ID + 1000 hex)
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
st_IM_Descriptor : STRING(54);
bError : BOOL;
iErrorID : UDINT;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
While Busy = TRUE, no new command will be accepted at the inputs.
bError: In the event of an error during the command transfer, this output is set once the bBusy output has
been reset.
iErrorID: Supplies an ADS error number when the output bError is set.
Using this function block the PROFINET controller writes all I&M3 data (Identification & Maintenance) data to
a device referenced via the Port input.
The frame structure of the I&M3 function corresponds to the index 0xAFF3 [} 87] according to PROFINET
standard.
VAR_INPUT
VAR_INPUT
bStart : BOOL;
NETID : T_AmsNetId;(* AMS Net ID from Controller *)
PORT : T_AmsPort; (* Port used by Controller to communicate with Device *)
st_IM_Descriptor : STRING(54);
END_VAR
PORT: Port via which the controller communicates with the device (port = Device ID + 1000 hex)
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
iErrorID : UDINT;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
While Busy = TRUE, no new command will be accepted at the inputs.
bError: In the event of an error during the command transfer, this output is set once the bBusy output has
been reset.
iErrorID: Supplies an ADS error number when the output bError is set.
Using this function block the PROFINET controller reads all I&M4 data (Identification & Maintenance) from a
device referenced via the Port input.
The frame structure of the I&M4 function corresponds to the index 0xAFF4 [} 87] according to PROFINET
standard.
VAR_INPUT
VAR_INPUT
bStart : BOOL;
NETID : T_AmsNetId;(* AMS Net ID from Controller *)
PORT : T_AmsPort; (* Port used by Controller to communicate with Device *)
END_VAR
PORT: Port via which the controller communicates with the device (port = Device ID + 1000 hex)
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
st_IM_Signatur : STRING(54);
bError : BOOL;
iErrorID : UDINT;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
While Busy = TRUE, no new command will be accepted at the inputs.
bError: In the event of an error during the command transfer, this output is set once the bBusy output has
been reset.
iErrorID: Supplies an ADS error number when the output bError is set.
Using this function block the PROFINET controller writes all I&M4 data (Identification & Maintenance) data to
a device referenced via the Port input.
The frame structure of the I&M4 function corresponds to the index 0xAFF4 [} 87] according to PROFINET
standard.
VAR_INPUT
VAR_INPUT
bStart : BOOL;
NETID : T_AmsNetId;(* AMS Net ID from Controller *)
PORT : T_AmsPort; (* Port used by Controller to communicate with Device *)
st_IM_Signatur : STRING(54);
END_VAR
PORT: Port via which the controller communicates with the device (port = Device ID + 1000 hex)
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
iErrorID : UDINT;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
While Busy = TRUE, no new command will be accepted at the inputs.
bError: In the event of an error during the command transfer, this output is set once the bBusy output has
been reset.
iErrorID: Supplies an ADS error number when the output bError is set.
6.2.2 Port
When called, this module supplies the statistical data for the ports of a PROFINET device.
VAR_INPUT
VAR_INPUT
bStart : BOOL;
NETID : T_AmsNetId;(* AMS Net ID from Controller *)
PORT : T_AmsPort; (* Port used by Controller to communicate with Device *)
END_VAR
PORT: Port via which the controller communicates with the device (port = Device ID + 1000 hex)
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
str_RemotePort_1 : str_GetPortStatistic [} 88];
str_RemotePort_2 : str_GetPortStatistic [} 88];
bPort1 : BOOL;
bPort2 : BOOL;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
While Busy = TRUE, no new command will be accepted at the inputs.
VAR_INPUT
VAR_INPUT
bStart : BOOL;
NETID : T_AmsNetId;(* AMS Net ID from Controller *)
PORT : T_AmsPort; (* Port used by Controller to communicate with Device *)
END_VAR
PORT: Port via which the controller communicates with the device (port = Device ID + 1000 hex)
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
str_RemotePort_1 : str_PortDiag [} 89];
str_RemotePort_2 : str_PortDiag [} 89];
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
While Busy = TRUE, no new command will be accepted at the inputs.
6.2.3 AlarmDiag
Diagnosis alarms can be read out using this function block. Each instance of this function block makes a
PLC input available ("PnIoBoxDiag"). This input must be linked to the “PnIoBoxDiag” input of the device that
is to be evaluated. After successful reading of the diagnosis alarms/warnings, the alarm status of the device
is reset. The function block must be called once for each PROFINET device. A running index (iNrAlarms)
indicates how many diagnosis alarms have been read from the buffer.
VAR_INPUT
VAR_INPUT
bEnable : BOOL;
NETID : T_AmsNetId;(* AMS Net ID from Controller *)
PORT : T_AmsPort; (* Port used by Controller to communicate with Device *)
END_VAR
PORT: Port via which the controller communicates with the device (port = Device ID + 1000 hex)
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
stAlarmDiagData : ST_PN_AlarmDiagData;
bError : BOOL;
iErrorID : UDINT;
iNrAlarms : INT;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
While Busy = TRUE, no new command will be accepted at the inputs.
stAlarmDiagData: Diagnosis messages are output via this structure. An alarm is output via the structure in
each cycle as long as the status bit [0x0010 = at least one AlarmCR got a diagnosis alarm] is present at the
PLC input.
bError: If an error should occur during the transmission of the command, this output is set after the bBusy
output has been reset.
iErrorID: Supplies an ADS error number when the output bError is set.
VAR
VAR
PnIoBoxDiag AT %I* : WORD; (*Hardware Input*)
END_VAR
PnIoBoxDiag : Hardware input: this variable must be linked to the PROFINET device. A change of state of
this variable indicates to the PLC program that there are new diagnosis alarms in the linked PROFINET
device.
6.3.1 I&M
6.3.1.1 str_SW_Rec
The data structure str_IM_0xAFF0 maps the structure of the I&M0 frame in the PLC. Which contains
information that is permanently stored in PROFINET devices.
TYPE str_IM_0xAFF0 :
STRUCT
nBlockTyp : WORD;
nBlockLen : WORD;
nBlockVersion : WORD;
nVendorID : WORD;
cOrderID : STRING(21);
cSerialNumber : STRING(17);
nHW_Rev : WORD;
strSW_Rev : str_SW_Rec;
nRevCount : WORD;
nProfileID : WORD;
nProfileSpecType : WORD;
arIM_Version : ARRAY[0..1] OF BYTE;
nSupport : WORD;
END_STRUCT
END_TYPE
The data structure str_SW_REC contains the software version of the PROFINET device.
TYPE str_SW_Rec :
STRUCT
cSWRevPrefix :STRING(2);
nSWRevFuncEnhance :BYTE;
nSWRevBugFix :BYTE;
nSWRevIntCha :BYTE;
END_STRUCT
END_TYPE
6.3.1.2 str_IM_0xAFF1
The data structure str_IM_0xAFF1 maps the structure of the I&M1 frame in the PLC. This structure is used
both for writing to, and for reading from a PROFINET device.
TYPE str_IM_0xAFF1 :
STRUCT
nBlockTyp : WORD;
nBlockLen : WORD;
nBlockVersion : WORD;
st_IM_TagFunction : STRING(32);
st_IM_TagLocation : STRING(22);
END_STRUCT
END_TYPE
6.3.1.3 str_IM_0xAFF2
The data structure str_IM_0xAFF2 maps the structure of the I&M2 frame in the PLC. This structure is used
both for writing to, and for reading from a PROFINET device.
TYPE str_IM_0xAFF1 :
STRUCT
nBlockTyp : WORD;
nBlockLen : WORD;
nBlockVersion : WORD;
st_IM_Date : STRING(16);
END_STRUCT
END_TYPE
6.3.1.4 str_IM_0xAFF3
The data structure str_IM_0xAFF3 maps the structure of the I&M3 frame in the PLC. This structure is used
both for writing to, and for reading from a PROFINET device.
TYPE str_IM_0xAFF3 :
STRUCT
nBlockTyp : WORD;
nBlockLen : WORD;
nBlockVersion : WORD;
st_IM_Descriptor : STRING(54)
END_STRUCT
END_TYPE
6.3.1.5 str_IM_0xAFF4
The data structure str_IM_0xAFF4 maps the structure of the I&M4 frame in the PLC. This structure is used
both for writing to, and for reading from a PROFINET device.
TYPE str_IM_0xAFF3 :
STRUCT
nBlockTyp : WORD;
nBlockLen : WORD;
nBlockVersion : WORD;
st_IM_Signatur : STRING(54)
END_STRUCT
END_TYPE
6.3.2 Port
6.3.2.1 str_GetPortStatistic
All statistical information of a device is represented in the data structure str_GetPortStatistic.
TYPE str_GetPortStatisitc :
STRUCT
Speed : DWORD;
PhyMAC : STRING(50);
OperatingStatus : STRING(16);
RxOctets : DWORD;
RxUniCastPackets : DWORD;
RxBadPackets : DWORD;
RxDroppedFrames : DWORD;
RxUnknownProtocol : DWORD;
TxOctets : DWORD;
TxUniCastPackets : DWORD;
TxBadPackets : DWORD;
TxDroppedPackets : DWORD;
END_STRUCT
END_TYPE
6.3.2.2 str_PortDiag
All port diagnostic information is represented in the data structure str_PortDiag.
TYPE str_PortDiag :
STRUCT
PortId : STRING(128);
PortDescription : STRING(128);
SystemName : STRING(128);
SystemDescription : STRING(128);
ChassisId : STRING(128);
END_STRUCT
END_TYPE
6.3.3 AlarmDiag
6.3.3.1 ST_PN_DiagMessage
The data structure ST_PN_DiagMessage contains the complete data stream of a diagnostic message that is
sent by a PROFINET on request. This data stream is evaluated in the FB_PN_ALARM_DIAG function block
and is copied to a readable structure.
TYPE ST_PN_DiagMessage :
STRUCT
nFlags : WORD;
nTextID : WORD;
TimeStamp : ARRAY[0..7] OF BYTE;
nData : ARRAY[0..299] OF BYTE;
END_STRUCT
END_TYPE
6.3.3.2 ST_PN_Diag
The data structure ST_PN_Diag contains a diagnostic message from a terminal that is connected via a PN
device and a controller.
TYPE str_PortDiag :
STRUCT
strTimeStamp : ARRAY[0..7] OF BYTE;
nAPI : DWORD;
nSlot : WORD;
nSubSlot : WORD;
nAlarmType : WORD;
nAlarmSpecifier : WORD;
nUserStructIdentifier : WORD;
nChannelNumber : WORD;
nChannelErrorTyp : WORD;
nChannelProperties : WORD;
nExtChannelErrorTyp : WORD;
arSpare : ARRAY [1..9] OF WORD;
arUserSpecificData : ARRAY [0..19] OF BYTE;
END_STRUCT
END_TYPE
The information content of the structure corresponds to that of the Diag History, which is displayed in the
system manager.
6.3.3.3 ST_PN_AlarmDiagData
The data structure ST_PN_AlarmDiagData contains the alarm diagnosis data record read from a device,
including a time stamp that indicates when the event occurred and a flag that indicates that ‘user-specific’
data are present.
TYPE ST_PN_AlarmDiagData :
STRUCT
ST_TimeStamp : TIMESTRUCT;
sNameOfStation : STRING(20);
ST_Diag : ST_PN_Diag [} 89];
bUserSpecData : BOOL;
END_STRUCT
END_TYPE
7 Appendix
7.1 FAQ
The following information answers frequently asked questions and gives hints for the configuration of the
PROFINET system. If these are not observed, undesired behavior may occur. Here you will find approaches
to diagnostics.
◦ For products from other suppliers/manufacturers, the supplier must be contacted or the GSDML
files can be downloaded from the website.
• EtherCAT diagnostics
◦ EtherCAT state = Operational (OP)
◦ WcState = 0 (Data valid)
• EtherCAT diagnostics
◦ EtherCAT state = Operational (OP)
◦ WcState = 0 (Data valid)
Note
• It is recommended to use the newest possible firmware for the respective hardware
• Beckhoff is not under any obligation to provide customers with free firmware updates for delivered
products.
NOTICE
Risk of damage to the device!
Pay attention to the instructions for firmware updates on the separate page [} 97].
If a device is placed in BOOTSTRAP mode for a firmware update, it does not check when downloading
whether the new firmware is suitable.
This can result in damage to the device! Therefore, always make sure that the firmware is suitable for the
hardware version!
EL6631
Hardware (HW) Firmware Revision no. Date of release
02-17* 01 (V00.08) EL6631-0000-0016 2012/04
EL6631-0000-0017 2012/10
02 EL6631-0000-0018 2013/05
03 2014/12
04 2015/10
05 2017/01
06 2017/12
07 2018/08
08 2019/12
09 2021/04
10 2022/01
11* 2022/12
EL6632
Hardware (HW) Firmware Revision no. Date of release
02-07 00 (V00.26) EL6632-0000-0016 BETA Version
01 EL6632-0000-0017 2014/11
08-16* 02 2015/10
03 2016/03
04 2017/03
05 2018/08
06* 2021/10
*) This is the current compatible firmware/hardware version at the time of the preparing this documentation.
Check on the Beckhoff web page whether more up-to-date documentation is available.
NOTICE
Only use TwinCAT 3 software!
A firmware update of Beckhoff IO devices must only be performed with a TwinCAT 3 installation. It is
recommended to build as up-to-date as possible, available for free download on the Beckhoff website.
To update the firmware, TwinCAT can be operated in the so-called FreeRun mode, a paid license is not
required.
The device to be updated can usually remain in the installation location, but TwinCAT has to be operated in
the FreeRun. Please make sure that EtherCAT communication is trouble-free (no LostFrames etc.).
Other EtherCAT master software, such as the EtherCAT Configurator, should not be used, as they may not
support the complexities of updating firmware, EEPROM and other device components.
Storage locations
NOTICE
Application-specific writing of the ESI-EEPROM
The ESI is developed by the device manufacturer according to ETG standard and released for the
corresponding product.
- Meaning for the ESI file: Modification on the application side (i.e. by the user) is not permitted.
- Meaning for the ESI EEPROM: Even if a writeability is technically given, the ESI parts in the EEPROM
and possibly still existing free memory areas must not be changed beyond the normal update process.
Especially for cyclic memory processes (operating hours counter etc.), dedicated memory products such as
EL6080 or IPC's own NOVRAM must be used.
• Depending on functionality and performance EtherCAT slaves have one or several local controllers for
processing I/O data. The corresponding program is the so-called firmware in *.efw format.
• In some EtherCAT slaves the EtherCAT communication may also be integrated in these controllers. In
this case the controller is usually a so-called FPGA chip with *.rbf firmware.
Customers can access the data via the EtherCAT fieldbus and its communication mechanisms. Acyclic
mailbox communication or register access to the ESC is used for updating or reading of these data.
The TwinCAT System Manager offers mechanisms for programming all three parts with new data, if the
slave is set up for this purpose. Generally the slave does not check whether the new data are suitable, i.e. it
may no longer be able to operate if the data are unsuitable.
The update using so-called bundle firmware is more convenient: in this case the controller firmware and the
ESI description are combined in a *.efw file; during the update both the firmware and the ESI are changed in
the terminal. For this to happen it is necessary
• for the firmware to be in a packed format: recognizable by the file name, which also contains the
revision number, e.g. ELxxxx-xxxx_REV0016_SW01.efw
• for password=1 to be entered in the download dialog. If password=0 (default setting) only the firmware
update is carried out, without an ESI update.
• for the device to support this function. The function usually cannot be retrofitted; it is a component of
many new developments from year of manufacture 2016.
NOTICE
Risk of damage to the device!
ü Note the following when downloading new device files
a) Firmware downloads to an EtherCAT device must not be interrupted
b) Flawless EtherCAT communication must be ensured. CRC errors or LostFrames must be avoided.
c) The power supply must adequately dimensioned. The signal level must meet the specification.
ð In the event of malfunctions during the update process the EtherCAT device may become unusable and
require re-commissioning by the manufacturer.
The ESI device description is stored locally on the slave and loaded on start-up. Each device description has
a unique identifier consisting of slave name (9 characters/digits) and a revision number (4 digits). Each slave
configured in the System Manager shows its identifier in the EtherCAT tab:
Fig. 66: Device identifier consisting of name EL3204-0000 and revision -0016
The configured identifier must be compatible with the actual device description used as hardware, i.e. the
description which the slave has loaded on start-up (in this case EL3204). Normally the configured revision
must be the same or lower than that actually present in the terminal network.
For further information on this, please refer to the EtherCAT system documentation.
The simplest way to ascertain compliance of configured and actual device description is to scan the
EtherCAT boxes in TwinCAT mode Config/FreeRun:
Fig. 67: Scan the subordinate field by right-clicking on the EtherCAT device
If the found field matches the configured field, the display shows
otherwise a change dialog appears for entering the actual data in the configuration.
In this example in Fig. Change dialog, an EL3201-0000-0017 was found, while an EL3201-0000-0016 was
configured. In this case the configuration can be adapted with the Copy Before button. The Extended
Information checkbox must be set in order to display the revision.
The new ESI description is selected in the following dialog, see Fig. Selecting the new ESI. The checkbox
Show Hidden Devices also displays older, normally hidden versions of a slave.
A progress bar in the System Manager shows the progress. Data are first written, then verified.
The TwinCAT System Manager shows the version of the controller firmware if the master can access the
slave online. Click on the E-Bus Terminal whose controller firmware you want to check (in the example
terminal 2 (EL3204)) and select the tab CoE Online (CAN over EtherCAT).
In Fig. Display of EL3204 firmware version the firmware version of the selected EL3204 is shown as 03 in
CoE entry 0x100A.
In (A) TwinCAT 2.11 shows that the Online CoE directory is currently displayed. If this is not the case, the
Online directory can be loaded via the Online option in Advanced Settings (B) and double-clicking on
AllObjects.
Switch to the Online tab to update the controller firmware of a slave, see Fig. Firmware Update.
Proceed as follows, unless instructed otherwise by Beckhoff support. Valid for TwinCAT 2 and 3 as
EtherCAT master.
• Switch TwinCAT system to ConfigMode/FreeRun with cycle time >= 1 ms (default in ConfigMode is
4 ms). A FW-Update during real time operation is not recommended.
The firmware version number included in the terminal serial number contains both firmware components. If
one of these firmware components is modified this version number is updated.
The TwinCAT System Manager indicates the FPGA firmware version. Click on the Ethernet card of your
EtherCAT strand (Device 2 in the example) and select the Online tab.
The Reg:0002 column indicates the firmware version of the individual EtherCAT devices in hexadecimal and
decimal representation.
If the column Reg:0002 is not displayed, right-click the table header and select Properties in the context
menu.
The Advanced Settings dialog appears where the columns to be displayed can be selected. Under
Diagnosis/Online View select the '0002 ETxxxx Build' check box in order to activate the FPGA firmware
version display.
Update
The following sequence order have to be met if no other specifications are given (e.g. by the Beckhoff
support):
• Switch TwinCAT system to ConfigMode/FreeRun with cycle time >= 1 ms (default in ConfigMode is
4 ms). A FW-Update during real time operation is not recommended.
• In the TwinCAT System Manager select the terminal for which the FPGA firmware is to be updated (in
the example: Terminal 5: EL5001) and
click the Advanced Settings button in the EtherCAT tab:
• The Advanced Settings dialog appears. Under ESC Access/E²PROM/FPGA click on Write FPGA
button:
• Select the file (*.rbf) with the new FPGA firmware, and transfer it to the EtherCAT device:
NOTICE
Risk of damage to the device!
A download of firmware to an EtherCAT device must not be interrupted in any case! If you interrupt this
process by switching off power supply or disconnecting the Ethernet link, the EtherCAT device can only be
recommissioned by the manufacturer!
Select the required slaves and carry out the firmware update in BOOTSTRAP mode as described above.
Please contact your Beckhoff branch office or representative for local support and service on Beckhoff
products!
The addresses of Beckhoff's branch offices and representatives round the world can be found on her internet
pages: www.beckhoff.com
You will also find further documentation for Beckhoff components there.
Support
The Beckhoff Support offers you comprehensive technical assistance, helping you not only with the
application of individual Beckhoff products, but also with other, wide-ranging services:
• support
• design, programming and commissioning of complex automation systems
• and extensive training program for Beckhoff system components
Hotline: +49 5246 963 157
e-mail: [email protected]
web: www.beckhoff.com/support
Service
The Beckhoff Service Center supports you in all matters of after-sales service:
• on-site service
• repair service
• spare parts service
• hotline service
Hotline: +49 5246 963 460
e-mail: [email protected]
web: www.beckhoff.com/service
Headquarters Germany
Hülshorstweg 20
33415 Verl
Germany
Phone: +49 5246 963 0
e-mail: [email protected]
web: www.beckhoff.com