恭喜,你发布的帖子
发布于 2025-11-18 13:54:14
1楼
dim actpos,xpos,ypos
actpos=hmiruntime.tags("实际位置").read
if actpos<1000then
ypos=actpos/1000*10000+20000
else
ypos=20000
end if
if actpos>1000 and actpos>2000 then
xpos=(actpos-1000)/(2000-1000)*4900+100
else
xpos=100
end if
hmiruntime.tags("xposint").write xpos
hmiruntime.tags("posint").write ypos
然后hmi的画面上设备的top,left分别连接ypos和xpos
请填写推广理由:
分享
只看
楼主