针对数控系统中的PLC,提出了一种根据PLC梯形图中各图元状态的变化实时监控的算法.该算法先依据PLC各图元扫描值(0或1)设置梯形图中各图元的状态(黄或绿),再根据各图元的状态来设置横线和竖线的状态,从而显示各条通路的状态(全绿为通否则不通).用户在监控模式下可直观地看到PLC逻辑状态的变化,达到实时监控的目的.通过模拟验证,该算法已成功运用在高档数控国家工程研究中心的蓝天系列数控系统中.%This paper proposes a algorithm of implementing real-time monitoring according changes of each node state in the Ladder Diagram based the PLC of numerical control system. Firstly, the algorithm sets the state (yellow or green) of each node of the Ladder Diagram according the scanning value (0 or 1 ) of each node on PLC. Secondly, the algorithm sets the state of horizontal and vertical line according each node state, then the state of the pathway is showing (all green stands for pass, otherwise nopass). Users can directly watch the logic state changes of PLC to achieve the purpose of real-time monitoring in the Monitor M ode. After simulation validation, the algorithm successfully runs in the Lan Tian series numerical control system of National Engineering Research Center for High-End CNC.
展开▼