GetSlaveById

Gets detailed information from a specified slave using the ID.

Syntax

KsError GetSlaveById(
     int SlaveId,
     SlaveStatus* Details
);

Parameters

SlaveId: the EtherCAT ID of a device. It corresponds to the position of the device in the EtherCAT loop. The ID is zero based and is not affected by aliasing.

Details: pointer to the SlaveStatus structure that receives the detailed information about the slave's status.

Return value

If the function succeeds, it returns errNoError, otherwise an error code. For more information about the error code, see the KsError list.

Remarks

Retrieves details about a specified slave using the slave’s position in the EtherCAT loop. Since it uses the slave ID, it doesn't use the alias information. It works only for real slave modules without separating axes or I/Os. Use after the KINGSTAR Subsystem starts.

Usable EtherCAT states

ecatInit, ecatBoot, ecatPreOP, ecatSafeOP, ecatOP

Example

N/A

Requirements

  RT Win32
Minimum supported version 4.0 4.0
Header ksapi.h ksapi.h
Library KsApi_Rtss.lib KsApi.lib

See also

GetIOByIndex

GetStatus