2.4. Operating system configuration

The main task is to setup the operating system to support the appropriate network adapter for EtherCAT® usage and for some systems real-time configuration may be needed.

The operating system-specific settings and configurations are described in Platform and Operating Systems (OS).

2.4.1. Using emllSimulator (SiL)

The EcSimulatorSilDemo example program as well as all EC-Master example programs like EcMasterDemo, EcMasterDemoDc, etc. support the EC-Simulator (SiL) Ethernet Driver emllSimulator. In this case no physical Real-time Ethernet Driver is passed to the EC-Master. Instead the emllSimulator (SiL) simulates the physical network. The command line syntax is for example:

$ EcSimulatorSilDemo -simulator 1 1 <exi-file> -f <eni-file> -t 0 -sp

The EC-Simulator Instance ID when calling EC-Simulator APIs is the Real-time Ethernet Driver Instance ID given at command line:

$ EcSimulatorSilDemo -simulator <Instance-ID> 1 exi.xml -f exi.xml -t 0 -sp

Valid values for Instance ID of emllSimulator are 1 … 24 .

emllSimulator is dynamically loaded within ecatInitMaster() . In contrast to HiL, in case of SiL, ecatInitMaster() automatically calls esInitSimulator(), so the EC-Simulator SiL application may not call esInitSimulator() for the given Instance ID.

The EC-Simulator APIs can be used in the EcMasterDemo, too. The APIs are declared in SDK\INC\EcSimulator.h and EcSimulator.lib / libEcSimulator.so must be linked to the application to import the EC-Simulator APIs.

The EC-Simulator SiL Protected version with MAC based protection needs the corresponding Real-time Ethernet Driver settings provided.

2.4.1.1. Simulator Ethernet Driver parameters

The parameters to the Simulator Ethernet Driver are setup-specific. The function CreateLinkParmsSimulator() in EcSelectLinkLayer.cpp demonstrates how to initialize the Ethernet Driver instance.

Public Members

Common link parameters. Signature must be set to EC_LINK_PARMS_SIGNATURE_SIMULATOR.

OS layer parameters

Optional: create slaves from ENI/EXI, see esConfigureNetwork

Optional: create slaves from ENI/EXI, see esConfigureNetwork

Optional: create slaves from ENI/EXI, see esConfigureNetwork

See EC_SIMULATOR_DEVICE_CONNECTION_TYPE…

Connect hot connect groups in topology (floating group heads to free ports)

Reserved

Cycle time of simulator job task

Don’t allocate Process Data Image at simulator (legacy support, CiA402 simulation)

64 bit OEM key (optional)

MAC address

Frame buffer count for IST

EC_FALSE: esExecJob explicitly called by application, EC_TRUE: implicitly by emllSimulator

License key (zero terminated string)

Link parameters of network adapters passed to EC-Simulator Core, e.g. for validation of MAC address of license key

Start RAS server

RAS server port

RAS server threads CPU affinity mask

RAS server threads priority

RAS server threads stack size

Internal performance measurement parameters

emllSimulator accepts optional parameters, e.g.:

$ -simulator 1 1 <exi-file> [--mac <address>] [--lic <key>] [--link <link-parms>] [--sp] [--connect <type> <id> <address> <port>]