Owner’sGuide 0300181-05 Rev.
ImportantNotes 1. Please read all the information in this owner’s guide before installing the product. 2. The information in this owner's guide applies to hardware and firmware version 1.0 or later. 3. This guide assumes that the reader has a full working knowledge of the relevant processor. Notice The products and services described in this owner's guide are useful in a wide variety of applications.
Contents Overview And Specifications ......................................................... 7 General Features And Benefits.......................................................................................................... 7 Detailed Specifications ....................................................................................................................... 9 Table 1.1. Electrical specifications—module .......................................................................................
Check each output channel’s configuration and status ............................................................................................................. 39 Programming / Application Examples ......................................... 43 Sample Counter Configuration Simple Linear Counter (10,000 Limit): ............................................................................................................................. 43 Ring Counter Sample .................................................
Chapter 1 OverviewAndSpecifications The 1746sc-CTR4 and the 1746sc-CTR8 are 4 and 8 channel Counter/ Flow Meter modules. The modules are suitable for general purpose counter and flow meter applications that require a large number of input channels and high accuracy. The module supports both AC and DC input signal types. The counter functions include programmable control of the counter including start, stop, reset, preset control and user defined flags.
SLC 500™ 50 KHz Counter / Flowmeter Input Module Increased Accuracy and Reliability The counter module offers ±1 count accuracy and ±1% or better frequency measurement accuracy. Programmable functions allow the user to define counter ranges and flags to accommodate process-specific requirements. Full speed counter operation of over 50kHz is possible. Reduced System Costs High Channel density allows for lower resource usage.
Chapter 1: Overview And Specifications Vmax Input impedance 75V 25K ohms Input Filter Digital Filter Digital Filter Analog Filter 50kHz (Default) 30kHz 15kHz Min Pulse Time DC mode 8us External Enable/Disable Enable and Disable setup time = 20us Channel Update Time Counter Output Rate Output Rate Instantaneous Mode Rate Average Mode Scaling OFF 4.0 ON 5.6 (msec per channel) 4.0 1.0 5.6 (msec per channel) 1.
SLC 500™ 50 KHz Counter / Flowmeter Input Module Data Format Counter mode Rate mode Max Binary Value: -8,388,608 to +8,388,607 Max Binary Value: -32,768 to +32,767 Isolation Channel to Rack Channel to Channel Input Protection 1000 VDC Continuous 0VDC Optical & magnetic Max input voltage ±100VDC, 150VAC peak Max input current ± 5mA@100Vp Power Requirements Internal rack +5v Internal rack +24V CTR4 CTR8 175mA 75mA 225mA 125mA Table 1.2.
Chapter 2 Installing And Wiring Your Module Read this chapter to install and wire your module.
ControlLogix™ Counter Module The following documents contain information that may help you as you install and wire your module: • National Electrical Code, published by the National Fire Protection Association of Boston, MA • IEEE Standard 518-1977, Guide for the Installation of Electrical Equipment to Minimize Electrical Noise Inputs to Controllers from External Sources • IEEE Standard 142-1982, Recommended Practices for Grounding of Industrial and Commercial Power Systems • Noise Reduction Techniques
Chapter 2: Installing And Wiring Your Module Determining Power Requirements 13 The backplane of the system can provide both 5 Vdc and 24 Vdc power. The following table shows the maximum current consumed by your module when using these power sources: Table 2.1. Backplane current consumed Catalog Number 5 Vdc 24 Vdc 1756sc-CTR8 230 mA 75 mA Use Table 2.1 to calculate the total load on the system power supply. For more information, see the Allen-Bradley system Installation and Operation Manual.
ControlLogix™ Counter Module CAUTION ! POSSIBLE EQUIPMENT OPERATION Before installing or removing your module, always disconnect power from the SLC 500 system and from any other source to the module (in other words, don’t “hot swap” your module), and disconnect any devices wired to the module. Failure to observe this precaution can cause unintended equipment operation and damage.
Chapter 2: Installing And Wiring Your Module 15 2. Slide your module into the chassis until both top and bottom retaining clips are secure. Apply firm even pressure on your module to attach it to its backplane connector. Never force your module into the slot. Cover all unused slots with the Card Slot Filler, Allen-Bradley part number 1746-N2. To remove your module, press the retaining clips at the top and bottom of your module and slide it out.
ControlLogix™ Counter Module foil shield to their ground points. Connect only one end of the shield to the module. 2. At each end of the cable, strip some casing to expose the individual wires. 3. Trim the exposed signal wires to 2 in. lengths. Strip about 3/16 in. (about 5 mm) of insulation away to expose the end of each wire. 4. At one end of the cable, twist the drain wire and foil shield together, bend them away from the cable, and apply shrink wrap. 5.
Chapter 2: Installing And Wiring Your Module 17 To guard against electrostatic damage and improve chassis grounding, connect one of the shield pins on the terminal block of your module to the chassis itself. 7. Repeat steps 1 through 6 for each channel on your module. A system may malfunction due to a change in its operating environment. After installing and wiring your module, check system operation. See the Allen-Bradley system Installation and Operation Manual for more information.
ControlLogix™ Counter Module Labeling And ReInstalling The Terminal Block (if it is removed) The supplied label is mounted on the module door. This label helps ensure that the terminal block is wired correctly for the module. Once you have wired your module and properly labeled install the terminal block on your module: 1. Align the terminal block with the receptacle. 2. Insert the terminal block and press firmly at the top and bottom until it is properly seated. 3.
Chapter 3 Things To Consider Before Using Your Module This chapter explains how the module and the SLC processor communicate through the processor’s I/O image tables. It also describes the module’s input filter characteristics.
SLC 500™ 50 KHz Counter / Flowmeter Input Module The CTR-8 module uses 32 input and 32 output registers, and the CTR-4 module uses 16 input and 16 output registers. Both modules use Class III mode operation and cannot be used with Class I operation. The following memory map shows you how the SLC processor’s output and input tables are defined for the module. The SLC 5/01 processor does not support Class III operation and is not compatible with this module.
Chapter 3: Things To Consider Before Using Your Module 21 Output Image - Configuration Words Thirty-two (CTR-8) or sixteen (CTR-4) words of the SLC processor’s output image table are reserved for the module. For the CTR8, output image words 0-31 are used to configure input channels 0-7. For the CTR4, output image words 0-15 are used to configure input channels 0-4. Each output image word configures a single channel, sets the preset, limit and scale factors and can be referred to as a configuration word.
SLC 500™ 50 KHz Counter / Flowmeter Input Module Operating Modes The module’s operating mode determines the number of available counters and which inputs are attached to them. There are two operating modes and their input assignments are summarized in the table below. Table 3.
Chapter 3: Things To Consider Before Using Your Module Note: The X1 Quadrature mode provides additional Anti-Jitter circuitry. This distinguishes between a valid quadrature sequence and an invalid sequence due to electrical noise or jitter. Jitter can occur if a quadrature encoder stops rotating right at an input sensor trip point. This can cause additional unwanted clock pulses. The X1 quadrature mode can detect invalid transitions and filter these out.
SLC 500™ 50 KHz Counter / Flowmeter Input Module Gate Modes There are two methods to gate (start/stop) your counter, hardware and software. The counter’s gate/preset mode determines what, if any, gating is applied to the counter and what, if any, conditions will preset the counter to the preset value. External Hardware Gate Lines: There are four external inputs, one for each pair of input channels, that may be used to start and stop the counter. Each external gate is pulled low internal to the module.
Chapter 3: Things To Consider Before Using Your Module 25 Input Response When a counter slot is disabled, the counter module continues to update its input image table. However, the SLC processor does not read input from a module that is disabled. Therefore, when the processor disables the counter module slot, the module inputs appearing in the processor table is not read.
SLC 500™ 50 KHz Counter / Flowmeter Input Module
Chapter 4 Channel Configuration, Data, andStatus Read this chapter to: • configure each input channel • set user-defined scale limits • monitor each input channel • check each output channel’s configuration and status Configuring Each Input Channel The Data Register format uses Class 3 operation. Class 3 mode allows the module to use 32 input words and 32 output words of data, as listed below. After installing your module, you must configure each channel by setting bit values in each configuration word.
SLC 500™ 50 KHz Counter / Flowmeter Module Figure 4.1 - Configuration Word Address O:e.0 0 15 Channel 0 Configuration Word O:e.1 Channel 0 Preset / M Factor O:e.2 Channel 0 Limit / K Factor O:e.3 Channel 0 Rate Limit / R Factor O:e.4 Channel 1 Configuration Word O:e.5 Channel 1 Preset / M Factor O:e.6 Channel 1 Limit / K Factor O:e.7 Channel 1 Rate Limit / R Factor O:e.8 Channel 2 Configuration Word O:e.9 Channel 2 Preset / M Factor O:e.10 Channel 2 Limit / K Factor O:e.
Chapter 4: Channel Configuration, Data, and Status 29 Figure 4.
SLC 500™ 50 KHz Counter / Flowmeter Module Reset Flags: (Configuration Bit 2) The reset flags command is performed when this bit is set. Reset flags affects the counter zero, counter limit and counter maximum flags (Status word bits 8, 6, and 5 respectively.) These particular flags remain high, regardless of the counter behavior, until a reset is performed. This allows adequate time to read the flags after an event has occured.
Chapter 4: Channel Configuration, Data, and Status 31 Rate - Instant: When this bit is reset to “0” the rate detection circuit operates in “Instant” mode. Instant measurements are fast, in that they calculate a rate based on one cycle. However the accuracy of the measurement degrades as the input clock rate goes up to 50KHz, and any jitter within one cycle will be measured. Figure 4.3 - One Period Rate Measurement One Period The accuracy while operating in the average mode is ±1 count.
SLC 500™ 50 KHz Counter / Flowmeter Module Count Mode: (Configuration Bits 6-7) The Count Mode bit selects 1 of 4 types of counter operation. The Unidirectional counter mode is configured as an Up or Down counter. The module will support 8 unidirectional input channels. Every clock pulse increments the counter. Note: The direction of the count can be inverted by the COUNT DIRECTION bit (see bit 12). The Bidirectional counter requires 2 channels inputs.
Chapter 4: Channel Configuration, Data, and Status Stop on Limit: (Configuration Bit 9) This bit, when set, will hold the counter output at its limit value. When the counter counts to the limit value it will either rollover to zero, or hold its output at the limit value, until the Limit Flag is cleared. When released the counter will continue to count. If the user defined limit register is equal to zero, the limit is internally set to 32,767 (Normal Mode) or 8,388,607 (Extended Mode).
SLC 500™ 50 KHz Counter / Flowmeter Module Counter Roll Under: (Configuration Bit 14) When the counter rolls under zero it can continue to count down into negative numbers, or it can start at the user defined preset value. When this bit is set to 0 the counter will continue to count down through zero into negative numbers. When set to 1 the counter will roll under to the preset value. If the stop on zero flag is set the counter will not roll under until the flag is released.
Chapter 4: Channel Configuration, Data, and Status Note: In extended count mode (counts up to +/- 8M) the preset will be multiplied by 256 internally such that a user preset of 1000 will result in a preset of 25600. This allows the preset value to cover the whole +/- 8 million count range. In program scale factor mode an M Factor is stored in the module’s nonvolatile memory. If an M Factor is defined (not zero) then the data value output for the counter value will be COUNT x (M Factor/10,000).
SLC 500™ 50 KHz Counter / Flowmeter Module Rate Limit / R Factor: The rate limit function is used in the Normal operation mode. The Rate Limit represents a target maximum value for rate. When the rate value is greater then or equal to the rate limit value the Rate Limit flag bit will be set. In program scale factor mode an R Factor is stored in the module’s nonvolatile memory. If an R Factor is defined (not zero) then the data value output for the counter value will be Rate / R Factor.
Chapter 4: Channel Configuration, Data, and Status Input Registers Channel Data 37 The channel data consists of 4 words, the lower counter data value, the upper counter data value, the rate data value and the channel status data. Table 4.4 - Data Word Addresses CTR8 CTR4 Scale/Limit Value I:e.0 to I:e.3 I:e.0 to I:e.3 0 Channel MSW, LSW, Rate Data, Status Reg I:e.4 to I:e.7 I:e.4 to I:e.7 1 Channel MSW, LSW, Rate Data, Status Reg I:e.8 to I:e.11 I:e.8 to I:e.
SLC 500™ 50 KHz Counter / Flowmeter Module Counter Output Register, Low word: This output data register contains the lower word of the counter accumulator. This register is a signed16 bit word in binary 2’s complement format and will allow count values up to ±32K. This word is used in conjunction with the counter’s upper output word when in the extended count mode. Bit 15 represents the sign for each word.
Chapter 4: Channel Configuration, Data, and Status Output Channel Status Flags Figure 4.13 Counter Output - Channel Status Flags 15 14 13 12 Address I:e.3 11 10 9 8 7 6 5 4 3 2 1 0 0 = OK 1 = Error Counter Enable Channel 7 Status Word Counter Input State I:e.31 Direction Invert Channel 6 Status Word Count Direction I:e.27 Count Size Channel 5 Status Word Count Limit I:e.23 Count Preset Channel 4 Status Word Rate Max I:e.19 Count Zero Channel 3 Status Word Rate Zero I:e.
SLC 500™ 50 KHz Counter / Flowmeter Module Counter Start/Stop Echo: (Status Bit 0) This bit echo’s the setting of the Counter Enable bit set in the channels control register. The counter enable bit allows the counter to continue to count up or down from its present value. Counter Input State: (Status Bit 1) This bit shows the current value of the input state. The state of the input will be sampled at the end of the current update cycle.
Chapter 4: Channel Configuration, Data, and Status 41 Counter Zero Flag: (Status Bit 8) The flag is set when the counter counts down through zero. Refer to the configuration word section of this chapter for a description of this flag’s operation. Max Rate Flag: (Configuration Bit 9) The max rate flag is set when the input rate exceeds its maximum range of 32,767kHz.
SLC 500™ 50 KHz Counter / Flowmeter Module
Chapter 5 Programming / Application Examples Learning to configure your counter to meet your application requirements will require knowledge of counter configuration, ladder logic programming and data management.
SLC 500™ 50 KHz Counter / Flowmeter Module 0 Count 10,000 Roll Over Note: If we change Configuration Bit 9 to 1 the counter will reach the limit and then hold its value until the Limit Flag is cleared. Then it will roll to 0, and continue counting to 10,000. Each time the limit is reached the flag must be reset before proceeding. Note: If we toggle Configuration Bit 12 the counter counts in a downward direction. It will start at 0 and count to -32,768. It will then Roll Under to +32,767.
Chapter 5: Ladder Program Examples Sample Configuration Simple Ring Counter w/ Flags (20k Limit): 45 This configuration for the counter module will allow the user to count from a minimum value of 0 to a limit value of 20,000 counts Each time a revolution has occurred the counter limit flag will be set. Your ladder program may use this flag to increment an accumulator, thus counting revolutions.
SLC 500™ 50 KHz Counter / Flowmeter Module The above figure illustrates counting in a clockwise direction. Using Preset Values with Extended Mode The Counter Preset and Counter Limit functions are affected by the Count Size Configuration Bit 11. The default counter range is ±32K but may be extended to ±8M. -8M -32K Extended Normal 0 +32K Normal +8M Extended When operating in the extended range, ±8M, all Counter Preset and Counter Limit are multiplied by 256.
Chapter 5: Ladder Program Examples 47 Rate Limit Flag = 10,000Hz * 2 = 20,000Hz Application: Meter Proving The 1746sc-CTR4/8 module provides a feature that allows the user to perform meter proving functions. A typical meter proving application would include two detector sensors that are located a fixed distance from each other within a section of pipe used specifically for meter proving. The operation does not disrupt the in situ flowmeter’s operation.
SLC 500™ 50 KHz Counter / Flowmeter Module The external enable line accommodates 5 Vdc, 12 Vdc and 24 Vdc signals and is pulled low internally. The counter input accommodates 5 Vdc, 12 Vdc, 24 Vdc and up to 75 Vac inputs. Application Note: Factor Data Errors The 1746sc-CTR4/8 module provides a feature that allows the user to load M, K and Rate factor values into module memory without consuming additional control registers.
Chapter 5: Ladder Program Examples 49 In order to clear the factored data 0 must be loaded into the Preset / K Factor, Limit / M Factor and Limit / R Factor registers. After entering 0 into these registers bit 15 of the module Configuration register must be toggled from 0 to 1 and then back to 0. There are 4 registers assigned for each Channels output configuration word. The first register assigned is the channel configuration register.
SLC 500™ 50 KHz Counter / Flowmeter Module
Chapter 6 Testing YourModule Read this chapter to prevent potential problems in a systematic and controlled way. This chapter covers: • inspecting your module • disconnecting prime movers • powering up • interpreting the LED indicators • interpreting I/O error codes • troubleshooting Before testing your module, test your SLC 500 system using the procedures described in your system’s Installation & Operation Manual.
SLC 500™ 50 KHz Counter / Flowmeter Module Disconnecting Prime Movers Before testing your module, ensure that machine motion will not occur: • Disconnect motor wires at the motor starter or the motor itself. This lets you test the operation of the starter coil, verifying that the output circuit is wired correctly and functioning. • Disconnect solenoids by disengaging the solenoid valves, leaving the coils connected.
Chapter 6: Testing Your Module Interpreting The LED Indicators 53 Your module has nine LEDs: eight channel status LEDs (numbered 0–7 for channels 0–7, respectively) and one module status LED. Figure 6.1. LED block INPUT CHANNEL STATUS 0 2 1 3 MODULE CHANNEL STATUS MODULE CTR4 Operation INPUT 0 1 2 3 4 5 6 7 CTR8 The module has 9 (5-CTR4) LED’s that indicate the following… Module Status LED: 1 Green LED Indicates that the module has completed its self test and is ready.
Codes SLC 500™ 50 KHz Counter / Flowmeter Module I/O error codes appear in word S:6 of the SLC processor status file. The first two digits of the error code identify the slot (in hexadecimal) with the error. The last two digits identify the I/O error code (in hexadecimal).
Chapter 6: Testing Your Module Troubleshooting Figure 6.2. Problem resolution flowchart Check LEDs on module. Module Status LED(s) off. Module Status LED on. Module fault condition. Check to see that module is seated properly in chassis. Cycle power. Module Status LED(s) blinking. Channel Status LED(s) off. Channel Status LED(s) on. Fault condition. Channel is not enabled. Channel is enabled and working. Check channel status word bits 1415.
SLC 500™ 50 KHz Counter / Flowmeter Module ...continued from previous page. Module Status LED on. Both Count and Frequency Modes Not Working Counter Mode is not working. Fault Check Input Signal Level. Check K+M Scaling Status Bit 12 Reset K+M Scale Factors Check F Scaling Status Bit 13 Reset F Scale Factor Check Input Range Setting Config Bits 4+5. Check Counter Max, Limit, and Zero Flags. Reset Flag Bit Config.
Chapter 7 Maintaining Your Module And Ensuring Safety Read this chapter to familiarize yourself with: • preventive maintenance • safety considerations The National Fire Protection Association (NFPA) recommends maintenance procedures for electrical equipment. Refer to article 70B of the NFPA for general safety-related work practices. PreventiveMaintenance The printed circuit boards of your module must be protected from dirt, oil, moisture, and other airborne contaminants.
SLC 500™ 50 KHz Counter / Flowmeter Input Module Standing Clear Of Machinery – When troubleshooting a problem with any SLC 500 system, have all personnel remain clear of machinery. The problem may be intermittent, and the machine may move unexpectedly. Have someone ready to operate an emergency stop switch. ! CAUTION POSSIBLE EQUIPMENT OPERATION Never reach into a machine to actuate a switch.
Appendix A Floating Point Rate Mode Read this appendix to: • configure rate for floating point mode • read input words to get data • use ladder logic to create floating point value Overview Configuring Each Input Channel for Floating Point Rate The floating point rate mode allows the user to monitor rate to a higher degree of accuracy. The default mode for the counter module provides 1Hz rate resolution. The floating point mode allows the module to report rate resolution of up to 0.0001Hz.
SLC 500™ 50 KHz Counter / Flowmeter Module Input Registers - Channel Data The channel data consists of 4 words, the lower counter data value, the rate data high value, the rate data low value and the channel status data. Table A.1 - Data Word Addresses CTR8 CTR4 Scale/Limit Value I:e.0 to I:e.3 I:e.0 to I:e.3 0 Channel LSW, Rate Data High, Rate Data Low, Status Reg I:e.4 to I:e.7 I:e.4 to I:e.7 1 Channel LSW, Rate Data High, Rate Data Low, Status Reg I:e.8 to I:e.11 I:e.8 to I:e.
Appendix A: Floating Point Rate Mode Setting the Rate Limit / R Factor: The R Factor function is used to activate the floating point mode. Setting the value to -1 activates this mode. Use Bit 15 in your channel configuration word to save the R factor in the modules non-volatile memory. Figure A.3 - Rate Limit / R Factor Word Address 15 O:e.
SLC 500™ 50 KHz Counter / Flowmeter Module Module status: Status remains the same as other modes. Information may be found in Chapter 4. Ladder Logic In order to create the floating point value it necessary to join the high and low rate data words. This is accomplished using the following ladder logic.
Appendix A: Floating Point Rate Mode 63
SLC 500™ 50 KHz Counter / Flowmeter Module
Getting Technical Assistance If you need technical assistance, please review the information in Chapter 6, “Testing Your Module,” before calling your local distributor of Spectrum Controls. Note that your module contains electronic components which are susceptible to damage from electrostatic discharge (ESD). An electrostatic charge can accumulate on the surface of ordinary plastic wrapping or cushioning material.
The ENCOMPASS logo and SLC 500 are trademarks of Allen-Bradley Company, Inc. Copyright © 2000-2004, Spectrum Controls, Inc. All rights reserved. Printed in U.S.A. Specifications subject to change without notice. Publication 0300181-05 Rev. G May 2004 U.S.A. Headquarters SpectrumControlsInc. P.O.Box5533 Bellevue,WA98006 Fax:(425)641-9473 Tel: (425) 746-9481 Web Site: http://www.spectrumcontrols.com E-mail: spectrum@spectrumcontrols.