# On the Control and Validation of the PARA-SILSROB Surgical Parallel Robot
## 2 Materials and Methods
### Command and Control Architecture of the Parallel Robot PARA-SILSROB
#### 2.2.2 Software Architecture  
Bernecker and Rainer Industrial Automation (B&R) provides specialized software for their hardware solutions called Automation Studio (Version 4.12, Company B&R, Eggelsberg, Austria, 2001). This software integrates the configuration and programming of their devices, which facilitates a streamlined approach to automation. In this setup, a state machine was implemented to execute commands based on input data transmitted from peripheral equipment (two 3D Space Mouse devices, keyboard, and mouse) and the data collected from the robotic system. Several other programs are designed to run concurrently, thus providing the state machine with the necessary data to effectively manage the robotic system. Figure 7 illustrates the software control scheme, thus showcasing all the elements involved in this configuration. The bundled states handler encodes the data into a simplified representation of the robotic system and inputs it into the state machine once the actuator's parameters have been obtained. Another software module, which is known as the Modbus Handler, provides the management of signal and data reading and writing between the robot and the GUI. The state machine utilizes the inverse and direct kinematics model [20] based on the given user inputs. The model integrates the actuator parameters and user input through a 3D Space Mouse control device to generate the necessary velocity vectors. These velocity vectors are then transmitted to the speed and direction handler. The function of this handler is to establish the new parameters for each actuator based on the calculated velocity and direction. Figure 6: Hardware configuration of the PARA-SILSROB. This structured approach facilitates the systematic control and monitoring of the robotic structure, which ensures efficient operation. For a more comprehensive understanding of the various states of the state machine, please refer to Figure 8a,b. Figure 8: _Cont._  
Figure 7: Software configuration of the PARA-SILSROB. Figure 8: (**a**) PARA-SILSROB robot state machine and (**b**) PARA-SILSROB robot state machine block diagram. According to Figure 8a,b, the initial state \"INIT\"is the state, which is automatically activated when the robot is powered on. This transition occurs from the POWER_ON state, which is accessed from the IDLE state, which is recognized as the robot's default state. From this initialization, the HOMING state is activated to execute the homing instruction for the entire robotic system. The CONTROLLED_MOVEMENT_PLATFORM can be accessed from various states, including IDLE and other CONTROLLED_MOVEMENT states. It enables the application of inverse kinematics [20], which allows for the precise manipulation of the end effector's movement in three-dimensional space, as driven by the input from the 3D Space Mouse. The 3D Space Mouse transmits data using the Modbus protocol. The CONTROLLED_MOVEMENT_INSTRUMENTS state applies inverse kinematics [20] as well, but it restricts itself to a limited number of actuators for positioning the instruments, as depicted in Figure 5. Finally, the CONTROLLED_MOVEMENT_TIPS refers to a state where the use of all 18 actuators is halted and the control is transferred to the two Raspberry PI Pico boards mounted on the two PCBs, which are located inside the instrument casings (one PCB for each casing). These Pico boards manage four actuators each and utilize four drivers (two drivers for one PCB) and a power supply. These actuators provide the two instrument tips with the freedom to adjust and grasp as needed. Within the state machine, the CONTROLLED_MOVEMENT_RCM state is dedicated to the precise positioning of the laparoscope camera in three-dimensional space once it has been inserted. This state utilizes inverse kinematics [20] for the movement control, which allows for rotations limited along the X- and Y-axes. In terms of safety, the STOP state can be activated solely by pressing an emergency button.