12 mac_getobject – ElmoMC Multi-Axis Motion Controller-Maestro User Manual

Page 116

Advertising
background image

Motion object types for the MAC_LocateObjects() function:

MOT_NODE

Node

DS301

MOT_IO IO

DS401

MOT_AXIS

Axis

MOT_VECTOR

Vector

MOT_GROUP

Group

MOT_3DVECTOR

3-d

Vector

MOT_STATIC

Static

Variable

MOT_EIP_DEV EIP

Device

MOT_EIP_ASSEM

EIP

Assembly

MOT_EIP_ADAPTERTAG

EIP Adapter tag

Return Value:

int - number of objects,

if < 0

error code:

-1

The API library is not initialized;

-2

Zero Communication Handle;

-3

Bad Communication Handle;

-4

Unable to create interface ITNElmoPublic;

-5

Send command failed ;

-6

The Command 'list' used internally by the function has failed;

Use MAC_GetLastError to retrieve the error string.

Sample:

MOTION_OBJECT_TYPE moMask = MOT_AXIS|MOT_VECTOR;

int nObjs = MAC_LocateObjects( hCom, dwMask );

6.12 MAC_GetObject

This function enables the user to get motion object parameters

Syntax:

int MAC_GetObject

( UINT uNum, MOTION_OBJECT* pObj );

Input Parameters:

UINT

uNum - Object number in this search results

Output Parameter:

MOTION_OBJECT* pObj - Pointer to motion object data structure

Maestro

Software Manual

The Maestro API

MAN-MASSW (Ver. Q)

6-9

Advertising