Page 1
F&eIT Series 16Bits Isolated Up-Counter Module 12 - 24VDC type CNT16-8(FIT)GY 5VDC type CNT16-8L(FIT)GY User’s Manual CONTEC CO.,LTD.
Page 2
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 Module (One of the following) ...1...
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.
Table of Contents Check Your Package..........................i Copyright ............................ii Trademarks ............................ii Table of Contents..........................iii Before Using the Product About the Module ..........................1 Features ............................1 Functions and control method by controller connected .............. 2 Customer Support ..........................4 Web Site............................
Page 5
Using the I/O Address Map Starting I/O Address ......................... 15 List of I/O Address Maps ......................... 16 Specifications Common to F&eIT Products..................20 Product Information ........................20 Bit Assignments for I/O Ports ......................22 Flow of Count Values ........................22 Operation Commands ........................
1. Before Using the Product 1. Before Using the Product This chapter provides information you should know before using the product. About the Module This product is an expansion module (device module) that up-counts pulse signals input from an external device.
1. Before Using the Product Functions and control method by controller connected The CNT16-8(FIT)GY and CNT16-8L(FIT)GY can be connected to a variety of controllers. Supported controllers Microcontroller Unit : CPU-SBxx(FIT)GY I/O Controller Module : CPU-CAxx(FIT)GY Monitoring & Control Server Unit : SVR-MMF2(FIT) Monitoring &...
Page 8
1. Before Using the Product Control method by controller connected Control using the I/O address map Ο Ο Control using the memory address map FIT Protocol Ο Control via the Windows driver * Ο API-CAP(W32) API-SBP(W32) Ο Control over the web Ο...
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 One-Year Warranty CONTEC products are warranted by CONTEC CO., LTD.
Handling Precautions CAUTION - Do not modify the module. CONTEC will bear no responsibility for any problems, etc., resulting from modifying this module. - Do not use or store the equipment in a hot or cold place, or in a place that is subject to severe temperature changes.
Page 11
1. Before Using the Product - The module contains switches that need to be properly set. Before using the module, please check its switch settings. - To avoid malfunction, please do not change the module switch settings in an unauthorized manner.
1. Before Using the Product Environment Use this product in the following environment. If used in an unauthorized environment, the module may overheat, malfunction, or cause a failure. Operating temperature 0 - 50°C Operating humidity 10 - 90%RH (No condensation) Corrosive gases None Floating dust particles...
Page 13
1. Before Using the Product CNT16-8(FIT)GY, CNT16-8L(FIT)GY...
2. Module Nomenclature and Settings 2. Module Nomenclature and Settings Nomenclature of Module Components Figure 2.1 shows the names of module components. In the figure, the indicated switch settings represent factory settings. CNT16-8(FIT)GY CNT16-8L(FIT)GY 0 1 2 3 0 1 2 3 LED indicator LED indicator 4 5 6 7...
2. Module Nomenclature and Settings LED Indicator Table 2.1. LED Indicator Name Function LED indicator Input indicator (0 - 7): ON: Indicates current flowing in the input pin GREEN (Counting pulse signal) Status LED OFF: Indicates no current flowing in the input pin (Not counting pulse signal) CNT16-8(FIT)GY, CNT16-8L(FIT)GY...
3. Connecting to an External Device 3. Connecting to an External Device Interface Connector How to Connect an Interface Connector When connecting the Module to an external device, you can use the supplied connector plug. To wire the Module, strip the sheath about 9 - 10mm from an end of the wire and insert the exposed wire into an opening.
3. Connecting to an External Device Signal Layout on the Interface Connector The Module can be connected to an external device using a 12-pin connector that is provided on the Module face. Common plus/minus COM 0--- +/-COM for input port N.C.
3. Connecting to an External Device External I/O Circuits Input section Figure 3.3 or 3.4 shows the input equivalent circuit for the interface section. The signal input section consists of an opto-isolated input (compatible with both current sink output and current source output).
Page 19
3. Connecting to an External Device Module External circuit 3k Ω Plus External common power supply 12V - 24VDC Input Optocoupler Current sink output Figure 3.5. Example of a Connection to Current Sink Output < CNT16-8(FIT)GY > Module External circuit 1.2kΩ...
4. Using the I/O Address Map 4. Using the I/O Address Map Starting I/O Address When connected to a CPU-SBxx(FIT)GY, the Module can directly receive I/O commands from the controller module. Depending on how the Device ID is set, the I/O addresses indicated below will be used exclusively by the Module.
4. Using the I/O Address Map List of I/O Address Maps CNT16-8(FIT)GY Starting address Input Products Category Rivision Data Rivision Rivision Rivision Rivision (00h) Data 3 Data 2 Data 1 Data 0 Products ID Number (01h) Interrupt Status Enable Status IRQ 9 IRQ 7 IRQ 5...
Page 22
4. Using the I/O Address Map Starting address Output (00h) (01h) Interrupt Status Enable IRQ 9 IRQ 7 IRQ 5 (02h) (04h) (0Fh) Command Command Command Command Command Command Command Command Command (10h) Data 07 Data 06 Data 05 Data 04 Data 03 Data 02 Data 01...
Page 23
4. Using the I/O Address Map CNT16-8L(FIT)GY Starting address Input Products Category Rivision Data Rivision Rivision Rivision Rivision (00h) Data 3 Data 2 Data 1 Data 0 Products ID Number (01h) Interrupt Status Enable Status IRQ 9 IRQ 7 IRQ 5 (02h) (03h) (10h)
Page 24
4. Using the I/O Address Map Starting address Output (00h) (01h) Interrupt Status Enable IRQ 9 IRQ 7 IRQ 5 (02h) (04h) (0Fh) Command Command Command Command Command Command Command Command Command (10h) Data 07 Data 06 Data 05 Data 04 Data 03 Data 02 Data 01...
Figure 4.5. Product Information < CNT16-8(FIT)GY > Revision Data [D3 - D0]: This is product update information, subject to change without notice, that is managed by CONTEC. Product Category [D7 - D4]: This is a module function classification code. For the CNT16-8(FIT)GY and CNT16-8L(FIT)GY, the code is "1h".
Page 26
4. Using the I/O Address Map Interrupt status This is a common port on which the interrupt status requested by the Module can be verified. Information on interrupt sources varies from module to module. Starting address Input Interruput Status Enable Status IRQ 9 IRQ 7...
4. Using the I/O Address Map Bit Assignments for I/O Ports The I/O ports for the counting function have command-section and data-section registers. A register can be set as follows: First, a command is issued (OUT) to a port located at starting I/O address + 16 to make the register available for setting.
4. Using the I/O Address Map Description of Input Commands Reading a Count (command 00h - 07h) By reading the contents of the READ register for a corresponding channel, this command reads a count value. By issuing the command to the output port +16 and reading the input port +17 two times, you can read low, middle, and high count values.
4. Using the I/O Address Map Status (command 12h) Command Function Data length Status 8-bit Indicates a carry-up occurred for the count on each channel. By issuing 12H to the output port +16 and reading the input port +17, you can monitor the status. The corresponding bit is set to "1"...
4. Using the I/O Address Map Description of Output Commands Initial Count Value (command 00h - 07h) The command is issued to the output port +16, and an initial count value is set on the output port +17. Because count data consists of 16 bits, count values are output two times in low, middle, and high order, 8 bits each time.
4. Using the I/O Address Map Status Reset (command 12h) Command Function Data length Status Reset 8-bit The interrupt sense sets an applicable bit to "1" when carry-up condition is detected on a given channel. When the applicable bit is "1", an interrupt signal is not generated when another carry-up condition arises.
4. Using the I/O Address Map Digital Filter (command 15h) Using this function digitally filters the signals at all input pins by means of hardware. Use it to prevent input signal noise and chattering from being detected by mistake. The level is checked at each clock sampling time. If the signal level remains the same for longer than the time set for the digital filter, the signal is treated as a valid input and the level of the PC signal is changed.
Page 34
4. Using the I/O Address Map Set Digital Filter Time Output setting data "ST4 - ST0" to the "time setting" output port to set the digital filter time. The table below lists the relationships between digital filter time and setting data. Digital Filter Time [sec] = 2 / (8 x 10 n: Setting Data (0 - 20)
4. Using the I/O Address Map Examples Pulse Count (no interrupts) Flowchart Start Set digital filter Status reset Initialization Set initial counter value Data latch command Data input Enter data Keyboard input Figure 4.12. Pulse Count (No Interrupts) CNT16-8(FIT)GY, CNT16-8L(FIT)GY...
4. Using the I/O Address Map Pulse Count (with interrupts) Flowchart Start Interrupt processing Interrupt vectors Count the number processing of interrupts Status acquiring Initialize Set an interrupt Status reset level Reset the interrupt mask Return Start couner Count value acquiring Show data End of interrupt?
Page 39
4. Using the I/O Address Map Sample Program =========================================================================== Sample program 2 DEVICE ID: Initial Data: 0000H Channel: 0 to 3ch Digital Filter 1024 usec Interrupt: IRQ5 10 times =========================================================================== #include <stdio.h> #include <conio.h> #include <dos.h> /* ----- Constant ---------------------------------------------------------- */ #define 0x0800 /* I/O address */...
5. Using the Memory Address Map 5. Using the Memory Address Map When connected to a CPU-CAxx(FIT)GY, the CNT16-8(FIT)GY, CNT16-8L(FIT)GY can be accessed by a host computer through a network. In addition, the Module can be allocated to the memory controlled by the Controller Module according to a given Device ID.
5. Using the Memory Address Map Module Information Area A module information area, which is a 128-byte (80h) area beginning with address 301000h and corresponding to a given Device ID, is where the settings for the given device are read and written. The starting address can be determined according to the following expression: Starting address = 301000h + 80h x (Device ID) Table 5.1.
Page 46
5. Using the Memory Address Map Table 5.1. Module Information Area < 2 / 3 > Access Initial Initial Address(h) Area Item Size type value(h) settings Starting address+20 Startup register Starting address+21 Status reset Starting address+22 Counter initialization Starting address+23 Preset counter value 0000 - Starting address+24...
Page 47
5. Using the Memory Address Map Table 5.1. Module Information Area < 3 / 3 > Access Initial Initial Address(h) Area Item Size type value(h) settings Starting address+58 Startup register Starting address+59 Status reset Starting address+5A Counter initialization Starting address+5B Preset counter value 0000 - Starting address+5C...
Page 48
5. Using the Memory Address Map Module-specific information Module type (category) The CNT16-8x(FIT)GY belongs to the counter module (03h) category. Module type (serial No.) The CNT16-8(FIT)GY is a counter module with a serial No. 1 (01h). The CNT16-8L(FIT)GY is a counter module with a serial No. 2 (02h). Supported functions The CNT16-8x(FIT)GY supports the basic input function (01h).
Page 49
5. Using the Memory Address Map Items common to modules Module startup register Setting the module startup option (01h) causes the device module to be started. Setting the module startup option when the module is being started causes the module to be restarted.
Page 50
5. Using the Memory Address Map Channel settings Startup register This command controls the corresponding count operation of the channel. The command controls the count operation by setting the data of corresponding channel to 01h. Setting "01h" to the setting for each channel starts counting on that channel. Setting "00h" stops counting.
Page 51
5. Using the Memory Address Map Startup register mask Use this function when you want to start or stop channels simultaneously. Write the settings and mask for CH0 - CH7 in a single write operation. Table 5.4. Startup register mask +60h Update the "startup register"...
5. Using the Memory Address Map Module Information Area The module information area, which is a 128-byte (80h) area beginning with address 300000h and corresponding to a given Device ID, is the area into which settings are read. The starting address can be determined according to the following expression: Starting address = 300000h + 80h x (Device ID) Table 5.8.
Page 53
5. Using the Memory Address Map Table 5.8. Module Information Area < 2 / 2 > Access Initial Address(h) Area Item Size type value (h) Starting address+20 Startup register Starting address+21 Status Starting address+22 Reserved None - Starting address+27 Starting address+28 Startup register Starting address+29 Status...
Page 54
5. Using the Memory Address Map Counter resolution This can be used to check the counter resolution for the CNT16-8x(FIT)GY. Digital filter setting This can be used to check the digital filter setting. Channel settings Startup register This register displays the count operating status of each channel. 00h : Stopping 01h : Operating Status...
5. Using the Memory Address Map Basic I/O Data Area The basic Input data area, which is a 128-byte (80h) area beginning with address 304000h and corresponding to a given Device ID The starting address can be determined according to the following expression: Starting address = 304000h + 80h x (Device ID) Table 5.9.
5. Using the Memory Address Map Examples Flowchart The following flowchart illustrates an example where the CNT16-8x(FIT)GY is installed at device ID: 0. Start Open processing Opened successfully? Counter module type? Digital filter setting Counter initialization Status reset Preset counter Set Module Startup in module startup register Any error in...
6. System Reference Physical Dimensions (1.2) (1.2) 0 1 2 3 4 5 6 7 Device COM 0 COM 1 CNT16-8L 25.2 64.7 [mm] Figure 6.2. Physical Dimensions CNT16-8(FIT)GY, CNT16-8L(FIT)GY...
Page 66
3-9-31, Himesato, Nishiyodogawa-ku, Osaka 555-0025, Japan Japanese http://www.contec.co.jp/ English http://www.contec.com/ Chinese http://www.contec.com.cn/ No part of this document may be copied or reproduced in any form by any means without prior written consent of CONTEC CO., LTD. [08222008] [07262004] Management No. A-40-668 [08222008_rev4] Parts No. LYDQ283...