## 6 Experiment  
The hybrid position/force control is designed for the 5 DOF manipulator which will be mounted on the mobile robot. The manipulator has several hardware components that build the positioning and orientation system and one linear motor for the end effector. Figure 11 presents the interaction diagram of the hardware components. One can see that the system has only one PLC system that sends the reference information to the planar XOY movement (Festo EXCM), to the vertical OZ positioning (Festo EXCM), and the rotary motor (Festo ERMO), through CANopen, Modbus TCP or Input/Output Link (IO-Link) communication with integrated motor drivers. The gripper's motor requires a separate motor driver (Festo CCEC-X-M1) that controls the linear motor (Festo HGPLE), which forms the gripper with the attachment of two 3D printed ABS fingers. The experiment uses a video detection camera, which uses a neural network [50; 53] to detect different recyclable materials (glass bottles, aluminum cans, PET bottles) and sends their position and orientation to the 5 DOF manipulator as input information. This information was simulated in the first stage of the experiment, since we had to prove that the hybrid position/force control has a good performance in the process of controlling the manipulator throughout the recycling operation. Because the gripper's control was the one that will switch between position and force control, we can say that this joint (DoF) is the most important one when deciding if the hybrid control can be used for this particular task, and we will describe its process in more detail. Figure 11: The robot control components interaction diagram. The 5 DOF manipulator is controlled by a Festo PLC, programmed using the CoDeSys software. Using the state machine presented in Figures 3 and 4, one can see that the entire system has several control steps. The first stage is to initialize the motors and start the homing process for each motor, and then wait for the detection system to send the first signal of position, orientation, and type for the object to recycling. After the initialization is complete, the recycling system can receive the pick-and-drop commands. To control the 5 DOF mechanical system, a decision algorithm that implements the state machine was developed outside the PLC, with communication capabilities through Ethernet-UDP protocol (Figure 12). This system receives state messages from the manipulator and the video detection system, and, through a transition mechanism, sends appropriate commands to the manipulator. The messages have two parts: command name and value. The message is then decoded by the PLC through a decoding method. The decoded information is used to set motor parameters and then activate the command. While the motor is acting on the last received command, it will send status information through a transducer to the motor driver which, in turn, is received by the PLC that will send status information through Ethernet UDP to the state machine. To test the gripper's commands and states, we designed a CoDeSys visualization interface that shows the state of each command or status bit. Figure 14 presents all the main stages of the gripper's control. The left part of each figure contains the control bits, and the right part contains the status bits. As the name suggests, the control bits are the values sent to the motor driver and the status bits are the values received. Grey status means that the bit is not used by the driver, dark green means that the bit value is 0 (false) and light green means that the bit value is 1 (true). Using these control bits, we can set the motor driver states from initialization and homing to the start of positioning or force control. Thus, Figure 14a,b present the configuration bits for the initialization and homing functions of the motor driver, respectively. After the initial step and homing have been completed, the motor driver, and consequently the HGPLE motor, are in stand-by mode to receive control values.