用法

对备份变量进行声明。有关规格,请参阅以下内容。

概要

变量的定义示例如下所示。

‘ OPC UA 输出用的变量
Global Preserve UShort OPCUA_ItemCode
Global Preserve UInt32 OPCUA_ElectricPower
Global Preserve UInt32 OPCUA_NumOfProduced
Global Preserve UInt32 OPCUA_NumOfDefective
Global Preserve UShort OPCUA_CycleTime
Global Preserve UInt32 OPCUA_ConsumedStatus
Global Preserve UShort OPCUA_OperatingStatus
Global Preserve UInt32 OPCUA_ErrorCode

SPEL 变量节点将显示在地址空间的以下位置。

Objects>DeviceSet>MotionDeviceSystemIdentifier>Controllers>Components>SpelProject>BackupVariables

注意


  • 请务必对想要通过OPC UA读取的SPEL变量添加前缀“OPCUA_”。
  • 为了反映变量的定义(包括类型和变量名称的更改、变量的添加和删除),请在构建项目后重新启动OPC UA Server。