## 4 Assessment  
The modeling approach and the application agents presented in the previous section have been implemented in a demonstrator located at the Department of Automatic Control and Systems Engineering of the University of the Basque Country, Bilbao, Spain. This case study seeks to prove the capability to assure work balance among the distributed controllers comprising the automation system for the flexible manufacturing cell FMS-200. The manufacturing cell comprises four stations, connected by a conveyor system, that assemble a product from a set of four parts: base, bearing, shaft and lid. The first station validates the orientation of the base, which is provided from a buffer. If the position is wrong, the base is discarded, and a new one is provided. Otherwise, the base is transferred  
Figure 15: (**a**) Template of an AAS_Controller (AAS_CTemplate) in UML Class Diagram with detail of its methods and the states defined in its FSM and (**b**) Example of the use of the AAS_CTemplate in Java. The characterization method of the AAS_Controller element allows the customization of the parameters ID, description, IP, CPUfactor, memory and assignedPS for different AAS_Controller instances. to the conveyor system. In the second one, a robotic arm inserts the bearing and shaft in the base, whereas the lid is placed in the third station. The fourth station acts as a warehouse, where the assembled products fed by the conveyor system are stored. The cell is organized in five _PlantAssets_, corresponding to the four stations and the transfer system, respectively. Nevertheless, for simplicity, this assessment only considers the _PlantAssets_ associated to the first three stations. Besides the manufacturing cell, the demonstrator includes two CX1020 Soft PLCs from the German manufacturer Beckhoff. These devices are characterized for their ability to run a Windows Embedded CE operating system in parallel with the Beckhoff PLC runtime. The demonstrator also contains a supervisor PC hosting the Middleware Manager and the QoS Manager. In the first station, once the orientation of the base has been checked, a pneumatic suction gripper is responsible of picking the base and placing it in the conveyor system. Any interruption during the execution of this task implies a loss of reference of the current state, and therefore, it is considered a critical operation. The reconfiguration actions to be considered will differ depending on the position of the gripper when the incident occurs. Thus, two different critical situations have been defined. In case the base falls during the initial lifting (i.e., before the gripper starts moving towards the conveyor system), it is retired from the station and a new base is supplied. On the other hand, if the gripper is already moving towards the conveyor system when the failure arises, the system cannot assure the return to a previous known state by itself. Thus, the system goes to a safe stop state, triggering an alarm to warn the operator of the problem. The second station uses a robot arm to place the bearing and shaft on the base. The communication with the robot arm generates six critical situations, in which the PLC that holds the corresponding production service, does not know the position of the robot. These situations are defined as checkpoint situations in which the connection to the robot needs to be recovered and the execution of the code resumed. The third station completes the assembly of the product by placing the lid. The composition of the lids can vary in terms of color, material, and height. Hence, this station has different actuators to introduce lids in the station, to place them in the product, or to remove them in case they do not match the product to be assembled. These actuators can perform their operations in parallel, as they are allocated around a rotary table, and they are considered critical operations. Up to five critical situations have been identified, with their subsequent actions to resume a normal execution.