Omron CP1L - 12-2007 Operation Manual page 257

Cp1l cpu unit
Table of Contents

Advertisement

Pulse Outputs
PULSE WITH VARIABLE
DUTY FACTOR: PWM(891)
224
Note
This section explains the functions related to pulse outputs only. For details on
the PRV(881) instruction's high-speed counter or interrupt functions, refer to
6-1 Interrupt Functions or 5-1 High-speed Counters .
Operand
P
Port specifier
C
Control data
D
First
desti-
nation
word
PWM(891) is used to output pulses with the specified duty factor.
PWM
P
F
D
0000 hex: Pulse output 0
0001 hex: Pulse output 1
1000 hex: PWM output 0
1001 hex: PWM output 1
0000 hex: Read the PV.
0001 hex: Read the status.
0003 hex: Read the pulse output frequency.
0013 hex: Read the frequency for 10-ms sampling.
0023 hex: Read the frequency for 100-ms sampling.
0033 hex: Read the frequency for 1-s sampling.
Reading PV
After the pulse output PV is read, the 8-digit hexadecimal
data is stored in D and D+1. (D contains the rightmost 4
(D and D+1)
digits and D+1 contains the leftmost 4 digits.)
Reading
Bit 0
pulse output
status
(D)
Bit 1
Bit 2
Bit 3
Bit 4
Bit 5
Bit 6
Bit 7
Bits 8 to 15 Not used.
Reading
Bit 0
PWM output
status (D)
Bits 1 to 15 Not used.
P: Port specifier
F: Frequency
D: Duty factor
Contents
Pulse Output Status Flag
0: Constant speed
1: Accelerating/decelerating
PV Underflow/Overflow Flag
0: Normal
1: Error
Pulse Output Amount Set Flag
0: Not set
1: Set
Pulse Output Completed Flag
0: Output not completed
1: Output completed
Pulse Output Flag
0: Stopped
1: Outputting pulses
No-origin Flag
0: Origin established
1: Origin not established
At Origin Flag
0: Not stopped at origin
1: Stopped at origin
Pulse Output Stopped Error Flag
0: No error
1: Pulse output stopped due to error
PWM Output Flag
0: Stopped
1: Outputting pulses
Section 5-2

Advertisement

Table of Contents
loading

Table of Contents