Omron CQM1H - PROGRAM Programming Manual page 144

Programmable controllers; inner boards
Table of Contents

Advertisement

Pulse I/O Board
Example: Using PWM(––)
Starting the Pulse Output
PWM(––) is used to specify the port number, the pulse frequency, and the
duty factor, and to start pulse output.
@PWM(−−)
P: Port
P
F
F: Output frequency
D
D: Duty factor
Specify either a 4-digit BCD constant or a word address
where the value of D is stored as a 4-digit BCD represent-
ing a percentage value. The setting must be between 0001
and 0099 (i.e., 1% to 99%).
Pulse output will start using the settings specified by PWM(––), and will con-
tinue with those settings until PWM(––) is executed again with different set-
tings, or until INI(61) is executed to stop pulse outputs from the specified port.
Stopping the Pulse Output
The pulse output from a port can be stopped by executing INI(61) with C=003.
Specify port 1 or 2 (P=001 or 002).
@INI(61)
P: Port
P
003
000
The following example shows PWM(––) used to start a 1.5 kHz pulse output
from port 1 and then change the duty factor from 50% to 25%.The pulse out-
put is then stopped with INI(61). Before running the program, check that the
settings in the PC Setup are as follows:
DM 6643: 1000 (variable duty factor pulse setting for port 1).
00000
00001
00002
The following diagram shows the duty factor of the pulse output from port 1 as
the program is executed.
50% duty factor pulses
50%
50%
1.5 kHz
IR 00000
turns ON
001: Port 1
002: Port 2
000 = 5.9 kHz
001 = 1.5 kHz
002 = 91.6 Hz
001: Port 1
002: Port 2
@PWM(−−)
When IR 00000 turns ON, a 1.5 kHz signal is output from
port 1 with a duty factor of 50%.
001
001
#0050
@PWM(−−)
When IR 00001 turns ON, the duty factor is changed to
25%.
001
001
#0025
@INI(61)
When IR 00002 turns ON, INI(61) stops the pulse output
from port 1.
001
003
000
25% duty factor pulses
25%
75%
1.5 kHz
IR 00001
turns ON
Section 2-2
IR 00002
turns ON
(Stop)
119

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents