恭喜,你发布的帖子
发布于 2025-01-07 11:29:35
3楼
在全局脚本中加入检查本机电脑名称,如是客户机则不执行脚本。
Option Explicit
Function action
On Error Resume Next
If (HMIRuntime.Tags("@LocalMachineName").Read="OS100") Then
HMIRuntime.Tags("Public/HeartBeat.I_B01").WRITE HMIRuntime.Tags("Public/HeartBeat.I_B01").Read Xor &H1
Elseif (HMIRuntime.Tags("@LocalMachineName").Read="OS101") Then
HMIRuntime.Tags("Public/HeartBeat.I_B02").WRITE HMIRuntime.Tags("Public/HeartBeat.I_B02").Read Xor &H1
Elseif (HMIRuntime.Tags("@LocalMachineName").Read="0C102") Then
HMIRuntime.Tags("Public/HeartBeat.I_B03").WRITE HMIRuntime.Tags("Public/HeartBeat.I_B03").Read Xor &H1
End If
End Function
谢谢!
请填写推广理由:
分享
只看
楼主