我目前在用维伦mt6070hi的想实现如下功能数据自动更新功能, 但计数器超过数值时自动将菜单更新。
指令如下:
macro_command main( )
short CurrentOrder
short CurrentLength
short CurrentNumber
short AwaitOrder
short AwaitLength
short AwaitNumber
short feipin
short ActualCut
short SetCut
short n=0
short x=9
bool L
int m
GetData(feipin, "Danfoss FC Series", Parameter, 1912, 1)
GetData(SetCut, "Danfoss FC Series", Parameter, 1901, 1)
GetData(ActualCut, "Danfoss FC Series", Parameter, 1905, 1)
GetData(AwaitOrder ,"Local HMI", LW ,8002,1)
GetData(AwaitLength ,"Local HMI", LW ,8000,1)
GetData(AwaitNumber ,"Local HMI", LW ,8001,1)
if ActualCut>=SetCut+ feipin then
CurrentOrder=AwaitOrder
CurrentLength=AwaitLength
CurrentNumber=AwaitNumber
SetData(CurrentOrder, "Danfoss FC Series", Parameter, 1910, 1)
SetData(CurrentLength, "Danfoss FC Series", Parameter, 1900, 1)
SetData(CurrentNumber, "Danfoss FC Series", Parameter, 1901, 1)
end if
end macro_command
但此时发现只有在满足ActualCut>=SetCut+ feipin 时,在使用while........wend 时发现不能自动更新数据, 手动可以触发数据更新, 但后面有对应数据输入,在不满足ActualCut>=SetCut+ feipin 的条件下自动更新数据
跪求各位大侠指点。