圖片:
獲取當前用戶等級(普通模式)/獲取當前用戶名稱(高級模式),如果退出了就把10寫入到控制字里面
char UserID[12]
int UserID_len
StringGet(UserID[0], "Local HMI", LW, 10754, 12)
UserID_len = StringLength(UserID[0])
if UserID_len == 0 then
SetData(OFF, "Local HMI", LB, 200, 1)
else
SetData(ON, "Local HMI", LB, 200, 1)
end if