IPA Software - INTCAP (Position Capture)
Products: IPA
The IPA has two Capture Registers and can performance high speed captures on both the primary/motor encoder  (ENC0) and the aux/secondary encoder (ENC1). The table below defines what inputs can trigger the captures. Mode is used by the INTCAP, MSEEK, HSINT, CAM ON TRG and GEAR ON TRG commands to tells the controller which input is triggering the capture.Â
Capture Register: Specifies which register is armed to hold the captured position.
If the hardware capture register is not specified, the hardware capture register index is the same as the feedback encoder index of the axis used to enable the hardware capture. The capture complete flag and hardware capture parameter for the encoder capture is selected based on the axis used to enable the hardware capture.
In this example, ENC0 (primary feedback) is attached to AXIS0, therefore the default Capture Register is 0
INTCAP X0Â
REM Mode 0 = rising Z marker
INTCAP X1Â
REM Mode 1 = falling Z marker
INTCAP X6
REM Mode 6 Â = falling edge Input
AXIS0 INTCAP 2
REM Mode2 = rising edge of Inp 5
REM Hardware Capture Parameter -- P12292
REM Capture Complete Flag -- BIT777
Â
If the hardware capture register is specified then the capture parameter must also be specified. The capture complete flags and hardware capture parameters are still in pairs, but are not based on the axis used to enable the hardware capture.
AXIS0 INTCAP 11 CAP1 P12548
REM Mode 11-- Inp 4
REM Hardware Capture Parameter -- P12548
REM Capture Complete Flag -- BIT809
Â
The only valid way to capture the second encoder is using input 4. The other 2 high speed inputs 5 and 6 are used as the encoder so cannot be used to also capture.Â
Â
The INTCAP command is axis/encoder specific, so we need to relate the axis to an encoder. By default in the IPA  ENC1  (secondary encoder)is attached to the AXIS1 (phantom axis). Because of this we can directly address the INTCAP command without additional set-up.
Â
the two valid modes are :
Â
11 Â : rising edge of Input 4
15 Â : falling edge of input 4
Â
code would look like this
Â
AXIS1 INTCAP 11 Â : rem rising edge of input 4
or
AXIS1 INTCAP15 Â : rem falling edge of input 4
OrÂ
AXIS1Â INTCAP10 CAP0 P12292Â Â : rem rising edge of input 4
orÂ
AXIS1Â INTCAP14 CAP0 P12292 Â : rem falling edge of input 4
Â
Table Key
MRK= Encoder Z Mark
INP=Digital Input
+ = Rising Edge
= Falling Edge
 | ENC0 | ENC0 | ENC1 | ENC1 |
---|---|---|---|---|
 | CAP0 | CAP1 | CAP0 | CAP1 |
Mode | Â | Â | Â | Â |
0 | +MRK 0 | Â | Â | Â |
1 | Â | Â | Â | Â |
2 | +INP 5 | +INP 6 | Â | Â |
3 | +INP 6 | +INP 5 | Â | Â |
4 | -MRK 0 | Â | Â | Â |
5 | Â | Â | Â | Â |
6 | -INP 5 | -INP6 | Â | Â |
7 | -INP 6 | -INP 5 | Â | Â |
8 | Â | Â | Â | Â |
9 | Â | Â | Â | Â |
10 | +INP 4 | Â | +INP 4 | Â |
11 | Â | +INP 4 | Â | +INP 4 |
12 | Â | Â | Â | Â |
13 | Â | Â | Â | Â |
14 | -INP 4 | Â | -INP 4 | Â |
15 | Â | -INP 4 | Â | -INP 4 |
Â
Â
jw 19-MAR-2015