Function _SetDataFormat

Description Sets data format of specific COM port of multi-serial module.
This function is used for C/C++ compiler.

Function Prototype int _SetDataFormat(int slot, int port, int databit, int parity, int stopbit)
Return 0: no error
-2: Data bit error
-3: Parity bit error
-4: Stop bit error
slot 0 ~ 3 for 4 slots
0 ~ 7 for 8 slots
port 0, 1         ==> I-8112 and I-8142
0, 1, 2, 3 ==> I-8114 and I-8144
databit  5 ~ 8
parity 0 : none
1 : even
2 : odd
3 : mark
4 : space
stopbit 1, 2

Example
Function Ret = _SetDataFormat(0,1,8,0,1);
Return 0 (success)
Description Sets the data format of COM1 of multi-serial module that plugged on slot0 to 
      data bit=8,
      no parity check,
      stop bit =1

Reference SetInBufSize
SetOutBufSize
InstallCom8000
_SetBaudrate
_SetDataFormat
RestoreCom8000
IsCom8000
ToCom8000
ToCom8000Str
ToCom8000nBytes
ReadCom8000
ReadCom8000nBytes

Modules I-8112, I-8114, I-8142, I-8144

Back to Previous Page