# Engineering Method and Tool for the Complete Virtual Commissioning of Robotic Cells
## 3 Proposed Virtual Commissioning Approach
### Description of the Signal Exchange Mechanism
Moreover, this language is easy to understand, as some basic interpretation rules are provided and can be combined with other PLC programming languages. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Signal Name** & **From (Output)** & **To (Input)** & **Description** \\ \hline procedureNumber & & Robot or & Contains a coded data to identify the action that the device has to carry out. \\ programNumber & PLC & Device & \\ targetPosition & & & \\ \hline execute & PLC & Robot or & Triggers the execution of the procedure whose \\  & & Device & code has been transmitted to the device \\ \hline done & Robot or & PLC & Raised when the device completes the procedure. \\  & & Device & \\ \hline error & Robot or & PLC & Error code being raised in case of faults in the \\  & & Device & procedure execution \\ \hline \hline \end{tabular}
\end{table} 
Table 2: List of the core I/O signals exchanged between a robot/device and the PLC. In Figure 8, a simple diagram is shown as an example to recall the basics of SFC. The Init block with the double outline is the entry point of the program. The little rectangle below, linked by a vertical line, represents a transition, i.e., a step forward in the graph execution flow; the related condition is pointed out by the label beside it. Until the transition condition is not verified, the program cyclically executes the code included in the specific block. When the condition expressed in the label is met, the execution of the program will pass to the next block, and so on. In the SFC, it is also possible to make the program execute two or more blocks in the same cycle, using a parallel branch. In the example shown in Figure 8, after var1 has become true, Step2_1 and Step2_2 are both cyclically executed until the variable var2 becomes true. Finally, the arrow indicates a jump, meaning that the program execution is brought back to the block named as the label next to the arrow. Figure 5: Connection of the PLC_Beckhoff SC to the SCs representing the controllers of the devices in the assembly cell. Figure 6: Schematic of the RPC employed in the PLC–device communication. In the robotic assembly cell test case, the SFC programming language has been employed to program the PLC. Figure 9 reports a portion of the program to show the logic used to build it. Each block of the diagram corresponds to an operation of a certain device. The features of the SFC, i.e., parallel branches, allowed the activities, which must be performed at the same time, to be managed. For instance, AxisX and AxisY are supposed to be moved simultaneously in order to reach the target position of the table in the minimum amount of time. On the contrary, the press must be actuated only when the table reaches the target position, as required by the sequential constrain that is expressed by the transition condition named Ready. Figure 7: Schematic of the structure of the RAPID program added in the virtual controller of both robots included in the cell. ## 5 Tool Validation and Results

The implemented integration between RS and TC was tested against the possibility to perform an effective VC of the cell. In particular, a series of assembly tasks were defined and simulated to identify the optimal assembly sequence for the proposed gearbox assembly task. For a better understanding of the executed work, a video showing the VC of the as-sembly cell is provided in the Supplementary Material Section. In the video, the PLC and the virtual cell in RS are displayed side-by-side. In particular, an example of the assembly sequence was shown that has been recorded to illustrate the command activation from the PLC and the variation in the signals' statuses, both in TC and RS. The whole gearbox assembly task was subdivided in a list of elementary operations to be arranged in proper sequences. The examples of considered operations include:

* LockInsert: locate a pushing insert in the press and attach it to the end effector;

Figure 8: Example of SFC graphical programming language for PLC.