6F3B0253

7. Instructions

FUN 149

U/D

Up-down counter

Expression

Direction input

 

U U/D Q

 

Output

 

 

Count input

 

C

 

 

Enable input

 

E A

 

 

 

 

 

 

 

 

Function

While the enable input is ON, this instruction counts the number of the count input changes from OFF to ON. The count direction (up count or down count) is selected by the state of the direction input. The count value is stored in the counter register A. The count value range is 0 to 65535.

Up count when the direction input is ON

Down count when the direction input is OFF

When the enable input is OFF, the counter register A is cleared to 0.

Execution condition

Enable

Operation

Output

input

 

 

OFF

No operation (A is cleared to 0)

OFF

ON

Count value is not limit value (0 or 65535)

OFF

 

Count value is limit value and count input is ON

ON

Operand

 

Name

 

 

Device

 

 

 

 

 

 

Register

 

 

Constant

Index

 

 

X

Y

R

S

T.

C.

XW

YW

RW

SW

T

C

D

I

J

K

 

 

A

Count value

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example

X005

X006

R010

C005

1

 

2

 

3

 

2

 

1

1

 

2

 

3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

C.005

Note

The transitional contact is required for the count input. Otherwise, counting is executed every scan during X005 is ON in this example.

For the direction input and the count input, direct linking to a connecting point is not allowed. Refer to Note of Shift register FUN 074.

216 T1-16S User’s Manual

Page 218
Image 218
Toshiba 6F3B0253 user manual FUN Up-down counter