Array of Timers
Question:
In EcoStruxure Control Expert, can I directly create an ARRAY of TON or TOF timer function blocks? For example, can I declare multiple timers as an array and access them by index in FBD?
Answer:
No. In EcoStruxure Control Expert, TON and TOF are function blocks, not basic data types. Therefore, Control Expert does not support directly declaring an ARRAY of TON or TOF function blocks.
The supported workaround is to create a Derived Data Type (DDT) that contains one TON or TOF instance, then declare an array using that DDT.
Example approach:
1. Create a DDT that contains one timer instance, such as a TON or TOF.
2. Create a TON timer instance in the FB variables.
Example: `TimerDes`
3. Under DDT Types, define the timer structure and add the required TON-related members.
4. Create an array variable using the timer DDT.
Example: `Timebank` as an array of the timer DDT type.
5. In the FBD section, insert the TON function block and connect the indexed array members to the timer inputs and outputs
This allows multiple timer instances to be managed in an indexed structure while staying within the supported Control Expert programming model.
Note:
This is a Control Expert limitation. Other PLC programming platforms may allow timer arrays differently, but in Control Expert the DDT-based method is the supported approach.