ITcEtherCATSlave::LookupCoeVariable

Searches for the CoE variable with the specified CANopen index and subindex and creates it if necessary. inOut selects the direction (input/output). Returns the result as an ITcSmTreeItem.

Signature

HRESULT LookupCoeVariable(
    [in]           long              inOut,
    [in]           USHORT            index,
    [in]           BYTE              subIndex,
    [out, retval]  ITcSmTreeItem**   pipItem);

Parameter

Name

Type

Description

inOut

long

[in] Direction: input (1) or output (0) in the CoE process image.

index

USHORT

[in] CANopen object index.

subIndex

BYTE

[in] Subindex within the CoE object.

Return value

Name

Type

Description

pipItem

ITcSmTreeItem**

[out, retval] Tree Item of the CoE variable; NULL and S_FALSE if no variable exists.

(HRESULT)

HRESULT

S_OK if successful, return, S_FALSE if no variable was found, otherwise an error code.

Error codes