EnableAliases
Enables the alias indexes for the axis and I/O index parameters in all functions. The alias index should be set first. This allows the application to have a different drive order from the physical EtherCAT link.
Syntax
KsError EnableAliases(
BOOL Active
);
Parameters
Active: this parameter determines whether aliases are used. TRUE to enable, and FALSE to disable aliasing. By default, it is FALSE.
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
It gets details for each drive and identifies each drive using vendor, product, and alias. If drives are not plugged in the correct order, rearrange the list of drives. Use it after the KINGSTAR Subsystem is started.
Usable EtherCAT states
ecatOP
Example
// Define aliases for axes
#define AxisX 101
#define AxisZ 102
#define AxisC 103
// Apply the aliases
nRet = WriteAxisAlias(1, AxisX);
nRet = WriteAxisAlias(2, AxisZ);
nRet = WriteAxisAlias(0, AxisC);
nRet = EnableAliases(TRUE);
Requirements
RT | Win32 | |
---|---|---|
Minimum supported version | 4.0 | 4.0 |
Header | ksapi.h | ksapi.h |
Library | KsApi_Rtss.lib | KsApi.lib |
See also