Contec CNT-3204MT-LPE User Manual

Contec CNT-3204MT-LPE User Manual

High-speed up/down counter board for pci express low profile
Table of Contents

Advertisement

Quick Links

PC-HELPER
High-Speed Up/Down
Counter Board for PCI Express
Low Profile
CNT-3204MT-LPE
User's Guide
CONTEC CO., LTD.

Advertisement

Table of Contents
loading

Summary of Contents for Contec CNT-3204MT-LPE

  • Page 1 PC-HELPER High-Speed Up/Down Counter Board for PCI Express Low Profile CNT-3204MT-LPE User’s Guide CONTEC CO., LTD.
  • Page 2: Check Your Package

    Check Your Package Thank you for purchasing the CONTEC product. The product consists of the items listed below. Check, with the following list, that your package is complete. If you discover damaged or missing items, contact your retailer. Product Configuration List Board [CNT-3204MT-LPE] …1...
  • Page 3: Copyright

    No part of this document may be copied or reproduced in any form by any means without prior written consent of CONTEC CO., LTD. CONTEC CO., LTD. makes no commitment to update or keep current the information contained in this document. The information in this document is subject to change without notice.
  • Page 4: Table Of Contents

    Parts of the Board and Factory Defaults ..................14 Setting the Board ID .......................... 14 Plugging the Board ..........................15 Step 3 Installing the Hardware ......................... 16 Turning on the PC ..........................16 Found New Hardware Wizard Setting ....................17 Step 4 Initializing the Software ........................ 18 CNT-3204MT-LPE...
  • Page 5 Obtaining the count value ......................... 46 Obtaining the count value ......................... 46 Counter mode ............................. 46 Sampling mode ..........................47 Totalizing/line receiver counter ......................48 Sampling function ............................. 49 Sampling function ..........................49 Bus mastering ............................. 49 Interrupt (During bus mastering) ...................... 49 CNT-3204MT-LPE...
  • Page 6 ABOUT SOFTWARE About Software for Windows ........................63 Accessing the Help File ........................63 Using Sample Programs ........................64 Uninstalling the Driver Libraries...................... 65 ABOUT HARDWARE For detailed technical information ......................67 Hardware specifications..........................67 Block Diagram ............................70 CNT-3204MT-LPE...
  • Page 7 CNT-3204MT-LPE...
  • Page 8: Before Using The Product

    Possible to be used as a data recording device for LabVIEW, with dedicated libraries. < Example > - Detecting a position of the table of a machine tool - Detecting a change in weight CNT-3204MT-LPE Tool Processing thing Rack Encoder...
  • Page 9: Support Software

    With the dedicated libraries, LabVIEW applications can be created. Support Software You should use CONTEC support software according to your purpose and development environment. Windows version of counter input driver API-CNT(WDM) / API-CNT(98/PC) [Stored on the bundled disk driver library API-PAC(W32)] The API-CNT(WDM) / API-CNT(98/PC) is the Windows version driver library software that provides products in the form of Win32 API functions (DLL).
  • Page 10: Accessories (Option)

    *1 CNT-68M/50M optional cable is required separately. *2 PCB68PS-0.5P or PCB68PS-1.5P optional cable is required separately. *3 “Spring-up” type terminal is used to prevent terminal screws from falling off. Check the CONTEC’s Web site for more information on these options. CNT-3204MT-LPE...
  • Page 11: Customer Support

    You can download updated driver software and differential files as well as sample programs available in several languages. Note! For product information Contact your retailer if you have any technical question about a CONTEC product or need its price, delivery time, or estimate information. Limited Three-Year Warranty CONTEC products are warranted by CONTEC CO., LTD.
  • Page 12: Safety Precautions

    WARNING indicates a potentially hazardous situation which, if not avoided, could WARNING result in death or serious injury. CAUTION indicates a potentially hazardous situation which, if not avoided, may CAUTION result in minor or moderate injury or in property damage. CNT-3204MT-LPE...
  • Page 13: Handling Precautions

    Even when using the product continuously, be sure to read the manual and understand the contents. Do not modify the product. CONTEC will bear no responsibility for any problems, etc., resulting from modifying this product. Regardless of the foregoing statements, CONTEC is not liable for any damages whatsoever (including damages for loss of business profits) arising out of the use or inability to use this CONTEC product or the information contained herein.
  • Page 14: Environment

    (3) Store the package at room temperature at a place free from direct sunlight, moisture, shock, vibration, magnetism, and static electricity. Disposal When disposing of the product, follow the disposal procedures stipulated under the relevant laws and municipal ordinances. CNT-3204MT-LPE...
  • Page 15 1. Before Using the Product CNT-3204MT-LPE...
  • Page 16: Setup

    Using the Board under an OS Other than Windows For using the board under an OS other than Windows, see the following parts of this user’s guide. This chapter Step 2 Setting the Hardware Chapter 3 External Connection Chapter 6 About Hardware CNT-3204MT-LPE...
  • Page 17: Step 1 Installing The Software

    This section describes how to install the Driver libraries. Before installing the hardware in a PC, install "Driver Library API-PAC(W32)" from the bundled media or download and install the latest edition of this software from the CONTEC web site. Although some user interfaces are different depending on the OS used, the basic procedure is the same.
  • Page 18 (2) The API-PAC(W32) Installer window appears automatically. If the panel does not appear, run (drive letter):\AUTORUN.exe. (3) Click on the [Install Development or Execution Environment] button. CAUTION Before installing the software in Windows 2000 or later, log in as a user with administrator privileges. CNT-3204MT-LPE...
  • Page 19 (3) Click on the [Install] button. Clicking the [API-CNT] button under the “Detail” displays detailed information about API-CNT(WDM) and API-CNT(98/PC). Run the installation (1) Complete the installation by following the instructions on the screen. (2) The Readme file appears when the installation is complete. CNT-3204MT-LPE...
  • Page 20: Step 2 Setting The Hardware

    The replacing method is as follows : Standard size bracket - Remove the screws and replace it with the Standard size bracket. Low Profile size bracket Screw Use a flathead screwdriver or hexagonal spanner to undo and tighten the screws. Figure 2.1. Replacing the Bracket CNT-3204MT-LPE...
  • Page 21: Parts Of The Board And Factory Defaults

    Setting Procedure To set the board ID, use the rotary switch on the board. Turn the SW1 knob to set the board ID as shown below. BOARD ID Factory setting: (Board ID = 0) Figure 2.3. Board ID Settings (SW1) CNT-3204MT-LPE...
  • Page 22: Plugging The Board

    Be sure that the personal computer or the I/O extension unit power is turned off. Make sure that your PC or extension unit can supply ample power to all the boards installed. Insufficiently energized boards could malfunction, overheat, or cause a failure. CNT-3204MT-LPE...
  • Page 23: Step 3 Installing The Hardware

    If you remove two or more boards that have already been installed and then remount one of them on the computer, it is unknown that which one of the sets of resources previously assigned to the two boards is assigned to the remounted board. In this case, you must check the resource settings. CNT-3204MT-LPE...
  • Page 24: Found New Hardware Wizard Setting

    (2) When the model name of hardware is displayed, select “Install the software automatically [Recommended]” and then click on the “Next” button. The device is automatically installed, and processing is completed. You have now finished installing the initial setting of Hardware. CNT-3204MT-LPE...
  • Page 25: Step 4 Initializing The Software

    - CNT-3204MT-LPE (2) The installed hardware appears under the CONTEC Devices node. Open the CONTEC Devices node and select the device you want to setup (the device name should appear highlighted). Click [Properties]. CNT-3204MT-LPE...
  • Page 26 The initial device name that appears is a default value. You can use this default name if you wish. Make sure that you do not use the same name for more than one device. You have now finished installing the initial setting of Software. CNT-3204MT-LPE...
  • Page 27: Step 5 Operation Checks

    Set the board in the default factory. To connect an external device, see Chapter 3 “External Connection”. Starting the Diagnosis Program Open the “Properties” page of the device that was used for the software initialization, and press the [Diagnosis] button. CNT-3204MT-LPE...
  • Page 28: Setting Counter Operation Conditions

    The Counter Mode setting dialog box appears. Click on [Counter Mode]. (2) Set the counter mode for channel 0. Leave the other settings at factory defaults. Click on [Use Same Mode] to make the same settings for the other channels. Click on [Use Same Mode]. CNT-3204MT-LPE...
  • Page 29 2. Setup (3) Click on the [End] button to finish condition setting. Click on [End]. CNT-3204MT-LPE...
  • Page 30 [Zero Clear] Clears the counter to zero. [Counter Stop] Stops the counter. (1) Click on [Counter Start]. [Click on [Counter Start]. (2) The counter value of each channel is displayed along with its status (ALM, AI, U, A, B, Z). CNT-3204MT-LPE...
  • Page 31 The frequency of test pulse is fixed at 100 kHz. The board can also internally output test pulses to each counter channel without supplying them to the outside. In that case, the board outputs two-phase pulses to all channels at the same time. CNT-3204MT-LPE...
  • Page 32 The diagnosis program performed includes "Board presence/absence check", “interrupt test”, "driver file test", " Board setting test". CAUTION Before executing diagnosis report output, unplug the cable from the board. Click on [Diagnosis Report…] CNT-3204MT-LPE...
  • Page 33: Setup Troubleshooting

    (2) A diagnosis report is displayed as shown below. * The name of the board you have just added is displayed. - CNT-3204MT-LPE Setup Troubleshooting Symptoms and Actions The board works with the Diagnosis Program but not with an application.
  • Page 34: External Connection

    KOGYO CO., LTD.] or equivalent - Compatible connector HDRA-E68MA1 [HONDA TSUSHIN KOGYO CO., LTD.] or equivalent * Please refer to chapter 1 for more information on the supported cable and accessories. Figure 3.1. Interface connector (CN1) and used connector CNT-3204MT-LPE...
  • Page 35 - Cable 68conductor Shield cable Cable length : PCB68PS-0.5P 500mm PCB68PS-1.5P 1500mm Conductor size : AWG#30 - Connector used 68-pin 0.8mm-pitch connector HDRA-E68MA1[HONDA TSUSHIN KOGYO CO., LTD.] or equivalent Figure 3.2. Connecting the interface connector (CN1) and optional cables CNT-3204MT-LPE...
  • Page 36: Connector Pin Assignment

    The control input can serve as the general-input, counter start / stop, preset and zero-clear. The control output can serve as the general-output, count match, abnormal input error and figital filter error. Supply-capable current is 500mA (Max.). Figure 3.3. Pin Assignments of Interface Connector (CN1) CNT-3204MT-LPE...
  • Page 37 The control input can serve as the general-input, counter start / stop, preset and zero-clear. The control output can serve as the general-output, count match, abnormal input error and figital filter error. Supply-capable current is 500mA (Max.). Figure 3.4. Pin Assignments on 50-pin Connector Side CNT-3204MT-LPE...
  • Page 38: How To Connect The Counter Input Signal

    *1: Connector pin number on the board. Example Connection for Counter Input Circuit *1: The pull-up pins are PUP1 for the counter input signal and PUP2 for the control input signal. Figure 3.5. Connection when it is pull-up by external 5-V power (Counter Input) CNT-3204MT-LPE...
  • Page 39 The connection cable length should be within 1.5 m. To prevent noise from causing a malfunction, arrange the connection cable as away from any othersignal conductor or noise source as possible. Please use the shielded cable to meet “CE EMC Directive”. CNT-3204MT-LPE...
  • Page 40: Example Connection With A Rotary Encoder

    When the control input is set as the counter stop input, the counter can be stopped at alarm output. Pin numbers in the diagram shows those of connector on the board. Figure 3.9. Example Connection with a Linear Scale (channel 0) CNT-3204MT-LPE...
  • Page 41: Connecting The Control Signal Input/Output

    *1 : The pull-up pins are PUP1 for the counter input signal and PUP2 for the control input signal. Figure 3.10. Connection when it is pull-up by external 5-V power (Control input DI0, DI1, DI2, DI3, CLKIN, STARTIN, STOPIN) CNT-3204MT-LPE...
  • Page 42 The connection cable length should be within 1.5 m. To prevent noise from causing a malfunction, arrange the connection cable as away from any othersignal conductor or noise source as possible. Please use the shielded cable to meet “CE EMC Directive”. CNT-3204MT-LPE...
  • Page 43 High- and low-level hold times of at least 50 nsec are required to detect an edge of the signal. HIH : High-level hold time 50nsec (Min.) HIL : Low-level hold time 50nsec (Min.) Figure 3.13. Control input signals CNT-3204MT-LPE...
  • Page 44: Connection Of A Control Output

    Control output circuit and its sample connection Remote device Board Internal LVTTL level output TTL level input circuit Ground Ground Figure 3.14. Sample connection to control output circuit (DO0 - DO3, CLKOUT, STARTOUT, STOPOUT) CAUTION Please use the shielded cable to meet “CE EMC Directive”. CNT-3204MT-LPE...
  • Page 45 3. External Connection CNT-3204MT-LPE...
  • Page 46: Functions

    The minimum phase difference between phases-A and B is 25 nsec. Counting is not performed normally if the phase difference is less than 25 nsec. Figure 4.1. Example counting during 2-phase input CNT-3204MT-LPE...
  • Page 47: Single-Phase Input

    (phase-A/UP) while the gate control signal (phase-B/DOWN) goes high and stops counting while the gate control signal goes low. Figure 4.3. Example counting during single-phase input with gate control attached CNT-3204MT-LPE...
  • Page 48: Multiplication Of Count Input

    Phase-Z (Phase-Z/CLR) Count value When decremental counting in the CW direction is set, the board performs decremental counting at the rising edge of the phase-A signal while the phase-B input remains low. Figure 4.5. Example counting during synchronous clear CNT-3204MT-LPE...
  • Page 49: Asynchronous Clear

    Figure 4.7. Phase-Z enable frequency (Positive logic) CAUTION The initial setting is “only the next phase-Z input is enabled once”. Phase-Z (negative logic) is enabled while the phase-Z input goes low. When the phase-Z/CLR input is not used, be sure to disable the phase-Z input. CNT-3204MT-LPE...
  • Page 50: Control Of A Counter

    Sampling start/stop When the counter start trigger is used for starting sampling, the board starts counting and sampling synchronously. When the counter stop trigger is used for stopping sampling, the board stops counting and sampling synchronously in the same way. CNT-3204MT-LPE...
  • Page 51: Preset

    When the control input pin is used for presetting, it cannot be used for the counter start/stop, zeroclear, or general-purpose input. Count match The counter is preset when the count value matches the value in comparison register 0 or 1. CNT-3204MT-LPE...
  • Page 52: Zero-Clear

    The preset register is a 32-bit register to load the value in the preset register to the counter when presetting occurs. Comparison register 0, Comparison register 1 These are 32-bit registers. A variety of events can occur when the counter value matches the value in comparison register 0 or 1. CNT-3204MT-LPE...
  • Page 53: Obtaining The Count Value

    A one-shop pulse can be output to the control input signal at an occurrence of a count match or error. Counter start Counter stop Pulse input signal Sampling clock Count value Sampling value Nothing Nothing Nothing Nothing Figure 4.9. Timing chart (Counter mode) CNT-3204MT-LPE...
  • Page 54: Sampling Mode

    Pulse input signal Sampling clock Count value Sampling value Nothing Nothing Figure 4.10. Timing chart (Counter-asynchronous sampling mode) Sampling start Sampling stop Pulse input signal Sampling clock Count value Sampling value Nothing Figure 4.11. Timing chart (Counter- synchronous sampling mode) CNT-3204MT-LPE...
  • Page 55: Totalizing/Line Receiver Counter

    Totalizing counter mode Pulse input signal Sampling clock Count value Sampling value Nothing Line receiver counter mode Pulse input signal Sampling clock Count value Sampling value Nothing Figure 4.12. Totalizing/line receiver counter CNT-3204MT-LPE...
  • Page 56: Sampling Function

    If transfer halts due to an error such as not being able to obtain bus access in time to perform a transfer, this product halts the transfer and generates the transfer completion interrupt. Whether or not an error has occurred can be determined by checking the status. CNT-3204MT-LPE...
  • Page 57: Status, Count

    The 32-bit or 64-bit transfer count can be obtained by using the relevant API-CNT(98/PC) function in API-PAC(W32). The transfer count is obtained as the number of data items (per channel) which have been transferred to the memory area for the user application. CNT-3204MT-LPE...
  • Page 58: Control Of A Sampling

    Although the sampling clock can be set as fast as 50nsec, this is for sampling of one channel only. If the number of sampled channels is greater, the minimum sampling clock period becomes the number of sampling channels x 50nsec. Example: Minimum sampling clock for 4-channel sampling = 4 x 50 nsec = 200 nsec CNT-3204MT-LPE...
  • Page 59: Hardware Event

    The pulse width can be set by software to 10µsec, 1msec, 10msec, or 100msec. When using the control output signal as a general-purpose output, the output becomes a level output and the above hardware events cannot be assigned. The logic polarity of the output signal can be set by software. CNT-3204MT-LPE...
  • Page 60: Control Input Signal

    When the control input signal is set to counter start/stop, the control input pin serves as the external trigger input pin for counter start/stop. The rising or falling edge of the signal can be selected for each of the counter start and counter stop. CNT-3204MT-LPE...
  • Page 61: Control Output Signal

    The logic polarity can be switched between positive and negative. Digital filter error A one-shot pulse is output to indicate a digital filter error if a pulse faster than the digital filter time setting is input. The logic polarity can be switched between positive and negative. CNT-3204MT-LPE...
  • Page 62: Count Match

    - A one-shot pulse is output with count value = comparison register 1. Counter start Event at (1) (Agrees with comparison register 0) - A one-shot pulse is output with count value = comparison register 0. Figure 4.13. Example 1 CNT-3204MT-LPE...
  • Page 63 Check the interrupt status and, if COMP0 contains 1, set comparison register 0 to 300. Counter - Reset COMP0 to 0. *2 start *1 Time required between events: About 5 ms (depending on the system configuration) *2 COMP0 :Count match(register 0)Status COMP1 :Count match(register 1)Status CNT-3204MT-LPE...
  • Page 64: Counter Error

    When the signal is less than 200 nsec, a filter error is reported. Phase-A/Phase-B input signal When the signal is not less than 200 nsec, counting is performed normally. Phase-A/Phase-B input signal 100nsec Filter source clock Figure 4.16. Filter error (Set to 0.2 µsec) CNT-3204MT-LPE...
  • Page 65 Phase-A input Phase-B input No abnormal input error is reported when the phase difference is longer than the filter source clock cycle. Phase-A input Phase-B input Filter source clock Figure 4.17. Abnormal input error CNT-3204MT-LPE...
  • Page 66: Sampling Output Signal

    This outputs the sampling stop trigger as a one-shot pulse signal (100nsec) with negative logic polarity. The logic polarity and pulse width cannot be modified. Sampling clock output signal This outputs the sampling clock trigger as a one-shot pulse signal (100nsec) with negative logic polarity. The logic polarity and pulse width cannot be modified. CNT-3204MT-LPE...
  • Page 67: Status Input

    The counter is set to [1] when decremented from 0h - FFFFFFFFh. Count match A count match (to register 0), count match (to register 1), incremental count match, or decremental count match for each channel can be checked by the status. CNT-3204MT-LPE...
  • Page 68: Other Functions

    If the level changes at a frequency shorter than the set time, the level change is ignored and the input is not counted correctly. Timer The timer can generate an interrupt at software-set intervals. The setting range is 1 - 6553 msec. (in 1 ms increments). CNT-3204MT-LPE...
  • Page 69 4. Functions CNT-3204MT-LPE...
  • Page 70: About Software

    From the Start menu, click "CONTEC API-PAC(W32)" - "API-TOOL(WDM) HELP". When this link does not exist, From the Start menu, click "CONTEC API-PAC(W32)" - "API-CNT(WDM)" - "API-CNT(WDM) HELP". * For the API-CNT(98/PC) driver, From the Start menu, click "CONTEC API-PAC(W32)" - "API-CNT(98/PC)" - "API-CNT HELP". CNT-3204MT-LPE...
  • Page 71: Using Sample Programs

    (1) Click on the [Start] button on the Windows taskbar. (2) For the API-CNT(WDM), from the Start Menu, go to “Programs”, and select the sample program you wish to launch from the list of “CONTEC API-CNT(WDM)”. (3) A sample program is invoked.
  • Page 72: Uninstalling The Driver Libraries

    Use [My Computer] - [Control Panel] - [Programs and Features] to uninstall the development environment. In case of API-***(WDM), select [CONTEC API-***(WDM) VerX.XX (Develop)] and then click [Uninstall]. * "***" contains the driver category name (AIO, CNT, DIO, SMC, etc.).
  • Page 73 5. About Software CNT-3204MT-LPE...
  • Page 74: About Hardware

    This chapter provides hardware specifications and hardware-related supplementary information. For detailed technical information For further detailed technical information (“Technical Reference” including the information such as an I/O map, configuration register, etc.), visit the Contec's web site (http://www.contec.com/support/) to call for it. Hardware specifications Tables 6.1 list the hardware specifications of the board.
  • Page 75 = 8mA(Max.) = -8mA(Max.) Bus master DMA channel 1 channel Transfer bus width 32-Bit width Transfer data length 8 PCI Words length (Max.) Transfer rate 80MB/sec (Max.133MB/sec) FIFO 1K-DWord Scatter/Gather function 64MB Interrupt event Bus master event (7 points) CNT-3204MT-LPE...
  • Page 76 VCCI Class A, CE Marking (EMC Directive Class A, RoHS Directive) *1 Please use the shielded cable to meet “CE EMC Directive”. Board Dimensions 121.69(L) [mm] The standard outside dimension (L) is the distance from the end of the board to the outer surface of the slot cover. CNT-3204MT-LPE...
  • Page 77: Block Diagram

    6. About Hardware Block Diagram FIFO Master Command setting register Control Logic Counter read register 32 bit counter Initial value storage register Comparison setting register Direct Read Each control register External control signal Sampling control Figure 6.1. Block Diagram CNT-3204MT-LPE...
  • Page 79 CONTEC CO., LTD August 2017 Edition 3-9-31, Himesato, Nishiyodogawa-ku, Osaka 555-0025, Japan https://www.contec.com/ No part of this document may be copied or reproduced in any form by any means without prior written Consent of CONTEC CO., LTD. [08252017] [03172006] Management No. A-51-232 [08252017_rev5] Parts No.

Table of Contents