Component.CreateInstance Method

Creates a MainDevice instance.

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

Syntax

Copy
public void CreateInstance(
    Instance instance
)

Parameters

instance

Type: Instance
Parameters for the MainDevice instance.

Return Value

ArgumentNullException is thrown when parameter instance is null.

EcatNativeException is thrown when any of these errors occur:

Error code Meaning

ERROR_INVALID_PARAMETER

One of the following conditions occurred:

  • instance.InstanceID is greater than or equal to 63.
  • instance.IdealProcessor does not correspond to one of the cores assigned to the real-time Subsystem.
  • instance.PrimaryNetworkInterfaceName and instance.SecondaryNetworkInterfaceName are the same.
  • The length of instance.PrimaryNetworkInterfaceName is 0 but the length of instance.SecondaryNetworkInterfaceName is not.

ERROR_ALREADY_EXISTS

The MainDevice instance is already defined in the registry.

ERROR_NOT_ENOUGH_MEMORY

Internal memory allocation failed.

ERROR_ALREADY_ASSIGNED

One of the following conditions occurred:

  • instance.IdealProcessor is used by another MainDevice instance.
  • instance.DisplayName is used by another MainDevice instance.
  • instance.PrimaryNetworkInterfaceName is used by another MainDevice instance.
  • instance.SecondaryNetworkInterfaceName is used by another MainDevice instance.

ERROR_NOT_FOUND

One of the following conditions occurred:

  • instance.PrimaryNetworkInterfaceName does not exist in the NL2 interface list.
  • instance.SecondaryNetworkInterfaceName does not exist in the NL2 interface list.

See Also: