7 mac_locatedevices – ElmoMC Multi-Axis Motion Controller-Maestro User Manual
Page 113
![background image](/manuals/558414/113/background.png)
Output Parameter:
LPTSTR szOut
String for response receiving.
Return Value:
Int
Error Value:
0
OK
>0
Communication error codes, user may use MAC_GetLastError to retrieve
the error string.
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;
< 0
the string for reception of the answer is too small, value is the necessary
size of a string (with a minus).
Use MAC_GetLastError to retrieve the error string.
Sample:
retVal = MAC_SendCommand( hCon, _T("axis1.px=0"), szOut, 256,
1000 );
6.7
MAC_LocateDevices
This function enables the user to find Multi-axes supervisors.
Syntax:
int MAC_LocateDevices();
Return Value:
int - number of supervisors,
if < 0 error code:
-1
The API library is not initialized;
-2
Unable to create interface CLSID_MaestroLocator;
-3
The MAS Locator failed;
-4
The MAS Locator: unable to get device IP address;
-5
The MAS Locator: unable to get device name;
Use MAC_GetLastError to retrieve the error string.
Sample:
int number = MAC_LocateDevices();
Maestro
Software Manual
The Maestro API
MAN-MASSW (Ver. Q)
6-6