Library.WaitForCommand (double, bool, CommandStatus<uint>) Method

Waits for a CommandStatus<uint> type command for a specified time duration.

Namespace:  IntervalZero.MaxRT.Ecat.Api.NetApi
Assembly:  IntervalZero.MaxRT.Ecat (in IntervalZero.MaxRT.Ecat.dll) Version: 1.0.0.0 (File version: 1.0.1)

Syntax

Copy
public CommandStatus<uint> WaitForCommand(
    double timeout,
    bool abortOnTimeout,
    CommandStatus<uint> status
)

Parameters

timeout

Type: Double
The time duration to wait.

abortOnTimeout

Type: Boolean
true to abort the command when the time duration elapses, false otherwise.

status

Type: CommandStatus<uint>
The status of the command to be waited on.

Return Value

This method returns a CommandStatus class. If an error occurs, property State in CommandStatus is set to ecatCommandError, and the error code is stored in property ErrorId.

Possible errors:

Error code Meaning

ecatErrNoError

The function succeeded.

ecatErrWrongParameter

The command is not active.

ecatErrMainDeviceNotReady

The MainDevice is not ready.

See Also: