beautypg.com

ElmoMC Multi-Axis Motion Controller-Maestro User Manual

Page 117

background image

Motion object data structure for the MAC_GetObject() function:

typedef struct _MOTION_OBJECT

{

BYTE

btBusID; //CAN

Bus

ID

for

object

BYTE

btNodeID;

//CAN

Node

ID

for

object

TCHAR szName[32];

//Motion

object

name

MOTION_OBJECT_TYPE moType; //Motion

object

type

}

MOTION_OBJECT;

Return Value:

int - Command status: if 0 - OK,

else - error code:

1 - The API library is not initialized;

2 - Invalid input parameter;

3

- The device is not found;

Use MAC_GetLastError to retrieve the error string.

Sample:

int retVal = MAC_GetObject( 0, &moData );

Maestro

Software Manual

The Maestro API

MAN-MASSW (Ver. Q)

6-10