A system for simulating machines used in industrial automation, wherein the system comprises: a simulation module configured to generate a simulation model; a controller module comprising an application programming interface , wherein the application programming interface is configured to read and write tags for data exchanged between the controller module and the simulation module ; and a co-simulation master configured to: when the controller module is transferring control data to the simulation module , utilize the application programming interface to apply a first timestamp to the control data to mark a first time the co-simulation master receives the control data, wherein a second timestamp is applied to the control data to mark a time the co-simulation master provides the control data to the simulation module ; calculate time offsets for the control data based on the first timestamp and the second timestamp; and process timestamps to synchronize the simulation module and the controller module , wherein, to process the timestamps to synchronize the simulation module and the controller module , the co-simulation master advances a master clock one clock cycle and sends a clock pulse to both the controller module and the simulation module to advance each module ahead one time step. a simulation module configured to generate a simulation model; a controller module comprising an application programming interface , wherein the application programming interface is configured to read and write tags for data exchanged between the controller module and the simulation module ; and a co-simulation master configured to: when the controller module is transferring control data to the simulation module , utilize the application programming interface to apply a first timestamp to the control data to mark a first time the co-simulation master receives the control data, wherein a second timestamp is applied to the control data to mark a time the co-simulation master provides the control data to the simulation module ; calculate time offsets for the control data based on the first timestamp and the second timestamp; and process timestamps to synchronize the simulation module and the controller module , wherein, to process the timestamps to synchronize the simulation module and the controller module , the co-simulation master advances a master clock one clock cycle and sends a clock pulse to both the controller module and the simulation module to advance each module ahead one time step. when the controller module is transferring control data to the simulation module , utilize the application programming interface to apply a first timestamp to the control data to mark a first time the co-simulation master receives the control data, wherein a second timestamp is applied to the control data to mark a time the co-simulation master provides the control data to the simulation module ; calculate time offsets for the control data based on the first timestamp and the second timestamp; and process timestamps to synchronize the simulation module and the controller module , wherein, to process the timestamps to synchronize the simulation module and the controller module , the co-simulation master advances a master clock one clock cycle and sends a clock pulse to both the controller module and the simulation module to advance each module ahead one time step. <EOS>