Professional Documents
Culture Documents
Copyright
The documentation and the software included with this product are copyrighted 2007 by Advantech Co., Ltd. All rights are reserved. Advantech Co., Ltd. reserves the right to make improvements in the products described in this manual at any time without notice. No part of this manual may be reproduced, copied, translated or transmitted in any form or by any means without the prior written permission of Advantech Co., Ltd. Information provided in this manual is intended to be accurate and reliable. However, Advantech Co., Ltd. assumes no responsibility for its use, nor for any infringements of the rights of third parties, which may result from its use.
Acknowledgements
Intel and Pentium are trademarks of Intel Corporation. Microsoft Windows and MS-DOS are registered trademarks of Microsoft Corp. All other product names or trademarks are properties of their respective owners.
February 2008
Declaration of Conformity
CE This product has passed the CE test for environmental specifications when shielded cables are used for external wiring. We recommend the use of shielded cables. This kind of cable is available from Advantech. Please contact your local supplier for ordering information. CE This product has passed the CE test for environmental specifications. Test conditions for passing included the equipment being operated within an industrial enclosure. In order to protect the product from being damaged by ESD (Electrostatic Discharge) and EMI leakage, we strongly recommend the use of CE-compliant industrial enclosure products. FCC Class B Note: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures: Reorient or relocate the receiving antenna. Increase the separation between the equipment and receiver. Connect the equipment into an outlet on a circuit different from that to which the receiver is connected. Consult the dealer or an experienced radio/TV technician for help.
iii
Caution! Cautions are included to help you avoid damaging hardware or losing data. e.g. There is a danger of a new battery exploding if it is incorrectly installed. Do not attempt to recharge, force open, or heat the battery. Replace the battery only with the same or equivalent type recommended by the manufacturer. Discard used batteries according to the manufacturer's instructions.
Document Feedback
To assist us in making improvements to this manual, we would welcome comments and constructive criticism. Please send all such - in writing to: support@advantech.com
Safety Instructions
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. Read these safety instructions carefully. Keep this User Manual for later reference. Disconnect this equipment from any AC outlet before cleaning. Use a damp cloth. Do not use liquid or spray detergents for cleaning. For plug-in equipment, the power outlet socket must be located near the equipment and must be easily accessible. Keep this equipment away from humidity. Put this equipment on a reliable surface during installation. Dropping it or letting it fall may cause damage. The openings on the enclosure are for air convection. Protect the equipment from overheating. DO NOT COVER THE OPENINGS. Make sure the voltage of the power source is correct before connecting the equipment to the power outlet. Position the power cord so that people cannot step on it. Do not place anything over the power cord. All cautions and warnings on the equipment should be noted. If the equipment is not used for a long time, disconnect it from the power source to avoid damage by transient overvoltage. Never pour any liquid into an opening. This may cause fire or electrical shock. Never open the equipment. For safety reasons, the equipment should be opened only by qualified service personnel. If one of the following situations arises, get the equipment checked by service personnel: The power cord or plug is damaged. Liquid has penetrated into the equipment. The equipment has been exposed to moisture.
iv
18. The equipment does not work well, or you cannot get it to work according to the user's manual. 19. The equipment has been dropped and damaged. 20. The equipment has obvious signs of breakage. 21. DO NOT LEAVE THIS EQUIPMENT IN AN ENVIRONMENT WHERE THE STORAGE TEMPERATURE MAY GO BELOW -20 C (-4 F) OR ABOVE 60 C (140 F). THIS COULD DAMAGE THE EQUIPMENT. THE EQUIPMENT SHOULD BE IN A CONTROLLED ENVIRONMENT. 22. CAUTION: DANGER OF EXPLOSION IF BATTERY IS INCORRECTLY REPLACED. REPLACE ONLY WITH THE SAME OR EQUIVALENT TYPE RECOMMENDED BY THE MANUFACTURER, DISCARD USED BATTERIES ACCORDING TO THE MANUFACTURER'S INSTRUCTIONS. 23. The sound pressure level at the operator's position according to IEC 704-1:1982 is no more than 70 dB (A).
vi
Contents
Chapter 1
1.1 1.2 1.3
Overview...............................................1
Introduction ............................................................................................... 2 Features .................................................................................................... 2 Specifications ............................................................................................ 3 1.3.1 Encoder input................................................................................ 3 1.3.2 Digital input ................................................................................... 3 1.3.3 Programmable interrupt controller ................................................ 3 1.3.4 General ......................................................................................... 3 Block Diagram........................................................................................... 4 Initial Inspection ........................................................................................ 5
1.4 1.5
Chapter
2
2.1 2.2 2.3 2.4
Chapter
3
3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8
vii
viii
Chapter
1
Overview
Introduction Features Specifications Block Diagram
1.1 Introduction
The PCL-833 is a 3-axis quadrature encoder and counter add-on card for the KM PC/ AT and compatibles (ISA bus). This card lets your PC perform position monitoring for motion control systems. It provides three 24-bit up/down counters as quadrature encoders and a 16-MHz oscillator time base with wide-range multiplier. An on-board interrupt controller handles nine different interrupt sources. Encoder interface Each input includes a decoding circuit for incremental quadrature encoding. Inputs accept either single-ended or differential signals. Quadrature input works with or without an index, allowing linear or rotary encoder feedback.
Counters The PCL-833 has three independent 24-bit counters. The maximum quadrature input rate is 1.0 MHz, while the maximum input rate in counter mode is 2.4 MHz. You can individually configure each counter for quadrature decoding, pulse/direction counting or up/down counting.
Digital input and interrupts The PCL-833 provides five digital input channels. The channels accept digital input as an index input for a rotary encoder or as a home sensor input for a linear encoder. The card can generate an interrupt to the system based on a signal from its digital inputs, overflow/underflow of its counters or on a programmed time interval. It can repeatedly generate interrupts at anytime interval you specify, 0.I mini sec to 255 sec. These interrupts let you precisely monitor the speed of a control system.
1.2 Features
Three 24-bit up/down counters (cascade for up to 48 bits) 1.0 MHz max quadrature input rate 2.4 MHz max. input pulse rate Single ended or differential inputs Pulse/direction and up/down counter XI, X2, X4 counts for each encoder cycle Optically isolated up to 2500 V' 4-stage digital filter with selectable sampling rate 16-MHz oscillator time base with wide-range multiplier. Onboard interrupt controller with nine different interrupt sources Digital input with interrupt for each axis Programmable time interval interrupt Half-size AT-bus card
1.3 Specifications
1.3.1 Encoder input
No. of Axes: Three independent axes Max. quadrature input freq.: 1.0MHz Max. input pulse freq.:2.4MHz Counts per encoder cycle: 1,2 or 4 (s/w selectable) Encoder type: Single-ended or differential Counter size: 24 bits, easily daisy-chain for up to 48 bits Counter modes: Quadrature, up/down, count/direction (s/w selectable) Digital filter: 4 stage Sample clock freq.: 8,4, or 2MHz (s/w selectable) Input isolation: 2,500VRMS using optical isolators
Chapter 1 Overview
1.3.4 General
Connector: DB-25 Board dimensions: 185 * 100mm
Chapter 1 Overview
Chapter
2
Choose a base address that is not in use by any other I/O device. A conflict with another device may cause one or both devices to fail. The factory address setting (hex 200) is usually free as it is reserved for PC prototype boards. Jumper settings for various base addresses appear below:
PCL-833 User Manual 8
Chapter 2
Range (hex) 1 200 - 20F(*) 210 - 21F 220 - 22F 230 - 23F 240 - 24F 3F0 - 3FF X X X X X X 2 O O O O O X
Switch Position 3 O O O O O X 4 O O O O X X 5 O O X X O X 6 O X O X O X
Card interrupt (default = 7) Do not select a level that is being used by another device unless you have performed special programming to share several devices on one interrupt. To use the interrupt you must install an interrupt service routine and program the PCL-833's on-board the 8259 interrupt controller. Nine different conditions can enable the PCL-833's interrupt, but only one at a time.
Interrupt Source 0 1 2 3 4 5 6 7 Condition CH1 overflow CH2 overflow CH3 overflow CH1 ZIN CH2 ZIN CH3 ZIN DI0 Shared by TIMER and DI1
Bit 3 of register BASE+9 switches interrupt source 7 between the card's TIMER and Dl1. See Chapter 3 for details. You should treat all the interrupt sources as positive-edge triggered when you program the 8259.
Pin EGND CH1ACH1A+ CH1BCH1B+ CH1ZCH1Z+ CH2ACH2A+ CH2BCH2B+ CH2ZCH2Z+ CH3ACH3A+ CH3BCH3B+ CH3ZCH3Z+ CDI0CDI0+ CDI1CDI1+
Function External ground Channel 1 A differential negative - input Channel 1 A differential positive - input Channel 1 B differential negative - input Channel 1 B differential positive - input Channel 1 Z differential negative - input Channel 1 Z differential positive - input Channel 2 A differential negative - input Channel 2 A differential positive - input Channel 2 B differential negative - input Channel 2 B differential positive - input Channel 2 Z differential negative - input Channel 2 Z differential positive - input Channel 3 A differential negative - input Channel 3 A differential positive - input Channel 3 B differential negative - input Channel 3 B differential positive - input Channel 3 Z differential negative - input Channel 3 Z differential positive - input Digital input NO. 0 differential negative - input Digital input NO. 0 differential positive - input Digital input NO. 1 differential negative - input Digital input NO. 1 differential positive - input
10
AB phase encoder In 2-pulse input mode A inputs (CHIA, CH2A, etc.) count up while their corresponding B inputs (CHIB, CH2B) count down. In I-pulse input mode A inputs (CHIA, etc.) count up or down and B inputs (CHIB, etc.) determine the direction to count. A logical high (1) on the B channel indicates that the pulse on the A channel is an up count, and a logical low (0) indicates that the pulse is a down count
11
12
Chapter
3
Advanced Modes
Quadrature Encoder Introduction Counter Modes Digital Noise Filter Latch Mode Counter Reset Values Cascade Mode Timer Functions Interupt Functions
(encoder. tif)
14
Chapter 3
Advanced Modes
Counter modes are as follows Quadrature input counter mode Quadrature input consists of two square wave inputs (A and B) which are 90-drgess out of phase. The PCL-833 counts the square wave transitions and determines the direction by comparing whether channel A is leading channel B or vice versa. There are three different counting methods in quadrature input mode. X1 The counter will increment (or decrement) the counter whenever a rising edge occurs on input channel A. X2 The counter will increment (or decrement) whenever a rising or falling edge occurs on input channel A. X4 The counter will increment (or decrement) whenever a rising or falling edge occurs on input channel A or B. 2-pulse mode In 2-pulse mode the PCL-833 uses two input pulses as counting sources: one for clockwise (CW) and one for counter clockwise(CCW) counting. The counter will decrement whenever a rising edge occurs on channel A. It will increment whenever a rising edge occurs on channel B. Pulse/direction mode In pulse/direction mode the PCL-833 uses one input line (A) for pulse input and one line (B) for direction. If channel B is high (1), the counter will decrement whenever a rising edge occurs on channel A. If channel B is low (0), the counter will increment whenever a rising edge occurs on channel A. Disabled mode PCL-833 will not accept input, but you can still access all its registers You select the mode by programming the card's registers: BASE+O for CHI, BASE+I for CH2 and BASE+2 for CH3.
15
S/W latch Whenever you read a channel's data registers, the counter values will be latched in buffer. The S/W latch will only take effect when you read the high byte of the counter (C23-C16). Reading middle byte or low byte of a counter won't latch the counter values to the buffer. You should therefore read the high byte first, then the other two bytes of the counter. Index latch A rising edge on the channel's index input line will latch the channel's counter value.
16
DI0 latch A rising edge on the board's DIO line will latch the counter value for the channel. Dl1 latch A rising edge on the Dl1 line will latch the counter value for the channel. Timer latch The card latches the counter value on a rising edge of pulses from the card's onboard timer.
17
18
Chapter 3
Advanced Modes
19
www.advantech.com
Please verify specifications before quoting. This guide is intended for reference purposes only. All product specifications are subject to change without notice. No part of this publication may be reproduced in any form or by any means, electronic, photocopying, recording or otherwise, without prior written permission of the publisher. All brand and product names are trademarks or registered trademarks of their respective companies. Advantech Co., Ltd. 2007