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.
See also
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.
-
struct EC_T_LINK_PARMS_SIMULATOR
Public Members
-
EC_T_LINK_PARMS linkParms
Common link parameters. Signature must be set to EC_LINK_PARMS_SIGNATURE_SIMULATOR.
-
EC_T_OS_PARMS *pOsParms
OS layer parameters
-
EC_T_CNF_TYPE eCnfType
Optional: create slaves from ENI/EXI, see esConfigureNetwork
-
EC_T_BYTE *pbyCnfData
Optional: create slaves from ENI/EXI, see esConfigureNetwork
-
EC_T_DWORD dwCnfDataLen
Optional: create slaves from ENI/EXI, see esConfigureNetwork
-
EC_T_BOOL bConnectHcGroups
Connect hot connect groups in topology (floating group heads to free ports)
-
EC_T_DWORD dwSimulatorAddress
Reserved
-
EC_T_DWORD dwBusCycleTimeNsec
Cycle time of simulator job task
-
EC_T_BOOL bDisableProcessDataImage
Don’t allocate Process Data Image at simulator (legacy support, CiA402 simulation)
-
EC_T_UINT64 qwOemKey
64 bit OEM key (optional)
-
EC_T_BYTE abyMac[6]
MAC address
-
EC_T_DWORD dwRxBufferCnt
Frame buffer count for IST
-
EC_T_BOOL bJobsExecutedByApp
EC_FALSE: esExecJob explicitly called by application, EC_TRUE: implicitly by emllSimulator
-
EC_T_CHAR szLicenseKey[EC_SIMULATOR_KEY_SIZE]
License key (zero terminated string)
-
EC_T_LINK_PARMS *apLinkParms[EC_SIMULATOR_MAX_LINK_PARMS]
Link parameters of network adapters passed to EC-Simulator Core, e.g. for validation of MAC address of license key
-
EC_T_BOOL bStartRasServer
Start RAS server
-
EC_T_WORD wRasServerPort
RAS server port
-
EC_T_DWORD dwRasPriority
RAS server threads priority
-
EC_T_DWORD dwRasStackSize
RAS server threads stack size
-
EC_T_PERF_MEAS_INTERNAL_PARMS PerfMeasInternalParms
Internal performance measurement parameters
-
EC_T_LINK_PARMS linkParms
emllSimulator accepts optional parameters, e.g.:
$ -simulator 1 1 <exi-file> [--mac <address>] [--lic <key>] [--link <link-parms>] [--sp] [--connect <type> <id> <address> <port>]