# Engineering Method and Tool for the Complete Virtual Commissioning of Robotic Cells
## 3 Proposed Virtual Commissioning Approach
### Description of the Signal Exchange Mechanism
Figure 9: Portion of the PLC program developed for the robotic assembly test case. * UnlockInsert: detach an insert from the press and locate in the magazine;
* PickBearing: grab a bearing with a gripper;
* PlaceBearing: locate a bearing on its assembly position;
* ScrewStud: screw a threaded stud by the torque-controlled screwdriver. Following the architecture described in the previous section, the code in the controllers of the robots and other cell devices is in charge of activating the operations according to the signals received by the PLC. The actual sequence of operations is determined by the PLC program. Therefore, several PLC programs, including different sequences of operations were generated and tested. From the experimental activity, it emerges that, in the virtual environment, various aspects can be verified and optimized. At first, the appropriate sequence of actions and the correctness of signals exchange between PLC and controllers must be verified and optimized. Therefore, PLC program robustness is verified and tested in normal operating conditions as well as in fault events caused by errors, safety alarms or unexpected situations. The reachability of the desired locations, the quality and fluency of the movements, the absence of collisions, as well as the overall time required to accomplish the tasks are other significant tasks that can be verified before commissioning the real cell to ensure a successful result. Finally, the VC was analyzed as a means to optimize the sequence of the operations coordinated by the PLC. The absence of collisions between two robots sharing their workspace (see Figure 10), the interchangeability of the single assembly operation, and the possibility to parallelize actions performed in different zones of the cell make the solution space of all of the possible operating sequences quite vast. This opens up to the possibility of optimizing the order of the operations requested of the two robots and other devices in order minimize the overall accomplishing time. Figure 11 reports an example of tests performed to identify the optimal sequence permutation of the same list of operations. In the figure, three different sequences are reported, respectively, assigned to the positioning table axes, the press, and the two robots. The colored bars show the activation times of the devices, as highlighted by the legends in the figures. It is evident how some operations can be parallelized, while in other moments, the operability of a device must be suspended until specific actions are completed. However, looking at the three different operation sequences it emerges that different levels of operations can simultaneously be reached. For instance, in the reported case, (a) the operations performed by Robot 1 (yellow band), which is the device with a major

Figure 10: The sharing of the workspace of the two robots makes it essential to study the appropriate sequences of actions in a virtual environment to avoid collisions. In the figure, Robot 2 locating a bearing, collides with Robot 1 while it is screwing a stud. workload in the cell, are fragmented, and the overall cycle time is degraded due to frequent downtime periods. The improved sequences of operations leads to an overall cycle time reduction of 30%, i.e., from the initial 101 s to an intermediate sub-optimal solution (i.e., 74 s, case (b)) and finally, to a saving of more seconds (i.e., 71 s, case (c)). As a further demonstration of the VC tool potentialities, the same picture reports the RS estimation of the total energy required

Figure 11: Results obtained by the VC approach. A better alternation of operations allows a reduction in the overall cell cycle time and energy consumption: (**a**) initial (sub-optimal) sequence; (**b**) improved sequence and (**c**) final (refined) sequence. by the motors of the robots during the entire work cycle, comparing the sub-optimal and the optimal sequences. It can be observed that the last case provides an overall reduction in energy consumption of 3% (i.e., from 17,067 J to 16,556 J).