RtecatConfigureIo

RtecatConfigureIo configures an I/O module. If the corresponding index contains a real I/O module, the configuration set will be overridden.

Syntax

Copy
RTECAT_ERROR RtecatConfigureIo(
  [in]    RTECAT_HANDLE MainDevice,
  [in]    ULONG Index,
  [in]    RTECAT_SUBDEVICE_STATUS Details
);

Parameters

[in] MainDevice

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

[in] Index

The index of an I/O module.

[in] Details

The configuration details to be applied to the I/O module.

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 is invalid.
  • The value of parameter Index exceeds the configured number of I/O modules.

ecatErrMainDeviceNotReady

The MainDevice instance does not exist.

ecatErrWrongEnvironment

The MainDevice is not stopped. Calling this API after RtecatStart is unsupported.

Remarks

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

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtecatApi.h

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

See Also: