仿真软件的功能就是将编写好的程序在电脑中虚拟运行,如果没有编好的程序,是无法进行仿真的。首先,在安装仿真软件GX Simulator 6之前,必须先安装编程软件GX Developer。本站提供了最新的下载:安装好编程软件和仿真软件后,在桌面或者开始菜单中并没有仿真软件的图标。
因为仿真软件被集成到编程软件GX Developer中了,其实这个仿真软件相当于编程软件的一个插件。接下来我们做一个实例:(1)首先打开编程软件

(2)启动编程软件GX Developer,创建一个“新工程”。

(3)编写一个简单的梯形图。

(4)可以通过“菜单栏”启动仿真。

(5)也可以通过“快捷图标”启动仿真。

(6)上面两种方式都可以启动仿真,这个小窗口就是“仿真窗口”,显示运行状态,如果出错会有中文说明。

(7)启动仿真后,程序开始在电脑上模拟PLC写入过程。

(8)这时程序已经开始运行。

(9)并且可以通过“在线”中的“软元件测试”来强制一些输入条件ON或者OFF。监控程序的运行状态。如下面梯形图:

点击工具栏“在线(O)”,弹出下拉菜单,点击“调试(B)”→“软元件测试(D)”或者直接点击“软元件测试”快捷键,

则弹出“软元件测试”对话框。

在该对话框中“位软元件”栏中输入要强制的位元件,如X0,需要把该元件置ON的,就点击“强制ON”按钮,如需要把该元件置OFF的,就点击“强制OFF”按钮。同时在“执行结果”栏中显示被强制的状态。

梯形图监视执行中.........

接通的触点和线圈都用蓝色表示,同时可以看到字元件的数据在变化。(10)各位元件的监控和时序图监控。(a)、位元件监控点击“启动仿真窗口”的“菜单起动S”,→“继电器内存监视(D)”弹出如图窗口,

点击“软元件D”→“位元件窗口(B)”→“Y”。

如图即可监视到所有输出Y的状态,置ON的为黄色,处于OFF状态的不变色。用同样的方法,可以监视到PLC内所有元件的状态,对于位元件,用鼠标双击,可以强置ON,再双击,可以强置OFF,对于数据寄存器D,可以直接置数。对于T、C也可以修改当前值,因此调试程序非常方便。(b)、时序图监控点击“仿真窗口”的“菜单起动S”,→点击“时序图(T)”→起动“(R)”,则出现“时序图监控”。


可以看到程序中各元件的变化时序图。(11)PLC的停止和运行。点击“仿真窗口”中的“STOP”,PLC就停止运行,再点击“RUN”,PLC又运行。

(12)退出PLC仿真运行。在对程序仿真测试时,通常需要对程序进行修改,这时要退出PLC仿真运行,重新对程序进行编辑修改。退出方法:先点击“仿真窗口”中的“STOP”,然后点击“工具”中的“梯形图逻辑测试结束”。

点击“确定”即可退出仿真运行,但此时的光标还是蓝块,程序处于监控状态,不能对程序进行编辑,所以需要点击快捷图标“写入状态”,光标变成方框,即可对程序进行编辑。 更多 0