三菱plc简单编程实例
仿真软件的功能就是将编写好的程序在电脑中虚拟运行,如果没有编好的程序,是无法进行仿真的。
首先,在安装仿真软件GX Simulator 6之前,必须先安装编程软件GX Developer。本站提供了最新的下载:
软件名称: | 三菱PLC编程软件(GX Developer)v8.86中文免费版 |
软件大小: | 227.5M ![]() |
下载地址: | http://www.pc6.com/softview/SoftView_62038.html |
软件名称: | 三菱PLC仿真软件(GX Simulator 6)中文版 |
软件大小: | 22.4M ![]() |
下载地址: | http://www.pc6.com/softview/SoftView_63434.html |
安装好编程软件和仿真软件后,在桌面或者开始菜单中并没有仿真软件的图标。
因为仿真软件被集成到编程软件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”,然后点击“工具”中的“梯形图逻辑测试结束”。
点击“确定”即可退出仿真运行,但此时的光标还是蓝块,程序处于监控状态,不能对程序进行编辑,所以需要点击快捷图标“写入状态”,光标变成方框,即可对程序进行 编辑。
","gnid":"9c5aba00f4f7b4b1b","img_data":[{"flag":2,"img":[{"desc":"","height":"48","title":"","url":"https://p0.ssl.img.360kuai.com/t01dc021dc7973ad961.jpg","width":"48"},{"desc":"","height":"48","title":"","url":"https://p0.ssl.img.360kuai.com/t01ea1f81efadda7d89.png","width":"48"},{"desc":"","height":"299","title":"","url":"https://p0.ssl.img.360kuai.com/t010f875afc18332b39.jpg","width":"508"},{"desc":"","height":"449","title":"","url":"https://p0.ssl.img.360kuai.com/t01a286e306690edfb2.jpg","width":"466"},{"desc":"","height":"129","title":"","url":"https://p0.ssl.img.360kuai.com/t01336f5ae6cd62ca00.jpg","width":"368"},{"desc":"","height":"243","title":"","url":"https://p0.ssl.img.360kuai.com/t01d9f8ddbd415b0c77.jpg","width":"252"},{"desc":"","height":"257","title":"","url":"https://p0.ssl.img.360kuai.com/t0137d62ffc52e1c2ed.jpg","width":"459"},{"desc":"","height":"311","title":"","url":"https://p0.ssl.img.360kuai.com/t0110bade9beeacb912.jpg","width":"271"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t01c4d28ea80c0be8f8.jpg","width":"376"},{"desc":"","height":"118","title":"","url":"https://p0.ssl.img.360kuai.com/t01af26121365583e3b.jpg","width":"402"},{"desc":"","height":"340","title":"","url":"https://p0.ssl.img.360kuai.com/t0163c62c4c572a0141.jpg","width":"600"},{"desc":"","height":"345","title":"","url":"https://p0.ssl.img.360kuai.com/t014e497c9df99d5026.jpg","width":"444"},{"desc":"","height":"480","title":"","url":"https://p0.ssl.img.360kuai.com/t015810d48821181679.jpg","width":"388"},{"desc":"","height":"480","title":"","url":"https://p0.ssl.img.360kuai.com/t01b632623963f1fa4d.jpg","width":"388"},{"desc":"","height":"372","title":"","url":"https://p0.ssl.img.360kuai.com/t01e9f54c474962b978.jpg","width":"600"},{"desc":"","height":"303","title":"","url":"https://p0.ssl.img.360kuai.com/t01d4445cbeddf2aaa1.jpg","width":"412"},{"desc":"","height":"360","title":"","url":"https://p0.ssl.img.360kuai.com/t0141f79fdea4c201a6.jpg","width":"459"},{"desc":"","height":"400","title":"","url":"https://p0.ssl.img.360kuai.com/t0170ec1258ed18e2f3.jpg","width":"475"},{"desc":"","height":"391","title":"","url":"https://p0.ssl.img.360kuai.com/t01af978aee7bf7ecb8.jpg","width":"492"},{"desc":"","height":"311","title":"","url":"https://p0.ssl.img.360kuai.com/t012522a7413601207a.jpg","width":"271"},{"desc":"","height":"124","title":"","url":"https://p0.ssl.img.360kuai.com/t011cd7c27d630cefdf.jpg","width":"251"}]}],"original":0,"pat":"art_src_0,fts0,sts0","powerby":"cache","pub_time":1683251187000,"pure":"","rawurl":"http://zm.news.so.com/5018c1bc6ada6226c60af389fc1a224c","redirect":0,"rptid":"958f4e6863a73310","rss_ext":[],"s":"t","src":"大凡","tag":[{"clk":"ktechnology_1:三菱","k":"三菱","u":""}],"title":"三菱PLC仿真软件GX Simulator6安装使用图文教程
仇爽果960三菱系统测量开关off什么意思 -
鱼夏德15627706957 ______[答案] 测量开关没有打开,是无法输入的!操作面板上有个按键就是测量的开关,你按下就可以了
仇爽果960关于C51编程中的一个问题(用Keil C51)#includesbit P10=P1^0;void time - initial(){ TF0=0; TR0=0; TH0=0xF8; TL0=0x30; TR0=1;} main(){TMOD=0x01;for(;;) ... -
鱼夏德15627706957 ______[答案] 很明显 你这工程里不只就这个程序 别的C文件里也有MAINERROR 104:MULTIPLE PUBLIC DEFINITIONS(MAIN声明那一行) SYMBOL:MAIN是说MAIN被多次定义WORING L16:UNCALLED SEGMENT,IGNORED FOROVERLAY PROCESS 是说有没...
仇爽果960目标函数 maxZ=6x1+4x2 约束条件 2x1+3x2≤100 4x1+2x2≤120 x1,x2≥0 要求:编程过程体现单纯形方法的解 -
鱼夏德15627706957 ______[答案] var i,j,n:longint; s:real; begin n:=0; while s<=10 do begin n:=n+1; s:=s+1/n; end; writeln('n=',n); end. 这是答案.
仇爽果960帮我看看程序吧,从键盘输入任意一个整数n,编程计算并输出1~n之间所有素数之和 ,怎么改啊#include #include int prime(int i,int n );int main(){int sum = 0;... -
鱼夏德15627706957 ______[答案] 主函数这样 int main(){ int sum = 0; int i; int n; printf("Please input a number:"); scanf("%d", &n); for (i = 1;i
仇爽果960请教数控G75命令 G75数控编程时,径向开槽G75 X(U) Z(W)为切槽终点处坐标,请问用什么控制径向切槽宽度该命令只将槽的终点坐标表示出来了,可是初... -
鱼夏德15627706957 ______[答案] 起始点通过G0 X38.Z11.5就可以确定了.x38是直径方向的起始点,z11是槽宽方向的起始点.G75 x30 z-14确定了槽子的终止点
仇爽果960编程问题——字符串比较在C语言中,有一个strcmp函数,其功能是比较两个字符串s1和s2.如果s1 s2,则返回一个正数.请编写一个你自己的字符串比较函... -
鱼夏德15627706957 ______[答案] int my_strcmp(char *s1,char *s2) { int i,j; for(i=0;j=0;*(s1+i)I='\0'&&*(s2+j)!='\0';i++,j++) { if(*(s1+i)>(s2+j)) return 1; else if(*(s1+i)>(s2+j)) return -1; } if(*(str+i)=='\0'&&*(str+j)=='\0') return 0; else if(*(str+i)=='\0') return -1; else reurn 1; }