当前位置: 主页 > PLC控制

WINCC运行脚本语言求翻译

SmaRTTags("repair")=False
IfSmartTags("PieCEs")>0Then
SmartTags("shift20")=SmartTags("shift19")
SmartTags("shift19")=SmartTags("shift18")
SmartTags("shift18")=SmartTags("shift17")
SmartTags("shift17")=SmartTags("shift16")
SmartTags("shift16")=SmartTags("shift15")
SmartTags("shift15")=SmartTags("shift14")
SmartTags("shift14")=SmartTags("shift13")
SmartTags("shift13")=SmartTags("shift12")
SmartTags("shift12")=SmartTags("shift11")
SmartTags("shift11")=SmartTags("shift10")
SmartTags("shift10")=SmartTags("shift9")
SmartTags("shift9")=SmartTags("shift8")
SmartTags("shift8")=SmartTags("shift7")
SmartTags("shift7")=SmartTags("shift6")
SmartTags("shift6")=SmartTags("shift5")
SmartTags("shift5")=SmartTags("shift4")
SmartTags("shift4")=SmartTags("shift3")
SmartTags("shift3")=SmartTags("shift2")
SmartTags("shift2")=SmartTags("shift1")
SmartTags("shift1")=SmartTags("shift0")
SmartTags("shift0")=SmartTags("PiecES")
‘=============
SmartTags("DAteTimeShfit20")=SmartTags("DateTimeShfit19")
SmartTags("DateTimeShfit19")=SmartTags("DateTimeShfit18")
SmartTags("DateTimeShfit18")=SmartTags("DateTimeShfit17")
SmartTags("DateTimeShfit17")=SmartTags("DateTimeShfit16")
SmartTags("DateTimeShfit16")=SmartTags("DateTimeShfit15")
SmartTags("DateTimeShfit15")=SmartTags("DateTimeShfit14")
SmartTags("DateTimeShfit14")=SmartTags("DateTimeShfit13")
SmartTags("DateTimeShfit13")=SmartTags("DateTimeShfit12")
SmartTags("DateTimeShfit12")=SmartTags("DateTimeShfit11")
SmartTags("DateTimeShfit11")=SmartTags("DateTimeShfit10")
SmartTags("DateTimeShfit10")=SmartTags("DateTimeShfit9")
SmartTags("DateTimeShfit9")=SmartTags("DateTimeShfit8")
SmartTags("DateTimeShfit8")=SmartTags("DateTimeShfit7")
SmartTags("DateTimeShfit7")=SmartTags("DateTimeShfit6")
SmartTags("DateTimeShfit6")=SmartTags("DateTimeShfit5")
SmartTags("DateTimeShfit5")=SmartTags("DateTimeShfit4")
SmartTags("DateTimeShfit4")=SmartTags("DateTimeShfit3")
SmartTags("DateTimeShfit3")=SmartTags("DateTimeShfit2")
SmartTags("DateTimeShfit2")=SmartTags("DateTimeShfit1")
SmartTags("DateTimeShfit1")=SmartTags("DateTimeShfit0")
SmartTags("DateTimeShfit0")=Now()
EndIf

repairtime_19=repairtime_18
repairtime_18=repairtime_17
repairtime_17=repairtime_16
repairtime_16=repairtime_15
repairtime_15=repairtime_14
repairtime_14=repairtime_13
repairtime_13=repairtime_12
repairtime_12=repairtime_11
repairtime_11=repairtime_10
repairtime_9=repairtime_8
repairtime_8=repairtime_7
repairtime_7=repairtime_6
repairtime_6=repairtime_5
repairtime_5=repairtime_4
repairtime_4=repairtime_3
repairtime_3=repairtime_2
repairtime_2=repairtime_1
repairtime_1=repairtime_0
repairtime_0=repairtime_m
repairtime_PLC=0
repairtime_m=0
repairtime_s=0

最佳答案

这就是fifo队列呀!Pieces大于0,则数据移位,当前数据Pieces保存变量shift0中。
移位时间,修理时间也是同样的处理方式。
最后三个变量赋值为0

提问者对于答案的评价:
谢谢,但是SmartTags("repair")=False的含义呢

最佳答案作者回复:
那说明你的这个变量repair是bool量,给这个变量赋值0,也就是复位它。

  • 关注微信

猜你喜欢

微信公众号