Rockwell Automation Publication 2198-UM004D-EN-P - December 2022 381
Chapter 12 Motion Control Applications
Example 1:
When ID179 (P1.097) = 5; ID153 (P1.046) = 2500
Example 2:
When ID179 (P1.097) = 7; ID153 (P1.046) = 2500
Figure 188 - High Speed Position Compare Flowchart
OA/OB output
2500
5
----------
500 pulses==
OA/OB output
2500
7
----------
357.142857 pulses==
No
Data array
≥
1234
2345
5678
6789
7890
DO4
DO4
Yes
CAP
amount
ID350 (P5.058)
Start address
ID348 (P5.056)
CMP switch
ID351 (P5.059.X) Bit0
CMP axis
position 7890
CMP axis
position
ID349 (P5.057)
CMP axis source
AUX ENC ID351 (P5.059.Y) = 1
Pulse Cmd ID351 (P5.059.Y) = 2
Main ENC ID351 (P5.059.Y) = 3
CMP trigger logic
Normally open
ID351 (P5.059.Z) = 0
Pulse output duration
ID351 (P5.059.CBA)
Normally closed
ID351 (P5.059.Z) = 1
CMP amount
ID350 (P5.058) = ID350 (P5.058) - 1
CMP completed?
ID350 (P5.058) = 0
Call PR#45
ID351 (P5.059.U) Bit 0 = 1
Cyclic CMP
ID351 (P5.059.X) Bit 1 = 1
ID350 (P5.058) = Previous setting
value
Enable CAP after
completed
ID351 (P5.059.X) Bit 2 = 1
CMP axis position resets to
0
ID351 (P5.059.X) Bit 3 = 1