思思久久96热在精品国产10-思思久久96热在精品国产免费-思思久久99-思思久久99热-一级毛片免费观看视频-一级毛片免费看

dingzyi
級別: 家園常客
精華主題: 0
發(fā)帖數(shù)量: 716 個
工控威望: 871 點
下載積分: 9672 分
在線時間: 485(小時)
注冊時間: 2011-05-29
最后登錄: 2025-04-03
查看dingzyi的 主題 / 回貼
樓主  發(fā)表于: 2015-07-15 21:00
宏指令1

macro_command main()
short count,Realcount,i,baseaddress,getaddress,baseadd2,getadd2,on,baseadd3,getadd3,view,PLCAddr
int tempdata,realdata
unsigned char RealName[8]

//view=34
i=0
count=0
//temp baseaddr
baseaddress=910
// realdata baseaddr
Realcount=0
//PLC Addr
PLCAddr=2000
//SetData(view, "Local HMI", LW, 0, 1)
for i=0 to 7 step 1
RealName=''
next i
//獲取當前配方序號
GetData(count, "Local HMI", RW, 900, 1)
//設(shè)置載入當前配方序號
SetData(count, "Local HMI", RW, 900, 1)
//獲取實際數(shù)據(jù)基地址
getaddress= baseaddress+100*count
//獲取實際數(shù)據(jù)點數(shù)及配方名稱
GetData(Realcount, "Local HMI", RW, getaddress-9, 1)
GetData(RealName[0], "Local HMI", RW,getaddress-8, 8)
//設(shè)置實際數(shù)據(jù)點數(shù)及配方名稱
SetData(Realcount, "Local HMI", RW, 901, 1)
SetData(RealName[0], "Local HMI", RW, 902, 8)
DELAY(5)
//load other configure data for  XYZW
for i=0 to 60 step 2
     GetData(realdata, "Local HMI", RW,getaddress+i, 1)
     SetData(realdata, "Local HMI", RW,baseaddress+i, 1)  
next i
DELAY(1000)
//send data to PLC
SetData(Realcount, "DELTA DVP", D, 200, 1)
SetData(count, "DELTA DVP", D, 214, 1)
SetData(RealName[0], "DELTA DVP", D, 216, 8)
for i=0 to 60 step 2
     GetData(realdata, "Local HMI", RW,baseaddress+i, 1)
     SetData(realdata, "DELTA DVP", D, PLCAddr+i, 1)  
next i
DELAY(500)
//send exit cmd
on=1
SetData(on, "DELTA DVP", M, 1001, 1)


//view=0
//SetData(view, "Local HMI", LW, 0, 1)
//on=1
//SetData(on, "Local HMI", RW_Bit, 0, 1)
//SetData(on, "Local HMI", LB, 2, 1)

end macro_command




第二個宏指令
macro_command main()
short count,Realcount,i,number
short baseaddress,getaddress,view
int realdata,PLCAddr
unsigned char RealName[8]
i=0
count=0
baseaddress=910
Realcount=0
PLCAddr=2000
view=20
SetData(view, "Local HMI", LW, 10000, 1)
for i=0 to 7 step 1
RealName=''
next i
//view=35
//SetData(view, "Local HMI", LW, 0, 1)
//獲取PLC中實際配方數(shù)據(jù),配方號,配方點數(shù),配方名稱
//GetData(number, "DELTA DVP", D, 200, 1)
//GetData(Realcount, "DELTA DVP", D, 214, 1)
//GetData(RealName[0], "DELTA DVP", D, 216, 8)
//保存至HMI中臨時配方號,配方點數(shù),配方名稱
//SetData(number, "Local HMI", RW, 900, 1)
//SetData(Realcount, "Local HMI", RW, 901, 1)
//SetData(RealName[0], "Local HMI", RW, 902, 8)
//保存至XYZ數(shù)據(jù)至臨時區(qū)域中
for i=0 to 60 step 2
     GetData(realdata, "DELTA DVP", D, PLCAddr+i, 1)
     SetData(realdata, "Local HMI", RW,baseaddress+i, 1)  
next i
DELAY(500)

//保存臨時數(shù)據(jù)至配方區(qū)域中
//***
GetData(number, "Local HMI", RW, 900, 1)
GetData(Realcount, "Local HMI", RW, 901, 1)
GetData(RealName[0], "Local HMI", RW, 902, 8)
SetData(number, "Local HMI", RW, baseaddress-10+100*number, 1)
SetData(Realcount, "Local HMI", RW, baseaddress-10+100*number+1, 1)
SetData(RealName[0], "Local HMI", RW, baseaddress-10+100*number+2, 8)
for i=0 to 60 step 2
     GetData(realdata, "Local HMI", RW, baseaddress+i, 1)
     SetData(realdata, "Local HMI", RW, baseaddress+100*number+i, 1)  
next i
DELAY(500)
view=0
SetData(view, "Local HMI", LW, 10000, 1)

end macro_command
看看這兩個宏指令,大家給點意見
plc

主站蜘蛛池模板: 国产一级毛片免 | 精品一区久久 | 久久国产欧美日韩精品 | 两性毛片 | 波多野结衣在线高清视频 | 九九久久九九久久 | 国产精品一区在线免费观看 | 免费视频网站一级人爱视频 | 国内精品在线观看视频 | 国产视频一区二区 | 国产免费叼嘿网站免费 | 精品免费福利视频 | 久热国产在线 | 国产成人精品三级91在线影院 | 成人三级在线播放线观看 | 黑人操日本人 | 国产第一页在线视频 | 麻豆国产在线观看一区二区 | 精品久久久久久国产91 | 成人黄色小视频在线观看 | 成年人一级黄色片 | 久久这里只有精品首页 | 国产极品麻豆91在线 | 国产产一区二区三区久久毛片国语 | 久久影院午夜伦手机不四虎卡 | 国产1区2区 | 九九视频只有精品 | 国内永久第一免费福利视频 | 免费久久精品国产片香蕉 | 国产黄色大片 | 久久综合婷婷 | 国产91边对白在线播放 | 黄色在线视频观看 | 久久精品国产四虎 | 久久婷婷国产麻豆91天堂 | 国产美女精品视频免费观看 | 国产综合亚洲欧美日韩一区二区 | 国产免费高清视频在线观看不卡 | 成人sq视频在线观看网站 | 久久国产精品国产精品 | 国产亚洲精品第一综合另类 |