Function EN Version 4.00

@SetNTComPortTimeouts

NTComPort

Syntax

@SetNTComPortTimeouts(OSCOMHANDLE1;RDINT2;RDMUL3;RDCON4;WTMUL5;WTCON6);

Description

Only for Engine under Windows!

Resets the current timeout settings for the COM port identified by OSCOMHANDLE OSCOMHANDLE1. Except for FN RDINT2 all specified values define timeouts that start counting from the beginning of the operation, that is, with the first character read or written. For each value, -1 can be specified to leave the current setting unchanged.

FN RDINT2:   (ReadIntervalTimeout)
Maximum time in ms that may elapse between two characters to be received. A value of 0 disables this timeout.

FN RDMUL3:   (ReadTotalTimeoutMultiplier)
Specifies a multiplicative timeout in ms that is multiplied by the number of characters to be read and is included in the total timeout for read operations.

FN RDCON4:   (ReadTotalTimeoutConstant)
Specifies a constant timeout in ms that is included in the total timeout for read operations regardless of the number of characters to be read.

FN WTINT5:   (WriteTotalTimeoutMultiplier)
Specifies a multiplicative timeout in ms that is multiplied by the number of characters to be written and is included in the total timeout for write operations.

FN WTCON6:   (WriteTotalTimeoutConstant)
Specifies a constant timeout in ms that is included in the total timeout for write operations regardless of the number of characters to be written.

Example: @SetNTComPortTimeouts(OSCOMHANDLE1;RDINT2;RDMUL3;RDCON4;WTMUL5;WTCON6);

OSCOMHANDLE1:=@OpenNTComPort("COM1");
@SetNTComPortTimeouts(OSCOMHANDLE1;0;50;2000;-1;-1);
OSCOMHANDLE1:=@CloseNTComPort(OSCOMHANDLE1);

Opens a COM port, resets the read timeouts, keeps the write timeouts unchanged, and then closes the port again.

Note : This text was machine-translated and may contain inaccuracies.