RequestState

Requests the KINGSTAR Subsystem to go into the specified EtherCAT state. For example, if the state is Op, and your requested state is PreOp, the KINGSTAR Subsystem will change the state to Op -> SafeOp -> PreOp. If the state is Init and your requested state is Op, the Subsystem will change the state to Init -> PreOp -> SafeOp -> Op.

Syntax

KsCommandStatus RequestState(
     EthercatState State
);

Parameters

State: the requested EtherCAT state. See the EthercatState type.

Return value

Returns the KsCommandStatus structure.

Usable EtherCAT states

ecatOffline, ecatInit, ecatBoot, ecatPreOP, ecatSafeOP, ecatOP

Example

Copy
WaitForCommand(5, TRUE, RequestState(ecatSafeOP));

Requirements

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

See also

GetStatus

RequestSlaveState