Mitsubishi — 14.2 High Speed Compare Function

14 High Speed Compare and Capture Program example: In this example high speed counter C204 is used. When count value exceeds K100, CLR1 will be ON; when count value exceeds K300, CLR1 will be reset. Therefore, 2 sets of comparison is designed in this example, one set triggers CLR1 and another resets CLR1. In comparison application, the LED of CLR1 will not respond when CLR1 is ON. To monitor CLR1 state, connect CLR1- with 24G, CLR1+ with X7, S/S2 with +24V and an additional MPG is required. Please see below for the example program. Comparison initial setting: apply 2 sets of Compare (n=0, n=1). FROM/TO 10 pieces of data. Compare setting: n=0, Source: C204(b[3:0]=4); Compare method:

≧ (b[5:4]=2); SET(b[7:6]=0); output terminal: CLR1(b[11:8]=1); Compare value: 100 n=1, Source: C204(b[3:0]=4) ; Compare method: ≧ (b[5:4]=2); RST(b[7:6]=1) ; output terminal: CLR1(b[11:8]=1); Compare value: 300 M1 M2 M3 M4 M5 DVP-PM Application Manual 14-5 02 MOV K0 D0 MOV K0 D1 MOV K10 D20 MOV K10 D60 1 MOV H124 D2 MOV K0 D4 MOV H164 D6 MOV K300 D8 RST M7 2 TO K253 K1 D0 D20 RST M2 3 FROM K253 K1 D40 D60 RST M3 4 MOV K1 K1M1204 SET M5 RST M4 DCNT C204 K10