Library.SetFeatureStatus Method

Sets the configuration of an E-CAT startup feature.

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 EcatErrorCode SetFeatureStatus(
    EcatHandle mainDevice,
    EcatFeature feature,
    double status
)

Parameters

mainDevice

Type: EcatHandle
A handle to a MainDevice. To retrieve the corresponding handle, use CreateMainDevice or OpenMainDevice.

feature

Type: EcatFeature
The E-CAT feature to be configured.

status

Type: Double
A value to set the feature status.

Return Value

EcatErrorCode is thrown when any of these errors occur:

Error code Meaning

ecatErrNoError

The function succeeded.

ecatErrWrongParameter

One of the following conditions occurred:

  • Parameter mainDevice is invalid.
  • Parameter feature is invalid.
  • Parameter status is less than 100 or greater than 2,000 when feature is ecatFeatureCycleTime.
  • Parameter status is less than 0 or greater than 6 when feature is ecatFeatureAccessMode.

ecatErrMainDeviceNotReady

The MainDevice instance does not exist.

ecatErrNoLicense

One of the following conditions occurred:

  • Parameter status is less than 1,000 when feature is ecatFeatureCycleTime. A MaxRT wRTOS E-CAT High Speed Timer license is required to support an EtherCAT cycle time of less than 1,000 microseconds.
  • Parameter status is greater than 1 when feature is ecatFeatureHotConnect. A MaxRT wRTOS E-CAT Hot Connect license is required to support Hot Connect
  • Parameter status is greater than 1 when feature is ecatFeatureRedundancy. A MaxRT wRTOS E-CAT Cable Redundancy license is required to support Cable Redundancy.
  • Parameter status is greater than 1 when feature is ecatFeatureSyncMultiMaster. A MaxRT wRTOS E-CAT Multiple MainDevices license is required to support multiple EtherCAT MainDevices.

ecatErrWrongEnvironment

The MainDevice is not stopped.

ecatErrFeatureUnavailable

Parameter feature is ecatFeatureDcReferenceIndex, which is not currently supported.

Remarks

SetFeatureStatus is not allowed after Start has succeeded.

See Also: