Serial COM Example: Product Description
Serial COM Example: Product Description
Product description
This example demonstrates how serial communication can be implemented, how ports are opened, closed and
information is read and send. A second example shows the usage of the library SysCom.
Range of functions
Application ‘CAASerialComExample’:
At the beginning the necessary parameters for the ports are set in an array of PARAMETER structs. The first
value is the used parameter and the second one is the value of the parameter. The correct port numbers need
to be adapted in the aCom1Params and aCom2Params variables. In the following example the parameter is the port
and the value is 1. So the COM1 port is used.
aCom1Params[1].udiParameterId:=COM.CAA_Parameter_Constants.udiPort;
aCom1Params[1].udiValue := 1;
If the ports are open and no error occurred one port starts writing. After this port finished writing, the other port
will be used for reading. At the end both ports will be closed and the used Handles will be released.
Application ‘SysComExample’:
This application shows how to use the library SysCom for serial communication.
1/2
Serial COM Example
General information
Manufacturer: 3S-Smart Software Solutions GmbH
Memminger Strasse 151
87439 Kempten
Germany
Support: https://support.codesys.com
Included in delivery:
CODESYS Package with example project
Note: Not all CODESYS features are available in all territories. For more information on geographic restrictions,
please contact [email protected].
Note: Technical specifications are subject to change. Errors and omissions excepted. The content of the
current online version of this document applies.
2/2