23 mac_deinitevents, 24 mac_regclosecallback, 25 mac_reginterruptcallback – ElmoMC Multi-Axis Motion Controller-Maestro User Manual

Page 124

Advertising
background image

int nOk = MAC_InitEvents();

6.23 MAC_DeinitEvents

This function enables the user to close MAS Event mechanism

Syntax:

Void MAC_DeinitEvents();

Sample:

MAC_DeinitEvents();

6.24 MAC_RegCloseCallback

This function enables the user to advise/unadvise on-close-connection case user's callback

Syntax:

int MAC_RegCloseCallback

(COMMUNICATION_HANDLE hCommunication,

MAC_ONCLOSE_CALLBACK ptrCB);

Input Parameters:

COMMUNICATION_HANDLE hCommunication

Multi-axes supervisor communication handle.

MAC_ONCLOSE_CALLBACK ptrCB – on-close-connection case user's callback.

Return Value:

int - Error value:

0

OK,

> 0 communication error codes:

1 The API library is not initialized;
2 Zero Communication Handle;
3 Bad Communication Handle;
4 Unable to create interface ITNElmoPublic;
5 TNElmo server: Dispatch event failed

Use MAC_GetLastError to retrieve the error string.

Sample:

int nOk = MAC_RegCloseCallback( hComm, MyCloseCallback );

6.25 MAC_RegInterruptCallback

This function enables the user to advise/unadvise interrupt user's callback

Syntax:

Maestro

Software Manual

The Maestro API

MAN-MASSW (Ver. Q)

6-17

Advertising