Accelerating the frequency at a fixed rate – Omron HOME SECURITY SYSTEM - MOTION SENSOR FQM1-MMA21 User Manual

Page 213

Advertising
background image

190

Pulse Outputs

Section 7-6

Changing the Frequency in Steps

In this example, the SPED(885) instruction is used to change the speed of a
pulse output from port 2 from a frequency of 3,000 Hz to 50,000 Hz. In this
case, the pulse output is a CCW continuous mode output.

Note

Speed control timing will be accurate when frequency changes are executed
by SPED(885) instructions in interrupt tasks called by input interrupts.

Accelerating the Frequency at a Fixed Rate

In this example, the ACC(888) instruction is used to accelerate the pulse out-
put from port 2 from a frequency of 3,000 Hz to 50,000 Hz at an acceleration
rate of 500 Hz/2 ms.

D00000

C

3

5

0

D00001

0

0

0

0

@SPED

#2
#1

#00000BB8

0002.00

@SPED

#2
#1

D00000

0002.01

Frequency

Target frequency
50,000 Hz

SPED executed.

SPED executed.

When CIO 0002.00 turns ON,
SPED starts a pulse output from
port 2 at 3,000 Hz (3 kHz) in
CCW continuous mode.

When CIO 0002.01 turns ON,
SPED changes the frequency
to 50,000 Hz (50 kHz) in CCW
continuous mode.

Target frequency

Present frequency
3,000 Hz

Time

@SPED

#2
#1

#00000BB8

0002.00

@ACC

#2
#1

D00000

0002.01

D00000

1

F

4

D00001

3

5

0

D00002

0

0

0

0

0

C

Frequency

Target frequency
50,000 Hz

SPED executed.

ACC executed.

When CIO 0002.00 turns ON,
SPED starts a pulse output from
port 2 at 3,000 Hz (3 kHz) in
CCW continuous mode.

When CIO 0002.01 turns ON, ACC is
executed in mode 1 (CCW direction,
acceleration, and continuous mode) to
accelerate the frequency at 500 Hz/2 ms
to 50,000 Hz (50 kHz).

Target frequency

Present frequency
3,000 Hz

Time

Acceleration rate
500 Hz/2 ms

Acceleration rate

Advertising