WINCC运行脚本语言求翻译

SmartTags("repair") = False
If SmartTags("Pieces") >0 Then
   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()
End If

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,也就是复位它。

原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc138041.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2017年6月1日 上午1:18
下一篇 2017年6月1日 上午1:18

相关推荐

  • TP1200下载问题

    我用博图V13转换了以前MP277的程序 但仿真的时候文件出现下面图片的报警  帮忙解决一下 谢谢 图片说明:    最…

    2017年6月9日
  • winCC flexible2008sp3

    系统是win7旗舰版,已经安装了winCC flexible2008 sp3,现在想要安装winCC flexible2008 SP4版,怕…

    SIMATIC Panel 2017年7月25日
  • 求博途V13 HMI的画面库文件

    最近在做触摸屏,用的精简屏,发现博途HMI里的画面元素太少了。请问在哪里可以下载到画面文件?谢谢。 最佳答案 博途里的文件是不能下载到的,可以冲相关的库文件中查找,如果不满足要求,…

    SIMATIC Panel 2017年6月2日
  • SMARTLINE 700 IE 触摸屏 modbus通讯

    SMARTLINE 700 IE 触摸屏是用最高万位区分区域的,还是通过功能码自动区分区域的。我现在碰到的情况是,在跟有最高万位区分的MODBUS设备…

    2017年6月13日
  • plc200与smart700数据通讯

    在700中设置输入变量vw100,在plc中计时器参数也是vw100,那么是否触摸屏输入数据,计时器也是以该数计时? 最佳答案 是的。因为200的定时器,计数器允许直接使用VW整数…

    SIMATIC Panel 2017年6月24日
  • 请教一下10寸屏的大概价格

    设备原有屏只有6英寸,很多内容特别是图形显示有限,想跟领导申请换块10寸屏,不知道像老的的MP277-10或者KTP1000/1200大概都在什么价位。不需要很精确,大概的就行。谢…

    SIMATIC Panel 2017年6月4日
  • 西门子触摸屏图库

    谁有西门子触摸屏精致屏和SMART屏目的图库,相按钮,指示灯等 最佳答案 官方没有额外的图库进行下载,只能是使用全局库中自带的内容。要是你精于绘图的话,可以自己创建这些图,然后打包…

    SIMATIC Panel 2017年6月1日
  • OP177B现在可用什么型号的屏替代

    OP177B现在可用什么型号的屏替代 最佳答案 SIMATIC OP 77B、TP/OP 177B、TP/OP 277、MP 17…

    SIMATIC Panel 2017年6月8日
  • smart line 1000操作手册

    smart line 1000操作手册 最佳答案 SIMATIC HMI设备 Smart 700 IE、Smart&nb…

    SIMATIC Panel 2017年6月10日
  • 西门子触摸屏MP370怎么输入11位数字

    在触摸屏里做一个输入编号,要11位数,例如:50522013200这在触摸屏里数据类型怎么选?最好用实图说明哦,谢谢 最佳答案 西门子的是32位的处理器,最大处理10位长度的整形数…

    SIMATIC Panel 2017年8月18日