我在WinCC V7.5 的VBS 脚本中使用字符串的比较进行判断(IF 语句中的条件判断),已运行三年了,没有出问题,但是昨天出了问题,想向大家请教一下,问题到底出在是什么地方?具体的语句如下:
If sShaftCheckCode = sQueryShaftCode Then
'If iStringCheckResult=0 Then
'MsgBox ("OK")
HMIRuntime.Tags("OP20_ShaftCheck_OK").Write True
HMIRuntime.Tags("OP20_ShaftCheck_Fault").Write False
HMIRuntime.Tags("OP20_ShaftCheck_Request").Write False
Else
'MsgBox ("NG")
HMIRuntime.Tags("OP20_ShaftCheck_Fault").Write True
HMIRuntime.Tags("OP20_ShaftCheck_OK").Write False
HMIRuntime.Tags("OP20_ShaftCheck_Request").Write False
End If
sShaftCheckCode 的值为 11012275 , sQueryShaftCode 的值为11014500 , 怎么IF 语句就成立了 ?多谢!