新手求助:怎么让我的变量根据后面这段程序来运行复制代码
- Dim B(100)
- B(0) = 1
- B(1) = 2
- B(2) = 3
- B(3) = 4
- B(4) = 5
- B(5) = 6
- B(6) = 7
- B(7) = 8
- B(8) = 9
- B(9) = 10
- B(10) = 21
- B(11) = 22
- B(12) = 23
- B(13) = 24
- B(14) = 25
- B(15) = 26
- B(16) = 27
- B(17) = 28
- B(18) = 29
- B(19) = 20
- B(20) = 21
- B(21) = 22
- B(22) = 23
- B(23) = 24
- B(24) = 25
- B(25) = 26
- B(26) = 27
- B(27) = 28
- B(28) = 29
- B(29) = 30
- B(30) = 31
- B(31) = 32
- B(32) = 33
- B(33) = 34
- B(34) = 35
- B(35) = 36
- B(36) = 37
- B(37) = 38
- B(38) = 39
- B(39) = 40
- B(40) = 41
- B(41) = 42
- B(42) = 43
- B(43) = 44
- B(44) = 45
- Dim P(50)
- P(0) = SmartTags("Tag_1")
- P(1) = SmartTags("Tag_2")
- P(2) = SmartTags("Tag_3")
- P(3) = SmartTags("Tag_4")
- P(4) = SmartTags("Tag_5")
- P(5) = SmartTags("Tag_6")
- P(6) = SmartTags("Tag_7")
- P(7) = SmartTags("Tag_8")
- P(8) = SmartTags("Tag_9")
- P(9) = SmartTags("Tag_10")
- P(10) = SmartTags("Tag_11")
- P(11) = SmartTags("Tag_12")
- P(12) = SmartTags("Tag_13")
- P(13) = SmartTags("Tag_14")
- P(14) = SmartTags("Tag_15")
- P(15) = SmartTags("Tag_16")
- P(16) = SmartTags("Tag_17")
- P(17) = SmartTags("Tag_18")
- P(18) = SmartTags("Tag_19")
- P(19) = SmartTags("Tag_20")
- P(20) = SmartTags("Tag_21")
- P(21) = SmartTags("Tag_22")
- P(22) = SmartTags("Tag_23")
- P(23) = SmartTags("Tag_24")
- P(24) = SmartTags("Tag_25")
- P(25) = SmartTags("Tag_26")
- P(26) = SmartTags("Tag_27")
- P(27) = SmartTags("Tag_28")
- P(28) = SmartTags("Tag_29")
- P(29) = SmartTags("Tag_30")
- P(30) = SmartTags("Tag_31")
- P(31) = SmartTags("Tag_32")
- P(32) = SmartTags("Tag_33")
- P(33) = SmartTags("Tag_34")
- P(34) = SmartTags("Tag_35")
- P(35) = SmartTags("Tag_36")
- P(36) = SmartTags("Tag_37")
- P(37) = SmartTags("Tag_38")
- P(38) = SmartTags("Tag_39")
- P(39) = SmartTags("Tag_40")
- P(40) = SmartTags("Tag_41")
- P(41) = SmartTags("Tag_42")
- P(42) = SmartTags("Tag_43")
- P(43) = SmartTags("Tag_44")
- P(44) = SmartTags("Tag_45")
- Dim W(100)
- W(0) = SmartTags("盘纸加热温度上限报警计数")
- W(1) = SmartTags("融胶器温度上限报警计数")
- W(2) = SmartTags("胶管温度上限报警计数")
- W(3) = SmartTags("胶泵温度上限报警计数")
- W(4) = SmartTags("预加热温度上限报警计数")
- W(5) = SmartTags("接缝喷嘴温度上限报警计数")
- W(6) = SmartTags("烟枪温度上限报警计数")
- W(7) = SmartTags("盘纸加热温度下限报警计数")
- W(8) = SmartTags("融胶器温度下限报警计数")
- W(9) = SmartTags("胶管温度下限报警计数")
- W(10) = SmartTags("胶泵温度下限报警计数")
- W(11) = SmartTags("预加热温度下限报警计数")
- W(12) = SmartTags("接缝喷嘴温度下限报警计数")
- W(13) = SmartTags("烟枪温度下限报警计数")
- W(14) = SmartTags("KF紧急停机计数")
- W(15) = SmartTags("KF电机过载计数")
- W(16) = SmartTags("KF上胶未启动计数")
- W(17) = SmartTags("KF空气压力计数")
- W(18) = SmartTags("KF冷却风压力计数")
- W(19) = SmartTags("KF油压低计数")
- W(20) = SmartTags("KF分烟轮联锁计数")
- W(21) = SmartTags("KF刀头联锁计数")
- W(22) = SmartTags("KF接纸保护计数")
- W(23) = SmartTags("AF紧急停机计数")
- W(24) = SmartTags("AF电机过载计数")
- W(25) = SmartTags("AF橡胶轮安全罩联锁计数")
- W(26) = SmartTags("AF增塑剂液位计数")
- W(27) = SmartTags("AF电子流量计数")
- W(28) = SmartTags("主电机伺服报警计数")
- W(29) = SmartTags("1#辊伺服报警计数")
- W(30) = SmartTags("2#辊伺服报警计数")
- W(31) = SmartTags("3#辊伺服报警计数")
- W(32) = SmartTags("计量泵伺服报警计数")
- W(33) = SmartTags("跑条计数")
- W(34) = SmartTags("飞花选项计数")
- W(35) = SmartTags("甘油溢出报警计数")
- W(36) = SmartTags("下游机停机计数")
- W(37) = SmartTags("有指令不运行计数")
- W(38) = SmartTags("出口堵塞计数")
- W(39) = SmartTags("盘纸变频报警计数")
- W(40) = SmartTags("甘油流量异常计数")
- W(41) = SmartTags("电位器置为0计数")
- W(42) = SmartTags("甘油高温报警计数")
- W(43) = SmartTags("甘油低温报警计数")
- W(44) = SmartTags("开合门伺服报警计数")
- Dim U(100)
- U(0) = SmartTags("盘纸加热温度上限报警时间")
- U(1) = SmartTags("融胶器温度上限报警时间")
- U(2) = SmartTags("胶管温度上限报警时间")
- U(3) = SmartTags("胶泵温度上限报警时间")
- U(4) = SmartTags("预加热温度上限报警时间")
- U(5) = SmartTags("接缝喷嘴温度上限报警时间")
- U(6) = SmartTags("烟枪温度上限报警时间")
- U(7) = SmartTags("盘纸加热温度下限报警时间")
- U(8) = SmartTags("融胶器温度下限报警时间")
- U(9) = SmartTags("胶管温度下限报警时间")
- U(10) = SmartTags("胶泵温度下限报警时间")
- U(11) = SmartTags("预加热温度下限报警时间")
- U(12) = SmartTags("接缝喷嘴温度下限报警时间")
- U(13) = SmartTags("烟枪温度下限报警时间")
- U(14) = SmartTags("KF紧急停机时间")
- U(15) = SmartTags("KF电机过载时间")
- U(16) = SmartTags("KF上胶未启动时间")
- U(17) = SmartTags("KF空气压力时间")
- U(18) = SmartTags("KF冷却风压力时间")
- U(19) = SmartTags("KF油压低时间")
- U(20) = SmartTags("KF分烟轮联锁时间")
- U(21) = SmartTags("KF刀头联锁时间")
- U(22) = SmartTags("KF接纸保护时间")
- U(23) = SmartTags("AF紧急停机时间")
- U(24) = SmartTags("AF电机过载时间")
- U(25) = SmartTags("AF橡胶轮安全罩联锁时间")
- U(26) = SmartTags("AF增塑剂液位时间")
- U(27) = SmartTags("AF电子流量时间")
- U(28) = SmartTags("主电机伺服报警时间")
- U(29) = SmartTags("1#辊伺服报警时间")
- U(30) = SmartTags("2#辊伺服报警时间")
- U(31) = SmartTags("3#辊伺服报警时间")
- U(32) = SmartTags("计量泵伺服报警时间")
- U(33) = SmartTags("跑条时间")
- U(34) = SmartTags("飞花选项时间")
- U(35) = SmartTags("甘油溢出报警时间")
- U(36) = SmartTags("下游机停机时间")
- U(37) = SmartTags("有指令不运行时间")
- U(38) = SmartTags("出口堵塞时间")
- U(39) = SmartTags("盘纸变频报警时间")
- U(40) = SmartTags("甘油流量异常时间")
- U(41) = SmartTags("电位器置为0时间")
- U(42) = SmartTags("甘油高温报警时间")
- U(43) = SmartTags("甘油低温报警时间")
- U(44) = SmartTags("开合门伺服报警时间")
- Dim I
- Dim TIME1
- Dim TIME2
- Dim TIME3
- Dim G1
- If SmartTags("Mark._160") > 0 Then
- I = SmartTags("Mark._160") - 1
- End If
- If SmartTags("Mark._160") = B(I) Then
- P(I) = 1
- TIME1 = Timer
- W(I) = W(I) + 1
- Else
- P(I) = 0
- End If
- If SmartTags("Mark._160") = 0 And B(I) = I + 1 Then
- TIME2 = Timer
- If TIME2 > TIME1 Then
- TIME3 = TIME2 - TIME1
- ElseIf TIME2 < 36000 And TIME1 > 79200 Then
- TIME3 = TIME2 - TIME1 + 86400
- End If
- U(I) = U(I) + DateAdd("S" , TIME3 , "00:00:00")
- End If
欢迎光临 批处理之家 (http://bathome.net./) | Powered by Discuz! 7.2 |