DVP-ES3 Series Programming Manual Symbol S 1 : External interrupt input point number S 2 : High-speed counter number D : Register for storing the captured value Explanation _6 1. You can use only the 16 input points X0–X7 and X10–X17 of the PLC in S 1 . Use one of these input points with the external interrupt service program to start the function. Note that S 1 cannot share the same input point with the high-speed counter. 2. Select the high-speed counter HC device in S 2. You must use the HC device with the DCNT instruction (API 1004) to start the counting function. 3. The instruction stores the captured value from the high-speed counter (32-bit) in D when the interrupt occurs.
The instruction stores data when the interrupt occurs, and is not affected by the PLC program scanning. 4. The instruction operation is shown below. The input interrupt is triggered by the falling edge. When the execution of the instruction starts, the value in D does not change and you can enter the default setting value. When the interrupt in S 1 occurs, the instruction captures the value of the counter specified by S 2 immediately and stores it in D.
6-296 API Instruction code Operand Function 1010 D CAP S1, S2, D Capturing the high-speed count value in the external input interrupt Device X Y M S T C HC D FR SM SR E K 16# “$” F S1 S2 D BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S1 S2 D Pulse instruction 16-bit instruction 32-bit instruction - - ES3