SIEMENS西门子陕西省榆林市(授权)电机一级代理商——西门子西北总代理

供应商
广东湘恒智能科技有限公司
认证
西门子总代理
PLC
西门子一级代
驱动
西门子代理商
伺服电机
联系电话
15915421161
手机号
15903418770
联系人
张经理
所在地
惠州大亚湾澳头石化大道中480号太东天地花园2栋二单元9层01号房
更新时间
2024-05-10 07:00

详细介绍

abcd彩灯控制系统设计彩灯顺序控制系统。控制要求:有四个灯a、b、c、d按下启动i0.0a先亮1秒灭1秒,接着b亮1秒灭1秒,接着c亮1秒灭1秒,接着d亮1秒灭1秒,然后a、b、c、d同时亮2秒灭2秒。如此循环不断。。。。直到按下停止i0.1,待整个过程结束停止。scl流程写法:region启动or停止#r_trig_instance(clk := #启动);if # and #流程 =0 then#流程 := 1;#停止标志 := 0;#停止 := 0;end_if;#r_trig_instance_1(clk :=#停止);if #r_ then#停止标志 := 1;#启动 :=0;end_if;end_regionregion a先亮1秒灭1秒if #流程 = 1 then#a :=1;end_if;#t0(in := #流程 = 1,pt := t#1s);if #t0.q then#a :=0;end_if;#t1(in := #t0.q,pt := t#1s);if #t1.q then#流程 :=2;end_if;end_regionregion 接着b亮1秒灭1秒if #流程 = 2 then#b :=1;end_if;#t2(in := #流程 = 2,pt := t#1s);if #t2.q then#b :=0;end_if;#t3(in := #t2.q,pt := t#1s);if #t3.q then#流程 :=3;end_if;end_regionregion 接着c亮1秒灭1秒if #流程 = 3 then#c :=1;end_if;#t4(in := #流程 = 3,pt := t#1s);if #t4.q then#c :=0;end_if;#t5(in := #t4.q,pt := t#1s);if #t5.q then#流程 :=4;end_if;end_regionregion 接着d亮1秒灭1秒if #流程 = 4 then#d :=1;end_if;#t6(in := #流程 = 4,pt := t#1s);if #t6.q then#d :=0;end_if;#t7(in := #t6.q,pt := t#1s);if #t7.q then#流程 :=5;end_if;end_regionregion a、b、c、d同时亮2秒灭2秒if #流程 = 5 then#d := #a :=#b := #c := 1;end_if;#t8(in := #流程 = 5,pt := t#2s);if #t8.q then#d:= #a := #b := #c := 0;end_if;#t9(in := #t8.q,pt := t#2s);if #t9.qthen#流程 := 6;end_if;end_regionregion 循环or停止if #流程 = 6 and #停止标志then#流程 := 0;end_if;if #流程 = 6 and not #停止标志 then#流程 :=1;end_if;end_regionscl比较指令写法:#r_trig_instance(clk:=#启动);if# then#启动标志 := 1;#停止 := 0;end_if;#t0(in:=#启动标志,pt:=t#12s);#a := (t#0s < #t0.et and #t0.et <= t#1s) or(t#8s< #t0.et and #t0.et <= t#10s);#b:= (t#2s< #t0.et and#t0.et <= t#3s) or (t#8s< #t0.et and #t0.et <= t#10s);#c:= (t#4s < #t0.et and #t0.et <= t#5s) or (t#8s < #t0.etand #t0.et <= t#10s);#d := (t#6s < #t0.et and #t0.et <=t#7s) or (t#8s < #t0.et and #t0.et <=t#10s);#r_trig_instance_1(clk:=#停止);if #r_then#停止标志 := 1;#启动 := 0;end_if;if #t0.q and not #停止标志thenreset_timer(#t0);end_if;if #t0.q and #停止标志 then#启动标志 := 0;#停止标志:= 0;end_if;梯形图lad写法:
PLC,变频器,代理商,一级代理,伺服电机

展开全文

我们其他产品
我们的新闻
咨询 在线询价 拨打电话