Api.AoeWriteControlCommand 方法

透过 AoE (ADS over EtherCAT) 传送命令给装置。

命名空间IntervalZero.KINGSTAR.OpcUa.Api

组合: IntervalZero.KINGSTAR.OpcUa.Api (于 IntervalZero.KINGSTAR.OpcUa.Client.dll) 版本:4.4.0.0

语法

C#VB
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

从站阵列的索引。当 EtherCAT 从站装置启动时,此索引具有与 SlaveId 相同的值,该值对应于从站装置在网路中的位置。请注意,在 EtherCAT 进入运行 (Op) 状态后,加入或移除网路上的任何从站装置将改变各装置在网路中的位置 (SlaveId)。尽管如此,从站的索引将保持不变。新增的装置将排列在阵列的末端。对于更改后的所有从站,索引和 SlaveId 将不再匹配。上述行为模式仅适用于实体装置;不适用于模拟装置。详细资讯请参阅 EnableHotConnect 中的使用案例。

 

Port

型别:int

EtherCAT 从站埠。

 

AoeState

型别:ushort

命令执行时的 AoE 状态。

 

DeviceState

型别:ushort

命令执行时的装置状态,不同装置有不同状态。

 

Value

型别:byte[]

执行命令的值。

回传值

型别:KsCommandStatus

回传 KsCommandStatus 类别。

可用的 EtherCAT 状态

ecatPreOP, ecatSafeOP, ecatOP

范例

C#
                N/A
            

参见

Api 类别

IntervalZero.KINGSTAR.OpcUa.Api 命名空间