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
参见