PackML is a state machine specification that is tailored for automation industry. States that are defined in this spec make sense for a machine or a production line. In PackML, the state changes follow certain rules that must be enforced by the software implementation. For instance, when a machine first started, it is in undefined state and you can only go to either stop or reset states. No other state is allowed at this point. For machine to change state, it must be approved by all participating components. The figure on left could be examined for state change rules. Black arrows and text next to it represent the PackML commands (except sc – state controller). Boxes with text represent the machine states.
Chameleon encapsulates all these rules in a simple to use PLC library. Each state is represented by an override function where it can be customized by custom objects defined in the PLC. These objects represent physical components in your machine such as “Heat”, “Pressure”, “Pump” etc. For instance, if the machine is in an idle mode and operator would like to start the machine, each object must approve the switch to “Execute” mode. This will give each object perform sanity check such as safety validation.
Most of the customization in Chameleon will end up here, in Packml part of the framework. Every machine is unique with its own components list. As such, programmers create an object for each component. As components turned into Chameleon objects and plugged into the framework, they start taking advantage of what the framework offers. Objects become visible on HMI, their states are saved into a log file during run, they could be displayed in a chart etc.