[replyview][/replyview]
分享一下宏指令
[replyview]macro_definition_begin
"id": "1"
"name": "添加"
"startup": "false"
"periodic": [ "false" ]
"interlock": [ "false" ]
macro_definition_end
macro_command main()
unsigned short i=0x0,j=0x1,k=0x0
unsigned short a,b,c,d[10]={0,0,0,0,0,0,0,0,0,0}
bool m0=0
char h[10]
GetData(a,"Mitsubishi",D,1000,1)
GetData(b,"Mitsubishi",D,501,1)
GetData(h[0],"Local HMI",LW,0,10)
if h[0]<>'''' then
SetData(h[0],"Local HMI",RW_A,b*10,10)
SetData(d[0],"Mitsubishi",D,b*10,10)
SetData(b,"Mitsubishi",D,1000,1)
c=b+0x1
SetData(c,"Mitsubishi",D,501,1)
SetData(j,"Mitsubishi",D,500,1)
DELAY(100)
SetData(k,"Mitsubishi",D,500,1)
end if
SetData(m0,"Local HMI",lb,1,1)
end macro_command
[/replyview]
最后修改:2022/3/13 13:27:47