Professional Documents
Culture Documents
Evaluation of Timing Characteristics of A Prototype System Based On PROFINET IO RT Class 3
Evaluation of Timing Characteristics of A Prototype System Based On PROFINET IO RT Class 3
Paolo Ferrari, Alessandra Flammini, Daniele Marioli, Andrea Taroni, Francesco Venturini
University of Brescia - DEA
Via Branze 38, 25123 Brescia, Italy
Ph.+390303715627 Fax. +39030380014
alessandra.flammini@ing.unibs.it
1255
Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on August 08,2023 at 22:44:52 UTC from IEEE Xplore. Restrictions apply.
IO-Controller 1 that works with the ARM 9 family. The Siemens
IO-Device 1
ERTEC (EB400)
reference demo has been done with VxWorks.
on PCI
(CP1616)
The second demo-board is the Siemens CP1616, a
VxWorks
OS PCI board to be inserted in a PC. CP1616 does not offer
PC +
Linux RTAI OS
Development any I/O expansion and it works only if plugged in a PCI
tool
slot. Moreover, no debug interface is provided because
IO-Controller 2 IO-Device 2 the firmware of this board is locked. With the CP1616
(IM151-3)
(S7 317) and a suitable software stack the implementation of an
IO-Controller is possible. In fact, CP1616 comes with
Figure 2. PROFINET IO prototype system. low level drivers and a Linux RTAI based application
example of a controller.
3.1. Hardware
IO-Controller 1 (IOC1) and IO-Device 1 (IOD1) are 3.3. Software stack and applications
compliant with RT_Class 3. They are based on the same The approach to the realization of an RT_Class 3
ASIC, whose name is ERTEC400. network starting from demo boards is not so simple from
ERTEC400 provides: a four ports switch with the software point of view.
“transparent clock” functionalities; an ARM 946 The CP1616 and the EB400 have different software
processor; a direct memory access to the switch memory stacks and a different OS even they are based on the
which is used by the processor for fast reading of same ERTEC chip. Programmers need to deal with two
incoming frames and for writing of outgoing frames. In development environments.
addition to the communication part, other standard At the IO-Controller side the CP1616 is almost like a
peripherals are available: two USARTs; one SPI; two black box. The user can modify only the program at the
timers; up to 32 I/O signals (GPIO); one 16-bit local bus AL since the lower levels are given as object code.
interface; one 32-bit PCI interface at 66MHz. Luckily, realization of custom applications is quite
There is also a a lower cost ERTEC version: the simple since standard GNU compiler/debugger are
ERTEC200. It has a two ports switch and no PCI available under Linux. On the other hand, the reference
interface, making it suitable for IO-Devices only. demo uses a pretty old Linux version (kernel 2.6.10)
Both ASICs can be used to realize complete systems with RTAI 3.2. It should be noted that authors
since the embedded processor has enough computational recommend (and use) Kernel 2.6.17 and RTAI 3.4.
power to deal with the PROFINET stack and a medium- At the IO-Device side the software stack is more open
complexity application program. ERTEC400/200 are and users can operate at any levels. Clearly,
produced by Siemens and NEC and are available at the modifications should be done only if they do not
time of writing. In reality, there are other ASICs that interfere with RT_Class compliance. The board comes
could operate with RT_Class 3: netX from Hilscher and with VxWorks OS and its development environment,
hyNet from Hyperstone. They will be tested in the next Tornado II.
future, when their development systems become more The key aspects of the firmware reference
stable. implementation of a PROFINET IO-Device are
illustrated in Fig. 3. The more important task of the
3.2. Development boards firmware is the manipulation of the I/O data transported
There are two demo-board models for the ERTEC400 in the RED phase. In fact, the isochronisms goal is
[5]. reached only if new output data (coming from the IO-
The first model is the EB400, designed for the Controller) are processed immediately and new input
development of PROFINET IO field devices. Besides data (destined to the IO-Controller) are prepared before
the four Ethernet ports dedicated to PROFINET IO, the the end of the current cycle.
board has a plenty of expansion connectors since all the
Cycle k
peripherals inside the ERTEC400 are accessible:
USARTs, SPI, I/Os. System architecture is completed by Other tasks
Callback Done
32 Mbyte of SDRAM, 8 Mbyte of RAM, and 36.5 IO-Device
firmware
Mbyte of Flash ROM (512.Kbyte of boot Flash). In User routine for manipulation of
RT_Class 3 I/O data
order to debug the system, a dedicated connection is
available; a further 10/100 Ethernet port (SMC91C111
Sync
1256
Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on August 08,2023 at 22:44:52 UTC from IEEE Xplore. Restrictions apply.
The original firmware (version 2.0), given with the Endace NinjaCapture 1500 is a rack computer with
EB400, fulfils such requirements by means of a callback Linux (Debian) operating system and a DAG 4.5G2
function linked to the interrupt of “End of RED phase”. card. System architecture includes also a 2 TB disk
The user can write its own code to be executed during system and 2 GB of RAM. The DAG 4.5G2 card has
the callback, provided that routine finishes before the two full-rate 10/100/1000BaseT Ethernet ports, allowing
end of the GREEN phase. VxWorks is a multithread OS; acquisition of Ethernet traffic over two independent
the user callback is one of the tasks that simultaneously channels without dropping frames. DAG card has a
run in the system. reference clock of 67.1MHz, that means a timestamp
In the original firmware, actuation of the ERTEC resolution of about 14.9 ns. It should be noted that
outputs and sampling of the ERTEC inputs must be done internal time reference short term stability (two minutes)
in the callback routine writing or reading the shows a standard deviation of σ1s = 5 ns. Last, DAG card
corresponding I/O register in the ERTEC memory space. can provide a 1-PPS reference for external devices and
As a result, actuation/sampling time accuracy directly can accept a 1-PPS reference from a more accurate time
depends on time delay and jitter of the callback reference (e.g. a GPS receiver).
mechanism. As shown in the experimental section such a The generation of TCP traffic has been achieved by
solution is not the best one. Siemens plans to release a means of a software generator called IPERF. The user
new version of the firmware that exploits the possibility can set many parameters like packet dimension and
of having a hardware signal linked to the PROFINET transfer rate. All the tests with traffic have been done
sync frame. ERTEC can output such signal but it is using packets of variable dimension and the highest
disabled in the current firmware version. generation rate (slightly higher than 70%).
TAP
experiments have been repeated for several TPN1 values
3 and average periods are reported together with standard
IO-Controller 1 B→A
B→A A→B
A
IO-Device 1 deviation and jitter (defined as the difference between
ERTEC TAP (EB400)
on PCI
A
1
B maximum value and minimum value) computed over
(CP1616)
A TAP B
VxWorks 10000 frames. Distribution of TSYNC is shown in Fig. 5.
2 OS
PC + for the case TPN1=1ms.
Linux RTAI OS IO-Device 2
IO-Controller 2
(IM151-3)
The average values of TSYNC, TDXC1, and TDXD1 are
(S7317)
PROFINET Port
always the same, demonstrating the locking capability of
Monitoring Port the synchronization algorithms implemented at
Pass-through Port
Hardware level in the ERTEC400. The standard
Figure 4. Network test bench. deviation and especially the jitter values indicate a very
stable cycle. It should be remembered that they are in the
1257
Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on August 08,2023 at 22:44:52 UTC from IEEE Xplore. Restrictions apply.
same order of magnitude of the Ninjabox resolution.The 500
jitter of IOD1 is greater than the IOC1 jitter. This
400
behavior is natural since IOC1 is the master clock and
Samples
IOD1 is a slave clock. 300
1258
Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on August 08,2023 at 22:44:52 UTC from IEEE Xplore. Restrictions apply.
Output
Tfd
signal Tfd Tfd Tfd
Tpoll
t
Start of
Output callback
signal routine
t
RTC3
RTC3
RTC3
RTC3
SYNC
SYNC
SYNC
SYNC
PROFINET RTC1 RTC1 RTC1 RTC1
Cycle and TCP and TCP and TCP and TCP
Cycle k Cycle k+1 Cycle k+2 Cycle k+3 t
Referring to temporal diagram called “Improved Table 4 summarizes the results obtained when the
firmware” in Fig. 6, the basic idea is the introduction of network segment is loaded with TCP and RT_Class 1
a fixed delay (Tfd) from the start of cycle before communication. Average value and standard deviation
commuting the output. In this manner, the duration of remain in the same order of the previous ones.
the cycle measured from the outside (intervals THi or TLi) In conclusion, the proposed improvements to the
will be constant. The practical realization of this idea EB400 firmware allow for a drastic reduction of jitter
requires a “protected” polling loop of the local time and standard deviation at FW/AL interface with respect
reference for a variable time (Tpoll). When the difference to the original firmware. Anyway, performance is
between the actual time and the start of the cycle (which significantly lower than possible because of lack of
is automatically saved by ERTEC in a register) is greater hardware support to output synchronization.
than the imposed Tfd, the output is inverted. Since
protection of the critical loop involves disabling of TPN1 Firmware Average Jitter Std. Dev.
interrupt and scheduling mechanisms, Tpoll must be kept (ms) version (ns) (ns) (ns)
as short as possible; in the current implementation Tpoll 1 Improved 999 971 2 960 501
must remain under 5 µs. If the Tpoll limit is broken, the 2 Improved 1 999 946 3 400 489
loop suddenly ends and the output is actuated 3 Improved 3 000 050 3 401 491
immediately. It should be noted that in the last case jitter 4 Improved 4 000 039 2 462 409
can be introduced.
New experimental results with several TPN1 value are
reported in Table 3 (in the rows labeled Improved). The Table 4. Cycle time of a signal actuated at
average is taken over 1000 samples in a traffic free FW/AL interface in presence of RT_Class 1
network. Distribution of THi is shown in Fig. 8. and TCP load (70%).
1259
Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on August 08,2023 at 22:44:52 UTC from IEEE Xplore. Restrictions apply.
60
40
50
30 40
S amples
30
20
Samples
20
10 10
0
999,5 999,9 1000,2 1000,6 1000,9 1001,3
0
959,0 973,0 987,1 1001,1 1015,1 1029,2 T Hi (µs)
T Ho (µs)
Figure 7. Distribution of THo with the Figure 8. Distribution of THi after the
original EB400 firmware (TPN1=1ms). proposed improvements (TPN1=1ms).
together (shorted). In this way, the loop has been created DO
IOC1 h … DI … … IOD1
and the DO value continuously commutates between
high and low state, since the feedback is positive. A DO=not(DI) … … D0 … h
square wave appears at DO; the time THDO it remains in Data Exchange DI
the high state and the time TLDO it remains in the low
state are both equivalent to TER (TER = THDO or TER = TLDO). Output
signal
In Table 5 are listed the result obtained (over 1000 at DO
TLDO
THDO
samples) at various TPN1 in a traffic free network. It can
be seen that TER = 2⋅TPN1 with a standard deviation in the t
1260
Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on August 08,2023 at 22:44:52 UTC from IEEE Xplore. Restrictions apply.
[5] DK-ERTEC 400 PN IO, package including EB400 and
CP1616 boards, http://www.automation.siemens.com/pr
ofinet/html_76/produkte/development-kits_fuer_ertec.h
tm
[6] Endace Ninjabox Analyser <www.endace.com>.
[7] 96430 - 10/100BaseT Tap, Datasheet available online at
<www.netoptics.com>
1261
Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on August 08,2023 at 22:44:52 UTC from IEEE Xplore. Restrictions apply.