MCP3008 (FB) ¶ FUNCTION_BLOCK MCP3008 EXTENDS spi InOut: Scope Name Type Output auiValue ARRAY [0..7] OF UINT Methods: AfterReadInputs BeforeWriteOutputs Initialize Structure: connector AfterReadInputs (Method) BeforeWriteOutputs (Method) Initialize (Method)
connector ¶ AfterReadInputs (Method) BeforeWriteOutputs (Method) Initialize (Method)
SharedPointer ¶ Function Blocks SharedPointer (FunctionBlock) IInstance Dispose (Method) ISharedArea AreaCurrentCapacity (Property) AreaIncreaseCapacity (Method) AreaSetObserver (Method) ISharedPointer AtomicCompareAndSwap (Method) AtomicCopyFrom (Method) AtomicGetPointerData (Method) AtomicIsEqualTo (Method) AtomicSetPointerAddress (Method) SharedPointerFactoryArgs (FunctionBlock) SharedPointerFactoryBase (FunctionBlock) Create (Method) prvInstCount (Property) prvInstSize (Property) Interfaces ISharedPointer (Interface) AtomicCompareAndSwap (Method) AtomicCopyFrom (Method) AtomicGetPointerData (Method) AtomicIsEqualTo (Method) AtomicSetPointerAddress (Method)
MCP3008.AfterReadInputs (METH) ¶ METHOD AfterReadInputs : INT InOut: Scope Name Type Return AfterReadInputs INT
MCP3008.BeforeWriteOutputs (METH) ¶ METHOD BeforeWriteOutputs : INT InOut: Scope Name Type Return BeforeWriteOutputs INT
MCP3008.Initialize (METH) ¶ METHOD Initialize : UDINT InOut: Scope Name Type Return Initialize UDINT Input wModuleType UINT dwInstance UDINT pConnector POINTER TO IoConfigConnector
Function Blocks ¶ SharedPointer (FunctionBlock) IInstance Dispose (Method) ISharedArea AreaCurrentCapacity (Property) AreaIncreaseCapacity (Method) AreaSetObserver (Method) ISharedPointer AtomicCompareAndSwap (Method) AtomicCopyFrom (Method) AtomicGetPointerData (Method) AtomicIsEqualTo (Method) AtomicSetPointerAddress (Method) SharedPointerFactoryArgs (FunctionBlock) SharedPointerFactoryBase (FunctionBlock) Create (Method) prvInstCount (Property) prvInstSize (Property)
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 25.10.2023, 14:08:49 companyName string 3S-Smart Software Solutions GmbH libraryFile Raspberry SPI MCP3008.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile Raspberry SPI MCP3008.clean.json version version 2.0.0.0 ProjectInformation Released bool True LastModificationDateTime date 25.10.2023, 14:08:47 LibraryCategories library-category-list Target Author string 3S - Smart Software Solutions GmbH Company 3S - Smart Software Solutions GmbH CompiledLibraryCompatibilityVersion CODESYS V3.5 SP16 DefaultNamespace MCP3008 Description See: Description Placeholder SPI MCP3008 Project Raspberry SPI MCP3008 Title Raspberry SPI MCP3008 Version version 4.10.0.0
Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. CAA Types Extern ¶ Library Identification ¶ Placeholder: CAA Types Default Resolution: CAA Types Extern, * (CAA Technical Workgroup) Namespace: CAA Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: True SystemLibrary: False Key: CAA Types 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) IoDriver Interfaces ¶ Library Identification ¶ Name: IoDriver Interfaces Version: newest Company: System Namespace: IoDriver_Interfaces Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: IoDriver Interfaces, * (System) IoDriver Parameter Interfaces ¶ Library Identification ¶ Name: IoDriver Parameter Interfaces Version: newest Company: System Namespace: IIoDrvParameter Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: IoDriver Parameter Interfaces, * (System) IoDrvBase ¶ Library Identification ¶ Placeholder: IoDrvBase Default Resolution: IoDrvBase, * (System) Namespace: IoDrvBase Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: IoDrvBase IoStandard ¶ Library Identification ¶ Placeholder: IoStandard Default Resolution: IoStandard, * (System) Namespace: IoStandard Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: IoStandard Raspberry Pi Peripherals ¶ Library Identification ¶ Placeholder: Raspberry Pi Peripherals Default Resolution: Raspberry Pi Peripherals, * (CODESYS) Namespace: RasPi Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: Raspberry Pi Peripherals Standard ¶ Library Identification ¶ Placeholder: Standard Default Resolution: Standard, * (System) Namespace: Standard Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: Standard 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)
SharedPointer (FB) ¶ FUNCTION_BLOCK PUBLIC FINAL SharedPointer EXTENDS FBF.InstanceBase IMPLEMENTS ISharedPointer , ISharedArea Models a reference to a memory location that can be consistently shared by tasks on different cores. The size of the memory location is 32 bit or 64 bit wide (see: __XWORD ). This depends on the architecture of the processor and the settings of the code generator. This kind of pointer implements additionally an modification counter and this will be modified with any change of the pointer address. With this the so called ABA problem will be avoided. In multi tasking/core environment, the ABA problem occurs during synchronization, when a memory location is read twice, has the same value for both reads, and “value is the same” is used to indicate “nothing has changed”. However, another task can execute between the two reads and change the value, do other work, then change the value back, thus fooling the first task into thinking “nothing has changed” even though the second thread did work that violates that assumption. InOut: Scope Name Type Comment Input Const pAddress __XWORD The initial memory location, this pointer should pointing to Properties: AreaCurrentCapacity Methods: AreaIncreaseCapacity AreaSetObserver AtomicCompareAndSwap AtomicCopyFrom AtomicGetPointerData AtomicIsEqualTo AtomicSetPointerAddress Dispose Structure: IInstance Dispose (Method) ISharedArea AreaCurrentCapacity (Property) AreaIncreaseCapacity (Method) AreaSetObserver (Method) ISharedPointer AtomicCompareAndSwap (Method) AtomicCopyFrom (Method) AtomicGetPointerData (Method) AtomicIsEqualTo (Method) AtomicSetPointerAddress (Method)