DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming 2. If users change the target frequency by applying DICF instruction in insterupt subroutines, the actual changing timing will be executed immediately with only an approx. 10us delay (execution time of DICF instruction). The timing diagram is as below: Interrupt Freq. Time approx.10us Program Example: 1. When M0 = ON, pulse output ramps up to 100kHz. Total shifts: 100, Gap frequency: 1000Hz, Gap time: 10ms. Calculation of total shifts: (100,000 ﹣ 0) ч 1000 = 100. 2. When X6 external interrupt executes, target frequency is changed and ramp down to 50kHz immediately. Total shifts: 150, Gap frequency: 800Hz, Gap time: 20ms.
Calculation of total shifts: (100,000 ﹣ 50,000) ч 800 = 125 3. When X7 external interrupt executes, target frequency is changed and ramp down to 100Hz immediately. Total shifts: 25, Gap frequency: 2000Hz, Gap time: 100ms. Calculation of total shifts: (50,000 ﹣ 100) ч 2000 = 25. 4. When pulse output reaches 100Hz, the frequency is kept constant and pulse output stops when 1,000,000 pulses is completed. 1000Hz 800Hz Freq.(Hz) 10ms 100KHz 20ms 2000Hz 50KHz 100ms 100Hz Time(ms) M0=ON X6=ON X7=ON 1,000,000pulse 3-484 Actual timing of changing Gap freq. Gap Gap time time