用法
宣告備份變數。關於規格,請參閱下列章節。
以下為變數的定義範例。
' 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。
← 概述 取得機器人控制資訊資料 →