Home > CODESYS >

CODESYS Serial COM Example - Article no.000018
CODESYS Serial COM Example - Article no.000018
 
Price : $50.00


Availability: 1 Week
Order #: 000018
Qty:

Description Ordering Information Specifications and Drawings
 

CODESYS Serial COM Example - Article no.000018

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.

More information

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.

Support Links
CODESYS Serial COM Example - Article no.000018

Share your knowledge of this product. Be the first to write a review »