GetCommandsStatus

Gets the states of commands.

Syntax

KsError GetCommandsStatus(
     int Length,
     KsCommandStatus* Statuses
);

Parameters

Length: the number of commands.

Statuses: the array of commands you want to get their states. It can be filled with the commands whose return type is KsCommandStatus, or a returned KsCommandStatus structure.

Return value

If the function succeeds, it returns errNoError, otherwise an error code. For more information about the error code, see the KsError list.

Remarks

Usable EtherCAT states

ecatOffline, ecatInit, ecatBoot, ecatPreOP, ecatSafeOP, ecatOP

Example

Copy
KsCommandStatus Statuses[2] = { {0} };

Statuses[0] = MoveAxisAbsolute(0, 500, 3600, 36000, 36000, 3600000,
                               McDirection::mcPositiveDirection, McBufferMode::mcAborting);
Statuses[1] = MoveAxisAbsolute(0, 1000, 4000, 40000, 40000, 4000000,
                               McDirection::mcPositiveDirection, McBufferMode::mcBlendingLow);

KsError nRet = GetCommandsStatus(2, Statuses);

Requirements

  RT Win32
Minimum supported version 4.2 4.2
Header ksapi.h ksapi.h
Library KsApi_Rtss.lib KsApi.lib

See also

AbortCommand

GetCommandStatus

WaitForCommand