All examples work with or without tls communication. If tls connection is required, the addon 'CODESYS Security Agend' is mandatory to create certificates. To open the securty agend click at the bottom right on the securty agend symbol:
Select Devices -> there you can create a new certificate for NBSServer and also for Client, if NBSServer or NBSClient information is not available, a download in advance is required.
The project contains two devices, a CODESYS Control Win V3 and a CODESYS Control Win V3 x64, each with one application in it to simulate a Server - Client relationship. Set up in Client -> CLIENT_PRG the client common name and the appropriate ip address, as well as for Server -> SERVER_PRG. If tls communication is not necessary the variable myTLSContext can be removed (SERVER_PRG and CLIENT_PRG). Server application (myServer) should be enabled first.
The project contains two devices, two CODESYS Control Win V3 x64, each with one application in it to simulate a UDP Producer - UDP Consumer relationship. In the Conusmer application there is a UDP_Processor in it, which extends the NBS.UDP_Processor, so this function block implements the interface method ProcessPacket. In this method (which is called from interface) some data is processed.
The project contains two devices, two CODESYS Control Win V3 x64, each with one application in it to simulate a TCP Server - TCP Client relationship. The server only returns the values which where send from the client. The client inclues an example where asynchronious read, process and write can be done via the function blocks NBS.TCP_Reader, NBS.TCP_Processor and NBS.TCP_Writer. The NBS.TCP_Processor is overwritten in this example to implement the ProcessStream method. Also this example shows a possibility to read, manipulate and write synchroniously via direct TCP_Client methods Read() and Write(), if xAsync is FALSE.
Be aware that for this Server - Client relationship a TLS context is used, so its mandatory to import in the client the server certificate and vice versa. For unencrypted communication the NBS.TLSContext can be deleted.
|System requirements and restrictions||Info|
|Programming System||CODESYS Development System Version 18.104.22.168 or higher|
|Runtime System||CODESYS Control Version 22.214.171.124|