Chapter 5 Instruction Specifications

Item number

 

FUN instructions-5

 

 

Name

 

 

High-speed Counter Operation Control

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ladder format

 

 

 

 

 

Condition code

 

Processing time (s)

 

Remark

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R7F4

 

R7F3

 

R7F2

 

R7F1

R7F0

Average

Maximum

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FUN 140 (s)

 

DER

 

ERR

 

SD

 

 

V

 

 

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

z

 

 

z

 

 

z

 

 

z

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instruction format

 

 

 

 

 

Number of steps

 

147

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Condition

 

 

 

 

 

Steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FUN 140 (s)

 

 

 

 

 

 

 

 

3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bit

 

 

 

 

 

 

 

 

 

Word

 

Double word

 

Constant

 

 

 

 

Usable I/O

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Other

 

 

X

 

Y

M

 

 

CU, CT

 

WX

WY

WM

 

TC

DX

DY

DM

 

 

 

 

 

 

 

 

 

 

 

R,

 

 

TD, SS,

 

 

 

 

 

 

WR,

 

 

 

 

 

DR,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Argument (Counter

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

s

number, operation

 

 

 

 

 

 

 

 

 

 

 

 

 

 

{

 

 

 

 

 

 

 

 

 

 

 

 

control value)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Function

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

15

 

 

8 7

 

 

 

 

 

0

 

 

 

Counter number:

H01 to H04

 

 

S

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Counter number

 

Operation instruction

 

 

 

Operation instruction:

H00 – Stop,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

H01 – Start

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Performs the starting and stopping of the count operation for the specified counter.

Notes

If a value other than H01 to H04 is specified for the counter number and the operation instruction is set to a value other than H00 or H01, DER will be set to “1” and no processing will be performed.

If the specified counter number is set to a function other than a corresponding external I/O counter (single-phase counter, two-phase counter), DER will be set to “1” and no processing will be performed.

Since Counter 4 is invalid when a 10-point CPU is used, if Counter 4 is specified, DER will be set to “1” and no processing will be performed.

If the specified counter number is unable to make an output (PI/O function setting result by R7F5), DER will be set to “1” and no processing will be performed.

This instruction is only used to start and stop the counter operation. Other counter settings will not be changed.

The counter operation will start after the power is turned back on even if the power is turned off when the count operation is stopped by this instruction. The operation of the high-speed counter will be stopped only when this instruction specifies the stop instruction.

The counter operation will continue when the CPU operation is stopped.

When the count operation stops, the progress value update also stops. When starting the count operation, the progress value is cleared and then the operation starts.

Program example

 

 

 

 

 

 

 

LD

R0

R0

DIF0

WR0 = H0101

 

 

AND

DIF0

 

 

 

 

 

 

[

 

 

 

 

 

 

 

 

 

 

 

 

FUN 140 (WR0)

 

 

 

 

 

 

 

 

 

WR0

= H101

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FUN

140 ( WR0 )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

]

 

 

 

 

 

 

 

 

Program description

• Prior to starting a counter operation, various settings required for the counter operation are reflected in the special internal outputs, and the PI/O function setting flag (R7F5) is turned on while the CPU is being stopped.

For details on the special internal output settings, see Chapter 8. Starts the counter No. 1 operation.

FUN 140 (s)

5-129

Page 179
Image 179
Hitachi NJI-350B manual FUN instructions-5, High-speed Counter Operation Control, 147, 129