Thank you for purchasing the CONTEC product.
The product consists of the items listed below.
Check, with the following list, t hat your packa ge is complete. If yo u discover dam aged or missi ng items,
contact your retailer.
Product Configuration List
- Module (One of the following) ...1
[CNT16-8(FIT)GY, or CNT16-8 L(FIT)GY]
- First Step Guide …1
- CD-ROM [F&eIT Series Setup Disk] *1 …1
- Interface connector plug ...1
*1 The CD-ROM contains various software and User’s Manual (this manual)
0123
4567
6
7
5
040
Device
4
1
ID
3
2
COM 0
NC
0
1
2
3
COM 1
NC
4
5
6
7
CNT16-8L
Module
Interface connector plug
First step guide
CD-ROM
[F&eIT Series Setup Disk]
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
i
Page 3
Copyright
Copyright 2004 CONTEC CO., LTD. ALL RIGHTS RESERVED.
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 c urre nt t he i n formation contained in this
document. The information in this document is subject to change without notice.
All relevant issues hav e be en consid e red in th e prep ar atio n of th is do cu men t. Sh ould yo u no tic e an
omission or any questionable item in this document, please feel free to notify CONTEC CO., LTD.
Regardless of the foregoing statement, CONTEC assumes no responsibility for any errors that may
appear in this document or for results obtained by the user as a result of using this product.
Trademarks
F&eIT is a registered trademark or trademark of CONTEC CO., LTD. Other company and product
names that are referred to in this manual are generally trademarks or registered trade trademark.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
ii
Page 4
Table of Contents
Check Your Packag e............................................................................................................................ i
Copyright ............................................................................................................................................ ii
Block Diagra m ..................................................................................................................................57
Specificatio n s.................................................................................................................................... 58
Physical Di men si ons......................................................................................................................... 60
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
iv
Page 6
1. Before Using the Product
1. Before Using the Product
This chapter provides information you should know before using the product.
About theModule
This product is an expansio n module (device m odule) that up- counts pulse s ignals inpu t from an exter nal
device. The product is used i n combinati on with the I/ O controller module < CPU- CAxx(FIT)GY > ( *1)
or microcontroller unit < CPU-SBxx(FIT)GY > (*1) in the F&eIT Series.
Each < CNT16-8(FIT)GY > module can count a maximum of eight pulse signals. The pulse signals are
input via opto-couplers. The external power supply can be in the range 12 - 24 VDC.
The < CNT16-8L(FIT)GY > has the same coun t funct ion as t he < CNT16- 8(FIT )GY > but op erate s on a
5 VDC external power supply.
Please read this manual carefully to create application programs and configure the system, such as
setting the switches and connecting it to external devices.
*1 The "x" in a model code represents a single digit (or no digit) indicating different products. (The
same convention applies below).
Features
- Performs a 16-bit up-count for eight channels.
- Isolated from each other by an opto-coupler, offering good noise immunity.
- A digital filter is included to prevent miscounting due to chattering on the input pulses.
- A rotary switch allows you to set device IDs to help you keep track of device numbers.
- Like other F&eIT series products, the module has a 35mm DIN rail mounting mechanism as
standard. A connection to a controller module can be effected on a lateral, stack basis in a unique
configuration, which perm its a s imple, smar t system con figur ati on wi thout t he nee d for a back plane
board.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
1
Page 7
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 & Control Server Unit : SVR-MMF(FIT)GY
Check each controller to which the module can be connected as well as the method of controlling the
module when conn ec ted to th at co nt ro ll er .
Connections to controllers
Y
Y
G
G
)
)
T
T
I
I
F
F
(
(
x
x
x
B
O: Permitted
×: Not permitted
CNT16-8(FIT)GYΟΟΟΟ
CNT16-8L(FIT)GYΟΟΟΟ
Device ID setting range0 - 7 0 - 70 - 7 0 - 7
S
-
U
P
P
C
C
F
x
M
A
C
M
-
-
U
R
V
S
Y
)
G
)
T
I
T
I
F
F
2(
(
F
M
M
-
R
V
S
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
2
Page 8
1. Before Using the Product
Control method by co n tro lle r co n nec te d
Y
Y
G
G
)
)
T
T
I
I
F
F
(
(
x
x
x
B
S
-
U
P
P
C
Control using the I/O address mapΟ
Control using the memory address mapΟ
FIT ProtocolΟ
Control via the Windows driver *
Control over the web
(as set from within the browser)
* The API-SBP(W32) is included in the development kit [DTK-SBxx(FIT)GY]; the other drivers are bundled with each
controller.
API-CAP(W32)Ο
API-SBP(W32)Ο
C
x
A
C
-
U
R
V
S
ΟΟ
F
M
M
-
Y
)
G
)
T
I
T
I
F
F
2(
(
F
M
M
-
R
V
S
Control using the I/O address map
When connected to the CPU- SBxx (F IT) GY , th e modul e can receive I/O instructions directly from the
controller module. For details, see Chapter 4 “Using the I/O Address Map”.
Control using the memory address map
When connected to the CPU- CAxx ( FI T)G Y, th e mod ule can be accessed from the host computer over
the network. The module is assigned with its device ID in the memory managed by the controller
module. The application running on the host computer controls the module by reading/writing the
memory managed by the controller module. For details, see Chapter 5 “Using the Memory Address
Map”.
Control via the Windows driver
For the functions and settings available when using the Windows driver, refer to the reference manual
and online help for each module.
Control over the web
You can monitor collected data and manage the log over t he w eb. You can use your familiar browser to
easily make various settings. For details, refer to the reference manual for the SVR-MMF2(FIT),
SVR-MMF(FIT)GY.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
3
Page 9
1. Before Using the Product
Customer Support
CONTEC provides the following s upport services fo r you to use CONTEC products more efficiently and
comfortably.
Web Site
Japanese http://www.contec.co.jp/
English http://www.contec.com/
Chinese http://www.contec.com.cn/
Latest product information
CONTEC provides up-to-date information on products.
CONTEC also provides product manuals and various technical documents in the PDF.
Free download
You can download updated driver software a nd diff erenti al files as we ll as sample pr ograms available i n
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. to be free from defects in material and
workmanship for up to one year from the date of purchase by the original purchaser.
Repair will be free of char ge only w hen thi s device is ret urned fr eight pr epaid with a c opy of t he origi nal
invoice and a Return Merchandise Authorization to the distributor or the CONTEC group office, from
which it was purchased.
This warranty is not applicable for scratches or normal wear, but only for the electronic circuitry and
original products. The warranty is not applicable if the device has been tampered with or damaged
through abuse, mistreatment, neglect, or unreasonable use, or if the original invoice is not included, in
which case repairs will be considered beyond the warranty policy.
How to Obtain Service
For replacement or repair, return the device freight prepaid, with a copy of the original invoice. Please
obtain a Return Merchandise Authorization number (RMA) from the CONTEC group office where you
purchased before returning any product.
* No product will be accepted by the CONTEC group without the RMA number.
Liability
The obligation of the warrantor is solely to repair or replace the product. In no event will the warrantor
be liable for any incidental or consequential damages due to s uch defec t or consequence s that arise from
inexperienced usage, misuse, or malfunction of this device.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
4
Page 10
1. Before Using the Product
Safety Precautions
Understand the following definitions and precautions to use the product safely.
Safety Information
This document provides safety information u sing the foll owing sym bols to prevent a ccidents res ulting in
injury or death and the destruc tion of equi pment and res ources. Under stand the mean ings of these la bels
to operate the equipment safely.
DANGER
WAR NI NG
CAUTION
DANGER indicates an imminently hazardous situation which, if not avoided, will
result in death or serious injury.
WARNING indicates a potentially hazardous situation which, if not avoided, could
result in death or serious injury.
CAUTION indicates a potentially hazardous situation which, if not avoided, may
result in minor or moderate injury or in property damage.
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.
(Operating temperature range: 0 - 50°C)
- Do not use or store the equipment in a place subject to direct sunlight or near a heating device,
such as a stove.
- Do not use or store the equipment in a dusty or humid place.
(Operating humidity range: 10 - 90%RH, No cond ens ation )
- As this product contains precision electronic components, do not use or store in environments
subject to shock or vibration.
- Do not use or store the product near equipment genera ting a strong m agnetic field or radio waves.
- If you notice any strange odor or overheating, please unplug the power cord immediately.
- In the event of an abnormal condition or malfunction, please consult the dealer from whom the
equipment was purchased.
- To avoid electric shock, please do not touch the system with a wet hand.
- Do not open the module casing. CONTEC will disclaim any responsibility for equipment whose
casing has been opened.
- To prevent damage, please do not subject the module to impact or bend it.
- To prevent contact malfunction, please do not touch the metallic pins on the external module
connector.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
5
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.
- Do not operate the device module when the power for the Controller Module is on.
To avoid malfunction, please be sure to turn off the power for the Controller Module.
FCC PART 15 Class A Notice
NOTE
This equipment has been tested and found to comply with the limits for a Class A digital
device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable
protection against harmful interference when the equipment is operated in commercial
environment.
This equipment generates, uses, and can radiate radio frequency energy and, if not installed
and used in accordance with the instruction manual, may cause harmful interference to radio
communications. Operation of this equipment in a residential area is likely to cause harmful
interference at his own expense.
WAR N ING T O USE R
Change or modifications not expressly approved the manufacturer can void the user's
authority to operate this equipment.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
6
Page 12
1. Before Using the Product
Environment
Use this product in the following environm ent. If used in an u nauthorize d environm ent, the module m ay
overheat, malfunction, or cause a failure.
Operating temperature
0 - 50°C
Operating humidity
10 - 90%RH (No condensation)
Corrosive gases
None
Floating dust particles
Not to be excessive
Inspection
Inspect the product periodically as follows to use it safely.
- Check that the ventilation slit has no obstruction and
has no dust or foreign matter adh ering.
0123
4567
6
7
5
040
Device
4
1
ID
3
2
COM 0
NC
0
1
2
3
COM 1
NC
4
5
6
7
CNT16-8L
Storage
When storing this product, keep it in its original pa ck ing form.
(1) Put the module in the storage bag.
(2) Wrap it in the packing material, then put it in the box.
(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.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
7
Page 13
1. Before Using the Product
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
8
Page 14
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
LED indicator
Input
Device
COM 0
COM 1
NC
NC
0123
4567
6
5
4
ID
3
2
0
1
2
3
4
5
6
7
CNT16-8
7
040
1
Device ID
Input
LED indicator
0123
4567
Device
ID
COM 0
NC
0
1
2
3
COM 1
NC
4
5
6
7
CNT16-8L
6
7
5
040
4
1
3
2
Device ID
Figure 2.1. Names of Module Components
Setting a Device ID
The controller module distinguishes and keeps track of the modules that are c onnecte d to it by ass igning
device IDs to them. Each module, therefore, should be assigned a unique ID.
A Device ID can be assigned in a 0 - 7 range, so t hat a m a ximum of eight modules can be distinguis hed.
The factory setting for the Device ID is [0].
Setup Method
A Device ID can be set by turning the rotary switch that is located on the module face.
A Device ID can be assigned by turning the switch.
6
7
5
4
3
040
1
Factory setting:
2
(Device ID = 0)
Device
ID
Figure 2.2. Setting a Device ID
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
9
Page 15
2. Module Nomenclature and Settings
LED Indicator
Table 2.1. LED Indicator
Name Function LED indicator
ON: Indicates current flowing in the input pin
(Counting pulse signal)
OFF: Indicates no current flowing in the input
pin (Not counting pulse signal)
Status LED
Input indicator (0 - 7):
GREEN
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
10
Page 16
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 ab out 9 - 10mm from an end of the wire an d insert the e xposed wire
into an opening. Tighten th e sc rew to fas ten th e in se rted wi re. App lic ab le wires a re A WG2 8 - 16.
0123
4567
Device
ID
COM 0
NC
0
1
2
3
COM 1
NC
4
5
6
7
CNT16-8L
Turn the screw to fasten the wire.
6
7
5
040
4
1
3
2
- Connector used:
- Applicable plug (bundled):
9 - 10mm
3.81mm pitch, 12-pin type, 8.0A rated current
MC1,5/12-GF-3,81 [made by Phoenix Contact Corp.]
Front screw type with connector stopper flange
FRONT-MC 1,5/12-STF-3,81 [made by Phoenix Contact Corp.]
Applicable wire: AWG28 - 16
Figure 3.1. Connecting an Interface Connector and Connectors That Can Be Used
CAUTION
Removing the connector plug by grasping the cable can break the wire.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
11
Page 17
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.
COM 0--- +/-COM
N.C.
0 --- IN 0
1 --- IN 1
2 --- IN 2
3 --- IN 3
COM 1--- +/-COM
N.C.
4 --- IN 4
5 --- IN 5
6 --- IN 6
7 --- IN 7
Common plus/minus
for input port
Pulse input: 4points
Common plus/minus
for input port
Pulse input: 4points
Figure 3.2. Signal Layout on the Interface Connector
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
12
Page 18
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 o f an opto-i solate d inpu t (com patible wi th both c urre nt sink ou tput a nd
current source output). An external power s upp ly is th erefore requ ired to driv e the inpu t section of this
module. The power requirement for the < CNT16-8(FIT)GY > is about 8 mA per input channel at
24 VDC (about 4 mA at 12 VDC) and for t he < CNT16- 8L(FIT)GY > i s about 4 m A per i nput cha nnel at
5 VDC.
External circuitModule
Vcc
3kΩ
Optocoupler
Optocoupler
3kΩ
+/-
common
Input
pin
Input
pin
Input contact
point
Input contact
point
External
power supply
12V - 24VDC
Figure 3.3. Input Circuit < CNT16-8(FIT)GY >
External circuitModule
Vcc
1.2kΩ
+/-
common
Input
Optocoupler
1.2kΩ
Optocoupler
pin
Input
pin
Input contact
point
Input contact
point
Figure 3.4. Input Circuit < CNT16-8L(FIT)GY >
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
External
power supply
5VDC
13
Page 19
3. Connecting to an External Device
External circuitModule
Vcc
3kΩ
Optocoupler
Plus
common
Input
pin
Current sink
output
External
power supply
12V - 24VDC
Figure 3.5. Example of a Connection to Current Sink Output < CNT16-8(FIT)GY >
External circuitModule
Vcc
1.2kΩ
Optocoupler
Plus
common
Input
pin
Current sink
output
External
power supply
5VDC
Figure 3.6. Example of a Connection to Current Sink Output < CNT16-8L(FIT)GY >
External circuitModule
Vcc
3kΩ
Optocoupler
Minus
common
Input
pin
Current
source
output
External
power supply
12V - 24VDC
Figure 3.7. Example of a Connection to Current Source Output < CNT16-8(FIT)GY >
External circuitModule
Vcc
1.2kΩ
Optocoupler
Minus
common
Input
pin
Current
source
output
External
power supply
5VDC
Figure 3.8. Example of a Connection to Current Source Output < CNT16-8L(FIT)GY >
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
14
Page 20
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.
Because the address bus on which I/O address space is allocated is not fully decoded in 16 bits, four
starting I/O addresses exist for each Device ID.
If the Device ID is set to 0h, one of the four addresses (0800h, 0840h, 0880h , or 08C0h ) will be us ed as
a starting I/O address.
* ADR is the starting I/O address for the CNT16-8(FIT)GY and CNT16-8L(FIT)GY.
Product Category Rivision Data
Revision
Data3
Interruput Status
Revision
Data2
IRQ 9
(0)
Revision
Data1
IRQ 7
(0)
Revision
Data0
IRQ 5
(0)
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
20
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
I/O
address D7 D6 D5 D4 D3 D2 D1 D0
Input
+2
(02h)
Enable
(0)
Status
(0)
0 0 0
Interruput Status
IRQ 9
(0)
IRQ 7
(0)
IRQ 5
(0)
Figure 4.6. Interrupt Status
- Enable [D7]:
This bit verifies the interrupt source enabled/disabled status.
The value "1" indicates that a hardware interrupt on the controller module is enabled.
- Status [D6]:
This bit indicates an interrupt request status in the module. When a n interrupt event ha s occurred i n
the module and IRQ5, IRQ7, or IRQ9 is "1", this bit will also be "1".
- IRQ* [D2 - D0]:
These bits allow you to verify the interrupt level that is currently set. The current interrupt level is
indicated as "1".
Setting an interrupt level
Starting
I/O
address D7 D6 D5 D4 D3 D2 D1 D0
Output
+2
(02h)
Enable
(0)
Status
(0)
0 0 0
Interruput Status
IRQ 9
(0)
IRQ 7
(0)
IRQ 5
(0)
Figure 4.7. Setting an interrupt level
- Enable [D7]:
This bit enables an interrupt source. Setting the bit to “1” enables hardware interrupts to the
controller module.
- IRQ* [D2 - D0]:
The interrupt level used by the module is set in these bits. Setting any of t he IRQs t o “1” make s the
signal on that IRQ active upon reception of an interrupt request.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
21
Page 27
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. For output, data is assigned (OUT) to the register
at port +17; for input, the +17 port is read. In other words, for both input and output, a command is
issued (OUT) to the output port +16 to make registers available for setting, and either data is issued
(OUT) to the port +17 to set the register or the register is read at the +17 port.
When setting a register even when using the same command, the command should be output to the
output port +16 each time.
Figures 4.8. and 4.9. show I/O port bit assignments.
15h Not allowed ST4ST3ST2ST1 ST0Digital filter 5-bit
Data
Size
Data
Size
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
23
Page 29
4. Using the I/O Address Map
Description of Input Commands
Reading a Count (command 00h - 07h)
By reading the contents of the R EA D regi ste r fo r a co rres pon ding c hann e l, th is co mman d reads a co unt
value. By issuing the command to the output port +16 and reading the input port +17 two times, you ca n
read low, middle, and high count values.
In the initial state, the contents of the READ register are undefined.
Following are programs that read a count value from CH0:
Microsoft C
In this case, the count value latch for CH0 must be pre-set to [1].
Interrupt mask (command 11h)
Command D7 D6 D5 D4 D3 D2 D1 D0 Function Data length
This command allows you to monitor the status of the current interrupt mas k tha t wa s se t us ing the
interrupt mask command. CH7 - CH0 are associated with channels. When these bits are [1], the interrupt
is masked, and no interrupt signals are output.
You can monitor the masking status by issuing the value 15h to the output port +16 and by reading the
input port +17.
Initial state: FFH
Microsoft QBASIC
11h CH7 CH6 CH5CH4CH3CH2CH1 CH0Interrupt masuk 8-bit
0: Not masked
1: Masked
CAUTION
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
24
Page 30
4. Using the I/O Address Map
Status (command 12h)
Command D7 D6 D5 D4 D3 D2 D1 D0 Function Data length
12h CH7 CH6 CH5 CH4 CH3 CH2 CH1 CH0Status 8-bit
Indicates a carry-up occurred for the count on each channel.
By issuing 12H to the output po rt +16 and re ading th e inp ut po rt +17 , you can monito r the status . Th e
corresponding bit is set to "1" when a carry-up occurs on a channel (CH7 - CH0).
0 : No carry
1 : Carry
CAUTION
- Initial state: 00h
- If an interrupt is generated with the interrupt option set, and if one of the bits in CH7 - CH0 is set to
[1], before another interrupt can be generated, the affected sense bit must be reset. For a description
of how to reset a sense bit, see "Sense Reset" on output ports.
Count control (Command 14h)
Command D7 D6 D5 D4 D3 D2 D1 D0 Function Data length
Count operating status of each channel is displayed.
You can monitor the operaing status by issuing the value 14h to the output port +16 and by reading the
input port +17.
0 : Stopping
1 : Operating
CAUTION
Initial state: 00h
Digital Filter (command 15h)
Command D7 D6 D5 D4 D3 D2 D1 D0 Function Data length
15h 0 0 0 ST4ST3ST2ST1ST0Digital Filter 5-bit
This can be used to check the settings for the digital filter.
Output 15H to output port +16 and read input port +17.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
25
Page 31
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 o f 16 bits, count values ar e outp ut tw o tim es in l ow, m iddle, and high order ,
8 bits each time. When the third (high 8 bits) count value is output, data consisting of 16 bits is loaded
simultaneously by the counting process.
Following are program examples that set a count value 100(64h) on CH0:
Microsoft C
outp( ADR+16, 0x0 ); OUT ADR+16, &H0
outp( ADR+17, 0x64 ); OUT ADR+17, &H64
outp( ADR+17, 0x0 ); OUT ADR+17, &H0
Count Data Latching (command 10h)
Command D7 D6 D5 D4 D3 D2 D1 D0 Function Data length
10h CH7 CH6 CH5CH4CH3CH2CH1 CH0Count data
This command latches a count value on a corresponding channel to the READ register.
The command issues the value "10h" to the output port +16, and set s a dat a latch on th e outp ut port + 17.
These bits are associated with the respective channels. The command latches the count value by setting the
applicable bit to "1". All channels can be latched simultaneously by setting all applicable bits to "1".
The initial condition is no-latch (00h).
Microsoft QBASIC
CAUTION
latching
8-bit
Interrupt Mask (command 11h)
Command D7 D6 D5 D4 D3 D2 D1 D0 Function Data length
This command issues the value "11 h" to the output p ort +16, and set s a mask on the ou tput port +17. The
generation of interrupt signals is disabled when an applicable bit is set to "1".
These bits are associated with the respective channels. Setti ng the val ue "1" to any of these bits disable s a
carry-up interrupt on the associated channel. Setting the value "0" resets the disabled condition.
CAUTION
- In the initial condition, all channels are timer-masked (FFh).
- Even in the masked state, on all channels the carry-up conditions change.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
26
Page 32
4. Using the I/O Address Map
Status Reset (command 12h)
Command D7 D6 D5 D4 D3 D2 D1 D0 Function Data length
12h CH7 CH6CH5CH4CH3CH2 CH1CH0Status Reset8-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. Issuing the value "+12h" to the output port +16 and the value "1" to the applicable bit on the
output port +17 clears the sense bit, and enables the generation of another interrupt signal.
Counter initialization (command 13h)
Command D7 D6 D5 D4 D3 D2 D1 D0 Function Data length
13h CH7 CH6CH5CH4CH3CH2 CH1CH0Counter
initialization
8-bit
This command resets the counter data of each channel to 0000h.
The command issues the value "13h" to the output port +16, and resets on the output port +17 and sets
the applicable bit to "1".
Counter control (command 14h)
Command D7 D6 D5 D4 D3 D2 D1 D0 Function Data length
This command controls the corresponding count operation of channel. The command issues the value
"14h" to the output port +1 6, and sets a c ount c ontr ol on t he o utput por t +17. T he c ommand c ontr ols t he
count operation by setting the applicable bit to "1".
These bits are associated with the respective channels. Setti ng the value "1" to any of these bits starts counting.
Setting the value "0" to any of these bits stops counting.
CAUTION
- The initial state is all channels stopped(00h).
- The count data remains unchanged while the count is stopped.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
27
Page 33
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 le vel remains the same for longer tha n the
time set for the digital filter, the signal is treated as a vali d input and the level of the P C signal is changed.
Accordingly, if leve l changes occur at a higher frequency than the filter time, the level changes will not
be detected.
Input Signal
Bounce time m < Filter Setting Time a
Input Signal
Filter Output Signal
Delay time 2a (Max.)
Digital
Filter
Filter Output Signal
Val id
Figure 4.11. Digital Filter Operation Principle
Set Digital Filter Time
Command D7 D6 D5 D4 D3 D2 D1 D0 Function Data length
15h Not used ST4ST3ST2ST1 ST0Digital Filter 5-bit
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
28
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
n
/ (8 x 106)
n: Setting Data (0 - 20)
Table 4.5. Digital Filter Time and Setting Data
Setting Data
(n)
0 (00h) *1 Not used 7 (07h) 16μSec 14 (0Eh) 2.048mSec
}
/* --------------------------------------------------------- End of file --- */
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
37
Page 43
4. Using the I/O Address Map
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
38
Page 44
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. Applications running on the host
computer control the I/O modules by reading/writing the memory that is controlled by the Controller
Module.
For detailed specifications on the memory controlled by the Controller Module, see the Controller
Module manual.
Following is an explanation of the memory areas necessary for the use of this I/O module: the "module
area", the "module information area", and the "basic data area".
Module Information area
This area controls the settings and how the module is started.
The module becomes available when the necessary settings are written into this area and the module
activation option is set in the [module startup register].
Module information area
The current module settings are stored in this area.
When the Module is star ted , th e cont en ts of th e Module Information Area are copied to the Module
Information Area. By reading this area, you can verify the current module settings.
Basic I/O data area
Basic I/O data is accessed in this area.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
39
Page 45
5. Using the Memory Address Map
Module Information Area
A module information area, which is a 128-byte (80h) area beginning with address 301000h an d
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. Module Information Area < 1 / 3 >
Address(h) Area Item Size
Starting address+00
Starting address+01
Starting address+02
Starting address+03
Starting address+04
Starting address+05
Starting address+06
Starting address+07
Starting address+08
Starting address+09
Starting address+0A
Starting address+0B
Starting address+0C
- Starting address+0F
Starting address+10
Starting address+11
Starting address+12 Counter resolution 1 R 10 16bits
Starting address+13 Digital filter setting 1 R/W00 Not used
Starting address+14
- 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).
Basic input data takes count values.
No basic output data.
- Number of basic input channels
The number of basic input channels for the CNT16-8x(FIT)GY is 8 (08h).
Eight counter channels are provided.
- Basic input data size
The basic input data size for the CNT16-8x(FIT)GY is 2 (02h) byte.
The count value consists of two b ytes .
- Number of basic output channels
The number of basic output channels for the CNT16-8x(FIT)GY is 0 (00h).
No output channel.
- Basic output data size
The basic output data size for the CNT16-8x(FIT)GY is 0 (00h) byte.
- Input channel settings address
The addresses of the settings for each input channel are represented as offset addresses within the
module setting area.
On the CNT16-8x(FIT)GY, the locations of the input channel settings start from "20h".
- Input channel settings data size
Indicates the size of the data area for each input channel setting.
The data size for the CNT16-8x(FIT)GY input channel settings is 8 bytes (08h).
- Output channel settin gs ad d res s
The CNT16-8x(FIT)GY does not have channel-specific settings. This field is provided for
compatibility with other device modules.
- Output channel settin gs da ta siz e
The CNT16-8x(FIT)GY does not have channel-specific settings. This field is provided for
compatibility with other device modules.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
43
Page 49
5. Using the Memory Address Map
Items common to mo d u les
- Module startup register
Setting the module startup option (01h) causes the device module to be started.
Setting the module startup op tion w hen the mod ule is be ing sta rted c aus es th e modu le to be
restarted.
The CNT16-8x(FIT)GY does not contain a module shutdown function.
00h : No operation
01h : Module startup
- Error status
The error status bits, which are not reflected in the module information area, always remain [00h].
The error status on a module is stored in the module information area.
- Counter resolution
The counter resolution of the CNT16-8x(FIT)GY is 16 (10h) bit.
- Digital filter setting
Sets the digital filter.
Table 5.2. Digital Filter Time and Setting Data
Setting Data
(n)
0 (00h) *1 Not used 7 (07h) 16μSec 14 (0Eh) 2.048mSec
- The default value for digital filter setting time is "Not used".
- Writing a setting data other than a "0" will apply this filter function to all input channels. This
function cannot be applied to particular pins only but is applied to all input channels.
- Do not set the setting data to an y v alue oth er th an th e abov e. Doing so ma y resu lt in a
malfunction.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
44
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 ch annel to 01h .
Setting "01h" to the setting for each channel starts counting on that channel. Setting "00h" stops
counting.
00h : Stop
01h : Start
Setting the module start setting (01h) to the module startup register sets the startup registers for all
channels to "01h".
CAUTION
The count data does not change while the count is stopped.
- Status reset
When a carry-up occurs on a channel count, the data for the corresponding channel in "module data
area", "channel data", and "status" goes to "01h".
The next carry-up does not occur if the "status" for a channel is "01h". Using status reset to output
"01" to the corresponding channel clears the sense and permits the next count carry-up to occur.
00h : No operation
01h : Sense reset
Changes to "00h" when sense reset processing completes.
- Counter initialization
Resets the counter data of each channel to 0000h.
00h : No operation
01h : Counter initialization
Changes to "00h" when counter initialization completes.
- Preset counter value
By setting values, you can set a preset value to the count for each channel.
The preset counter value is stored as a little endian value.
Table 5.3. Preset counter value
D7 D6 D5 D4 D3 D2 D1 D0
+00h A7 A6 A5 A4 A3 A2 A1 A0
+01h A15 A14 A13 A12 A11 A10A9A8
Changes to "0000h" when preset processing completes.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
45
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
D7 D6 D5 D4 D3 D2 D1 D0
+60h CH7 CH6 CH5 CH4 CH3 CH2 CH1 CH0
Update the "startup register" values for the channels corresponding to bits set to "1".
0 : Ignore
1 : Update "startup register" value.
- Status reset mask
Use this function when you want to perform a status reset for multiple channels simultaneously.
Write the settings and mask for CH0 - CH7 in a single write operation.
Table 5.5. Status reset mask
D7 D6 D5 D4 D3 D2 D1 D0
+61h CH7 CH6 CH5 CH4 CH3 CH2 CH1 CH0
Update the "Status reset" v alue s for th e ch ann els co rrespon ding to b its set to "1 ".
0 : Ignore
1 : Update "Status reset" value.
- Counter initialization mask
Use this function when you want to initialize channels simultaneously. Write the settings and mask
for CH0 - CH7 in a single write operation.
Table 5.6. Counter initialization mask
D7 D6 D5 D4 D3 D2 D1 D0
+62h CH7 CH6 CH5 CH4 CH3 CH2 CH1 CH0
Update the "Counter initialization" values for the channels corresponding to bits set to "1".
0 : Ignore
1 : Update "Counter initialization" value.
- Preset counter mask
Use this function when y ou want to prese t chan nels sim ultaneou sly. W rite the settin gs and m ask for
CH0 - CH7 in a single write operation.
Table 5.7. Preset counter mask
D7 D6 D5 D4 D3 D2 D1 D0
+63h CH7 CH6 CH5 CH4 CH3 CH2 CH1 CH0
Update the "Preset counter" values for the channels corresponding to bits set to "1".
0 : Ignore
1 : Update "Preset counter" value.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
46
Page 52
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)
Starting address+20 Startup register 1 R 00
Starting address+21 Status 1 R 00
Starting address+22
- Starting address+27
Starting address+28 Startup register 1 R 00
Starting address+29 Status 1 R 00
Starting address+2A
- Starting address+2F
Starting address+30 Startup register 1 R 00
Starting address+31 Status 1 R 00
Starting address+32
- Starting address+37
Starting address+38 Startup register 1 R 00
Starting address+39 Status 1 R 00
Starting address+3A
- Starting address+3F
Starting address+40 Startup register 1 R 00
Starting address+41 Status 1 R 00
Starting address+42
- Starting address+47
Starting address+48 Startup register 1 R 00
Starting address+49 Status 1 R 00
Starting address+4A
- Starting address+4F
Starting address+50 Startup register 1 R 00
Starting address+51 Status 1 R 00
Starting address+52
- Starting address+57
Starting address+58 Startup register 1 R 00
Starting address+59 Status 1 R 00
Starting address+5A
- Starting address+5F
Starting address+60
- Starting address+7F
Channel
settings
CH0
Reserved 6 R None
CH1
Reserved 6 R None
CH2
Reserved 6 R None
CH3
Reserved 6 R None
CH4
Reserved 6 R None
CH5
Reserved 6 R None
CH6
Reserved 6 R None
CH7
Reserved 6 R None
Reserved 32 R None
Access
type
Initial
value (h)
When the module is started, the contents of the module information area are stored in the module
information area.
Items common to mo d u les
- Module startup register
This register stores the module operating status.
00h : No operation
01h : Module startup
- Error status
This register stores the error status of the module.
The error status register is reset when the module is restarted.
00h : Normal status
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
48
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
Indicates a carry-up occurred for the count on each channel. The data corresponding to each channel
is set to "01h" when a ca rry -up oc cu rs on a ch an nel .
00h : No carry
01h : Carry
Once a carry-up has occurred for a channel, the next carry-up cannot be detected until the sense is
reset for that channel. See “Status reset” in the “ module in formation area” for detai ls of sense reset.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
49
Page 55
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. Basic Input Data area
Address(h) Area Item Size
Starting address+00 CH0 Counter value 2 R
Starting address+02 CH1 Counter value 2 R
Starting address+04 CH2 Counter value 2 R
Starting address+06 CH3 Counter value 2 R
Starting address+08 CH4 Counter value 2 R
Starting address+0A CH5 Counter value 2 R
Starting address+0C CH6 Counter value 2 R
Starting address+0E CH7 Counter value 2 R
Starting address+10
- Starting address+7F
Reserved 112R
Digital input value
The preset counter value is stored as a little endian value.
Access
type
Table 5.10. Digital Input Values
D7 D6 D5 D4 D3 D2 D1 D0
+00h A7 A6 A5 A4 A3 A2 A1 A0
+01h A15 A14 A13 A12 A11 A10A9A8
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
50
Page 56
5. Using the Memory Address Map
Examples
Flowchart
The following flowchart illustrates an example where the CNT16-8x(FIT)GY i s 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 modul e startu p register
No
Yes
No
Yes
No
Yes
No
Yes
No
Any error in
error status bit?
Get a count value
Get a status
Carry-up?
Status reset
End?
Yes
Closing processing
End
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
51
Page 57
5. Using the Memory Address Map
Sample Program
/*===========================================================================
F&eIT I/F Sample Program
Channel count 8 (8 points/common)
Counting system Up/down counting
Max. count FFFFH (binary data)
Response frequency 5kHz (Max.)
Input format Opto-isolated input (Compatible with both current sinking output and courrent
Input resistance 3kΩ
Input ON /OFF current 3.4 mA(Min.) / 0.16 mA (Max.)
External circuit power supply 12 - 24 VDC (±15%)
Digital filter 0.25μsec - 131.072μsec
Interrupt The interrupts for all eight channels are combined as a single interrupt output
Common section
Interrupt level Using CPU-SBxx(FIT)GY: IRQ 5, 7, or 9
Internal power consumption 5 VDC(±5%) 150 mA (Max.) *1
Allowable distance of signal
extension
Physical dimensions (mm) 25.2 (W) x 64.7 (D) x 94.0 (H) (exclusive of protrusions)
Weight of the module itself 100g
Module connection method Stack connection by the connector that is provided with the side of module
Module installation method One-touch connection to 35mm DIN rails
*1 The stack connector accepts currents of up to 3.0A (Max.).
Table 6.2. Installation Environment Requirements
Parameter Requirement description
Operating temperature 0 - 50°C
Storage temperature -10 - 60°C
Operating humidity 10 - 90%RH (No condensation)
Floating dust particles Not to be excessive
Corrosive gases None
CAUTION
When connecting the Module to a control le r modu le, the inte rnal po wer con su mpt ion sho uld be
taken into account. If the total current exceeds the capacity of the power supply unit, the integrity of
the operation cannot be guaranteed. For further details, please see the Controller Module manual.
Duty 50% (Max.)
source output)
(4 mA/12 V - 8 mA/24 V per channel)
signal. An interrupt is generated when a count carry-up occurs.
Approx. 50m (depending on wiring environment)
(standard connection mechanism provided in the system)
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
58
Page 64
6. System Reference
CNT16-8L(FIT)GY
Table 6.3. Specifications
Item Specification
Counter input section
Channel count 8 (8 points/common)
Counting system Up/down counting
Max. count FFFFH (binary data)
Response frequency 10kHz (Max.)
Input format Opto-isolated input (Compatible with both current sinking output and courrent
Input resistance 1.2kΩ
Input ON /OFF current 3.8 mA(Min.) / 0.16 mA (Max.)
External circuit power 5 VDC (±10%)
Digital filter 0.25μsec - 131.072μsec
Interrupt The interrupts for all eight channels are combined as a single interrupt output
Common section
Interrupt level Using CPU-SBxx(FIT)GY: IRQ 5, 7, or 9
Internal power consumption 5 VDC(±5%) 150 mA (Max.) *1
Allowable distance of signal
extension
Physical dimensions (mm) 25.2 (W) x 64.7 (D) x 94.0 (H) (exclusive of protrusions)
Weight of the module itself 100g
Module connection method Stack connection by the connector that is provided with the side of module
Module installation method One-touch connection to 35mm DIN rails
*1 The stack connector accepts currents of up to 3.0A (Max.).
Duty 50% (Max.)
source output)
(4 mA per channel)
signal. An interrupt is generated when a count carry-up occurs.
Approx. 50m (depending on wiring environment)
(standard connection mechanism provided in the system)
Table 6.4. Installation Environment Requirements
Parameter Requirement description
Operating temperature 0 - 50°C
Storage temperature -10 - 60°C
Operating humidity 10 - 90%RH (No condensation)
Floating dust particles Not to be excessive
Corrosive gases None
CAUTION
When connecting the Module to a control le r modu le, the inte rnal po wer con su mpt ion sho uld be
taken into account. If the total current exceeds the capacity of the power supply unit, the integrity of
the operation cannot be guaranteed. For further details, please see the Controller Module manual.
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
59
Page 65
6. System Reference
Physical Dimensions
(1.2)(1.2)
31.5
14.0
Figure 6.2. Physical Dimensions
0123
4567
6
7
5
040
Device
4
1
ID
3
2
COM 0
NC
0
94
1
2
3
COM 1
NC
4
5
6
7
CNT16-8L
25.23.564.74
14.0
35.0
45.0
[mm]
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
60
Page 66
CNT16-8(FIT)GY
CNT16-8L(FIT)GY
User’s Manual
CONTEC CO., LTD.August 2008 Edition
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
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.