## 8 Conclusions  
The proposed architecture of the state machine-based hybrid position/force control (SmHPFC) can be implemented for robots and actuator-driven mechatronics, which use motors with different control parameters between position and force control. One example is the HGPLE Festo linear motor. This type of motor tends to include feedback information on the real position and force/torque that can be easily included in a feedback control loop such as the SmHPFC. Using this information, one can design a position control feedback loop, knowing that the received information is showing the actual actuator position. At the moment, when the control type is changed from position to force or torque and vice versa, the same information value must be interpreted with a different scope, which will disturb the real-time control loop since the motor control parameter has changed. In the standard approach, a motor is usually controlled in position, force/torque, or direct current, and uses different techniques to get the control value, starting from a position or force/torque reference. This approach cannot be used by a state-driven actuator such as the one used on the presented 5 DOF manipulator. One advantage of the SmHPFC architecture is that it is quite easy to integrate it into an automated assembly line or use it to change the behavior of the robot since the stability problem was mitigated due to the way the motors are built. This advantage translatesinto reconfiguring the automated line with ease, which is the backbone of the Industry 4.0 concept. As an example of Industry 4.0 usage, the robots from an assembly line can be programmed to complete different tasks, while in a standard production line, the extra programmed tasks are not required. A robot can have a task to move certain components from a top shelf to the conveyor in a certain factory configuration, but can also stack products to a designated area, depending on the factory requirements. This can happen if all the robots are pre-programmed with multiple tasks and a control unit will change the robot state from a shelf-stacking robot to one that can pick up faulty products from the conveyor. Another advantage of the SmHPFC architecture is that not only can it provide easy access to multiple types of tasks for a single robot, but that these tasks can have very different control parameters and objectives: position control, contour following, force control, etc. This type of architecture has some disadvantages. The main one is that it cannot switch between control modes while the robot is moving and it must perform a very short stop while reconfiguring the input parameters. This stage is dependent on the communication rate between the PLC and the motor, and on the time the motor can come to a stop. It takes only a few communicated messages for the motor to stop, reconfigure and start a new job. For example, to switch the Festo linear motor from position to force, we need to send just one control byte. However, since the motor parameters cannot be changed while it runs, we have to send two additional control bytes, to stop and restart the motor. On a ModBus 9600 bps communication rate, it would translate to 2.5 ms, only to send the new configuration. To this, we need to add the time it takes the motor to come to a stop if not already stopped, and a maximum of eight more bytes to send the new motor reference. This also depends on whether the motor can restart with ease. This disadvantage can turn into an advantage if the robot task requires separate motion steps during which the robot can be reconfigured to handle different control methods on a different degree of freedom. Our proposed SmHPFC architecture does not depend on the joint regulators, and their analysis was not included in this paper.