GetCommandStatus

獲取命令狀態。

語法

KsCommandStatus GetCommandStatus(
     KsCommandStatus Status
);

參數

Status:欲獲得狀態的命令。可用返回類型為 KsCommandStatus 的命令或返回的 KsCommandStatus 結構來輸入。

回傳值

返回 KsCommandStatus 結構。

備註

GetCommandStatusStatus 值不應為空值, 而是另一個如 Start 的命令值。

可用的 EtherCAT 狀態

ecatOffline, ecatInit, ecatBoot, ecatPreOP, ecatSafeOP, ecatOP

範例

複製
KsCommandStatus commandStop = Stop();
// Some operation in your application
commandStop = GetCommandStatus(commandStop);

使用需求

  RT Win32
最低支援版本 4.0 4.0
標頭檔 ksapi.h ksapi.h
程式庫 KsApi_Rtss.lib KsApi.lib

參見

AbortCommand

GetCommandsStatus

WaitForCommand