以下是为7台秤做启动顺序调整的命令,出现重复值时提示。
可老是时好时坏,有时打开窗口能用很正常,但有时命令不执行,诊断结果在下方。
Sub X6309X94AE6X0000X8BDD_X6309X94AE6X0000g_X6309X94AE6X0000X003F_X6309X94AE6X0000m_X6309X94AE6X0000a_OnLButtonDown(Byval Item, Byval Flags, Byval x, Byval y)
Dim arry(7)
Dim i
Dim j
For i=1 To 7
arry(i)=HMIRuntime.Tags("cheng1_3" & CStr(i)).Read
Next
For i = 1 To 7
For j=1 To 7
If i<>j Then
If arry(i)=arry(j) Then
MsgBox CStr(i) & " 号秤与 " & CStr(J) & " 号秤启动顺序重复,请重新设置!",48,"错误!"
Exit Sub
End If
End If
Next
Next
For i=1 To 7
HMIRuntime.Tags("cheng1_" & CStr(i+20)).write arry(i),1
Next
End Sub
============Microsoft VBs cript 编译器错误============
Application : PDLRT
Picture : 1#配方设置.pdl_Events
Function : Function
Line : 15
Error : 语句未结束
============Microsoft VBs cript 编译器错误============
============Error loading s cript============
Application : PDLRT
Picture : 1#配方设置.pdl_Events
Error : 0x80020101
============Error loading s cript============
============Microsoft VBs cript 运行时错误============
Application : PDLRT
Picture : 1#配方设置.pdl_Events
Function : Function
Line : 15
Error : 变量未定义: 'ESSOR_REVISION'
============Microsoft VBs cript 运行时错误============
============Error loading s cript============
Application : PDLRT
Picture : 1#配方设置.pdl_Events
Error : 0x80020101
============Error loading s cript============
============Microsoft VBs cript 编译器错误============
Application : PDLRT
Picture : 1#配方设置.pdl_Events
Function : Function
Line : 15
Error : 无效字符
============Microsoft VBs cript 编译器错误============
============Error loading s cript============
Application : PDLRT
Picture : 1#配方设置.pdl_Events
Error : 0x80020101
============Error loading s cript============
============Microsoft VBs cript 运行时错误============
Application : PDLRT
Picture : 1#配方设置.pdl_Events
Function : Function
Line : 15
Error : 变量未定义: 'nCtrlENU'
============Microsoft VBs cript 运行时错误============
============Error loading s cript============
Application : PDLRT
Picture : 1#配方设置.pdl_Events
Error : 0x80020101
============Error loading s cript============