Read data
其中 data 是读取变量的方法,如果data=1,直接从 AS 系统读取,相当于C 脚本中的 Get*****wait() 函数,如果省略,则从Wincc 变量管理器中建立的变量中读取。文章源自公式库网-https://www.gongshiku.com/html/201908/wincczhongruheshiyongvbsduxiebianliangjulishuoming.html
Write data , 1文章源自公式库网-https://www.gongshiku.com/html/201908/wincczhongruheshiyongvbsduxiebianliangjulishuoming.html
其中 data 是需要写入变量的数值,1 代表直接写入 AS 系统,相当于C 脚本中的 Set*****wait() 函数,1 省略,则写入到由 Wincc变量管理器建立的变量中去。文章源自公式库网-https://www.gongshiku.com/html/201908/wincczhongruheshiyongvbsduxiebianliangjulishuoming.html
实例:文章源自公式库网-https://www.gongshiku.com/html/201908/wincczhongruheshiyongvbsduxiebianliangjulishuoming.html
读取变量的方法:文章源自公式库网-https://www.gongshiku.com/html/201908/wincczhongruheshiyongvbsduxiebianliangjulishuoming.html
1.[code]文章源自公式库网-https://www.gongshiku.com/html/201908/wincczhongruheshiyongvbsduxiebianliangjulishuoming.html
Dim objTag文章源自公式库网-https://www.gongshiku.com/html/201908/wincczhongruheshiyongvbsduxiebianliangjulishuoming.html
Set objTag=HMIRunTime.Tags("变量名")文章源自公式库网-https://www.gongshiku.com/html/201908/wincczhongruheshiyongvbsduxiebianliangjulishuoming.html
[/code]文章源自公式库网-https://www.gongshiku.com/html/201908/wincczhongruheshiyongvbsduxiebianliangjulishuoming.html
文章源自公式库网-https://www.gongshiku.com/html/201908/wincczhongruheshiyongvbsduxiebianliangjulishuoming.html
2.[code]objTag.Read
HMIRunTime.Tags("变量名").Read
[/code]