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