99久久国产综合精品女不卡-99久久好看一级毛片-99久久精品99999久久-99久久精品费精品国产-99久久精品费精品国产一区二

dingzyi
級(jí)別: 家園常客
精華主題: 0
發(fā)帖數(shù)量: 696 個(gè)
工控威望: 849 點(diǎn)
下載積分: 9488 分
在線時(shí)間: 467(小時(shí))
注冊(cè)時(shí)間: 2011-05-29
最后登錄: 2025-01-14
查看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
//獲取當(dāng)前配方序號(hào)
GetData(count, "Local HMI", RW, 900, 1)
//設(shè)置載入當(dāng)前配方序號(hào)
SetData(count, "Local HMI", RW, 900, 1)
//獲取實(shí)際數(shù)據(jù)基地址
getaddress= baseaddress+100*count
//獲取實(shí)際數(shù)據(jù)點(diǎn)數(shù)及配方名稱
GetData(Realcount, "Local HMI", RW, getaddress-9, 1)
GetData(RealName[0], "Local HMI", RW,getaddress-8, 8)
//設(shè)置實(shí)際數(shù)據(jù)點(diǎn)數(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




第二個(gè)宏指令
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í)際配方數(shù)據(jù),配方號(hào),配方點(diǎn)數(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í)配方號(hào),配方點(diǎn)數(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ù)至臨時(shí)區(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í)數(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
看看這兩個(gè)宏指令,大家給點(diǎn)意見
plc

主站蜘蛛池模板: 午夜香蕉视频| 亚洲免费播放| 日本免费网站| 亚洲国产成人精品小蝌蚪| 欧美一级黄色录像| 国产成人一区二区三区在线视频 | 黄视频免费| 国产高清国内精品福利色噜噜| 中文字幕国产在线观看| 伊人伊狠亚洲综合影院| 国内自拍tv在线| 国产成人涩涩涩视频在线观看免费| 美女喷水视频在线观看| 91视频www| 丁香六月婷婷激情| 国产片免费观看| 九色亚洲| 久久精品韩国日本国产| 欧美精品blacked中文字幕| 香蕉手机网| 亚洲国产日韩在线观看| 一区二区在线不卡| 91网站视频在线观看| 一级黄色录像免费| 久久福利青草狠狠午夜| 日韩中文字幕在线看| 中日韩在线视频| 中文字幕韩国| 中文在线日本免费永久18近| 亚洲国产日韩女人aaaaaa毛片在线| 男女激情视频国产免费观看| 欧美卡1卡2卡三卡网站入口| 国产91网站在线观看免费| 国产无遮挡又爽又色又刺激 | 免费大片网站| 免费精品美女久久久久久久久| 欧美在线免费| 嫩草视频在线看| 老司机51精品视频在线观看| 男女配种超爽免费视频| 免费网址在线观看|