This library supports currently only the rotary encoder KY040. But it should support more in the future.
The exact usage of the driver depends on the hardware and the implementation of the driver. As this varies a bit, every driver has its own documentation.
As an example we will use the Raspberry Pi 1 Model B. You also have to install [CODESYS Control for Raspberry Pi SL] [1].
[1] : https://store.codesys.com/codesys-control-for-raspberry-pi-sl.html?___store=default