Api.VoeWrite 方法

透過 VoE (Vendor-specific protocol over EtherCAT) 將資料寫入具有 VoE 功能的裝置。

命名空間IntervalZero.KINGSTAR.Local.Api

組合: IntervalZero.KINGSTAR.Local.Api (於 IntervalZero.KINGSTAR.Local.dll) 版本:4.4.0.0

語法

C#VB
public KsCommandStatus VoeWrite(
       int SlaveId,
       uint VendorId,
       ushort VendorType,
       byte[] Data
)
Public Function VoeWrite(
       SlaveId As Integer,
       VendorId As UInteger,
       VendorType As UShort,
       Data As Byte()
) As KsCommandStatus

參數

SlaveId

型別:int

即從站索引 (Slave Index)。此索引是 KINGSTAR 主站於 EtherCAT 網路啟動時,根據實體連接順序自動指派的。直接連線到主站的第一個裝置會被指派為索引 0 (Index 0),接著是索引 1、索引 2,依此類推。即使新增、移除或重新連線裝置,這些索引在從站陣列中也會保持一致。請參閱 熱插拔 (HotConnect)、修復與重啟 中的使用案例以了解更多詳細資訊。

 

VendorId

型別:uint

供應商 ID。

 

VendorType

型別:ushort

供應商類型。

 

Data

型別:byte[]

欲寫入的資料。

回傳值

型別:KsCommandStatus

回傳 KsCommandStatus 類別。

備註

欲在發送 VoeWrite 後查看已啟用 VoE 功能的裝置反應,需使用 RegisterMailboxCallback 來擷取 VoE 訊息。

可用的 EtherCAT 狀態

ecatPreOp, ecatSafeOp, ecatOp

範例

C#
                N/A
            

參見

Api 類別

IntervalZero.KINGSTAR.Local.Api 命名空間