SIMULINK/MATLAB hosts PLCTOOLS and is employed to specify and simulate the plant. This is a standard approach used by control engineers. The EDITOR developed with MATLAB 5.3, comprises a RESOUCE EDITOR and FBD EDITOR. Control software, that is FBD models, is specified hierarchically: the RESOURCE EDITOR is used to structure the control software in terms of resources and interconnections among them. The FBD EDITOR is used to specify the behavior of each CPU in terms of FBD (Function Block Diagram) blocks and tasks.
Every resource hosts a set of tasks that comprises a main task, for the main execution cycle of the control, one or more daemon tasks, which represent critical activities with higher priorities than the main task, and zero or more interrupt and execution tasks, which manage external exceptions and triggers respectively.
The internal each tasks are defined through FBD diagrams. FBD blocks which belong to the libraries are plodded in a hierarchical way. Leaf diagrams consist only flat FBD blocks, which correspond to actual computations, while intermediate diagrams contain also hierarchical blocks, which are simple containers for lower level diagrams. The FBD EDTOR associates a window with each FBD diagram. The overall control organization is summarized in a special purpose window called session navigator, where tasks, resources, and hierarchical blocks are presented in a tree-like way.
The model can be simulated and debugged together with the environment. The HLTPN ENGINE executes the HLTPN and uses the BRIDGE to exchange information with the SIMULINK model of the plant. The HLTPN ENGINE is written in C++, is standard HLTPN engine. The BRIDGE is implemented using CORBA services.
The time discrete FBD model is executed together with the time continuous model of the plant by using setting a time frame at which the controller (HLTPN) samples the plant and react to its inputs. The RULE INTERPRETER applies animation rules to animate the model of FBD when a Petri Net transition fires.