Chapter11: high speed i/o (hsc / pwm) – Horner APG XL6 OCS User Manual
Page 51
MAN0883-04-EN
CH.11
March 4, 2010
Page 51 of 135
#1037
CHAPTER11: HIGH SPEED I/O (HSC / PWM)
11.1 Overview
In addition to the compliment of simple analog and digital I/O, several of the XL6/XL6e OCS I/O modules
support High Speed Counting (HSC) I/O functions and may also support Pulse Width Modulation (PWM)
Output functions. The HSC functions include: frequency, totalizing, pulse width and quadrature
measurement. The PWM functions include: traditional PWM (with variable rate and duty) and a stepper
(limited functionality) with variable acceleration and deceleration rates. To determine function availability,
refer to the associated model’s Specification/Installation sheet (Digital DC Input/Output sections).
This chapter describes the operation of these high level I/O functions. For configuration details of these
functions, see Cscape Configuration.
11.2
High Speed Counter (HSC) Functions
On units that support the HSC, four dedicated inputs are available than can be configured for one of four
modes of operation. Those modes are Frequency, Count (totalize), Pulse width or period (pulse) and
Quadrature measurement. For some modes, more than one HSC input may be consumed. The
measurement value is provided to ladder in a %AI register (see mapping below).
Note that while the high-speed input circuitry has a resolution of 1 µs, measured edge
transitions must not occur faster than 100 µs for accurate measurements. Keep in mind
that pulse width measurements utilize both the rising and falling edges of the waveform,
thus the pulse width must exist longer than 100 µS.
Note that the edge polarity selection in the mode parameter for totalize and pulse width
functions (Digital/HSC Input Configuration) assume Positive Logic regardless of the
associated I/O board’s jumper setting for the Digital DC inputs polarity. If Negative logic
is configured when using these functions, the opposite edge polarity must be selected in
the mode parameter.
11.2.1
Frequency
In frequency mode, the frequency of the input signal is written to the accumulator in terms of
Hertz (cycles/second). When using frequency mode, four update selections are provided which
specify the width of the sample window. Note that selecting a shorter sample window provides a
quicker measurement (faster response) but lowers the frequency accuracy (resolution) and
increases the minimum frequency measurement limit.
11.2.2
Totalize
In totalize mode, the accumulator is simply incremented each time the input transitions in a
specific direction. Totalize mode is configurable to specify the edge (rising or falling) on which the
accumulator is incremented.
Rising Edge Signal
Falling Edge Signal