## 3 Results
### Case Study: Control of Laboratory Discrete Event System
There will be zero tokens in the place _guard_, this will ensure that automatic mode cannot be activated during manual mode. At the same time, the _OFF_ transition becomes executable, because the place _guard_, which is its output place, has a capacity equal to one and at the same time there is no token in it. In the state of the system, which is shown in Figure 12, there are two executable transitions in the Petri net. The _OFF_ transition is associated with the Arduino pin where the white button is connected. Therefore, this transition will only be triggered if this button is pressed. The only executable transition is therefore the _manual trg_ transition, and this transition will therefore be started automatically. Starting the _manual trg_ transition will change the marking of place _rain F_ and there will be one token in it. This makes the transition _turn on F_ executable. The _turn on F_ transition has a higher priority than the _manual trg_ transition, and will therefore be fired in the next iteration. Associated with this transition is a delay that represents the time during which the wiper is in the on position. Rotation of the servo motor to the desired position is realised by the capacity of the place and the multiplicity of the input arc. The rotation of the servo motor is directly proportional to the number of tokens in place with respect to its capacity. Subsequently, the _turn off F_, which has the highest priority of the currently executable transitions, will be started. The delay associated with this transition represents the time when the wiper is off. This process is shown in Figure 13.  
The analogous description applies to the automatic mode, with the difference that the actual start of the wiper is conditioned by the signal from the rain sensor. It is possible to activate the _OFF_ transition at any time, because it has the highest priority. Figure 11: Scheme of laboratory car wiper system. Figure 12: Petri net for control of laboratory car wiper system–initial marking and marking after starting manual mode. Figure 13: Petri net for control of laboratory car wiper system—the action of wiping. The OFF transition is connected by reset arcs to the _manual_ and _auto_ places, and thus its firing takes all tokens from the given places (Figure 14). This will make some transitions no longer executable. If the system is currently in a wiper-on state, setting transition firing priorities will ensure that the wiper cycle is completed before the system returns to its original state. We can conclude that the ability of discrete event control with \"PetriNet editor + PetriNet engine\" was successfully verified and can be generalised for other applications. The provided discrete event control case study is a basic example. Researchers in discrete event control design can use it for different and even more complicated scenarios. In manufacturing processes for Industry 4.0, time-driven and event-driven dynamics are combined. We propose individual parts of the manufacturing process to be characterised by cyber-physical states (e.g., pressure, velocity, position, temperature, etc.) described by time-driven dynamics, and by temporal states (e.g., operation start and stop times) described by event-driven dynamics. A hybrid system model for control of manufacturing processes represents the behaviour of dynamical systems which states can evolve continuously as well as instantaneously. Such systems arise when control algorithms that involve digital smart devices are applied to continuous-time systems, or due to the intrinsic dynamics (e.g., mechatronic systems with bumps, electrical and mechanical devices for switching control). Hybrid control based on discrete event control methods can be used to improve performance and robustness compared to conventional (PID) control [30]. In such case, using hybrid dynamics is unavoidable for modelling complex interactions between digital and analog components of a complex manufacturing system.