beautypg.com

Sample program, 2 instructions – Omron SYSMAC CP CP1E-N@@D@-@ User Manual

Page 371

background image

2-335

2 Instructions

CP1E CPU Unit Instructions Reference Manual(W483)

High-speed

Counter/Pulse

Ou

tp
ut I

n

stru

ctio

ns

2

A

C

C

Note Triangular Control

If the specified number of pulses is less than the number required to reach the target frequency and return to zero, the
function will automatically reduce the acceleration/deceleration time and perform triangular control (acceleration and
deceleration only.) An error will not occur.

Sample program

When CIO 0.00 turns ON in the following programming example, ACC(888) starts pulse output from
pulse output 0 in continuous mode in the clockwise direction using the pulse + direction method. Pulse
output is accelerated at a rate of 20 Hz every 4 ms until the target frequency of 500 Hz is reached.
When CIO 0.01 turns ON, ACC(888) changes to an acceleration rate of 10 Hz every 4 ms until the tar-
get frequency of 1,000 Hz is reached.

Stopping
pulse out-
put, con-
tinued

To stop
pulse out-
put
smoothly.
(Number of
pulses set-
ting is not
preserved.)

Decelerating to a
stop

Decelerates the pulse
output to a stop.

Note If ACC(888) started

the operation, the
original accelera-
tion/deceleration
rate will remain in
effect.
If SPED(885)
started the opera-
tion, the accelera-
tion / deceleration
rate will be invalid
and the pulse out-
put will stop imme-
diately.

PULS(886)

ACC(888) or
SPED(885)
(Independent)

ACC(888)
(Independent,
independent,
target fre-
quency of 0)

PLS2(887)

ACC(888)
(Independent,
target fre-
quency of 0)

Opera-

tion

Purpose

Application

Frequency changes

Description

Procedure/
instruction

Pulse frequency

Present
frequency

Target
frequency = 0

Execution of
ACC(888)

Deceleration rate

Time

Execution of
PLS2(887)

Pulse frequency

Target
frequency

Specified number
of pulses
(Specified with
PULS(886).)

Execution of
ACC(888)

Time

0014

01F4

0000

D100

D101

D102

000A

03E8

0000

D105

D106

D107

@ACC

#0000

#0100

D100

0.00

@ACC

#0000

#0100

D105

0.01

500 Hz

10 Hz/4 ms

20 Hz/4 ms

1000 Hz

Direction: CW in continuous mode

Pulse output: 0

Pulse output method:
Pulse + direction output

Direction: CW in continuous mode

Pulse output: 0

Pulse output method:
Pulse + direction output

Target frequency: 500 Hz

Acceleration/deceleration rate: 20 Hz

Target frequency: 1,000 Hz

Acceleration/deceleration rate: 10 Hz

Time

Target frequency

Pulse frequency

ACC(888) executed.

ACC(888) executed.

This manual is related to the following products: