Abstract:In automated manufacturing systems (AMSs), deadlock is an urgent problem to be solved, which is mainly caused by circular waiting for resources. To solve this problem, this study first builds special resource marked graphs (SRMGs) based on the characteristics of resource-oriented Petri nets (ROPNs). Secondly, the relationship between a deadlock and the saturated circuit is established in SRMGs. Unsafe markings can be prevented by adding controllers to some special circuits. Next, considering the problem of resource failure, the resource buffer subnet is added to the hazardous place. This ensures that parts requiring failed resources do not block the continuous production of other parts. Compared with existing controllers, each controller in this study has a control switch that allows more safe markings to occur by changing the capacity of the control place in real time.