1794-Hi Speed Count
1794-Hi Speed Count
1794-Hi Speed Count
Allen-Bradley
Very High
Speed Counter
User
Module Manual
(Cat. No. 1794-VHSC)
Important User Information Because of the variety of uses for the products described in this
publication, those responsible for the application and use of this control
equipment must satisfy themselves that all necessary steps have been
taken to assure that each application and use meets all performance and
safety requirements, including any applicable laws, regulations, codes
and standards.
All other brand and product names are trademarks or registered trademarks of their respective companies.
Summary of Changes
New Information
Revised Information
Change Bars
The areas in this manual which are different from previous editions
are marked with change bars (as shown to the right of this paragraph)
to indicate the addition of new or revised information.
Purpose of This Manual This manual shows you how to use the Very High Speed Counter
module with an Allen-Bradley programmable controller. It helps you
install, program, and troubleshoot your module.
Manual Organization This manual is divided into 5 chapters. The following chart shows
each chapter with its corresponding title and a brief description of
the topics covered in that chapter.
Input, Output and Configuration Files for the Very Identification and description of bit/words for input,
4
High Speed Counter on ControlNet output and configuration.
Appendices
Related Products You can install your input module in any system that uses
Allen-Bradley ControlNet programmable controllers and the 1794
I/O structure.
Product Compatibility This module can be used with 1794-ACN15 series B and -ACNR15
series B or later ControlNet Adapters. Communication between the
module and the processor is bidirectional. The PLC sends module
information using ControlNet messages to the adapter. The PLC
receives module status information through ControlNet messages
from the adapter.
Specifications Appendix A
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A--1
24V Input Derating Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A--3
Module Description The VHSC module performs high speed counting for industrial
applications. The module is an intelligent I/O module that interfaces
signals with any Allen-Bradley programmable controller that has
ControlNet capability.
The VHSC module, once configured for its intended purpose, can
continue to operate without flexbus power. (Note: Customer power
is required for the module, inputs and outputs.) After scanning the
inputs and updating the outputs, the input data is converted to a
specified data type in a digital format to be transferred to the
processors data table on request. Command and configuration data
is sent from the programmable controller data tables to the module
via ControlNet.
counter mode -
encoder X1 mode
encoder X2 mode
encoder X4 mode
period/rate mode
continuous/rate mode
rate measurement frequency mode
pulse width modulation (PWM)
Operation in Encoder or The operation of encoder and counter modes is virtually identical.
Counter Mode The only difference between the two modes is in the type of
feedback used.
Use the counter mode if you need the module to read incoming
pulses from a maximum of 2 encoders (single-ended or differential),
counters, pulse generators, mechanical limit switches, etc. and return
them to the programmable controller as a binary number
(0-16,777,215).
Use the encoder modes if you need the module to read incoming
quadrature pulses and return them to the programmable controller as
a binary number (0-16,777,215). In these modes, the module accepts
two-phase quadrature feedback and counts up or down depending
upon the condition of the phase B input for each counter.
preset value
rollover value
Counter Mode
The counter mode allows the module to read incoming pulses and
return them to the programmable controller processor as a binary
number (0-16,777,215).
High Down
Low or floating (not connected) Up
Figure 1.1
Block Diagram of Counter Mode
A
Input A
B
Input B
Z (Store Count)
Single Phase Pulse Generator (Gate/Reset) Input Z
1794-VHSC
Count Up Count Down
A Input
B Input + -
Count
0 1 2 3 2 1 0
Outputs updated continuously
Encoder Mode
The encoder mode allows the module to read incoming pulses and
return them to the programmable controller processor as a binary
number (0-16,777,215).
In this mode, the module will accept two phase quadrature feedback.
The module senses the relationship between the 2 phases and counts
up or down accordingly.
Encoder X1 mode - quadrature input signals count on the leading
edge or the trailing edge of channel A for a bidirectional count. The
phase relationship between Channel A and Channel B determines
direction -- channel A leading, and channel B floating, the count
direction is up; channel A lagging, and channel B high, the count
direction is down.
Encoder X2 mode - quadrature input signals count on the leading
edge and the trailing edge of channel A for a bidirectional count.
Channel B determines direction - B low (floating), the count
direction is up; B high, the count direction is down.
Encoder X4 mode - quadrature input signals count on the leading
edge and the trailing edge of channel A and channel B for a
bidirectional count. Channel B determines direction -- B low
(floating), the count direction is up; B high, the count direction is
down.
Direction of Count
The module can count either up or down, depending upon the
condition of the B input for each counter. In encoder applications,
the counter will increment on the leading edge of input A, while
input B determines the direction of the count.
You also have the option of X1, X2 and X4 multiplying of the input
pulses. Figure 1.2 shows the relationships between inputs A and B
for forward and reverse directions in encoder applications.
A Input
B Input
1 2 3 2 1 0
X1
Count
1 2 3 4 5 6 7 8 9 10 11 12 12 11 10 9 8 7 6 5 4 3 2 1 0
X2
Count
1 2 3 4 5 6 7 8 9 10 11 12 12 11 10 9 8 7 6 5 4 3 2 1 0
X4
Count
10679-I
Preset Value
Each of the 2 counters has one preset value associated with it. In the
encoder or counter modes, the preset value represents a reference
point (or count) from which the module begins counting. The
module can count either up or down from the preset value. Preset
values are loaded into the count registers through the preset count
bits. Preset values can range from 0 to 16,777,215 binary.
Rollover Value
Each of the 2 counters has one rollover value associated with it.
When the rollover value is reached by the encoder/counter, it resets
to 0 and begins counting again. The rollover values range from 1 to
16,777,216 binary. The rollover value is circular (for example: if
you program 360, the count will be from 358, 359, 0, 1 etc. in a
positive direction and from 1, 0, 359, 358 etc. in a negative
direction).
Software Reset
The counters can also be reset by the Reset Count bits found in Word
0, bits 0 and 4 of the Counter Control word. When one of these bits
is set to 1, the associated counter is reset to zero and begins counting.
The module can also be reset with the gate/reset as explained below.
Refer to chapter 4 for further details.
Gate/Reset Input
Store Count
The store count feature allows the module to store the current count
value of the associated counter. The store count feature is triggered
by the state of the gate/reset terminal on the module. The stored
count of each counter is placed in a separate word in the Read Data
file. The stored count value will remain in the Read Data file until a
new trigger pulse is received at the Gate/Reset terminal. When a
new trigger pulse is received, the old count value will be overwritten
by the new value.
10680-I
Stop counting
Resume counting
Store Count
10681-I
10682-I
Figures 1.3 through 1.6 show the store count feature operating on the
rising edge of the gate/reset pulse. The user has the option of
selecting these same features using the falling edge of the gate/reset
pulse. The gate invert bit is active in the store count, continuous/rate
and period/rate modes.
Operation in Use the period/rate mode to determine the frequency of input pulses
Period/Rate Mode by counting the number of internal 5MHz clock pulses over a
user-specified number of input signal pulses. At the end of the
specified number of pulses, the module returns the frequency and the
total number of pulses received.
1 10 20
Assumes symmetrical pulse, 50% duty cycle, so period = sample time on X 2 (on and off)
Frequency = 1/period
If count = 25, scaler = 1, and clock period = (1/5MHz)
Frequency = 1 / [(25/1) X (1/5MHz) X 2] = 100KHz
In Figure 1.7, the incoming pulse train from the gate/reset terminal is
used to sample pulses from the 5MHz internal clock. As the
frequency of the incoming pulse train at the gate/reset terminal
increases, the number of sampled pulses from the 5Mhz clock
decreases. This relationship is shown in NO TAG. Since accuracy is
related to the number of pulses received over the sample period, the
accuracy will decrease with increasing input frequencies at the
Gate/Reset terminal.
Table 1.A
Relationship Between Sampled Pulses and Input Frequency
2 1.25M
5 500K
10 250K
20 125K
50 50K
100 25K
200 12.5K
500 5K
1KHz 2.5K
2KHz 1.25K
5KHz 500
10KHz 250
20KHz 125
50KHz 50
100KHz 25
Operation of scaler
In period/rate mode, the scaler lets the incoming pulse train at the Z
(gate/reset) terminal be divided by a user defined number.
Acceptable values for the scaler are 1, 2, 4, 8, 16, 32, 64 and 128.
There is one scaler value for each counter.
1 10 20
Frequency
Accumulated Count updated here
Operation in Rate Use the rate measurement mode to count incoming pulses for a
Measurement Mode user-specified time interval. At the end of the interval, the module
returns a value representing the sampled number of pulses and a
value indicating the incoming frequency. When the count and
frequency are updated, any associated outputs are checked against
their associated presets.
Figure 1.9
Operation of the Rate Measurement Mode
A Input
Input A
B (not used)
Input B
Z (not used)
Encoder/Pulse Generator Input Z
(Gate/Reset)
Time base
1794-VHSC
A Input (pulse)
1 2 3
Accumulated Count
Frequency calculated,
outputs updated here
If sample period is 50ms, and count = 3, then frequency = 3/50ms = 60Hz
Example:
In figure 1.9, three counts have been accumulated during the
user-selected time period. If you had selected 50 milliseconds as the
sample period, the frequency returned to the programmable
controller processor would be:
Sample Period
You can set the sample period used in the frequency calculation in
the rate measurement mode. Allowable values are 10 milliseconds to
3 seconds in 10 millisecond increments. The default value is 1
second.
Pulse Width Modulation The module can generate a pulse width modulation signal that may
be tied to any output. By specifying a period (configuration word 2)
and gate interval (configuration word 2 or 3) together with the PWM
configuration word 2 or 3, a counter and its first ON/OFF window
comparator is assigned and the signal generated. The actual duty
cycle is specified by output words 2 and 3.
By setting bits in the configuration block, you can assign the outputs
on the module to any of the various counter windows. You can
assign any output to any count window with no restrictions.
Operation of Outputs
When the outputs for the VHSC module are enabled and assigned to
a counter window they operate in an ON-OFF fashion. For example,
assume that the module were programmed to turn ON an output
when a count value of 2000 was reached. Further, assume that the
user desired to have the output remain energized for a period of 3000
counts and then turn OFF. The end result would be that the outputs
would turn ON at count of 2000, would remain energized for 3000
additional counts, and would turn OFF at 5000 counts. The ON and
OFF values are circular around zero. Refer to figure 1.10.
10686-I
When values in Counter ON Value are less than When values in Counter ON Value are greater than
values in Counter OFF Value. values in Counter OFF Value.
10687-I
Isolation of Outputs
The module provides 850V dc isolation between each of the outputs
and the flexbus.
You can connect any of the outputs to any of the counter inputs. In
this way, it is possible to use the outputs to reset a counter or to
cascade counters. If using the outputs this way, make certain that the
output voltage is compatible with the chosen input.
What the Very High Speed The very high speed counter module performs high-speed scaling
Counter Module Does calculation operations for various industrial applications. The
module interfaces with a FLEX I/O family ControlNet 1794-ACN15
series B or -ACNR15 series B or later adapter which then
communicates with a programmable controller processor.
The adapter/power supply transfers data to and from the module over
the flexbus. Instructions in the PLC facilitate this communication
and let you write output values and configure the modules mode of
operation. The following illustration describes the communication
process.
1 2
The adapter transfers your configuration data External devices transmit
to the module. frequency signals to the module.
Flexbus
Allen-Bradley 1794--VHSC
4
VERY HIGH SPEED COUNTER MODULE
1
The adapter transfers the data
over the flexbus. OK
5 3
The adapter and module determine The module converts
that the transfer was made without frequency signals into integer
error and input values are within a format and stores these
specified range. values until the adapter
requests their transfer.
6
ControlNet transfers the data to the programmable
controller data table.
1. The adapter transfers your configuration data and commands to
the module.
2. External devices generate input signals that are transmitted to the
module.
3. The module converts these signals into binary format, and stores
these values and controls their output until the adapter requests
their transfer.
Chapter Summary In this chapter you learned how your module operates, and how your
module communicates with the programmable controller.
Before You Install Your Before installing your 1794-VHSC very high speed counter module:
Input Module
European Union Directive If this product has the CE mark it is approved for installation within
Compliance the European Union and EEA regions. It has been designed and
tested to meet the following directives.
EMC Directive
Power Requirements The wiring of the terminal base unit is determined by the current
draw through the terminal base. Make certain that the current draw
does not exceed 10A.
Daisy-chaining
Individual
24V dc
24V dc
Note: Use this configuration if using any digital output
24V dc modules that could couple transients to the 24V supply.
Installing the Module Installation of the very high speed counter module consists of:
1. Remove the cover plug (if used) in the male connector of the unit
to which you are connecting this terminal base unit.
2. Check to make sure that the 16 pins in the male connector on the
adjacent device are straight and in line so that the mating female
connector on this terminal base unit will mate correctly.
3. Position the terminal base on the 35 x 7.5mm DIN rail A (A-B pt.
no. 199-DR1).
C A
B
Position terminal base at a slight angle and hooked over the top
of the DIN rail.
Slide the terminal base unit over tight against the adapter.
Make sure the hook on the terminal base slides under the edge of
the adapter and the flexbus connector is fully retracted.
Press down on the terminal base unit to lock the terminal base on
the DIN rail. If the terminal base does not lock into place, use a
screwdriver or similar device to open the locking tab, press down on
the terminal base until flush with the DIN rail and release the locking
tab to lock the base in place. 30077--M
Panel/Wall Mounting
Use the mounting kit Cat. No. 1794-NM1 for panel/wall mounting.
1.4
1794-NM1 Mounting Kit (35.5)
Contents:
1 -- Mounting Plate for Adapter
2 -- 18 #6 self-tapping screws 1
(2 for the adapter, and 2
each for up to 8 modules)
Adapter Module
(not included)
.83 (21)
1. Rotate the keyswitch (1) on the terminal base unit (2) clockwise
to position 1 as required for this module.
7
3
1
4
5
2. Make certain the flexbus connector (3) is pushed all the way to
the left to connect with the neighboring terminal base/adapter.
You cannot install the module unless the connector is fully
extended.
3. Make sure that the pins on the bottom of the module are straight
so they will align properly with the connector in the terminal base
unit.
4. Position the module (4) with its alignment bar (5) aligned with
the groove (6) on the terminal base.
5. Press firmly and evenly to seat the module in the terminal base
unit. The module is seated when the latching mechanism (7) is
locked into the module.
6. Repeat the above steps to install the next module in its terminal
base unit.
Connecting Wiring for the Wiring to the high speed counter module is made through the
High Speed Counter terminal base unit on which the module mounts.
Module
Compatible terminal base units are:
1794-TB3G 1794-TB3GS
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
B 16- 33 B
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
C 34- 51 C
A A B B Z Z O0 O1 A A B B Z Z O2 O3
A A B B Z Z R0 R1 A A B B Z Z R2 R3
Outputs
O0 6 23 O1 7 24
O2 14 31 O3 15 32
B
Z (Store Count)
(Gate/Reset) Quadrature Encoder
(ex. 845H--SJ__24DRY__ )
Mechanical Switch
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 - 15 A
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
16- 33 B
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
34- 51 C
1794-TB3G
24V Base Power
12V
+ --
Solenoid
Attention: Keep exposed area of inner conductor as short as possible.
Module Indicators The high speed counter module has one red/green status indicator
(OK) that is on when power is applied to the module and one yellow
indicator for each input and output.
0 OUT 1 OUT
A B Z 0 1 A B Z 2 3
C B A
C = Status Indicators -
A = Status of input A
B = Status of input B
Z = Status of gate input Z
OUT = Output indicators, 1 for each output
Chapter Summary In this chapter, we told you how to install your input module in an
existing programmable controller system and how to wire to the
terminal base units.
ControlNet Adapter
I/O structure
safe state data
communication fault data
idle state behavior
input data behavior upon module removal
About the ControlNet This module must be used with the FLEX I/O ControlNet adapters
Adapter (cat. no. 1794--ACN15 series B and --ACNR15 series B or later)
which support extended data transfer (EDT). These adapters
interface up to 8 FLEX I/O modules and a ControlNet processor or
scanner. The adapter can support ControlNet real-- time data
connections to individual modules or module groups. Each
connection is independent of the others and can be from different
processors or scanners.
Communication Over the One 1794-ACN15/B and -ACNR15/B ControlNet adapter can
FLEX I/O Backplane interface up to eight terminal base units with installed FLEX I/O
modules, forming a FLEX I/O system of up to eight slots. The
adapter communicates to other network system components
(typically one or more controllers or scanners, and/or programming
terminals) over the ControlNet network. The adapter communicates
with its I/O modules over the backplane.
Scheduled Data-Transfer
is continuous
is asynchronous to the ladder-logic program scan
occurs at the actual rate displayed in the Actual Packet Interval
field on the programming software ControlNet I/O mapping
(monitor) screen
Unscheduled Data-Transfer
The I/O map for the VHSC module is divided into read words and
write words. Read words consist of input and status words, and
write words consist of output and configuration words. The
number of read words or write words can be 0 or more. The length of
each I/O modules read words and write words vary in size
depending on module complexity. Each I/O module will support at
least 1 input word or 1 output word. Status and configuration are
optional, depending on the module. The VHSC module has 9 input
words, no status words, 4 output words and 56 configuration words.
I/O Structure Output data is received by the adapter in the order of the installed
I/O modules. The Output data for Slot 0 is received first, followed
by the Output data for Slot 1, and so on up to slot 7.
The first word of input data sent by the adapter is the Adapter Status
Word. This is followed by the input data from each slot, in the order
of the installed I/O modules. The Input data from Slot 0 is first after
the status word, followed by Input data from Slot 2, and so on up to
slot 7.
ControlNet Adapter
Read Data
Adapter Status
Slot 0 Input Data
Network READ Slot 1 Input Data
...
...
Output Data
Read
Write
I/O Module I/O Module
Slot 0 Slot 1
... I/O Module
Slot 7
Slot 0 Output Data
Slot 1 Output Data
Network WRITE
...
...
Not Used
The adapter input status word bit descriptions are shown in the
following table.
Safe State Data The ControlNet adapter does not provide storage for alternate
module output data during communication faults or processor idle
state. This safe state data is stored in the VHSC module and may
be defined using configuration software. Safe state data assures that a
known output will be applied to the output devices to maintain a
previously designated safe operating condition during the previously
mentioned failure modes. This data is sent in the configuration block
(see Image Table Mapping later in this chapter).
leave the module output data in its last state (hold last state)
reset the module output data to zero (reset)
apply safe state data to the module output
leave the module output data in its last state (hold last state)
reset the module output data to zero (reset)
apply safe state data to the module output
Frequency/Resolution Enhancement
This mode is only for use in modules with firmware revision D or
later.
The upper byte of the counter control word (output word 0) is
reserved for special modes. Only mode 8, Enhancing
Frequency/Resolution is available. In this mode, you can change
significant digits of frequency display based on output word 3 for
channel 0 and output word 4 for channel 1. Decimal point placement
is absolute positioning. (--2 moves decimal point left 2 places
dividing the frequency value by 100; +1 moves the decimal point 1
place, multiplying by 10, and so on). This allows frequency values to
fit in a single word.
1. Power up the FLEX chassis, or put the PLC into RUN mode, or
both. Let the 1794--VHSC module initialize as normal. Wait for
the OK indicator on the module to go solid green.
2. You must place ladder logic in your PLC that performs the
following:.
A. Set a value between --4 and +2 into output word 2 and/or 3.
B. Then set (1) the M11 bit in the upper byte of control word 0.
When the upper byte of the output word is not zero, the
status indicator flashes red, and the TF bit (bit 12, input
word 8) is asserted.
C. Next, reset (0) the M11 bit in the upper byte of output control
word 0.
Clearing the upper byte of output word 0 restores the module
to an operational state, clears the TF bit in input word 8. and
returns the indicator to green. The module is now in
inhanced mode.
3. To turn this feature off:
A. Set output word 2 or 3 to zero (no value)
B. Set (1) the M11 bit
C. Then reset (0) the M11 bit
8 PE FP NR TF OS OS OS OS C1 C0 ZF ZS C1 C0 ZF ZS
56 Words 17 0 0 0 0 0 0 0 0 S4 S3 S2 S1 F4 F3 F2 F1
18 0 0 0 0 0 0 0 0 S4 S3 S2 S1 F4 F3 F2 F1
19 0 0 0 0 0 0 0 0 S4 S3 S2 S1 F4 F3 F2 F1
20 First Counter 1st On Value (least significant word)
21 First Counter 1st On Value (most significant word)
00--15 Channel 0 current count - The current count consists of 2 words (32 bits)
Word 0
(00--17) representing the current count of the 24--bit counter (in encoder, X2 encoder,
X4 encoder, PWM) or the frequency (in period/rate,
/ continuous/rate,
/ rate
00--15
Word 1 measurement.). The range of values is (0 < value < 16,777,215).
(00--17)
00--15 Channel 1 current count - The current count consists of 2 words (32 bits)
Word 2
(00--17) representing the current count of the 24--bit counter (in encoder, X2 encoder,
X4 encoder, PWM) or the frequency (in period/rate, continuous/rate, rate
00--15
Word 3 measurement.). The range of values is (0 < value < 16,777,215).
(00--17)
Zero input status bit (ZS) for Channel 0- This bit represents the present
status of the Z input.
00 0 = Off
1 = Input on
This bit is uneffected by Z invert, ZI, in the counter configuration word.
Zero frequency detected bit (ZF) for Channel 0 - Only used during
frequency configurations (period/rate, continuous/rate, and rate
measurement). In period/rate and continuous/rate, counts are acquired during
on state of the Z input. At very low frequencies, the counter saturates,
indicating a zero frequency detect. The time it takes to determine a zero
01
frequency in these 2 configurations can be as long as 6.7s (16,777,215 counts
X 1/5MHz X 2 half cycles of Z). In rate measurement, pulses on Z are counted
over a sample interval specified by the product of time base X gate interval.
The time to detect a zero frequency is determined by the sample interval
(example: time base = 0.100s, gate interval = 3 is 300ms to determine ZF).
Words 8
Stored/data count bit (C0, C1) for Channel 0 - This count cycles thru 00, 01,
10, 11, 00... Each time the stored/accumulated count words are updated,
02, 03 C(0,1) is incremented. The PLC sample rate, including network delay and
program scan, must be as fast or faster than the frequency of the event which
updates.
Zero input status bit (ZS) for Channel 1 - This bit represents the present
status of the Z input.
04
0 = Off
1 = Input on
Zero frequency detected bit (ZF) for Channel 1 - Only used during
frequency configurations (period/rate, continuous/rate, and rate
measurement). In period/rate and continuous/rate, counts are acquired during
on state of the Z input. At very low frequencies, the counter saturates,
indicating a zero frequency detect. The time it takes to determine a zero
05
frequency in these 2 configurations can be as long as 6.7s (16,777,215 counts
X 1/5MHz X 2 half cycles of Z). In rate measurement, pulses on Z are counted
over a sample interval specified by the product of time base X gate interval.
The time to detect a zero frequency is determined by the sample interval
(example: time base = 0.100s, gate interval = 3 is 300ms to determine ZF).
Stored/data count bit (C0, C1) for Channel 1 - This count cycles thru 00, 01,
10, 11, 00... Each time the stored/accumulated count words are updated,
06, 07 C(0,1) is incremented. The PLC sample rate, including network delay and
program scan, must be as fast or faster than the frequency of the event which
updates.
Test/fail bit (TF) - If the flexbus power or terminal base power is applied and
the module fails during hardware tests, a fatal error occurs. The TF bit is
asserted and the red module indicator turns on. An error code will be set in the
module/channel status word which can be read using a CIO instruction. The
TF bit is also asserted if the upper byte of the counter control word is not zero.
The upper byte of the counter control word is reserved for special modes. Only
12 (14)
mode 8, Enhancing Frequency/Resolution is available. To use this mode, set
bit 11, and set a value in output woed 3 and/or 4. When the upper byte of word
12 is not zero, the red module status indicator will flash and the TF bit is
asserted to indicate the module has entered a test--mode state. Clearing the
upper byte of output word 0 restores the module to an operation state, clears
the TF bit and returns the indicator to green.
0x08 This test mode is only for use in modules with firmware
revision D or later.
Change significant digits of frequency display based on word
14 for channel 0 and word 15 for channel 1 (--2 moves decimal
point left 2 places dividing the frequency value by 100; +1
moves the decimal point 1 place, multiplying by 10, and so on).
Word 8 This allows frequency values to fit in a single word.
continued CAUTION: Use this test mode with caution since no check
is performed to assure that the returned frequency is
meaningful.
Firmware revision D changed decimal point placement to
absolute positioning. Revision D firmware also checks for
placement to be in the range of --4 to +2. A value outside the
range moves the decimal point to the zero position. Moving the
decimal point to the left allows high frequencies, (commonly
present in rate measurement) to fit within a single word. Moving
the decimal point to the right allows low frequencies (commonly
present in period and continuous rate modes) to have
resolution displayed to 0.1Hz and 0.01Hz. Do not use scalars
of Z/128, Z/64, Z/32 and Z/16 when using this test mode.
Not ready status bit (NR) - Whenever 24V dc power is applied to the
module, the hardware must be initialized. The NR bit will be asserted and the
13 (15) red module indicator will flash. If the red indicator continues flashing, and the
green indicator momentarily turns on, the 24V dc power is below the module
minimum.
Field power fault bit (FP) - If the 24V dc module power drops, the FP bit is
asserted, the green module indicator flashes, the module outputs turn off, and
14 (16) the module enters an idle state reporting status as it waits for power to be
restored. Note: this bit does not indicate status of either output customer
power supply.
00--15
Counter Control Word
(00--17)
Channel 0 Counter reset bit (CR) - A 0 to 1 transition of this bit clears the
00
counter. Outputs are adjusted according to the window compare values.
Channel 0 Counter preset bit (CP) - A 0 to 1 transition of this bit sets the
01 counter to the value specified by the preset words. Outputs are adjusted
according to the window compare values.
Channel 0 Value reset bit (VR) - A 0 to 1 transition of this bit clears the
02
stored/accumulated count words.
Channel 1 Counter reset bit (CR) - A 0 to 1 transition of this bit clears the
04
counter. Outputs are adjusted according to the window compare values.
Word 0 Channel 1 Counter preset bit (CP) - A 0 to 1 transition of this bit sets the
05 counter to the value specified by the preset words. Outputs are adjusted
according to the window compare values.
Channel 1 Value reset bit (VR) - A 0 to 1 transition of this bit clears the
06
stored/accumulated count words.
08--10
Reserved for factory use.
(10--12)
12--15
Reserved for factory use.
(14--17)
00--15
Output Control Word
(00--17)
Output 0 Output enable bit (OE) - When set to 1, output can be turned on
01 from a force on, compare match or as directed by the PWM settings. When
OE = 0, the associated output is turned off.
Output 0 Local control bit (LC) - When set to 1, output is controlled the
counter if the flexbus power is lost. (i.e. the module detects a flexbus reset
signal). (Note: When flexbus power is lost, communication to the PC is lost.)
02
When LC = 0, the module clears its OE bit at a loss of flexbus power. Set
this bit as appropriate in the safe state word, since a communication fault
occurs after adapter power is lost.
Word 1
03 Not used -- set to 0.
Output 1 Output enable bit (OE) - When set to 1, output can be turned on
05 from a force on, compare match or as directed by the PWM settings. When
OE = 0, the associated output is turned off.
Output 1 Local control bit (LC) - When set to 1, output is controlled the
counter if the flexbus power is lost. (i.e. the module detects a flexbus reset
signal). (Note: When flexbus power is lost, communication to the PC is lost.)
06
When LC = 0, the module clears its OE bit at a loss of flexbus power. Set
this bit as appropriate in the safe state word, since a communication fault
occurs after adapter power is lost.
Output 2 Output enable bit (OE) - When set to 1, output can be turned on
09 (11) from a force on, compare match or as directed by the PWM settings. When
OE = 0, the associated output is turned off.
Output 2 Local control bit (LC) - When set to 1, output is controlled the
counter if the flexbus power is lost. (i.e. the module detects a flexbus reset
signal). (Note: When flexbus power is lost, communication to the PC is lost.)
10 (12)
When LC = 0, the module clears its OE bit at a loss of flexbus power. Set
this bit as appropriate in the safe state word, since a communication fault
occurs after adapter power is lost.
Word 1
11 (13) Not used -- set to 0.
continued
Output 3 Force output bit (FO) - When set to 1, output is turned on if OE is
12 (14) 1. When FO = 0, output can be controlled by a compare match or as
directed by the PWM settings.
Output 3 Output enable bit (OE) - When set to 1, output can be turned on
13 (15) from a force on, compare match or as directed by the PWM settings. When
OE = 0, the associated output is turned off.
Output 3 Local control bit (LC) - When set to 1, output is controlled the
counter if the flexbus power is lost. (i.e. the module detects a flexbus reset
signal). (Note: When flexbus power is lost, communication to the PC is lost.)
14 (16)
When LC = 0, the module clears its OE bit at a loss of flexbus power. Set
this bit as appropriate in the safe state word, since a communication fault
occurs after adapter power is lost.
Channel 0 PWM Output value - When the module is configured for PWM,
the time base is enabled, the counter for the respective channel, its gate
interval, rollover and 1st on and 1st off value are used. Ties can be used to
00--15 direct the PWM signal to any or all outputs. The range of the PWM values is
Word 2
(00--17) 0 < value < 9500 decimal (i.e. 0.00% < value < 95.00%). The actual duty
cycle at the output depends on the turn on and turn off times of the
MOSFET, energy storage capability of the cable/load and the resistance
from output to return.
Channel 1 PWM Output value - When the module is configured for PWM,
the time base is enabled, the counter for the respective channel, its gate
interval, rollover and 1st on and 1st off value are used. Ties can be used to
00--15 direct the PWM signal to any or all outputs. The range of the PWM values is
Word 3
(00--17) 0 < value < 9500 decimal (i.e. 0.00% < value < 95.00%). The actual duty
cycle at the output depends on the turn on and turn off times of the
MOSFET, energy storage capability of the cable/load and the resistance
from output to return.
Counter Configuration - The upper byte of this word configures counter 1, the lower byte
counter 0.
Bits 08--11 11 10 09 08
Counter 1
(10--13) (13) (12) (11) (10)
0 0 0 0 Counter
0 0 0 1 Encoder
0 0 1 0 Encoder X2
0 0 1 1 PWM
0 1 0 0 Encoder X4
0 1 0 1 Period/Rate
Configuration 0 1 1 0 Continuous/Rate
Word 0
0 1 1 1 Rate Measurement
Mode Selection
Bits 12--14 14 13 12
Counter 1
(14--16) (16) (15) (14)
0 0 1 Mode 1 -- store/continue
0 1 0 Mode 2 -- store/wait/resume
0 1 1 Mode 3 -- store;reset/wait/start
1 0 0 Mode 4 -- store;reset/start
Configuration
Word Bit Definition
Filter Selection - Only 1 filter selection can be chosen at a time. Frequency = 50%
duty cycle.
Bits 08- 11 11 10 09 08
Counter 1
(10- 13) (13) (12) (11) (10)
0 0 0 0 No filter
Bit 12 (14) Input A filter bit (AF) -- 0 = not filtered; 1 = apply filter to input
Bit 13 (15) Input B filter bit (BF) -- 0 = not filtered; 1 = apply filter to input
Bit 14 (16) Input Z filter bit (ZF -- 0 = not filtered; 1 = apply filter to input
Time base - Sets the fundamental time base for both counters. Resolution in ms, with a
Bits 00--15 minimum of 10ms intervals (10ms = 10; 1s = 1000). Time base must be entered when
Word 2
(00-17) PWM and rate measurement are configured. The maximum programmed value is
3000.
Channel 0 Gate interval - Sets the individual counter gate interval using the time base
Bits 00--15 setting as its time unit. Actual gate interval is time base X gate interval (i.e. time base of 10
Word 3
(00-17) X gate interval of 5 = 50ms). Maximum value is 3s. Gate interval must be entered when
PWM and rate measurement are configured.
Channel 1 Gate interval - Sets the individual counter gate interval using the time base
Bits 00--15 setting as its time unit. Actual gate interval is time base X gate interval (i.e. time base of 10
Word 4
(00-17) X gate interval of 5 = 50ms). Maximum value is 3s. Gate interval must be entered when
PWM and rate measurement are configured.
Bits 00--15
Word 5 Do not use -- reserved.
(00-17)
Channel 0 Rollover - Sets the number of counts the counter accumulates before rolling
over. For example, a setting of 1000 produces a count sequence of 998, 999, 0, 1, 2... while
Bits 00--15 incrementing; and 2, 1, 0, 999, 998... while decrementing. Rollover is a 32--bit number with
Word 6 and 7
(00-17) a usable range of 16,777,216. In PWM, this value is zero; in count, X1 encoder, X2 encoder
and X4 encoder configurations, it must be some specified nonzero number. The value
doesnt matter in period/rate, continuous/rate and rate measurement configurations.
Channel 1 Rollover - Sets the number of counts the counter accumulates before rolling
over. For example, a setting of 1000 produces a count sequence of 998, 999, 0, 1, 2... while
Bits 00--15 incrementing; and 2, 1, 0, 999, 998... while decrementing. Rollover is a 32--bit number with
Word 8 and 9
(00-17) a usable range of 16,777,216. In PWM, this value is zero; in count, X1 encoder, X2 encoder
and X4 encoder configurations, it must be some specified nonzero number. The value
doesnt matter in period/rate, continuous/rate and rate measurement configurations.
Word 10 and Bits 00--15 Channel 0 Preset - This word sets the preset value the counter is loaded with when CP is
11 (00-17) asserted. This number has a range of 0 < value < 16,777,216.
Word 12 and Bits 00--15 Channel 1 Preset - This word sets the preset value the counter is loaded with when CP is
13 (00-17) asserted. This number has a range of 0 < value < 16,777,216.
Configuration
Word Bit Definition
Channel 0 Scaler - This word scales the Z signal in period/rate and continuous/rate
modes. If the filter is applied, the filtered Z signal is scaled. Set only 1 bit of the Scaler.
Bits 00--15 Selecting a Scaler causes accumulated counts to be adjusted accordingly (i.e. selecting a
(00-17) Scaler of 128 increases the accumulated count by 128 after 128 Z pulses have been
received). We recommend using the filter to reduce erroneous frequency readings
any time you use the Scaler on the Z input.
Channel 1 Scaler - This word scales the Z signal in period/rate and continuous/rate
modes. If the filter is applied, the filtered Z signal is scaled. Set only 1 bit of the Scaler.
Bits 00--15 Selecting a Scaler causes accumulated counts to be adjusted accordingly (i.e. selecting a
(00-17) Scaler of 128 increases the accumulated count by 128 after 128 Z pulses have been
received). We recommend using the filter to reduce erroneous frequency readings
any time you use the Scaler on the Z input.
Output Ties - These bits connect the specified output to the appropriate compare window.
There are 8 windows, 4 per counter. Each output can be connected to any number of
windows, from 1 ot 8.
Bits 00 F1 = Tie output to first counter 1st window
01 F2 = Tie output to first counter 2nd window
02 F3 = Tie output to first counter 3rd window
Words 16 to 19 03 F4 = Tie output to first counter 4th window
04 S1 = Tie output to second counter 1st window
05 S2 = Tie output to second counter 2nd window
06 S3 = Tie output to second counter 3rd window
07 S4 = Tie output to second counter 4th window
Bits 08--15 Set to 0.
(10--17)
Configuration
Word Bit Definition
Counter On and Off - These words program each of the 4 counters (first and second
counter) on and off values. The first compare window for each counter is used in PWM, and
when programmed for PWM, the associated compare window should remain at 0. The
Bits 00--15 range of each entry is 0 < value < 16,777,215. When a tie is connected to a window
Words 20 to 51
(00-17) comparator, that window must be specified. These windows are always interpreted as
counts, regardless of the configuration setting, and can be computed as follows:
counts = (Scaler X 2.5E6)/desired frequency (for period/rate and continuous/rate)
counts = time base X desired frequency (for rate measurement)
Safe State Values - When the PLC transitions to PROG mode or a communication fault
occurs, the module copies the safe state words into its real time working buffer. The
definitions are identical to the those in the counter control word, except entering a PWM
Bits 00--15 safe state value outside the range 0--9500 results in a Hold Last State.
Words 52 to 55
(00-17) Word 52 is Counter Control Safe State;
word 53 is Output Control Safe State;
word 54 is Channel 0 PWM Safe State
word 55 is Channel 1 PWM Safe State.
What This Chapter Use this chapter to troubleshoot the very high speed counter module
Contains by interpreting the indicators.
Status Indicators The module contains indicators for each of the following:
0 OUT 1 OUT
A B Z 0 1 A B Z 2 3
C B A
C = Status Indicators -
A = Status of input A
B = Status of input B
Z = Status of gate input Z
The indicators are multiplexed in 2 groups (A0, B0, Z0, O0/O1; and
A1, B1, Z1, O2/O3) at a frequency of 488Hz. If inputs or outputs
change at or near that frequency, the associated indicator will vary in
brightness.
Counter 0 window ON and OFF values are equal and not zero or
Bit 08
counter 0 window ON and OFF value greater than 16,777,215.
Counter 1 window ON and OFF values are equal and not zero or
Bit 09
counter 1 window ON and OFF value greater than 16,777,215.
Bit 10
Reserved
Bit 11
See appendix A A
For
Specifications specifications on the 1794-VHSC module
30
29
24.0
Vin 20
On- state
Voltage
(V dc)
10
0
0 10 20 25 30 40 50 55 60
Ambient Temperature oC
The area within the curve represents the safe operating range for the module under
various conditions of user supplied 24V dc supply voltages and ambient temperatures.
This includes all possible mounting positions, including inverted horizontal.
CSA Hazardous Location Approval Approbation dutilisation dans des emplacements dangereux
par la CSA
CSA certifies products for general use as well as for use in hazardous locations. La CSA certifie les produits dutilisation gnrale aussi bien que ceux qui
Actual CSA certification is indicated by the product label as shown below, and sutilisent dans des emplacements dangereux. La certification CSA en vigueur
not by statements in any user documentation. est indique par ltiquette du produit et non par des affirmations dans la
documentation lusage des utilisateurs.
Example of the CSA certification product label Exemple dtiquette de certification dun produit par la CSA
I I
To comply with CSA certification for use in hazardous locations, the following Pour satisfaire la certification de la CSA dans des endroits dangereux, les
information becomes a part of the product literature for CSA-certified Allen-Bradley informations suivantes font partie intgrante de la documentation des produits
industrial control products. industriels de contrle Allen-Bradley certifis par la CSA.
This equipment is suitable for use in Class I, Division 2, Groups A, B, C, D, or Cet quipement convient lutilisation dans des emplacements de Classe 1,
non-hazardous locations only. Division 2, Groupes A, B, C, D, ou ne convient qu lutilisation dans des
The products having the appropriate CSA markings (that is, Class I Division 2, endroits non dangereux.
Groups A, B, C, D), are certified for use in other equipment where the suitability Les produits portant le marquage appropri de la CSA (cest dire, Classe 1,
of combination (that is, application or use) is determined by the CSA or the local Division 2, Groupes A, B, C, D) sont certifis lutilisation pour dautres
inspection office having jurisdiction. quipements o la convenance de combinaison (application ou utilisation) est
dtermine par la CSA ou le bureau local dinspection qualifi.
Important: Due to the modular nature of a PLC control system, the product with Important: Par suite de la nature modulaire du systme de contrle PLC, le
the highest temperature rating determines the overall temperature code rating of a produit ayant le taux le plus lev de temprature dtermine le taux densemble
PLC control system in a Class I, Division 2 location. The temperature code rating is du code de temprature du systme de contrle dun PLC dans un emplacement
marked on the product label as shown. de Classe 1, Division 2. Le taux du code de temprature est indiqu sur ltiquette
du produit.
! Division 2.
Do not replace components unless power has been switched
! inacceptable pour lesemplacements de Classe I, Division 2.
Couper le courant ou sassurer quelemplacement est dsign
off or the area is known to be non-hazardous. non dangereux avant de remplacer lescomposants.
Do not disconnect equipment unless power has been switched Avant de dbrancher lquipement, couper le courant ou
off or the area is known to be non-hazardous. sassurer que lemplacement est dsign non dangereux.
Do not disconnect connectors unless power has been switched Avant de dbrancher les connecteurs, couper le courant ou
off or the area is known to be non-hazardous. Secure any sassurer que lemplacement est reconnu non dangereux.
user-supplied connectors that mate to external circuits on an Attacher tous connecteurs fournis par lutilisateur et relis aux
Allen-Bradley product using screws, sliding latches, threaded circuits externes dun appareil Allen-Bradley l aide de vis,
connectors, or other means such that any connection can loquets coulissants, connecteurs filets ou autres moyens
withstand a 15 Newton (3.4 lb.) separating force applied for a permettant aux connexions de rsister une force de
minimum of one minute. sparation de 15 newtons (3,4 lb. - 1,5 kg) applique pendant
au moins une minute.
CSA logo is a registered trademark of the Canadian Standards Association Le sigle CSA est la marque dpose de lAssociation des Standards pour le Canada.
PLC is a registered trademark of Allen-Bradley Company, Inc. PLC est une marque dpose de Allen-Bradley Company, Inc.
Numbers F
1794-VHSC, troubleshoot, 5-- 1 frequency input module, how it works, 1-- 15
A G
adapter input status word, 4-- 3 gate reset input, 1-- 6
C I
CE compliance, 2-- 1 I/O, ControlNet
CIOs. See ControlNet I/O Transfer unscheduled non-discrete I/O data
instructions transfer, 4-- 2
unscheduled operations
compatible terminal bases, 2-- 9 messaging from programming devices,
connecting wiring, 2-- 9 4-- 2
considerations, pre-- installation, 2-- 1 non-discrete I/O data transfer, 4-- 2
peer-to-peer messaging, 4-- 2
continuous/rate mode, 1-- 11
indicators
ControlNet I/O states, 2-- 14
unscheduled non-discrete I/O data status, 2-- 14
transfer, 4-- 2
troubleshooting, 5-- 1
unscheduled operations
ladder-rung messages, 4-- 2 input mapping, 4-- 6
messaging from programming devices, input status word, 4-- 3
4-- 2
installation
peer-to-peer messaging, 4-- 2
module, 2-- 8
ControlNet I/O Transfer (CIO) instructions, of the module, 2-- 4
4-- 2
counter mode
block diagram, 1-- 3 K
operation, 1-- 3 keyswitch positions, 2-- 8
curent draw, through base units, 2-- 2
L
D
ladder-rung messaging, 4-- 2
daisy-- chaining wiring, 2-- 3 low voltage directive, 2-- 2
diagnostics, codes returned by module, 5-- 2
DIN rail mounting, 2-- 4
M
drilling dimensions, wall/panel mounting,
2-- 7 mapping
1794-VHSC, 4-- 6
explanation, 4-- 2
E Message instructions, 4-- 2
encoder, phase relationship, 1-- 5 module description, 1-- 1
encoder mode module features, 1-- 1
direction of count, 1-- 4
module installation, 2-- 4, 2-- 8
operation, 1-- 3
mounting, on terminal base, 2-- 8
encoder X4, 1-- 3
P T
panel/wall mounting, 2-- 6 terminal bases, compatible, 2-- 9
period/rate mode, operation, 1-- 8 troubleshooting, 5-- 1
polled I/O, structure, 4-- 3
U
R unscheduled non-discrete I/O data transfer,
4-- 2
rate measurement, connection to counter
inputs, 1-- 13
rate measurement mode, 1-- 12 W
removing and replacing, under power wall/panel mounting, 2-- 6
(RIUP), 2-- 9
wiring, methods of, 2-- 3
rollover value, 1-- 6
wiring connections, 2-- 9
1794-VHSC, 2-- 12
S
sample period, 1-- 12
If you find a problem with our documentation, please complete and return this form.
Cat. No. 1794-VHSC Pub. No. 1794-UM010B- EN- P Pub. Date March 2001 Part No.
Clarity
What is unclear?
Sequence
What is not in the right order?
Other Comments
Use back for more comments.
Return to: Marketing Communications, Allen-Bradley Co., 1 Allen-Bradley Drive, Mayfield Hts., OH 44124-6118 Phone: (216)646-3176
FAX: (216)646-4320
Other Comments
PLEASE REMOVE
PLEASE FOLD HERE
NO POSTAGE
NECESSARY
IF MAILED
IN THE
UNITED STATES
1 ALLEN BRADLEY DR
MAYFIELD HEIGHTS OH 44124-9705
Worldwide representation.
Argentina Australia Austria Bahrain Belgium Brazil Bulgaria Canada Chile China, PRC Colombia Costa Rica Croatia Cyprus Czech Republic
Denmark Ecuador Egypt El Salvador Finland France Germany Greece Guatemala Honduras Hong Kong Hungary Iceland India Indonesia
Ireland Israel Italy Jamaica Japan Jordan Korea Kuwait Lebanon Malaysia Mexico Netherlands New Zealand Norway Pakistan Peru
Philippines Poland Portugal Puerto Rico Qatar Romania Russia--CIS Saudi Arabia Singapore Slovakia Slovenia South Africa, Republic Spain
Sweden Switzerland Taiwan Thailand Turkey United Arab Emirates United Kingdom United States Uruguay Venezuela Yugoslavia
Allen-Bradley Headquarters, 1201 South Second Street, Milwaukee, WI 53204 USA, Tel: (1) 414 382-2000 Fax: (1) 414 382-4444