Rockwell Automation 1794-VHSC User Manual

User Manual
1794 FLEX I/O Very High Speed Counter Module
Catalog Numbers
1794-VHSC
Important User Information
IMPORTANT
Solid-state equipment has operational characteristics differing from those of electromechanical equipment. Safety Guidelines for the Application, Installation and Maintenance of Solid State Controls (publication SGI-1.1 your local Rockwell Automation sales office or online at http://www.rockwellautomation.com/literature/ important differences between solid-state equipment and hard-wired electromechanical devices. Because of this difference, and also because of the wide variety of uses for solid-state equipment, all persons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable.
In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment.
The examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and requirements associated with any particular installation, Rockwell Automation, Inc. cannot assume responsibility or liability for actual use based on the examples and diagrams.
No patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or software described in this manual.
Reproduction of the contents of this manual, in whole or in part, without written permission of Rockwell Automation, Inc., is prohibited.
Throughout this manual, when necessary, we use notes to make you aware of safety considerations.
WARNING: Identifies information about practices or circumstances that can cause an explosion in a hazardous environment, which may lead to personal injury or death, property damage, or economic loss.
available from
) describes some
ATTENTION: Identifies information about practices or circumstances that can lead to personal injury or death, property damage, or economic loss. Attentions help you identify a hazard, avoid a hazard, and recognize the consequence
SHOCK HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that dangerous voltage may be present.
BURN HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that surfaces may reach dangerous temperatures.
Identifies information that is critical for successful application and understanding of the product.
Allen-Bradley, Rockwell Automation, FLEX I/O, ControlLogix, RSlogix, R SLinx, and TechConnect are trademarks of Rockwell Automation, Inc.
Trademarks not belonging to Rockwell Automation are property of their respective companies.

Summary of Changes

This manual contains new and updated information. Changes throughout this revision are marked by change bars, as shown to the right of this paragraph.

New and Updated Information

This table contains the major changes and additions made to this revision.
Topic Page
Updated Frequency Resolution/Enhancement section. 33 Updated Word 8 Bit/Word Definitions. 39, 40
Rockwell Automation Publication 1794-UM010D-EN-E - July 2013 iii
Summary of Changes
Notes:
iv Rockwell Automation Publication 1794-UM010D-EN-E - July 2013

Preface

Read this preface to familiarize yourself with the rest of the manual. It provides information concerning:
who should use this manual
the purpose of this manual
related documentation

Who Should Use this Manual

Purpose of this Manual

You must be able to program and operate an Allen-Bradley programmable controller (PLC) to make efficient use of this module.
We assume that you know how to do this in this manual. If you do not, refer to the appropriate programming and operations manual for the associated programmable controller before you attempt to use this module.
This manual shows you how to use the FLEX I/O Very High Speed Counter module with an Allen-Bradley programmable controller. It helps you install, program, and troubleshoot your module.
For Information About See Page
Overview of the Very High Speed Counter Module 1 Install Your FLEX I/O VHSC Module 17 Programming Your Very High Speed Counter Module 55 Communicate With Your Module 29 Interpret Status Indicators for your FLEX I/O Module 47 Specifications 49

Additional Resources

These documents contain additional information concerning related Rockwell Automation products.
Resource Description
FLEX I/O Selection Guide, publication 1794-SG002
Very High Speed Counter Module Installation Instructions, publication 1794-IN067
ControlLogix System User Manual, publiation 1756-UM001
EtherNet/IP Modules Installation Instructions, publication ENET-IN002
FLEX I/O DC Power Supply Installation Instructions, publication 1794-IN069
EtherNet/IP Modules in Logix5000 Control Systems User Manual, publication ENET-UM001
Rockwell Automation Publication 1794-UM010D-EN-E - July 2013 v
A description and overview of the 1794 series FLEX I/O, FLEX I/O XT and FLEX Ex modules and compatible control platforms.
Information on installing the FLEX I/O Very High Speed Counter Module.
Detailed information on how to install, configure and troubleshoot the ControlLogix module in your ControlLogix application.
Information on installing EtherNet/IP bridge modules.
Information on how to install the FLEX I/O DC Power Supply Catalog No. 1794-PS13, 1794-PS3.
Detailed information on how to use EtherNet/IP modules with Logix5000 controllers and communicate with various devices on the Ethernet network.
Preface
Resource Description
Industrial Automation Wiring and Grounding Guidelines, publication 1770-IN041
Product Certifications website, http://ab.com Provides declarations of conformity, certificates, and other certification details. Application Considerations for Solid-State Controls,
publication SGI-1.1 Allen-Bradley Industrial Automation Glossary, publication AG-7.1
Provides general guidelines for installing a Rockwell Automation industrial system.
A description of important differences between solid-state programmable controller products and hard-wired electromechanical devices.
A glossary of industrial automation terms and abbreviations.
You can view or download publications at
http://www.rockwellautomation.com/literature/
. To order paper copies of technical documentation, contact your local Rockwell Automation distributor or sales representative.

Common Techniques Used in this Manual

The following conventions are used throughout this manual:
Bulleted lists such as this one provide information, not procedural steps.
Numbered lists provide sequential steps or hierarchical information.
Italic type is used for emphasis.
vi Rockwell Automation Publication 1794-UM010D-EN-E - July 2013

Table of Contents

Summary of Changes
Preface
Overview of the Very High Speed Counter Module
New and Updated Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
Who Should Use this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Purpose of this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Common Techniques Used in this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . vi
Chapter 1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Module Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Module Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Encoder or Counter Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Counter Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Encoder Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Direction of Count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Preset Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Rollover Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Software Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Gate/Reset Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Period/Rate Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Operation of Scaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
Connection to Counter Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
Continuous/Rate Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Rate Measurement Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Sample Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
Connection to Counter Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
Pulse Width Modulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Enabling and Forcing Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Assigning Outputs to Counter Windows . . . . . . . . . . . . . . . . . . . . . . . 13
Operation of Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
Isolation of Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Connecting Outputs to Counters . . . . . . . . . . . . . . . . . . . . . . . . . .14
What the Module Does . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Chapter Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Chapter 2
Install Your FLEX I/O VHSC Module
Rockwell Automation Publication 1794-UM010D-EN-E - July 2013 vii
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Before You Install Your Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Power Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Install the Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Mount on a DIN Rail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Install the Terminal Base Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
Mount on a Panel or Wall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Mount the 1794-VHSC Module on the Terminal Base Unit . . . . . 21
Wiring Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Connect Wiring to the FLEX I/O VHSC Input Module . . . . . . . . 24
Connect Wiring Using a 1794-TB3G, 1794-TB3GK or 1794-TB3GS
Terminal Base Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Chapter Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Chapter 3
Communicate With Your Module
Interpret Status Indicators for your FLEX I/O Module
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Communication Over the
I/O Backplane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Scheduled Data-Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Unscheduled Data-Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Module I/O Mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Application of New Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
I/O Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Adapter Input Status Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Safe State Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Device Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Communication Fault Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Idle State Behavior. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Input Data Behavior upon Module Removal . . . . . . . . . . . . . . . . . . . . 33
Frequency/Resolution Enhancement. . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Chapter Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Chapter 4
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Status Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Diagnostic Codes Returned by the Module . . . . . . . . . . . . . . . . . . . . . . . . . 48
Chapter Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Appendix A
Specifications
Programming Your Very High Speed Counter Module
Index
viii Rockwell Automation Publication 1794-UM010D-EN-E - July 2013
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Appendix B
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Overview of the Very High Speed
IMPORTANT
Counter Module
Chapter
1

Overview

Module Description

This chapter gives you information on features of the modules, how the module communicates with controllers and how the module operates.
Topic Page
Module Description Encoder or Counter Mode 2 Period/Rate Mode 8 Continuous/Rate Mode 10 Rate Measurement Mode 11 Pulse Width Modulation 12 Outputs 13 What the Module Does 14
The 1794-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 Ethernet capability.
The 1794-VHSC module, once configured for its intended purpose, can continue to operate without FlexBus power.
1
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 processor’s data table on request. Command and configuration data is sent from the programmable controller data tables to the module via Ethernet.
Module Features
The 1794-VHSC module counts pulses from encoders (such as Allen-Bradley Bulletin 845), pulse generators or mechanical limit switches, or proximity switches, and returns either a count or frequency in binary format.
Rockwell Automation Publication 1794-UM010D-EN-E - July 2013 1
Overview of the Very High Speed Counter Module
The module features include:
2 counters configurable for 3 encoder modes, counter mode, period/rate
mode, continuous/rate mode, rate measurement and pulse width modulation (PWM)
4 outputs, isolated in pairs
outputs are current-sourcing at 5 or 12…24V DC (0.5 mA max @ 5V; 1 A
max @ 12…24V)
single-ended or differential inputs
2-phase encoder inputs up to a frequency of 250 KHz (X 4 mode)
single-phase counter inputs up to a frequency of 1 MHz
input voltage range of 5 or 24V DC
returns input as count or frequency in binary format
input counts as high as 16,777,215
up to 1 MHz in period/rate or rate measurement frequency modes
outputs can be tied to any or all counter windows
each output has a user-selectable on-off value
outputs can be tied back to an input for cascading
each counter has a user-selectable preset and rollover value
totalization is provided in period/rate, continuous/rate and rate
measurement modes
module can continue counting without flexbus power (after configuration)
outputs have safe state values which can be applied when there is a network
failure or the PLC is switched to PROGRAM mode
pulse width modulation (PWM) mode is available
The 1794-VHSC module operates in the following modes:
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)

Encoder or Counter Mode

2 Rockwell Automation Publication 1794-UM010D-EN-E - July 2013
The operation of encoder and counter modes is virtually identical. 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).
Overview of the Very High Speed Counter Module
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.
The operation of the module in the encoder/counter modes is as follows:
counter mode – channel B is direction control (up or down). Channel A
input is used for pulse. The count is bidirectional with the direction determined by channel B.
encoder X1 – This is a bidirectional count mode; counting up or down,
using quadrature input signals.
encoder X2 – This is a bidirectional count mode, using quadrature input
signals, with 2 times the resolution of X1.
encoder X4 – This is a bidirectional count mode, using quadrature input
signals, with 4 times the resolution of X1.
Each of the counters in encoder/counter mode has values associated with it. These are:
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).
In the counter mode, direction (up counting or down counting ) is determined by the phase B input, which can be a random signal. If Phase B is high, the counter will count down. If phase B is low or floating, (that is, not connected), the counter counts up.
Counter Mode Direction
Phase B Input Count direction
High Down Low or floating (not included) Up
The module reads incoming pulses from a maximum of 2 encoders (single-ended or differential), counters, pulse generators, mechanical limit switches, and so forth and returns a count to the programmable controller processor in a binary number (0-16,777,215).
The counter mode accepts only one phase feedback. This relationship is shown in Figure Block Diagram of Counter Mode
on page 4.
Rockwell Automation Publication 1794-UM010D-EN-E - July 2013 3
Overview of the Very High Speed Counter Module
A
B
01 2 3 2 1 0
Input A
Input B
Z(Store count)
Single phase pulse generator
1794-VHSC
Input Z
(Gate/Reset)
Count down
A input
B input
Count
Count up
+
-
Outputs updated continuously
45891
Block Diagram of Counter Mode
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.
4 Rockwell Automation Publication 1794-UM010D-EN-E - July 2013
Overview of the Very High Speed Counter Module
A input
B input
X1 count
A
B
Input A
Input B
Reverse rotation CW encoder rotation
Forward rotation CCW encoder rotation
120
312
1 2 3 4 5 6 7 8 9 10 11 1 2
1234567
8
9101112
0
1 2 3 4 5 6 7 8 9 10 11 1 2
1234567
8
9101112
0
Z(Store count)
Quadrature encoder
1794-VHSC
Input Z
(Gate/Reset)
45892
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. See Figure Phase Relationship for Forward or Reverse Directions relationships between inputs A and B for forward and reverse directions in encoder applications.
Phase Relationship for Forward or Reverse Directions
on page 5 for the
The following paragraphs apply to both encoders and counters.
Rockwell Automation Publication 1794-UM010D-EN-E - July 2013 5
Overview of the Very High Speed Counter Module
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, and so on, in a positive direction and from 1, 0, 359, 358, and so on, 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. For more details, .
Gate/Reset Input
There is one gate/reset input for each of the 2 counters. The gate/reset input, when active, will function in one of the 4 store count modes outlined below.
Scaling Input Count at the Gate/Reset Terminal
You can scale the incoming count at the gate/reset terminal. Scaling allows the incoming pulses at gate/reset to be divided by a number in the range of 1, 2, 4, 8, 16, 32, 64 and 128.
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.
In mode 1, store/continue (see Figure Store/Continue edge of a pulse input on input Z (gate/reset) terminal causes the current value in
6 Rockwell Automation Publication 1794-UM010D-EN-E - July 2013
on page 7), the leading
Overview of the Very High Speed Counter Module
Read, Store Count and continue counting.
Store Count
Stop counting
Resume counting
Stop count, store and reset to zero
Counter has stopped counting
Start counting from zero
the counter to be read and stored. The counter will continue counting. The stored count will be available in the Read Data file. The stored count information will remain in the block transfer read file until it is overwritten by new data.
Store/Continue
In mode 2, store/wait/resume (see Figure Store/Wait/Resume on page 7), a rising edge of a pulse input on the Z input (gate/reset) terminal reads and stores the current counter value in the Read Data file, and inhibits counting while the gate/ reset input is high. Counting resumes when the input goes low.
Mode 2 does not reset the counter, although it does store the count value. The stored count is available in the Read Data file. The stored count remains in the Read Data file until it is overwritten with new data.
Store/Wait/Resume
In mode 3, store-reset/wait/start (see Figure Store-Reset/Wait/Start on page 7), the rising edge of the pulse on input Z (gate/reset) terminal causes the counter to stop counting, store the current count value in the Read Data file and reset the count to zero. The counter does not count while the Z input on the gate/reset terminal remains high. Counting resumes from zero on the falling edge of the pulse at the Z (gate/reset) terminal. The stored count is available in the Read Data file. The stored count remains in the Read Data file until it is overwritten with new data.
Store-Reset/Wait/Start
In mode 4, store-reset/start (see Figure Store-Reset/Start on page 8), on the rising edge of a pulse input at the Z (gate/reset) terminal causes the counter to store the accumulated count value in the Read Data file, and reset the counter to zero. The counter continues counting while the Z gate/reset input is high. The stored count
Rockwell Automation Publication 1794-UM010D-EN-E - July 2013 7
Overview of the Very High Speed Counter Module
Store Count, reset to zero, start counting
Rising edge
Store Count, reset to zero, start counting
Falling edge
is available in the Read Data file. The stored count remains in the Read Data file until it is overwritten with new data.
Store-Reset/Start
The figures show the store count feature operating on the rising edge of the gate/ reset pulse. The user has the option of electing 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.

Period/Rate Mode

Use the period/rate mode to determine the frequency of input pulses 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.
A channel configured for period/rate mode acts as a period rate counter. An internal 5MHz clock is used as a frequency reference. This clock is gated by the incoming pulse train at the gate/reset input. The results of this gating action are the number of pulses or a frequency. The frequency is returned in input file words 0 (LSW) and 1 (MSW) for channel 0 and word 2 (LSW) and 3 (MSW) for channel 1. The total pulses received is stored in input file words 4 (LSW) and 5 (MSW) for channel 0 and words 6 (LSW) and 7 (MSW) for channel 1. Select the period/rate mode by setting the appropriate bits in word 0 of the configuration block.
1794-VHSC modules count the total number of pulses occurring at the Z (gate/ reset) pin. This function is frequency-limited to 200Hz X the scaler value. You can reset this count by setting the VR bit.
Figure Period/Rate Mode
on page 9 shows a diagram of the module used in the
period/rate mode.
8 Rockwell Automation Publication 1794-UM010D-EN-E - July 2013
Period/Rate Mode
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/5 MHz) Frequency = 1 / [(25/1) X (1/5 MHz) X 2] = 100 KHz
45893
Overview of the Very High Speed Counter Module
Incoming pulse train at Z (gate/reset terminal)
5 MHz internal clock
Accumulated count
Single phase pulse generator
1
A (not used)
B (not used) Z (gate/reset)
10 20
Input A
Input B
Input Z scaler
5 MHz clock
1794-VHSC
Frequency and outputs updated here
In Figure Period/Rate Mode on page 9, the incoming pulse train from the gate/ reset terminal is used to sample pulses from the 5 MHz internal clock. As the frequency of the incoming pulse train at the gate/reset terminal increases, the number of sampled pulses from the 5 MHz 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.
To some extent, the decrease in accuracy can be lessened by scaling the input frequency through the use of a scaler. A scaler value of 1 will only return an accurate input frequency if incoming pulses have a 50% duty cycle.
Relationship Between Sampled Pulses and Input Frequency
Input Frequency at Z (Gate/Reset) Terminal in Hz
21.25M 5500K 10 250K 20 125K 50 50K 100 25K
Rockwell Automation Publication 1794-UM010D-EN-E - July 2013 9
Sampled Pulses for 1/2 Cycle of Z (Gate/Reset) Pulse
Overview of the Very High Speed Counter Module
Relationship Between Sampled Pulses and Input Frequency
Input Frequency at Z (Gate/Reset) Terminal in Hz
200 12.5K 500 5K 1 KHz 2.5K 2 KHz 1.25k 5 KHz 500 10 KHz 250 20 KHz 125 50 KHz 50 100 KHz 25
Sampled Pulses for 1/2 Cycle of Z (Gate/Reset) Pulse
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.
ATTENTION: Sample period times scaler must be less than 6.71 s in order to avoid a zero frequency detect indication.

Continuous/Rate Mode

Connection to Counter Inputs
The only input to the module in the period/rate mode is made to the Z (gate/ reset) terminal. The counter inputs (channel A and B) are not used in the period/ rate mode.
The continuous/rate mode is similar to the period/rate mode previously described except the outputs in this mode are dynamic outputs. Use this mode to determine the frequency of input pulses by counting the number of internal 5 MHz clock pulses over a user-specified number of input signal pulses. Each output is turned on as soon as the turn-on count is reached, and turned off as soon as the turn-off count is reached. As the internal 5 MHz clock is counted, the outputs dynamically track the 5 MHz count. This allows you to turn an output on a certain number of 5 MHz counts after the gate/reset pin goes active, and turn it off a certain number of 5 MHz counts later.
1794-VHSC module counts the total number of pulses occurring at the Z (gate/ reset) terminal. This function is frequency-limited to 200 Hz X the scaler value. This total count is returned in input file words 4 (LSW) and 5 (MSW) for channel 0 and 6 (LSW) and 7 (MSW) for channel 1. You can reset this count by setting the VR bit.
10 Rockwell Automation Publication 1794-UM010D-EN-E - July 2013
Overview of the Very High Speed Counter Module
Incoming pulse train at Z (gate/reset terminal)
5 MHz internal clock
A (not used)
B (not used)
Input A
Input B
Z
Encoder/Pulse generator
1794-VHSC
Input Z
(Gate/Reset)
scaler 5 MHz clock
1
Accumulated count
Outputs updated continuously
Frequency updated here
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/5 MHz) Frequency = 1 / [(25/1) X (1/5 MHz) X 2] = 100 KHz
45894
Period/Rate and Continuous/Rate Output Operation with Scaler of 1

Rate Measurement Mode

Rockwell Automation Publication 1794-UM010D-EN-E - July 2013 11
Use the rate measurement mode to count incoming pulses for a 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.
The value representing the total number of pulses is returned in input file words 4 (LSW) and 5 (MSW) for channel 0 and 6 (LSW) and 7 (MSW) for channel 1, and the value indicating the incoming frequency is returned in words 0 (LSW) and 1 (MSW) and 2 (LSW) and 3 (MSW). The total count equals the running sum of the number of pulses received during the sample period. The operation of rate measurement mode is shown in Figure Operation of the Rate Measurement
Mode on page 12.
Overview of the Very High Speed Counter Module
If sample period is 50 ms, and count = 3, then frequency = 3/50 ms = 60 Hz
45895
EXAMPLE
A Input (pulse)
Internal sampling gate
Accumulated count
Operation of the Rate Measurement Mode
Encoder/Pulse generator
123
A Input
B (not used) Z (not used)
(Gate/Reset)
Input A
Input B
Input Z Time base
1794-VHSC
Frequency calculated, outputs updated here
In , three counts have been accumulated during the user-selected time period. If you had selected 50 ms as the sample period, the frequency returned to the programmable controller processor would be:
Frequency = Counts/Sample period = 3 counts/50 ms = 60 Hz
Sample Period
You can set the sample period used in the frequency calculation in the rate measurement mode. Allowable values are 10 ms to 3 s in 10 ms increments. The default value is 1 s.
Connection to Counter Inputs
The only user connections used in the rate measurement mode are to phase A of the module. The Z (gate/reset) and channel B terminals are not used in this mode.

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.
12 Rockwell Automation Publication 1794-UM010D-EN-E - July 2013
Overview of the Very High Speed Counter Module
Output turns on at count value of 2000
Output remains energized for 3000 additional counts
Output turns off at count value of 5000

Outputs

The 1794-VHSC module has 4 outputs, isolated in groups of 2. Each of the outputs is capable of sourcing current and will operate between 5 and 24V DC. You must connect an external power supply to each of the outputs. The outputs can source 1 A DC alone or in combination. The outputs are hardware-driven and will turn on in about 25 s when the appropriate count value has been reached.
Enabling and Forcing Outputs
Outputs may be forced on or off independent of count or frequency value. To force the outputs, they must first be enabled. Enabling the outputs is done through a data table word 1, bits 1, 5, 9 and 13 (see Figure 1794-VHSC — High
Speed Counter Module Image Table Mapping on page 35). Once the outputs
have been enabled, they may be forced on by setting bits 0, 4, 8 or 12 in word 1. The outputs can be forced off by setting the enable bit to 0.
Assigning Outputs to Counter Windows
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 1794-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 (see Figure On-Off Operation of Output
page 13).
On-Off Operation of Output
Using output 0 as an example, when the value in Counter ON Value is less than the value in Counter OFF Value, the output turns on at 2000 and off at 5000. If the value in Counter ON Value is greater than the value in Counter OFF Value, the output turns off at 2000 and on at 5000 (see Figure Effect of Values in On/
Off Operation on page 14).
on
Rockwell Automation Publication 1794-UM010D-EN-E - July 2013 13
Loading...
+ 47 hidden pages