FB_MdCollection
The class can store a collection of components of a class type. When attaching the class to FB_BaseRuntime
, components of objects implementing the interface I_AttachableMdInterface
can be collected and attached to the collection.
Time of filling If the collection is operated as a participant of the FB_BaseRuntime, this is filled after the ParamInit but before the machine data is loaded. Accordingly, all elements that are attached to the runtime at the time of the successful ParamInit are checked for transfer to the collection. |
Syntax:
FUNCTION_BLOCK FB_MdCollection EXTENDS FB_Base
Properties
Name | Type | Access | Initial value | Description |
---|---|---|---|---|
Name | STRING | Get, Set | <SourceName> | Specifies the name of the class instance. |
FB_MdCollection | ||||
MachineData | Get | <Local> | Interface to the internal machine data container | |
FB_Base | ||||
BaseState | Get | eNotHandled | Initialization state of the class instance. | |
Error | BOOL | Get | FALSE | Class is in an error state. |
ResultMessage | Get | - | Access to the class-internal EventLogger. | |
[ | STRING | Get | <SourceName> |
|
Methods
Name | Description |
---|---|
Reset() | Resets the error state of the class. |
FB_MdCollection | |
AddComponent( | Adds a component to the collection:
Refuses components that do not match the prototype. |
[ | Returns an ID used among the supported types. |
SetPrototype( | Fixes the type of the component to be collected by the runtime. |
FB_Base | |
SetHMI( | General assignment method for an FB_BaseHmi extending class. |
[ | Extracts the first part of the instance path as an object namespace. |
[ | Extracts the last part of the instance path as the object name. |
Interfaces
Type | Description |
---|---|
I_Base | Standard interface on FB_Base. |
I_MdCollection | Standard interface on FB_MdCollection |
I_OneTaskInterface | Runtime interface for a PLC task |
I_BaseEmpty | For extension without standard interface. |
I_BaseDev | Covers all methods and properties of the base class. |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1.4024.42 | PC or CX (x64, x86) | Tc3_PlasticBaseApplication (>= v3.12.6.0) |