How do I write a program that uses index registers and increment instructions to do an incremental count of N pulse inputs?
The following introduces a method to count 32 pulse input bits within a loop program using FOR-NEXT instructions and an index register. (FOR-NEXT instructions can be used on CS1 and CJ1 Programmable Controllers (PLC).)
Key Points About This Program
Under basic operating principles, differentiated instructions and instructions with the @ option cannot be used within loop programs. Therefore the program in the following figure has been used.
Basic Structure of a Program to Generate Differentiated Bit