Chapter 14: maestro message queue, 1 user message methods, User message methods – ElmoMC Multi-Axis Motion Controller-Maestro User Manual

Page 248

Advertising
background image

Chapter 14: Maestro Message Queue

In the user host program, messages can be retrieved from the

M

aestro Motion Controller

via two different methods. One mechanism is defined in the Maestro API, for a system
that includes a single Maestro Motion Controller.

For a networked system that includes several Maestro devices, the Maestro Message
Queue interface makes it possible to retrieve and analyze the messages sent by each
device. The Maestro Message Queue mechanism is supported by the TnElmoS .exe COM
server via the IMessageQueue Interface.

14.1

User Message Methods

The IMessageQueue includes the following methods (Table

14-1).

Table 14-1 IMessageQueue methods

Method Description

Call Format and Parameters

Subscribe: Subscribe to User Messages
from the Maestro device. After
subscribing, all the messages that arrived
are copied to the Message Queue
instance

Subscribe ([in]DWORD dwIP)

dwIP - the Maestro device IP address

Unsubscribe: Unsubscribe from the
Maestro device

Unsubscribe ([in]DWORD dwIP)

dwIP - the Maestro device IP address

MessageQueueSize: Get the number of
User Messages in the Message Queue

MessageQueueSize ([out]DWORD *pSize)

pSize - a pointer for the DWORD variable to
return the number of Messages.

MessageQueueErase: Clear the Message
Queue

MessageQueueErase ()

ReadMessage: The host application uses
this method to read a message from the
Message Queue

ReadMessage

([out]DWORD

*pIP,[out]DWORD *pID,[out]DWORD
*pWParam,[out]DWORD
*pLParam,[out]DWORD *pTime)

pIP - a pointer for the DWORD variable for the
IP address of the Maestro device

pID - a pointer to the DWORD variable to get
the Message ID

pWParam , pLParam – pointers to DWORD
variables to get the Message Data

pTime – pointer to DWORD variable for the
Message Time Stamp

Maestro

Software Manual

MAN-MASSW (Ver. Q)

14-1

Advertising