Pulse Train Output - Hitachi HIDIC MICRO-EH Applications Manual

Table of Contents

Advertisement

8.5

Pulse Train Output

A pulse output can be assigned to an output by setting an output terminal. By setting an output to pulse output, a specified
number of consecutive pulses with a duty ratio of 30 to 70 % can be output. ((To output a pulse having a duty ratio of
50 %, set the value corresponding to the CPU model in the special internal output WRF06B, by referring to Section
8.1.4.) A minimum of 10 Hz to a maximum of 5 kHz can be specified as frequency values. (The maximum frequency of
5 kHz represents the total of all pulse output frequencies.)
8.5.1
Operation of Pulse Output
The settings of the pulse outputs are stored in the special internal outputs. It is only possible to perform the settings
through the special internal output when the CPU is stopped and the output is turned off. Once all the input/output
settings are completed, the setting of each chain output can be changed using the special internal outputs for individual
setting, regardless of whether the CPU is operating or stopped. In addition, by using the FUN instruction, settings can be
changed by a program (FUN150), or pulse outputs with the acceleration/deceleration function can be generated
(FUN151). Refer to the chapter about the FUN instruction for information about how to use the FUN instruction for
setting.
(1)
Basic operation
The special internal outputs R7FC to R7FF are used to control the output. When these special internal outputs are turned
on, a pulse train is output at the frequency set in the special internal outputs (WRF072 to 7D) for the set number of pulses.
After the set number of pulses is output, the special internal outputs R7FC to R7FF for output control are turned off by
the system. The special internal outputs R7FC to R7FF correspond to pulse outputs 1 to 4 (Y100 to Y103); for example,
if R7FD is turned on, a pulse is output from pulse output 2 (Y101). If peripheral units, etc. forcefully turn these special
internal outputs off, the pulse output is turned off even if the set number of pulses has not yet been output. The on/off
status of the PWM output is not stored in the data memory. Therefore, the status of the terminals used for pulse output
monitored by peripheral units, etc. may be different from the actual status of the pulse output terminals.
When a fatal or serious error occurs in the CPU, there will be no output. The output is also stopped if a fatal or serious
error occurs to the CPU during output.
In addition, pulses are not output while the backup memory is being written (R7EF=1). Therefore, care should be taken
when handling the pulse output immediately after a program transfer or after a program change while running.
Number of output
pulses 2
R7FC to R7FF
Frequency
Frequency/2
Output pulse
(2)
Operation when setting values are changed
The settings of the pulse outputs (frequency and number of output pulses) can be changed by the FUN instruction or the
special internal outputs (WRF072 to 7D) regardless of whether the CPU is operating or stopped. If the settings are made
during the execution of a program in such way that the total frequency of all the pulse outputs exceeds 5 kHz, the
frequency settings will not be changed. Also, the corresponding bit in the abnormality display special internal output is
turned on, and the output will continue to operate at the previously set frequency. (The setting value of the special internal
output also returns to the value set before the abnormal setting was made.)
R7FC to R7FF
Frequency
Frequency/2
Output pulse
Figure 8.32 Operation when the pulse output frequency is changed
Chapter 8 High-speed counter, PWM / Pulse train output and Analogue I/O
Pulse output
Turned off by
the system
Figure 8.31 Basic operation of pulse output
Frequency change
In case the frequency becomes 5 kHz or more, the previous setting value is used for operation.
Pulse output
Pulse output
Forcefully
Turned off by
turned off
the system
Frequency
change
8-18
t
Frequency
Frequency
change (set to
change
exceed 5 kHz)
t

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents