Task_Desc (STRUCT) ¶ TYPE Task_Desc : STRUCT OBSOLETE struct, please use Task_Desc2 instead InOut: Name Type udiId UDINT udiDebuggingActiveInCycle UDINT hSlotPOUPool RTS_IEC_HANDLE hIecTask RTS_IEC_HANDLE hSched RTS_IEC_HANDLE pApp POINTER TO APPLICATION pInfo POINTER TO Task_Info
Task_Desc2 (STRUCT) ¶ TYPE Task_Desc2 : STRUCT InOut: Name Type udiId UDINT udiDebuggingActiveInCycle UDINT hSlotPOUPool RTS_IEC_HANDLE hIecTask RTS_IEC_HANDLE hSched RTS_IEC_HANDLE pApp POINTER TO APPLICATION pInfo POINTER TO Task_Info2
Task_Info2 (STRUCT) ¶ TYPE Task_Info2 : STRUCT Task information out of the task configuration Task configuration menbers which are used with IecTaskCreate are marked with [c], status members are marked with [s]. Note for SIL2: This information is already inside of the data area, so we don’t need to tag it as safe anywhere. InOut: Name Type Comment dwVersion DWORD [c] Version of the structure (2) pszName POINTER TO STRING [c] Name of the task, mandatory nPriority INT [c] IEC priority of the task (0..31) KindOfTask INT [c] Kind of task. See corresponding category TaskType . bWatchdog BOOL [c] Is TRUE, if watchdog is enabled bProfiling BOOL [c] Is TRUE, if profiling is enabled (not used, FALSE recommended) dwEventFunctionPointer POINTER TO BYTE [c] Function pointer to the event check routine, see IecTaskCreate pszExternalEvent POINTER TO STRING [c] Name of the event, if it is an external event task dwTaskEntryFunctionPointer POINTER TO BYTE [c] Function pointer to the task code, mandatory, see IecTaskCreate dwWatchdogSensitivity DWORD [c] Watchdog sensitivity dwInterval DWORD [c] Interval in microseconds dwWatchdogTime DWORD [c] Watchdog time in microseconds dwCycleTime DWORD [s] Cycle time in microseconds (last execution time) dwAverageCycleTime DWORD [s] Average cycle time in microseconds dwMaxCycleTime DWORD [s] Maximum cycle time in microseconds dwMinCycleTime DWORD [s] Minumum cycle time in microseconds iJitter DINT [s] Jitter in microseconds iJitterMin DINT [s] Minimal jitter iJitterMax DINT [s] Maximal jitter dwCycleCount DWORD [s] Cycle counter iState WORD [s] Task state. See category TaskState. wNumOfJitterDistributions WORD [s] Number jitter statistical distribution entries pJitterDistribution POINTER TO Jitter_Distribution [s] Statistical jitter distribution entries bTimeSlicing BOOL [s] Timeslicing enabled byDummy BYTE wDummy WORD dwIECCycleCount DWORD [s] Cycle counter for execution of user code
Task_WatchdogHitCount (STRUCT) ¶ TYPE Task_WatchdogHitCount : STRUCT Watchdog hit count information InOut: Name Type Comment dwConsecutiveMax DWORD Maximum value of contiguous watchdog timeouts. = The longest period of contiguous watchdog timeouts that has occurred. dwTotal DWORD Total number of all watchdog timeouts.
Timeout (GVL) ¶ InOut: Scope Name Type Initial Constant RTS_TIMEOUT_INFINITE DINT -1 RTS_TIMEOUT_DEFAULT DINT -2 RTS_TIMEOUT_NO_WAIT DINT 0
Version (GVL) ¶ InOut: Name Type Initial CMPIECTASK_VERSION_3_4_4_0 DWORD 16#3040400
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 18.09.2024, 16:35:18 companyName string 3S-Smart Software Solutions GmbH libraryFile CmpIecTask.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile CmpIecTask.clean.json version version 2.0.0.0 ProjectInformation LinkInSimulation bool True Released True LastModificationDateTime date 18.09.2024, 16:35:16 LibraryCategories library-category-list System|SysLibs Author string CODESYS Development GmbH Company System CompiledLibraryCompatibilityVersion CODESYS V3.5 SP15 Patch 2 Description See: Description DocFormat reStructuredText Placeholder CmpIecTask Project CmpIecTask Title CmpIecTask Version version 3.5.20.30
Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. CmpApp ¶ Library Identification ¶ Placeholder: CmpApp Default Resolution: CmpApp, * (System) Namespace: CmpApp Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CmpApp SysTypes2 Interfaces ¶ Library Identification ¶ Name: SysTypes2 Interfaces Version: newest Company: System Namespace: SysTypes_Interfaces Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysTypes2 Interfaces, * (System)
ETC_CO_SdoRead4 (FB) ¶ FUNCTION_BLOCK ETC_CO_SdoRead4 This function block serves to read EtherCAT slave parameters. Unlike ETC_CO_SdoRead, only parameter that are no longer than 4 bytes are supported. The parameters to be read are specified with Index and Subindex, as used in the object directory. InOut: Scope Name Type Initial Comment Input xExecute BOOL Rising edge: ACTION starts Falling edge: Resets outputs If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values (xDone, xError) are present at the outputs for exactly one cycle. xAbort BOOL FALSE TRUE: Action is stopped immediately and all outputs are reset to their initial values. usiCom USINT 1 Index of master 1: first ETC master uiDevice UINT The physical slave address to access the EtherCAT slave usiChannel USINT 1 not used in the moment because channel is set automatically wIndex WORD The index of the CoE object bySubindex BYTE The sub index of the CoE object udiTimeOut UDINT Timeout for operation in ms Output xDone BOOL TRUE: Action successfully completed xBusy BOOL TRUE: Function block active xError BOOL TRUE: Error occurred, function block aborts action, FALSE: No error eError ETC_CO_ERROR If xError is true then eError shows the error reason udiSdoAbort UDINT The abort code as received from the slave device abyData ARRAY [1..4] OF BYTE thje received data usiDataLength USINT Number of bytes successfully read
ETC_CO_SdoReadDWord (FB) ¶ FUNCTION_BLOCK ETC_CO_SdoReadDWord Like ETC_CO_SdoRead4, this function block is for reading EtherCAT slave parameters. However, the data to be read are transferred not as an array, but in a DWORD (dwData). If byte swapping is necessary it is carried out automatically. The read value can thus be reused directly. InOut: Scope Name Type Initial Comment Input xExecute BOOL Rising edge: ACTION starts Falling edge: Resets outputs If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values (xDone, xError) are present at the outputs for exactly one cycle. xAbort BOOL FALSE TRUE: Action is stopped immediately and all outputs are reset to their initial values. usiCom USINT 1 Index of master 1: first ETC master uiDevice UINT The physical slave address to access the EtherCAT slave usiChannel USINT 1 not used in the moment because channel is set automatically wIndex WORD The index of the CoE object bySubindex BYTE The sub index of the CoE object udiTimeOut UDINT Timeout for operation in ms Output xDone BOOL TRUE: Action successfully completed xBusy BOOL TRUE: Function block active xError BOOL TRUE: Error occurred, function block aborts action, FALSE: No error eError ETC_CO_ERROR If xError is true then eError shows the error reason udiSdoAbort UDINT The abort code as received from the slave device dwData DWORD The received data usiDataLength USINT Number of bytes successfully read