Addi-Data ADDINUM CPCI-1500 Technical Description

Digital inputs and outputs for the pci/compactpci bus
Hide thumbs Also See for ADDINUM CPCI-1500:
Table of Contents

Advertisement

Quick Links

DIN EN ISO 9001
certified
Technical support:
+49 (0)7223 / 9493-0
Technical description
ADDINUM APCI-/CPCI-1500
Digital inputs and outputs
for the PCI / CompactPCI bus
9
th
edition 04/2002

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ADDINUM CPCI-1500 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Addi-Data ADDINUM CPCI-1500

  • Page 1 DIN EN ISO 9001 certified Technical support: +49 (0)7223 / 9493-0 Technical description ADDINUM APCI-/CPCI-1500 Digital inputs and outputs for the PCI / CompactPCI bus edition 04/2002...
  • Page 2 - this software can only be used for configuring ADDI-DATA boards. - copying the software is forbidden (except for archiving/ saving data and for replacing defective data carriers).
  • Page 3 W A R N I N G In case of improper handling and if the board is not used for the purpose it is intended for: people may be the board, PC and the environment injured peripheral devices may be may be damaged polluted...
  • Page 4 PCI-board for 32-bit data bus 16 digital inputs, (14 interruptible) 16 digital outputs, 24V, opto-isolated It is made by ADDI-DATA GmbH Meß- und Steuerungstechnik Dieselstraße 3 D-77833 Ottersweier in sole responsibility and is valid on the understanding that the product is competently installed, used and maintained, according to the respective security regulations as well as to the manufacturer's instructions regarding its intended use.
  • Page 5: Table Of Contents

    Table of contents APCI-/CPCI-1500 INTENDED PURPOSE OF THE BOARD.............1 Limits of use......................1 USER ....................2 Qualification ......................2 Personal protection....................2 HANDLING THE BOARD ................3 TECHNICAL DATA.................4 Electromagnetic compatibility (EMC) ..............4 Physical set-up of the board ................4 Options .........................5 Limit values......................5 Component scheme.....................8 INSTALLATION..................10 Installing an APCI-1500 board................11 5.1.1 Selecting a free slot ....................11...
  • Page 6 APCI-/CPCI-1500 Table of contents CONNECTING THE PERIPHERAL............26 Connector pin assignment.................26 Connection principle ..................27 Connection examples..................27 FUNCTIONS OF THE BOARD ...............29 Description of the board ..................29 8.1.1 Block diagrams......................29 8.1.2 Description.........................30 Functions ......................30 8.2.1 Digital input s ......................30 Special input functions ....................31 1) Interrupt:..........................
  • Page 7 Table of contents APCI-/CPCI-1500 9.3.5 Digital input channel - events ..................74 1) i_APCI1500_SetInputEventMask (...) ................. 74 2) i_APCI1500_StartInputEvent (...)..................77 3) i_APCI1500_StopInputEvent (...)..................77 9.3.6 Digital output channel ....................78 1) i_APCI1500_SetOutputMemoryOn (...) ................78 2) i_APCI1500_SetOutputMemoryOff (...) ................78 3) i_APCI1500_Set1DigitalOutputOn (...)................78 4) i_APCI1500_Set1DigitalOutputOff (...) ................
  • Page 8 APCI-/CPCI-1500 Table of contents 10.2.2 Timer interrupt ......................103 a) Flow chart......................103 b) Example in C for DOS ..................104 c) Example in C for Windows 3.1x................105 d) Example in C for Windows NT/95/98 (in asynchronous mode) ......106 e) Example in C for Windows NT/95/98 (in synchronous mode) .......107 INDEX ......................A...
  • Page 9 Figures and tables APCI-/CPCI-1500 Figures Fig. 3-1: Correct handling of the CPCI-1500 ................3 Fig. 3-2: Correct handling of the APCI-1500................3 Fig. 4-1: Component scheme of the APCI-1500 board ............8 Fig. 4-2: Component scheme of the CPCI-1500 board............9 Fig. 5-1: Opening the blister packing ...................10 Fig.
  • Page 10: Intended Purpose Of The Board

    Technical description Chapter 1 APCI-/CPCI-1500 INTENDED PURPOSE OF THE BOARD The APCI-/CPCI-1500 board is the interface between an industrial process and a personal computer (PC). It is to be used in a free PCI slot. The PC is to comply with the EU directive 89/336/EEC and the specifications for EMC protection.
  • Page 11: User

    APCI-/CPCI-1500 Technical description Chapter 2 USER Qualification Only persons trained in electronics are entitled to perform the following works: installation, • use, • maintenance. • Personal protection Consider the country-specific regulations about the prevention of accidents • electrical and mechanical installations •...
  • Page 12: Handling The Board

    Technical description Chapter 3 APCI-/CPCI-1500 HANDLING THE BOARD Fig. 3-1: Correct handling of the CPCI-1500 Fig. 3-2: Correct handling of the APCI-1500...
  • Page 13: Technical Data

    APCI-/CPCI-1500 Technical description Chapter 4 TECHNICAL DATA Electromagnetic compatibility (EMC) The board has been subjected to EMC tests in an accredited laboratory in accordance with the norms EN50082-2, EN55011, EN55022 The board complies as follows with the limit values set by the norm EN50082-2: True value Set value...
  • Page 14: Options

    Technical description Chapter 4 APCI-/CPCI-1500 Options The board CPCI-1500 is available in 2 versions: - CPCI-1500-3U: 3U front plane - CPCI-1500-6U: 6U front plane Limit values Operating temperature: ........0 to 60°C Storage temperature: ......... -25 to 70°C Relative humidity: ..........30% to 99% non condensing Minimum PC requirements (APCI-1500): - PCI BIOS - operating system: ...........
  • Page 15 APCI-/CPCI-1500 Technical description Chapter 4 Logic input level:..........APCI-1500 CPCI-1500 max.: 30 V 30 V U H min.: 19 V 17 V max.: 17 V 15 V U L min.: Signal delay: ............. 70 µs, (at nominal voltage) Maximum input frequency: ......5 kHz (at nominal voltage) 24 V digital output channels Output type: ............
  • Page 16 Technical description Chapter 4 APCI-/CPCI-1500 Safety Optical isolation (DIN VDE 0411-100): ........1000 V (from the PC to the external peripheral). Logic: ..............positive ϑ Shut down logic: See -diagnostic Watchdog: ............resets all the output channels, if no software trigger has happened. Times from 10 µs to 37 s are available.
  • Page 17: Component Scheme

    APCI-/CPCI-1500 Technical description Chapter 4 Component scheme Fig. 4-1: Component scheme of the APCI-1500 board...
  • Page 18: Fig. 4-2: Component Scheme Of The Cpci-1500 Board

    Technical description Chapter 4 APCI-/CPCI-1500 Fig. 4-2: Component scheme of the CPCI-1500 board...
  • Page 19: Installation

    APCI-/CPCI-1500 Technical description Chapter 5 INSTALLATION IMPORTANT ! If you want to install several ADDI-DATA boards simultaneously, consider the following procedure: Install and configure the boards one after the other. You will thus avoid • configuration errors. Install and configure the boards one after the other.
  • Page 20: Installing An Apci-1500 Board

    Technical description Chapter 5 APCI-/CPCI-1500 IMPORTANT! Do observe the safety instructions. 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. •...
  • Page 21: Plugging The Board Into The Slot

    APCI-/CPCI-1500 Technical description Chapter 5 5.1.2 Plugging the board into the slot Discharge yourself from electrostatic charges • Insert the board vertically into the chosen slot. • Fig. 5-3: Inserting the board Fasten the board to the rear of the PC housing with the screw •...
  • Page 22: Installing A Cpci-1500 Board

    Technical description Chapter 5 APCI-/CPCI-1500 Installing a CPCI-1500 board The following Compact PCI slot types are available for 5V systems: CPCI-5V (32-bit) and CPCI-5V (64-bit) See in the computer manual which types of slots are free. Fig. 5-5: Types of slots for CompactPCI boards Discharge yourself from electrostatic charges as described in the leaflet •...
  • Page 23: Fig. 5-7: Connector Keying

    APCI-/CPCI-1500 Technical description Chapter 5 Fig. 5-7: Connector keying If there is a screw at the upper part of the front plate, use this screw to fasten • the board. Note: In order to pull the board out of the rack, pull it to the front at its grip. In some cases the grip has to be tilted upwards first.
  • Page 24: Software

    You can download the latest version of the ADDIREG program from the Internet: http://www.addi-data.de http://www.addi-data.com The CD also contains standard software for the ADDI-DATA boards: - 16-bit for MS-DOS and Windows 3.11 - 32-bit for Windows NT/XP/2000/98 Board configuration with ADDIREG The ADDIREG registration program is a 32-bit program for Windows NT 4.0 and...
  • Page 25: Program Description

    6.1.2 Program description IMPORTANT! Insert the ADDI-DATA boards to be registered before starting the ADDIREG program. If the board is not inserted, the user cannot test the registration. Once the program is called up, the following dialog box appears.
  • Page 26 Technical description Chapter 6 APCI-/CPCI-1500 Access: Selection of the access mode for the ADDI-DATA digital boards. Access in 8-bit or 16-bit. PCI bus/device/(slot): Used PCI slot. If the board is no PCI board, the message "NO" is displayed. Interrupt: Used interrupt of the board. If the board uses no interrupt, the message "Not available"...
  • Page 27: Fig. 6-3: Configuring A New Board

    APCI-/CPCI-1500 Technical description Chapter 6 Buttons: Edit Selection of the highlighted board with the different parameters set in the text boxes. Click on "Edit" to activate the data or click twice on the selected board. Insert: When you want to insert a new board, click on "Insert". The following dialog window appears: Fig.
  • Page 28: Fig. 6-4: Pci Boards

    Technical description Chapter 6 APCI-/CPCI-1500 Fig. 6-4: PCI Boards With this option you can select the identifier string by entering the corresponding number and activating with "OK". With one click on "cancel" you can select the former string. Save: Saves the parameters and registers the board. Restore: Reactivates the last saved parameters and registration.
  • Page 29: Registering A New Board

    APCI-/CPCI-1500 Technical description Chapter 6 6.1.3 Registering a new board IMPORTANT! To register a new board, you must have administrator rights. Only an administrator is allowed to register a new board or change a registration. • Call up the ADDIREG program. The Fig. 6-2 is displayed on the screen. Click on "Insert".
  • Page 30: Driver Installation

    Technical description Chapter 6 APCI-/CPCI-1500 Driver installation Remark: The CPCI-1500 board is entirely compatible with the APCI-1500 board regarding the software installation and the device driver. The program ADDIREG will thus make no difference between the systems (PCI board or Compact PCI board).
  • Page 31: Driver Installation Under Windows Xp/2000/98

    The .inf files contains: – the name of the board – the name of the manufacturer – the hardware type of the board (all ADDI-DATA boards are considered as multifunction boards) The inf files are stored on the CD-ROM in the directory CD/INF...
  • Page 32: Installation Of The Software Samples

    Technical description Chapter 6 APCI-/CPCI-1500 Installation of the software samples 6.3.1 Installation under DOS The software samples for DOS are automatically installed with the driver. 6.3.2 Installation under Windows 3.11 and Windows NT/XP/2000/98 - Change to the CD drive. The files for the required samples are to be found as follows: Fig.
  • Page 33: The Addi-Uninstall Program

    APCI-/CPCI-1500 Technical description Chapter 6 The ADDI-UNINSTALL program 6.4.1 Installation of ADDI-UNINSTALL The ADDI-UNINSTALL program is delivered on the CD-ROM. - Change to the CD drive and start the set-up file under ADDIUNINSTALL/Disk1 (double click). Fig. 6-8: Installation of the ADDI-UNINSTALL program - Proceed as indicated on the screen.
  • Page 34: Uninstall Addireg

    You can also download the program from the Internet. Software downloads from the Internet You can download the latest version of the device driver for the APCI-/CPCI-1500 board. http://www.addi-data.de. or http://www.addi-data.com If you have any questions, do not hesitate to send us an e-mail to info@addi-data.de...
  • Page 35: Connecting The Peripheral

    Technical description Chapter 7 APCI-/CPCI-1500 CONNECTING THE PERIPHERAL Connector pin assignment Fig. 7-1: 37-pin SUB-D male connector...
  • Page 36: Connection Principle

    Technical description Chapter 7 APCI-/CPCI-1500 Connection principle Fig. 7-2: Connection principle of the input and output channels Connection examples Fig. 7-3: Connection examples for the input and output channels...
  • Page 37: Fig. 7-4: Connection Examples

    Technical description Chapter 7 APCI-/CPCI-1500 Fig. 7-4: Connection examples...
  • Page 38: Functions Of The Board

    Technical description Chapter 8 APCI-/CPCI-1500 FUNCTIONS OF THE BOARD Description of the board 8.1.1 Block diagrams Fig. 8-1: Block diagram of the APCI-1500 Fig. 8-2: Block diagram of the CPCI-1500...
  • Page 39: Description

    Technical description Chapter 8 APCI-/CPCI-1500 8.1.2 Description The board APCI-/CPCI-1500 is intended for parallel input/output for digital signals in 24 V industrial environment. The peripheral and the system have a simultaneous optical isolation. The board offers: - 16 digital inputs: 14 are interruptible. - 3 counters (or timers): programmable by software - 1 timer: can be used as a watchdog for the outputs.
  • Page 40: Special Input Functions

    Technical description Chapter 8 APCI-/CPCI-1500 WARNING! Do you operate all inputs with the same voltage supply? The voltage supply must deliver at least 16 x 6 = 96 mA. The maximum input voltage is 30 V. Transil diodes, Z diodes, C filters and optical couplers protect the system bus from noise emitted by the peripheral.
  • Page 41: Digital Outputs

    Technical description Chapter 8 APCI-/CPCI-1500 8.2.2 Digital outputs The board supplies 16 optically isolated outputs. The outputs comply with the 24 V industry standard (IEC1131-2): The positive logic is used - logic "1": sets the output by software (switch on ON), - logic "0": resets the output (switch on OFF).
  • Page 42: Interrupt

    Technical description Chapter 8 APCI-/CPCI-1500 These error data are available through an interrupt routine. See API functions: i_APCI1500_SetBoardIntRoutineXX, i_APCI1500_ResetBoardIntRoutine. Fig. 8-4: Protection circuitry for the outputs 8.2.3 Interrupt The board has an interrupt line. An interrupt line of the PCI bus is allocated to the board through the BIOS.
  • Page 43: Counter/Timer

    Technical description Chapter 8 APCI-/CPCI-1500 8.2.4 Counter/timer On the board three 16-bit counters/timers are available in the component Z8536 (downwards counting). Each counter/timer can be programmed by software. If the component Z8536 operates as a counter, the corresponding inputs are used as follows: Counter Counter 1: Input 14 signal input.
  • Page 44: Input Frequencies

    Technical description Chapter 8 APCI-/CPCI-1500 Input frequencies The input frequency for the timer is selected through the software function i_APCI1500_InitTimerInputClock (...) Available frequencies: 111.86 kHz ± 100 ppm, 3.49 kHz ± 100 ppm, 1.747 kHz ± 100 ppm. IMPORTANT! The timer component internally operates with half of the input frequency. Data Approximate watchdog times: Input frequency...
  • Page 45: Standard Software

    APCI-/CPCI-1500 Technical description Chapter 9 STANDARD SOFTWARE Introduction IMPORTANT! Note the following conventions in the text: Function: "i_APCI1500_SetBoardAddress" Variable ui_Address Table 9-1: Type Declaration for Dos and Windows 3.1X Borland C Microsoft C Borland Microsoft Microsoft Pascal Visual Basic Visual Basic Windows VOID void...
  • Page 46: Din 66001- Graphical Symbols

    Technical description Chapter 9 APCI-/CPCI-1500 DIN 66001- Graphical symbols In this chapter are all the software functions (API) necessary for the operation of the APCI-/CPCI-1500 board. To illustrate these functions, we designed diagrams with the graphical symbols listed below. The user will hence have a quick outlook of the hierarchy between the different functions.
  • Page 47: Software Functions (Api)

    APCI-/CPCI-1500 Technical description Chapter 9 Software functions (API) Remark: The CPCI-1500 board is entirely compatible with the APCI-1500 board regarding the software installation and the device driver. The program ADDIREG will thus make no difference between the systems (PCI board or Compact PCI board).
  • Page 48 Technical description Chapter 9 APCI-/CPCI-1500 Input b_Compilerdefine Function diagram i_APCI1500_InitCompiler Begin b_CompilerDefine correct ? Save b_CompilerDefine i_APCI1500_InitCompiler i_APCI1500_InitCompiler Error Output <Return value>...
  • Page 49: I_Apci1500_Checkandgetpcislotnumber

    APCI-/CPCI-1500 Technical description Chapter 9 2) i_APCI1500_CheckAndGetPCISlotNumber (...) Syntax: <Return value> = i_APCI1500_CheckAndGetPCISlotNumber (PBYTE pb_SlotNumberArray) Parameters: - Input: No input signal has to occur. - Output: PBYTE pb_SlotNumberArray List of the slot numbers. Task: Checks all xPCI-1500 and returns the slot number of each xPCI-1500 board. Each pb_SlotNumberArray parameter contains the slot number (1 to 10) of one xPCI-1500 board.
  • Page 50 Technical description Chapter 9 APCI-/CPCI-1500 Input Function diagram i_APCI1500_CheckAndGetPCISlotNumber Begin Search next PCI board i_APCI1500_CheckAndGetPCISlotNumber board found? Returns the number of APCI-1500 APCI-1500 Board ? - Save slot number - Save base address - Save interrupt Output pb_SlotNumberArray <Return value>...
  • Page 51: I_Apci1500_Setboardinformation

    APCI-/CPCI-1500 Technical description Chapter 9 3) i_APCI1500_SetBoardInformation (...) Syntax: <Return value> = i_APCI1500_SetBoardInformation (BYTE b_SlotNumber, PBYTE pb_BoardHandle) Parameters: - Input: BYTE b_SlotNumber: Slot number of the xPCI-1500 board - Output: PBYTE pb_BoardHandle: Handle of board xPCI-1500 for using the functions Task: Checks if the board xPCI-1500 is present and stores the slot number.
  • Page 52 Technical description Chapter 9 APCI-/CPCI-1500 Input b_SlotNumber Function diagram i_APCI1500_SetBoardInformation Begin All APCI-1500 boards checked? i_APCI1500_CheckAndgetPCISlotNumber APCI-1500 board found? Input parameter Board present ? i_APCI1500_SetBoardInformation i_APCI1500_SetBoardInformation Error Output pb_BoardHandle <Return value>...
  • Page 53: I_Apci1500_Gethardwareinformation

    APCI-/CPCI-1500 Technical description Chapter 9 4) i_APCI1500_GetHardwareInformation (...) Syntax: <Return value> = i_APCI1500_GetHardwareInformation (BYTE b_BoardHandle, PUINT pui_BaseAddress, PBYTE pb_InterruptNbr, PBYTE pb_SlotNumber) Parameters: - Input BYTE b_BoardHandle Handle of board xPCI-1500 - Output: PUINT pui_BaseAddress xPCI-1500 base address PBYTE pb_InterruptNbr xPCI-1500 interrupt channel. PBYTE pb_SlotNumber xPCI-1500 slot number...
  • Page 54 Technical description Chapter 9 APCI-/CPCI-1500 Input b_BoardHandle Function diagram i_APCI1500_GetHardwareInformation Begin b_BoardHandle OK ? Returns: - Base address - interrupt number - Slot number i_APCI1500_GetHardwareInformation i_APCI1500_GetHardwareInformation Error Output pui_BaseAddress pb_SlotNumber pb_InterruptNumber <Return value>...
  • Page 55: I_Apci1500_Closeboardhandle

    APCI-/CPCI-1500 Technical description Chapter 9 5) i_APCI1500_CloseBoardHandle (..) IMPORTANT! Call up this function each time you want to leave the user program! Syntax: <Return value> = i_APCI1500_CloseBoardHandle (BYTE b_BoardHandle) Parameters: - Input: BYTE b_BoardHandle Handle of board xPCI-1500 - Output: No output signal has occurred.
  • Page 56 Technical description Chapter 9 APCI-/CPCI-1500 Input b_BoardHandle Function diagram i_APCI1500_CloseBoardHandle Begin b_BoardHandle OK ? Interrupt routine installed ? i_APCI1500_ResetBoardIntRoutine Release b_BoardHandle i_APCI1500_CloseBoardHandle i_APCI1500_CloseBoardHandle Error Output <Return value>...
  • Page 57: Interrupt

    APCI-/CPCI-1500 Technical description Chapter 9 9.3.2 Interrupt IMPORTANT! This function is only available for C/C++ and Pascal for DOS. 1) i_APCI1500_SetBoardIntRoutineDos (..) Syntax: <Return value> = i_APCI1500_SetBoardIntRoutineDos (BYTE b_BoardHandle, VOID v_FunctionName (BYTE b_BoardHandle, BYTE b_InterruptMask BYTE b_InputChannelNbr)) Parameters: - Input: BYTE b_BoardHandle Handle of board xPCI-1500...
  • Page 58: Table 9-3: Interrupt Mask

    Technical description Chapter 9 APCI-/CPCI-1500 The following errors are possible - overtemperature - short-circuit - no voltage is available If several boards are operated and if they have to react to interrupts, the variable b_BoardHandle returns the identification number (handle) of the board which has generated the interrupt.
  • Page 59 APCI-/CPCI-1500 Technical description Chapter 9 Calling convention: ANSI C : void v_FunctionName (unsigned char b_BoardHandle, unsigned char b_InterruptMask, unsigned int b_InputChannelNumber) i_ReturnValue; unsigned char b_BoardHandle; i_ReturnValue = i_APCI1500_SetBoardIntRoutineDos (b_BoardHandle, v_FunctionName ); Return value: 0: No error -1: The handle parameter of the board is wrong -2: Interrupt already installed...
  • Page 60 Technical description Chapter 9 APCI-/CPCI-1500 Input b_BoardHandle v_FunctionName Function diagram i_APCI1500_SetBoardIntRoutineDos Begin b_BoardHandle OK ? Board interrupt installed ? Save old interrupt routine Set API interrupt routine First interrupt installation ? Save v_FunktionName i_APCI1500_SetBoardIntRoutineDos i_APCI1500_SetBoardIntRoutineDos Error Output <Return value>...
  • Page 61: I_Apci1500_Setboardintroutinevbdos

    APCI-/CPCI-1500 Technical description Chapter 9 IMPORTANT! This function is only available for Visual Basic DOS. 2) i_APCI1500_SetBoardIntRoutineVBDos (..) Syntax: <Return value> = i_APCI1500_SetBoardIntRoutineVBDos (BYTE b_BoardHandle) Parameters: - Input: BYTE b_BoardHandle Handle of board xPCI-1500 - Output: No output signal has occurred. Task: This function must be called up for each xPCI-1500 on which an interrupt action is to be enabled.
  • Page 62 Technical description Chapter 9 APCI-/CPCI-1500 Calling convention: Visual Basic DOS: Dim Shared i_ReturnValue As Integer Dim Shared i_BoardHandle As Integer Dim Shared i_InterruptMask As Integer Dim Shared l_InputChannelNbr As Integer IntLabel: i_ReturnValue = i_APCI1500_TestInterrupt (i_BoardHandle, _ i_InterruptMask, _ i_InputChannelNbr) Return ON UEVENT GOSUB IntLabel UEVENT ON i_ReturnValue = i_APCI1500_SetBoardIntRoutineVBDos (b_BoardHandle)
  • Page 63 APCI-/CPCI-1500 Technical description Chapter 9 Input b_BoardHandle Function diagram i_APCI1500_SetBoardIntRoutineVBDos Begin b_BoardHandle OK ? Board interrupt installed ? Save old interrupt routine Set API interrupt routine First interrupt installation ? Save v_FunktionName i_APCI1500_SetBoardIntRoutineVBDos i_APCI1500_SetBoardIntRoutineVBDos Error Output <Return value>...
  • Page 64: I_Apci1500_Setboardintroutinewin16

    Technical description Chapter 9 APCI-/CPCI-1500 IMPORTANT! This function is only available for Windows 3.1 and Windows 3.11 3) i_APCI1500_SetBoardIntRoutineWin16 (..) Syntax: <Return value> = i_APCI1500_SetBoardIntRoutineWin16 (BYTE b_BoardHandle, VOID v_FunctionName (BYTE b_BoardHandle, BYTE b_InterruptMask, BYTE InputChannelNbr)) Parameters: - Input: BYTE b_BoardHandle Handle of board xPCI-1500 VOID v_FunctionName...
  • Page 65 APCI-/CPCI-1500 Technical description Chapter 9 The following errors are possible - overtemperature - short-circuit - no voltage is available If several boards are operated and if they have to react to interrupts, the variable b_BoardHandle returns the identification number (handle) of the board which has generated the interrupt.
  • Page 66 Technical description Chapter 9 APCI-/CPCI-1500 IMPORTANT! If you use Visual Basic for Windows the following parameters have no signification. You must use "i_APCI1500_TestInterrupt". VOID v_FunctionName (BYTE b_BoardHandle, BYTE b_InterruptMask, BYTE b_InputChannelNbr) Calling convention: ANSI C : void v_FunctionName (unsigned char b_BoardHandle, unsigned char b_InterruptMask, unsigned char b_InputChannelNbr) i_ReturnValue;...
  • Page 67 APCI-/CPCI-1500 Technical description Chapter 9 Input b_BoardHandle v_FunctionName Function diagram i_APCI1500_SetBoardIntRoutineWin16 Begin b_BoardHandle OK ? Board interrupt installed ? Save old interrupt routine Set API interrupt routine First interrupt installation ? Save v_FunktionName i_APCI1500_SetBoardIntRoutineWin16 i_APCI1500_SetBoardIntRoutineWin16 Error Output <Return value>...
  • Page 68: I_Apci1500_Setboardintroutinewin32

    Technical description Chapter 9 APCI-/CPCI-1500 IMPORTANT! This function is only available for Windows NT and Windows 2000/9x. 4) i_APCI1500_SetBoardIntRoutineWin32 (..) Syntax: <Return value> = i_APCI1500_SetBoardIntRoutineWin32 (BYTE b_BoardHandle, BYTE b_UserCallingMode, ULONG ul_UserSharedMemorySize, VOID ** ppv_UserSharedMemory, VOID v_FunctionName (BYTE b_BoardHandle, BYTE b_InterruptMask, BYTE b_InputChannelNbr, BYTE...
  • Page 69 APCI-/CPCI-1500 Technical description Chapter 9 Task: Windows 32-bit information For Windows NT and Windows 2000/9x, 4 running rings (ring 0 to ring 3) are available. - The user application operates in ring 3. This ring gives no access to hardware. - VXD and SYS driver operate in ring 0 and give access to hardware.
  • Page 70 Technical description Chapter 9 APCI-/CPCI-1500 User interrupt routine can be called : - directly by the driver interrupt routine (Synchronous mode). The code of the user interrupt routine directly operates in ring 0. - by the driver interrupt thread (Asynchronous mode). An event is generated and the interrupt thread calls up the user interrupt routine.
  • Page 71 APCI-/CPCI-1500 Technical description Chapter 9 ASYNCHRONOUS-MODE The user can debug the user interrupt routine provided he has not programmed in Visual Basic 5 The user routine can call Windows API functions. ADVANTAGE The user routine can call functions which give access to global variables. The user routine can call all xPCI-1500 driver functions with the following extension: "i_APCI1500_XXXX"...
  • Page 72 Technical description Chapter 9 APCI-/CPCI-1500 Mask Meaning 0000 0001 Event 1 has occurred 0000 0010 Event 2 has occurred 0000 0100 Counter/timer 1 has run down 0000 1000 Counter/timer 2 has run down 0001 0000 Counter 3 has run down 0010 0000 Watchdog has run down 0100 0000...
  • Page 73 APCI-/CPCI-1500 Technical description Chapter 9 void v_FunctionName (unsigned char b_BoardHandle, unsigned char b_InterruptMask, unsigned char b_InputChannelNbr, unsigned char b_UserCallingMode, void * pv_UserSharedMemory) str_UserStruct * ps_InterruptSharedMemory; ps_InterruptSharedMemory = (str_UserStruct *) pv_UserSharedMemory; i_ReturnValue; unsigned char b_BoardHandle; i_ReturnValue = i_APCI1500_SetBoardIntRoutineWin32 (b_BoardHandle, APCI1500_SYNCHRONOUS_MODE, sizeof (str_UserStruct), (void **) &ps_UserSharedMemory, v_FunctionName);...
  • Page 74 Technical description Chapter 9 APCI-/CPCI-1500 Input b_BoardHandle ul_UserSharedMemorySize b_UserCallingMode v_FunctionName Function diagram i_APCI1500_SetBoardintRoutineWin32 Begin b_BoardHandle OK ? Board interrupt installed ? Set API interrupt routine First interrupt installation ? Save v_FunktionName User shared Asynchronous memory mode ? size > 0 ? Set API interrupt Create user thread...
  • Page 75: I_Apci1500_Testinterrupt

    APCI-/CPCI-1500 Technical description Chapter 9 5) i_APCI1500_TestInterrupt (..) Syntax: <Return value> = i_APCI1500_TestInterrupt (PBYTE pb_BoardHandle, PBYTE pb_InterruptMask, PBYTE pb_ChannelNbr) Parameters: - Input: No input signal is to occur. - Output: PBYTE pb_BoardHandle Handle of the board PCI-1500 which has generated the interrupt, PBYTE pb_InterruptMask Error mask of the event which has generated the interrupt.
  • Page 76 Technical description Chapter 9 APCI-/CPCI-1500 Return value: -1: No interrupt > 0: IRQ number Input Function diagram i_APCI1500_TestInterrupt Begin Interrupt occurred? - Get pb_BoardHandle - Get pb_InterruptMask - Get pb_ChannelNbr i_APCI1500_TestInterrupt i_APCI1500_TestInterrupt Error Output b_BoardHandle pb_ChannelNbr b_InterruptMask <Return value>...
  • Page 77: I_Apci1500_Resetboardintroutine

    APCI-/CPCI-1500 Technical description Chapter 9 6) i_APCI1500_ResetBoardIntRoutine (..) Syntax: <Return value> = i_APCI1500_ResetBoardIntRoutine (BYTE b_BoardHandle) Parameters: - Input: BYTE b_BoardHandle Handle of board xPCI-1500 - Output: No output signal has occurred. Task: Stops the interrupt management of board xPCI-1500. Deinstalls the interrupt routine if the management of interrupts of all xPCI-1500 is stopped.
  • Page 78 Technical description Chapter 9 APCI-/CPCI-1500 Input b_BoardHandle Function diagram i_APCI1500_ResetBoardIntRoutine Begin b_BoardHandle OK ? Board interrupt installed? Restore old interrupt and disable APCI-1500 interrupt i_APCI1500_ResetBoardIntRoutine i_APCI1500_ResetBoardIntRoutine Error Output <Return value>...
  • Page 79: Kernel Functions

    APCI-/CPCI-1500 Technical description Chapter 9 9.3.3 Kernel functions 1) i_APCI1500_KRNL_Read16DigitalInput (...) Syntax: <Return value> = i_APCI1500_KRNL_Read16DigitalInput (UINT ui_BaseAddress, PLONG pl_InputValue) Parameters: - Input: UINT ui_BaseAddress xPCI-1500 base address - Output: PLONG pl_InputValue State of the digital input channels of both ports (0 to 65535) Task: Indicates the state of both ports.
  • Page 80: V_Apci1500_Krnl_Set16Digitaloutputon

    Technical description Chapter 9 APCI-/CPCI-1500 2) v_APCI1500_KRNL_Set16DigitalOutputOn (...) Syntax: <Return value> = v_APCI1500_KRNL_Set16DigitalOutputOn (UINT ui_BaseAddress, LONG l_Value) Parameters: - Input: UINT ui_BaseAddress xPCI-1500 base address LONG l_Value Output value (0 to 65535) - Output: No output signal has occurred. Task: Sets one or several output channels of board xPCI-1500 Example: l_Value = 5555 Hex...
  • Page 81: Digital Input Channel

    APCI-/CPCI-1500 Technical description Chapter 9 9.3.4 Digital input channel 1) i_APCI1500_Read1DigitalInput (...) Syntax : <Return value> = i_APCI1500_Read1DigitalInput (BYTE b_BoardHandle, BYTE b_Channel, PBYTE pb_ChannelValue) Parameters: BYTE b_BoardHandle Handle of board xPCI-1500 BYTE b_Channel The number of the input channel to be read (1 to 16) PBYTE pb_ChannelValue...
  • Page 82: I_Apci1500_Read16Digitalinput

    Technical description Chapter 9 APCI-/CPCI-1500 Example: b_Port = 1 pb_PortValue = 55 Hex A voltage is present on the input channels 1, 3, 5, 7 A voltage is not present on the input channels 2, 4, 6, 8. Return value: 0: No error -1: Handle parameter of the board is wrong -2: The parametered port number is wrong (parameter 1 or 2)
  • Page 83: Digital Input Channel - Events

    APCI-/CPCI-1500 Technical description Chapter 9 9.3.5 Digital input channel - events 1) i_APCI1500_SetInputEventMask (...) Syntax: <Return value> = i_APCI1500_SetInputEventMask (BYTE b_BoardHandle, BYTE b_PortNbr, BYTE b_Logik, PCHAR pc_EventMask) Parameters: BYTE b_BoardHandle Handle of board xPCI-1500 BYTE b_Port Number of the input port to be masked (1 or 2) BYTE b_Logik...
  • Page 84 Technical description Chapter 9 APCI-/CPCI-1500 IMPORTANT! If you use the APCI1500_OR_PRIORITY logic, you cannot use edge events. If you use the APCI1500_AND logic, you can only use one edge event. Task: An event can be generated for each port. The first event is related to the first 8 input channels (port 1). The second event is related to the next 6 input channels (port 2).
  • Page 85 APCI-/CPCI-1500 Technical description Chapter 9 Input 8 Input 7 Input 6 Input 5 Input 4 Input 3 Input 2 Inputl 1 1st event on input 1 2nd event on input 3 3rd event on input 8 4th event on input 2 5th event on input 4 6th event...
  • Page 86: I_Apci1500_Startinputevent

    Technical description Chapter 9 APCI-/CPCI-1500 2) i_APCI1500_StartInputEvent (...) Syntax : <Return value> = i_APCI1500_StartInputEvent (BYTE b_BoardHandle, BYTE b_PortNbr) Parameters: BYTE b_BoardHandle Handle of the xPCI-1500 BYTE b_Port Number of the input port (1 or 2) Task: As soon as the function is called, it is possible to process an event on one port. First mask the input channels with the following function i_APCI1500_SetInputEventMask .
  • Page 87: Digital Output Channel

    APCI-/CPCI-1500 Technical description Chapter 9 9.3.6 Digital output channel 1) i_APCI1500_SetOutputMemoryOn (...) Syntax: <Return value> = i_APCI1500_SetOutputMemoryOn (BYTE b_BoardHandle) Parameters: BYTE b_BoardHandle Handle of the xPCI-1500 Task: Activates the digital output memory. After calling this function, the output channels you have previously activated with the functions "i_APCI1500_SetXDigitalOutputOn"...
  • Page 88: I_Apci1500_Set1Digitaloutputoff

    Technical description Chapter 9 APCI-/CPCI-1500 Task: Sets the output channel which has been passed with b_Channel. Setting an output channel means setting an output channel on high. Switching on the digital output memory (ON) see function "i_APCI1500_SetOutputMemoryOn (...) b_Channel= 1 The output channel 1 is set.
  • Page 89: I_Apci1500_Set8Digitaloutputon

    APCI-/CPCI-1500 Technical description Chapter 9 5) i_APCI1500_Set8DigitalOutputOn (...) Syntax: <Return value> = i_APCI1500_Set8DigitalOutputOn (BYTE b_BoardHandle, BYTE b_Port, BYTE b_Value) Parameters: BYTE b_BoardHandle Handle of the board xPCI-1500 BYTE b_Port Number of the output port (1 or 2) BYTE b_Value Output value (0 to 255) Task: Sets one or several output channels of a port.
  • Page 90: I_Apci1500_Set8Digitaloutputoff

    Technical description Chapter 9 APCI-/CPCI-1500 6) i_APCI1500_Set8DigitalOutputOff (...) Syntax: <Return value> = i_APCI1500_Set8DigitalOutputOff (BYTE b_BoardHandle, BYTE b_Port, BYTE b_Value) Parameters: BYTE b_BoardHandle Handle of the xPCI-1500 BYTE b_Port Number of the output port (1 or 2) BYTE b_Value Output value (0 to 255) Task: Resets one or several output channels of one port.
  • Page 91: V_Apci1500_Set16Digitaloutputoff

    APCI-/CPCI-1500 Technical description Chapter 9 Example: Switching on the digital output memory (ON) see function "i_APCI1500_SetOutputMemoryOn (...) l_Value = 5555 Hex The output channels 1, 3, 5, 7, 9, 11, 13, 15 are set. The other output channels hold their state. Switching off the digital output memory (OFF) see function "i_APCI1500_SetOutputMemoryOff (...) l_Value = 5555 Hex...
  • Page 92: Timer/Counter And Watchdog

    Technical description Chapter 9 APCI-/CPCI-1500 IMPORTANT! You can use this function only if the digital output memory is ON. See function i_APCI1500_SetOutputMemoryOn (..). Return value: 0: No error -1: The handle parameter of the board is wrong -2: The digital output memory is OFF. Please first use the function "i_APCI1500_SetOutputMemoryOn"...
  • Page 93: I_Apci1500_Inittimercounter1

    APCI-/CPCI-1500 Technical description Chapter 9 2) i_APCI1500_InitTimerCounter1 (...) Syntax: <Return value> = i_APCI1500_InitTimerCounter1 (BYTE b_BoardHandle, BYTE b_CounterOrTimerSelect, LONG_ l_ReloadValue, BYTE b_ContinuousOrSingleCycleSelect, BYTE b_InterruptHandling) Parameters: BYTE b_BoardHandle: Handle of the xPCI-1500 BYTE b_CounterOrTimerSelect: Select the mode of the first counter/timer - APCI1500_TIMER : The first counter/timer is used as timer - APCI1500_COUNTER : The first counter/timer is used as counter...
  • Page 94: I_Apci1500_Inittimercounter2

    Technical description Chapter 9 APCI-/CPCI-1500 3) i_APCI1500_InitTimerCounter2 (...) Syntax: <Return value> = i_APCI1500_InitTimerCounter2 (BYTE b_BoardHandle, BYTE b_CounterOrTimerSelect, LONG l_ReloadValue, BYTE b_ContinuousOrSingleCycleSelect, BYTE b_HardwareOrSoftwareTriggerSelect, BYTE b_HardwareOrSoftwareGateSelect, BYTE b_InterruptHandling) Parameters: BYTE b_BoardHandle Handle of the xPCI-1500 BYTE b_CounterOrTimerSelect Selects the mode of the 2 counter/timer - APCI1500_TIMER : The 2nd counter/timer is used as a timer...
  • Page 95 APCI-/CPCI-1500 Technical description Chapter 9 BYTE b_InterruptHandling Interrupts can be generated, when the counter has run down, or when the timer output is on high. With this parameter the user decides if interrupts are used or not. - APCI1500_ENABLE: Interrupts are enabled. - APCI1500_DISABLE: Interrupts are disabled.
  • Page 96: I_Apci1500_Initwatchdogcounter3

    Technical description Chapter 9 APCI-/CPCI-1500 4) i_APCI1500_InitWatchdogCounter3 (...) Syntax: <Return value> = i_APCI1500_InitWatchdogCounter3 (BYTE b_BoardHandle, BYTE b_WatchdogOrCounterSelect, LONG l_ReloadValue, BYTE b_ContinuousOrSingleCycleSelect, BYTE b_HardwareOrSoftwareGateSelect, BYTE b_InterruptHandling) Parameters: BYTE b_BoardHandle Handle of the xPCI-1500 BYTE b_WatchdogOrCounterSelect Selects the mode of the third counter/watchdog - APCI1500_WATCHDOG : The third counter/watchdog is used as a...
  • Page 97: I_Apci1500_Starttimercounter1

    APCI-/CPCI-1500 Technical description Chapter 9 Task: Selects the operating mode of the third counter/watchdog. Enter its limit. You have to decide: - if the counter must execute once or several times the counting operation, - if the counter/watchdog is used as a counter or a watchdog, - if an interrupt must be generated when the counter/watchdog has run down, - and if the external gate is used (if it is used as a counter).
  • Page 98: I_Apci1500_Starttimercounter2

    Technical description Chapter 9 APCI-/CPCI-1500 6) i_APCI1500_StartTimerCounter2 (...) Syntax: <Return value> = i_APCI1500_StartTimerCounter2 (BYTE b_BoardHandle) Parameters: BYTE b_BoardHandle Handle of the xPCI-1500 Task: Starts the second counter/timer, Please initialise it previously with the function "i_APCI1500_InitTimerCounter2". If the counter is used, it is now ready for counting. If the timer is used, it is now running.
  • Page 99: I_Apci1500_Stoptimercounter1

    APCI-/CPCI-1500 Technical description Chapter 9 8) i_APCI1500_StopTimerCounter1 (...) Syntax: <Return value> = i_APCI1500_StopTimerCounter1 (BYTE b_BoardHandle) Parameters: BYTE b_BoardHandle Handle of the xPCI-1500 Task: Stops the first counter/timer. The timer counter value is freezed. It has the same influence as a hardware gate. Input Clock Timer...
  • Page 100: I_Apci1500_Stopcounter3

    Technical description Chapter 9 APCI-/CPCI-1500 10) i_APCI1500_StopCounter3 (...) Syntax: <Return value> = i_APCI1500_StopCounter3 (BYTE b_BoardHandle) Parameters: BYTE b_BoardHandle Handle of the xPCI-1500 Task: Stops the third counter. The counter value is freezed. Return value: 0: No error -1: The handle parameter of the board is wrong -2: The counter has not been initialised -3: The counter/watchdog has been initialised as a watchdog.
  • Page 101: I_Apci1500_Triggercounter3

    APCI-/CPCI-1500 Technical description Chapter 9 13) i_APCI1500_TriggerCounter3 (...) Syntax: <Return value> = i_APCI1500_TriggerCounter3 (BYTE b_BoardHandle) Parameters: BYTE b_BoardHandle Handle of the xPCI-1500 Task: Triggers the third counter. The start value is loaded in the counter. Return value: 0: No error -1: The handle parameter of the board is wrong -2: The counter has not been initialised -3: The counter/watchdog has been initialised as a watchdog.
  • Page 102: I_Apci1500_Readtimercounter2

    Technical description Chapter 9 APCI-/CPCI-1500 Counter: the counter value is decremented each time the input channel changes from low to high. This counter value can be read with this function. Timer: the timer value is decremented each time the input clock changes from low to high.
  • Page 103: I_Apci1500_Readcounter3

    APCI-/CPCI-1500 Technical description Chapter 9 17) i_APCI1500_ReadCounter3 (...) Syntax: <Return value> = i_APCI1500_ReadCounter3 (BYTE b_BoardHandle, PLONG_ pl_ReadValue) Parameters: BYTE b_BoardHandle Handle of the xPCI-1500 PLONG pl_ReadValue When the counter/watchdog is used as a counter, it returns the current value of the counter. Task: Reads the current value of the third counter/watchdog if used as a counter.
  • Page 104: Examples

    Technical description Chapter 10 APCI-/CPCI-1500 EXAMPLES 10.1 Initialisation 10.1.1 Initialisation of one xPCI-1500 board a) Flow chart Initialisation Begin If Windows program then i_APCI1500_InitCompiler i_APCI1500_CheckAndGetPCISlotNumber APCI-1500 board found ? (return value > 0 ?) i_APCI1500_SetBoardInformation Initialisation OK ? (return value = 0 ?) Initialisation Initialisation Error...
  • Page 105: B) Example In C

    APCI-/CPCI-1500 Technical description Chapter 10 b) Example in C int Initialisation(unsigned char *pb_BoardHandle) unsigned char b_SlotNumberArray [8]; #if defined (_Windows) || defined (_WINDOWS) || defined (_WIN32) i_APCI1500_InitCompiler (DLL_COMPILER_C); #endif if(i_PCI1710_CheckAndGetPCISlotNumber (b_SlotNumberArray)) if(i_APCI1500_SetBoardInformation (b_SlotNumberArray pb_BoardHandle) == 0) return (0); /* OK */ else return (-1);...
  • Page 106: Initialisation Of Several Xpci-1500 Boards

    Technical description Chapter 10 APCI-/CPCI-1500 10.1.2 Initialisation of several xPCI-1500 boards a) Flow chart Initialisation Begin If Windows program then i_APCI1500_InitCompiler i_APCI1500_CheckAndGetPCISlotNumber APCI-1500 board found ? (return value > 0 ?) i_APCI1500_SetBoardInformation Initialisation OK ? (return value = 0 ?) Initialisation Initialisation Error...
  • Page 107: B) Example In C

    APCI-/CPCI-1500 Technical description Chapter 10 b) Example in C int MoreInitialisation(unsigned char *pb_BoardHandleArray) i_NbrOfBoard; i_Cpt; unsigned char b_SlotNumberArray [8]; #if defined (_Windows) || defined (_WINDOWS) || defined (_WIN32) i_APCI1500_InitCompiler (DLL_COMPILER_C); #endif i_NbrOfBoard = i_PCI1710_CheckAndGetPCISlotNumber (b_SlotNumberArray) if(i_NbrOfBoard > 0) for (i_Cpt = 0; i_Cpt < i_NbrOfBoard; i_Cpt ++) if (i_APCI1500_SetBoardInformation (b_SlotNumberArray i_Cpt &pb_BoardHandleArray [i_Cpt]) != 0)
  • Page 108: Interrupt

    Technical description Chapter 10 APCI-/CPCI-1500 10.2 Interrupt 10.2.1 Interrupt routine a) Flow chart Interrupt routine Begin Interrupt mask Increment the event Mask interrupt = 0x1 counter of port 1 Increment the event Mask interrupt = 0x2 counter of port 2 Increment the Mask interrupt = 0x4 counter of...
  • Page 109: B) Example In C For Dos And Windows 3.1X

    APCI-/CPCI-1500 Technical description Chapter 10 b) Example in C for DOS and Windows 3.1x unsigned char b_EventCpt [2], b_TimerCounterCpt [3]; /* Global buffer unsigned char b_WatchdogCpt, b_VoltageErrorCpt; _VOID_ v_InterruptRoutine (BYTE_ b_BoardHandle, BYTE_ b_InterruptMask, BYTE_b_InputChannelNbr) if (b_InterruptMask & 0x1) /**************************/ b_EventCpt [0] = b_EventCpt [0] + 1; /* Event port 1 interrupt */ /**************************/ if (b_InterruptMask &...
  • Page 110: C) Example In C For Windows Nt And Windows 95/98 (In Asynchronous Mode)

    Technical description Chapter 10 APCI-/CPCI-1500 c) Example in C for Windows NT and Windows 95/98 (in asynchronous mode) unsigned char b_EventCpt [2], b_TimerCounterCpt [3]; /* Global buffer unsigned char b_WatchdogCpt, b_VoltageErrorCpt; _VOID_ v_InterruptRoutine (BYTE_ b_BoardHandle, BYTE_ b_InterruptMask, BYTE_ b_InputChannelNbr, BYTE_ b_UserCallingMode, VOID *pv_UserSharedMemory) if (b_InterruptMask &...
  • Page 111: D) Example For Windows Nt And Windows 95/98 (In Synchronous Mode)

    APCI-/CPCI-1500 Technical description Chapter 10 d) Example for Windows NT and Windows 95/98 (in synchronous mode) typedef struct unsigned char b_EventCpt [2], b_TimerCounterCpt [3]; unsigned char b_WatchdogCpt, b_VoltageErrorCpt; }str_UserStruct; _VOID_ v_InterruptRoutine (BYTE_ b_BoardHandle, BYTE_ b_InterruptMask, BYTE_b_InputChannelNbr, BYTE_ b_UserCallingMode, VOID *pv_UserSharedMemory) str_UserStruct * ps_UserStruct = (str_UserStruct *) pv_UserSharedMemory;...
  • Page 112: Timer Interrupt

    Technical description Chapter 10 APCI-/CPCI-1500 10.2.2 Timer interrupt a) Flow chart Timer 1 interrupt test Loop Begin Write Initialisation number of interrupt Until a key is Return value = 0 pressed i_APCI1500_SetBoardIntRoutine i_APCI1500_StopTimerCounter1 Return value = 0 i_APCI1500_ResetBoardIntRoutine i_APCI1500_CloseBoardHandle i_APCI1500_InitTimerCounter1 Timer 1 interrupt test i_APCI1500_StartTimerCounter1...
  • Page 113: B) Example In C For Dos

    APCI-/CPCI-1500 Technical description Chapter 10 b) Example in C for DOS void main (void) i_ReturnValue; unsigned char b_BoardHandle; if (Initialisation (&b_BoardHandle) == 0) if (i_APCI1500_SetBoardIntRoutineDos (b_BoardHandle, v_InterruptRoutine) == 0) i_ReturnValue = i_APCI1500_InitTimerInputClock (b_BoardHandle, APCI1500_1_8_KHZ); printf ("\nTimer input clock initialisation return value = %d", i_ReturnValue); i_ReturnValue = i_APCI1500_InitTimerCounter1 (b_BoardHandle, APCI1500_TIMER,...
  • Page 114: C) Example In C For Windows 3.1X

    Technical description Chapter 10 APCI-/CPCI-1500 c) Example in C for Windows 3.1x void main (void) i_ReturnValue; unsigned char b_BoardHandle; if (Initialisation (&b_BoardHandle) == 0) if (i_APCI1500_SetBoardIntRoutineWin16 (b_BoardHandle, v_InterruptRoutine) == 0) i_ReturnValue = i_APCI1500_InitTimerInputClock (b_BoardHandle, APCI1500_1_8_KHZ); printf ("\nTimer input clock initialisation return value = %d", i_ReturnValue); i_ReturnValue = i_APCI1500_InitTimerCounter1 (b_BoardHandle, APCI1500_TIMER,...
  • Page 115: D) Example In C For Windows Nt/95/98 (In Asynchronous Mode)

    APCI-/CPCI-1500 Technical description Chapter 10 d) Example in C for Windows NT/95/98 (in asynchronous mode) void main (void) i_ReturnValue; unsigned char b_BoardHandle; if (Initialisation (&b_BoardHandle) == 0) if (i_APCI1500_SetBoardIntRoutineWin32 (b_BoardHandle, APCI1500_ASYNCHRONOUS_MODE, 0, NULL, v_InterruptRoutine) == 0) i_ReturnValue = i_APCI1500_InitTimerInputClock (b_BoardHandle, APCI1500_1_8_KHZ); printf ("\nTimer input clock initialisation return value = %d", i_ReturnValue);...
  • Page 116: E) Example In C For Windows Nt/95/98 (In Synchronous Mode)

    Technical description Chapter 10 APCI-/CPCI-1500 e) Example in C for Windows NT/95/98 (in synchronous mode) str_UserStruct * ps_GlobalUserStruct; void main (void) i_ReturnValue; unsigned char b_BoardHandle; if (Initialisation (&b_BoardHandle) == 0) if (i_APCI1500_SetBoardIntRoutineWin32 (b_BoardHandle, APCI1500_SYNCHRONOUS_MODE, sizeof (str_UserStruct), (void **) &ps_GlobalUserStruct, v_InterruptRoutine) == 0) i_ReturnValue = i_APCI1500_InitTimerInputClock (b_BoardHandle, APCI1500_1_8_KHZ);...
  • Page 117: Index

    INDEX APCI-/CPCI-1500 INDEX ADDIREG 15–20 functions of the board 29–35 changing the configuration 20 gate 34 uninstallation 25 installation 10–14 board component schemes 8 intended purpose of the board 1 functions 29–35 handling 3 Internet inserting 12 error analysis 25 physical set-up 4 interrupt 31, 33 component schemes 8...

This manual is also suitable for:

Addinum apci-1500

Table of Contents