Api.SoeWriteSsc 方法
透過 SoE (Servo drive profile over EtherCAT) 將資料從 EtherCAT 主站下載到 EtherCAT 從站。
命名空間:IntervalZero.KINGSTAR.Local.Api
組合: IntervalZero.KINGSTAR.Local.Api (於 IntervalZero.KINGSTAR.Local.dll) 版本:4.4.0.0
語法
public KsCommandStatus SoeWriteSsc(
int SlaveId,
byte DriveNo,
byte ElementFlags,
ushort Idn,
byte[] Value
)
Public Function SoeWriteSsc(
SlaveId As Integer,
DriveNo As Byte,
ElementFlags As Byte,
Idn As UShort,
Value As Byte()
) As KsCommandStatus
參數
SlaveId
型別:int
即從站索引 (Slave Index)。此索引是 KINGSTAR 主站於 EtherCAT 網路啟動時,根據實體連接順序自動指派的。直接連線到主站的第一個裝置會被指派為索引 0 (Index 0),接著是索引 1、索引 2,依此類推。即使新增、移除或重新連線裝置,這些索引在從站陣列中也會保持一致。請參閱 熱插拔 (HotConnect)、修復與重啟 中的使用案例以了解更多詳細資訊。
DriveNo
型別:byte
驅動器的索引。
ElementFlags
型別:byte
寫入 IDN 的哪個屬性。
Idn
型別:ushort
物件的身分識別碼。
Value
型別:byte[]
欲寫入的值。
回傳值
回傳 KsCommandStatus 類別。
可用的 EtherCAT 狀態
ecatPreOp, ecatSafeOp, ecatOp
範例
N/A
參見