Posted 27 May 2023 hi everyone, I created a program to indicate the motor directions, but it does not work. One more, I cannot reset the encoder. I used encoder#1. Pls help me. Thank you. MotorDirection.cxp Share this post Link to post Share on other sites
Posted 2 Jun 2023 are you using a MD211? or a different card to capture the pulses ? Share this post Link to post Share on other sites
Posted 2 Jun 2023 Most likely, you are using the built in HSC functions on the CP1H. High Speed Counting is performed in the PLC hardware. Using standard MOV instructions in the cyclic task are not fast enough to read the precise encoder position. Take a look at the CTBL(882) and/or INI(880) instructions. The INI(880) instruction will also be used to reset the counter. Share this post Link to post Share on other sites