zoukankan      html  css  js  c++  java
  • 以OPC PowerTool 连接iFix与KEPWARE

    1、安装完iFix后,再安装KEPWARE软件,然后必须再安装所需要的IO驱动才能进行device的通讯连接。这里安装iFix本身提供的OPC PowerTool V7.34a。

    2、在安装完iFix的OPC驱动后,在iFix中启动OPC PowerTool,开始-》程序-》Proficy HMI SCADA - iFIX 4.0-》OPC PowerTool。

    image

    3、点击左下角的“add opc server”按钮增加一个opc server连接。在弹出对话框中会出现本机所有安装的opc server。选择kepwareEx.v4。

    image

    4、增加group,点击左下角“add group”按钮,再增加Item,点击“add item”按钮以增加一item项目。

    5、在item中点击“browse server”按钮,浏览选择欲连接的PLC变量,点击“OK”确认选择,opc item setting中item框自动填入Channel_1.Device_1.Tag_1。

    image

    6、勾选server1,group1,item1上的“Enable”选框,单击工具栏上的“start”按钮和“statistics”按钮,启动监视和数据统计,可以看到data状态为“good”表示通讯成功。单击“data monitor”按钮,可看到驱动中的数据,单击“Refresh”按钮,数据随之变化。

    image

    image

    7、打开iFix的PDB,建立变量AI,驱动选择OPC,IO地址填写Server1;Group1;Channel_1.Device_1.Tag_1,保存后刷新数据库,即可看到AI数据随着Kepware中数据的变化而同步刷新。

    image

    8、建立新画面,在新画面中选择“数据连接戳”,变量选择AI,按CTRL+W后即可看到数据变化。

    image

    9、布尔量的读写:在PDB中建立变量do与kepware中的bool变量相连接,方法同上。建立两个按钮,set/reset,分别编写脚本如下,可实现bool值的翻转。

    Private Sub CommandButton2_Click()
       WRITEVALUE "0", "do"
    End Sub

    Private Sub CommandButton1_Click()
       WRITEVALUE "1", "do"
    End Sub

  • 相关阅读:
    CSS盒子模型
    getContextPath、getServletPath、getRequestURI、request.getRealPath的区别
    MYSQL中的CASE WHEN END AS
    单点登录的精华总结
    git&github
    June 21st 2017 Week 25th Wednesday
    June 20th 2017 Week 25th Tuesday
    June 19th 2017 Week 25th Monday
    June 18th 2017 Week 25th Sunday
    June 17th 2017 Week 24th Saturday
  • 原文地址:https://www.cnblogs.com/xpvincent/p/3331751.html
Copyright © 2011-2022 走看看