SYS_COM_STOPBITS (ENUM) ¶ TYPE SYS_COM_STOPBITS : <category>Stop bits</category> <description>: Supported stop bits</description> InOut: Name Initial SYS_ONESTOPBIT 1 SYS_ONE5STOPBITS SYS_TWOSTOPBITS
COMSETTINGSEX (STRUCT) ¶ TYPE COMSETTINGSEX : STRUCT InOut: Name Type Comment Size INT Fill in sizeof(this structure) Port PORTS COM1,COM2… dwBaudRate DWORD 4800, 9600, 19200, 38400, 57600, 115200 byStopBits BYTE 0 = ONESTOPBIT, 1=ONE5STOPBITS, 2=TWOSTOPBITS byParity BYTE 0 = NOPARITY, 1 = ODDPARITY, 2 = EVENPARITY dwTimeout DWORD Timeout in ms of interface, use a time that fits your longest message, example 5000 /0 = default value, may cut off messages/ dwBufferSize DWORD Buffer size of device internal buffer, 0 = default value dwScan DWORD Scan time of serial interface, should be set to 0 cByteSize BYTE 4…8: number of databits. fOutxCtsFlow BOOL Specifies whether the CTS (clear-to-send) signal is monitored for output flow control. If this member is TRUE and CTS is turned off, output is suspended until CTS is sent again. fDtrControl BYTE 0:Disables the DTR line when the device is opened and leaves it disabled. 1:Enables the DTR line when the device is opened and leaves it on. 2:Enables DTR handshaking. fDsrSensitivity BOOL Specifies whether the communications driver is sensitive to the state of the DSR signal. If this member is TRUE, the driver ignores any bytes received, unless the DSR modem input line is high. fRtsControl BYTE 0:Disables the RTS line when the device is opened and leaves it disabled. 1:Enables the RTS line when the device is opened and leaves it on. 2:Enables RTS handshaking. The driver raises the RTS line when the “type-ahead” (input) buffer is less than one-half full and lowers the RTS line when the buffer is more than three-quarters full. 3:Specifies that the RTS line will be high if bytes are available for transmission. After all buffered bytes have been sent, the RTS line will be low. fOutxDsrFlow BOOL Specifies whether the DSR (data-set-ready) signal is monitored for output flow control. If this member is TRUE and DSR is turned off, output is suspended until DSR is sent again.
SYS_COM_TIMEOUT (ENUM) ¶ TYPE SYS_COM_TIMEOUT : <category>Timeouts</category> <description>: Specified standard timeouts</description> InOut: Name Initial SYS_NOWAIT 0 SYS_INFINITE 16#FFFFFFFF
SysComClose (FUN) ¶ FUNCTION SysComClose : RTS_IEC_RESULT <description>Close a serial communication device.</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysComClose RTS_IEC_RESULT Input hCom RTS_IEC_HANDLE <param name=”hCom” type=”IN”>Handle to com port to close</param>
PORTS (ENUM) ¶ TYPE PORTS : InOut: Name Initial COM1 1 COM2 COM3 COM4 COM5 COM6 COM7 COM8
SysComGetSettings (FUN) ¶ FUNCTION SysComGetSettings : RTS_IEC_RESULT <description>Get the parameter of the interface specified by handle. Use SysComGetSettings2()! This function should only be used for backward compatibility! </description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysComGetSettings RTS_IEC_RESULT Input hCom RTS_IEC_HANDLE <param name=”hCom” type=”IN”>Handle to com port</param> pSettings POINTER TO SysComSettings <param name=”pSettings” type=”IN”>Pointer to get settings</param> pSettingsEx POINTER TO SysComSettingsEx <param name=”pSettingsEx” type=”IN”>Pointer to get extended settings</param>
SysComGetSettings2 (FUN) ¶ FUNCTION SysComGetSettings2 : RTS_IEC_RESULT <description>Get the parameter of the interface specified by handle.</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysComGetSettings2 RTS_IEC_RESULT Input hCom RTS_IEC_HANDLE <param name=”hCom” type=”IN”>Handle to com port</param> pSettings POINTER TO SysComSettings <param name=”pSettings” type=”IN”>Pointer to get settings</param> pSettingsEx2 POINTER TO SysComSettingsEx2 <param name=”pSettingsEx2” type=”IN”>Pointer to get extended settings</param>
SysComOpen (FUN) ¶ FUNCTION SysComOpen : RTS_IEC_HANDLE <description>Open a serial communication device.</description> <result><p>RESULT: Handle to the opened com port or RTS_INVALID_HANDLE if failed</p></result> InOut: Scope Name Type Comment Return SysComOpen RTS_IEC_HANDLE Input sPort SYS_COM_PORTS <param name=”sPort” type=”IN”>Com port to open. SYS_COMPORT1 = COM1, …</param> pResult POINTER TO RTS_IEC_RESULT <param name=”pResult” type=”OUT”>Pointer to runtime system error code (see CmpErrors.library)</param>
Global Variables ¶ Globale_Variablen (GVL)
SysComOpen2 (FUN) ¶ FUNCTION SysComOpen2 : RTS_IEC_HANDLE <description>Opens a serial communication device specified by settings</description> <result><p>RESULT: Handle to the opened com port or RTS_INVALID_HANDLE if failed</p></result> InOut: Scope Name Type Comment Return SysComOpen2 RTS_IEC_HANDLE Input pSettings POINTER TO SysComSettings <param name=”pSettings” type=”IN”>Settings for the communication device. See category “Com port settings” for detailed information</param> pSettingsEx POINTER TO SysComSettingsEx <param name=”pSettingsEx” type=”IN”>Optional extended settings for the serial device. Can be 0.</param> pResult POINTER TO RTS_IEC_RESULT <param name=”pResult” type=”OUT”>Pointer to runtime system error code (see CmpErrors.library)</param>