Industrial Automation
Industrial Automation | Europe

myKnowledge

Main > Product Type > Automation Systems > PLCs
Minimize Text   Default    Enlarge Text
 

Print
E-mail

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

 

Program
Count input bits: CIO 0.00 to CIO 1.15 (32 bits): Processed with index register IR0
BCD, 4 digits, incremental counter: D100 to D131 (32 bits): Processed with index register IR1
Differentiated Bit Generated Flag: W0.00 to W1.15 (32 bits): Processed with index register IR2



 



 




Comments (View All Comments / Add Comment)

Related Articles
No related articles found.
Created 2008-10-31
Modified 2016-05-13
Views 5146

 

You are not logged in.