RtecatStartInstance

RtecatStartInstance starts an E-CAT MainDevice instance.

Syntax

Copy
BOOL RtecatStartInstance(
  [in]    ULONG Instance
);

Parameters

[in] Instance

The instance to start. The maximum number of instances is 63 (0-62), as defined by RTECAT_MAX_INSTANCE in the header file.

Return Values

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code if the function fails.

Possible error codes:

Error codes Meaning

ERROR_INVALID_PARAMETER

The value of parameter Instance is outside the acceptable range (0-62).

RTECAT_ERROR_NO_LICENSE

The E-CAT component does not have a valid license.

RTNL2_ERROR_XXX

Failed to start the NL2 due to an NL2_Error-type error.

RT_ERROR_SUBSYSTEM_NOT_STARTED

The Subsystem or NL2 did not start.

RTECAT_ERROR_STARTED

The instance has already started.

ERROR_ABANDONED_WAIT_0

Failed to acquire the synchronization lock.

RTECAT_ERROR_NO_EVENT

The mutex was not created after launching the process.

RTECAT_ERROR_TIMEOUT_STARTING

Instance failed to start within the 10-second timeout period.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtecatComponent.h

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

See Also: