1. Interrupt fixed length instruction DVIT

1. Interrupt fixed length instruction DVIT

1.1. Instruction Description

1) The interrupt positioning instruction DVIT is used to accurately locate a fixed position after the signal.

2) After the DVIT command is activated, it first moves continuously at a fixed pulse frequency and direction until an interrupt signal is detected. After detecting the interrupt signal, output a fixed number of pulses at the current frequency and stop running.

3) At the beginning of movement and when outputting a fixed number of pulses, the acceleration and deceleration process is carried out according to the set acceleration and deceleration time.

4) The instruction does not require additional activation of interrupts or activation of interrupts, only the correct interrupt number needs to be entered to activate the DVIT instruction.

5) The direction of instruction transmission is determined by the positive or negative frequency at the time of activation. During operation, it will respond to changes in frequency but will not reverse or pause.

6) When the enable is normally open, it responds to the interrupt signal throughout the entire process. When the enable bit is enabled, it only responds to the interrupt signal when the enable bit is ON.

1.2. Instructions for use

The X points corresponding to the interrupt number are shown below, and X points outside this range cannot trigger interrupt positioning.

The interrupt numbers that can be used for DVIT instruction multi pulse are 0 to 34, corresponding to the three types of the first six high-speed X ports.

Interrupt Number Interrupt Event
K0 X000 rising edge trigger
K1 X000 falling edge trigger
K2 X000 edge change trigger
K3 X001 rising edge trigger
K4 X001 falling edge trigger
K5 X001 edge change trigger
K8 X002 rising edge trigger
K9 X002 falling edge trigger
K10 X002 edge change trigger
K11 X003 rising edge trigger
K12 X003 falling edge trigger
K13 X003 edge change trigger
K14 X004 rising edge trigger
K15 X004 falling edge trigger
K16 X004 edge change trigger
K17 X005 rising edge trigger
K18 X005 falling edge trigger
K19 X005 edge change trigger
K20 X006 rising edge trigger
K21 X006 falling edge trigger
K22 X006 edge change trigger
K23 X007 rising edge trigger
K24 X007 falling edge trigger
K25 X007 edge change trigger
K26 X arbitrary address rising edge trigger
K27 X arbitrary address falling edge trigger
K28 X arbitrary address edge change trigger
K29 Y arbitrary address rising edge trigger
K30 Y arbitrary address falling edge trigger
K31 Y arbitrary address edge change trigger
K32 M arbitrary address rising edge trigger
K33 M arbitrary address falling edge trigger
K34 M arbitrary address edge change trigger
Pulse output flag (read-only):
register pulse output
M8134 Y000
M8135 Y001
M8136 Y002
M8137 Y003
For multi pulse series PLCs, the following registers are also available:
register pulse output
M8138 Y004
M8139 Y005
M8140 Y006
M8141 Y007
M8142 Y010
M8143 Y011
Pulse accumulation counting (read-write):
register pulse output
D8140(D8141) Y000
D8142(D8143) Y001
D8144(D8145) Y002
D8146(D8147) Y003
For multi pulse series PLCs, the following registers are also available:
register pulse output
D8148(D8149) Y004
D8150(D8151) Y005
D8152(D8153) Y006
D8154(D8155) Y007
D8156(D8157) Y010
D8158(D8159) Y011
Do you want to ignore the error and continue sending pulses? The default value for ignoring is 0. If set to 1, stop pulse output (read/write) when an error occurs:
register pulse output
M8070 Y000
M8071 Y001
M8072 Y002
M8073 Y003
For multi pulse series PLCs, the following registers are also available:
register pulse output
M8074 Y004
M8075 Y005
M8076 Y006
M8077 Y007
M8078 Y010
M8079 Y011

1.2.1. Attention:

  1. For high-speed pulse output, it is designed for external high-speed devices. To count the pulses, only a high-speed pulse input counter can be used, and internal counters or Y edge changes cannot be used for counting. When used as a high-speed output, it cannot be used as a regular output port;

  2. The OFF time of transistors has the characteristic of being prolonged under light loads. So, when responsiveness is required, please design a load resistor to increase the load current when the load is lighter;

  3. For pulse output Y0, the number of pulses is accumulated in register D8140 (D8141), where D8141 stores the high 16 bits and D8140 stores the low 16 bits;

  4. The pulse accumulation count registers (D8140~D8158) are important registers that can be read and written. When a new value is written, the count will be added or subtracted based on the new value;

  5. Due to the directional pulse output of this instruction, the pulse accumulation count registers (D8140~D8158) count according to the direction;

  6. When outputting high-speed pulses, the values in the pulse accumulation count registers (D8140~D8158) are discontinuous and constantly changing. When used for judgment, please use size comparison instead of equal judgment;

  7. When the pulse command is used to output port Y, the Y port cannot be used for other purposes, that is, ordinary commands cannot perform ON or OFF operations on the Y port anymore.

  8. If the frequency of multiple pulse exceeds 200K, a pull-up resistor needs to be added to the pulse output port to ensure that the pulse waveform is not distorted. The pull-up voltage is 24V, and the recommended pull-up resistor is 1K.

1.3. The valid operands of the instruction

Input/Output Data Type operand Description
F 32-bit integer D/CV/K/H/FD, bit composite word (X/Y/M/C/T/S), local variable (LD) frequency
P 32-bit integer D/CV/K/H/FD, bit composite word (X/Y/M/C/T/S), local variable (LD) quantity
AC 16 bit unsigned integer D/CV/TV/AI/AO/K/H/V/Z/FD, bit composite word (X/Y/M/C/T/S), local variable (LW) acceleration time
OUT ON/OFF Y Pulse
DIR ON/OFF Y Direction
INT 16 bit unsigned integer K/H Interrupt number

1.4. Example

Command table:

NETWORK 000

LD M0

DVIT K10000 K20000 K0 Y002 Y001 K24

POP

DVIT

图1 DVIT