The library provides the core functionality for implementing socket-based network communication protocols using TCP (Transmission Control Protocol) client and server, or UDP (User Datagram Protocol) including broadcast and multicast if supported by the platform. Only communication based on IPv4 via the Ethernet-ports of the controller is supported.
You have to implement the application protocol used on the remote site (which can be hardware such as barcode scanners, vision cameras, industrial robots, or computer systems running software like database servers).
The user interface of the library is derived from BSD-style socket implementations comparable to the ones used when programming communication applications under UNIX or Microsoft Windows based systems. It uses these main functions:
Open / Bind / Connect
to initialize the communication
Accept
to accept incoming TCP-connections when running a TCP server
Close / Disconnect / Shutdown
to end the communication
Send / SendTo
to transmit data to remote systems
Receive / ReceiveFrom
to process data sent by remote systems
SocketOptions
to tune the low-level behavior of the communication
In this library, an object-oriented approach has been chosen to allow a clean design of the application program. Thus the functions presented above are available as methods and properties of the respective function blocks explained in detail in chapter Program Organization Units (POU).
The following table indicates the characteristics of the library:
Characteristic |
Value |
---|---|
Library title |
TcpUdpCommunication |
Company |
Schneider Electric |
Category |
|
Component |
|
Default namespace |
|
Language model attribute |
|
Forward compatible library |
Yes (FCL) |
In conjunction with the library the example project TcpUdpCommunication library.
is provided. The example project shows how to implement a data exchange between two controllers over the Ethernet network with using theThe example project is installed on your PC along with the programming software. To open the project example, proceed as follows:
Step |
Action |
Comment |
---|---|---|
1 |
In the EcoStruxure Machine Expert Logic Builder, execute the command . |
– |
2 |
In the dialog box, select from the list. |
– |
3 |
On the right-hand side of the dialog box, click the button . |
Result: Available examples are listed in the drop down menu. |
4 |
Select your example from the drop down menu. |
– |
5 |
Select your controller from the list. |
– |
6 |
Enter a name for the new project, and select the file location. |
– |
7 |
Click the button. |
Result: A new project is created based on the selected example. |
Only IPv4 IP addresses are supported for the communication functions provided with this library.
The TcpUdpCommunication (Schneider Electric) and the CAA Net Base Services library (CAA Technical Workgroup) use the same system resources on the controller. The simultaneous use of both libraries in the same application may lead to disturbances during the operation of the controller.
WARNING | |
---|---|
WARNING | |
---|---|
For more information on organizational measures and rules covering access to infrastructures, refer to ISO/IEC 27000 series, Common Criteria for Information Technology Security Evaluation, ISO/IEC 15408, IEC 62351, ISA/IEC 62443, NIST Cybersecurity Framework, Information Security Forum - Standard of Good Practice for Information Security and refer to Cybersecurity Guidelines for EcoStruxure Machine Expert, Modicon and PacDrive Controllers and Associated Equipment.