Local Operating Networks (LonWorks) is a widely used industrial technology applied to distributed control, sensor, and actuator networks. LonWorks is based on ANSI/EIA standard 709.1, and uses the predictive p-persistent CSMA algorithm in the MAC sublayer for collision resolution and decentralized traffic control. In spite of its popularity, only a few design tools are available to simulate LonWorks architectures and predict their performance. In this paper, we describe a simulation model for the collision resolution algorithm of LonWorks, based on the OPNET Modeler. We present the design framework, and develop a state variable representation and state transition diagrams that allow accurate simulation of performance and prediction of the algorithm's behavior. To validate our model, we compared its predictions to measurements from a physical LonWorks testbed and a Markov chain analytical model, and demonstrated a high level of agreement.