清远市西门子电机授权总经销商 中国授权SIEMENS一级总代理

供应商
广东湘恒智能科技有限公司
认证
西门子PLC
西门子伺服电机
西门子触摸屏
西门子电缆
西门子变频器
西门子模块
联系电话
13510737515
手机号
13185520415
联系人
董海波
所在地
惠州大亚湾澳头石化大道中480号太东天地花园2栋二单元9层01号房(仅限办公)
更新时间
2024-07-06 07:00

详细介绍

读取led状态需要调用sfc 51“rdsysst”   ,使用ssl-id16#74可以读取全部的led,检索号设置为0,hcpu在读取led时,sfc返回60个字节的信息。每个led返回3个字节的信息结构如下:


每个led都有一个id加以区分,led的id同图1中检索号一致,如intf(内部错误)对应id就是16#2,如有3个字节数据值为:

byte1: 16#2

byte2: 16#1

byte3: 16#0

其解释为id为2的intf灯被点亮,没有闪烁。


begin

xreq:=false;

if not xbusy then  

    szl_id:=w#16#0074;

    index:=w#16#0;

    xreq:=true;

    ierrcode:=rdsysst(req :=xreq

        ,szl_id := szl_id

        ,index := index

        ,busy := xbusy

        ,szl_header :=szl_header

        ,dr := dr_moduleled

        ); 


//leds on/off

intf.on:= (dr_moduleled[3]= b#16#1);

extf.on:= (dr_moduleled[7] = b#16#1);

run.on:= (dr_moduleled[11]= b#16#1);

stop.on:= (dr_moduleled[15]= b#16#1);

frce.on:= (dr_moduleled[19]= b#16#1);

bus1f.on:= (dr_moduleled[23]= b#16#1);

bus2f.on:= (dr_moduleled[27]= b#16#1);

redf.on:= (dr_moduleled[31]= b#16#1);

mstr.on:= (dr_moduleled[35]= b#16#1);

rack0.on:= (dr_moduleled[39]= b#16#1);

rack1.on:= (dr_moduleled[43]= b#16#1);

ifm1f.on:= (dr_moduleled[47]= b#16#1);

ifm2f.on:= (dr_moduleled[51]= b#16#1);

maint.on:= (dr_moduleled[55]= b#16#1);

bus5f.on:= (dr_moduleled[59]= b#16#1);


// flashing 0.5hz

intf.blink05:= (dr_moduleled[4] = b#16#2);

extf.blink05:= (dr_moduleled[8] = b#16#2);

run.blink05:= (dr_moduleled[12]= b#16#2);

stop.blink05:= (dr_moduleled[16]= b#16#2);

frce.blink05:= (dr_moduleled[20]= b#16#2);

bus1f.blink05:= (dr_moduleled[24]= b#16#2);

bus2f.blink05:= (dr_moduleled[28]= b#16#2);

redf.blink05:= (dr_moduleled[32]= b#16#2);

mstr.blink05:= (dr_moduleled[36]= b#16#2);

rack0.blink05:= (dr_moduleled[40]= b#16#2);

rack1.blink05:= (dr_moduleled[44]= b#16#2);

ifm1f.blink05:= (dr_moduleled[48]= b#16#2);

ifm2f.blink05:= (dr_moduleled[52]= b#16#2);

maint.blink05:= (dr_moduleled[56]= b#16#2);

bus5f.blink05:= (dr_moduleled[60]= b#16#2);


//flashing 2hz

intf.blink2:= (dr_moduleled[4] = b#16#1);

extf.blink2:= (dr_moduleled[8] = b#16#1);

run.blink2:= (dr_moduleled[12]= b#16#1);

stop.blink2:= (dr_moduleled[16]= b#16#1);

frce.blink2:= (dr_moduleled[20]= b#16#1);

bus1f.blink2:= (dr_moduleled[24]= b#16#1);

bus2f.blink2:= (dr_moduleled[28]= b#16#1);

redf.blink2:= (dr_moduleled[32]= b#16#1);

mstr.blink2:= (dr_moduleled[36]= b#16#1);

rack0.blink2:= (dr_moduleled[40]= b#16#1);

rack1.blink2:= (dr_moduleled[44]= b#16#1);

ifm1f.blink2:= (dr_moduleled[48]= b#16#1);

ifm2f.blink2:= (dr_moduleled[52]= b#16#1);

maint.blink2:= (dr_moduleled[56]= b#16#1);

bus5f.blink2:= (dr_moduleled[60]= b#16#1);       

end_if;

华南西门子总代理,华中西门子总代理,华东西门子总代理,华北西门子总代理,西北西门子总代理

展开全文

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