4 mac_creaters232connection – ElmoMC Multi-Axis Motion Controller-Maestro User Manual
Page 111

6.4
MAC_CreateRS232Connection
Note:
This interface is not implanted yet.
This function enables the user to initiate RS232 communication with the Multi-axes
supervisor.
Syntax:
COMMUNICATION_HANDLE MAC_CreateRS232Connection
( BYTE btPort,
UINT uBautRate /*=19200*/,
BYTE btParity /*=0*/,
BYTE
btDataBits
/*=8*/,
BYTE
btStopBits
/*=1*/,
BYTE btFlowCtrl /*=0 */);
Input Parameters:
BYTE btPort - COM port number, value: 1,2,3,4,5,6,7,8
UINT uBaudRate - Current baud rate:
4800
9600
19200
38400
57600
115200
BYTE btParity - Parity, one of the following:
0: No parity
1:
Odd
parity
2:
Even
parity
3:
Mark
4:
Space
BYTE btDataBits - Data bytes number, value: 4, 5, 6, 7, 8
BYTE btStopBits - Stop bytes number, value: 1, 1.5, 2
BYTE btFlowCtrl - Flow control, one of the following:
0:
None
1:
Xon/Xoff
2:
Hardware
Return value:
COMMUNICATION_HANDLE Multi-axes supervisor communication handle, if
connection failed - NULL.
Sample:
COMMUNICATION_HANDLE hCon = MAC_CreateRS232Connection( 1, 19200, 0,
8, 1, 0 );
Maestro
Software Manual
The Maestro API
MAN-MASSW (Ver. Q)
6-4