将OPC服务器的变量解析为SystemLink Tag以跟踪、更新或可视化系统中的外部数据。

OPC中的变量相当于SystemLink中的Tag。要像SystemLink Tag一样对OPC UA变量进行读写之前,必须先安装NI SystemLink Server OPC模块并连接到OPC服务器,同时需确保SystemLink支持变量的数据类型。
  1. 在OPC会话的根目录中,浏览至OPC服务器上变量的位置。
  2. 单击创建监视器将变量关联到Tag。
    请参考下表确定OPC UA变量数据类型对应的SystemLink数据类型。
    OPC UA变量数据类型 SystemLink Tag数据类型
    • bool
    • boolean
    布尔
    • float
    • double
    双精度
    • int
    • int32
    • byte
    • short
    • int16
    • uint16
    • uint
    • number
    Int
    • uint32
    • uint64
    UInt64
    • bytestring
    • string
    字符串
    • datetime
    • utctime
    日期时间
    监视器可监控OPC UA变量并将其值写入相应的SystemLink Tag。 Data from the OPC UA variable will now show as tag data in Tags, and you can visualize this tag data with Dashboards.
  3. 可选: 要暂停监视器对Tag的写入,请单击暂停监视器。要删除SystemLink和OPC UA变量之间的关联,请单击删除监视器

将变量映射至Tag后,即可实时读取更新的Tag值。如果对相应的SystemLink Tag做出了任何更改,OPC UA变量也将随之更新。