Library.OpenMainDevice Method

Opens a MainDevice.

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 EcatErrorCode OpenMainDevice(
    ref EcatHandle mainDevice,
    uint instance
)

Parameters

mainDevice

Type: EcatHandle
A reference to a MainDevice handle.

instance

Type: UInt32
The index of the MainDevice instance.

Return Value

EcatErrorCode is thrown when any of these errors occur:

Error code Meaning

ecatErrNoError

The function succeeded.

ecatErrNullParameter

Parameter mainDevice is null.

ecatErrWrongParameter

Parameter instance is greater than 62.

ecatErrMainDeviceNotReady

The MainDevice instance does not exist.

See Also: