# Development of a Novel Open Control System Implementation Method under Industrial IoT
## 4 Case Study
### The Implementation of an Open CNC Demonstration  
Figure 10 describes the open CNC demonstration's control domain according to the proposed hierarchical semantic model. Here, only two states are presented in order to simplify the figure. Specifically, the Prepared state associates with an action labeled check. When a Launch event switches the machine tool state to Prepared, the check action is activated. The start task of the check action is the Position Control task. The Position Control task associates with two dependences: dependence on the Interpolation task and self-dependence with the time property \(T_{2}\) valued at 2 ms. The former's priority (1) is higher than the latter's (0), which means the Interpolation task should be checked before the Position Control task. Besides, the Interpolation task associates with three dependences: one on the Interpretation task, one on the Look-ahead Velocity-Planning task, and one on itself with the time property \(T_{1}\) valued at 4 ms. Among them, the priority of self-dependence is the lowest (0). It can be seen that, due to the transitivity of the dependence, the dependence on the Interpretation task in Figure 10 is presented in a dashed line since the Look-ahead Velocity-Planning task associates with the dependence on the Interpretation  
Figure 8: Hybrid control task virtualization method. Figure 9: Trajectory example. task as well. Therefore, the check action's sequence is Interpretation -> Look-ahead Velocity Planning -> Interpolation -> Position Control. In addition to the check action, the Prepared state associates with three transitions labeled Sleep, Success, and Fail events, respectively. The Sleep transition has a higher priority (1) than the other two (0). When the check action is performed, a Success event is generated and the machine tool state switches to Running. The Running state associates with two transitions labeled with Finish and Error events. They have the same priority since the Finish and Error events are mutually exclusive. Besides, the Running state associates with the same action as the Prepared state, but is labeled with invoke. A textual representation of this open CNC demonstration is presented in Appendix A in the form of a configuration file. In this open CNC demonstration, the Interpretation task computes the tool trajectory parameters, such as each block's length (or radian), the angle between consecutive blocks, etc., in addition to executing the functions mentioned in Section 3.1. The Look-ahead Velocity-Planning task computes the feed limitation of the tool trajectory under given kinematic constraints (e.g., machine tool's maximum feed/acceleration/jerk, chord error, etc.). It is noticed that, if the kinematic constraints change (e.g., feed override), the Look-ahead Velocity-Planning task will be re-called to compute the feed limitation of the remaining tool trajectory under new kinematic constraints. The Interpolation task computes the velocity profile along the tool trajectory. Then, it computes the moving displacement in \(T_{1}\) and obtains the next position along the tool trajectory. Moreover, the functionality of the Position Control task is the same as the modern CNCs mentioned in Section 3.1. In the Running state, therefore, the invocation action's sequence is Interpretation -> Look-ahead Velocity Planning -> Interpolation -> Position Control -> Interpolation -> Position Control ->... It can be seen that a part of the Interpolation task and of the Position Control task are independent of the tool trajectory's shape. According to the above control domain's formal description, the Interpolation task and the Position Control task have high time sensitivity (4 ms and 2 ms, respectively), while the other two tasks do not. The Look-ahead Velocity-Planning task is special since it needs to generate the new feed limitation for the Interpolation task in the case of kinematic constraints' change. That means the dependence between the Look-ahead Velocity-Planning task and the Interpolation task is intimate.