我目前在用維倫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 的條件下自動更新數據
跪求各位大俠指點。