发布网友 发布时间:2022-04-21 22:11
共1个回答
热心网友 时间:2023-05-31 02:31
macro_command
main()
unsigned
short
page
unsigned
short
nian,yue,ri,shi,fen,miao
unsigned
short
nianq,yueq,riq,shiq,fenq,miaoq
GetData(nian,
"Local
HMI",
LW,
9022,
1)
GetData(yue,
"Local
HMI",
LW,
9021,
1)
GetData(ri,
"Local
HMI",
LW,
9020,
1)
GetData(shi,
"Local
HMI",
LW,
9019,
1)
GetData(fen,
"Local
HMI",
LW,
9018,
1)
GetData(miao,
"Local
HMI",
LW,
9017,
1)
GetData(nianq,
"Local
HMI",
RW,
10,
1)
GetData(yueq,
"Local
HMI",
RW,
11,
1)
GetData(riq,
"Local
HMI",
RW,
12,
1)
GetData(shiq,
"Local
HMI",
RW,
13,
1)
GetData(fenq,
"Local
HMI",
RW,
14,
1)
GetData(miaoq,
"Local
HMI",
RW,
15,
1)
if
nian>=nianq
and
yue>=yueq
and
ri>=riq
and
shi>=shiq
and
fen>=fenq
and
miao>=miaoq
then
page=22
else
page=0
end
if
SetData(page,
"Local
HMI",
RW,
50,
1)
end
macro_command
重点看最后几条。
需要在程序里面做一个PLC控制。用RW50
这个地址来控制触摸屏切换画面。然后给RW50这个地址里面赋值就可以了。!
不知道你明不明白!
诺涵电气