Fig。 4 A reverse engineering approach to construct a virtual plant model
log data contains signals with the stamped time that indicate when the signal was turned on and off, we can define a sequence of signals and the duration for each signal。 The I/O signal table identifies an input signal set and an output signal set involved in a device。 Since both data are obtained from the existing production system in the reverse engineering approach, we can construct a reliable plant model for the PLC simulation。 To obtain a proper algorithm, it is necessary to focus on the inherent attributes of a device in an automated manufacturing system, considering that: (1) each device has a set of repetitive tasks; (2) a task is triggered by an output signal of a PLC; (3) a device performs tasks one at a time; (4) the completion of a task is notified through an input signal of a PLC; and (5) a work cell can start its work cycle by the ‘WORK_CELL_RESET’ signal
indicating all devices have completed assigned tasks。
From the inherent attributes of a device model, we can intuitively recognize that a task of a device has two related PLC signals, an output signal and an input signal。 Triggering a task is done by an output signal of a PLC and the completion of the task is notified through an input signal of a PLC。 Since the time value can be used for interacting with another device, it is necessary to define the time duration (ta) for each task。 For example, consider the AGV model shown in Fig。 3。 The AGV model has two tasks, T1 and T2。 To execute each task, it is necessary to define the duration time at DO_TASK1 (or DO_TASK2) for T1 (or T2), after which an output function makes an output signal Y1 (or Y2)。 At the same time, an internal transition is executed to transit to the next state。 However, both S_P1 and S_P2 cannot escape the state without an external signal trigger。
The log data and I/O signal table are obtained from the existing production system, and the generating phase is performed automatically, as shown in Fig。 4。 Thus, we can construct a reliable virtual plant model, and in-depth knowledge of the simulation is not required。 The key idea of this paper is to generate the full behavior model of a device from the information of the existing production system。 As a result, a virtual plant model for the PLC simulation can be easily constructed。 An algorithm to generate a virtual device model (atomic model) from the log data and I/O signal table is addressed in the following section。
3Virtual device model generation
This section presents an algorithm to generate a virtual device model for the PLC simulation。 One of the key ideas in the proposed algorithm is to utilize the concept of reverse engi- neering。 Reverse engineering is the process of discovering the论文网
the log data and I/O signal table easily from an existing production system。 Then, a virtual device model can be gen- erated by the proposed algorithm automatically in the gen- eration phase。 Since the proposed method discovers the device behavior model as a virtual device model using the collected data, we can consider the generated models as reliable models for the PLC simulation。 To do so, it is necessary to go through two important steps: (1) identifi- cation of a set of device I/O signal pairs from the time signal chart of the log data, denoted as SIGNAL; and (2) generation of a virtual device model。
For the first step, we extract a set of input and output signals of the device from SIGNAL based on the ‘WORK_CELL_RESET’ signal。 As mentioned, the ‘WORK_CELL_RESET’ signal plays a role in indicating that all devices have completed assigned tasks, as well as informing that a new work cycle will be started。 Formally, the I/O signal table (a set of input signals and output signals) involved in a device is described as:摘要:提出了一种生成一个虚拟设备模型的逆向工程方法。该模型可用于可编程逻辑控制器(PLC)模拟仿真。PLC仿真虚拟工厂模型必须有输入信号之间的相互作用和PLC的输出。一个虚拟工厂模型的输入输出应与实际装置相同。通常,离散事件系统规范(DEVS)的形式已被用来代表一个虚拟设备模型的动作。但是建模使用DEVS形式,需要对仿真领域的深入了解,以及需要大量的时间和精力。一个建议的方法的主要是使用日志数据(时间历史信号)生成一个虚拟工厂模型,PLC的I/O信号表从现有生产系统中提取。提出的反向工程方法提供了两个主要的好处:(1)在一个可靠的现有生产系统的虚拟设备模型建设的时间和精力明显减少,可为新规划的生产系统所引用,(2)通过PLC模拟减少了一个生产系统的稳定时间。该方法的实施和应用主要是在自动化生产线上。