Chapter 5 instruction specifications – Hitachi NJI-350B User Manual

Page 85

Advertising
background image

Chapter 5 Instruction Specifications

5-35

Program example

X00007

CTU17

LD

X00007

OUT

CTU17 4

LD

X00008

OUT

CTD17

LD

X00009

OUT

CL17

LD

CT17

OUT

R107

X00008

CTD17

4

X00009

CL17

CT17

R107

• An example of a word I/O being used as the set value for the circuit shown above.

R7E3

X00007

CTU17

WR0017

X00008

CTD17

WR0017=4

LD

R7E3

[
WR0017=4
]
LD

X00007

OUT

CTU17 WR0017

LD

X00008

OUT

CTD17

LD

X00009

OUT

CL17

LD

CT17

OUT

R107

X00009

CL17

CT17

R107

Program description

[Time chart]

1

2

3

4

5

4

3

2

3

4

5

65 535

65 534

0

X00007

X00008

CL17

CT17

=4

Ignored

1]

2]

4] 5]

3]

7]

6]

6]

Set value

Progress value
(TC17)

Ignored

Ignored

1] The progress value (count value) is

up-counted at the leading edge of
X00007.

2] The counter coil (CT17) is turned on

when the progress value

≥ set value.

3] When the up-coil and down-coil

startup conditions turn on
simultaneously, the progress value
does not change.

4] The progress value is down-counted

at the leading edge of X00008.

5] The counter coil turns off when set

value > progress value.

6] The progress value will not exceed 65535 (decimal). Also, it will not be below 0.
7] When the counter clear (CL17) turns on, the progress value and the counter coil are cleared. The progress value is not

updated while the counter clear is on.

• The clear is performed under the conditions set immediately before execution of the counter coil instruction.
• Example using the word I/O as the set value

When RUN is commenced, the set value is set to word I/O.
Or, the word I/O for the set value is designated to store in the power failure memory.

z

OUT

CT

U

n

s

OUT

CT

D

n

Advertising