RtecatSetFeatureStatus

RtecatSetFeatureStatus sets the configuration of an EtherCAT startup feature.

Syntax

Copy
RTECAT_ERROR RtecatSetFeatureStatus(
  [in]    RTECAT_HANDLE MainDevice,
  [in]    RTECAT_FEATURE Feature,
  [in]    double Status
);

Parameters

[in] MainDevice

A handle to a MainDevice. To retrieve the corresponding handle, use RtecatOpenMainDevice.

[in] Feature

An EtherCAT feature. See RTECAT_FEATURE.

[in] Status

A value to set the Feature Status.

Return Values

The function returns an RTECAT_ERROR value. If the function succeeds, it returns ecatErrNoError. If the function fails, it returns a different value.

Possible return values:

Return value Meaning

ecatErrNoError

The function succeeded.

ecatErrWrongParameter

One of the following conditions occurred:

  • Parameter MainDevice or Feature is invalid.
  • The value of Status is either smaller than 100 or greater than 2,000 when parameter Feature is ecatFeatureCycleTime.
  • The value of Status is either smaller than 0 or greater than 6 when parameter Feature is ecatFeatureAccessMode.

ecatErrMainDeviceNotReady

The MainDevice instance does not exist.

ecatErrNoLicense

One of the following conditions occurred:

  • The value of Status is less than 1,000 when parameter 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.
  • The value of Status is greater than 1 when parameter Feature is ecatFeatureHotConnect. A MaxRT wRTOS E-CAT Hot Connect license is required to support Hot Connect.
  • The value of Status is greater than 1 when parameter Feature is ecatFeatureRedundancy. A MaxRT wRTOS E-CAT Cable Redundancy license is required to support Cable Redundancy.
  • The value of Status is greater than 1 when parameter 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

RtecatSetFeatureStatus is a synchronous function that executes immediately and returns a result upon completion.

RtecatSetFeatureStatus is not allowed after RtecatStart has succeeded. If invoked after RtecatStart, it will return ecatErrWrongEnvironment.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtecatApi.h

RtecatApi_W64.lib (Windows), RtecatApi.lib (RTSS)

See Also: