Upload
others
View
12
Download
0
Embed Size (px)
Citation preview
EtherCAT® Network Simulation
Run an EtherCAT controller with a simulated network
• Use Cases overview
• General system architecture
• HiL and SiL architectures
• Use Cases details
• Technical details
• Licensing
Apr 2022 2
Content
Apr 2022 3
Use Cases
Run the Master application without real slaves
Comfortable Debugging of complex topology/slave type scenarios
Master Software Development
Replace manual test procedures by automatic procedures.
Implement enhanced tests
Fieldbus Master Device Test
Develop and test applications based on a software emulation of the machine logic
Virtual Commissioning
Develop slave firmware before hardware is available
Slave Firmware Development
Simulation
Real World
Apr 2022 4
General System Architecture
EtherCAT Master Software
Application Software
Controller
EtherCAT Slave Devices
Characteristic of real-world
system
EtherCAT Master Software
Application Software
Software for Imitation of
real-world systemHiL SystemController
Slave Simulation Software
EC-Simulator
PC or embedded Hardware
Apr 2022 5
Hardware-in-Loop (HiL) SimulationAll slaves are simulated
• The System-Under-Test (SUT) is communicating via an EtherCAT cable with the EC-Simulator software running on an external hardware, the HiL System.
• HiL System doesn´t require special hardware, a standard Ethernet interface can be used
• In this setup the unchanged application together with the EtherCAT master can be tested
Master
HiL System
System Under Test
(SUT)
Simulated EtherCAT Network
SUTMaster
Hardware
Simulator
Apr 2022 6
Hardware-in-Loop (HiL) SimulationMix of real slaves and simulated slaves
• EC-Simulator simulates a subset of the EtherCAT network
• A HiL System with one Ethernet port has to be the last device on the network
• A HiL System with multiple ports might be connected also between real slaves
• Slaves which shall be simulated are tagged in the EtherCAT tool EC-Engineer. The resulting network configuration (ENI file) contains all slaves.
System Under Test
(SUT)
Simulated Slaves in EC-Simulator
RealSlaves
Apr 2022 7
• Support for various operating systems, e. g. Linux and Windows
• High performance due to the acontis Real-time Ethernet drivers
• Simulation of EtherCAT Slave Controller (ESC) hardware in software
• Implementation of Beckhoff EtherCAT Slave Stack ET9300
• EC-Simulator offers a “C” language application programming interface (API)
HiL SimulationSoftware architecture
OS Abstraction
Customer C/C++ ApplicationTest Cases, Simple Logic, etc.
EC-Simulator
Simulator
acontis Ethernet Drivers
Cyclic Process Data Image
Programing Interfaces: Process Data, Network Operations, Diagnosis
Slave Registers, EEPROM, etc.
ESC Hardware Simulation
EtherCAT Slave Stack ET9300
• The EtherCAT network is simulated by a software running on the System Under Test (SUT).
• Instead of communicating with the Ethernet Controller, the EC-Master EtherCAT master is directly exchanging EtherCAT frames with the simulation software.
Apr 2022 8
Software-in-Loop (SiL) Simulation
EC-Master
SiL System
Simulated EtherCAT Network
System Under Test
(SUT)
acontis Ethernet Driver
• EC-Simulator replaces the Ethernet Driver normally used for the physical interface. No physical network interface required!
Apr 2022 9
SiL SimulationSoftware architecture
OS Abstraction
Customer Application C/C++
EC-Simulator
Ethernet DriverInterface
EC-Master
Process Data Image
EC-Master
SiL System
Inp
uts
Ou
tpu
ts
Programing Interfaces: Process Data, Network Operations,
Diagnosis
Process Data Image Slave Registers…
Ethernet
Frames
Use Cases
• Run the Master application without real slaves
• Comfortable integration of master stack software into application, e. g., implement and test functionsfor slaves which aren´t available
• Useful for implementing and testing advanced EtherCAT features, e.g., hot connect, firmware download, etc.
• Validate master application with different network configurations and topologies Just load a different ENI file into EC-Simulator
• Execute and debug application with a much slower network cycle time to determine the system behavior step-by-step.SiL architecture: By setting a breakpoint in the application all slaves are staying in OP state, because they are “stopped” as well (no watchdogs are expiring).
Apr 2022 11
Use CaseMaster Software Development
• Simulate slave errors, e.g., slave drops down from OP to SAFEOP
• Simulate cable break, frame loss, bad connectors
• Simulate large networks with many slaves
• Test extended scenarios, e.g., simulate topology changes
• Simulate error scenarios at any location. Before or after the real slaves
• Automatic test protocol generation
Apr 2022 12
Use CaseFieldbus Master Device Release Tests
Simulation
Apr 2022 13
Use CaseVirtual Commissioning with Real-time Simulation
EtherCAT Master Software
Application Software
Imitation of real-world
systemHiL System
Controller
Slave Simulation Software
EC-Simulator
Third Party Software forDigital Twin, Virtual Commissioning
• EC-Simulator together with Digital-Twin Software
• Test and optimize the application at an early stage of the engineering, even without any real existing target hardware.
• Test error scenarios which are dangerous and/or lead to damages
• Develop slave firmware before real hardware is available
• EC-Simulator is based on the Beckhoff EtherCAT Slave Stack ET9300. All standard APPL_XXX() functions are available on application layer.
• Development firmware on Windows or Linux with comfortable IDE Better debugging options compared to typical embedded platform
Faster turnaround times
• Use recorded or generated test data as process data input for slave firmware
• Trace process data outputs and states into files etc.
• Test parameter up- and downloads (CoE, VoE)
• Test firmware downloads (FoE)
Apr 2022 14
Use CaseSlave Firmware Development
Technical Details
Apr 2022 16
Configuration based on ENI file
• Standard EtherCAT Network Information (ENI) file is used to configure the EC-Simulator software
• ENI can be exported by EC-Engineer or any other configuration software, e. g., Beckhoff TwinCAT, supporting it.
Master
SimulatorENI.XML
Master
Simulator
Apr 2022 17
ESC hardware simulation based on EXI configuration file
• ENI file does not include information about the slave hardware
• The EXI (EtherCAT Extended Information) file includes Slave Object Dictionary from ESI or from real slave. Values are also editable!
ESC register values from real slave
Real EEPROM content (instead of default content)
• EXI can be exported by EC-Engineer
ENI.XML
EXI.XML
ESI.XMLESI.
XMLESI.XML
Apr 2022 18
Diagnosis with EC-Engineer/EC-Lyser
OS Abstraction
C/C++ Application
Ethernet Driver
RAS Server (TCP)
Master
Simulator
RAS Client (TCP)
TCP/IP
Online Functions
Apr 2022 19
• Power down/up a specific slave
• Create CRC errors on a specific port (by random)
• Simulate test cases like “Unplugging a cable”
Simulate Power Loss, Link Loss and Frame Errorswith EC-Engineer/EC-Lyser
• Process data logic implemented by customer application from process data image
Apr 2022 20
Process Data Provider:Case A: Default implementation
Customer Application C/C++
EC-Simulator
ET9300 EtherCAT Slave Stack Code (SSC) Functions
Inp
uts
Ou
tpu
ts
Process Data
Process DataLogic / Handling
MailboxData
Slave 1Process
DataMailbox
Data
Slave 2Process
DataMailbox
Data
Slave 3Process
DataMailbox
Data
Slave N
CEcSimulatorSscAppl
• Process data provided by sample application, e.g., CiA402, instead of process data image
• Behavior of sample application can´t be changed
• Select “Sample application” in EC-Engineer
Apr 2022 21
Process Data Provider:Case B: Use integrated sample application
Customer Application C/C++
EC-Simulator
ET9300 EtherCAT Slave Stack Code (SSC) Functions
Process Data
MailboxData
Slave 1Process
DataMailbox
Data
Slave 2Process
DataMailbox
Data
Slave 3Process
DataMailbox
Data
Slave N
CEcSimulatorSscApplCiA402
CiA402 Appl
• Interface for developing and testing own slave firmware: Hook existing own APPL_XXX() slave functions to own code
• Control EtherCAT State Machine, handle process, CoE objects
Apr 2022 22
Process Data Provider: Case C: Implement own slave firmware
Customer Application C/C++
EC-Simulator
ET9300 EtherCAT Slave Stack Code (SSC) Functions
Process Data
MailboxData
Slave 1Process
DataMailbox
Data
Slave 2Process
DataMailbox
Data
Slave 3Process
DataMailbox
Data
Slave N
Interface Functions:Slave Firmware
CEcSimulatorSscApplExt
Inp
uts
Ou
tpu
ts
• Generic SSC Interface functions APPL_Application()
APPL_GetDeviceID()
• EtherCAT State Machine APPL_StartMailboxHandler(), APPL_StopMailboxHandler()
APPL_StartInputHandler(), APPL_StopInputHandler()
APPL_StartOutputHandler(), APPL_StopOutputHandler()
APPL_GenerateMapping()
APPL_AckErrorInd()
• Process data handling APPL_InputMapping()
APPL_OutputMapping()
Apr 2022 23
Process Data Provider: Case C: Implement own slave firmware
• For each slave a different handling can be choosen
Apr 2022 24
Process Data Provider: Summary
Customer Application C/C++
EC-Simulator
ET9300 EtherCAT Slave Stack Code (SSC) Functions
Inp
uts
Ou
tpu
ts
Process Data
Process DataLogic / Handling
MailboxData
Slave 1Process
DataMailbox
Data
Slave 2Process
DataMailbox
Data
Slave 3Process
DataMailbox
Data
Slave N
CEcSimulatorSscAppl
CEcSimulatorSscApplCiA402
Interface Functions:Slave Firmware
CiA402 Appl CEcSimulatorSscApplExt
Inp
uts
Ou
tpu
ts
A set of functions to manipulate the network:
• Change the network topology Disconnect/connect/move a slave
Power down/up a slave
• Change a slave state, e.g., switch to PreOp state
Apr 2022 25
Programming InterfaceNetwork Operations
Customer Application C/C++
EC-Simulator
RW
Network Topology
Cyclic Process Data Image
VariableDefinitions
SlaveDefinitions
SlaveDefinitions
SlaveDefinitions
VariableDefinitions
VariableDefinitions
A set of functions to perform diagnosis:
• API to read and write slave registers, e. g. read slave states
• API to read and write slave EEPROM content (e.g. write new slave configuration)
• API to read simulator object dictionary
• API to evaluate the network topology
• RAS server for connecting EC-Lyser/EC-Engineer
Apr 2022 26
Programming InterfaceDiagnosis
Customer Application C/C++
RW
RAS Server (TCP)
EC-Simulator
Network Topology
Cyclic Process Data Image
VariableDefinitions
SlaveDefinitions
SlaveDefinitions
SlaveDefinitions
VariableDefinitions
VariableDefinitions
Registers
EEPROM
Ou
tpu
ts
• Slaves with and without mailbox
• Mailbox protocol CANopen over EtherCAT (CoE)
• PDO configuration and assignment commands via CoE
• Support for all mailbox initialization commands
• Basic object dictionary
• Support for distributed clocks
• Released for acontis EC-Master
• Tested with EtherCAT Masters from Beckhoff (TwinCAT) and CoDeSys
Apr 2022 27
Features
Evaluation Software and Licensing
• System Requirements: SiL Simulation EC-Master V3.1 PC with Windows 10 Linux, x86, ARM, 32-Bit or 64-Bit
• System Requirements: HiL Simulation PC with Windows 10 Linux, x86, ARM, 32-Bit or 64-Bit PC with LxWin Intel Pro/1000 Ethernet Controller Realtek Gigabit Ethernet Controller
• Restriction Simulator stops after 10 minutes Maximum 5 slaves
Apr 2022 29
Evaluation Version
License Model: SDK, Maintenance, Runtimes• Software Development Kit Documentation, “C” examples with source code, header files,
EC-Simulator Library (binary) Can be used by multiple developers Maintenance: 90 days after delivery is included Runtime licenses have to be ordered separately Examples: 120-100-1-1 EC-Simulator HiL, SDK, Linux, x86, SockRaw 120-101-1-1 EC-Simulator HiL, SDK, Linux, x86, Intel Pro/1000
• Maintenance Optional Support and Updates for 12 months Examples: 120-120-1-1 EC-Simulator HiL Edition, Maintenance, Linux, x86, SockRaw 120-121-1-1 EC-Simulator HiL, Maintenance, Linux, x86, Intel Pro/1000
Apr 2022 30
Licensing: HiL Editions (1)
• Runtimes Different editions supporting a limited number of slaves
Multiple runtime instances on one hardware possible
Combinations / accumulations of runtimes not possible
The software is copy protected
License key based on MAC address of the Ethernet controller
Examples:
120-110-1-1 EC-Simulator HiL Edition, Runtime 24 Slaves, Linux, x86
120-111-1-1 EC-Simulator HiL Edition, Runtime 64 Slaves, Linux, x86
120-112-1-1 EC-Simulator HiL Edition, Runtime 128 Slaves, Linux, x86
120-113-1-1 EC-Simulator HiL Edition, Runtime 256 Slaves, Linux, x86
120-114-1-1 EC-Simulator HiL Edition, Runtime unlimited, Linux, x86
Apr 2022 31
Licensing: HiL Editions (2)
License Model: SDK, Maintenance, Runtimes• Software Development Kit Documentation, “C” examples with source code, header files,
EC-Simulator Library (binary) Can be used by multiple developers Maintenance: 90 days after delivery is included Runtime licenses have to be ordered separately Examples: 121-100-1-1 EC-Simulator SiL Edition SDK, Linux, x86 121-300-1-1 EC-Simulator SiL Edition SDK, Windows, x86
• Maintenance Optional Support and Updates for 12 months Examples: 121-120-1-1 EC-Simulator SiL Edition Maintenance, Linux, x86, monthly 121-320-1-1 EC-Simulator SiL Edition, Maintenance, Windows, x86, monthly
Apr 2022 32
Licensing: SiL Editions (1)
• Runtimes Different editions supporting a limited number of slaves
Multiple runtime instances on one hardware possible
Combinations / accumulations of runtimes not possible
The software is copy protected with USB dongle
Examples:
121-110-1-1 EC-Simulator SiL Edition, Runtime 24 Slaves, Linux, x86
121-111-1-1 EC-Simulator SiL Edition, Runtime 64 Slaves, Linux, x86
121-112-1-1 EC-Simulator SiL Edition, Runtime 128 Slaves, Linux, x86
121-113-1-1 EC-Simulator SiL Edition, Runtime 256 Slaves, Linux, x86
121-114-1-1 EC-Simulator SiL Edition, Runtime unlimited, Linux, x86
Apr 2022 33
Licensing: SiL Editions (2)
• License Model SDK and Maintenance, no runtimes Only for internal usage Can´t be delivered to end customers as a product
• Software Development Kit Documentation, “C” examples with source code, header files,
EC-Simulator Library with source code Can be used by multiple developers Maintenance: 90 days after delivery is included Examples: 122-100-0-0 EC-Simulator Controller Test Edition, Linux, SDK 122-200-0-0 EC-Simulator Controller Test Edition, QNX, SDK
• Maintenance Optional Support and Updates for 12 months Examples: 122-110-0-0 EC-Simulator Controller Test Edition, Maintenance, Linux 122-210-0-0 EC-Simulator Controller Test Edition, Maintenance, QNX
Apr 2022 34
Licensing: Controller Test Edition