Copyright VirtualSim 2004-2020 - All rights reserved
Sub-banding
Quite often, inside a component runtime, some checks do not need to be carried out at the component base rate. For example, checking the temperature of an engine component running at 30hz can be done every second or two.
A sub-band can only by a division of the base component frequency. If the component is running at 30hz, a sub-band can run at 15hz or 7hz, etc
The following example shows how to call a function, from the Runtime part of the component, at 2hz.
Declaration:
double sb_check; // to be set to 0 in the INIT part
Runtime:
sb_check += cycleT(); // cycleT() = theoritical time in second between two calls of the component runtime