Connect both KY040s to the Raspberry Pi as it is shown in the following images:
Insert the LAN-Cable to your Raspberry Pi and make sure that it is connected to
lokal network. Now boot it by plugging in the powercable.
After opening CODESYS Development System V3 and adding the CODESYS Control for Raspberry Pi SL,
go to Tools -> Library Repository and Install the library, you have downloaded.
Now conntect to your Raspberry Pi. Therefor double click on "Device" and choose on the new window
at the right your Raspberry Pi as your target device, like in the image below.