This paper deals with the modeling and control of discrete event robotic manufacturing cells using Petri nets, and proposes a methodology of model based design and implementation of hierarchical and distributed control. Hierarchical Petri net models are adopted; conceptual Petri net model and detailed Petri net model. The overall detailed Petri net model is decomposed into local Petri net models which are used by the local machine controllers. The upper level station controller coordinates the distributed local controllers so that the aggregate behavior of decomposed subnets is the same as that of the original Petri net. The overall control system is implemented using multithreaded programming based on Petri net based multitask processing. Simulation experiments show that the distributed Petri net model based control system can perform the overall multitask processing control by coincidence of the behavior of the real system with the local Petri net models.