beautypg.com

Delta DVP-ES2 User Manual

Page 244

background image

D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E O p e r a t i o n M a n u a l - P r o g r a m m i n g

3 - 1 2 8

M1000

DCNT

C251

K100

DHSCS

C251

K100

M0

¾

When C251 counts up and the value in C251 varies from 100 to101, DHSCS instruction

sets M0 ON.

¾

When C251 counts down and the value in C251 varies from 100 to 99, DHSCR

instruction resets M0.

¾

Timing diagram for the comparison:

Counting
No.

Time

Count up

Count down

M0

101

100

99

98

101

100

99

98

1

2

Program Example 3:

Executes interrupt subroutine by applying software comparator.

M1000

DCNT

C235

K100

DHSCS

C235

K100

I010

EI

FEND

I010

M1000

OUT

Y10

IRET

END

¾

When value in C235 varies from 99 to100, interrupt subroutine triggered by I010 executes

immediately to set Y0 ON.

Points to note:

¾ If

operand

D is specified as S, M or Y0~Y3 for the above high speed comparison, the compare

result will immediately output to the external points Y0~Y3 (Y0~Y5 for SS2/SX2). However, if

D is specified as Y4~Y337, external outputs will be updated till the end of program (delay for

one scan cycle).

This manual is related to the following products: