Wiring an Incremental Rotary Encoder with PLC