@SetNTComPortSettings
Syntax
@SetNTComPortSettings(OSCOMHANDLE1;BAUD2;DATA3;STOP4;PARITY5);
Description
Only for Engine under Windows!
Changes the current settings for the COM port identified by OSCOMHANDLE OSCOMHANDLE1. Individual values can be retained by passing -1 or an invalid value. @GetNTComPortProberties can be used to determine the allowed values.
FN BAUD2: (Baudrate)
300..128k set a new value
-1 keep the current value
FN DATA3: (number of data bits)
5..16 set a new value
-1 keep the current value
FN STOP4: (number of stop bits)
0 1 Stopbit
1 1.5 Stopbits
2 2 Stopbits
otherwise keep the current value
TEXT PARITY5: (Parity)
"N" None
"E" Even
"O" Odd
"M" Mark
"S" Space
otherwise keep the current value
Example: @SetNTComPortSettings(OSCOMHANDLE1;BAUD2;DATA3;STOP4;PARITY5);
OSCOMHANDLE1:=@OpenNTComPort("COM1");
@SetNTComPortSettings(OSCOMHANDLE1;9600;8;"N";1);
OSCOMHANDLE1:=@CloseNTComPort(OSCOMHANDLE1);
Opens a COM port, sets 9600 baud, 8 data bits, no parity, and 1 stop bit, and then closes the port again.
Note : This text was machine-translated and may contain inaccuracies.
