DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming Program Example 2: 1. Use TMR instruction to write in 10 groups of set time. 2. Write the set values into D100 ~ D109 in advance 3. The timer resolution is 0.1 sec for timers T0 ~ T9 and 1 sec for the teaching timer. 4. Connect the 1-bit DIP switch to X0 ~ X3 and use BIN instruction to convert the set value of the switch into a bin value and store it in E. 5. The ON duration (in sec) of X20 is stored in D200. 6. M0 is a pulse for one scan cycle generated when the teaching timer button X20 is released. 7. Use the set number of the DIP switch as the index pointer and send the content in D200 to D100E (D100 ~ D109).
M10 M11 M19 M1000 X20 X20 M0 Note: The TTMR instruction can only be used 8 times in a program. If TTMR is used in a CALL subroutine or interrupt subroutine, it only can be use once. 3-172 TMR T0 D100 TMR T1 D101 TMR T9 D109 BIN K1X0 E TTMR D200 K0 PLF M0 MOV D100 D200E