Library.AoeWriteControlCommand Method

Sends a command to a SubDevice through Automation Device Specification over EtherCAT (AoE).

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

Syntax

Copy
public CommandStatus AoeWriteControlCommand(
    EcatHandle subDevice,
    ushort port,
    ushort aoeState,
    ushort deviceState,
    byte[] value
)

Parameters

subDevice

Type: EcatHandle
A handle to a SubDevice. To retrieve the corresponding handle, use OpenSubDeviceByIndex, OpenSubDeviceByStationAddress, or OpenSubDeviceByExplicitId.

port

Type: UInt16
The SubDevice port.

aoeState

Type: UInt16
The AoE state during the execution of a command.

deviceState

Type: UInt16
The device state during the execution of a command. The state may vary between devices.

value

Type: Byte[]
A buffer that contains the data to write to the SubDevice.

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.

ecatErrNullParameter

Parameter value is null.

ecatErrWrongParameter

One of the following conditions occurred:

  • Parameter subDevice is invalid.
  • Parameter value is 0.

ecatErrMainDeviceNotReady

The MainDevice is not ready.

ecatErrFeatureUnavailable

The SubDevice doesn't support AoE.

See Also: