0% found this document useful (0 votes)
91 views

Serial COM Example: Product Description

This document summarizes a serial COM example project that demonstrates serial communication between two ports. The first port writes a string that is read by the second port. It also shows how to use the SysCom library for serial communication by opening, closing, and reading/writing to ports. The example project sets up the necessary parameters to use COM1 and COM2 ports and performs writing, reading, and closing of the ports.

Uploaded by

Daniel Haro
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views

Serial COM Example: Product Description

This document summarizes a serial COM example project that demonstrates serial communication between two ports. The first port writes a string that is read by the second port. It also shows how to use the SysCom library for serial communication by opening, closing, and reading/writing to ports. The example project sets up the necessary parameters to use COM1 and COM2 ports and performs writing, reading, and closing of the ports.

Uploaded by

Daniel Haro
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Serial COM Example

Serial COM Example


This example shows how to use the serial port. Therefore the communication of two ports with each other is
implemented. The first one writes a string of characters, which is read by the second one.

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

Item: Serial COM Example


Item number: 000018
Sales: CODESYS Store
https://store.codesys.com

Included in delivery:
CODESYS Package with example project

System requirements and restrictions


Programming System CODESYS Development System V3.5.6.0 or higher
Runtime System CODESYS Control V3.5.6.0 or higher
Supported Platforms/ Devices All
Note: Use the project “Device Reader” to find out the supported
features of your device. “Device Reader” is available for free in the
CODESYS Store.
Additional Requirements Serial COM interface
Restrictions -
Licensing -
Required Accessories -

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

You might also like