# CEcWrapperDotNet ### *class* EcWrapperDotNet.CEcWrapperDotNet : [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable) Subclassed by EcWrapperDotNet.CEcMasterMbxGatewayClientDotNet, EcWrapperDotNet.CEcMasterMbxGatewayServerDotNet, EcWrapperDotNet.CEcMasterRasServerDotNet, [EcWrapperDotNet.CEcMonitorDotNet](api.html.md#d6/d0e/class_ec_wrapper_dot_net_1_1_c_ec_monitor_dot_net), EcWrapperDotNet.CEcMonitorRasServerDotNet, EcWrapperDotNet.CEcRasClientDotNet, [EcWrapperDotNet.CEcSimulatorDotNet](api.html.md#d1/d1b/class_ec_wrapper_dot_net_1_1_c_ec_simulator_dot_net), EcWrapperDotNet.CEcSimulatorRasServerDotNet, EcWrapperDotNet.CEcWrapperDotNetEx ### Public Functions ### Dispose () summary> Throws the EtherCAT-Notifications. The Type of the event depends on the notification code. ### SetCycFrameRxCallback  (*pfnCallback*) Set cyclic frame RX callback function. This function will be called after the cyclic frame is received, if there is more than one cyclic frame after the last frame. The application has to assure that these functions will not block. * **Param pfnCallback:** Callback function * **Return:** EC_E_NOERROR or error code ### GetRunMode () Return run mode. * **Return:** Run mode ### RegisterClient (*out*  *pRegRes*) Register a client with the EtherCAT Master. * **Param pRegRes:** out Registration results, a pointer to a structure of type REGISTERRESULTS * **Return:** Error Code ### UnregisterClient () Unregister a client from the EtherCAT master. * **Return:** Error code ### DcmGetLog (*out*  *pszLog*) Get logging information from the DCM controller. * **Return:** Error code ### RasGetConnectionInfo (*out*  *pConInfo*) Get actual connection information /summary> * **param pConInfo:** connection information * **return:** EC_E_NOERROR on success, otherwise an error code. ### MbxGatewayCoeSdoDownload  (*wAddress*,  *wObIndex*,  *byObSubIndex*, [] *pbyData*,  *dwDataLen*,  *dwTimeout*,  *dwFlags*) Initiate CoE SDO download transfer to mailbox gateway server. * **Param wAddress:** slave address to download the SDO * **Param wObIndex:** object index * **Param byObSubIndex:** object sub-index * **Param pbyData:** * **Param dwDataLen:** * **Param dwTimeout:** Timeout in milliseconds * **Param dwFlags:** mailbox transfer flags * **Return:** Depends on the implementation of the function OsSetLastError(), normally returns EC_E_NOERROR if it succeeds or error code if it fails ### MbxGatewayCoeSdoUpload  (*wAddress*,  *wObIndex*,  *byObSubIndex*, [] *pbyData*,  *dwDataLen*, *out*  *pdwOutDataLen*,  *dwTimeout*,  *dwFlags*) Initiate CoE SDO upload transfer from mailbox gateway server. * **Param wAddress:** slave address to upload the SDO * **Param wObIndex:** object index * **Param byObSubIndex:** object sub-index * **Param pbyData:** * **Param dwDataLen:** * **Param pdwOutDataLen:** * **Param dwTimeout:** Timeout in milliseconds * **Param dwFlags:** mailbox transfer flags, see EC_MAILBOX_FLAG * **Return:** Depends on the implementation of the function OsSetLastError(), normally returns EC_E_NOERROR if it succeeds or error code if it fails ### EnablePerformanceMeasuring  (*bEnable*) Enables performance monitoring. For every master function, the notification “PerfNotification” will be called. * **Param bEnable:** True = Enables performance monitoring ### EnableTranslation  (*bEnable*) Enables translation. For every master string, the notification “TranslateNotification” will be called. * **Param bEnable:** True = Enables translation ### OptimizeProcessPerformance () Optimize process performance. * **Return:** EC_E_NOERROR on success, otherwise an error code. ### GetErrorText  (*eErrorCode*) Return text tokens by Error code from master stack. * **Param eErrorCode:** Error code * **Return:** Error text for supplied error code ### ConfigureNetwork  (*oConfigFile*) Configure the Master * **param oConfigFile:** File with configuration parameters * **Return:** Error code ### ConfigureNetwork  (*tConfigType*,  *oConfigData*) Configure the Master * **param tConfigType:** Enum type of configuration data provided * **param oConfigData:** Configuration data (stream) * **Return:** Error code ### ExecJob  (*eUserJob*) Execute or initiate the requested master job. * **Param eUserJob:** Requested job. * **Return:** Error code ### ExecJobProcessAllRxFrames (*out*  *bPrevCycProcessed*) calls the process all rx frame job * **Param bPrevCycProcessed:** true: previous send frame was received and processed, false: otherwise * **Return:** EC_NOERROR or error code ### ExecJobProcessAllRxFrames () calls the process all rx frame job * **Return:** EC_NOERROR or error code ### ExecJobSendCycFramesByTaskId  (*dwTaskId*) sends a cycle frame by its task id * **Param dwTaskId:** task id of the cyclic frame * **Return:** EC_NOERROR or error code ### ConvertMasterStringFromBytes ([] *abyData*,  *dwOffset*,  *dwLen*) Converts a master string into UTF8 format. * **Param abyData:** Byte array to convert * **Param dwOffset:** Offset * **Param dwLen:** Length * **Return:** Converted string ### ConvertMasterString  (*val*) Converts a master string into UTF8 format. * **Param val:** String to convert. * **Return:** Converted string. ### WaitForTimingTaskEvent () Waits for timing task event. * **Return:** Wait event was triggered ### EoeInstallEndpoint  (*bCreateTxEvent*,  *strInterfaceName*,  *strInterfaceGuid*) Install EoE endpoint. * **Param bCreateTxEvent:** Create TX Event * **Param strInterfaceName:** Interface name (optional) * **Param strInterfaceGuid:** Interface guid (optional) * **Return:** Error code ### EoeUninstallEndpoint () Uninstall EoE endpoint. * **Return:** Error code ### EoeTriggerTxEvent () Trigger TX Event, which must be called from JobTask after ExecJobProcessAllRxFrames() * **Return:** Error code ### ESCTypeText  (*byEscType*,  *bLong*) Gets the text of corresponding ESC type. * **Param byEscType:** ESC type * **Param bLong:** true: long text version, false: short text version * **Return:** Text of corresponding ESC type ### SlaveVendorText  (*dwVendorId*) Gets the text of slave vendor. * **Param dwVendorId:** Vendor ID * **Return:** Text of slave vendor ### SlaveProdCodeText  (*dwVendorId*,  *dwProductCode*) Gets the text of slave product code. * **Param dwVendorId:** Vendor ID * **Param dwProductCode:** Product code * **Return:** Text of slave product code ### SetBusCnfReadProp  (*eEscSiiReg*,  *dwTimeout*) Sets read property for bus configuration. * **Param eEscSiiReg:** SII register * **Param dwTimeout:** Time out of bus scan * **Return:** Error code ### RestartScanBus  (*dwTimeout*,  *bReadRevisionNo*,  *bReadSerialNo*) Trigger Bus Scan. * **Param dwTimeout:** Time out of bus scan * **Param bReadRevisionNo:** Read revision number * **Param bReadSerialNo:** Read serial number * **Return:** Error code ### GetBusScanSlaveInfoDesc  (*wAutoIncAddr*, *out*  *oSlaveInfoDesc*) This call will return the basic slave info determined in the last bus scan. * **Param wAutoIncAddr:** Auto increment address of the slave * **Param oSlaveInfoDesc:** Out parameter that contains different slave information after the call * **Return:** Error code ### GetScanBusStatus (*out*  *oSbStatus*) Gets the status of the last bus scan. * **Param oSbStatus:** The last bus scan status * **Return:** Error code ### CoeGetODList  (*dwSlaveId*,  *eListType*, *out* [] *pList*,  *dwLen*, *out*  *pdwOutLen*,  *dwTimeout*) Gets a list of object Ids that are available in a slave. * **Param dwSlaveId:** slave ID * **Param eListType:** Object list type. eODListType_ALL: Get all objects eODListType_RxPdoMap: Get PDO mappable objects eODListType_TxPdoMap: Get objects that can be changed eODListType_StoredFRepl: Get objects that are stored for a device replacement eODListType_StartupParm: Get objects that can be used as startup parameter * **Param pList:** out Filled OD list * **Param dwLen:** Length of list * **Param pdwOutLen:** out Length of output list * **Param dwTimeout:** Timeout * **Return:** Error code ### CoeGetObjectDesc  (*dwSlaveId*,  *wIndex*, *out*  *oObjDesc*,  *dwTimeout*) Determines the description of a specific object. * **Param dwSlaveId:** slave ID * **Param wIndex:** Object index * **Param oObjDesc:** out Description of a specific object * **Param dwTimeout:** Timeout * **Return:** Error code ### CoeGetEntryDesc  (*dwSlaveId*,  *wIndex*,  *bySubIndex*,  *byValueInfoType*, *out*  *oEntryDesc*,  *dwTimeout*) Determines the description of a specific object entry. * **Param dwSlaveId:** slave ID * **Param wIndex:** Object index * **Param bySubIndex:** Object subindex * **Param byValueInfoType:** Bit mask to define which information to determine. The bit values are defined as follows: EC_COE_ENTRY_ObjAccess - Object access rights EC_COE_ENTRY_ObjCategory - Object category EC_COE_ENTRY_PdoMapping - Information if the object is PDO mappable EC_COE_ENTRY_UnitType - Unit EC_COE_ENTRY_DefaultValue - Default value EC_COE_ENTRY_MinValue - Minimum value EC_COE_ENTRY_MaxValue - Maximum value * **Param oEntryDesc:** out Description of a specific object entry * **Param dwTimeout:** Timeout * **Return:** Error code ### MbxTferCreate  (*dwTferId*,  *dwBufferSize*, *out*  *pMbxTfer*) Creates a mailbox transfer object. * **Param dwTferId:** transfer ID (optional, can be 0) * **Param dwBufferSize:** buffer size * **Param pMbxTfer:** out mailbox transfer object * **Return:** Error code ### MbxTferReset  (*pMbxTfer*) Creates a mailbox transfer object. * **Param pMbxTfer:** mailbox transfer object * **Return:** Error code ### MbxTferDelete  (*pMbxTfer*) Deletes a mailbox transfer object. A transfer object may only be deleted if it is in the Idle state. * **Param pMbxTfer:** Mailbox transfer object created with emMbxTferCreate ### MbxTferWait  (*pMbxTfer*) Waits until mailbox transfer is finished. * **Param pMbxTfer:** mailbox transfer object * **Return:** Error code ### MbxTferCopyTo  (*pMbxTfer*, [] *abyData*,  *dwDataLen*) Copies data to the mailbox transfer buffer. * **Param pMbxTfer:** pMbxTfer * **Param abyData:** abyData * **Param dwDataLen:** dwDataLen * **Return:** Error code ### MbxTferCopyFrom  (*pMbxTfer*, [] *abyData*,  *dwDataLen*, *out*  *pdwOutDataLen*) Copies data from the mailbox transfer buffer. * **Param pMbxTfer:** pMbxTfer * **Param abyData:** abyData * **Param dwDataLen:** dwDataLen * **Param pdwOutDataLen:** pdwOutDataLen * **Return:** Error code ### NotifyApp  (*dwCode*, [] *pInData*,  *wDataLen*, *out* [] *pOutData*,  *wOutLen*, *out*  *pdwOutDataLen*) Notifies the master application. * **Param dwCode:** Code * **Param pInData:** Input data * **Param wDataLen:** Length of in data * **Param pOutData:** Output data * **Param wOutLen:** Length of output data field * **Param pdwOutDataLen:** Length of actual out data * **Return:** Error code ### InitMotion () Initialize the motion. * **Return:** Error code ### DeinitMotion () Deinitialize the motion. * **Return:** Error code ### ControlMotion  (*dwCmd*, [] *pInData*,  *wDataLen*, *out* [] *pOutData*,  *wOutLen*) Controls the motion. * **Param dwCmd:** Command * **Param pObj:** Object * **Param pInData:** Input data * **Param wDataLen:** Length of in data * **Param pOutData:** Output data * **Param wOutLen:** Length of output data field * **Return:** Error code ### ReadIdentifyObj  (*wFixedAddr*) Reads the identify object of a slave. * **Param wFixedAddr:** Fixed station address ### AddDbgMsg  (*strDbgMsg*) Adds a debug message to the print message queue. * **Param strDbgMsg:** debug message ### GetSlaveInfoEx  (*oReq*, *out*  *oRes*) Gets the extended slave info determined in the last bus scan. * **Param oReq:** Request parameter * **Param oRes:** The extended slave information structure * **Return:** Error code ### GetMasterParms (*out*  *pParms*) Get current Master initialization parameters. If the given buffer is larger than the actual size of structure EC_T_INIT_MASTER_PARMS, the parameters of EC_T_INIT_MASTER_PARMS.pOsParms, EC_T_INIT_MASTER_PARMS.pLinkParms and EC_T_INIT_MASTER_PARMS.pLinkParmsRed are appended. * **Param pParms:** Buffer to store Master parameters * **Return:** * EC_E_NOERROR on success * EC_E_INVALIDSTATE if master isn’t initialized * EC_E_INVALIDPARM if buffer pParms is too small ### SetMasterParms  (*pParms*) Change Master initialization parameters. Currently the following parameters cannot be changed: * EC_T_INIT_MASTER_PARMS.pOsParms * EC_T_INIT_MASTER_PARMS.pLinkParms * EC_T_INIT_MASTER_PARMS.pLinkParmsRed * EC_T_INIT_MASTER_PARMS.dwMaxBusSlaves * EC_T_INIT_MASTER_PARMS.dwMaxAcycFramesQueued * EC_T_INIT_MASTER_PARMS.dwAdditionalEoEEndpoints * **Param pParms:** New Master parameters * **Return:** * EC_E_NOERROR on success * EC_E_INVALIDSTATE if master isn’t initialized ### ForceSlvStatCollection () Sends datagrams to collect slave statistics counters. * **Return:** Error code ### GetSlvStatistics  (*dwSlaveId*, *out*  *oStatistics*) Returns slave statistics counters. * **Param dwSlaveId:** Slave ID * **Param oStatistics:** out Statistics counters * **Return:** Error code ### GetCyclicConfigInfo (*out* [] *oCyclicConfigInfo*) Returns an array of cyclic tasks. * **Param oCyclicConfigInfo:** out Array of cyclic tasks * **Return:** Error code ### SetAllSlavesMustReachState  (*bAllSlavesMustReachState*) Sets flag that all slaves must reach the requested master state. * **Param bAllSlavesMustReachState:** EC_TRUE: All slaves must reach the requested master state * **Return:** Error code ### SetAdditionalVariablesForSpecificDataTypesEnabled  (*bAdditionalVariablesForSpecificDataTypes*) Sets flag to enable additional variables for specific data types. * **Param bAdditionalVariablesForSpecificDataTypes:** EC_TRUE: Enable additional variables for specific data types * **Return:** Error code ### EnableNotification  (*dwClientId*,  *tNotifyCode*,  *bEnable*) Enables notification. * **Param dwClientId:** Client Id * **Param tNotifyCode:** Code of notification, which should be enabled * **Param bEnable:** EC_TRUE: Enables notification * **Return:** Error code ### ThrottleNotification  (*tNotifyCode*,  *dwTimeout*) Throttles notification. * **Param tNotifyCode:** Code of notification, which should be throttled * **Param dwTimeout:** 0 = Not throttled, > 0 = Throttle timeout in ms * **Return:** Error code ### SdoUploadMasterOd  (*wObIndex*,  *dwTimeout*, *out*  *pobjMasterOd*) SdoUpload from Master Object Dictionary. * **Param wObIndex:** Object index * **Param dwTimeout:** Timeout in milliseconds * **Param pobjMasterOd:** Read object (e.g. DN_EC_T_OBJ3XXX, EC_T_OBJ8XXX, EC_T_OBJ9XXX …) * **Return:** Error code ### ReadSlaveEEPRom  (*bFixedAddressing*,  *wSlaveAddress*,  *wEEPRomStartOffset*, [] *pwReadData*,  *dwReadLen*, *out*  *pdwNumOutData*,  *dwTimeout*) Read EEPRom data from slave. * **Param bFixedAddressing:** EC_TRUE: use station addressing, EC_FALSE: use auto increment addressing * **Param wSlaveAddress:** Slave Address, station or auto increment address depending on bFixedAddressing * **Param wEEPRomStartOffset:** Address to start EEPRom Read from * **Param pwReadData:** Pointer to ushort array to carry the read data * **Param dwReadLen:** Size of the ushort array provided at pwReadData (in ushorts) * **Param pdwNumOutData:** out Pointer to uint carrying actually read data (in ushorts) after completion * **Param dwTimeout:** Timeout in milliseconds. The function will block at most for this time. The timeout value must not be set to EC_NOWAIT * **Return:** Error code ### ReadSlaveEEPRomWithReq  (*dwClientId*,  *dwTferId*,  *bFixedAddressing*,  *wSlaveAddress*,  *wEEPRomStartOffset*, [] *pwReadData*,  *dwReadLen*, *out*  *pdwNumOutData*,  *dwTimeout*) Read EEPRom data from slave (REQ) * **Param dwClientId:** Client ID returned by RegisterClient (0 if all registered clients shall be notified) * **Param dwTferId:** Transfer ID. The application can set this ID to identify the transfer. It will be passed back to the application within EC_T_EEPROM_OPERATION_NTFY_DESC. * **Param bFixedAddressing:** EC_TRUE: use station addressing, EC_FALSE: use auto increment addressing * **Param wSlaveAddress:** Slave Address, station or auto increment address depending on bFixedAddressing * **Param wEEPRomStartOffset:** Address to start EEPRom Read from * **Param pwReadData:** Pointer to ushort array to carry the read data * **Param dwReadLen:** Size of the ushort array provided at pwReadData (in ushorts) * **Param pdwNumOutData:** out Pointer to uint carrying actually read data (in ushorts) after completion * **Param dwTimeout:** Timeout in milliseconds. The function will block at most for this time. The timeout value must not be set to EC_NOWAIT * **Return:** Error code ### WriteSlaveEEPRom  (*bFixedAddressing*,  *wSlaveAddress*,  *wEEPRomStartOffset*, [] *pwWriteData*,  *dwWriteLen*,  *dwTimeout*) Write EEPRom data from slave. * **Param bFixedAddressing:** EC_TRUE: use station addressing, EC_FALSE: use auto increment addressing * **Param wSlaveAddress:** Slave Address, station or auto increment address depending on bFixedAddressing * **Param wEEPRomStartOffset:** Address to start EEPRom Write from * **Param pwWriteData:** Pointer to WORD array carrying the write data. * **Param dwWriteLen:** Sizeof Write Data WORD array (in WORDS) * **Param dwTimeout:** Timeout in milliseconds. The function will block at most for this time. The timeout value must not be set to EC_NOWAIT * **Return:** Error code ### WriteSlaveEEPRomWithReq  (*dwClientId*,  *dwTferId*,  *bFixedAddressing*,  *wSlaveAddress*,  *wEEPRomStartOffset*, [] *pwWriteData*,  *dwWriteLen*,  *dwTimeout*) Write EEPRom data from slave (REQ) * **Param dwClientId:** Client ID returned by RegisterClient (0 if all registered clients shall be notified) * **Param dwTferId:** Transfer ID. The application can set this ID to identify the transfer. It will be passed back to the application within EC_T_EEPROM_OPERATION_NTFY_DESC. * **Param bFixedAddressing:** EC_TRUE: use station addressing, EC_FALSE: use auto increment addressing * **Param wSlaveAddress:** Slave Address, station or auto increment address depending on bFixedAddressing * **Param wEEPRomStartOffset:** Address to start EEPRom Write from * **Param pwWriteData:** Pointer to WORD array carrying the write data. * **Param dwWriteLen:** Sizeof Write Data WORD array (in WORDS) * **Param dwTimeout:** Timeout in milliseconds. The function will block at most for this time. The timeout value must not be set to EC_NOWAIT * **Return:** Error code ### InitInstance  (*oParms*) Initializes EtherCAT wrapper. * **Param oParms:** Parameters * **Return:** Error code ### DeinitInstance () Deinitialize EtherCAT wrapper. * **Return:** Error code ### PerfMeasAppCreate  (*pPerfMeasAppParms*, *out*  *ppvPerfMeas*) Create PerfMeas object and bind it to the master instance. This API can be called multiple times to create PerfMeas objects. The perfomance counters in each of the objects can be accessed in the following two ways: * by passing the PerfMeas object and the index of the performance measurement. The index ranges from [0-pPerfMeasAppParms->dwNumAppMeas] * by passing EC_NULL instead of a PerfMeas object and an index. In this case the index works across all PerfMeas objects bound to the master instance. * **Param pPerfMeasAppParms:** Pointer to parameter definitions * **Param ppvPerfMeas:** Created PerfMeas object. * **Return:** EC_E_NOERROR or an error code ### PerfMeasAppDelete  (*pvPerfMeas*) Delete application performance measurement and unbind it from the master instance. Objects which are not deleted using PerfMeasAppDelete are automatically deleted when calling DeinitMaster. #### NOTE This invalidates the global index used when passing EC_NULL into the other PerfMeasApp functions * **Param pvPerfMeas:** PerfMeas object to delete * **Return:** EC_E_NOERROR or an error code ### PerfMeasAppStart  (*pvPerfMeas*,  *dwIndex*) Start application performance measurement. * **Param pvPerfMeas:** PerfMeas object or EC_NULL to use continuous index * **Param dwIndex:** Index of the performance measurement * **Return:** EC_E_NOERROR or an error code ### PerfMeasAppEnd  (*pvPerfMeas*,  *dwIndex*) Stop application performance measurement. * **Param pvPerfMeas:** PerfMeas object or EC_NULL to use continuous index * **Param dwIndex:** Index of the performance measurement * **Return:** EC_E_NOERROR or an error code ### PerfMeasAppReset  (*pvPerfMeas*,  *dwIndex*) Reset application performance measurement. * **Param pvPerfMeas:** PerfMeas object or EC_NULL to use continuous index * **Param dwIndex:** Index of the performance measurement, use 0xFFFFFFFF to reset all * **Return:** EC_E_NOERROR or an error code ### PerfMeasAppGetRaw  (*pvPerfMeas*,  *dwIndex*, [] *pPerfMeasVal*, [] *pPerfMeasHistogram*,  *dwPerfMeasNumOf*) Get raw data of one/all application performance measurement. * **Param pvPerfMeas:** PerfMeas object or EC_NULL to use continuous index * **Param dwIndex:** Index of the performance measurement, use 0xFFFFFFFF to get all * **Param pPerfMeasVal:** Pointer to a buffer receiving one/all performance measurement values or EC_NULL * **Param pPerfMeasHistogram:** Pointer to a buffer receiving one/all performance measurement histograms or EC_NULL * **Param dwPerfMeasNumOf:** Number of elements allocated in pPerfMeasVal and pPerfMeasHistogram * **Return:** EC_E_NOERROR or an error code ### PerfMeasAppGetInfo  (*pvPerfMeas*,  *dwIndex*, *out* [] *pPerfMeasInfo*,  *dwPerfMeasNumOf*) Get general info about one/all application performance measurement. * **Param pvPerfMeas:** PerfMeas object or EC_NULL to use continous index * **Param dwIndex:** Index of the performance measurement information, use 0xFFFFFFFF to get all * **Param pPerfMeasInfo:** Pointer to a buffer receiving one/all performance measurement information * **Param dwPerfMeasNumOf:** Number of elements allocated in pPerfMeasInfo * **Return:** EC_E_NOERROR or an error code ### PerfMeasAppGetNumOf  (*pvPerfMeas*, *out*  *pdwNumOf*) Reset number of application performance measurement. * **Param pvPerfMeas:** PerfMeas object or EC_NULL to get the number of performance measurements in all PerfMeas objects * **Param pdwNumOf:** Number of performance measurements * **Return:** EC_E_NOERROR or an error code ### PerfMeasResetByTaskId  (*dwTaskId*,  *dwIndex*) Reset internal performance measurement. * **Param dwTaskId:** Task Job ID * **Param dwIndex:** Index of the performance measurement, use 0xFFFFFFFF to reset all * **Return:** EC_E_NOERROR or an error code ### PerfMeasGetRawByTaskId  (*dwTaskId*,  *dwIndex*, [] *pPerfMeasVal*, [] *pPerfMeasHistogram*,  *dwPerfMeasNumOf*) Get raw data of one/all application performance measurement. * **Param dwTaskId:** Task Job ID * **Param dwIndex:** Index of the performance measurement, use 0xFFFFFFFF to get all * **Param pPerfMeasVal:** Pointer to a buffer receiving one/all performance measurement values or EC_NULL * **Param pPerfMeasHistogram:** Pointer to a buffer receiving one/all performance measurement histograms or EC_NULL * **Param dwPerfMeasNumOf:** Number of elements allocated in pPerfMeasVal and pPerfMeasHistogram * **Return:** EC_E_NOERROR or an error code ### PerfMeasGetInfoByTaskId  (*dwTaskId*,  *dwIndex*, *out* [] *pPerfMeasInfo*,  *dwPerfMeasNumOf*) Get general info about one/all internal performance measurement. * **Param dwTaskId:** Task Job ID * **Param dwIndex:** Index of the performance measurement, use 0xFFFFFFFF to get all * **Param pPerfMeasInfo:** Pointer to a buffer receiving one/all performance measurement infos * **Param dwPerfMeasNumOf:** Number of elements allocated in pPerfMeasInfo * **Return:** EC_E_NOERROR or an error code ### PerfMeasGetNumOfByTaskId  (*dwTaskId*, *out*  *pdwNumOf*) Reset number of internal performance measurement. * **Param dwTaskId:** Task Job ID * **Param pdwNumOf:** Number of performance measurements * **Return:** EC_E_NOERROR or an error code ### SetLogParms  (*pLogParms*) Sets log parameters. Used to change the parameters provided by emInitMaster(). EC_MONITOR Sets log parameters. Used to change the parameters provided by emonInitMonitor(). EC_SIMULATOR Sets log parameters. Used to change the parameters provided by esInitSimulator(). * **Param pLogParms:** New Log parameters * **Return:** ### SetMasterRedStateReq  (*bActive*) Requests Master Redundancy State ACTIVE / INACTIVE. * **Param bActive:** * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized or MasterRedParms.bEnabled = EC_FALSE * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_NOTSUPPORTED if EC-Master stack does not include Master Redundancy support ### GetMasterRedState (*out*  *pbActive*) Gets Master Redundancy State (ACTIVE / INACTIVE). * **Param pbActive:** Pointer to variable of type EC_T_BOOL * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized or MasterRedParms.bEnabled = EC_FALSE * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_NOTSUPPORTED if EC-Master stack does not include Master Redundancy support ### [] GetMasterRedProcessImageInputPtr () Gets the Master Redundancy process data input image pointer. * **Return:** Master Redundancy process data input image pointer ### [] GetMasterRedProcessImageOutputPtr () Gets the Master Redundancy process data output image pointer. * **Return:** Master Redundancy process data output image pointer ### IoCtl  (*dwCode*, [] *pbyInBuf*,  *dwInBufSize*, [] *pbyOutBuf*,  *dwOutBufSize*, *out*  *pdwNumOutData*) A generic control interface between the application, the EtherCAT stack and its Link Layers. * **Param dwCode:** IOCTL code (EC_IOCTL…) * **Param pbyInBuf:** IOCTL input parameters * **Param dwInBufSize:** Size of IOCTL input parameters in bytes * **Param pbyOutBuf:** Buffer for IOCTL output * **Param dwOutBufSize:** Size of buffer at pbyOutBuf in bytes * **Param pdwNumOutData:** Amount of bytes written to pbyOutBuf by IOCTL. EC_NULL: amount not set by IOCTL. * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer * EC_E_NOMEMORY if memory cannot be allocated * EC_E_ADS_IS_RUNNING if the ADS server is running ### ScanBus  (*dwTimeout*) Scans all connected slaves. Scans all connected slaves connected to EC-Master. If a configuration has been loaded, a validation between the configuration and the connected slaves is done. This function should not be called from within the JobTask’s context. * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_LINK_DISCONNECTED if link is disconnected * EC_E_TIMEOUT if dwTimeout elapsed during the API call * EC_E_BUSCONFIG_MISMATCH if the slaves found do not match the configured ones * EC_E_LINE_CROSSED if a line crossed (cabling wrong) condition has been detected * EC_E_REDLINEBREAK if cable redundancy is configured and a line break condition has been detected * EC_E_JUNCTION_RED_LINE_BREAK if junction redundancy is configured and a line break condition has been detected * EC_E_MAX_BUS_SLAVES_EXCEEDED if the amount of slaves found exceeds EC_T_INIT_MASTER_PARMS.dwMaxBusSlaves * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if the ADS server is running ### RescueScan  (*dwTimeout*) Recovers the bus from permanent frame loss situations. Scans all connected slaves. Closes and opens ports on the network to rule out slaves which permanently discard frames. The Master notifies every slave port which permanently discards frames with EC_NOTIFY_FRAMELOSS_AFTER_SLAVE. Due to port opening and closing the scanning time is increased about 2 seconds per slave. The Master will not automatically re-open this port. The application can force to open the port again. This function may not be called from within the JobTask’s context. * **Param dwTimeout:** Timeout [ms] * **Return:** EC_E_NOERROR or error code ### GetMasterInfo (*out*  *pMasterInfo*) Get generic information about the Master. * **Param pMasterInfo:** Master information * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or pParms is NULL or contains values out of range * EC_E_ADS_IS_RUNNING if ADS server is running ### ConfigureNetwork  (*eCnfType*, [] *pbyCnfData*,  *dwCnfDataLen*) Configure the Network. This function must be called after the initialization. Among others the EtherCAT topology defined in the given XML configuration file will be stored internally. A client must not be registered prior to calling this function. Existing client registrations will be dropped. * **Param eCnfType:** Type of configuration data provided * **Param pbyCnfData:** Filename / configuration data, or EC_NULL if eCnfType is * **Param dwCnfDataLen:** Length of configuration data in byte, or zero if eCnfType is * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized or eCnfType is eCnfType_GenPreopENI or eCnfType_GenOpENI and link is disconnected * EC_E_INVALIDPARM if dwInstanceID is out of range or pParms is EC_NULL contains some values out of range * EC_E_LINK_DISCONNECTED if link is disconnected * EC_E_FEATURE_DISABLED if a configured feature is not included in the license key * EC_E_NOTSUPPORTED if a configured feature is not supported (e.g not compiled in the library) * EC_E_CFGFILENOTFOUND if the ENI file cannot be found * EC_E_WRONG_FORMAT if format errors have been detected in the ENI or EEPROM in case of eCnfType_GenPreopENI or eCnfType_GenOpENI * EC_E_OEM_SIGNATURE_MISMATCH if the OEM signature in the ENI file doesn’t match the used OEM key * EC_E_ENI_ENCRYPTION_WRONG_VERSION if the ENI encryption version is not supported (e.g. the library is too old) * EC_E_ENI_ENCRYPTED if the ENI is encrypted and no OEM key has been set * EC_E_XML_CYCCMDS_MISSING if the ENI doesn’t contain cyclic commands * EC_E_XML_ALSTATUS_READ_MISSING if the ENI doesn’t contain any read AL status command * EC_E_XML_CYCCMDS_SIZEMISMATCH if the size of the cyclic commands in the ENI mismatch * EC_E_XML_INVALID_INP_OFF if some input offsets in the ENI are invalid * EC_E_XML_INVALID_OUT_OFF if some output offsets in the ENI are invalid * EC_E_XML_INVALID_CMD_WITH_RED if the ENI contains LRW commands and cable redundancy is configured * EC_E_XML_PREV_PORT_MISSING if some previous port information are missing in the ENI * EC_E_XML_DC_CYCCMDS_MISSING if the DC related cyclic commands are missing in the ENI * EC_E_XML_AOE_NETID_INVALID if the ENI contains some invalid NetID ### ConfigLoad  (*eCnfType*, [] *pbyCnfData*,  *dwCnfDataLen*) Load the network configuration. In combination with emConfigApply, this function replaces emConfigureNetwork and must be called after the initialization. Among others the EtherCAT topology defined in the given XML configuration file will be stored internally. A client must not be registered prior to calling this function. Existing client registrations will be dropped. * **Param eCnfType:** Type of configuration data provided * **Param pbyCnfData:** Configuration data * **Param dwCnfDataLen:** Length of configuration data in byte * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer * EC_E_NOMEMORY if some memory cannot be allocated * EC_E_ADS_IS_RUNNING if the ADS server is running ### ConfigExcludeSlave  (*wStationAddress*) Exclude a slave from the network configuration. It has to be called after emConfigLoad and prior to calling emConfigApply. * **Param wStationAddress:** Station address of the slave to be excluded. A value of 0 excludes all slaves. * **Return:** EC_E_NOERROR or error code ### ConfigIncludeSlave  (*wStationAddress*) Include a slave in the network configuration. Slaves that were previously excluded with emConfigSlaveExclude can be added again. It has to be called after emConfigLoad and prior to calling emConfigApply. * **Param wStationAddress:** Station address of the slave to be included. A value of 0 includes all slaves. * **Return:** EC_E_NOERROR or error code ### ConfigSetPreviousPort  (*wStationAddress*,  *wStationAddressPrev*,  *wPortPrev*) Set previous port information of a slave. It has to be called after emConfigLoad and prior to calling emConfigApply. * **Param wStationAddress:** Station address of the slave * **Param wStationAddressPrev:** Previous slave station address * **Param wPortPrev:** Previous port * **Return:** EC_E_NOERROR or error code ### ConfigAddJunctionRedundancyConnection  (*wHeadStationAddress*,  *wHeadRedPort*,  *wTailStationAddress*,  *wTailRedPort*) Add a junction redundancy connection. Since there is no mechanism to configure junction redundancy in the ENI, this API allows adding junction redundancy connections which will be validated by the EC-Master stack. It has to be called after emConfigLoad and prior to calling emConfigApply. Calling this API enables junction redundancy support implicitly. * **Param wHeadStationAddress:** Station address of the junction redundancy head slave. Typically this is an EtherCAT junction. * **Param wHeadRedPort:** Port at head slave to which the junction redundancy cable is connected. Must be ESC_PORT_B. * **Param wTailStationAddress:** Station address of the junction redundancy tail slave * **Param wTailRedPort:** Port at tail slave to which the junction redundancy cable is connected. May not be ESC_PORT_A. * **Return:** EC_E_NOERROR or error code ### ConfigAddCableRedundancyConnection  (*wStationAddress*,  *wRedPort*) Add a cable redundancy connection. This API defines where the redundancy cable is plugged in, in which slave and at which port. It has to be called after emConfigLoad and prior to calling emConfigApply. * **Param wStationAddress:** Station address of the cable redundancy slave * **Param wRedPort:** Slave port to which the junction redundancy cable is connected. * **Return:** EC_E_NOERROR or error code ### ConfigApply () Apply the network configuration. It has to be called after emConfigLoad. * **Return:** EC_E_NOERROR or error code ### ConfigExtend  (*bResetConfig*,  *dwTimeout*) Extends the existing network configuration. This function extends the existing configuration described in the ENI to allow mailbox communication with unexpected slaves. After this function was called, unexpected slaves can reach PREOP state. After the configuration was extended, disconnecting any slave will generate a bus mismatch, because all the slaves are part of the configuration. Recalling this function with bResetConfig set to EC_FALSE will extend the configuration again by any new connected unexpected slaves. The previous extension is not deleted. Calling the function with bResetConfig set to EC_TRUE will reset all the previous extensions. This function may not be called from within the JobTask’s context. * **Param bResetConfig:** EC_TRUE: Extended configuration will be removed * **Param dwTimeout:** Timeout [ms] * **Return:** EC_E_NOERROR or error code ### IsConfigured (*out*  *pbIsConfigured*) Returns if configuration has been applied. * **Param pbIsConfigured:** EC_TRUE if configuration has been applied * **Return:** EC_E_NOERROR or error code ### SetMasterState  (*dwTimeout*,  *eReqState*) Set the master (and all slaves) into the requested EtherCAT state. If the function is called with EC_NOWAIT, the client may wait for reaching the requested state using the notification callback (EC_NOTIFY_STATECHANGED). By default the Master will just change to a higher state if all slaves have reached the requested state. It may happen that some slaves are in higher state at network than the Master, e.g.: * Master and all slaves are in PREOP * Application requests SAFEOP * Master starts transition for all slaves * Some slaves changed to SAFEOP, but some fail and therefore stay in PREOP * Master state stays in PREOP, function returns with error The application can request SAFEOP again to re-request the state of previously failed slaves. Transition to a lower state: The master changes to a lower state even if one slave is not able to follow. This function may not be called from within the JobTask’s context with dwTimeout other than EC_NOWAIT. * **Param dwTimeout:** Timeout [ms]. This function will block until the requested state is reached or the timeout elapsed. If the timeout value is set to EC_NOWAIT the function will return immediately. * **Param eReqState:** Requested System state * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_TIMEOUT if dwTimeout elapsed during the API call * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if the ADS server is running ### SetMasterStateReq  (*dwTimeout*,  *eReqState*) Request to set the master (and all slaves) into the requested EtherCAT state and return immediately. The Master by default will just change to a higher state, if all slaves have reached the requested state. It may happen that some slaves are in higher state at network than Master, e.g.: * Master and all slaves are in PREOP * Application requests SAFEOP * Master starts transition for all slaves * Some slaves changed to SAFEOP, but some fail and therefore stay in PREOP * Master state stays in PREOP, function returns with error The application can request SAFEOP again to re-request state of previously failed slaves. Transition to lower state: The master changes to lower state, even if one slave is not able to follow. See also EC_NOTIFY_STATECHANGED. * **Param dwTimeout:** Timeout [ms]. This function will block until the requested state is reached or the timeout elapsed. If the timeout value is set to EC_NOWAIT the function will return immediately. * **Param eReqState:** Requested System state * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if ADS server is running ### GetMasterState () Get the EtherCAT master current state. * **Return:** EtherCAT master state ### GetMasterStateEx (*out*  *pwCurrState*, *out*  *pwReqState*) Get the EtherCAT master current and requested state. Possible return values for current and requested state: * #DEVICE_STATE_UNKNOWN * #DEVICE_STATE_INIT * #DEVICE_STATE_PREOP * #DEVICE_STATE_SAFEOP * #DEVICE_STATE_OP * **Param pwCurrState:** Current master state * **Param pwReqState:** Requested master state * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointers are EC_NULL ### GetSlaveId  (*wStationAddress*) Determines the slave ID using the slave station address. * **Param wStationAddress:** Station address of the slave * **Return:** Slave ID or INVALID_SLAVE_ID if the slave could not be found or the stack is not initialized ### GetSlaveFixedAddr  (*dwSlaveId*, *out*  *pwFixedAddr*) Determine slave station address according to its slave ID. * **Param dwSlaveId:** Slave ID * **Param pwFixedAddr:** Corresponding fixed address * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointer is EC_NULL * EC_E_NOTFOUND if no slave matching dwSlaveId can be found ### GetSlaveIdAtPosition  (*wAutoIncAddress*) Determines the slave ID using the slave auto increment address. * **Param wAutoIncAddress:** Auto increment address of the slave * **Return:** Slave ID or INVALID_SLAVE_ID if no slave matching wAutoIncAddress can be found ### GetSlaveProp  (*dwSlaveId*, *out*  *pSlaveProp*) Determines the properties of the slave device. * **Param dwSlaveId:** Slave ID * **Param pSlaveProp:** Slave properties * **Return:** EC_TRUE if the slave exists, EC_FALSE if no slave matching dwSlaveId can be found ### GetSlavePortState  (*dwSlaveId*, *out*  *pwPortState*) Returns the state of the slave ports. * **Param dwSlaveId:** Slave ID * **Param pwPortState:** Slave port state.Format: wwww xxxx yyyy zzzz (each nibble : port 3210) * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointer is EC_NULL * EC_E_NOTFOUND if no slave matching dwSlaveId can be found ### GetSlaveState  (*dwSlaveId*, *out*  *pwCurrDevState*, *out*  *pwReqDevState*) Get the slave state. The slave state is always read automatically from the AL_STATUS register whenever necessary. It is not forced by calling this function. This function may be called from within the JobTask’s context. * **Param dwSlaveId:** Slave ID * **Param pwCurrDevState:** Current slave state * **Param pwReqDevState:** Requested slave state * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointers are EC_NULL * EC_E_SLAVE_NOT_PRESENT if the slave is not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found ### SetSlaveState  (*dwSlaveId*,  *wDeviceState*,  *dwTimeout*) Set a specified slave into the requested EtherCAT state. The requested state shall not be higher than the overall operational state. DEVICE_STATE_BOOTSTRAP can only be requested if the slave’s state is INIT. This function may not be called from within the JobTask’s context. If the function is called with EC_NOWAIT, the client may wait for reaching the requested state using the notification callback (EC_NOTIFY_SLAVE_STATECHANGED). * **Param dwSlaveId:** Slave ID * **Param wDeviceState:** Requested device state. See DEVICE_STATES * **Param dwTimeout:** Timeout [ms]. This function will block until the requested state is reached or the timeout elapsed. If the timeout value is set to EC_NOWAIT the function will return immediately. * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized or denies the requested state, see comments below * EC_E_INVALIDPARM if dwInstanceID is out of range or BOOTSTRAP was requested for a slave that does not support it * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_TIMEOUT if dwTimeout elapsed during the API call * EC_E_BUSY if the EtherCAT stack cannot execute the request at this time, the function has to be called at a later time * EC_E_NOTREADY if the working counter was not set when requesting the slave’s state (slave may not be connected or did not respond) * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### SetSlaveStateReq  (*dwSlaveId*,  *wDeviceState*,  *dwTimeout*) Request to set a specified slave into the requested EtherCAT state and return immediately. The requested state shall not be higher than the overall operational state. DEVICE_STATE_BOOTSTRAP can only be requested if the slave’s state is INIT. * **Param dwSlaveId:** Slave ID * **Param wDeviceState:** Requested device state. See DEVICE_STATES * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized or denies the requested state, see comments below * EC_E_INVALIDPARM if dwInstanceID is out of range or BOOTSTRAP was requested for a slave that does not support it * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_BUSY if the EtherCAT stack cannot execute the request at this time, the function has to be called at a later time * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### GetProcessVarInfoNumOf  (*eVarDirection*,  *eVarSource*,  *bFixedAddress*,  *wSlaveAddress*, *out*  *pdwProcessVarInfoNumOf*) Get process variables information. * **Param eVarDirection:** INPUTs, OUTPUTs, … . See EC_T_VAR_DIRECTION . * **Param eVarSource:** Slave, Master, … . See EC_T_VAR_SOURCE . * **Param bFixedAddress:** Use station address if EC_TRUE. Otherwise use AutoInc address. * **Param wSlaveAddress:** Slave address according to bFixedAddress * **Param pdwProcessVarInfoNumOf:** Process variables count * **Return:** EC_E_NOERROR or error code ### GetProcessVarInfoEx  (*eVarDirection*,  *eVarSource*,  *bFixedAddress*,  *wSlaveAddress*, *out* [] *aoVarInfo*,  *dwMaxProcessVarInfoNumOf*, *out*  *pdwProcessVarInfoNumOf*) Get process variables information. * **Param eVarDirection:** INPUTs, OUTPUTs, … . See EC_T_VAR_DIRECTION . * **Param eVarSource:** Slave, Master, … . See EC_T_VAR_SOURCE . * **Param bFixedAddress:** Use station address if EC_TRUE. Otherwise use AutoInc address. * **Param wSlaveAddress:** Slave address according to bFixedAddress * **Param aoVarInfo:** The read process variable extended information entries * **Param dwMaxProcessVarInfoNumOf:** * **Param pdwProcessVarInfoNumOf:** * **Return:** EC_E_NOERROR or error code ### TferSingleRawCmd  (*eCmd*,  *dwMemoryAddress*, [] *pbyData*,  *wLen*,  *dwTimeout*) Transfers a single raw EtherCAT command to one or multiple slaves and waits for the result. Using this function it is possible to exchange arbitrary data between the master and the slaves. When the master receives the response to the queued frame it raises EC_NOTIFY_RAWCMD_DONE to all clients. This function blocks until the command is completely processed. In case of read commands the slave data will be written back into the given memory area. If a timeout occurs (e.g. due to a bad line quality) the corresponding frame will be sent again. The timeout value and retry counter can be set using the master configuration parameters dwEcatCmdTimeout and dwEcatCmdMaxRetries. The call will return in any case (without waiting for the number of retries specified in dwEcatCmdMaxRetries) if the time determined with the dwTimeout parameter elapsed. Caveat: Using auto increment addressing (APRD, APWR, APRW) may lead to unexpected results in case the selected slave does not increment the working counter. In such cases the EtherCAT command would be handled by the slave directly behind the selected one. This function may not be called from within the JobTask’s context. * **Param eCmd:** EtherCAT command type. See EC_T_CMD * **Param dwMemoryAddress:** Slave memory address, depending on the command to be sent this is either a physical or a logical address * **Param pbyData:** [in, out] Buffer containing or receiving transferred data * **Param wLen:** Number of bytes to transfer * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the command is not supported or the timeout value is set to EC_NOWAIT * EC_E_TIMEOUT if dwTimeout elapsed during the API call * EC_E_BUSY if another transfer request is already pending or the master or the corresponding slave is currently changing its operational state * EC_E_NOTREADY if the working counter was not set when sending the command (slave may not be connected or did not respond) * EC_E_INVALIDSIZE if the size of the complete command does not fit into a single Ethernet frame. The maximum amount of data to transfer must not exceed 1486 bytes. * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### ReadSlaveRegister  (*bFixedAddressing*,  *wSlaveAddress*,  *wRegisterOffset*, [] *pbyData*,  *wLen*,  *dwTimeout*) Reads data from the ESC memory that have so far been transferred to a slave and received by the EC-Monitor. !(EC_MONITOR) Reads data from the ESC memory of a specified slave. This function may not be called from within the JobTask’s context. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param wRegisterOffset:** Register offset. I.e. use 0x0130 to read the AL Status register. * **Param pbyData:** Buffer receiving transfered data * **Param wLen:** Number of bytes to receive * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the command is not supported or the timeout value is set to EC_NOWAIT * EC_E_SLAVE_NOT_PRESENT if the slave is not present * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found * EC_E_TIMEOUT if dwTimeout elapsed during the API call * EC_E_BUSY if another transfer request is already pending or the master or the corresponding slave is currently changing its operational state * EC_E_NOTREADY if the working counter was not set when sending the command (slave may not be connected or did not respond) * EC_E_INVALIDSIZE if the size of the complete command does not fit into a single Ethernet frame. The maximum amount of data to transfer must not exceed 1486 bytes. ### ReadSlaveRegisterReq  (*dwClientId*,  *dwTferId*,  *bFixedAddressing*,  *wSlaveAddress*,  *wRegisterOffset*, [] *pbyData*,  *wLen*) Requests data read transfer from the ESC memory of a specified slave and returns immediately. A notification EC_NOTIFY_SLAVE_REGISTER_TRANSFER is given on completion. This function may be called from within the JobTask’s context. * **Param dwClientId:** Client ID returned by RegisterClient (0 if all registered clients shall be notified) * **Param dwTferId:** Transfer ID. The application can set this ID to identify the transfer. It will be passed back to the application within EC_T_SLAVEREGISTER_TRANSFER_NTFY_DESC. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param wRegisterOffset:** Register offset, e.g. use 0x0130 to read the AL Status register * **Param pbyData:** Buffer receiving transfered data * **Param wLen:** Number of bytes to receive * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the command is not supported or the timeout value is set to EC_NOWAIT * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found * EC_E_INVALIDSIZE if the size of the complete command does not fit into a single Ethernet frame. The maximum amount of data to transfer must not exceed 1486 bytes. ### WriteSlaveRegister  (*bFixedAddressing*,  *wSlaveAddress*,  *wRegisterOffset*, [] *pbyData*,  *wLen*,  *dwTimeout*) Writes data into the ESC memory of a specified slave. This function may not be called from within the JobTask’s context Changing contents of ESC registers may lead to unpredictable behavior of the slaves and/or the master. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param wRegisterOffset:** Register offset. E.g. use 0x0120 to write to the AL Control register. * **Param pbyData:** Buffer containing transfered data * **Param wLen:** Number of bytes to send * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the command is not supported or the timeout value is set to EC_NOWAIT * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found * EC_E_TIMEOUT if dwTimeout elapsed during the API call * EC_E_BUSY if another transfer request is already pending or the master or the corresponding slave is currently changing its operational state * EC_E_NOTREADY if the working counter was not set when sending the command (slave may not be connected or did not respond) * EC_E_INVALIDSIZE if the size of the complete command does not fit into a single Ethernet frame. The maximum amount of data to transfer must not exceed 1486 bytes. ### WriteSlaveRegisterReq  (*dwClientId*,  *dwTferId*,  *bFixedAddressing*,  *wSlaveAddress*,  *wRegisterOffset*, [] *pbyData*,  *wLen*) Requests a data write transfer into the ESC memory of a specified slave and returns immediately. A notification EC_NOTIFY_SLAVE_REGISTER_TRANSFER is given on completion. This function may be called from within the JobTask’s context. Changing contents of ESC registers may lead to unpredictable behavior of the slaves and/or the master. * **Param dwClientId:** Client ID returned by RegisterClient (0 if all registered clients shall be notified) * **Param dwTferId:** Transfer ID. The application can set this ID to identify the transfer. It will be passed back to the application within EC_T_SLAVEREGISTER_TRANSFER_NTFY_DESC. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param wRegisterOffset:** Register offset. E.g. use 0x0120 to write to the AL Control register. * **Param pbyData:** Buffer containing transferred data * **Param wLen:** Number of bytes to send * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the command is not supported or the timeout value is set to EC_NOWAIT * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found * EC_E_INVALIDSIZE if the size of the complete command does not fit into a single Ethernet frame. The maximum amount of data to transfer must not exceed 1486 bytes. ### QueueRawCmd  (*wInvokeId*,  *eCmd*,  *dwMemoryAddress*, [] *pbyData*,  *wLen*) Transfers a raw EtherCAT command to one or multiple slaves. All registered clients will be notified. This function may not be called from within the JobTask’s context. * **Param wInvokeId:** Invoke ID to reassign the results to the sent CMD * **Param eCmd:** EtherCAT command * **Param dwMemoryAddress:** Slave memory address, depending on the command to be sent this is either a physical or a logical address * **Param pbyData:** [in, out] Buffer containing or receiving transferred data. In case a read-only command is queued (e.g. APRD) this pointer should be set to a value of EC_NULL. * **Param wLen:** Number of bytes to transfer * **Return:** EC_E_NOERROR or error code ### ClntQueueRawCmd  (*dwClntId*,  *wInvokeId*,  *eCmd*,  *dwMemoryAddress*, [] *pbyData*,  *wLen*) Transfers a raw EtherCAT command to one or multiple slaves. Using this function it is possible to exchange data between the master and the slaves. When the response to the queued frame is received, the notification EC_NOTIFY_RAWCMD_DONE is given for the appropriate client. This function queues a single EtherCAT command. Queued raw commands will be sent after sending cyclic process data values. If a timeout occurs the corresponding frame will be sent again, the timeout value and retry counter can be set using the master configuration parameters EC_T_INIT_MASTER_PARMS.dwEcatCmdTimeout and EC_T_INIT_MASTER_PARMS.dwEcatCmdMaxRetries. Using auto increment addressing (APRD, APWR, APRW) may lead to unexpected results in case the selected slave does not increment the working counter. In such cases the EtherCAT command would be handled by the slave directly behind the selected one. This function may not be called from within the JobTask’s context. * **Param dwClntId:** Client ID to be notified (0 if all registered clients shall be notified) * **Param wInvokeId:** Invoke ID to reassign the results to the sent CMD * **Param eCmd:** EtherCAT command * **Param dwMemoryAddress:** Slave memory address, depending on the command to be sent this is either a physical or a logical address * **Param pbyData:** [in, out] Buffer containing or receiving transferred data. In case a read-only command is queued (e.g. APRD) this pointer should be set to a value of EC_NULL. * **Param wLen:** Number of bytes to transfer * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the command is not supported * EC_E_BUSY if the master or the corresponding slave is currently changing its operational state * EC_E_INVALIDSIZE if the size of the complete command does not fit into a single Ethernet frame. The maximum amount of data to transfer must not exceed 1486 bytes. ### GetNumConfiguredSlaves () Returns the number of slaves which are configured in the ENI. * **Return:** Number of slaves ### MbxTferAbort  (*pMbxTfer*) Abort a running mailbox transfer. This function may not be called from within the JobTask’s context. * **Param pMbxTfer:** Mailbox transfer object created with emMbxTferCreate * **Return:** EC_E_NOERROR if successful ### ClntSendRawMbx  (*dwClntId*, [] *pbyMbxCmd*,  *dwMbxCmdLen*,  *dwTimeout*) Send a raw mailbox command. * **Param dwClntId:** Client ID * **Param pbyMbxCmd:** Buffer containing the raw mailbox command starting with mailbox header * **Param dwMbxCmdLen:** Length of pbyMbxCmd buffer * **Param dwTimeout:** Timeout [ms] * **Return:** EC_E_NOERROR or error code ### CoeSdoDownloadReq  (*pMbxTfer*,  *dwSlaveId*,  *wObIndex*,  *byObSubIndex*,  *dwTimeout*,  *dwFlags*) Initiates a CoE SDO download to an EtherCAT slave device and returns immediately. The length of the data to be downloaded must be set in EC_T_MBXTFER.dwDataLen. A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion. * **Param pMbxTfer:** Mailbox transfer object * **Param dwSlaveId:** Slave ID * **Param wObIndex:** Object index * **Param byObSubIndex:** Object sub index. If Complete Access only 0 or 1 allowed. * **Param dwTimeout:** Timeout [ms] * **Param dwFlags:** Mailbox Flags. Bit 0: set if Complete Access (EC_MAILBOX_FLAG_SDO_COMPLETE). * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full * EC_E_SLAVE_NOT_PRESENT if the slave is not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if the slave has no mailbox support * EC_E_INVALID_SLAVE_STATE if the slave is in an invalid state for mailbox transfer * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if the ADS server is running * EC_ERROR_CODES_COE “CoE SDO error code” ### CoeSdoDownload  (*dwSlaveId*,  *wObIndex*,  *byObSubIndex*, [] *pbyData*,  *dwDataLen*,  *dwTimeout*,  *dwFlags*) Initiates a CoE SDO download to an EtherCAT slave device and returns immediately. The length of the data to be downloaded must be set in EC_T_MBXTFER.dwDataLen. A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion. * **Param dwSlaveId:** Slave ID * **Param wObIndex:** Object index * **Param byObSubIndex:** Object sub index. If Complete Access only 0 or 1 allowed. * **Param pbyData:** * **Param dwDataLen:** * **Param dwTimeout:** Timeout [ms] * **Param dwFlags:** Mailbox Flags. Bit 0: set if Complete Access (EC_MAILBOX_FLAG_SDO_COMPLETE). * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full * EC_E_SLAVE_NOT_PRESENT if the slave is not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if the slave has no mailbox support * EC_E_INVALID_SLAVE_STATE if the slave is in an invalid state for mailbox transfer * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if the ADS server is running * EC_ERROR_CODES_COE “CoE SDO error code” ### CoeSdoUploadReq  (*pMbxTfer*,  *dwSlaveId*,  *wObIndex*,  *byObSubIndex*,  *dwTimeout*,  *dwFlags*) Initiates a CoE SDO upload from an EtherCAT slave device to the master and returns immediately. A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion. * **Param pMbxTfer:** Mailbox transfer object created with emMbxTferCreate * **Param dwSlaveId:** Slave ID * **Param wObIndex:** Object index * **Param byObSubIndex:** Object sub index. If Complete Access only 0 or 1 allowed. * **Param dwTimeout:** Timeout [ms] * **Param dwFlags:** Mailbox Flags. Bit 0: set if Complete Access (EC_MAILBOX_FLAG_SDO_COMPLETE). * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if slave has no mailbox support * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if the ADS server is running * EC_ERROR_CODES_COE “CoE SDO error code” ### CoeSdoUpload  (*dwSlaveId*,  *wObIndex*,  *byObSubIndex*, [] *pbyData*,  *dwDataLen*, *out*  *pdwOutDataLen*,  *dwTimeout*,  *dwFlags*) Initiates a CoE SDO upload from an EtherCAT slave device to the master and returns immediately. A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion. * **Param dwSlaveId:** Slave ID * **Param wObIndex:** Object index * **Param byObSubIndex:** Object sub index. If Complete Access only 0 or 1 allowed. * **Param pbyData:** * **Param dwDataLen:** * **Param pdwOutDataLen:** * **Param dwTimeout:** Timeout [ms] * **Param dwFlags:** Mailbox Flags. Bit 0: set if Complete Access (EC_MAILBOX_FLAG_SDO_COMPLETE). * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if slave has no mailbox support * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if the ADS server is running * EC_ERROR_CODES_COE “CoE SDO error code” ### CoeGetODListReq  (*pMbxTfer*,  *dwSlaveId*,  *eListType*,  *dwTimeout*) Initiates retrieval of a list of object IDs that have so far been transferred to a slave and received by the EC-Monitor and returns immediately. !(EC_MONITOR) Initiates retrieval of a list of object IDs that are available in a slave and returns immediately. A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion. The mailbox transfer object will receive the slave response containing the list type followed by the list itself. Therefore the buffer must be 2 bytes bigger than the expected list size. * **Param pMbxTfer:** Mailbox transfer * **Param dwSlaveId:** Slave ID * **Param eListType:** Which object types shall be transferred * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if slave has no mailbox support * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if ADS server is running * EC_ERROR_CODES_COE “CoE SDO error code” ### CoeGetObjectDescReq  (*pMbxTfer*,  *dwSlaveId*,  *wObIndex*,  *dwTimeout*) Initiates retrieval of the description of a specific object and returns immediately. A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion. * **Param pMbxTfer:** Mailbox transfer object * **Param dwSlaveId:** Slave ID * **Param wObIndex:** Object index * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if slave has no mailbox support * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if ADS server is running * EC_ERROR_CODES_COE “CoE SDO error code” ### CoeGetEntryDescReq  (*pMbxTfer*,  *dwSlaveId*,  *wObIndex*,  *byObSubIndex*,  *byValueInfo*,  *dwTimeout*) Initiates retrieval of the description of a specific object entry and returns immediately. A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion. * **Param pMbxTfer:** Mailbox transfer object * **Param dwSlaveId:** Slave ID * **Param wObIndex:** Object index * **Param byObSubIndex:** Object sub-index * **Param byValueInfo:** The value info bit mask includes which elements shall be in the response. See EC_COE_ENTRY_VALUEINFO “Value info flags” for available values. * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if slave has no mailbox support * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if ADS server is running * EC_ERROR_CODES_COE “CoE SDO error code” ### CoeRxPdoTfer  (*pMbxTfer*,  *dwSlaveId*,  *dwNumber*,  *dwTimeout*) Initiate CoE RxPDO transfer. * **Param pMbxTfer:** Mailbox transfer object * **Param dwSlaveId:** Slave ID * **Param dwNumber:** PDO number * **Param dwTimeout:** Timeout [ms] * **Return:** EC_E_NOERROR or error code ### CoeProfileGetChannelInfo  (*bStationAddress*,  *wSlaveAddress*,  *dwChannel*,  *pInfo*) Return information about a configured CoE profile channel from the ENI file. * **Param bStationAddress:** * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param dwChannel:** Channel * **Param pInfo:** Channel info * **Return:** EC_E_NOERROR or error code ### FoeFileUpload  (*dwSlaveId*,  *achFileName*,  *dwFileNameLen*, [] *pbyData*,  *dwDataLen*, *out*  *pdwOutDataLen*,  *dwPassword*,  *dwTimeout*) Execute an FoE File upload from an EtherCAT slave device. This function is used to upload a complete file. The function returns after the upload has been successfully completed or an error has occurred. This function may not be called from within the JobTask’s context. * **Param dwSlaveId:** Slave ID * **Param achFileName:** File name of slave file to read * **Param dwFileNameLen:** Length of slave file name in bytes * **Param pbyData:** Buffer receiving transfered data * **Param dwDataLen:** Buffer length [bytes] * **Param pdwOutDataLen:** Length of received data [byte] * **Param dwPassword:** Slave password * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or maximum file name length of 64 bytes (MAX_FILE_NAME_SIZE) exceeded * EC_E_TIMEOUT if dwTimeout elapsed during the API call * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_ERROR_CODES_FOE “FoE error code” ### FoeFileDownload  (*dwSlaveId*,  *achFileName*,  *dwFileNameLen*, [] *pbyData*,  *dwDataLen*,  *dwPassword*,  *dwTimeout*) Execute an FoE File download to an EtherCAT slave device. This function is used to download a complete file. The function returns after the download has been successfully completed or an error has occurred. This function may not be called from within the JobTask’s context. * **Param dwSlaveId:** Slave ID * **Param achFileName:** File name of slave file to write * **Param dwFileNameLen:** Length of slave file name in bytes * **Param pbyData:** Buffer containing transferred data * **Param dwDataLen:** Buffer length [bytes] * **Param dwPassword:** Slave password * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or maximum file name length of 64 bytes (MAX_FILE_NAME_SIZE) exceeded * EC_E_FOE_ERRCODE_NOTINBOOTSTRAP if slave in BOOTSTRAP and filename not accepted by slave * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_ERROR_CODES_FOE “FoE error code” ### FoeUploadReq  (*pMbxTfer*,  *dwSlaveId*,  *achFileName*,  *dwFileNameLen*,  *dwPassword*,  *dwTimeout*) Initiates an FoE File upload from an EtherCAT slave device. This function is used to upload a complete file and returns immediately. After the upload has been successfully completed or an error has occurred, EC_NOTIFY_MBOXRCV is raised. The progress of the file transfer is also notified with EC_NOTIFY_MBOXRCV. EC_NOWAIT as a timeout is still accepted for reasons of compatibility and sets the timeout to 10 seconds * **Param pMbxTfer:** Mailbox transfer object * **Param dwSlaveId:** Slave ID * **Param achFileName:** File name of slave file to read * **Param dwFileNameLen:** Length of slave file name in bytes * **Param dwPassword:** Slave password * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or maximum file name length of 64 bytes (MAX_FILE_NAME_SIZE) exceeded * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_ERROR_CODES_FOE “FoE error code” ### FoeSegmentedUploadReq  (*pMbxTfer*,  *dwSlaveId*,  *szFileName*,  *dwFileNameLen*,  *dwFileSize*,  *dwPassword*,  *dwTimeout*) Initiates or continues a segmented FoE File upload from an EtherCAT slave device. This function is used to upload a file chunk-by-chunk and returns immediately. An EC_NOTIFY_MBOXRCV is raised to provide the next chunk to the application or to get information about the progress and the change in the transfer status. The slave may have a different mailbox size for BOOTSTRAP than for PREOP, SAFEOP, OP. See EC_T_CFG_SLAVE_INFO.dwMbxInSize2. The maximum chunk size is the slave’s mailbox size - 12 bytes overhead for EtherCAT’s FoE protocol. The mailbox transfer object’s buffer must be at least as big as the chunks to be transferred. EC_NOWAIT as a timeout is still accepted for reasons of compatibility and sets the timeout to 10 seconds * **Param pMbxTfer:** Pointer to the corresponding mailbox transfer object. EC_T_MBXTFER.pbyMbxTferData: next chunk, EC_T_MBXTFER.dwDataLen: next chunk size. * **Param dwSlaveId:** Slave ID * **Param szFileName:** File name of slave file to write. Only evaluated when initiating the request. * **Param dwFileNameLen:** Length of slave file name in bytes * **Param dwFileSize:** Used only for progress information * **Param dwPassword:** Slave password. Only evaluated when initiating the request. * **Param dwTimeout:** Overall timeout [ms] of the FoE transfer. * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or maximum file name length of 64 bytes (MAX_FILE_NAME_SIZE) exceeded * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_ERROR_CODES_FOE “FoE error code” ### FoeDownloadReq  (*pMbxTfer*,  *dwSlaveId*,  *achFileName*,  *dwFileNameLen*,  *dwPassword*,  *dwTimeout*) Initiates an FoE File download to an EtherCAT slave device. This function is used to download a complete file and returns immediately. After the download has been successfully completed or an error has occurred, EC_NOTIFY_MBOXRCV is raised. The progress of the file transfer is also notified with EC_NOTIFY_MBOXRCV. EC_NOWAIT as a timeout is still accepted for reasons of compatibility and sets the timeout to 10 seconds * **Param pMbxTfer:** Mailbox transfer object * **Param dwSlaveId:** Slave ID * **Param achFileName:** File name of slave file to write * **Param dwFileNameLen:** Length of slave file name in bytes * **Param dwPassword:** Slave password * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or maximum file name length of 64 bytes (MAX_FILE_NAME_SIZE) exceeded * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_ERROR_CODES_FOE “FoE error codes” ### FoeSegmentedDownloadReq  (*pMbxTfer*,  *dwSlaveId*,  *szFileName*,  *dwFileNameLen*,  *dwFileSize*,  *dwPassword*,  *dwTimeout*) Initiates or continues a segmented FoE File download to an EtherCAT slave device. This function is used to download a file chunk-by-chunk and returns immediately. An EC_NOTIFY_MBOXRCV is raised to request the next chunk from the application or to provide information about the progress and the change in the transfer status. The slave may have a different mailbox size for BOOTSTRAP than for PREOP, SAFEOP, OP. See EC_T_CFG_SLAVE_INFO.dwMbxInSize2. The maximum chunk size is the slave’s mailbox size - 12 bytes overhead for EtherCAT’s FoE protocol. The mailbox transfer object’s buffer must be at least as big as the chunks to be transferred. EC_NOWAIT as a timeout is still accepted for reasons of compatibility and sets the timeout to 10 seconds * **Param pMbxTfer:** Pointer to the corresponding mailbox transfer object. EC_T_MBXTFER.pbyMbxTferData: next chunk, EC_T_MBXTFER.dwDataLen: next chunk size. * **Param dwSlaveId:** Slave ID * **Param szFileName:** File name of slave file to write. Only evaluated when initiating the request. * **Param dwFileNameLen:** Length of slave file name in bytes * **Param dwFileSize:** Complete file size (mandatory). Used also for progress information. Only evaluated when initiating the request. * **Param dwPassword:** Slave password. Only evaluated when initiating the request. * **Param dwTimeout:** Overall timeout [ms] of the FoE transfer. * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or maximum file name length of 64 bytes (MAX_FILE_NAME_SIZE) exceeded * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_ERROR_CODES_FOE “FoE error code” ### SoeWrite  (*dwSlaveId*,  *byDriveNo*, [] *pbyElementFlags*,  *wIDN*, [] *pbyData*,  *dwDataLen*,  *dwTimeout*) Execute an SoE SSC Write service which downloads data to an EtherCAT slave device. The function returns after timeout expired or download is completed successfully (Write response is received). It can also perform an SoE SSC Procedure Command. After a procedure command has started, the slave generates a normal SSC Write Response, and the function returns. If the data to be sent with the write service exceeds the mailbox size, the data will be sent fragmented. The fragmented write operation consists of several Write SSC Fragment Services. Therefore the selected Timeout should be increasing with the count of fragments. This function may not be called from within the JobTask’s context. * **Param dwSlaveId:** Slave ID * **Param byDriveNo:** Drive number to address inside slave device * **Param pbyElementFlags:** [in/out] SoE ElementFlags. Flag indicating elements to address. * **Param wIDN:** IDN of the object to address * **Param pbyData:** Buffer containing transferred data * **Param dwDataLen:** Buffer length [byte] * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if slave has no mailbox support * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if ADS server is running * EC_ERROR_CODES_SOE “SoE error code” ### SoeRead  (*dwSlaveId*,  *byDriveNo*, [] *pbyElementFlags*,  *wIDN*, [] *pbyData*,  *dwDataLen*, *out*  *pdwOutDataLen*,  *dwTimeout*) Execute an SoE SCC Read service which uploads data from an EtherCAT SoE slave device. The received data can consist of several fragments. The reserved data buffer (pbyData) must have space for all received data segments and the selected Timeout should be increasing with the count of fragments. * **Param dwSlaveId:** Slave ID * **Param byDriveNo:** Drive number to address inside slave device * **Param pbyElementFlags:** [in/out] SoE ElementFlags. Flag indicating elements to address. * **Param wIDN:** IDN of the object to address * **Param pbyData:** Buffer receiving transferred data * **Param dwDataLen:** Buffer length [byte] * **Param pdwOutDataLen:** Length of received data [byte] * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if slave has no mailbox support * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if ADS server is running * EC_ERROR_CODES_SOE “SoE error code” ### SoeAbortProcCmd  (*dwSlaveId*,  *byDriveNo*, [] *pbyElementFlags*,  *wIDN*,  *dwTimeout*) Abort SSC Procedure Command sequence. A Procedure Command takes up some time. After a procedure command has started, the slave generates a normal SSC Write Response. The end of a procedure command is indicated by the Notify SSC Command Execution Service. This function may not be called from within the JobTask’s context. * **Param dwSlaveId:** Slave ID * **Param byDriveNo:** Drive number to address inside slave device * **Param pbyElementFlags:** [in/out] SoE ElementFlags. Flag indicating elements to address. * **Param wIDN:** IDN of the object to address * **Param dwTimeout:** Timeout [ms] * **Return:** EC_E_NOERROR or error code ### SoeWriteReq  (*pMbxTfer*,  *dwSlaveId*,  *byDriveNo*, [] *pbyElementFlags*,  *wIDN*,  *dwTimeout*) Requests an SoE SSC Write and returns immediately. This function may be called from within the JobTask’s context. * **Param pMbxTfer:** Mailbox transfer object * **Param dwSlaveId:** Slave ID * **Param byDriveNo:** Drive number to address inside slave device * **Param pbyElementFlags:** [in/out] SoE ElementFlags. Flag indicating elements to address. * **Param wIDN:** IDN of the object to address * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if slave has no mailbox support * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if ADS server is running * EC_ERROR_CODES_SOE “SoE error code” ### SoeReadReq  (*pMbxTfer*,  *dwSlaveId*,  *byDriveNo*, [] *pbyElementFlags*,  *wIDN*,  *dwTimeout*) Requests an SoE SSC Read and returns immediately. This function may be called from within the JobTask’s context. * **Param pMbxTfer:** Mailbox transfer object * **Param dwSlaveId:** Slave ID * **Param byDriveNo:** Drive number to address inside slave device * **Param pbyElementFlags:** [in/out] SoE ElementFlags. Flag indicating elements to address. * **Param wIDN:** IDN of the object to address * **Param dwTimeout:** Timeout [ms]. Must not be set to EC_NOWAIT. * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if slave has no mailbox support * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive * EC_E_ADS_IS_RUNNING if ADS server is running * EC_ERROR_CODES_SOE “SoE error code” ### AoeGetSlaveNetId  (*dwSlaveId*, *out*  *poAoeNetId*) Retrieve the NetID of a specific EtherCAT device. * **Param dwSlaveId:** Slave ID * **Param poAoeNetId:** AoE NetID of the corresponding slave * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if slave has no mailbox support * EC_E_ADS_IS_RUNNING if ADS server is running ### AoeRead  (*dwSlaveId*,  *poTargetNetId*,  *wTargetPort*,  *dwIndexGroup*,  *dwIndexOffset*,  *dwDataLen*, [] *pbyData*, *out*  *pdwDataOutLen*, *out*  *pdwErrorCode*, *out*  *pdwCmdResult*,  *dwTimeout*) Execute an AoE mailbox read request to an EtherCAT slave device. This function may not be called from within the JobTask’s context. * **Param dwSlaveId:** Slave ID * **Param poTargetNetId:** Target NetID * **Param wTargetPort:** Target port * **Param dwIndexGroup:** AoE read command index group * **Param dwIndexOffset:** AoE read command index offset * **Param dwDataLen:** Buffer length [bytes] * **Param pbyData:** Buffer receiving transferred data * **Param pdwDataOutLen:** Number of bytes read from the target device * **Param pdwErrorCode:** AoE response error code * **Param pdwCmdResult:** AoE read command result code * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. * **Return:** * EC_E_NOERROR on success * EC_E_AOE_VENDOR_SPECIFIC if the AoE device has responded with a user defined error code * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### AoeReadReq  (*pMbxTfer*,  *dwSlaveId*,  *poTargetNetId*,  *wTargetPort*,  *dwIndexGroup*,  *dwIndexOffset*,  *dwTimeout*) Execute a non-blocking AoE mailbox read request to an EtherCAT slave device. If the functions returns EC_E_AOE_DEVICE_XXXX (well known device errors) or EC_E_AOE_VENDOR_SPECIFIC the original ADS error can be retrieved from the mailbox transfer object at EC_T_MBXTFER.MbxData.AoE_Response. A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. * **Param pMbxTfer:** Mailbox transfer object * **Param dwSlaveId:** Slave ID * **Param poTargetNetId:** Target NetID * **Param wTargetPort:** Target port * **Param dwIndexGroup:** AoE read command index group * **Param dwIndexOffset:** AoE read command index offset * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR on success * EC_E_AOE_VENDOR_SPECIFIC if the AoE device has responded with a user defined error code * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### AoeWrite  (*dwSlaveId*,  *poTargetNetId*,  *wTargetPort*,  *dwIndexGroup*,  *dwIndexOffset*,  *dwDataLen*, [] *pbyData*, *out*  *pdwErrorCode*, *out*  *pdwCmdResult*,  *dwTimeout*) Execute an AoE mailbox write request to an EtherCAT slave device. This function may not be called from within the JobTask’s context. * **Param dwSlaveId:** Slave ID * **Param poTargetNetId:** Target NetID * **Param wTargetPort:** Target port * **Param dwIndexGroup:** AoE write command index group * **Param dwIndexOffset:** AoE write command index offset * **Param dwDataLen:** Buffer length [bytes] * **Param pbyData:** Buffer containing transfered data * **Param pdwErrorCode:** Pointer to AoE response error code * **Param pdwCmdResult:** Pointer to AoE write command result code * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. * **Return:** * EC_E_NOERROR on success * EC_E_AOE_VENDOR_SPECIFIC if the AoE device has responded with a user defined error code * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### AoeWriteReq  (*pMbxTfer*,  *dwSlaveId*,  *poTargetNetId*,  *wTargetPort*,  *dwIndexGroup*,  *dwIndexOffset*,  *dwTimeout*) Execute a non-blocking AoE mailbox write request to an EtherCAT slave device. If the function returns EC_E_AOE_DEVICE_XXXX (well known device errors) or EC_E_AOE_VENDOR_SPECIFIC the original ADS error can be retrieved from the mailbox transfer object at EC_T_MBXTFER.MbxData.AoE_Response. A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. * **Param pMbxTfer:** Mailbox transfer object * **Param dwSlaveId:** Slave ID * **Param poTargetNetId:** Target NetID * **Param wTargetPort:** Target port * **Param dwIndexGroup:** AoE write command index group * **Param dwIndexOffset:** AoE write command index offset * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR on success * EC_E_AOE_VENDOR_SPECIFIC if the AoE device has responded with a user defined error code * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### AoeReadWrite  (*dwSlaveId*,  *poTargetNetId*,  *wTargetPort*,  *dwIndexGroup*,  *dwIndexOffset*,  *dwReadDataLen*,  *dwWriteDataLen*, [] *pbyData*, *out*  *pdwDataOutLen*, *out*  *pdwErrorCode*, *out*  *pdwCmdResult*,  *dwTimeout*) Execute an AoE mailbox read/write request to an EtherCAT slave device. * **Param dwSlaveId:** Slave ID * **Param poTargetNetId:** Target NetID * **Param wTargetPort:** Target port * **Param dwIndexGroup:** AoE read/write command index group * **Param dwIndexOffset:** AoE read/write command index offset * **Param dwReadDataLen:** Number of bytes to read from the target device * **Param dwWriteDataLen:** Number of bytes to write to the target device * **Param pbyData:** [in, out] Buffer containing and receiving transfered data * **Param pdwDataOutLen:** Number of bytes read from the target device * **Param pdwErrorCode:** Pointer to AoE response error code * **Param pdwCmdResult:** Pointer to AoE write command result code * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. EC_NOWAIT is not valid. * **Return:** * EC_E_NOERROR on success * EC_E_AOE_VENDOR_SPECIFIC if the AoE device has responded with a user defined error code * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### AoeWriteControl  (*dwSlaveId*,  *poTargetNetId*,  *wTargetPort*,  *wAoEState*,  *wDeviceState*,  *dwDataLen*, [] *pbyData*, *out*  *pdwErrorCode*, *out*  *pdwCmdResult*,  *dwTimeout*) Execute an AoE mailbox write control request to an EtherCAT slave device. * **Param dwSlaveId:** Slave ID * **Param poTargetNetId:** Target NetID. The Target NetID of a AoE slave device can be retrieved by ecatAoeGetSlaveNetId(). * **Param wTargetPort:** Target port * **Param wAoEState:** AoE state * **Param wDeviceState:** Device specific state * **Param dwDataLen:** Buffer length [bytes] * **Param pbyData:** Buffer containing transfered data * **Param pdwErrorCode:** Pointer to AoE response error code * **Param pdwCmdResult:** Pointer to AoE write command result code * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. EC_NOWAIT is not valid. * **Return:** * EC_E_NOERROR on success * EC_E_AOE_VENDOR_SPECIFIC if the AoE device has responded with a user defined error code * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### VoeRead  (*dwSlaveId*, [] *pbyData*,  *dwDataLen*, *out*  *pdwOutDataLen*,  *dwTimeout*) Retrieves VoE mailbox, that was sent by an EtherCAT slave device. If a VoE mailbox was already received, further received VoE mailboxes will be discarded as long as this function was not called. The received data includes the Mailbox header of type ETHERCAT_MBOX_HEADER followed by the VoE payload. This function blocks until the VoE data has been successfully received or an error has occurred. * **Param dwSlaveId:** Slave ID * **Param pbyData:** Buffer receiving transferred data * **Param dwDataLen:** Buffer length [byte] * **Param pdwOutDataLen:** Length of received data [byte] * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. EC_NOWAIT returns the function immediately. * **Return:** * EC_E_NOERROR if the VoE slave has provided some VoE data * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_TIMEOUT if dwTimeout elapsed during the API call * EC_E_VOE_NO_MBX_RECEIVED if no VoE data was received * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### VoeWrite  (*dwSlaveId*, [] *pbyData*,  *dwDataLen*,  *dwTimeout*) Execute a VoE mailbox write to an EtherCAT slave device. This function blocks until the VoE write has been successfully completed or an error has occurred. * **Param dwSlaveId:** Slave ID * **Param pbyData:** Buffer containing transferred data * **Param dwDataLen:** Buffer length [bytes]. The maximum data length including 6 bytes for the mailbox header is given at EC_T_CFG_SLAVE_INFO.dwMbxOutSize. * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. * **Return:** EC_E_NOERROR or error code ### VoeWriteReq  (*pMbxTfer*,  *dwSlaveId*,  *dwTimeout*) Initiates a VoE mailbox write to an EtherCAT slave device. The amount of data bytes to write has to be stored in EC_T_MBXTFER.dwDataLen. The maximum data length including 6 bytes for the mailbox header is given at EC_T_CFG_SLAVE_INFO.dwMbxOutSize. A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. * **Param pMbxTfer:** Mailbox transfer object * **Param dwSlaveId:** Slave ID * **Param dwTimeout:** Timeout [ms], EC_NOWAIT returns the function immediately * **Return:** EC_E_NOERROR or error code ### GetProcessData  (*bOutputData*,  *dwOffset*, [] *pbyData*,  *dwLength*,  *dwTimeout*) Blocking function to retrieve consistent process data from outside the JobTask context. This function requests a copy of the process data (stored in RAM). The actual memcpy operation is executed by the JobTask to ensure data consistency. While waiting for the copy to complete, the calling context blocks and repeatedly calls sleep with an interval of at least the cycle time or one millisecond, whichever is greater. The function returns either with the requested process data once the copy is finished, or when the specified timeout has expired. The function is blocking and should be used carefully in time-sensitive contexts and may not be called from within the JobTask context. This function may not be called from within the JobTask’s context. * **Param bOutputData:** EC_TRUE: read output data, EC_FALSE: read input data * **Param dwOffset:** Byte offset in Process data to read from * **Param pbyData:** Buffer receiving transferred data * **Param dwLength:** * **Param dwTimeout:** Timeout [ms] * **Return:** EC_E_NOERROR or error code ### SetProcessData  (*bOutputData*,  *dwOffset*, [] *pbyData*,  *dwLength*,  *dwTimeout*) Write Process data synchronized. This function may not be called from within the JobTask’s context. * **Param bOutputData:** EC_TRUE: write output data, EC_FALSE: write input data * **Param dwOffset:** Byte offset in Process data to write to * **Param pbyData:** Buffer containing transferred data * **Param dwLength:** * **Param dwTimeout:** Timeout [ms] * **Return:** EC_E_NOERROR or error code ### SetProcessDataBits  (*bOutputData*,  *dwBitOffsetPd*, [] *pbyDataSrc*,  *dwBitLengthSrc*,  *dwTimeout*) Writes a specific number of bits from a given buffer to the process image with a bit offset (synchronized). This function may not be called from within the JobTask’s context. * **Param bOutputData:** EC_TRUE: write output data, EC_FALSE: write input data * **Param dwBitOffsetPd:** Bit offset in Process data image * **Param pbyDataSrc:** * **Param dwBitLengthSrc:** * **Param dwTimeout:** Timeout [ms]. The timeout value must not be set to EC_NOWAIT. * **Return:** EC_E_NOERROR or error code ### GetProcessDataBits  (*bOutputData*,  *dwBitOffsetPd*, [] *pbyDataDst*,  *dwBitLengthDst*,  *dwTimeout*) Reads a specific number of bits from the process image to the given buffer with a bit offset (synchronized). This function may not be called from within the JobTask’s context. * **Param bOutputData:** EC_TRUE: read output data, EC_FALSE: write input data * **Param dwBitOffsetPd:** Bit offset in Process data image * **Param pbyDataDst:** * **Param dwBitLengthDst:** * **Param dwTimeout:** Timeout [ms]. The timeout value must not be set to EC_NOWAIT. * **Return:** EC_E_NOERROR or error code ### ForceProcessDataBits  (*dwClientId*,  *bOutputData*,  *dwBitOffsetPd*,  *wBitLength*, [] *pbyData*,  *dwTimeout*) Force a specific number of bits from a given buffer to the process image with a bit offset. All output data set by this API are overwriting the values set by the application. All input data set by this API are overwriting the values read from the slaves. Forcing will be terminated by calling the corresponding functions. This function may not be called from within the JobTask’s context. * **Param dwClientId:** Client ID returned by RegisterClient (0 if all registered clients shall be notified) * **Param bOutputData:** EC_TRUE: write output data, EC_FALSE: write input data * **Param dwBitOffsetPd:** Bit offset in Process data image * **Param wBitLength:** * **Param pbyData:** Buffer containing transfered data * **Param dwTimeout:** Timeout [ms]. The timeout value must not be set to EC_NOWAIT. * **Return:** EC_E_NOERROR or error code ### ReleaseProcessDataBits  (*dwClientId*,  *bOutputData*,  *dwBitOffsetPd*,  *wBitLength*,  *dwTimeout*) Release previously forced process data. * Forced output: Value set by application become valid again. Because forced process data bits are written directly into the process output image, the application has to update the process image with the required value, otherwise the forced value is still valid. * Forced input: Value read from the slaves become valid again. This function may not be called from within the JobTask’s context. * **Param dwClientId:** Client ID returned by RegisterClient (0 if all registered clients shall be notified) * **Param bOutputData:** EC_TRUE: write output data, EC_FALSE: write input data * **Param dwBitOffsetPd:** Bit offset in Process data image * **Param wBitLength:** Number of bits that shall be written to the process image. * **Param dwTimeout:** Timeout [ms]. The timeout value must not be set to EC_NOWAIT. * **Return:** EC_E_NOERROR or error code ### ReleaseAllProcessDataBits  (*dwClientId*,  *dwTimeout*) Release all previously forced process data for a dedicated client. * Forced output: Value set by application become valid again. Because forced process data bits are written directly into the process output image, the application has to update the process image with the required value, otherwise the forced value is still valid. * Forced input: Value read from the slaves become valid again. This function may not be called from within the JobTask’s context. * **Param dwClientId:** Client ID returned by RegisterClient (0 if all registered clients shall be notified) * **Param dwTimeout:** Timeout [ms]. The timeout value must not be set to EC_NOWAIT. * **Return:** EC_E_NOERROR or error code ### GetNumConnectedSlaves () Get number of currently connected slaves. * **Return:** Number of connected slaves ### GetNumConnectedSlavesMain () Get the number of currently connected Slaves to main interface. * **Return:** Number of connected slaves at main interface ### GetNumConnectedSlavesRed () Get the number of currently connected Slaves to redundancy interface. * **Return:** Number of connected slaves at redundancy interface ### ReloadSlaveEEPRom  (*bFixedAddressing*,  *wSlaveAddress*,  *dwTimeout*) Causes a slave to reload its EEPROM values to ESC registers. Alias address at 0x12 is not reloaded through this command, this is prevented by the slave hardware. The slave controller must be reset to reload the alias address. This function may not be called from within the JobTask’s context. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. The timeout value must not be set to EC_NOWAIT. * **Return:** EC_E_NOERROR or error code ### ReloadSlaveEEPRomReq  (*dwClientId*,  *dwTferId*,  *bFixedAddressing*,  *wSlaveAddress*,  *dwTimeout*) Request a slave to reload its EEPROM values to ESC registers, and returns immediately. Alias address at 0x12 is not reloaded through this command, this is prevented by the slave hardware. The slave controller must be reset to reload the alias address. An EC_NOTIFY_EEPROM_OPERATION is given on completion or timeout. This function may be called from within the JobTask’s context. * **Param dwClientId:** Client ID returned by RegisterClient (0 if all registered clients shall be notified) * **Param dwTferId:** Transfer ID. The application can set this ID to identify the transfer. It will be passed back to the application within EC_T_EEPROM_OPERATION_NTFY_DESC. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param dwTimeout:** Timeout [ms] * **Return:** EC_E_NOERROR or error code ### ResetSlaveController  (*bFixedAddressing*,  *wSlaveAddress*,  *dwTimeout*) Reset EtherCAT slave controller (ESC) A special sequence of three independent and consecutive frames/commands is sent to the slave (reset register ECAT 0x0040 or PDI 0x0041), after which the slave resets. If that fails, the reset sequence is repeated until it succeeds or the timeout expires. The ESC must support resetting and the slave state should be INIT when calling this function. The number of acyclic frames per cycle EC_T_INIT_MASTER_PARMS.dwMaxAcycFramesPerCycle must be at least 3, otherwise an error is returned. This function may not be called from within the JobTask’s context. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. The timeout value must not be set to EC_NOWAIT. * **Return:** * EC_E_NOERROR or error code * EC_E_NOTSUPPORTED if EC_T_INIT_MASTER_PARMS.dwMaxAcycFramesPerCycle is less than 3 * EC_E_SLAVE_NOT_PRESENT if the slave is not present * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### AssignSlaveEEPRom  (*bFixedAddressing*,  *wSlaveAddress*,  *bSlavePDIAccessEnable*,  *bForceAssign*,  *dwTimeout*) Set EEPROM Assignment to PDI or EtherCAT Master. This function may not be called from within the JobTask’s context. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param bSlavePDIAccessEnable:** EC_TRUE: EEPROM assigned to slave PDI application, * **Param bForceAssign:** Force Assignment of EEPROM (only for ECat Master Assignment) * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. The timeout value must not be set to EC_NOWAIT. * **Return:** EC_E_NOERROR or error code ### AssignSlaveEEPRomReq  (*dwClientId*,  *dwTferId*,  *bFixedAddressing*,  *wSlaveAddress*,  *bSlavePDIAccessEnable*,  *bForceAssign*,  *dwTimeout*) Requests EEPROM Assignment to PDI or EtherCAT Master operation and returns immediately. EC_NOTIFY_EEPROM_OPERATION is given on completion or timeout. This function may be called from within the JobTask’s context. * **Param dwClientId:** Client ID returned by RegisterClient (0 if all registered clients shall be notified) * **Param dwTferId:** Transfer ID. The application can set this ID to identify the transfer. It will be passed back to the application within EC_T_EEPROM_OPERATION_NTFY_DESC. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param bSlavePDIAccessEnable:** EC_TRUE: EEPROM assigned to slave PDI application, EC_FALSE: EEPROM assigned to EC-Master * **Param bForceAssign:** Force Assignment of EEPROM (only for ECat Master Assignment) * **Param dwTimeout:** Timeout [ms] * **Return:** EC_E_NOERROR or error code ### ActiveSlaveEEPRom  (*bFixedAddressing*,  *wSlaveAddress*, *out*  *pbSlavePDIAccessActive*,  *dwTimeout*) Check whether EEPROM is marked access active by Slave PDI application. This function may not be called from within the JobTask’s context. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param pbSlavePDIAccessActive:** Pointer to Boolean value: EC_TRUE: EEPROM active by PDI application, EC_FALSE: EEPROM not active * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. The timeout value must not be set to EC_NOWAIT. * **Return:** EC_E_NOERROR or error code ### ActiveSlaveEEPRomReq  (*dwClientId*,  *dwTferId*,  *bFixedAddressing*,  *wSlaveAddress*, *out*  *pbSlavePDIAccessActive*,  *dwTimeout*) Requests EEPROM is marked access active by Slave PDI application check and returns immediately. An EC_NOTIFY_EEPROM_OPERATION is given on completion or timeout. This function may be called from within the JobTask’s context. * **Param dwClientId:** Client ID returned by RegisterClient (0 if all registered clients shall be notified) * **Param dwTferId:** Transfer ID. The application can set this ID to identify the transfer. It will be passed back to the application within EC_T_EEPROM_OPERATION_NTFY_DESC. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param pbSlavePDIAccessActive:** Pointer to Boolean value: EC_TRUE: EEPROM active by PDI application, EC_FALSE: EEPROM not active. Must be valid until operation complete. * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. The timeout value must not be set to EC_NOWAIT. * **Return:** EC_E_NOERROR or error code ### HCAcceptTopoChange () Accept last detected topology change. If Hot connect is configured in manual mode by EC_IOCTL_HC_SETMODE, the master will generate the notifications EC_NOTIFY_HC_PROBEALLGROUPS or EC_NOTIFY_HC_DETECTADDGROUPS after a topology change was detected. This function will set all new detected slaves to the current master state. * **Return:** EC_E_NOERROR or error code ### HCGetNumGroupMembers  (*dwGroupIndex*) Get number of slaves belonging to a specific Hot-Connect group. * **Param dwGroupIndex:** Index of Hot-Connect group, 0 is the mandatory group * **Return:** Number of slaves ### HCGetSlaveIdsOfGroup  (*dwGroupIndex*, *out*  *adwSlaveId*,  *dwMaxNumSlaveIds*) Get a list of Slave ID’s belonging to a specific Hot-Connect group. * **Param dwGroupIndex:** Index of Hot-Connect group, 0 is the mandatory group * **Param adwSlaveId:** Preallocated Slave ID list buffer * **Param dwMaxNumSlaveIds:** Size of Slave ID list buffer * **Return:** EC_E_NOERROR or error code ### GetHcGroupNumOf () Get number of Hot-Connect groups. * **Return:** number of HC groups ### GetHcGroupInfo  (*dwHcGroupIdx*,  *pHcGroupInfo*) Get informations of a specific Hot-Connect group. * **Param dwHcGroupIdx:** * **Param pHcGroupInfo:** Hot connect group info * **Return:** EC_E_NOERROR or error code ### SetSlavePortState  (*dwSlaveId*,  *wPort*,  *bClose*,  *bForce*,  *dwTimeout*) Open or close slave port. This function allows to open or close a specific slave port in different ways. It can also be used to re-open ports closed by a rescue scan. * **Param dwSlaveId:** Slave ID * **Param wPort:** Port to open or close. Can be ESC_PORT_A, ESC_PORT_B, ESC_PORT_C, ESC_PORT_D. * **Param bClose:** EC_TRUE: close port, EC_FALSE: open port * **Param bForce:** EC_TRUE: port will be closed or open, EC_FALSE: port will be set in AutoClose mode * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### SetSlavePortStateReq  (*dwClientId*,  *dwTferId*,  *dwSlaveId*,  *wPort*,  *bClose*,  *bForce*,  *dwTimeout*) Requests Open or close slave port operation and returns immediately. An EC_T_PORT_OPERATION_NTFY_DESC is given on completion. This function can be called to re-open ports closed by a rescue scan. * **Param dwClientId:** Client ID returned by RegisterClient (0 if all registered clients shall be notified) * **Param dwTferId:** Transfer ID. The application can set this ID to identify the transfer. It will be passed back to the application within EC_T_PORT_OPERATION_NTFY_DESC. * **Param dwSlaveId:** Slave ID * **Param wPort:** Port to open or close. Can be ESC_PORT_A, ESC_PORT_B, ESC_PORT_C, ESC_PORT_D. * **Param bClose:** EC_TRUE: close port, EC_FALSE: open port * **Param bForce:** EC_TRUE: port will be closed or open, EC_FALSE: port will be set in AutoClose mode * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching dwSlaveId can be found ### SlaveSerializeMbxTfers  (*dwSlaveId*) Serializes all mailbox transfers to the specified slave. The parallel (overlapped) usage of more than one protocol (CoE, EoE, FoE, etc.) will be disabled. By default parallel mailbox transfers are enabled. * **Param dwSlaveId:** Slave ID * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if slave does not support mailbox transfers ### SlaveParallelMbxTfers  (*dwSlaveId*) Re-enable the parallel mailbox transfers to the specified slave. Allows parallel (overlapped) usage of more than one protocol (CoE, EoE, FoE, etc.). By default parallel mailbox transfers are enabled. * **Param dwSlaveId:** Slave ID * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_NOTFOUND if no slave matching dwSlaveId can be found * EC_E_NO_MBX_SUPPORT if slave does not support mailbox transfers ### DcEnable () Enable DC Support. * **Return:** EC_E_NOERROR or error code ### DcDisable () Disable DC Support. * **Return:** EC_E_NOERROR or error code ### DcIsEnabled (*out*  *pbDcIsEnabled*) Determines if DC is enabled and used. * **Param pbDcIsEnabled:** EC_TRUE if DC is enabled * **Return:** EC_E_NOERROR or error code ### DcConfigure  (*pDcConfigure*) Configure the distributed clocks. * Set the DC synchronization settling time ([ms]). * Set the DC slave limit for the wire or’ed clock deviation value. This value determines whether the slave clocks are synchronized or not. * Configure the ARMW burst frames to compensate the static deviations of the clock speeds. * **Param pDcConfigure:** Configuration parameter a pointer to a structure of type EC_T_DC_CONFIGURE * **Return:** EC_E_NOERROR or error code ### DcContDelayCompEnable () Enable the continuous propagation delay compensation. Calling this function will generate a propagation delay measurement every 30s. The result of the measurement is used to correct the propagation delay values on the bus. * **Return:** EC_E_NOERROR or error code ### DcContDelayCompDisable () Disable the continuous propagation delay compensation. * **Return:** EC_E_NOERROR or error code ### DcmConfigure  (*pDcmConfig*,  *dwInSyncTimeout*) Configure DC master synchronization. * **Param pDcmConfig:** Configuration information, a pointer to a structure of type EC_T_DCM_CONFIG * **Param dwInSyncTimeout:** Currently not implemented * **Return:** EC_E_NOERROR or error code ### DcmGetStatus (*out*  *pdwErrorCode*, *out*  *pnDiffCur*, *out*  *pnDiffAvg*, *out*  *pnDiffMax*) Get DC master synchronization controller status. * **Param pdwErrorCode:** Pointer to current error code of the DCM controller. Possible values are: * **Param pnDiffCur:** Pointer to current difference between set value and actual value of controller in nanoseconds * **Param pnDiffAvg:** Pointer to average difference between set value and actual value of controller in nanoseconds * **Param pnDiffMax:** Pointer to maximum difference between set value and actual value of controller in nanoseconds * **Return:** * EC_E_NOERROR if status retrieval was successful * EC_E_NOTSUPPORTED if the DC feature is not supported/switched off. EC-Master stack has to be compiled with DC support see “define INCLUDE_DC_SUPPORT”. * EC_NULL does not appear in normal flow, if EC_NULL is returned we are in a very exceptional case where m_poDcm == NULL (SW error detection) ### DcxGetStatus (*out*  *pdwErrorCode*, *out*  *pnDiffCur*, *out*  *pnDiffAvg*, *out*  *pnDiffMax*, *out*  *pnTimeStampDiff*) Get DC master external synchronization controller status. * **Param pdwErrorCode:** DCX controller error code * **Param pnDiffCur:** Current difference between set value and actual value of controller in nanoseconds * **Param pnDiffAvg:** Average difference between set value and actual value of controller in nanoseconds * **Param pnDiffMax:** Maximum difference between set value and actual value of controller in nanoseconds * **Param pnTimeStampDiff:** Difference between external and internal timestamps * **Return:** EC_E_NOERROR or error code ### DcmResetStatus () Reset DC master synchronization controller status, average and maximum difference between set value and actual value. * **Return:** EC_E_NOERROR or error code ### DcmGetBusShiftConfigured (*out*  *pbBusShiftConfigured*) Determines if DCM Bus Shift is configured/possible in configuration (ENI file). * **Param pbBusShiftConfigured:** EC_TRUE if DCM bus shift mode is supported by the current configuration * **Return:** EC_E_NOERROR or error code ### DcmShowStatus () Show DC master synchronization status as DbgMsg (for development purposes only). * **Return:** EC_E_NOERROR or error code ### DcmGetAdjust (*out*  *pnAdjustPermil*) Returns the current adjustment value for the timer. bCtlOff must be set to EC_TRUE in EC_T_DCM_CONFIG to enable external adjustment. * **Param pnAdjustPermil:** Current adjustment value of the timer * **Return:** EC_E_NOERROR or error code ### GetSlaveInfo  (*bFixedAddressing*,  *wSlaveAddress*, *out*  *pGetSlaveInfo*) Get Slave Info. Use emGetCfgSlaveInfo or emGetBusSlaveInfo instead * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param pGetSlaveInfo:** Slave information * **Return:** EC_E_NOERROR or error code ### GetCfgSlaveInfo  (*bStationAddress*,  *wSlaveAddress*, *out*  *pSlaveInfo*) Return information about a configured slave from the ENI file. * **Param bStationAddress:** * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param pSlaveInfo:** Information about the slave * **Return:** EC_E_NOERROR or error code ### GetCfgSlaveEoeInfo  (*bStationAddress*,  *wSlaveAddress*, *out*  *pSlaveEoeInfo*) Return EoE information about a configured slave from the ENI file. * **Param bStationAddress:** * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param pSlaveEoeInfo:** Information about the slave * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found * EC_E_NO_MBX_SUPPORT if the slave does not support mailbox communication * EC_E_NO_EOE_SUPPORT if the slave supports mailbox communication, but not EoE ### GetCfgSlaveSmInfo  (*bStationAddress*,  *wSlaveAddress*,  *pSlaveSmInfo*) Return SyncManager information of a configured slave from the ENI file. * **Param bStationAddress:** * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param pSlaveSmInfo:** Information about the slave. * **Return:** EC_E_NOERROR or error code ### GetBusSlaveInfo  (*bStationAddress*,  *wSlaveAddress*, *out*  *pSlaveInfo*) Return information about a slave connected to the EtherCAT bus. * **Param bStationAddress:** * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param pSlaveInfo:** Information from the slave * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found ### GetSlaveInpVarInfoNumOf  (*bFixedAddressing*,  *wSlaveAddress*, *out*  *pwSlaveInpVarInfoNumOf*) Gets the number of input variables of a specific slave. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param pwSlaveInpVarInfoNumOf:** Number of found process variable entries * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointer is EC_NULL * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found ### GetSlaveOutpVarInfoNumOf  (*bFixedAddressing*,  *wSlaveAddress*, *out*  *pwSlaveOutpVarInfoNumOf*) Gets the number of output variables of a specific slave. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param pwSlaveOutpVarInfoNumOf:** Number of found process variables * **Return:** EC_E_NOERROR or error code ### GetSlaveInpVarInfo  (*bFixedAddressing*,  *wSlaveAddress*,  *wNumOfVarsToRead*, *out* [] *pSlaveProcVarInfoEntries*, *out*  *pwReadEntries*) Gets the number of input variables of a specific slave. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param wNumOfVarsToRead:** * **Param pSlaveProcVarInfoEntries:** * **Param pwReadEntries:** * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointer is EC_NULL * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found ### GetSlaveInpVarInfoEx  (*bFixedAddressing*,  *wSlaveAddress*,  *wNumOfVarsToRead*, *out* [] *pSlaveProcVarInfoEntries*, *out*  *pwReadEntries*) Gets the input process variable extended information entries of a specific slave. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param wNumOfVarsToRead:** Number process variable entries that have been stored in pSlaveProcVarInfoEntries * **Param pSlaveProcVarInfoEntries:** Number process variable entries that have been stored in pSlaveProcVarInfoEntries * **Param pwReadEntries:** The number of read process variable information entries * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointer is EC_NULL * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found ### GetSlaveOutpVarInfo  (*bFixedAddressing*,  *wSlaveAddress*,  *wNumOfVarsToRead*, *out* [] *pSlaveProcVarInfoEntries*, *out*  *pwReadEntries*) Gets the number of output variables of a specific slave. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param wNumOfVarsToRead:** * **Param pSlaveProcVarInfoEntries:** * **Param pwReadEntries:** * **Return:** EC_E_NOERROR or error code ### GetSlaveOutpVarInfoEx  (*bFixedAddressing*,  *wSlaveAddress*,  *wNumOfVarsToRead*, *out* [] *pSlaveProcVarInfoEntries*, *out*  *pwReadEntries*) Gets the output process variable extended information entries of a specific slave. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param wNumOfVarsToRead:** Number of process variable information entries * **Param pSlaveProcVarInfoEntries:** The read process extended variable entries * **Param pwReadEntries:** The number of read process variable information entries * **Return:** EC_E_NOERROR or error code ### GetSlaveOutpVarByObjectEx  (*bFixedAddressing*,  *wSlaveAddress*,  *wIndex*,  *wSubIndex*, *out*  *pProcessVarInfoEntry*) Gets the input process variable extended information entry by object index, subindex of a specific slave. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param wIndex:** Object index * **Param wSubIndex:** Object sub index * **Param pProcessVarInfoEntry:** Process variable extended information entry * **Return:** EC_E_NOERROR or error code ### GetSlaveInpVarByObjectEx  (*bFixedAddressing*,  *wSlaveAddress*,  *wIndex*,  *wSubIndex*, *out*  *pProcessVarInfoEntry*) Gets the input process variable extended information entry by object index, subindex of a specific slave. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param wIndex:** Object index * **Param wSubIndex:** Object sub index * **Param pProcessVarInfoEntry:** Process variable extended information entry * **Return:** EC_E_NOERROR or error code ### FindOutpVarByName  (*szVariableName*, *out*  *pSlaveOutpVarInfo*) Finds an output process variable information entry by the variable name. * **Param szVariableName:** Variable name * **Param pSlaveOutpVarInfo:** * **Return:** EC_E_NOERROR or error code ### FindOutpVarByNameEx  (*szVariableName*, *out*  *pProcessVarInfoEntry*) Finds an output process variable extended information entry by the variable name. * **Param szVariableName:** Variable name * **Param pProcessVarInfoEntry:** Process variable extended information entry * **Return:** EC_E_NOERROR or error code ### FindInpVarByName  (*szVariableName*, *out*  *pProcessVarInfoEntry*) Finds an input process variable information entry by the variable name. * **Param szVariableName:** Variable name * **Param pProcessVarInfoEntry:** Process variable information entry * **Return:** EC_E_NOERROR or error code ### FindInpVarByNameEx  (*szVariableName*, *out*  *pProcessVarInfoEntry*) Finds an input process variable extended information entry by the variable name. * **Param szVariableName:** Variable name * **Param pProcessVarInfoEntry:** Process variable extended information entry * **Return:** EC_E_NOERROR or error code ### EthDbgMsg  (*byEthTypeByte0*,  *byEthTypeByte1*,  *szMsg*) Send a debug message to the EtherCAT Link Layer. This feature can be used for debugging purposes. * **Param byEthTypeByte0:** Ethernet type byte 0 * **Param byEthTypeByte1:** Ethernet type byte 1 * **Param szMsg:** Message to send to link layer * **Return:** EC_E_NOERROR or error code ### BlockNode  (*pMisMatch*,  *dwTimeout*) Blocks a slave on a specific port. If an invalid slave node is connected, which causes the bus topology scan to fail, the previous port, where this node is connected to can be shut down with this call. This allows a Hot-Connect system to not be disturbed, if unknown nodes are connected. If this function will be executed on a Hot-Connect member (a slave which is part of a hot connect group) the complete hot connect group will be excluded from the bus. This function may only be called from within the JobTask’s context with parameter dwTimeout set to EC_NOWAIT. * **Param pMisMatch:** Pointer to EC_T_SB_MISMATCH_DESC carrying mismatch descriptor. * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. * **Return:** EC_E_NOERROR or error code ### OpenBlockedPorts  (*dwTimeout*) Opens all blocked ports. This call allows re-opening all blocked ports to check whether mismatch cause is removed from bus. This function may only be called from within the JobTask’s context with parameter dwTimeout set to EC_NOWAIT. * **Param dwTimeout:** Timeout [ms]. The function will block at most for this time. * **Return:** EC_E_NOERROR or error code ### ForceTopologyChange () Force changed topology. Trigger HC State Machine. * **Return:** EC_E_NOERROR or error code ### IsTopologyChangeDetected (*out*  *pbTopologyChangeDetected*) Returns whether topology change detected. * **Param pbTopologyChangeDetected:** Pointer to EC_T_BOOL value: EC_TRUE if Topology Change Detected, EC_FALSE if not * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### IsTopologyKnown (*out*  *pbTopologyKnown*) Returns whether topology known. * **Param pbTopologyKnown:** Topology known * **Return:** EC_E_NOERROR or error code ### GetBusTime (*out*  *pqwBusTime*) This function returns the actual bus time in nanoseconds. * **Param pqwBusTime:** Bus time [ns] * **Return:** EC_E_NOERROR or error code ### IsSlavePresent  (*dwSlaveId*, *out*  *pbPresence*) Returns whether a specific slave is currently connected to the Bus. This function may be called from within the JobTask. * **Param dwSlaveId:** Slave ID * **Param pbPresence:** EC_TRUE if the slave is currently connected to the bus, EC_FALSE if not * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_NOTFOUND if no slave matching dwSlaveId can be found ### PassThroughSrvGetStatus () Gets the status of the Pass-through server. * **Return:** EC_E_NOERROR or error code ### PassThroughSrvStart  (*poPtsStartParams*,  *dwTimeout*) Starts the Pass Through Server. * **Param poPtsStartParams:** Pass through server start parameter * **Param dwTimeout:** Timeout * **Return:** EC_E_NOERROR or error code ### PassThroughSrvStop  (*dwTimeout*) Stops the Pass Through Server. * **Param dwTimeout:** Timeout * **Return:** EC_E_NOERROR or error code ### PassThroughSrvEnable  (*dwTimeout*) Enables the Pass-through server. * **Param dwTimeout:** Timeout [ms] * **Return:** EC_E_NOERROR or error code ### PassThroughSrvDisable  (*dwTimeout*) Disables the Pass-through server. * **Param dwTimeout:** Timeout [ms] * **Return:** EC_E_NOERROR or error code ### AdsAdapterStart  (*poStartParams*,  *dwTimeout*) Starts the ADS Pass Through Server. * #EC_E_NOERROR if successful * #EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * #EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer * #EC_E_NOMEMORY if the mailbox protocol queue of the slave if full * #EC_E_ADS_IS_RUNNING if the ADS server is running * **Param poStartParams:** Pass through server start parameter * **Param dwTimeout:** Timeout * **Return:** ### AdsAdapterStop  (*dwTimeout*) Stops the ADS Pass Through Server. * **Param dwTimeout:** Timeout * **Return:** EC_E_NOERROR or error code ### GetDiagnosisImageSize () Gets the diagnosis image size. * **Return:** Diagnosis image size ### GetSrcMacAddress (*out*  *pMacSrc*) Gets the source MAC address. * **Param pMacSrc:** 6-byte buffer to write source MAC address to * **Return:** EC_E_NOERROR or error code ### GetLicenseFingerprint  (*byMethod*,  *szLicenseFingerprint*) Gets the fingerprint needed for license key generation. * **Param byMethod:** Method used to generate the fingerprint * **Param szLicenseFingerprint:** Buffer for fingerprint string. Size must be at least EC_LICENSE_FINGERPRINT_STRSIZE. * **Return:** EC_E_NOERROR or error code ### SetLicenseKey  (*szLicenseKey*) Sets the license key for the protected version of EC-Master. Must be called after initialization and before configuration. This function may not be called if a non protected version is used. * **Param szLicenseKey:** License key as zero terminated string with 26, 53 or 56 characters * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_INVALIDSIZE if the format of the license key is wrong. The correct length is 26, 53 or 56 characters. * EC_E_LICENSE_MISSING if the license key doesn’t match the MAC Address ### GetVersion (*out*  *pdwVersion*, *out*  *pdwVersionType*) Gets the version information. * **Param pdwVersion:** Pointer to EC_T_DWORD to carry out version number as a 32-bit value * **Param pdwVersionType:** Pointer to EC_T_DWORD to carry out version type. See EC_VERSION_TYPES “EC_VERSION_TYPE”. * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointer is EC_NULL ### TraceDataConfig  (*wTraceDataSize*) Configures a trace data buffer and enables it for transmission. Must be called after initialization and before configuration. If wTraceDataSize is too large, configuration will fail with return code #EC_E_XML_CYCCMDS_SIZEMISMATCH. * **Param wTraceDataSize:** Size of Trace Data in bytes * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_NOTSUPPORTED if eCycFrameLayout_FIXED is configured ### TraceDataGetInfo  (*pTraceDataInfo*) Get information about the offset and size of trace data. The trace data buffer is located in EC_T_TRACE_DATA_INFO.pbyData at the byte offset EC_T_TRACE_DATA_INFO.dwOffset. * **Param pTraceDataInfo:** Information about trace data * **Return:** EC_E_NOERROR or error code ### FastModeInit () * **Return:** ### FastSendAllCycFrames () * **Return:** ### FastProcessAllRxFrames (*out*  *pbAreAllCycFramesProcessed*) * **Param pbAreAllCycFramesProcessed:** * **Return:** ### ReadSlaveIdentification  (*bFixedAddressing*,  *wSlaveAddress*,  *wAdo*, *out*  *pwValue*,  *dwTimeout*) Read identification value from a slave. This function may not be called from within the JobTask’s context. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param wAdo:** ADO used for identification command * **Param pwValue:** Pointer to Word value containing the Identification value * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the command is not supported or the timeout value is set to EC_NOWAIT * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found * EC_E_TIMEOUT if dwTimeout elapsed during the API call * EC_E_BUSY if another transfer request is already pending or the master or the corresponding slave is currently changing its operational state * EC_E_NOTREADY if the working counter was not set when sending the command (slave may not be connected or did not respond) * EC_E_ADO_NOT_SUPPORTED if the slave does not support requesting ID mechanism * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### ReadSlaveIdentificationReq  (*dwClientId*,  *dwTferId*,  *bFixedAddressing*,  *wSlaveAddress*,  *wAdo*, *out*  *pwValue*,  *dwTimeout*) Request the identification value from a slave and returns immediately. A notification EC_NOTIFY_SLAVE_IDENTIFICATION is given on completion or timeout. This function may be called from within the JobTask’s context. * **Param dwClientId:** Client ID returned by RegisterClient (0 if all registered clients shall be notified) * **Param dwTferId:** Transfer ID. The application can set this ID to identify the transfer. It will be passed back to the application within EC_T_SLAVE_IDENTIFICATION_NTFY_DESC. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param wAdo:** ADO used for identification command * **Param pwValue:** Pointer to Word value containing the Identification value, must be valid until the request complete. * **Param dwTimeout:** Timeout [ms] * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or the command is not supported or the timeout value is set to EC_NOWAIT * EC_E_SLAVE_NOT_PRESENT if slave not present * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found * EC_E_ADO_NOT_SUPPORTED if the slave does not support requesting ID mechanism ### SetSlaveDisabled  (*bFixedAddressing*,  *wSlaveAddress*,  *bDisabled*) Enable or disable a specific slave. The EtherCAT state of disabled slaves cannot be set higher than PREOP. If the state is higher than PREOP at the time this function is called the state will be automatically changed to PREOP. The information about the last requested state is lost and is set to PREOP too. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param bDisabled:** EC_TRUE: Disable slave, EC_FALSE: Enable slave * **Return:** EC_E_NOERROR or error code ### SetSlavesDisabled  (*bFixedAddressing*,  *wSlaveAddress*,  *eSlaveSelection*,  *bDisabled*) Enable or disable a specific group of slaves. The EtherCAT state of disabled slaves cannot be set higher than PREOP. If the state is higher than PREOP at the time this function is called, the state will be automatically change to PREOP. The information about the last requested state is lost and is set to PREOP too. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param eSlaveSelection:** Slave selection criteria for following slaves * **Param bDisabled:** EC_TRUE: Disable slaves, EC_FALSE: Enable slaves * **Return:** EC_E_NOERROR or error code ### SetSlaveDisconnected  (*bFixedAddressing*,  *wSlaveAddress*,  *bDisconnected*) Mark specific slave for connection or disconnection. The EtherCAT state of disconnected slaves cannot be set higher than INIT. If the state is higher than INIT at the time this function is called, the state will be automatically changed to INIT. The information about the last requested state is lost and is set to INIT too. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param bDisconnected:** EC_TRUE: Mark slave for disconnection, EC_FALSE: Mark slave for (re-)connection * **Return:** EC_E_NOERROR or error code ### SetSlavesDisconnected  (*bFixedAddressing*,  *wSlaveAddress*,  *eSlaveSelection*,  *bDisconnected*) Mark a specific group of slaves for connection or disconnection. * **Param bFixedAddressing:** EC_TRUE: use station address, EC_FALSE: use AutoInc address * **Param wSlaveAddress:** Slave address according bFixedAddressing * **Param eSlaveSelection:** Slave selection criteria * **Param bDisconnected:** EC_TRUE: mark slaves for disconnection, EC_FALSE: mark slaves for connection * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found ### GetMemoryUsage (*out*  *pdwCurrentUsage*, *out*  *pdwMaxUsage*) Returns information about memory usage. All calls to malloc/free and new/delete are monitored. * **Param pdwCurrentUsage:** Current memory usage in Bytes at the time where this function is called * **Param pdwMaxUsage:** Maximum memory usage in Bytes since initialization at the time where this function is called * **Return:** EC_E_NOERROR or error code ### GetSlaveStatistics  (*dwSlaveId*, *out*  *pSlaveStatisticsDesc*) Get Slave’s statistics counter. * **Param dwSlaveId:** Slave id * **Param pSlaveStatisticsDesc:** Pointer to structure EC_T_SLVSTATISTICS_DESC * **Return:** EC_E_NOERROR or error code ### ClearSlaveStatistics  (*dwSlaveId*) Clears all error registers of a slave. * **Param dwSlaveId:** Slave Id, INVALID_SLAVE_ID clears all slaves * **Return:** EC_E_NOERROR or error code ### GetMasterSyncUnitInfoNumOf () Get number of Master Sync Units info entries. * **Return:** Number of Master Sync Units info entries ### GetMasterSyncUnitInfo  (*wMsuId*, *out*  *pMsuInfo*) Get number of Master Sync Units info entries. * **Param wMsuId:** * **Param pMsuInfo:** * **Return:** Number of Master Sync Units info entries ### GetMasterDump ([] *pbyBuffer*,  *dwBufferSize*, *out*  *pdwDumpSize*) The dump contains relevant information about the master and slave status. The dump is only intended for internal troubleshooting at acontis. Amongst others it contains the following descriptors: * EC_T_INIT_MASTER_PARMS * EC_T_BUS_DIAGNOSIS_INFO * EC_T_MAILBOX_STATISTICS * EC_T_CFG_SLAVE_INFO * EC_T_BUS_SLAVE_INFO * EC_T_SLVSTATISTICS_DESC The buffer is written until all relevant data have been dumped or the buffer size has been exceeded. * **Param pbyBuffer:** Preallocated buffer to dump log data * **Param dwBufferSize:** Size of preallocated buffer * **Param pdwDumpSize:** Size of master dump * **Return:** * EC_E_NOERROR * EC_E_NOMEMORY if buffer too small ### BadConnectionsDetect  (*bRefreshSlaveStatistics*,  *dwTimeout*) Detects bad connections. Analyzes the slave ESC error counters: * Invalid Frame Counter (0x0300), * RX Error Counter (0x0301), * Lost Link Counter (0x0310), whether there is a problem in the area PHY - connector - cable - connector - PHY. If one of the above error counters shows a value not equal to zero, an EC_NOTIFY_BAD_CONNECTION is generated, which contains the exact position of the faulty connection. * **Param bRefreshSlaveStatistics:** * **Param dwTimeout:** Timeout [ms]. not be EC_NOWAIT! * **Return:** EC_E_NOERROR or error code ### SelfTestScan  (*pParms*) Self test scan. Send a burst of numerous frames and analyze the slave connections. After deactivating the job task, frames will be sent as fast as the LinkLayer can send them. The size of the frames increases and decreases between the defined limits. Dependent on the parameters the BadConnectionsDetect API will analyze the slave connections. * **Param pParms:** Self-test scan parameters * **Return:** * EC_E_NOERROR if successful * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized * EC_E_INVALIDPARM if dwInstanceID is out of range or pParms is NULL or contains values out of range * EC_E_BAD_CONNECTION if bad connection was detected * EC_E_FRAME_LOST if frame(s) lost during self-test * EC_E_NOTSUPPORTED if not in polling mode * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive ### LinkInputVarByName  (*szVarName*,  *pLinkVarInfo*) Link application variable to input process image. Input process variable is given by its name. * **Param szVarName:** Name of variable * **Param pLinkVarInfo:** Information about linked variable * **Return:** EC_E_NOERROR or an error code ### LinkInputVarByObject  (*bFixedAddressing*,  *wSlaveAddress*,  *wIndex*,  *wSubIndex*,  *pLinkVarInfo*) Link application variable to input process image. Input process variable is given by its object index and subindex of a specific slave. * **Param bFixedAddressing:** Use station address if EC_TRUE. Otherwise use AutoInc address. * **Param wSlaveAddress:** Slave address according to bFixedAddressing * **Param wIndex:** Object index * **Param wSubIndex:** Object subindex * **Param pLinkVarInfo:** Information about linked variable * **Return:** EC_E_NOERROR or an error code ### LinkOutputVarByName  (*szVarName*,  *pLinkVarInfo*) Link application variable to output process image. Output process variable is given by its name. * **Param szVarName:** Name of variable * **Param pLinkVarInfo:** Information about linked variable * **Return:** EC_E_NOERROR or an error code ### LinkOutputVarByObject  (*bFixedAddressing*,  *wSlaveAddress*,  *wIndex*,  *wSubIndex*,  *pLinkVarInfo*) Link application variable to output process image. Output process variable is given by its object index and subindex of a specific slave. * **Param bFixedAddressing:** Use station address if EC_TRUE. Otherwise use AutoInc address. * **Param wSlaveAddress:** Slave address according to bFixedAddressing * **Param wIndex:** Object index * **Param wSubIndex:** Object subindex * **Param pLinkVarInfo:** Information about linked variable * **Return:** EC_E_NOERROR or an error code ### EoeSendFrame  (*wCfgFixedAddress*, [] *pbyFrame*,  *dwFrameLen*) Send EoE frame (queued) * **Param wCfgFixedAddress:** * **Param pbyFrame:** * **Param dwFrameLen:** * **Return:** \_ #EC_E_NOERROR or error code ### Properties ### s_EC_VERSION { *get; set;* } EC_VERSION. summary>ATECAT_SIGNATURE ### s_ATECAT_SIGNATURE { *get; set;* } summary>INVALID_SLAVE_ID ### s_INVALID_SLAVE_ID { *get; set;* } summary>MASTER_SLAVE_ID ### s_MASTER_SLAVE_ID { *get; set;* } summary>MAX_NUMOF_MASTER_INSTANCES ### s_MAX_NUMOF_MASTER_INSTANCES { *get; set;* } summary>MASTER_RED_SLAVE_ID ### s_MASTER_RED_SLAVE_ID { *get; set;* } summary>EL9010_SLAVE_ID ### s_EL9010_SLAVE_ID { *get; set;* } summary>FRAMELOSS_SLAVE_ID ### s_FRAMELOSS_SLAVE_ID { *get; set;* } summary>JUNCTION_RED_FLAG ### Events ### *event*  OnEcNotification summary> Occurs when a application notification is raised. ### *event*  OnAppNotification summary> Occurs when a RAS notification is raised. ### *event*  OnRasNotification summary> Occurs when a translate notification is raised. ### *event*  OnTranslateNotification summary> Occurs when a performance monitoring notification is raised. ### *event*  OnPerfNotification summary> Occurs when a debug message notification is raised. ### Public Static Functions ### IsRemoteServerUp ([] *abyIpAddr*,  *wPort*) Checks if remote server is up by sending a “ping”. * **Param abyIpAddr:** IPAddress * **Param wPort:** Port * **Return:** true, if server is up, else false if server is down ### CopyStream  (*source*,  *target*) Copy a stream. * **Param source:** Source. * **Param target:** Target. ### CreateObjectFromBytes ([] *bytes*, *ref*  *obj*) Creates object from byte array. * **Param bytes:** Object data as byte array * **Param obj:** Object which should be filled * **Return:** Error code ### GetSizeOfObject  (*obj*, *out*  *size*) Get byte size of object (as required from CoeSdoUpload) * **Param obj:** Object * **Param size:** Byte size of object * **Return:** Error code ### GetBitLenOfDataType  (*type*) Get bit length of data type. * **Param type:** Data type * **Return:** Bit length ### RunUnitTest  (*cmd*,  *data*) Run unit test (for internal use) * **Param cmd:** Command * **Param data:** Input data * **Return:** Output data ### ConvValueToBytes  (*type*,  *value*, *out* [] *bytes*) Converts value to bytes. * **Param type:** Data type * **Param value:** Value * **Param bytes:** Bytes * **Return:** Error code ### ConvValueFromBytes ([] *bytes*,  *type*, *out*  *value*) Converts value from bytes. * **Param bytes:** Bytes * **Param type:** Data type * **Param value:** Value * **Return:** Error code ### ReadValueFromBytes ([] *bytes*,  *bitOffset*,  *bitLength*,  *type*, *out*  *value*) Read value from bytes. * **Param bytes:** Bytes * **Param bitOffset:** Bit offset * **Param bitLength:** Bit length * **Param type:** Data type * **Param value:** Value * **Return:** Error code ### ReadValueFromAddress  (*address*,  *bitOffset*,  *bitLength*,  *type*, *out*  *value*) Read value from address. * **Param address:** Address * **Param bitOffset:** Bit offset * **Param bitLength:** Bit length * **Param type:** Data type * **Param value:** Value * **Return:** Error code ### WriteValueToBytes ([] *bytes*,  *bitOffset*,  *bitLength*,  *type*,  *value*) Write value to bytes. * **Param bytes:** Bytes * **Param bitOffset:** Bit offset * **Param bitLength:** Bit length * **Param type:** Data type * **Param value:** Value * **Return:** Error code ### WriteValueToAddress  (*address*,  *bitOffset*,  *bitLength*,  *type*,  *value*) Write value to address. * **Param address:** Address * **Param bitOffset:** Bit offset * **Param bitLength:** Bit length * **Param type:** Data type * **Param value:** Value * **Return:** Error code ### ConvValueFromString  (*type*,  *value*) Converts value from string. * **Param type:** Type * **Param value:** Value * **Return:** Value as object ### ConvValueToString  (*type*,  *value*) Converts value to string. * **Param type:** Type * **Param value:** Value * **Return:** Value as string ### ConvStringFromByteArray ([] *data*) Converts byte array to string (e.g. 01 02) * **Param data:** Data * **Return:** Data as string ### [] ConvStringToByteArray  (*data*) Converts byte array from string (e.g. 01 02) * **Param data:** Data * **Return:** Data as byte array ### ReadPdBitsFromAddress  (*address*,  *bitOffset*,  *bitLength*, *out* [] *pdBits*) Reads process data bits from address. * **Param address:** Address * **Param bitOffset:** Bit offset * **Param bitLength:** Bit length * **Param pdBits:** [out] Process data bits ### WritePdBitsToAddress  (*address*,  *bitOffset*,  *bitLength*, [] *pdBits*) Writes process data bits to address. * **Param address:** Address * **Param bitOffset:** Bit offset * **Param bitLength:** Bit length * **Param pdBits:** Process data bits ### ReadPdBitsFromBytes ([] *bytes*,  *bitOffset*,  *bitLength*, *out* [] *pdBits*) Reads process data bits from bytes. * **Param bytes:** Bytes * **Param bitOffset:** Bit offset * **Param bitLength:** Bit length * **Param pdBits:** [out] Process data bits ### WritePdBitsToBytes ([] *bytes*,  *bitOffset*,  *bitLength*, [] *pdBits*) Writes process data bits to bytes. * **Param bytes:** Bytes * **Param bitOffset:** Bit offset * **Param bitLength:** Bit length * **Param pdBits:** Process data bits ### ReadPdBytesFromAddress  (*address*,  *offset*,  *length*, *out* [] *pdBytes*) Reads process data bytes from address. * **Param address:** Address * **Param offset:** Offset * **Param length:** Length * **Param pdBytes:** [out] Process data bytes ### WritePdBytesToAddress  (*address*,  *offset*, [] *pdBytes*) Writes process data bytes to address. * **Param address:** Address * **Param offset:** Offset * **Param pdBytes:** Process data bytes ### ReadPdBytesFromBytes ([] *bytes*,  *offset*,  *length*, *out* [] *pdBytes*) Reads process data bytes from bytes. * **Param bytes:** Bytes * **Param offset:** Offset * **Param length:** Length * **Param pdBytes:** [out] Process data bytes ### WritePdBytesToBytes ([] *bytes*,  *offset*, [] *pdBytes*) Writes process data bytes to bytes. * **Param bytes:** Bytes * **Param offset:** Offset * **Param pdBytes:** Process data bytes ### Public Static Attributes ### EnableExceptionHandling = false Enables exception handling (functions will throw an exception instead of returning an error code)