Equipment modules provide supervising control for a collection of control modules. There are seven types of algorithms that can be used to define the logic for an equipment module class. The most commonly used are the state-driven algorithm and the command-driven algorithm.
State-driven algorithms are typically used when a single step or value is all that is needed to manipulate the control modules. It is best used for simple equipment manipulation that does not involve complex timing relationships (such as changing the setpoints on a group of valves and motors).
Command-driven algorithms are used when multiple steps or commands are needed to supervise the control modules and there may be timing relationships to be considered (for example, one step must be completed before another can be started). With command-driven algorithms, the logic is written in the form of sequential function charts (SFCs), and the user has full control over how the logic is carried out. A command-driven algorithm selects one of a number of command sub-blocks to run, based on the value written to a command parameter (A_COMMAND). The command parameter is of the type named set, so the values that it can take are defined by a named set. The named set should have states for each of the possible commands, plus a mandatory entry with value 255, which represents an undefined/idle condition.
Several control module classes were imported as part of the Startup.fhx file. Some of these will be incorporated into the following two equipment module classes, which will be created in this chapter:
The TOTALIZER equipment module class will be used to create the EM_TOTAL_100 (and 200 and 300) equipment modules that will be part of the unit modules named UM_COLOR_100 (and 200 and 300). The BLENDER_OUTLET equipment module class will be used to create the EM_OUTLET_500 (and 600) equipment modules that will be part of the UM_BLEND_500 (and 600) unit modules.