Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 763

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

High-speed Counter/Pulse Output Instructions
Description
Flags
Precautions
Example
730
Area
Constants
Data Registers
Index Registers
Indirect addressing
using Index Registers
PULS(886) sets the pulse type and number of pulses specified in T and N for
the port specified in P. Actual output of the pulses is started later in the pro-
gram using SPED(885) or ACC(888) in independent mode.
Name
Label
Error Flag
ER
• An error will occur if PULS(886) is executed when pulses are already
being output. Use the differentiated version (@PULS(886)) of the instruc-
tion or an execution condition that is turned ON only for one scan to pre-
vent this.
• The calculated number of pulses output for PULS(886) will not change
even if INI(880) is used to change the PV of the pulse output.
• The direction set for SPED(885) or ACC(888) will be ignored if the num-
ber of pulses is set with PULS(881) as an absolute value.
• It is possible to move outside of the range of the PV of the pulse output
amount ( 2,147,483,648 to 2,147,483,647).
When CIO 0.00 turns ON in the following programming example, PULS(886)
sets the number of output pulses for pulse output 0. An absolute value of
5,000 pulses is set. SPED(885) is executed next to start pulse output using
the CW/CCW method in the clockwise direction in independent mode at a tar-
get frequency of 500 Hz.
0.00
P
T
See descrip-
See descrip-
tion of oper-
tion of oper-
and.
and.
---
---
---
---
---
---
Operation
ON if the specified range for P, T, or N is exceeded.
ON if PULS(886) is executed for a port that is already out-
putting pulses.
ON if PULS(886) is executed in an interrupt task when an
instruction controlling pulse output is being executed in a
cyclic task.
D100
@PULS
D101
#0000
#0000
D110
D100
D111
@SPED
#0000
#0001
D110
Section 3-20
N
See description of oper-
and.
---
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to
–2048 to +2047 ,IR15
DR0 to DR15, IR0 to
IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
1388
Number of output pulses: 5,000
0000
01F4
Target frequency: 500 Hz
0000

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents