SysCpuTestAndSet (FUN) ¶ FUNCTION SysCpuTestAndSet : RTS_IEC_RESULT <description> Test and set a bit in an ULONG variable in one processor step. This operation is to provide a multitasking save operation. </description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library). ERR_OK: If bit could be set and was set before, ERR_FAILED: If bit is still set </p></result> InOut: Scope Name Type Comment Return SysCpuTestAndSet RTS_IEC_RESULT Input pulValue POINTER TO UDINT <param name=”pulValue” type=”IN”>Pointer to the unsigned value to test and set a bit inside in one atomic processor step</param> ulBit UDINT <param name=”ulBit” type=”IN”>Bit number inside the variable to test and set. 0=first bit, 31=last bit</param>
SysCpuTestAndSetBit (FUN) ¶ FUNCTION SysCpuTestAndSetBit : RTS_IEC_RESULT <description> <p>The function test and set or clear a bit in a variable in one processor step. This operation must be atomic to provide a multitasking save operation.</p> <p>IMPLEMENTATION NOTE: Try to use a processor opcode, that provides this operation. If such an opcode is not available, use SysCpuTestAndSetBitBase in your platform adaptation.</p> </description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p> <ul> <li>ERR_OK: bSet=1: If bit could be set and was not set before bSet=0: If bit could be cleared and was set before</li> <li>ERR_FAILED: bSet=1: If bit is still set bSet=0: If bit is still cleared</li> <li>ERR_PARAMETER: If pAddress=NULL or pAddress is unaligned or iBit is out nSize range</li> <li>ERR_NOT_SUPPORTED: If function is not available because of missing components (e.g. SysInt for locking bit access)</li> <li>ERR_NOTIMPLEMENTED: If function is not implemented on this platform</li> </ul> </result> <SIL2/> InOut: Scope Name Type Comment Return SysCpuTestAndSetBit RTS_IEC_RESULT Input pAddress POINTER TO BYTE <param name=”pAddress” type=”IN”>Pointer to test and set or clear a bit inside in one atomic processor step. NOTE: The pointer must be natural aligned! nLen=2: pAddress must be 2Byte aligned; nLen=4: pAddress must be 4Byte aligned</param> nLen UDINT <param name=”nLen” type=”IN”>Size of the value behind the address. Can only be 1 (unsigned char), 2 (unsigned short) or 4 (unsigned long)</param> iBit DINT <param name=”iBit” type=”IN”>Bit number inside the variable to test and set or clear: <ul> <li>nLen = 1: iBit 0..7</li> <li>nLen = 2: iBit 0..15</li> <li>nLen = 4: iBit 0..31</li> </ul> </param> bSet DINT <param name=”bSet” type=”IN”>1=Set bit, 0=Clear bit</param>
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 20.04.2021, 16:01:57 companyName string 3S-Smart Software Solutions GmbH libraryFile SysCpuHandling.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile SysCpuHandling.clean.json version version 2.0.0.0 ProjectInformation LinkInSimulation bool True Released True LastModificationDateTime date 20.04.2021, 16:01:57 LibraryCategories library-category-list System|SysLibs Author string 3S - Smart Software Solutions GmbH Company System CompiledLibraryCompatibilityVersion CODESYS V3.5 SP15 Patch 4 Description See: Description Placeholder SysCpuHandling Project SysCpuHandling Title SysCpuHandling Version version 3.5.17.0
Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. CmpErrors2 Interfaces ¶ Library Identification ¶ Name: CmpErrors2 Interfaces Version: newest Company: System Namespace: CmpErrors Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CmpErrors2 Interfaces, * (System) SysMem ¶ Library Identification ¶ Placeholder: SysMem Default Resolution: SysMem, * (System) Namespace: SysMem Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysMem SysTypes2 Interfaces ¶ Library Identification ¶ Name: SysTypes2 Interfaces Version: newest Company: System Namespace: SysTypes Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysTypes2 Interfaces, * (System)
SysCpuMultiCore Library Documentation ¶ Company System Title SysCpuMultiCore Version 3.5.17.0 Categories System|SysLibs Author 3S - Smart Software Solutions GmbH Placeholder SysCpuMultiCore Description 1 ¶ This library provides access to information of multi core plattforms. Contents: ¶ CpuCoreBindingDesc (Struct) CpuCoreBits (Union) SysMCBDAlloc (Function) SysMCBDCount (Function) SysMCBDFree (Function) SysMCBDGetFirstID (Function) SysMCBDGetNextID (Function) SysMCBDIsSet (Function) SysMCGetLoad (Function) SysMCGetNumOfCores (Function) SysMCGetProcessBinding (Function) SysMCGetTaskBinding (Function) Indices and tables ¶ 1 Based on SysCpuMultiCore.library, last modified 20.04.2021, 16:02:05. LibDoc 4.4.0.0-b.27 The content file SysCpuMultiCore.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 20.04.2021, 16:02:05.
CpuCoreBindingDesc (STRUCT) ¶ TYPE CpuCoreBindingDesc : STRUCT InOut: Name Type nNumOfCores UDINT cores CpuCoreBits
CpuCoreBits (UNION) ¶ TYPE CpuCoreBits : UNION InOut: Name Type ulCoreBits XWORD pulCoreBits POINTER TO XWORD
SysDirGetCurrent (FUN) ¶ FUNCTION SysDirGetCurrent : RTS_IEC_RESULT Get current working directory for IEC file access InOut: Scope Name Type Comment Return SysDirGetCurrent RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors_Itf.library) Inout szDir STRING OUT_PARAMETER: Name of current directory Input diMaxDirLen DINT Max lenght of directory buffer
SysDirOpen (FUN) ¶ FUNCTION SysDirOpen : RTS_IEC_HANDLE Opens a specified directory and returns a handle and the first directory entry. szDirEntry is expected to provide enough space to write the direcory entry to. In case szDirEntry is 0, the first directory entry may be retrieved with SysDirRead. InOut: Scope Name Type Comment Return SysDirOpen RTS_IEC_HANDLE Returns the runtime system error code (see CmpErrors.library) Input szDir REFERENCE TO STRING Name of directory. Note Empty string (‘’) is the request for the current working directory. szDirEntry REFERENCE TO STRING OUT_PARAMETER, optional: Directory entry as string, may be 0 diMaxDirEntry DINT OUT_PARAMETER, optional: Max number of bytes to write in pszDirEntry pDirInfo POINTER TO DirInfo OUT_PARAMETER, optional: Directory information, may be 0 pResult POINTER TO RTS_IEC_RESULT OUT_PARAMETER: Pointer to runtime system error code (see CmpErrors.library)
SysDirRead (FUN) ¶ FUNCTION SysDirRead : RTS_IEC_RESULT Read next directory entry. Writes the entry in pszDirEntry. InOut: Scope Name Type Comment Return SysDirRead RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library) ERR_OK: Entry could be read ERR_END_OF_OBJECT: If end of directory list was reached ERR_PARAMETER: If one of the parameters is invalid ERR_BUFFERSIZE: If iMaxDirEntry is too short to get the complete directory entry string Note Typically after error ERR_BUFFERSIZE , the dir-handle is set to the next entry, so this entry will be missed! Input hDir RTS_IEC_HANDLE Handle to directory opened with SysDirOpen Inout szDirEntry STRING OUT_PARAMETER: Directory entry as string Input diMaxDirEntry DINT OUT_PARAMETER: Max number of bytes to write in pszDirEntry pDirInfo POINTER TO DirInfo OUT_PARAMETER: Directory information NOTE: Can be 0 (so only directory name is provided in pszDirEntry)