Anda di halaman 1dari 96

Important Information

New limit values APCI-/CPCI-1710 and CPCI-1711


Please note that due to the RoHS-compliant production the limit values of the multifunction counter boards APCI-1710, CPCI-1710 and CPCI-1711 had to be changed. APCI-1710: APCI-1710-24 V: CPCI-1710/-1711: Mass-related inputs, 24 V (channels E, F, G) 24 V inputs (channels A to G) Mass-related inputs, 24 V (channels E, F, G) Old UHmax UHmin ULmax ULmin 30 V 17 V 15 V 0V New 30 V 19 V 15 V 0V

Please check if you can use the higher levels in your application.

Do you have any questions? Please find further information in the Technical Description or on our website: www.addi-data.com. Do not hesitate to call us or to send us an e-mail: info@addi-data.com.

01.05-04/2009

Addi-dAtA GmbH Airpark Business Center Airport Boulevard B210 77836 Rheinmnster Germany Phone: +49 7229 1847-0 Fax: +49 7229 1847-200 info@addi-data.com www.addi-data.com

Important Information
1. APCI-1710 version update 2. Double function of pin 34

02.01-04/2009

Addi-dAtA GmbH Airpark Business Center Airport Boulevard B210 77836 Rheinmnster Germany Phone: +49 7229 1847-0 Fax: +49 7229 1847-200 info@addi-data.com www.addi-data.com

1. APCI-1710 version update


Due to improvement measures, the APCI-1710 board has been modified. In particular, the input circuit of the 24 V incremental counter signals (24 V option for the inputs Ax, Bx, Cx, Dx) has been redesigned to improve transmission rate and filter properties. The auxiliary supply Uref (pin 34 of the 50-pin SUB-D connector) for the 24 V option is no longer needed; an existent wiring does not have to be changed. In addition, a 40 MHz quartz oscillator, which is independent from the PCI bus, has been integrated into the board to increase precision and accuracy of measurements. Another improvement is the possibility to connect the 24 V supply to the 50-pin SUB-D front connector of the board (see also Technical Description ADDICOUNT APCI-1710).

IMPORTANT!

In order to configure the functions of the board (incremental counter, SSI, counter, timer/counter, PWM, etc.) via the configuration program SET1710, the latest version of each function has to be used.

You can download the latest versions on the ADDI-DATA website. Further information about each version can be found in the SET1710 program.

IMPORTANT!

The present function modules are compatible in function to all versions of the APCI-1710.

Please note that the following functionality has been modified. Incremental counter function APCI-1710-24 V: The inputs Ax, Bx, Cx, Dx are adapted to mass-related 24 V signals.

WARNING!

If the counters are used in Direct mode, the gate input (B, D) has to be set to logic 1 = 24 V.

2. Double function of pin 34


WARNING!
Pin 34 has a double function depending on the connection of the board to external signal generators. Before using pin 34 to supply the 24 V outputs with 24 V, check the position of the ST3 jumper.

ST3 has to be set to position A (condition upon delivery)! If this jumper is not available on your board, you have an older version of the APCI-1710. In this case it is not possible to connect any 24 V power supply! 50-pin SUB-D front connector ST1

Do you have any questions? Please find further information in the Technical Description or on our website: www.addi-data.com. Do not hesitate to call us or to send us an e-mail: info@addi-data.com.

DIN EN ISO 9001:2008 certified

ADDI-DATA GmbH Airpark Business Center Airport Boulevard B210 77836 Rheinmnster Germany Phone: +49 7229 18470 Fax: +49 7229 1847222 E-mail: info@addi-data.com

Technical description APCI-1710 Multifunction counter board, optically isolated

Edition: 07.13 - 04/2011

Product information This manual contains the technical installation and important instructions for correct commissioning and usage, as well as production information according to the current status before printing. The content of this manual and the technical product data may be changed without prior notice. ADDI-DATA GmbH reserves the right to make changes to the technical data and the materials included herein. Warranty and liability The user is not permitted to make changes to the product beyond the intended use, or to interfere with the product in any other way. ADDI-DATA shall not be liable for obvious printing and phrasing errors. In addition, ADDI DATA, if legally permissible, shall not be liable for personal injury or damage to materials caused by improper installation and/or commissioning of the product by the user or improper use, for example, if the product is operated despite faulty safety and protection devices, or if notes in the operating instructions regarding transport, storage, installation, commissioning, operation, thresholds, etc. are not taken into consideration. Liability is further excluded if the operator changes the product or the source code files without authorisation and/or if the operator is guilty of not monitoring the permanent operational capability of working parts and this has led to damage. Copyright This manual, which is intended for the operator and its staff only, is protected by copyright. Duplication of the information contained in the operating instructions and of any other product information, or disclosure of this information for use by third parties, is not permitted, unless this right has been granted by the product licence issued. Non-compliance with this could lead to civil and criminal proceedings. ADDI-DATA software product licence Please read this licence carefully before using the standard software. The customer is only granted the right to use this software if he/she agrees with the conditions of this licence. The software must only be used to set up the ADDI-DATA products. Reproduction of the software is forbidden (except for back-up and for exchange of faulty data carriers). Disassembly, decompilation, decryption and reverse engineering of the software are forbidden. This licence and the software may be transferred to a third party if this party has acquired a product by purchase, has agreed to all the conditions in this licence contract and the original owner does not keep any copies of the software. Trademarks ADDI-DATA, APCI-1500, MSX-Box and MSX-E are registered trademarks of ADDI-DATA GmbH. Turbo Pascal, Delphi, Borland C, Borland C++ are registered trademarks of Borland Software Corporation. Microsoft .NET, Microsoft C, Visual C++, MS-DOS, Windows 95, Windows 98, Windows 2000, Windows NT, Windows EmbeddedNT, Windows XP, Windows Vista, Windows 7, Windows Server 2000, Windows Server 2003, Windows Embedded and Internet Explorer are registered trademarks of Microsoft Corporation. LabVIEW, LabWindows/CVI, DASYLab, DIAdem are registered trademarks of National Instruments Corporation. CompactPCI is a registered trademark of PCI Industrial Computer Manufacturers Group. VxWorks is a registered trademark of Wind River Systems, Inc. RTX is a registered trademark of Ardence.

Warning
The following risks result from improper implementation and from use of the board contrary to the regulations: Personal injury

Damage to the board, the PC and peripherals Pollution of the environment

Protect yourself, others and the environment! Read the safety precautions (yellow leaflet) carefully! If this leaflet is not enclosed with the documentation, please contact us and ask for it. Observe the instructions of this manual! Make sure that you do not forget or skip any step. We are not liable for damages resulting from a wrong use of the board. Pay attention to the following symbols:

IMPORTANT!
Designates hints and other useful information.

WARNING!
Designates a possibly dangerous situation. If the instructions are ignored, the board, the PC and/or peripherals may be destroyed.

WARNING!
Designates a possibly dangerous situation. If the instructions are ignored, the board, the PC and/or peripherals may be destroyed and persons may be endangered.

Contents

APCI-1710

WARNING....................................................................... 3 1
1.1 1.2 1.3 1.4

DEFINITION OF APPLICATION ............................... 9


Intended use ....................................................................9 Usage restrictions.............................................................9 Limits of use......................................................................9 General description of the board ..................................10

2
2.1 2.2

USER .................................................................. 12
Qualification ..................................................................12 Country-specific regulations .........................................12

3 4
4.1 4.2 4.3 4.4 4.4.1 4.4.2 4.4.3 4.4.4

HANDLING OF THE BOARD .................................. 13 TECHNICAL DATA................................................ 14


Electromagnetic compatibility (EMC) ............................14 Physical set-up of the board ..........................................14 Versions ..........................................................................15 Limit values.....................................................................15 Inputs................................................................................... 16 Outputs................................................................................ 17 TTL inputs and outputs at the ST5 connector........................ 19 Safety .................................................................................. 19

5
5.1 5.1.1 5.1.2 5.2 5.2.1 5.2.2 5.2.3

AVAILABLE FUNCTIONS OF THE APCI-1710.......... 20


Available signals............................................................20 Connectable signal lines..................................................... 20 Maximal signal wirings of the APCI-1710 ............................. 20 Available functions.........................................................21 Programmable functions of the counter board .................. 21 Connection facilities depending on the chosen function... 22 Delivered manuals .............................................................. 22

6
6.1 6.2 6.3 6.4

INSTALLATION OF THE BOARD ............................. 23


Opening the PC..............................................................23 Selecting a free slot .......................................................23 Plugging the board into the slot ....................................24 Closing the PC ...............................................................24

7
4

SOFTWARE ......................................................... 25

Contents

APCI-1710

7.1 7.2 7.2.1 7.2.2 7.3 7.3.1 7.3.2 7.4

Delivered software .........................................................25 Configuration of the APCI-1710 with ADDIREG...............25 Registration of a new board ................................................ 30 Changing the registration of an existing board ................... 30 Loading a function into a function module....................31 Module configuration with SET1710 ..................................... 32 Setting a module configuration........................................... 34 ADDI-DATA on the internet ..............................................35

8
8.1 8.1.1 8.1.2 8.1.3 8.2 8.3 8.4

CONNECTING THE PERIPHERAL........................... 37


Connector pin assignment.............................................37 50-pin SUB-D front connector ST1......................................... 38 24 V supply for 24 V digital outputs (channel H)................... 40 50-pin ribbon cable connector ST5..................................... 41 Connection of mass-related inputs and outputs ...........44 Connection of the differential digital I/O .......................45 Connection at the TTL inputs and outputs ......................47

9
9.1 9.2 9.2.1 9.2.2 9.2.3 9.3 9.3.1 9.3.2 9.4

FUNCTIONS OF THE BOARD ................................ 48


Description .....................................................................48 Digital inputs and outputs..............................................49 Description .......................................................................... 49 Inputs................................................................................... 50 Outputs................................................................................ 52 TTL inputs and outputs ....................................................54 Common signals for all function modules........................... 54 Single signals ....................................................................... 54 PCI bus interface............................................................54

10
10.1 10.2

STANDARD SOFTWARE ........................................ 57


Introduction ....................................................................57 Software functions..........................................................59

10.2.1 Initialisation .......................................................................... 59 1) I_APCI1710_InitCompiler ()........................................... 59 2) I_ACPI1710_CheckAndGetPCISlotNumber () ............... 61 3) I_APCI1710_SetBoardInformation ().............................. 62 4) I_APCI1710_ConfigureAllModule ..................................... 63 5) I_ACPI1710_GetHardwareInformation............................... 64 6) I_APCI1710_CloseBoardHandle () ................................. 65 10.2.2 Interrupt ............................................................................... 66 7) I_APCI1710_SetBoardRoutineDos ().............................. 66 5

Contents

APCI-1710

8) i_APCI1710_SetBoardRoutingeVBDos (..) ........................ 68 9) i_APCI1710_SetBoardIntRoutineWin16 (..) ....................... 70 10) i_APCI1710_SetBoardInRoutineWin32 (..) ................ 72 11) i_APCI1710_TestInterrupt........................................... 78 12) i_APCI1710_ResetBoardIntRoutine (..) ...................... 79 10.2.3 Initialisation input filter .......................................................... 80 13) i_APCI1710_InitInputFilter (..) ................................... 80 14) i_APCI1710_CheckInputFilter40MHzStatus (..) ........ 82 10.2.4 Event Tools ........................................................................... 83 15) i_APCI1710_UtilsCreateEvent (..) .............................. 84 16) i_APCI1710_UtilsSetEvent (..).................................... 85 17) i_APCI1710_UtilsResetEvent (..)................................ 86 18) i_APCI1710_UtilsPulseEvent (..) ................................ 87 19) i_APCI1710_UtilsWaitForEvent (..) ........................... 88 20) i_APCI1710_UtilsCloseEvent (..)................................ 89

11

INDEX ................................................................ 90

APCI-1710

Figures and Tables

Figures
Fig. 3-1: Correct handling ................................................................ 13 Fig. 4-1: Output current versus differential output voltage................ 17 Fig. 6-1: PCI-5V slot (32-bit)............................................................... 23 Fig. 6-2: Inserting the board ............................................................. 24 Fig. 6-3: Fastening the board at the back cover ............................. 24 Fig. 7-1: Registration program ADDIREG........................................... 26 Fig. 7-2: Configuration of a new board............................................ 28 Fig. 7-3: PCI boards.......................................................................... 29 Fig.7-4: SET1710: Configuration program for modules..................... 32 Fig. 7-5: Selection of a APCI-/CPCI-170............................................ 32 Fig. 7-6: General information ........................................................... 33 Fig. 7-7: Function list and module configuration.............................. 33 Fig. 7-8: Setting a module configuration by mouse click................. 34 Fig. 7-9: Setting a module configuration by keyboard..................... 35 Fig. 8-1: 50-pin SUB-D male connector (ST1) .................................... 38 Fig. 8-2: Terminal ST2 ........................................................................ 41 Fig. 8-3: Position of the connector ST5 on the board........................ 41 Fig. 8-4: Pin assignment of the ribbon cable connector.................. 42 Fig. 8-5: Connection of a mass-related input .................................. 44 Fig. 8-6: Connection of a mass-related output................................ 45 Fig. 8-7: Connection of a differential input ...................................... 45 Fig. 8-8: Example: Connection of 2 incremental encoders at FM1 . 46 Fig. 8-9: Connection of a differential output .................................... 46 Fig.8-10: Connection at TTL inputs and outputs ............................... 47 Fig. 9-1: Block diagram of the APCI-1710 ........................................ 48 Fig. 9-2: Block diagram of the digital inputs and outputs (1 function module) .......................................................................... 50 Fig. 9-3: Basic circuit of the differential inputs (5 V)........................... 51 Fig. 9-4: Basic circuit of the differential inputs 5 V; used as TTL inputs51 Fig. 9-5: Basic circuit of the 24 V inputs (APCI-1710-24V) ................. 51 Fig. 9-6: Basic circuit of the digital inputs 24 V ................................. 52 Fig. 9-7: Basic circuit of the digital inputs 5 V (OPTION)..................... 52 Fig. 9-8: Basic circuit of the digital outputs 5 V differential............. 53 Fig. 9-9: Basic circuit of the digital output H 24 V .......................... 53 Fig. 9-10: Basic circuit of a digital output H 5 V (OPTION)............... 53 Fig. 10-1: Synchronous and asynchronous mode............................ 74 Fig. 10-2: Synchronous and asynchronous mode............................ 74

Contents

APCI-1710

Tables
Table 5-1: Maximal input lines on the board .................................... 20 Table 5-2: Maximal input lines on a module .................................... 20 Table 5-3: Maximal output lines on the board ................................. 20 Table 5-4: Maximal output lines on a module.................................. 21 Table 5-5: Possible applications of the counter board..................... 21 Table 5-6: Maximal application functions on the board .................. 22 Table 5-7: Delivered manuals ......................................................... 22 Table 8-1: Pin assignment for function module No. 1 (FM1) ............. 38 Table 8-2: Pin assignment for function module No. 2 (FM2) ............. 39 Table 8-3: Pin assignment for function module No. 3 (FM3) ............. 39 Table 8-4: Pin assignment for function module No. 4 (FM4) ............ 39 Table 8-5: Special pin assignment ................................................... 40 Table 8-6: External supply through terminal ST2................................ 41 Table 8-7: Description of the pin assignment .................................. 42 Table 9-1: Assignment of the function modules .............................. 55 Table 9-2: I/O range ......................................................................... 56 Table 10-1: Type declaration for DOS and Windows 3.1x................. 57 Table 10-2: Type declaration for Windows 95/NT.............................. 58 Table 10-3: Define value .................................................................. 58 Table 10-4: Filter time ....................................................................... 81

APCI-1710

Definition of application

DEFINITION OF APPLICATION
1.1 Intended use
The APCI-1710 board must be inserted in a PC with PCI 5V/32-bit slots which is used as electrical equipment for measurement, control and laboratory pursuant to the norm EN 61010-1 (IEC 61010-1). The used personal computer (PC) must fulfil the requirements of IEC 60950-1 or EN 60950-1 and EN 55022 or IEC/CISPR 22 and EN 55024 or IEC/CISPR 24. The use of the board APCI-1710 in combination with external screw terminal panels requires correct installation according to IEC 60439-1 or EN 60439-1 (switch cabinet / switch box).

1.2

Usage restrictions

The APCI-1710 board must not to be used as safety related part (SRP). The board must not be used for safety related functions, for example for emergency stop functions. The APCI-1710 board must not be used in potentially explosive atmospheres. The APCI-1710 board must not be used as electrical equipment according to the Low Voltage Directive 2006/95/EC.

1.3

Limits of use
All safety information and the instructions in the manual must be followed to ensure proper intended use. Uses of the board beyond these specifications are considered as improper use. The manufacturer is not liable for damages resulting from improper use. The board must remain in its anti-static packaging until it is installed. Please do not delete the identification numbers of the board or the warranty claim will be invalid.

Definition of application

APCI-1710

1.4

General description of the board

Data exchange between the APCI-1710 board and the peripheral is to occur through a shielded cable. The cable ST370-16 must be connected to the 50-pin SUB-D male connector of the APCI-1710 board The board has: 1. up to 16 differential inputs for 5 V signal acquisition. - The inputs (RS422) are intended to be connected to incremental encoders. They can also be used as TTL inputs. - 24 V version (APCI-1710-24): these inputs can also be used for processing 24 V signals. 2. up to 12 mass-related inputs which can be operated for any function provided they are used within the defined limit values. - Option: these inputs can also be adapted for processing 5 V signals. 3. up to 12 outputs for the emission of 5 V or 24 V signals. (in this case 20 inputs are available on the board.) - Up to 8 differential outputs (RS422) can be connected to SSI (Synchronous Serial Interface) encoders. - The other 4 mass-related outputs can be processed by any function provided they are used within the defined limit values. - Option: The 4 mass-related 24 V outputs can also be operated for the processing of 5 V TTL signals. The board APCI-1710 consists of 4 function modules. Digital inputs and outputs are allocated to each function module. For each module 8 channels are available: See block diagram of the inputs and outputs. The channels are apportioned according to the board as follows: Input channels: - 2 x TTL, RS422 (signals C,D) - 3 x 24 V, 5 V optional (signals E, F, G) Output channels - 1 x 24 V, TTL optional (signal H) Free definable channels (inputs and outputs) - 2 x TTL, RS422, (signals A, B) 24 V version (ACPI-1710-24 V) 7 x 24 V inputs (signals A to G) 1 x 24 V output (signal H) The use of the board APCI-1710 in combination with external screw terminal panels or relay boards is to occur in a closed switch cabinet. Check the shielding capacity of the PC housing and of the cable prior to putting the device into operation. The connection with our standard cable ST370-16 complies with the following specifications: - metallized plastic hoods - shielded cable - cable shield folded back and firmly screwed to the connector housing. 10

APCI-1710

Definition of application

Uses beyond these specifications are not allowed. The manufacturer is not liable for any damages which would result from the non-observance of this clause. The use of the board according to its intended purpose includes observing all advises given in this manual and in the safety leaflet. Therefore, please The use of the board in a PC could change the PC features regarding noise emission and immunity. Increased noise emission or decreased noise immunity could result in the system is not being conform anymore. The board must not be used in potentially explosive atmospheres. The board must not be exposed to vibrations without any additional keying. Make sure that the board remains in its protective blister pack until it is used. Do not remove or change the identification numbers of the board. If you do, the guarantee expires.

11

User

APCI-1710

USER
2.1 Qualification
Only persons trained in electronics are entitled to perform the following works: - installation - commissioning - use - maintenance

2.2

Country-specific regulations

Do observe the country-specific regulations regarding - the prevention of accidents - electrical and mechanical installations - Electromagnetic compatibility (EMC).

12

APCI-1710

Handling of the board

HANDLING OF THE BOARD


Fig. 3-1: Correct handling

13

Technical data

APCI-1710

TECHNICAL DATA
4.1 Electromagnetic compatibility (EMC)
The board APCI-1710 complies with the European EMC directive. The tests were carried out by a certified EMC laboratory in accordance with the norm from the EN 61326 series (IEC 61326). The limit values as set out by the European EMC directive for an industrial environment are complied with. The respective EMC test report is available on request.

4.2

Physical set-up of the board

The board is assembled on a 4-layer printed circuit card. Dimensions:


179 mm

99 mm

Weight: ...................................................... approx. 150 g Installation in: ........................................... 32/64-bit PCI slot, 5 V Connection to the peripheral: .................... 50-pin SUB-D male connector Accessories 1 : .............................................Standard cable ST370-16 Screw terminal panel PX8000

WARNING! The supply lines must be installed safely against mechanical loads.

Not included in the standard delivery.

14

APCI-1710

Technical data

4.3

Versions

The board APCI-1710 is available in the following two versions: Version Format Onboard function modules 4 4 Options

APCI-1710 APCI-1710-24V

PCI PCI

5 V inputs (mass-related) Digital 5 V outputs -

4.4

Limit values

Max. altitude: ............................................ 2000 m Operating temperature: .............................. 0 to 60C Storage temperature: ................................. -25 to 70C Relative humidity at indoor installation 50% at +40 C 80% at +31 C Minimum PC requirements: PCI BIOS from Version 1.0 Bus speed: ................................................. < 33 MHz Data bus access: .........................................32-bit Decoding: ...................................................in the 64 K I/O area of the PC Target Only operation Operating system: ..................................... Windows 7, Vista (32-bit), XP, 2000, Linux Resources I/O area 3 areas: .......................................................64 bytes, 8 bytes, 256 bytes IRQs: ..........................................................INTA of the PCI bus Energy requirements: Operating voltage of the PC: ..................... 5 V 5% Current consumption (without load): ........if + 5 V from PC: 1.15 A (10 %) if + 24 V ext: 10 mA (10 %) ....................................................................(for standard version APCI-1710)

15

Technical data

APCI-1710

4.4.1

Inputs
Number of inputs: ......................................28 Input type: Differential inputs or rather TTL ...............16 Mass-related inputs ....................................12 APCI-1710 Differential inputs, 5 V Fulfils the EIA standard RS485 Nominal voltage:........................................5 VDC Common-mode range:................................+12/-7 V Max. differential voltage:........................... 12 V Input sensitivity:.........................................200 mV Input hysteresis: .........................................50 mV Input impedance:........................................12 k Load resistance (type): ...............................150 in series with 10 nF Signal delay:...............................................120 nS (at nominal voltage) Max. input frequency: ................................5 MHz (at nominal voltage) Open Circuit Fail Safe Receiver Design 1 = inputs open ESD protection:..........................................up to 15 kV Mass-related inputs, 24 V (channels E, F, G) Nominal voltage:........................................24 VDC Input current (when nominal voltage):.......11 mA (typical) Logic input level: .......................................UH max.: 30 V UH min.: 19 V 15 V UL max.: UL min.: 0V Signal delay:...............................................120 ns (at nominal voltage) Max. input frequency: ................................2.5 MHz (at nominal voltage) Mass-related inputs, 5 V (OPTION, channels E, F, G) Nominal voltage:........................................5 VDC Input current (when nominal voltage):.......10 mA Logic input level: .......................................UH max.: 7V UH min.: 2V 0.8 V UL max.: UL min.: 0V Signal delay:...............................................120 ns (at nominal voltage) Max. input frequency: ................................5 MHz (at nominal voltage)

16

APCI-1710

Technical data

APCI-170-24 V 24 V inputs (channels A to G). This board version is especially designed for 24 V encoders designed. On the inputs only 24 V signals can be connected. Nominal voltage:........................................24 VDC/11 mA Max. input frequency: 1 MHz (at nominal voltage) with input filter Logic input level: .......................................UH max.: 30 V UH min.: 19 V UL max.: 15 V UL min.: 0V

4.4.2

Outputs
Differential outputs, 5 V Fulfil the EIA standard RS485 Nominal voltage:........................................5 VDC Max. output frequency: ..............................5 MHz Max. number of outputs: ............................8 (if not used as differential inputs) Fig. 4-1: Output current versus differential output voltage

17

Technical data

APCI-1710

Digital outputs, 24 V Output type:................................................High-Side (load on mass) Number of outputs: ....................................4 Nominal voltage:........................................24 VDC Area of distribution voltage: 10 V to 36 VDC (over 24 V ext. pin) Max. output current for the 4 outputs:2 A type. (to be limited at the supply voltage) Max. output current:...................................500 mA Short circuit current / output at 24 V, Rlast<0.1 R: .................................................1.5 A max. (output switches off) ON resistance of the output (RDS ON resistance): ..................................0.4 R max. Overtemperature:........................................170 C (all outputs switch off)

APCI-1710, 24 V The inputs/outputs A to B can be used only as inputs, i.e. that the function PWM and digital I/O (not all as inputs) cannot be used with this board.

Protection against overtemperature (24 V outputs) Activation from: .........................................approx. 150-170 C (chip temperature) Deactivation (automatically) from: ............approx. 125-140 C (chip temperature) Outputs (when excess temperature): ..........outputs switch off Undervoltage protection (active when Vext<5 V) Outputs (when undervoltage):....................all outputs switch off. Switch characteristics of the outputs (Vext = 24 V, T=25 C, ohmic resistance: 500 mA) Switch ON time:.........................................200 s Switch OFF time: .......................................15 s Digital outputs, 5 V (OPTION) Output type:................................................TTL Number of outputs: ....................................4 Nominal voltage:........................................5 VDC Output current: ...........................................10 mA Switch characteristics of the outputs (T=25 C, TTL load) Switch ON time:.........................................0.06 s Switch OFF time: .......................................0.02 s

18

APCI-1710

Technical data

4.4.3 TTL inputs and outputs at the ST5 connector WARNING! The TTL inputs and outputs are not optically isolated. Please make sure that no signal from the peripherals is connected to the inputs and outputs when the PC system is switched off or being booted up or shut down. This can be realised by means of a relay or tri-state circuit between the peripherals and the TTL inputs and outputs.

WARNING! TTL outputs have to be protected against short-circuit that is caused by the connected signals.
Max. input voltage: ................................... 4.75 V (PC supply voltage = 5 V 5%) Max. output current:................................... 25 mA (no short-circuit protection!) Signal thresholds: Input logic 1: .............................................. min. 2 V Input logic 0: .............................................. max. 0.8 V Output logic 1: ........................................... min. 2.4 V (PC supply voltage 4.75 V) Output logic 0: ........................................... max. 0.45 V (PC supply voltage 4.75 V)

4.4.4

Safety
Optical isolation (DIN VDE 0411-100): ...............................1000 V (from the PC to the external periphery) Logic: .........................................................positive Creeping distance:......................................3.2 mm on the printed board

19

Available functions of the APCI-1710

APCI-1710

5
5.1.1

AVAILABLE FUNCTIONS OF THE APCI-1710


5.1 Available signals
Connectable signal lines
The lines are divided according to the board as follows: Input lines: - 2 x TTL, RS422 (signals C, D) - 3 x 24 V, 5 V optional (signals E, F, G) Output lines: - 1 x 24 V, TTL optional (signal H) Free definable lines (input or output): - 2 x TTL, RS422 (signals A, B) 24 V version (APCI-1710-24V): - 7 x 24 V inputs (signals A to G) - 1 x 14 V output, TTL optional (signal H)

5.1.2

Maximal signal wirings of the APCI-1710


Table 5-1: Maximal input lines on the board Inputs 28 of them are - 16 differential inputs and - 12 x 24 V inputs Available outputs 4 (H)

Table 5-2: Maximal input lines on a module Inputs 7 of them are - 4 differential - 3 x 24 V inputs 1 Available outputs

Table 5-3: Maximal output lines on the board Outputs 12 Of them are - 8 differential outputs and - 4 x 24 V outputs 20 Available inputs 20 Of them are 8 differential 12 x 24 V inputs (E,F,G)

APCI-1710

Available functions of the APCI-1710

Table 5-4: Maximal output lines on a module Outputs 3 output lines Of them are - 2 differential and - 1 x 24 V output Available inputs 1

5.2
5.2.1

Available functions

Programmable functions of the counter board


Table 5-5: Possible applications of the counter board Function Incremental counter SSI Chronos Counter/timer Digital I/O Or PWM TOR TTL Reserved input channels Reserved output channels

Pulse counter ETM

7 inputs (A to G) 1 output (H) 6 inputs (B to G) 2 outputs (A, H) 5 inputs (C to G) 3 outputs (A, B, H) 5 inputs (C to G) 3 outputs (A, B, H) 7 inputs (A to G) 1 output (H) 5 inputs (C to G) 3 outputs (A, B, H) 5 inputs (C to G) 3 outputs (A, B, H) 2 inputs (C, D) 2 outputs (A, B) 24 digital channels configurable as inputs or outputs (PA0..7, PB0..7, PC0..7) 2 inputs and outputs (I,J) Only possible on 1 function module 4 inputs 1 output (H) 4 inputs (A, B, C, D) -

21

Available functions of the APCI-1710

APCI-1710

5.2.2

Connection facilities depending on the chosen function


Table 5-6: Maximal application functions on the board Application Incremental encoder On the board Per function module 1 (32-bit) 2 (16-bit) 3 4 1 3 2 2 2 Programmed function Incremental counter SSI Pulse counter Chronos Counter /timer PWM TTL TOR ETM

4 (32-bit counter depth) 8 (16-bit counting depth) Absolute encoder 12 Pulse counter 16 Frequency, duty cycle 4 determination Frequency output, 12 trigger control PWM 8 TTL inputs and 1 outputs Gate measurement 8 Edge Time 8 Measurement

5.2.3

Delivered manuals
According to the used function you can find the required reserve and programming information in the respecting manuals. Table 5-7: Delivered manuals

Function
Incremental counter SSI SSI monitor Chronos Counter/timer TOR PWM TTL Digital I/O Pulse counter ETM (Edge time measurement)

PDF file (CD2 technical manuals) German English


Inkr_zhler_d.pdf SSI_d.pdf SSI-Monitor_d chronos_d.pdf Zhler_timer_d.pdf TOR_d.pdf PWM_d.pdf TTL_IO_d.pdf dig_EA_d.pdf Impulszhler_d.pdf ETM_d.pdf Incr_counter_e.pdf ssi_e.pdf SSIMonitor_e.pdf chronos_e.pdf Counter_timer_e.pdf TOR_e.pdf PWM_e.pdf TTL_IO_e.pdf dig_IO_e.pdf pulseCounter_e.pdf ETM_e.pf

Function description in SET1710


Incremental counter SSI SSI_Monitor Chronos counter/timer TOR Pulse width modulation TTL I/O Digital I/O Pulse counter Edge time measurement

CFG file
inc_cpt.cfg ssi.cfg ssi_mon.cfg chronos.cfg 82x54.cfg tor.cfg PWM.cfg ttl_io.cfg dig_IO.cfg imp_cpt.cfg etm.cfg

22

APCI-1710

Installation of the board

INSTALLATION OF THE BOARD


IMPORTANT! Do observe the safety precautions!

6.1

Opening the PC

Switch off your PC and all the units connected to the PC Pull the PC mains plug from the socket. Open your PC as described in the manual of the PC manufacturer.

6.2

Selecting a free slot

Insert the board in a free PCI-5V slot (32-bit). Fig. 6-1: PCI-5V slot (32-bit)

Remove the back cover of the selected slot according to the instructions of the PC manufacturer. Keep the back cover. You will need it if you remove the board Discharge yourself from electrostatic charges. Take the board out of its protective blister pack.

23

Installation of the board

APCI-1710

6.3

Plugging the board into the slot


Insert the board vertically into the chosen slot. Fig. 6-2: Inserting the board

Fasten the board to the rear of the PC housing with the screw which was fixed on the back cover. Fig. 6-3: Fastening the board at the back cover

Tighten all the loosen screws.

6.4

Closing the PC
Close your PC as described in the manual of the PC manufacturer.

24

APCI-1710

Software

SOFTWARE
7.1 Delivered software
The board is delivered with a driver CD (CD1: Standard drivers). The CD contains: - ADDIREG for Windows 7, Vista (32-Bit), XP, 2000 - Standard software for the ADDI-DATA board: SET1710 program for the configuration of the function modules - All functions that are implemented for the APCI-1710. In this chapter you will find a description of the delivered software and its possible applications.

IMPORTANT! Further information for installing and uninstalling the different drivers is to be found in the delivered description "Installation instructions for the PCI and ISA bus".
A link to the corresponding PDF file is available in the navigation pane (bookmarks) of Adobe Reader.

7.2

Configuration of the APCI-1710 with ADDIREG

The ADDIREG registration program is a 32-bit program. With this program the user can register all hardware information that is required for the operation of the ADDI-DATA PC boards.

IMPORTANT! Firstly, install the ADDI-DATA board that you want to register before you call up the ADDIREG program.
If the board is not installed in the PC, the registration can not be controlled. When calling up the program, the screen displays the following window.

25

Software

APCI-1710

Fig. 7-1: Registration program ADDIREG

Table:
The mid table shows the registered boards and parameters. Board name: The names of the different registered boards are shown (for example APCI7800). When you use the program for the first time, no board appears under this entry. Base address: Chosen base address of the board. Access: Selection of the access mode of the ADDI-DATA digital boards. Access in 8-bit or in 16-bit. PCI slot: Used PCI slot. If the board is no APCI board appears NO. Interrupt: Used interrupt of the board. If the board do not have an interrupt, appears Not available.

26

APCI-1710

Software

DMA: Shows the selected DMA channel or Not available if the board do not use one. More information: Further information is shown by the dialog box, for example the sign chain for the identifier (e.g. PCI1500-50) or the installed COM interfaces. If the board is programmed with ADDIDRIVER this will be shown.

Text boxes:
In this table you can find 6 boxes for text input with which you can modify the boards parameter. Base address name: If the board is operated by various base addresses (one for the first interface, one for the second interface etc.) you can decide which base address is to be changed. Base address: In this box you can select your PC-boards base address. All vacant base addresses are listed. A base address that is already used is not displayed in this entry. Interrupt name: Selection of the interrupt number that shall be used by the board. DMA name (for ISA boards only): When the board supports 2 DMA channels, you can select which DMA channel you want to change. DMA channel: Selection of the used DMA channel.

Buttons:
Edit: Selection of the highlighted board with the different parameters set in the text boxes. Click on Edit to confirm the entries or click twice on the selected board. Sets the parameterized board configuration. The configuration should be set before you save it. Insert: If you want to insert a new board click on Insert. Then the following box is displayed:

27

Software

APCI-1710

Fig. 7-2: Configuration of a new board

On the left side you can see all the boards that you can register. Please click on the selected board (the respecting line will be highlighted). On the right side of the box you can see some technical specifications about the board. Confirm with OK. Then you will return to the first screen. Clear: You can delete the registration of your board. Highlight the board to be deleted and click on Clear. Set: Sets the parameterized board configuration. The configuration shall be set before you save it. Cancel: Resets the modified parameter to the currently saved configuration. parameterized board configuration. Default: Sets the boards standard parameter. More information You can change the board specific parameters like the identifier string, the COM number, the operating mode of a communication board, etc.

28

APCI-1710

Software

Fig. 7-3: PCI boards

With this option you can select the identifier for the string by specifying the number and confirming with OK. With clicking on Cancel you choose the old string. ADDIDriver Board Manager: Under Edit/ADDIDriver Board Manager you can check or modify the current settings of the board set through the ADDEVICE Manager. ADDevice Manager starts and displays a list of all resources available of the virtual board. As the APCI-1710 is not programmed with ADDIPACK, this button is deactivated. Save: Saves the parameter and registrates the board. Default: Reactivation of the parameter and registration that were saved at last. Test registration: Checks if there is a conflict between the board and other devices. A message indicates the parameter that has generated the conflict. If there is no conflict, "OK" is displayed. Deinstall registration: Deinstalls all registrations of all boards listed in the table. Print registration: Prints the registration parameter on your standard printer. Quit: Quits the ADDIREG program

29

Software

APCI-1710

7.2.1

Registration of a new board IMPORTANT! For the registration of a new board you need administrator right. Only an administrator is allowed to record a new board or modify an already existing registration.
Call the ADDIREG program.

Figure 7-1 will be displayed. Click on Insert and then select the required board. Click on OK.

The Default address, Interrupt and the other parameters will be set automatically. The parameters will be listed in the lower areas. If the parameters are not set automatically by BIOS you can modify them. Click on the required scroll function/functions and select a new value. Confirm it with a click. When the required is set, click on Set Save the configuration with Save

You can control if the registration is right by conducting a test. If the test result is positive you can exit the ADDIREG program. Then the board will be initialized with the set parameters and can be operated. You will be requested to restart your PC. Otherwise, the parameters will be saved in files so that there is no need to restart the PC.

7.2.2

Changing the registration of an existing board IMPORTANT! In order to register a new board, administrator rights are required. Only an administrator is allowed to register a new board or to change an already existing registration.
Call the ADDIREG program. Mark the board whose parameters you want to change.

The parameters of the board (base address, DMA, channel etc) are listed in the lower areas. Click on the parameters that you want to set newly and open the scrolling function.

30

APCI-1710

Software

Select a new value. Confirm it with a click. Please repeat this for each parameter to be changed. When the required configuration is set, click on Set. Save the configuration with Save.

You can check if the register is correct by a test. If the test is positive you can exit the ADDIREG program. The board will be initialised with the set parameters and now can be operated.

7.3

Loading a function into a function module

The SET1710 configuration program is a 16-bit or 32-bit program for Windows 3.11 and Windows 7/Vista (32-Bit)/XP/2000. It will be installed automatically when installing the driver in 32 bit. At delivery time all function modules are preset with the function incremental counter. The functions are programmed once and separate for each function module through SET1710.exe, which is delivered with the board. After the PCs new start the board APCI-1710 is operable. The user also can set the configuration of the modules through the software (see software function i_APCI1710_ConfigureAllModule in chapter 9).

31

Software

APCI-1710

7.3.1

Module configuration with SET1710 IMPORTANT! Firstly, set the board with the registration program ADDIREG under Windows 7/Vista (32-Bit)/XP/2000 before configuring the function modules with the program SET1710.

Fig.7-4: SET1710: Configuration program for modules

Fig. 7-5: Selection of a APCI-/CPCI-170

Under About you can find general information about the board and our customer service.

32

APCI-1710

Software

Fig. 7-6: General information

Quit with Exit the SET1710 program. After having selected the APCI-1710 the following box is displayed:

Fig. 7-7: Function list and module configuration

Function list: In this box all available module functions are listed. Each function will be set in a configuration file into the directory CFG. Module configuration: Current module configuration of the selected board 33

Software

APCI-1710

Description: Description of the functions that are selected in the list. The version of the function, the update description and any other information about the module function is listed in this field. Configure: Programs the APCI-/CPCI-1710 with the current module configuration. Exit: Closes the box.

7.3.2

Setting a module configuration


Module configuration through mouse click Fig. 7-8: Setting a module configuration by mouse click

Click with the right mouse button on the function in the list and move it into the required module.

34

APCI-1710

Software

Module configuration through keyboard Select the function in the list (tabulator). Then press the Return tab. The following dialogue box will be displayed: Fig. 7-9: Setting a module configuration by keyboard

Confirm the required module with OK.

7.4

ADDI-DATA on the internet

Do not hesitate to e-mail us your questions. E-mail: info@addi-data.com Free downloads of standard software You can download the driver for your board from the internet: www.addi-data.com

35

Software

APCI-1710

IMPORTANT! Before using the board or in case of malfunction during operation, check if there is an update of the product (technical description, driver). The current version can be found on the Internet or contact us directly.

36

APCI-1710

Connecting the peripheral

CONNECTING THE PERIPHERAL


IMPORTANT! Interferences are emitted and inserted through the connection cable. Therefore, a wrong cable may endanger the operation and function safety of your system.

-

Use our standard connection cable. During placing the connection cable observe the following: There shall be sufficient distance to sensitive analog signals The distance to potential sources of interference like frequency converter, mains supply circuit, shall be as long as possible.

If you operate the outputs with maximum load, you shall place the connection cable freely and well ventilated.

8.1

Connector pin assignment

IMPORTANT! The function modules are described with different definitions in the hardware and software descriptions.
For the connector pin assignment (Hardware) the modules 1 to 4 are numbered. For the SET1710 program or the software function (Software) the module numbering BEGINS with 0.

37

Connecting the peripheral

APCI-1710

8.1.1

50-pin SUB-D front connector ST1


Fig. 8-1: 50-pin SUB-D male connector (ST1)

WARNING! Pin 34 of the front connector has a double assignment function. If you do not connect Pin 34 correctly, your board can be destroyed.
The following tables show the pin assignment of the digital inputs and outputs and the respecting signals and functions. The inputs and outputs shall be switched on the module after the programming of the function (direction change-over depends on the selected function). Table 8-1: Pin assignment for function module No. 1 (FM1)
Pin Description Input/Output APCI-1710 APCI-1710-24 V

2 3 4 5 6 7 8 9 35 39 43 47
1 2

A1+ A1B1+ B1C1+ C1D1+ D1H1 E1 F1 G1

Input/Output 1 Input/Output 1 Input/Output 1 Input/Output 1 Input Input Input Input Digital Output Digital Input Digital Input Digital Input

Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL 24 V 24 V 24 V 24 V

24 V input - 2 24 V input 24 V 24 V 24 V 24 V 24 V 24 V

On the 24 V signals (APCI-1710-24 V) only inputs can be connected Ax-, Bx-, Cx-, Dx- pins do not have a function on the 24 V board (see Fig. 9-5)

38

APCI-1710

Connecting the peripheral

Table 8-2: Pin assignment for function module No. 2 (FM2)


Pin Description Input/Output

10 11 12 13 14 15 16 17 36 40 44 48

A2+ A2B2+ B2C2+ C2D2+ D2H2 E2 F2 G2

Input/Output Input/Output 1 Input/Output 1 Input/Output 1 Input Input Input Input Digital Output Digital Input Digital Input Digital Input

APCI-1710 APCI-1710-24 V

Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL 24 V 24 V 24 V 24 V

24 V input 24 V input 24 V 24 V 24 V 24 V 24 V 24 V

Table 8-3: Pin assignment for function module No. 3 (FM3)


Pin Description Input/Output

18 19 20 21 22 23 24 25 37 41 45 49

A3+ A3B3+ B3C3+ C3D3+ D3H3 E3 F3 G3

Input/Output Input/Output 1 Input/Output 1 Input/Output 1 Input Input Input Input Digital Output Digital Input Digital Input Digital Input

APCI-1710 APCI-1710-24 V

Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL 24 V 24 V 24 V 24 V

24 V input 24 V input 24 V 24 V 24 V 24 V 24 V 24 V

Table 8-4: Pin assignment for function module No. 4 (FM4)


Pin Description Input/Output

26 27 28 29 30 31 32 33 38 42 46 50

A4+ A4B4+ B4C4+ C4D4+ D4H4 E4 F4 G4

Input/Output Input/Output 1 Input/Output 1 Input/Output 1 Input Input Input Input Digital Output Digital Input Digital Input Digital Input

ACPI-1710 APCI-1710-24 V

Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL Diff. / TTL 24 V 24 V 24 V 24 V

24 V input 24 V input 24 V 24 V 24 V 24 V 24 V 24 V 39

Connecting the peripheral

APCI-1710

Table 8-5: Special pin assignment Pins with fix assignment Pin 1 34 Description EXTGND + UREF Or 24 V ext. Input/Output Output/Input Function Reference potential - voltage output for TTL signals or - 24 V supply for 24 V outputs Note For all inputs and outputs Configurable through ST3

8.1.2

24 V supply for 24 V digital outputs (channel H) WARNING! Pin 34 of the front connector has a double assignment function. If you do not connect Pin 34 correctly, your board can be destroyed.
According to which input type is connected, the user shall observe the connection of the 24 V output channel H. Use of 5 V differential inputs Channels A, B, C, D delivery status The 24 supply of the outputs H1 to H4 is conducted through Pin 34 of the front connector ST1. Jumper ST3 is on position A. Use of TTL inputs

The 24 V supply of the outputs H1 to H4 is conducted through terminal ST2. Jumper ST3 must be set on position B. Pin 34 is considered for the auxiliary voltage +UREF for the adaptation of the 5 V differential inputs on TTL signals.

40

APCI-1710

Connecting the peripheral

Fig. 8-2: Terminal ST2

Table 8-6: External supply through terminal ST2 Pin ST2-1 ST2-2 Description 24 V supply EXTGND Input/Output 24 V supply EXTGND Function Reference potential Note Connected with Pin 1 of the SUB-D connector

8.1.3

50-pin ribbon cable connector ST5


Fig. 8-3: Position of the connector ST5 on the board

41

Connecting the peripheral

APCI-1710

Fig. 8-4: Pin assignment of the ribbon cable connector

Table 8-7: Description of the pin assignment Pin no. at the connector 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 42 Name PC71 GND PC6 GND PC5 GND PC4 GND K1 GND K2 GND K3 GND K4 GND PA0 PA1 PA2 PA3 GND PA4 PA5 PA6 PA7 V. ext PB0 PB1 PB2 PB3 GND PB4 PB5 PB6 PB7 V ext Description TTL, input or output; after reset: input PC GND, without isolation TTL, input or output; after reset: input PC GND, without isolation TTL, input or output; after reset: input PC GND, without isolation TTL, input or output; after reset: input PC GND; without isolation TTL, outp.;same signal as H1 at front connector, FM1 PC GND, without isolation TTL outp. same signal as H2 at front connector, FM2 PC GND; without isolation TTL outp.; same signal as H3 at front connector, FM3 PC GND; without isolation TTL outp.; same signal as H4 at front connector, FM4 PC GND; without isolation TTL, input or output; after reset: input TTL, input or output; after reset: input TTL, input or output; after reset: input TTL, input or output; after reset: input PC GND, without isolation TTL, input or output; after reset: input TTL, input or output; after reset: input TTL, input or output; after reset: input TTL, input or output; after reset: input
TTL, input or output; after reset: input TTL, input or output; after reset: input TTL, input or output; after reset: input TTL, input or output; after reset: input TTL, input or output; after reset: input TTL, input or output; after reset: input TTL, input or output; after reset: input TTL, input or output; after reset: input

Pin no. at FB8001 1 34 18 2 35 19 3 36 20 4 37 21 5 38 22 6 39 23 7 40 24 8 41 25 9 42 26 10 43 27 11 44 28 12 45 29

APCI-1710

Connecting the peripheral

Pin no. at the connector 37 38 39 40 41 42 43 44 45 46 47 48 49 50


1 2

Name PC0 PC1 PC2 PC3 GND I42 J42 I3 J32 V ext I22 J22 I12 J12

Description TTL, input or output; after reset: input TTL, input or output; after reset: input TTL, input or output; after reset: input TTL, input or output; after reset: input
TTL, input or output; after reset: output, FM4 TTL, input or output; after reset: output, FM4 TTL, input or output; after reset: output, FM3 TTL, input or output; after reset: output, FM3 PC + 5 V voltage supply TTL, input or output; after reset: output, FM2 TTL, input or output; after reset: output, FM2 TTL, input or output; after reset: output, FM1 TTL, input or output; after reset: output, FM1

Pin no. at FB8001 13 46 30 14 47 31 15 48 32 16 49 33 17 50

PA, PB and PC : Pullup on 5 V Serial resistance 100 , PD

PA, PB, PC and PD can be used through the function module TTL I/O.

43

Connecting the peripheral

APCI-1710

8.2

Connection of mass-related inputs and outputs


Fig. 8-5: Connection of a mass-related input

44

APCI-1710

Connecting the peripheral

Fig. 8-6: Connection of a mass-related output

8.3

Connection of the differential digital I/O


Fig. 8-7: Connection of a differential input

45

Connecting the peripheral

APCI-1710

Fig. 8-8: Example: Connection of 2 incremental encoders at FM1

Fig. 8-9: Connection of a differential output

46

APCI-1710

Connecting the peripheral

8.4

Connection at the TTL inputs and outputs


Fig.8-10: Connection at TTL inputs and outputs

47

Functions of the board

APCI-1710

FUNCTIONS OF THE BOARD


9.1 Description
The APCI-1710 is an extension board for the PCI bus and it is compatible with the PCI specification 2.1.. The board is used for the processing of digital signals with focus on counting and time measurement. The digital signals are connected through a 50-pin SUB-D front connector ST1 to the function modules of the APCI-1710 board. They are separated optically through opto-couplers. A second 50-pin connector ST5 is assembled only for the connection of TTL signals to the board. These signals are not isolated optically from the PC. The APCI-1710 board consists of 4 function modules that are assembled with 4 reprogrammable CPLDs (Complex Programmable Logic Devices). Digital inputs and outputs are allocated firmly to each function module.

Fig. 9-1: Block diagram of the APCI-1710

The user can reprogram the board without uninstalling it. This has the following advantages: - easy extension of the boards functionality - implementation of customer requests - easy download of newly developed functions - reduced storage place - etc.

48

APCI-1710

Functions of the board

The function modules allow to connect digital input and output signals and to process them on hardware base (in real time) before they are passed to the PC. One function module is a physical unit that consists of: digital inputs - digital outputs - one function programmable component (hardware)
-

The function modules are also connected to each other through an internal bus.

9.2
9.2.1

Digital inputs and outputs

Description
To each function module digital inputs and outputs are allocated firmly. However, a few inputs also can be set as outputs for certain functions, which are implemented on the function module. 8 lines are available for each module: (see Fig. 9-2: block diagram of digital inputs and outputs) (1 function module) The lines are divided according to the board as follows: APCI-1710 Input lines - 2 x TTL, RS422 (signals C, D) - 3 x 24 V, 5 V optional (signals E, F, G) Output lines - 1 x 24 V, TTL optional (signal H) Free definable lines (input or output) -2 x TTL, RS422 (signals A, B) APCI-1710-24 V - 7 x 24 V inputs (signals A to G) - 1 x 24 V output, TTL optional (signal H) The function of the digital inputs and outputs depends on the function that is programmed on the function module and is described respectively in the corresponding documentations. The following sections describe only the general characteristics of the inputs and outputs.

49

Functions of the board

APCI-1710

Fig. 9-2: Block diagram of the digital inputs and outputs (1 function module)

9.2.2

Inputs
The inputs are distinguished as follows: - differential inputs for very fast signals - mass-related inputs

Differential inputs Max. 4 differential inputs (A, B, C and D) are available for each function module. The levels in the standard delivery correspond with the RS485 (5 V) standard.

50

APCI-1710

Functions of the board

Fig. 9-3: Basic circuit of the differential inputs (5 V)

Alternatively, TTL signals can also be connected to these inputs. Please note that the other input of the differential receiver is wired on +UREF, so that it also can make a difference. So the TTL signal is inverted or not inverted, according to the wiring, to the function module. Fig. 9-4: Basic circuit of the differential inputs 5 V; used as TTL inputs

In version APCI-1710-24 the differential inputs (A to D) are individually designed for the connection to a 24 V impulse transmitter / signal transmitter. Fig. 9-5: Basic circuit of the 24 V inputs (APCI-1710-24V)

51

Functions of the board

APCI-1710

Mass-related inputs Max. 3 mass-related inputs (E, F and G) are available for one function module. The levels in the standard delivery correspond with the 24 V standard (IEC1131-2 / type 1). These inputs have a common ground line. Fig. 9-6: Basic circuit of the digital inputs 24 V

These inputs can be delivered on request for another signal level (option). Fig. 9-7: Basic circuit of the digital inputs 5 V (OPTION)

9.2.3

Outputs
The outputs are distinguished as follows: - differential outputs for very fast signals - mass-related outputs

Differential outputs Max. 2 differential outputs (A and B) are available for one function module. The levels in the standard delivery correspond with the RS485 (5 V) standard. In this case A and B can not be used as common inputs.

52

APCI-1710

Functions of the board

Fig. 9-8: Basic circuit of the digital outputs 5 V differential

Mass-related outputs Max. one mass-related output (H) is available for one function module. The levels in the standard delivery correspond with the 24 V standard. (IEC1131-2 / High-Side driver). Fig. 9-9: Basic circuit of the digital output H 24 V The 24 V can be fed either through the connector ST1 (jumper in position A) or separately through the terminal ST2.

The output can also be delivered on request as opto-coupler output (TTL compatible). Fig. 9-10: Basic circuit of a digital output H 5 V (OPTION)

53

Functions of the board

APCI-1710

9.3

TTL inputs and outputs

At the connector ST5 of the ACPI-1710 are further I/O, GND and Vcc of the PC available. These signals must correspond with the TTL level and be treated carefully in order not to damage the board if other signals shall be connected. With the cable FB8001 the board can be connected through the connector ST5 to the peripheral.

9.3.1

Common signals for all function modules


The signals PA0 to PA7, PB0 to PB7 and PC0 to PC7 are connected with all function modules. They are available for max. one function module (e.g. TTL I/O) available. Example: Only the function module No. 4 (FM4) is programmed with the function TTL I/O. The signals can be set as inputs or outputs.

9.3.2

Single signals
2 TTL inputs and outputs (I and J) are available for each function module. These can be used only together with function module TTL I/O.

9.4

PCI bus interface

The APCI-1710 is an extension board for the PCI/CompactPCI bus. Hereof result the following advantages: - the PCI/CompactPCI bus can Plug & Play, this means the software sets the addresses, interrupts automatically. - the board is identified automatically through the software program - the APCI-1710 allows a 32-bit access on the peripheral for faster data transfer. - the board is to be operated as Target only on the PCI bus. It has a common interrupt that is wired to the INTA Pin of the PCI connector. After the PC has booted and the application software has got the respecting base addresses for the ACPI-1710 through the BIOS function, the board can be accessed via the usual I/O write/read commands. The four function modules need 256 bytes of the 64 kilobytes I/O range of the PC, always 64 bytes for each function module.

54

APCI-1710

Functions of the board

WARNING! The addresses allocated by the BIOS should not be reprogrammed.


The following table shows the I/O assignment: Table 9-1: Assignment of the function modules IORD / IOWR D31...D24 D23...D16 D15.....D8 D7.......D0 HIGHBYTE MIDHIGHBYTE MIDLOWBYTE LOWBYTE FUNCTION MODULE 1 FUNCTION MODULE 1 FUNCTION MODULE 2 FUNCTION MODULE 2 FUNCTION MODULE 3 FUNCTION MODULE 3 FUNCTION MODULE 4 FUNCTION MODULE 4

BYTES BASE+0 BASE+63 BASE+64 BASE+127 BASE+128 BASE+191 BASE+192 BASE+255

The function modules (FM) can seize the following addresses: - FM 1 can occupy the addresses: BASE +0 to BASE +63. - FM 2 can occupy the addresses: BASE +64 to BASE +127 - FM 3 can occupy the addresses: BASE +128 to BASE +191 - FM 4 can occupy the addresses: BASE +192 to BASE +255 Example: The incremental transmitters are programmed with reference logic in the function modules 1 to 4. The corresponding I/O function range for the incremental transmitter will be copied into the therefore allocated places of the function modules.

55

Functions of the board

APCI-1710

The following I/O range is built: Table 9-2: I/O range IORD / IOWR D31...D24 BYTES BASE+0 BASE +59 BASE +60 bis +63 BASE+64 BASE+ 123 BASE + 124 bis + 127 BASE+128 BASE+187 BASE +188 bis +191 BASE+192 BASE+251 BASE +252 bis +255 HIGHBYTE D23...D16 MIDHIGHBYTE D15.....D8 MIDLOWBYTE D7.......D0 LOWBYTE

Incremental counter 1 Incremental counter 1 Function module 1 - Info SCxx Incremental counter 2 Incremental counter 2 Function module 2 - Info SCxx Incremental counter 3 Incremental counter 3 Function module 3 - Info SCxx Incremental counter 4 Incremental counter 4 Function module 4 - Info SCxx

SC: Incremental counter

xx: Number of version, e.g. SC23 Version 2.3

All settings on the board are realized through the software (AP), through the connector assignment or through a reprogramming of the function module (no jumper on the board).

56

APCI-1710

Standard software

10

STANDARD SOFTWARE
10.1 Introduction

IMPORTANT! Remember the following style conventions in the text.


Function: Variable: i_APCI1710_SetBoardInformation ui_Address

Table 10-1: Type declaration for DOS and Windows 3.1x Borland C void unsigned char int unsigned int long Microsoft C void unsigned char int unsigned int long Borland Pascal pointer byte integer word longint var byte var integer var word var string integer integer long long integer integer long string Microsoft Visual Basic Dos Microsoft Visual Basic Windows any integer integer long long integer integer long string

VOID BYTE INT UINT LONG

PBYTE unsigned char * unsigned char * PINT PUINT PCHAR int * unsigned int * char * int * unsigned int * char *

57

Standard software

APCI-1710

Table 10-2: Type declaration for Windows 95/NT Borland C Microsoft C Borland Pascal pointer byte integer long longint var byte var integer var long var string integer integer long long integer integer long string Microsoft Visual Basic Dos Microsoft Visual Basic Windows any integer integer long long integer integer long string

VOID BYTE INT UINT LONG PBYTE PINT PUINT PCHAR

void unsigned char int unsigned int long unsigned char * int * unsigned int * char *

void unsigned char Int unsigned int long unsigned char * int * unsigned int * char *

Table 10-3: Define value Define name DLL_COMPILER_C DLL_COMPILER_VB DLL_COMPILER_PASCAL DLL_LABVIEW DLL_COMPILER_VB_5 APCI1710_DISABLE APCI1710_ENABLE Decimal value 1 2 3 4 5 0 1 Hexadecimal value 1 2 3 4 5 0 1

58

APCI-1710

Standard software

10.2 Software functions


10.2.1 Initialisation IMPORTANT! The following chapter lists the common functions for each function module.
You can find the single software functions according to the function of the board APCI-1710 in the respecting manuals. 1) I_APCI1710_InitCompiler ()

Syntax: <Return-Wert>= i_APCI1710_InitCompiler (BYTE b_CompilerDefine) Parameter: - Input: BYTE b_CompilerDefine

The user shall select under Windows the language, which he wants to use for programming. - DLL_COMPILER_C: The user programs in C. - DLL_COMPILER_VB: Programming in Visual Basic for Windows. - DLL_COMPILER_VB_5: Programming in Visual Basic 5 fr Windows NT or Windows 95/98. - DLL_COMPILER_PASCAL: Programming in Pascal or Delphi. - DLL_LABVIEW: Programming in Labview.

- Output: No output signal. Task: If you want to use the DLL functions, please specify the language, which you want to use for programming. Call this function firstly.

IMPORTANT! This function is only available under Windows.

59

Standard software

APCI-1710

Calling convention: ANSI C : int i_ReturnValue; i_ReturnValue = i_APCI1710_InitCompiler (DLL_COMPILER_C); Return value: 0: No error -1: Compiler Parameter is wrong

60

APCI-1710

Standard software

2)

I_ACPI1710_CheckAndGetPCISlotNumber ()

Syntax: <Return-Wert> = i_APCI1710_CheckAndGetPCISlotNumber (PBYTE pb_SlotNumberArray) Parameter: - Input: There is no input. - Output PBYTE pb_SlotNumberArray

List of slot numbers

Task: Controls all APCI-1710 and shows the slot number of each board. Each parameter pb_SlotNumberArray contains the slot number (1 to 8) of a APCI-1710 board. Calling convention: ANSI C : int i_ReturnValue; unsigned char b_SlotNumberArray [8]; i_ReturnValue = i_APCI1710_CheckAndGetPCISlotNumber (b_SlotNumberArray); Return value: Returns the number of APCI-1710 boards that are installed in the PC. If the Return Value shows 0 then no APCI-1710 was found on your PC.

61

Standard software

APCI-1710

3)

I_APCI1710_SetBoardInformation ()

Syntax: <Return-Wert> = i_APCI1710_SetBoardInformation (BYTE b_SlotNumber, PBYTE pb_BoardHandle) Parameter: - Input: BYTE b_SlotNumber - Output: PBYTE pb_BoardHandle

slot number of the board Handle of the board to use the functions.

Task: Controls if there is a xPCI-1710 board and saves the slot number. The user gets back a handle so that the next functions can be used. Handles enable the administration of several boards. Calling convention: ANSI C : int i_ReturnValue; unsigned char b_BoardHandle; i_ReturnValue = i_APCI1710_SetBoardInfomation (1, &b_BoardHandle); Return value: -0: No error -1: Slot number not available -2: There is no board -3: No handle for the board available (limited to 10 handles) -4: Error during opening of the driver in Windows NT/ Windows 95

62

APCI-1710

Standard software

4)

I_APCI1710_ConfigureAllModule

Syntax: <Return-Wert> = i_APCI1710_ ConfigureAllModule (BYTE b_BoardHandle, PCHAR pc_FileName1, PCHAR pc_FileName2, PCHAR pc_FileName3, PCHAR pc_FileName4, PULONG pul_WriteAddressError); Parameter: - Input: BYTE b_BoardHandle Handle of the board PCHAR pc_FileName1 Name of the configuration file for FM 1 0 PCHAR pc_FileName2 Name of the configuration file for FM 1 PCHAR pc_FileName3 Name of the configuration file for FM 2 PCHAR pc_FileName4 Name of the configuration file for FM 3 - Output: PULONG pul_WriteAddressError In case of an error, address of the read/write register Task: Initializes the function modules through software. Calling convention: ANSI C : int i_ReturnValue; unsigned char b_BoardHandle; unsigned long ul_WriteAddressError; i_ReturnValue = i_APCI1710_ ConfigureAllModule (b_BoardHandle, "CFG\\INC_CPT.CFG", "CFG\\INC_CPT.CFG", "CFG\\INC_CPT.CFG", "CFG\\INC_CPT.CFG", &ul_WriteAddressError); Return value: 0: No error -1: The handle parameter of the board is wrong -2: Error during loading of the file -3: The decoding of the Altera file is wrong -4: Error during deleting the EEPROM component (Flash) -5: The programming is wrong -6: Error during read-out preparation of the flash -7: The read-out of the flash is wrong -8: Comparison between writing and reading of the flash is not correct -9: Error during loading of the Flex component -10: The loading test of the Flex component is wrong.
1

FM: Function module

63

Standard software

APCI-1710

5)

I_ACPI1710_GetHardwareInformation

Syntax: <Return-Wert> = i_APCI1710_GetHardwareInformation (BYTE b_BoardHandle, PUINT pui_BaseAddress, PBYTE pb_InterruptNbr, PBYTE pb_SlotNumber) Parameter: - Input: BYTE b_BoardHandle - Output: PUINT pui_BaseAddress PBYTE pb_InterruptNbr PBYTE pb_SlotNumber

Handle of the board Base address of the board Interrupt channel of the board Slot number of the board

Task: Returns the base address, the interrupt and the slot number of the board. Calling convention: ANSI C : int unsigned int unsigned char unsigned char unsigned char i_ReturnValue; ui_BaseAddress; b_InterruptNbr; b_SlotNumber; b_BoardHandle;

i_ReturnValue = i_APCI1710_GetHardwareInformation (b_BoardHandle, &ui_BaseAddress, &b_InterruptNbr, &b_SlotNumber); Return-Wert: 0: No error -1: The handle parameter of the board is wrong

64

APCI-1710

Standard software

6)

I_APCI1710_CloseBoardHandle ()

IMPORTANT! Call this function anytime you want to exit the user program!

Syntax: <Return-Wert> = i_APCI1710_CloseBoardHandle (BYTE b_BoardHandle) Parameter: - Input: BYTE b_BoardHandle - Output: No output signal.

Handle der xPCI-1710

Task: Releases the handle of the board. Blocks the access to the board. Calling convention: ANSI C : int i_ReturnValue; unsigned char b_BoardHandle; i_ReturnValue = i_APCI1710_CloseBoardHandle (b_BoardHandle); Return value: 0: No error -1: Handle parameter of the board is wrong

65

Standard software

APCI-1710

10.2.2 Interrupt
7) I_APCI1710_SetBoardRoutineDos ()

IMPORTANT! This function can only be used for C/C++ and Pascal for DOS b
Syntax: <Return-Wert> = i_APCI1710_SetBoardIntRoutineDos (BYTE b_BoardHandle, VOID v_FunctionName (BYTE b_BoardHandle, BYTE b_ModuleMask, ULONG ul_InterruptMask, ULONG ul_CounterLatchValue)) Parameter: - Input: BYTE b_BoardHandle VOID v_FunctionName - Output: No output signal.

Handle der xPCI-1710 Karte Name der Benutzer-Interruptroutine

Task: This function is to be called for all xPCI-1710 board on which you want to activate an interrupt. At the first calling function (first board): - the user interrupt routine is installed - interrupts are made possible If you operate various xPCI-1710 boards that shall react to interrupts, you shall call the function as many times as how many xPCI-1710 boards you are operating. The variable v_FunctionName is only important at the first calling. From the second calling of the function on (next boards), interrupts are enabled. Interrupt If an interrupt is generated, the user interrupt routine is called up by the system. If various boards are operated and shall react to interrupts, the variable b_BoardHandle shows the identification number (handle) of the board, which has generated the interrupt. The user interrupt routine must have the following syntax: VOID_ v_FunctionName (BYTE b_BoardHandle, BYTE b_ModuleMask ULONG ul_InterruptMask, ULONG ul_CounterLatchValue)

66

APCI-1710

Standard software

v_FunctionName b_BoardHandle b_ModulMask

ul_InterruptMask

ul_CounterLatchValue

Name of the user interrupt routine Number of the xPCI-1710-handle, which has generated the interrupt. Mask of the module, which has generated the interrupt. (See table of the interrupt mask in the respecting manual) Mask of the event, which has generated the interrupt. (See table of the interrupt mask in the respecting manual) The latched values of the time are returned (See table of the interrupt mask in the respecting manual)

The user can specify another name for v_FunctionName, b_BoardHandle, ul_InterruptMask, ul_CounterLatchValue Calling convention: ANSI C : void v_FunctionName (unsigned char b_BoardHandle, unsigned char b_ModuleMask, unsigned long ul_InterruptMask unsigned long ul_CounterLatchValue)

{ . . } int i_ReturnValue; unsigned char b_BoardHandle; i_ReturnValue = i_APCI1710_SetBoardIntRoutineDos (b_BoardHandle, v_FunctionName ); Return value: 0: No error -1: Handle parameter of the board is wrong -2: Interrupt is already installed

67

Standard software

APCI-1710

8)

i_APCI1710_SetBoardRoutingeVBDos (..)

IMPORTANT! This function can be used only for Visual Basic DOS.
Syntax: <Return-Wert> = i_APCI1710_SetBoardIntRoutineVBDos (BYTE b_BoardHandle) Parameter: - Input: BYTE b_BoardHandle - Output: No output signal.

Handle der Karte

Task: This function is to be called for all xPCI-1710 boards on which you want to activate an interrupt. When an interrupt is activated, a Visual Basic Event will be generated. At the first calling of a function (first board): - the interrupts for the selected board are made possible. If you operate various xPCI-1710 boards that shall react to interrupts, you shall call the function as many times as how many xPCI-1710 boards you are operating. Interrupt If an interrupt is being generated, the user interrupt routine of the system is called. Controlling the interrupt administration: Use the functions "ON UEVENT GOSUB xxxxxxxxx" of Visual Basic DOS and "i_APCI1710_TestInterrupt" This function tests the interrupt of the xPCI-1710. It is used to get the values of b_BoardHandle, b_ModuleMask, ul_InterruptMask und ul_CounterLatchValue Calling convention: Visual Basic DOS: Dim Shared i_ReturnValue Dim Shared i_BoardHandle Dim Shared i_ModuleMask Dim Shared l_InterruptMask Dim Shared l_CounterLatchValue IntLabel: As Integer As Integer As Integer As Long As Long

68

APCI-1710

Standard software

i_ReturnValue = i_APCI1710_TestInterrupt

(i_BoardHandle, _ i_ModuleMask, _ l_InterruptMask, _ l_CounterLatchValue)

. . . Return ON UEVENT GOSUB IntLabel UEVENT ON i_ReturnValue = i_APCI1710_SetBoardIntRoutineVBDos (b_BoardHandle) Return value: 0: No error -1: Handle parameter of the board is wrong -2: Interrupt already installed

69

Standard software

APCI-1710

9)

i_APCI1710_SetBoardIntRoutineWin16 (..)

IMPORTANT! This function can be used only for Windows 3.1 and Windows 3.11.
Syntax: <Return-Wert> = i_APCI1710_SetBoardIntRoutineWin16 (BYTE b_BoardHandle, VOID v_FunctionName (BYTE b_BoardHandle, BYTE b_ModuleMask, ULONG l_InterruptMask, ULONG ul_CounterLatchValue)) Parameter: - Input: BYTE b_BoardHandle VOID v_FunctionName - Output: No output signal.

Handle of the board Name of the user interrupt routine

Task: This function is to be called for all xPCI-1710 boards, on which you want to activate an interrupt. At the first calling of a function (first board): - the user interrupt routine is installed - the interrupts are made possible. If you operate various xPCI-1710 boards that shall react to interrupts, you shall call the function as many times as how many xPCI-1710 boards you are operating. The variable v_FunctionName is only important at the first calling. From the second calling of a function on (next boards) interrupts are enabled. Interrupt If an interrupt is generated, the user interrupt routine of the system is called. If various boards are operated and shall react to interrupts, the variable b_BoardHandle shows the identification number (handle) of the board, which has generated the interrupt. The user interrupt routine shall have the following syntax: VOID v_FunctionName (BYTE b_BoardHandle, BYTE b_ModuleMask, ULONG ul_InterruptMask, ULONG ul_CounterLatchValue) v_FunctionName Name of the user interrupt routine b_BoardHandle Handle of the xPCI-1710, which has generated the interrupt. b_ModuleMask Mask of the module, which has generated the interrupt

70

APCI-1710

Standard software

(see table of the interrupt mask in the respecting manual) ul_InterruptMask Mask of the events, which have generated the interrupt (see table of the interrupt mask in the respecting manual) ul_CounterLatchValue The latched values of the timer are returned (see table of the interrupt mask in the respecting manual) The user can specify another name for v_FunctionName, b_BoardHandle, b_ModuleMask, ul_InterruptMask und ul_CounterLatchValue.

IMPORTANT! If you use Visual Basic for Windows the following parameter does not exist! Use the function: "i_APCI1710_TestInterrupt"!
VOID v_FunctionName (BYTE BYTE ULONG ULONG b_BoardHandle, b_ModuleMask, ul_InterruptMask, ul_CounterLatchValue)

Calling convention: ANSI C : void v_FunctionName (unsigned char unsigned char unsigned long unsigned long b_BoardHandle, b_ModuleMask, ul_InterruptMask, ul_CounterLatchValue)

{ . . } int i_ReturnValue; unsigned char b_BoardHandle; i_ReturnValue = i_APCI1710_SetBoardIntRoutineWin16 (b_BoardHandle, v_FunctionName ); Return-Wert: 0: No error -1: Handle parameter of the board is wrong -2: Interrupt is already installed

71

Standard software

APCI-1710

10) i_APCI1710_SetBoardInRoutineWin32 (..)

IMPORTANT! This function is only available for Windows NT and Windows 9x.
Syntax: <Return-Wert> = i_APCI1710_SetBoardIntRoutineWin32 (BYTE b_BoardHandle, BYTE b_UserCallingMode, ULONG ul_UserSharedMemorySize, VOID ** ppv_UserSharedMemory, VOID v_FunctionName (BYTE b_BoardHandle, BYTE b_ModuleMask, ULONG ul_InterruptMask, ULONG ul_CounterLatchValue, BYTE b_UserCallingMode, VOID * pv_UserSharedMemory)) Parameter: - Input: BYTE b_BoardHandle BYTE b_UserCallingMode

Handle of the board xPCI-1710 APCI1710_SYNCHRONOUS_MODE: The user routine is called directly through the interrupt routine of the driver. APCI1710_ASYNCHRONOUS_MODE: The user routine is called directly through the Interrupt Thread of the driver VOID v_FunctionName Name of the interrupt routine ULONG ul_UserSharedMemorySize Defines the size in bytes of the user shared memory. You can use the parameter only if you have selected the following mode: APCI1710_SYNCHRONOUS_MODE

IMPORTANT! The size of the User Shared Memory is limited to 63 MB. It could cause problems if more memory is required.

72

APCI-1710

Standard software

- Output: VOID ** ppv_UserSharedMemory Address of the user shared memory You can use the parameter only if you have selected the following mode: APCI1710_SYNCHRONOUS_MODE

IMPORTANT! For Windows NT and Windows 95, 4 rings are available (ring 0 to ring 3).
- The user application program runs under ring 3. In this ring no access to hardware is available. - VXD and SYS drivers run under ring 0 and have hardware access. - Ring 0 cannot access to the variable of ring 3 and therefore shall use the Shared Memory. - Ring 0 und ring 3 have an indicator, which identifies this Shared Memory. Both rings have different addresses. This function is to be called for all xPCI-1710 boards on which you want to activate an interrupt. At the first calling of a function (first board): - the user interrupt routine is installed - the interrupts are made possible. - the user shared memory will be allocated if the following mode is activated: APCI1710_SYNCHRONOUS_MODE. If you operate various xPCI-1710 boards that shall react to interrupts, you shall call the function as many times as how many xPCI-1710 boards you are operating. The variable v_FunctionName is only at the first calling of importance. From the second calling of a function on (next boards) interrupts are enabled. Interrupt If an interrupt is generated, the user interrupt routine of the system is called. If various boards are operated and shall react to interrupts, the variable b_BoardHandle shows the identification number (handle) of the board, which has generated the interrupt. The user interrupt can be called as follows: - directly from the interrupt routine of the driver (synchronous mode). The code of the user interrupt routine runs directly under ring 0. - or of the Interrupt Thread of the driver (synchronuous mode). An event will be generated and the Interrupt Thread calls the user interrupt routine. The code of the user interrupt routine runs under ring 3. The Interrupt Thread of the driver has the highest priority (31) in the system.

73

Standard software

APCI-1710

Fig. 10-1: Synchronous and asynchronous mode

Fig. 10-2: Synchronous and asynchronous mode SYNCHRONOUS MODE ADVANTAGES The user interrupt routine is called directly from the interrupt routine of the driver (ring 0). The time between interrupt and user interrupt routine is reduced. A debug of the user interrupt routine is not possible. The user interrupt routine cannot call the Windows API functions. LIMITS The user interrupt routine cannot call the functions, which have access to the shared variable. However, the user can use a shared memory. The user interrupt routine can only call the functions of the xPCI1710 device driver, which have the following extension: "i_APCI1710_KRNL_XXX" This mode can not be used under Visual Basic.

ASYNCHRONOUS MODE A debug of the user interrupt routine is possible. ADVANTAGES The user interrupt routine can call the API functions. The user interrupt routine can call the functions, which have access to the shared variable. The user interrupt routine can call all functions of the xPCI-1710 device driver. Syntax: "i_APCI1710_XXX" LIMITS The code of the user interrupt routine is called from the Interrupt Thread of the driver (ring 3). The time between interrupt and user interrupt routine is longer.

74

APCI-1710

Standard software

Shared memory: If you have chosen the APCI1710_Synchronous_Mode, you have no access to the common function. However, you have the possibility to create a shared memory (ppv_UserSharedMemory), in which all given compilers or user defines are saved. The variable ul_UserSharedMemorySize identifies the size in byte of the selected user type. An indicator of the variable pv_UserSharedMemory will be returned to the interrupt routine with the variable pv_ USerSharedMemory. This function is not possible in Visual Basic. The user interrupt routine shall have the following syntax: VOID v_FunctionName (BYTE b_BoardHandle, BYTE b_ModuleMask, ULONG ul_InterruptMask, ULONG ul_CounterLatchValue, BYTE b_UserCallingMode, VOID * pv_UserSharedMemory) v_FunctionName Name of the user interrupt routine b_BoardHandle Handle of the APCI-1710, which has generated the interrupt. b_ModuleMask Mask of the module, which has generated the interrupt (see table in the interrupt of the respecting manual) ul_InterruptMask Mask of the event, which has generated the interrupt (see table of the interrupt mask in the respecting manual) ul_CounterLatchValue The latched values of the counter are returned. (See table of the interrupt mask in the respecting manual) b_UserCallingMode APCI1710_SYNCHRONOUS_MODE: The user routine is called directly from the driver interrupt routine
APCI1710_ASYNCHRONOUS_MODE:

The user interrupt routine is called directly from the driver interrupt thread. pv_UserSharedMemory Indicator of the user shared memory. The user can use other names for v_FunctionName, b_BoardHandle, b_ModuleMask, ul_InterruptMask, ul_CounterLatchValue, b_UserCallingMode und pv_UserSharedMemory.

IMPORTANT! If you use Visual Basic 4 the following parameters have no meaning. Use the function: "i_APCI1710_TestInterrupt".

75

Standard software

APCI-1710

BYTE b_UserCallingMode, ULONG ul_UserSharedMemorySize, VOID ** ppv_UserSharedMemory, VOID v_FunctionName (BYTE BYTE ULONG ULONG BYTE VOID *

b_BoardHandle, b_ModuleMask, ul_InterruptMask, ul_CounterLatchValue, b_UserCallingMode, pv_UserSharedMemory)

Calling convention: ANSI C : typedef struct { . . . }str_UserStruct; str_UserStruct * ps_UserSharedMemory; void v_FunctionName (unsigned char b_BoardHandle, unsigned char b_ModuleMask, unsigned long ul_InterruptMask, unsigned long ul_CounterLatchValue, unsigned char b_UserCallingMode, void * pv_UserSharedMemory) { str_UserStruct * ps_InterruptSharedMemory; ps_InterruptSharedMemory = (str_UserStruct *) pv_UserSharedMemory; . . } int i_ReturnValue; unsigned char b_BoardHandle; i_ReturnValue = i_APCI1710_SetBoardIntRoutineWin32 (b_BoardHandle,
APCI1710_SYNCHRONOUS_MODE,

sizeof (str_UserStruct), (void **) &ps_UserSharedMemory, v_FunctionName); Visual Basic 5: Sub v_FunctionName (ByVal i_BoardHandle ByVal i_ModuleMask ByVal l_InterruptMask ByVal l_CounterLatchValue ByVal b_UserCallingMode ByVal l_UserSharedMemory As Integer, As Integer, As Long, As Long, As Integer, As Long)

End Sub

76

APCI-1710

Standard software

Dim i_ReturnValue As Integer Dim i_BoardHandle As Integer i_ReturnValue = i_APCI1710_SetBoardIntRoutineWin32 (i_BoardHandle, APCI1710_ASYNCHRONOUS_MODE, 0, 0, AddressOf v_FunctionName) Return value: 0: No error -1: Handle parameter of the board is wrong -2: Interrupt is already installed -3: The selected calling mode of the user interrupt routine is wrong -4: No memory space fort the user shared memory available. -5: Failure to install asynchronous interrupt -6: Interrupt routine is already used -7: Error while installing interrupt

77

Standard software

APCI-1710

11) i_APCI1710_TestInterrupt Syntax: <Return-Wert> = i_APCI1710_TestInterrupt (BYTE BYTE PULONG PULONG Parameter: - Input: There is no input - Output: PBYTE pb_BoardHandle

b_BoardHandle, b_ModuleMask pul_InterruptMask, pul_CounterLatchValue)

Handle of the xPCI-1710, which has generated the interrupt. (see table of the interrupt mask in the respecting manual) PBYTE pb_ModuleMask Mask of the module, which has generated the interrupt. (see table of the interrupt mask in the respecting manual) PULONG pul_InterruptMask Mask of the events, which have generated the interrupt. (see table of the interrupt mask in the respecting manual) PULONG pul_CounterLatchValue Returns the latched values of the counter.

Task: Controls if a xPCI-1710 has generated an interrupt. If yes, returns the handle of the board and the source of the interrupt.

IMPORTANT! This function can be used only in Visual Basic for DOS and Windows.
Calling convention: ANSI C : int i_ReturnValue; unsigned char b_BoardHandle; unsigned char b_ModuleMask; unsigned char ul_InterruptMask; unsigned int ul_CounterLatchValue; i_ReturnValue = i_APCI1710_TestInterrupt (&b_BoardHandle, &b_ModuleMask &ul_InterruptMask, &ul_CounterLatchValue;

78

APCI-1710

Standard software

Return value: -1: No interrupt > 0: IRQ number

12) i_APCI1710_ResetBoardIntRoutine (..) Syntax: <Return-Wert> = i_APCI1710_ResetBoardIntRoutine (BYTE b_BoardHandle) Parameter: - Input: BYTE b_BoardHandle - Output: No output signal has occurred

Handle of the board

Task: Stops the interrupt administration of the xPCI-1710. Deinstalls the interrupt routine if the interrupt administration of all xPCI1710 is stopped. Calling convention: ANSI C : int i_ReturnValue; unsigned char b_BoardHandle; i_ReturnValue = i_APCI1710_ResetBoardIntRoutine (b_BoardHandle); Return value: 0: No error -1: Handle parameter of the board is wrong -2: No interrupt installed with the function "i_APCI1710_SetBoardIntRoutineXXX"

79

Standard software

APCI-1710

10.2.3

Initialisation input filter


13) i_APCI1710_InitInputFilter (..) Syntax: <Return Wert> = i_APCI1710_InitInputFilter (BYTE b_BoardHandle, BYTE b_Modul, BYTE b_TimeBase, BYTE b_Filter) Parameter: -Input: BYTE b_BoardHandle BYTE b_ModulNbr BYTE b_TimeBase

BYTE

b_Filter

Handle of the board xPCI-1710 Number of the module to be configured (0 to 3) Selection of the filter clock - APCI1710_30 MHZ: The PC has a PCI bus clock of 30 MHz - APCI1710_33MHZ: The PC has a PCI bus clock of 33 MHz - APCI1710_40 MHz: The board has a 40 MHz quartz Selection of the filter. (See Table 10-4: Filter time)

-Output: There is no output. Task: Disables or enables the filter of the selected module (b_Modul). b_Filter indicates the filter time.

80

APCI-1710

Standard software

Table 10-4: Filter time


b_TimeBase b_Filter 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 APCI1710_30MHZ Filter not used 133 ns 200 ns 267 ns 333 ns 400 ns 467 ns 533 ns 600 ns 667 ns 733 ns 800 ns 867 ns 933 ns 1000 ns 1067 ns APCI1710_33MHZ Filter not used 121 ns 182 ns 242 ns 303 ns 364 ns 424 ns 485 ns 545 ns 606 ns 667 ns 727 ns 788 ns 848 ns 909 ns 970 ns APCI1710_40MHZ Filter not used 100 ns 150 ns 200 ns 250 ns 300 ns 350 ns 400 ns 450 ns 500 ns 550 ns 600 ns 650 ns 700 ns 750 ns 800 ns

IMPORTANT! This function is only availabe for the following modules: Chronos, pulse counter, incremental counter

Calling convention: ANSI C : int i_ReturnValue; unsigned char b_BoardHandle; i_ReturnValue = i_APCI1710_InitInputFilter (b_BoardHandle 0, APCI1710_40MHz, 9); Return value: 0: No error -1: Handle parameter of the board is wrong -2: Selected module number is wrong. -3: The selected module has no input filter. -4: The selected filter clock is wrong. -5: The selected filter time is wrong. -6: No 40 MHz quartz is available on the board.

81

Standard software

APCI-1710

14) i_APCI1710_CheckInputFilter40MHzStatus (..) Syntax: <Return Wert> = i_APCI1710_CheckInputFilter40MHzStatus (BYTE b_BoardHandle, PBYTE pb_40MHz_Status) Parameter: -Input: BYTE b_BoardHandle -Output: PBYTE pb_40MHz_Status

Handle of the board xPCI-1710 Availability 40 MHz on the board 0: 40 MHz not available 1: 40 MHz available

Task: Checks the availability of the 40 MHz clock on the board

IMPORTANT! This function is only available for the following modules: Chronos, pulse counter, incremental counter

Calling convention: ANSI C : int unsigned char unsigned char

i_ReturnValue; b_BoardHandle; b_40MHz_Status;

i_ReturnValue = i_APCI1710_CheckInputFilter40MHzStatus (b_BoardHandle &b_40MHz_Status); Return value: 0: No error -1: Handle parameter of the board is wrong. -2: This function is in not available in any of the function modules.

82

APCI-1710

Standard software

10.2.4 Event Tools


By means of the event tools, threads can be synchronised in the user and kernel levels. Example: e.g. kernel level Thread e.g. in the user level

i APCI1710 UtilsCreateEvent
Creates an event object

do { Source code
Handle of the event object

Source code

i APCI1710 UtilsPulseEvent
Sets or resets an event to the event object

i APCI1710 UtilsWaitForEvent

4 Event

Disables the thread until an event is created 2

Source code Source code

i APCI1710 UtilsCloseEvent
Closes an event object

} while ()

1) Creates an event object in the kernel level. The handle of the event object is passed to the user through, for example, a shared memory. 2) In the user level, a thread is disabled by the function i_APCI1710_UtilsWaitForEvent until an event occurs. 3) A device creates a hardware interrupt. The interrupt routine is executed and calls the function 4) i_APCI1710_UtilsPulseEvent to monitor the thread. 5) In case the event is not needed, it can be closed by the function i_APCI1710_UtilsCloseEvent.

83

Standard software

APCI-1710

15) i_APCI1710_UtilsCreateEvent (..) Syntax: <Return Wert> = i_APCI1710_UtilsCreateEvent (BYTE b_BoardHandle, PCHAR pc_EventName, PHANDLE ph_Handle) Parameter: -Input: BYTE b_BoardHandle PCHAR pc_EventName

Handle of the board xPCI-1710 The name of the event object. If NULL, the system generates a unique name. Handle of the event object.

-Output: PHANDLE ph_Handle Task: Creates an event object. Calling convention: ANSI C : int unsigned char HANDLE

i_ReturnValue; b_BoardHandle; h_Handle;

i_ReturnValue = i_APCI1710_UtilsCreateEvent (b_BoardHandle Event1, &h_Handle); Return value: 0: No error -1: Handle parameter of the board is wrong.

84

APCI-1710

Standard software

16) i_APCI1710_UtilsSetEvent (..) Syntax: <Return Wert> = i_APCI1710_UtilsSetEvent (BYTE b_BoardHandle, HANDLE h_Handle) Parameter: -Input: BYTE b_BoardHandle HANDLE h_Handle -Output: Task: Sets the specified event object. Calling convention: ANSI C : int unsigned char HANDLE

Handle of the board xPCI-1710 Handle of the event object.

i_ReturnValue; b_BoardHandle; h_Handle;

i_ReturnValue = i_APCI1710_UtilsSetEvent (b_BoardHandle, h_Handle); Return value: 0: No error -1: Handle parameter of the board is wrong.

85

Standard software

APCI-1710

17) i_APCI1710_UtilsResetEvent (..) Syntax: <Return Wert> = i_APCI1710_UtilsResetEvent (BYTE b_BoardHandle, HANDLE h_Handle) Parameter: -Input: BYTE b_BoardHandle HANDLE h_Handle -Output: Task: Resets the specified event object. Calling convention: ANSI C : int unsigned char HANDLE

Handle of the board xPCI-1710 Handle of the event object.

i_ReturnValue; b_BoardHandle; h_Handle;

i_ReturnValue = i_APCI1710_UtilsResetEvent (b_BoardHandl, h_Handle); Return value: 0: No error -1: Handle parameter of the board is wrong.

86

APCI-1710

Standard software

18) i_APCI1710_UtilsPulseEvent (..) Syntax: <Return Wert> = i_APCI1710_UtilsPulseEvent (BYTE b_BoardHandle, HANDLE h_Handle) Parameter: -Input: BYTE b_BoardHandle HANDLE h_Handle -Output: Task: First executes the function i_APCI1710_UtilsSetEvent and after that the function i_APCI1710_UtilsResetEvent. Calling convention: ANSI C : int unsigned char HANDLE

Handle of the board xPCI-1710 Handle of the event object.

i_ReturnValue; b_BoardHandle; h_Handle;

i_ReturnValue = i_APCI1710_UtilsPulseEvent (b_BoardHandl, h_Handle); Return value: 0: No error -1: Handle parameter of the board is wrong.

87

Standard software

APCI-1710

19) i_APCI1710_UtilsWaitForEvent (..) Syntax: <Return Wert> = i_APCI1710_UtilsWaitForEvent (BYTE b_BoardHandle, HANDLE h_Handle, ULONG ul_TimeOut) Parameter: -Input: BYTE b_BoardHandle HANDLE h_Handle ULONG ul_TimeOut

Handle of the board xPCI-1710 Handle of the event objet. The unit is 100 ns (1 = 100 ns, 2 = 200 ns). If 0, only the event is waited for. The time-out is switched off.

-Output: Task: Waits and disables the execution of the program until a time-out occurs or the event object is set. Calling convention: ANSI C : int unsigned char HANDLE

i_ReturnValue; b_BoardHandle; h_Handle;

i_ReturnValue = i_APCI1710_UtilsWaitForEvent (b_BoardHandle, h_Handle,0); Return value: 0: No error -1: Handle parameter of the board is wrong. 386007040 : block of the thread not possible 269549568 : Invalid event handle 386400256 : Time out occurs

88

APCI-1710

Standard software

20) i_APCI1710_UtilsCloseEvent (..) Syntax: <Return Wert> = i_APCI1710_UtilsCloseEvent (BYTE b_BoardHandle, HANDLE h_Handle) Parameter: -Input: BYTE b_BoardHandle HANDLE h_Handle -Output: Task: Closes the event object. Calling convention: ANSI C : int unsigned char HANDLE

Handle of the board xPCI-1710 Handle of the event object.

i_ReturnValue; b_BoardHandle; h_Handle;

i_ReturnValue = i_APCI1710_UtilsCloseEvent (b_BoardHandl, h_Handle); Return value: 0: No error -1: Handle parameter of the board is wrong.

89

Index

APCI-1710

11

INDEX
A
Accessories 14

L
Limit values 15 Loading a function into a function module SET1710 31

B
Block diagram 48

M C
Manuals 22 Module configuration with SET1710 32

Changing the registration of an existing board 30 Configuration of a new board 28 Configuration with ADDIREG 25 Connecting the peripheral 37 Connection of a mass-related input 44 Connection of a mass-related output 45 Connection of the differential digital I/O 45

O
Optical isolation 19 Outputs Limit values 17

P
PCI bus interface Description 54 Physical set-up of the board 14 Pin assignment 37

D
Definition of application 9 Digital inputs and outputs Description 49 Dimensions 14

Q
Qualification User 12

E
EMC Electromagnetic compatibility 14 Energy requirements 15

R
Registration of a new board 30 Registration program ADDIREG 26

F
Functions 21 Functions of the board 48

S
SET1710 31 Setting a module configuration 34 Signals 20 Slots 23 Software 25 Standard software 57

H
Handling of the board 13

I
Initialisation Software functions 59 Initialisation input filter Software functions 80 Inputs Limit values 16 Installation of the board 23 Intended use 9 Internet 35 Interrupt Software functions 66

T
Technical data 14 TTL inputs and outputs Description 54

U
Update 36 Usage restrictions 9

V
Versions 15

90

APCI-1710

Index

Weight 14

91

Anda mungkin juga menyukai