CAA SerialCom Library Documentation ¶ Company CAA Technical Workgroup Title CAA SerialCom Version 3.5.15.0 Categories Intern|CAA|System Namespace COM Author 3S - Smart Software Solutions GmbH Placeholder CAA SerialCom Description 1 ¶ This library provides function blocks for using serial ports. As the standardized in- and outputs of the function blocks are described in detail within the CAA Guidelines, this item will be omitted here. Access to a COM device can be activated and configured with the help of COM.Open. The function blocks COM.Write and COM.Read allow writing and reading of data via the serial port. Having read out or written all data the serial port has to be released for other applications by use of COM.Close. All input parameters of the function blocks are stored in local internal variables. This does not apply for the content of input data structures being referenced by a pointer, e.g. pBuffer of COM.Read or COM.Write. Contents: ¶ CAA SerialCom Enums Function Blocks Global Variables Structs Library Information GetLibVersion (Function) GetLibVersionNumber (Function) IsLibReleased (Function) Indices and tables ¶ 1 Based on CAA_SerialCom.library, last modified 24.07.2019, 08:30:18. LibDoc 4.4.0.0-b.27 The content file CAA_SerialCom.clean.json was generated with CODESYS V3.5 SP15 on 24.07.2019, 08:30:20.
CAA SerialCom ¶ Enums DTR_CONTROL (Enum) ERROR (Enum) PARITY (Enum) RTS_CONTROL (Enum) STOPBIT (Enum) Function Blocks Close (FunctionBlock) Open (FunctionBlock) Read (FunctionBlock) Write (FunctionBlock) Global Variables CAA_Parameter_Constants (GVL) Structs PARAMETER (Struct)
Enums ¶ DTR_CONTROL (Enum) ERROR (Enum) PARITY (Enum) RTS_CONTROL (Enum) STOPBIT (Enum)
DTR_CONTROL (ENUM) ¶ TYPE DTR_CONTROL : Configuration for DTR control (see parameter udiDtrControl) Attributes: qualified_only InOut: Name Initial Comment DTR_CONTROL_DISABLE 0 0 = Disables the DTR line DTR_CONTROL_ENABLE 1 = Enables the DTR line DTR_CONTROL_HANDSHAKE 2 = Enables DTR handshaking
ERROR (ENUM) ¶ TYPE ERROR : This data structure describes errors eventually occurring while working with functions of CAA_SerialCom library. Values ranging from 5000 to 5099 have been reserved for these errors within the prefix registration (LibraryRegistry.chm). Attributes: qualified_only InOut: Name Initial Comment NO_ERROR 0 no error FIRST_ERROR 5000 first library specific error TIME_OUT 5001 = timeout error ABORT 5002 = abort input active HANDLE_INVALID 5003 = handle invalid ERROR_UNKNOWN 5004 = unknown error WRONG_PARAMETER 5005 = wrong parameter WRITE_INCOMPLETE 5006 = write incomplete FIRST_MF 5050 first manufacture specific error LAST_ERROR 5099 last library specific error
PARITY (ENUM) ¶ TYPE PARITY : Supported parity Attributes: qualified_only InOut: Name Initial Comment EVEN 0 0 = even parity ODD 1 = odd parity NONE 2 = no parity
RTS_CONTROL (ENUM) ¶ TYPE RTS_CONTROL : Configuration for RTS control (see parameter udiRtsControl) Attributes: qualified_only InOut: Name Initial Comment RTS_CONTROL_DISABLE 0 0 = Disables the RTS line RTS_CONTROL_ENABLE 1 = Enables the RTS line RTS_CONTROL_HANDSHAKE 2 = Enables RTS handshaking RTS_CONTROL_TOGGLE 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.
STOPBIT (ENUM) ¶ TYPE STOPBIT : Supported number of stop bits Attributes: qualified_only InOut: Name Initial Comment ONESTOPBIT 0 0 = 1 stopbit ONE5STOPBITS 1 = 1.5 stopbits TWOSTOPBITS 2 = 2 stopbits
Function Blocks ¶ Close (FunctionBlock) Open (FunctionBlock) Read (FunctionBlock) Write (FunctionBlock)
Close (FB) ¶ FUNCTION_BLOCK Close EXTENDS CBM.ETrig Close a serial com port opened via the FB COM. Open . The output handle hCom must be used here to close the COM port! InOut: Scope Name Type Comment Input hCom CAA.HANDLE Handle to the open COM port. Ist returned by the COM. Open function block. Output eError ERROR Local library error ID (0: no error; 5001: time out)