Api.AoeReadCommand 方法

透过 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<byte[]> AoeReadCommand(
       int SlaveId,
       int Port,
       int IndexGroup,
       int IndexOffset,
       int Length
)
Public Function AoeReadCommand(
       SlaveId As Integer,
       Port As Integer,
       IndexGroup As Integer,
       IndexOffset As Integer,
       Length As Integer
) As KsCommandStatus(Of Byte[])

参数

SlaveId

型别:int

即从站索引 (Slave Index)。此索引是 KINGSTAR 主站于 EtherCAT 网路启动时,根据实体连接顺序自动指派的。直接连线到主站的第一个装置会被指派为索引 0 (Index 0),接著是索引 1、索引 2,依此类推。即使新增、移除或重新连线装置,这些索引在从站阵列中也会保持一致。请参阅 热插拔 (HotConnect)、修复与重启 中的使用案例以了解更多详细资讯。

 

Port

型别:int

EtherCAT 从站埠。

 

IndexGroup

型别:int

欲读取的物件索引群组。

 

IndexOffset

型别:int

群组中物件的偏移量。

 

Length

型别:int

欲读取的值其长度(单位:位元组)。

回传值

型别:KsCommandStatus<byte[]>

回传一个方法的状态及一个位元组阵列。

可用的 EtherCAT 状态

ecatPreOP, ecatSafeOP, ecatOP

范例

C#
N/A

参见

Api 类别

IntervalZero.KINGSTAR.OpcUa.Api 命名空间