VBS脚本代码意思

HMIRuntime.Tags(

问题补充:
If HMIRuntime.Tags("Registed").Read And HMIRuntime.Screens("START").ScreenItems("SW").Visible  
这句怎么理解?
If HMIRuntime.Tags("ThisHour").read(1) <> -1 And _
    HMIRuntime.Tags("ThisHour").read(0) <> HH Then
  HMIRuntime.Trace  vbCrLf &  "Add a new record!" 
 HMIRuntime.Trace   vbCrLf & "ThisDay=" & Date &";ThisTime=" & Time  
  HMIRuntime.Tags("@UA_Boiler_ID").Write  -1
  HMIRuntime.Tags("@UA_Boiler_Job").Write 6


 End If
特别是read(1)怎么理解?


一个按钮的允许操作员操作属性,连接一个二进制变量是什么意思,那是指为1时操作还是为0时操作呢?
非常感谢

最佳答案

HMIRuntime.Tags
HMIRuntime是WinCC运行时对象
Tags是变量集合
比如读变量“TAG_1"的值,HMIRuntime.Tags("TAG_1").Read

_______________________________________________________________________

If HMIRuntime.Tags("Registed").Read And HMIRuntime.Screens("START").ScreenItems("SW").Visible  
如果 变量"Registed"的值不为0并且画面"START"里的对象"SW"是显示的

Read(1)是直接读通道获得变量值,就相当于PLC里直接访问IO外设

一个按钮的允许操作员操作属性,连接一个二进制变量,当然是变量为真时允许操作

提问者对于答案的评价:
谢谢

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

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2019年6月11日
下一篇 2019年6月11日

相关推荐