# Engineering Method and Tool for the Complete Virtual Commissioning of Robotic Cells
## 3 Proposed Virtual Commissioning Approach
### Description of the Signal Exchange Mechanism
A communication pattern was defined between the PLC and the other devices by means of a standardized set of signals, which are summarized in Table 2. The reported signals represent a minimum core set to guarantee an efficient interaction between the PLC and the cell devices. \begin{table}
\begin{tabular}{c c c} \hline
**Name** & **Quantity** & **Description** \\ \hline ABB IRB 1600-10/1.2 & 1 & Serial manipulator \\ ABB IRB 2600-20/1.65 & 1 & Serial manipulator \\ Schunk Quick-Change-Systems SWS-011 & 1 & Tool changer \\ Schunk PNG-plus 80-1 & 2 & Parallel gripper \\ Schunk PNZ-plus 80-1 & 3 & Three-finger centric gripper \\ Bosch Rexroth CS351 & 1 & Electric, torque-controlled screwer \\ Cortetee Servo Press CS20-350B & 1 & Electric press \\ Bosch Rexroth IntraDrive Cs Systems & 2 & Motors and drivers for linear axis \\ Beckhoff Embedded PC CX5140 & 1 & PLC \\ \hline \end{tabular}
\end{table} 
Table 1: Details on the main devices employed in the cell. Figure 4: Full view of the assembly cell reproduced in RobotStudio 3D environment. The actions performed by the robots and the devices in the cell were subdivided in elementary procedures, which are combined to perform more complex tasks. The PLC elaborates the required sequence of operations, the possible simultaneity of the actions according to the general assembly task of the cell, and the space-sharing constraints. Therefore, the PLC is in charge of sending identifiers of the procedures to be executed to cell devices, which were named as procedureNumber in case of manipulators and programNumber for the press. For the X-Y axes of the positioning table, the numeric value of the coordinate to be reached, i.e., the targetPosition, is provided. Finally, the communication pattern was completed with additional error signals in order to guarantee the required safety and robustness in industrial implementations. Figure 5 shows the appearance of PLC_Beckhoff SC connected to the cell devices, as the configuration stage of the cell is completed according to the signal pattern explained above. The signal exchange is based on a simple remote procedure call (RPC), i.e., a client-server interaction implemented via request-response messages. This pattern is able to safely manage complex scenarios in a standardized manner. In practice, as depicted in Figure 6, an operation is activated by the execute signal, and it gives feedback when activity ends by the done signal. Once the PLC has received the done signal, it resets the execute signal. Finally, the device resets the done signal as soon as it receives the information that the execute signal has been reset. The same logic is applied to devices and robots, leveraging respective controllers' codings means to handle the signals' exchanges. For instance, in the specific case of an ABB robot, the RPC scheme is managed by a main loop operating in the RAPID code, i.e., the code running in the robot controller. As shown in Figure 7, the robot acts as any other device: it receives an execute command from the PLC and it returns a done signal when the requested procedure is finished. As reported in the following pseudocode (Algorithm 3), the algorithm running on the robot controller includes a standard Main section with a loop implementing the RPC pattern. The code ensures the management of the exchanged signals and the invoking of the desired procedure according to the value of the _procedureNumber_. Other code sections are then implemented to detail the action required by the specific operation procedure, such as a joint movement, gripper attaching, object grabbing, etc. Such procedures were defined according to the subdivision of the robot tasks in elementary operations accomplished in the initial design phase of the assembly process. ### PLC Programming

The SFC graphic language, defined in the international standard IEC 61131-3, has been chosen as PLC programming means for its suitability to visualize conditional procedures as typically happens in industrial applications.