PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Using an external library: RXTX
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Defines or modifies the parameters for configuring the specified serial port, parallel port or infrared port. This setting is optional.
The default values are as follows:
  • Transfer rate: 9600 Bauds
  • Parity: None
  • 8 data bits
  • 1 stop bit
Caution: The setting for two linked computers must be identical.
WEBDEV - Server code This function returns information regarding the server.
Notes:
  • The port must be opened (sOpen) before the call to sParameter. sOpen automatically initializes the serial port.
  • Versions 16 and later
    Java The management of infrared ports is not available in Java.
    New in version 16
    Java The management of infrared ports is not available in Java.
    Java The management of infrared ports is not available in Java.
Versions 16 and later
Java This function is now available for the Java applications.
New in version 16
Java This function is now available for the Java applications.
Java This function is now available for the Java applications.
Example
Result1 = sOpen(1, 2000, 2000) // Open COM1
IF Result1 = True THEN
// Configure Com1: Rate 9600, even parity,
// 8 data bits, 1 stop bit
sParameter(1, 9600, 1, 8, 0) // Configure COM1
// Rest of process...
sClose(1) // Close COM1
ELSE
Error("Error while opening COM1")
END
Syntax
<Result> = sParameter(<Port Number> , <Rate> , <Parity> , <Nb Data Bits> , <Nb Stop Bits> [, <DTR/DSR> [, <RTS/CTS> [, <XON/XOFF>]]])
<Result>: Boolean
  • True if the parameters have been initialized properly,
  • False otherwise. sParameter has no effect if the port was not opened beforehand (by sOpen).
<Port Number>: Integer
Relevant port number:
  • Number of serial port: 1, 2, 3, ... 32 for COM1, COM2, COM3, ... COM32.
  • Number of parallel port: -1, -2, -3 or -4 for LPT1, LPT2, LPT3 or LPT4.
  • Number of infrared port: 1, 2, 3, ... 32 for IR1, IR2, IR3, ... IR32.
    Versions 16 and later
    Java The management of infrared ports is not available in Java.
    New in version 16
    Java The management of infrared ports is not available in Java.
    Java The management of infrared ports is not available in Java.
  • Port number returned by sOpen (if this function was called with a port name).
<Rate>: Integer
Rate of data transfer (expressed in Bauds or Bits per second).
<Parity>: Integer
Parity of the transfer:
0No parity
1Even parity
2Odd parity
<Nb Data Bits>: Integer
Number of bits per character: 4, 5, 6, 7 or 8.
<Nb Stop Bits>: Integer
Number of stop bits:
01 stop bit
11.5 stop bits
22 stop bits
<DTR/DSR>: Optional integer
  • 0 (or False, default value) if the DTR/DSR protocol must be ignored and in "active" mode.
  • 1 (or True) if the DTR/DSR protocol must be in "Handshake" mode,
  • Versions 21 and later
    2 if the DTR/DSR protocol must be ignored and in "inactive" mode.
    See the documentation for managing communication ports for more details.
    New in version 21
    2 if the DTR/DSR protocol must be ignored and in "inactive" mode.
    See the documentation for managing communication ports for more details.
    2 if the DTR/DSR protocol must be ignored and in "inactive" mode.
    See the documentation for managing communication ports for more details.
Versions 16 and later
Java This parameter is ignored.
New in version 16
Java This parameter is ignored.
Java This parameter is ignored.
<RTS/CTS>: Optional integer
  • 0 (or False, default value) if the RTS/CTS protocol must be ignored and in "active" mode.
  • 1 (or True) if the RTS/CTS protocol must be in "Handshake" mode,
  • Versions 21 and later
    2 if the RTS/CTS protocol must be ignored and in "inactive" mode.
    See the documentation for managing communication ports for more details.
    New in version 21
    2 if the RTS/CTS protocol must be ignored and in "inactive" mode.
    See the documentation for managing communication ports for more details.
    2 if the RTS/CTS protocol must be ignored and in "inactive" mode.
    See the documentation for managing communication ports for more details.
Versions 16 and later
Java This parameter is ignored.
New in version 16
Java This parameter is ignored.
Java This parameter is ignored.
<XON/XOFF>: Optional boolean
  • True if the XON/XOFF protocol must be taken into account,
  • False (default value) if this protocol must be ignored.
Versions 16 and later
Java This parameter is ignored.
New in version 16
Java This parameter is ignored.
Java This parameter is ignored.
Remarks
Versions 16 and later
Java

Using an external library: RXTX

In Java, the use of functions for handling the serial and parallel ports (sOpen, sWrite, sRead, ...) requires the presence of an external library: RXTX.
This library includes a Jar archive and one or more native libraries that depend on the operating system on which the application is run. To use these functions:
  • the Jar archive (RXTXComm.jar) must:
    • be found in the same directory as the Java application generated by WINDEV,
    • be found in the execution classpath of the application,
    • be directly included in the generated application (from the wizard for Java generation).
  • the native libraries corresponding to the operating system on which the application is run must be found:
    • in the same directory as the Java application generated by WINDEV,
    • in the path of the application libraries (librarypath).
The RXTX library and its documentation can be downloaded from: http://users.frii.com/jarvi/rxtx/index.html (link valid at the time this documentation was published).
Caution: The management of infrared ports is not available in Java.
New in version 16
Java

Using an external library: RXTX

In Java, the use of functions for handling the serial and parallel ports (sOpen, sWrite, sRead, ...) requires the presence of an external library: RXTX.
This library includes a Jar archive and one or more native libraries that depend on the operating system on which the application is run. To use these functions:
  • the Jar archive (RXTXComm.jar) must:
    • be found in the same directory as the Java application generated by WINDEV,
    • be found in the execution classpath of the application,
    • be directly included in the generated application (from the wizard for Java generation).
  • the native libraries corresponding to the operating system on which the application is run must be found:
    • in the same directory as the Java application generated by WINDEV,
    • in the path of the application libraries (librarypath).
The RXTX library and its documentation can be downloaded from: http://users.frii.com/jarvi/rxtx/index.html (link valid at the time this documentation was published).
Caution: The management of infrared ports is not available in Java.
Java

Using an external library: RXTX

In Java, the use of functions for handling the serial and parallel ports (sOpen, sWrite, sRead, ...) requires the presence of an external library: RXTX.
This library includes a Jar archive and one or more native libraries that depend on the operating system on which the application is run. To use these functions:
  • the Jar archive (RXTXComm.jar) must:
    • be found in the same directory as the Java application generated by WINDEV,
    • be found in the execution classpath of the application,
    • be directly included in the generated application (from the wizard for Java generation).
  • the native libraries corresponding to the operating system on which the application is run must be found:
    • in the same directory as the Java application generated by WINDEV,
    • in the path of the application libraries (librarypath).
The RXTX library and its documentation can be downloaded from: http://users.frii.com/jarvi/rxtx/index.html (link valid at the time this documentation was published).
Caution: The management of infrared ports is not available in Java.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Windows Mobile wp230com.dll
Java wd230java.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment