Library.CreateMainDevice Method

Creates a MainDevice instance.

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 CreateMainDevice(
    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.

ecatErrNoLicense

One of the following conditions occurred:

  • No E-CAT Fieldbus license is available.
  • The number of E-CAT Fieldbus instances exceeds the limit of your current license when the value of instance is greater than 1. A MaxRT wRTOS E-CAT Multiple MainDevices license is required to support multiple MainDevice instances.

ecatErrTimeout

Can't launch the MainDevice instance properly.

See Also: