Moxa M-1401 Manual Pagina 27

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 129
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 26
ioLogik MXIO DLL API Reference System Commands Sets
4-2
RS-232/RS-485 I/O Connect Commands
MXSIO_OpenCommport
This function opens the local COM port of the host computer with
communication parameters.
C/C++
Arguments
Return Value
int MXSIO_OpenCommport ( char *szCommport,
DWORD dwBaudrate,
BYTE bytDataFormat,
DWORD dwTimeout,
int * hCommport);
szCommport: Name of the common port, e.g., “ttyM0”.
dwBaudrate: Baudrate, from 4,800 to 115,200 bps. Does not
support 1200 or 2400 bps.
bytDataFormat: Transmission data format.
bit_cnt
(bit
0,
1)
= 0x00
=
bit_5
0x01
=
bit_6
0x02
=
bit_7
0x03
=
bit_8
stop_cnt
(bit
2)
=
0x00
=
stop_1
0x04
=
stop_2
parity
(bit
3,
4,
5)
=
0x00
=
none
0x08
=
odd
0x18
=
even
0x28
=
mark
0x38
=
space
dwTimeout: Timeout in milliseconds for serial adapter
communication
hCommport: Handle of the opened COM port.
Succeed MXIO_OK.
Fail Refer to Return Codes.
MXSIO_CloseCommport
This closes the COM port; the COM port handle will be invalid.
C/C++
Arguments
Return Value
int MXSIO_CloseCommport ( int hCommport);
hCommport: Handle of the opened COM port.
Succeed MXIO_OK.
Fail Refer to Return Codes.
Vista de pagina 26
1 2 ... 22 23 24 25 26 27 28 29 30 31 32 ... 128 129

Comentarios a estos manuales

Sin comentarios