Download project

Element Collections Examples

"Element Collections Examples" is a sample project for using the library "Element Collections".

Product description

The CODESYS library "Element Collections" contains function blocks for lists, queues, stacks, and hash tables.
The elements of collections are instances of function blocks of type IElement.
The sample project "Element Collections Examples" demonstrates how to use individual components.

More information

The sample project includes the following applications:

Example of creating instances of type IElement. IElement is the basic interface of all elements of a collection.

Example of linked lists that are safe from an online change.

Example of how to use the HashTable function block.

Example of how to use the LinkedList function block. The LinkedList function block does not have index access and it can be extended dynamically.

Example of how to use the List function block. The List function block has methods with index access to the following elements: GetElementAt, InsertElementAt, RemoveElementAt, and SetElementAt.

Example of how to use the Queue function block. The Queue function block works according to the FIFO principle (first in, first out).

Example of how to use the SortedList function block. The elements of a SortedList are sorted by the ElementCompareTo method of IElement.

Example of how to use the Stack function block. The Stack function block works according to the LIFO principle (last in, first out).

Example of how to use the TreeNode function block. With the TreeNode function block, tree structures can be built

Example for using the function module ListFactory. You can use the function module ListFactory to create lists at runtime. These lists can be parameterized with a fixed size and also with an initial size with growth factor. The example demonstrates the general handling of a collection factory. The QueueFactory, SortedListFactory, StackFactory and TreeNodeFactory work according to the same pattern.

System requirements and restrictions

System requirements and restrictions Info
Programming System CODESYS Development System Version or higher
Runtime System CODESYS Control Version
Required Accessories -