Data types ¶ COMSETTINGS (Struct) COMSETTINGSEX (Struct) PORTS (Enum)
COMSETTINGS (STRUCT) ¶ TYPE COMSETTINGS : STRUCT InOut: Name Type Comment Port PORTS 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, 0 = default value dwBufferSize DWORD Buffer size of device internal buffer, 0 = default value dwScan DWORD Scan time of serial interface, should be set to 0
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.
PORTS (ENUM) ¶ TYPE PORTS : InOut: Name Initial COM1 1 COM2 COM3 COM4 COM5 COM6 COM7 COM8
Global Variables ¶ Globale_Variablen (GVL)
Globale_Variablen (GVL) ¶ InOut: Scope Name Type Initial Constant INVALID_HANDLE DWORD 16#FFFFFFFF
POUs ¶ SysComClose (Function) SysComGetVersion2300 (Function) SysComOpen (Function) SysComRead (Function) SysComSetSettings (Function) SysComSetSettingsEx (Function) SysComWrite (Function)
SysComClose (FUN) ¶ FUNCTION SysComClose : BOOL InOut: Scope Name Type Return SysComClose BOOL Input dwHandle DWORD
SysComGetVersion2300 (FUN) ¶ FUNCTION SysComGetVersion2300 : DWORD InOut: Scope Name Type Return SysComGetVersion2300 DWORD Input bDummy BOOL
SysComAsyncFB.SysComCloseAsyncWrapper (METH) ¶ METHOD SysComCloseAsyncWrapper : RTS_IEC_RESULT InOut: Scope Name Type Return SysComCloseAsyncWrapper RTS_IEC_RESULT Input pParam POINTER TO tSysComClose