Api.AoeWriteCommand 方法
透過 AoE (ADS over EtherCAT) 寫入資料。
命名空間:IntervalZero.KINGSTAR.OpcUa.Api
組合: IntervalZero.KINGSTAR.OpcUa.Api (於 IntervalZero.KINGSTAR.OpcUa.Client.dll) 版本:4.4.0.0
語法
public KsCommandStatus AoeWriteCommand(
int SlaveId,
int Port,
int IndexGroup,
int IndexOffset,
byte[] Value
)
Public Function AoeWriteCommand(
SlaveId As Integer,
Port As Integer,
IndexGroup As Integer,
IndexOffset As Integer,
Value As Byte[]
) As KsCommandStatus
參數
SlaveId
型別:int
即從站索引 (Slave Index)。此索引是 KINGSTAR 主站於 EtherCAT 網路啟動時,根據實體連接順序自動指派的。直接連線到主站的第一個裝置會被指派為索引 0 (Index 0),接著是索引 1、索引 2,依此類推。即使新增、移除或重新連線裝置,這些索引在從站陣列中也會保持一致。請參閱 熱插拔 (HotConnect)、修復與重啟 中的使用案例以了解更多詳細資訊。
Port
型別:int
EtherCAT 從站埠。
IndexGroup
型別:int
欲寫入的物件索引群組。
IndexOffset
型別:int
群組中物件的偏移量。
Value
型別:byte[]
包含欲寫入的值的緩衝區。
回傳值
回傳一個方法的狀態。
可用的 EtherCAT 狀態
ecatPreOP, ecatSafeOP, ecatOP
範例
N/A
參見