SysComSetTimeout (FUN) ¶ FUNCTION SysComSetTimeout : RTS_IEC_RESULT <description>Set the timeout of the specified serial interface (hardware timeout). The Timeout is the time between two received or sent characters until the read or write operation will return. Typically this value should be 0 (returns immediately)</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysComSetTimeout RTS_IEC_RESULT Input hCom RTS_IEC_HANDLE <param name=”hCom” type=”IN”>Handle to com port</param> ulTimeout SYS_COM_TIMEOUT <param name=”ulTimeout” type=”IN”>Timeout in milliseconds for the read and write operation to set</param>
SysComSettings (STRUCT) ¶ TYPE SysComSettings : STRUCT <category>Com port settings</category> <description>: Settings to open and to configure a COM interface</description> InOut: Name Type Comment sPort SYS_COM_PORTS <element name=”sPort” type=”IN”>Port number: 0=disabled, 1=COM1, 2=COM2, …. See SYS_COM_PORTS for predefined values.</element> byStopBits SYS_COM_STOPBITS <element name=”byStopBits” type=”IN”>Stop bits. See SYS_COM_STOPBITS for details.</element> byParity SYS_COM_PARITY <element name=”byParity” type=”IN”>Parity. See SYS_COM_PARITY for details.</element> ulBaudrate SYS_COM_BAUDRATE <element name=”ulBaudRate” type=”IN”>Baudrate. See SYS_COM_BAUDRATE for details.</element> ulTimeout SYS_COM_TIMEOUT <element name=”ulTimeout” TYPE=”IN”>Hardware timeout. The Timeout is the TIME between two received OR sent characters until the read or write operation will return. Typically this value should be 0 (returns immediately) See SYS_COM_TIMEOUT for predefined values. </element> ulBufferSize UDINT <element name=”ulBufferSize” type=”IN”>Buffersize of FIFO buffer</element>
SysComSettingsEx (STRUCT) ¶ TYPE SysComSettingsEx : STRUCT <category>Com port extended settings</category> <description>: This structure can be used to get and set the settings of a COM port. NOTE: The difference of this structure to SysComSettingsEx2 are the 2 members bDtrControl and bRtsControl! Here you can specify only BOOL instead of BYTE values in SysComSettingsEx2! </description> InOut: Name Type Comment byByteSize BYTE <element name=”byByteSize” TYPE=”IN”>Number of bits/BYTE, 4-8</element> bBinary BOOL <element name=”bBinary” TYPE=”IN”>Binary mode, no EOF check</element> bOutxCtsFlow BOOL <element name=”bOutxCtsFlow” TYPE=”IN”>CTS handshaking on output</element> bOutxDsrFlow BOOL <element name=”bOutxDsrFlow” TYPE=”IN”>DSR handshaking on output</element> bDtrControl BOOL <element name=”bDtrControl” TYPE=”IN”>DTR flow control</element> bDsrSensitivity BOOL <element name=”bDsrSensitivity” TYPE=”IN”>DSR Sensitivity</element> bRtsControl BOOL <element name=”bRtsControl” TYPE=”IN”>Rts flow control</element> bTXContinueOnXoff BOOL <element name=”bTXContinueOnXoff” TYPE=”IN”>XOFF continues Tx</element> bOutX BOOL <element name=”bOutX” TYPE=”IN”>XON/XOFF out flow control</element> bInX BOOL <element name=”bInX” TYPE=”IN”>XON/XOFF in flow control</element> byXonChar BYTE <element name=”XonChar” TYPE=”IN”>Tx AND Rx XON character</element> byXoffChar BYTE <element name=”XoffChar” TYPE=”IN”>Tx AND Rx XOFF character</element> wXonLim WORD <element name=”XonLim” TYPE=”IN”>transmit XON threshold</element> wXoffLim WORD <element name=”XoffLim” TYPE=”IN”>transmit XOFF threshold</element>
SysComWrite (FUN) ¶ FUNCTION SysComWrite : UDINT <description><p>Writes the number of bytes to the send buffer of the specified device.</p> <p>IMPLEMENTATION NOTE: If the timeout elapsed until the requested number of bytes are sent, the function returns the number of bytes already sent! This must be considered in the caller and the implementation!</p></description> <result><p>RESULT: Number of actual written bytes</p></result> InOut: Scope Name Type Comment Return SysComWrite UDINT Input hCom RTS_IEC_HANDLE <param name=”hCom” type=”IN”>Handle to com port</param> pbyBuffer POINTER TO BYTE <param name=”pbyBuffer” type=”IN”>Pointer to data buffer for sent data</param> ulSize UDINT <param name=”uiSize” type=”IN”>Requested number of bytes to sent. Must be less or equal the size of the sent buffer!</param> ulTimeout SYS_COM_TIMEOUT <param name=”ulTimeout” type=”IN”>Timeout in milliseconds to sent data to the device. [0]=Immediate return. If the timeout elapsed, the function returns with the still sent data (could be less then the requested number of bytes!)</param> pResult POINTER TO RTS_IEC_RESULT <param name=”pResult” type=”OUT”>Pointer to return the runtime system error code (see CmpErrors.library).</param>
SysComSettingsEx2 (STRUCT) ¶ TYPE SysComSettingsEx2 : STRUCT <category>Com port extended settings</category> <description>: This structure can be used to get and set the settings of a COM port. NOTE: The difference of this structure to SysComSettingsEx are the 2 members byDtrControl and byRtsControl! Here you can specify BYTE instead of BOOL values in SysComSettingsEx! </description> InOut: Name Type Comment byByteSize BYTE <element name=”byByteSize” TYPE=”IN”>Number of bits/BYTE, 4-8</element> bBinary BOOL <element name=”bBinary” TYPE=”IN”>Binary mode, no EOF check</element> bOutxCtsFlow BOOL <element name=”bOutxCtsFlow” TYPE=”IN”>CTS handshaking on output</element> bOutxDsrFlow BOOL <element name=”bOutxDsrFlow” TYPE=”IN”>DSR handshaking on output</element> byDtrControl BYTE <element name=”byDtrControl” TYPE=”IN”>DTR (data-terminal- ready) flow control. See SYS_COM_DTR_CONTROL for possible values.</element> bDsrSensitivity BOOL <element name=”bDsrSensitivity” TYPE=”IN”>DSR Sensitivity</element> byRtsControl BYTE <element name=”byRtsControl” TYPE=”IN”>Rts (request-to-send) flow control. See SYS_COM_RTS_CONTROL for possible values.</element> bTXContinueOnXoff BOOL <element name=”bTXContinueOnXoff” TYPE=”IN”>XOFF continues Tx</element> bOutX BOOL <element name=”bOutX” TYPE=”IN”>XON/XOFF out flow control</element> bInX BOOL <element name=”bInX” TYPE=”IN”>XON/XOFF in flow control</element> byXonChar BYTE <element name=”XonChar” TYPE=”IN”>Tx AND Rx XON character</element> byXoffChar BYTE <element name=”XoffChar” TYPE=”IN”>Tx AND Rx XOFF character</element> wXonLim WORD <element name=”XonLim” TYPE=”IN”>transmit XON threshold</element> wXoffLim WORD <element name=”XoffLim” TYPE=”IN”>transmit XOFF threshold</element>
Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. SysTypes2 Interfaces ¶ Library Identification ¶ Name: SysTypes2 Interfaces Version: newest Company: System Namespace: SysTypes Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysTypes2 Interfaces, * (System)
tSysComRead (STRUCT) ¶ TYPE tSysComRead : STRUCT InOut: Name Type pbyBuffer POINTER TO BYTE ulSize UDINT ulTimeout UDINT pResult POINTER TO RTS_IEC_RESULT pulOut POINTER TO UDINT
tSysComSetSettings (STRUCT) ¶ TYPE tSysComSetSettings : STRUCT InOut: Name Type pSettings POINTER TO COM_Settings pSettingsEx POINTER TO COM_SettingsEx pulOut POINTER TO RTS_IEC_RESULT
tSysComSetTimeout (STRUCT) ¶ TYPE tSysComSetTimeout : STRUCT InOut: Name Type pulTimeout POINTER TO COM_Timeout pulOut POINTER TO RTS_IEC_RESULT
tSysComWrite (STRUCT) ¶ TYPE tSysComWrite : STRUCT InOut: Name Type pbyBuffer POINTER TO BYTE ulSize UDINT ulTimeout UDINT pResult POINTER TO RTS_IEC_RESULT pulOut POINTER TO UDINT