|
|
|
|
- Miscellaneous
- Transmission between two computers that use character strings in different formats (UNICODE and ANSI)
- Using an external library: RXTX
- Features specific to Android and Android widget
sRead (Function) In french: sLit Reads a character string in the entry buffer of the specified serial port. The port must be opened beforehand ( sOpen). Remarks: - This function cannot be used with a parallel port.
This function affects the server. Infrared ports are not supported.   Only serial ports are supported.
Syntax
Reading a number of bytes and retrieving a string Hide the details
<Result> = sRead(<Port number> , <Number of bytes to read>)
<Result>: Character string - Character string read in the entry buffer,
- 0 if the read operation was not performed.
<Port number>: Integer - Number of the relevant serial port: 1, 2, 3, ... 32 for COM1, COM2, COM3, ... COM32.
- Identifier of the serial port returned by sOpen (if this function was called with a serial port name).
  Only this type of parameter is available.
<Number of bytes to read>: Integer Number of bytes to read in the entry buffer of the serial port. The number of bytes to read is returned by sInEntryQueue. Remarks Miscellaneous - sOpen has no effect if the port was not opened by sRead.
- sRead clears the input queue of bytes actually read.
- A 32-bit application is locked during the duration of the transfer. To avoid this lock, the timeout between two read operations must be specified in sOpen. If the timeout is reached and the data could not be read, sRead returns 0.
- WLanguage does not allow you to manage the control signals.
- The time to wait for a character to be read or written is specified with sOpen.
- If this time is set to 1s when reading 1024 bytes, the waiting time will be 1024s.
New in version 28If this time is set to "-1s" when reading 1024 bytes, the waiting time will be 1s. This prevents lock problems when reading from or writing to the print port.
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|