background image

CP380

Digital I/O Board

for CompactPCI Applications

Manual ID 19313, Rev. Index 0100

Feb 99

The product described in this manual is
in compliance with all applied CE stan-
dards.

Summary of Contents for CP380

Page 1: ...CP380 Digital I O Board for CompactPCI Applications Manual ID 19313 Rev Index 0100 Feb 99 The product described in this manual is in compliance with all applied CE stan dards ...

Page 2: ... PEP Modular Computers GmbH This page was intentionally left blank ...

Page 3: ...planation of Symbols 0 5 For Your Safety 0 6 High Voltage Safety Instructions 0 6 Special Handling and Unpacking Instructions 0 6 General Instructions on Usage 0 7 Two Years Warranty 0 8 Table of Contents 0 9 ID 19313 Rev 0100 Page 0 3 PEP Modular Computers GmbH ...

Page 4: ... use or application of any circuit product or example shown in this document PEP Modular Computers reserve the right to change modify or improve this document or the product described herein as seen fit by PEP Modular Computers without further notice Trademarks PEP Modular Computers the PEP logo and CXM are trade marks owned by PEP Modular Computers GmbH Kaufbeuren Germany In addition this documen...

Page 5: ...that electronic boards and their components are sensitive to static electricity There fore care must be taken during all handling operations and inspections of this product in order to ensure product integ rity at all times Please read also the section Special Handling and Unpack ing Instructions of this manual Attention This symbol and title emphasize aspects which if not read through carefully b...

Page 6: ...y done by touching a metal part of your system housing It is particularly important to observe standard anti static precautions when changing piggybacks ROM devices jumper settings etc If the product contains batteries for RTC or memory back up ensure that the board is not placed on conductive surfaces includ ing anti static plastics or sponges They can cause short circuits and damage the batter i...

Page 7: ...he operational temperature range of the specific board version which must not be exceeded If batter ies are present their temperature restrictions must be taken into account In performing all necessary installation and application operations please follow only the instructions supplied by the present manual Keep all the original packaging material for future storage or warranty shipments If it is ...

Page 8: ...ent of repair refunding or replacement of any part the ownership of the removed or replaced parts reverts to PEP Modular Computers and the remaining part of the original guarantee or any new guarantee to cover the repaired or replaced items will be transferred to cover the new or repaired items Any extensions to the original guarantee are considered gestures of goodwill and will be defined in the ...

Page 9: ... 1 4 1 3 CP380 Models 1 7 1 4 System Requirements 1 7 1 5 Board Layouts 1 8 1 6 Block Diagrams 1 9 1 7 General Notes 1 10 1 8 Optocouplers 1 12 1 9 Specifications 1 13 1 10 Applied Standards 1 14 1 11 Related Publications 1 15 Chapter 2 2 Installation 2 3 2 1 Hardware Installation 2 3 2 2 Driver Installation 2 3 2 3 Uninstall 2 4 2 4 Test Program 2 5 2 5 Software 2 6 ...

Page 10: ...gs 3 3 3 2 Pinouts 3 3 Chapter 4 4 Programming 4 3 4 1 High Level Language Programming 4 3 4 2 HP VEE Programming 4 4 4 3 LabVIEW Programming 4 5 Chapter 5 5 Function Reference 5 3 5 1 Functional Overview of the 32 Bit Driver 5 3 5 2 Naming Conventions 5 3 5 3 Definitions 5 3 5 4 Description of the API Functions 5 4 ...

Page 11: ...ts 1 7 1 5 Board Layouts 1 8 1 6 Block Diagrams 1 9 1 7 General Notes 1 10 1 7 1 Modes of Operation 1 10 1 7 2 Wiring 1 11 1 8 Optocouplers 1 12 1 8 1 External Power for the Optocouplers 1 12 1 9 Specifications 1 13 1 10 Applied Standards 1 14 1 10 1 CE Compliance 1 14 1 10 2 Mechanical Compliance 1 14 1 10 3 Environmental Tests 1 14 1 11 Related Publications 1 15 1 11 1 CompactPCI Systems Boards ...

Page 12: ... PEP Modular Computers GmbH This page was intentionally left blank ...

Page 13: ...hanical compo nents and high performance connector technologies to provide systems that are well suited for rugged applications CompactPCI stands for systems that are electrically compatible with the PCI Specification allowing low cost PCI components to be used CompactPCI is an open specification supported by PICMG 1 1 2 Main Features of CompactPCI Systems Some of the outstanding features of the C...

Page 14: ...e supported by dedicated boards Communication Communication boards are provided for the currently relevant industrial communication systems such as Fast Ethernet Fieldbus Control Fieldbus control boards provide data exchange with field control and automation sub systems like PEP Modular Computers SMART2 or VMEbus systems using up to date transmission standards for example CAN fieldbus control PROF...

Page 15: ...height and 6U double height boards and as 4HP single width and 8HP double width boards Please note that the following units of measurement are used to express the dimensions of PEP CompactPCI card slots Height 1 U 44 45 mm Width 1 HP 5 08 mm On certain boards carriers with PMC connectors PMC add on modules can also be installed Please note that the form factor of PEP Modular Computers PMC modules ...

Page 16: ...em Image Control WD Timer HDD FDD CD ROM COM LPT Keyboard SMART2 SMART I O PEP9300 Host Computer W W W CPU Server Computer Fast Ethernet VGA LVDS Graphics F Ethernet Communic RGB SYNC Industrial I O Digital I O Analog I O CPCI Backplane Fieldbus PROFIBUS CAN Host Computer Multi Processor CompactPCI Workstation Add on Carriers Add ons ...

Page 17: ...installation of the board into data acquisition and control applications PEP support is provided for Windows NT HP VEE Hewlett Packard and LabVIEW National Instruments drivers are avail able on disk 1 4 System Requirements All the CP380 versions are designed for installation into CompactPCI systems only e g the CP ASM 3 4 6 7 Tower 3 Table 1 1 Models in the CP380 Range Model Opto Isolated Inputs O...

Page 18: ...100 Page 1 8 PEP Modular Computers GmbH 1 5 Board Layouts Figure 1 2 CP380 I and CP380 O Board Layout Figure 1 3 CP380 I O Board Layout Modular Computers Optocoupler CP380 O Optocoupler CP380 I Modular Computers Optocoupler Optocoupler ...

Page 19: ...Functional Block Diagram Figure 1 5 CP380 O Functional Block Diagram 25 Pin DSUB Male Optocouplers Optocouplers Optocouplers PIO 8255A BUS Interface Logic V V V V V V 8 8 2 8 8 2 PA PB PC CPCI INTERFACE 25 Pin sub D male Optocouplers Optocouplers V V V V 8 8 8 8 PA PB BUS Interface Logic CPCI INTERFACE PIO 8255A ...

Page 20: ...s of the 8255 device which are configured by software Operation without Interrupt 18 digital inputs In this operation mode data input can be performed The data is read in from the chosen port and no handshaking is required By configuring the 8255 PIO device for mode 0 operation two ports port A and B both 8 bits wide and one port PC2 and PC4 2 bits wide are available for data input Important The e...

Page 21: ...o operational modes of the 8255 device are used by the CP380 I O Operation without Interrupt 8 outputs and 10 inputs In this operation mode port A is used for data output and ports B and C are used for data input Data is written to or read from the chosen port and no handshaking is required By configuring the 8255 for mode 0 one output port port A 8 bit wide and two input ports port B 8 bit wide p...

Page 22: ...r are labelled ext V and ext GND see Chapter 3 Section 3 2 on page 3 3 The inputs and outputs of the CP380 I CP380 O and CP380 I O can be powered typically with 24V signals The interrupt inputs of the CP380 I and CP380 I O trigger on a falling edge The external supply voltage can be anywhere from 20V to 28V so small variations in the voltage will have no effect on the board Output Wiring CP380 O a...

Page 23: ...age 28V Input Current 7 mA at nominal input voltage Electrical Isolation 500 V DC against PC GND Transfer Rate Max 1 kHz effective suppression of volt age peaks in µs range Handshake Negative edge triggered signal Digital Outputs CP380 O and CP380 I O Number CP380 O 16 CP380 I O 8 Defined Level at Power On Off Low Type 8255 PIO Output Voltage Tristate output min high level Input Voltage 0 1 volt M...

Page 24: ...IEC68 2 6 Random Vibration IEC68 2 64 3U boards Permanent Shock IEC68 2 29 Single Shock IEC68 2 27 General Data Physical Size 100 x 160 mm Weight 160g Connectors 25pin D Sub male connector CP380 I and CP380 O 2 x 15pin D Sub male Connector CP380 I O Temperature Operation 0 60ºC standard E1 25 75ºC extended Storage 40 85ºC extended Humidity 0 90 non condensing Ext Power Supply 24 V nominal Fuse for...

Page 25: ...elated Publications 1 11 1 CompactPCI Systems Boards CompactPCI Specification V 2 0 Rev 2 1 1 11 2 PMC Add On Modules Carriers Draft Standard for a Common Mezzanine Card Family P1386 Draft 2 0 Draft Standard Physical and Environment Layers for PCI Mezzanine Cards P1386 1 Draft 2 0 ...

Page 26: ... PEP Modular Computers GmbH This page was intentionally left blank ...

Page 27: ...Hardware Installation 2 3 2 2 Driver Installation 2 3 2 2 1 Windows NT 4 0 2 3 2 2 2 Updating the System Driver 2 4 2 2 3 Changing the Board Settings 2 4 2 3 Uninstall 2 4 2 3 1 Uninstall a Single Board 2 4 2 3 2 Uninstall the Driver System 2 5 2 4 Test Program 2 5 2 5 Software 2 6 Chapter 2 ...

Page 28: ... PEP Modular Computers GmbH This page was intentionally left blank ...

Page 29: ...r the path for the SETUP EXE file on the installation disk provided or click Browse Confirm the selection and follow the instructions of the setup program The installation program will start In the window Install Options choose Install a new board and confirm the selection with OK Follow the installation program instructions and make sure you have your serial number ready The following files will ...

Page 30: ...pen enter the path for the SETUP EXE file on the installation disk provided or click Browse Confirm the selection and follow the instructions of the installation program The installation program will start In the window Install Options choose Update settings of an installed board and confirm the selection with OK Follow the setup program instructions Reboot your computer 2 3 Uninstall 2 3 1 Uninst...

Page 31: ...ed in the ME 9x subdirectory of the C PEP directory default path From the Windows Start menu under the path Settings Control Panel Add Remove Programs in the property page Install Uninstall choose the ME 9x Driver Uninstall option and confirm the selection with OK This will remove the entire CP380 Driver System from your computer 2 4 Test Program A simple test program is delivered with the board T...

Page 32: ...ered separately from PEP Modular Computers GmbH Table 2 1 Software Windows NT 4 0 Platform SOFTWARE TYPE PRODUCT Driver s CP380 system driver included High Level Language Support 32 bit High Level Language Libraries for Visual C V 4 0 or higher Delphi V 2 0 or higher Visual Basic V 4 0 or higher included Graphical Programming Tools HP VEE Driver System for HP VEE V 4 0 or higher included CP380 Dri...

Page 33: ...CP380 ID 19313 Rev 0100 Configuration Page 3 1 PEP Modular Computers GmbH Configuration 3 1 Jumper Settings 3 3 3 2 Pinouts 3 3 Chapter 3 ...

Page 34: ... PEP Modular Computers GmbH This page was intentionally left blank ...

Page 35: ... There are no settings required before installing the board into the computer 3 2 Pinouts The CP380 I front panel is provided with a 25 Pin DSUB male input connector the CP380 O with a 25 Pin DSUB male output connector Figure 3 1 Pinouts of the CP380 I Input Connector Left and the CP380 O Output Connector Right The CP380 I O front panel is provided with two connectors an upper and a lower 15 pin D...

Page 36: ...80 Configuration ID 19313 Rev 0100 Page 3 4 PEP Modular Computers GmbH Figure 3 2 Pinout of the CP380 I O Upper Connector Output Connector Figure 3 3 Pinout of the CP380 I O Lower Connector Input Connector ...

Page 37: ...3 4 1 1 C Programming 4 3 4 1 2 Delphi Programming 4 3 4 1 3 Basic Programming 4 3 4 1 4 Example Programs 4 3 4 2 HP VEE Programming 4 4 4 2 1 The ME Board Menu 4 4 4 2 2 HP VEE Example Programs 4 4 4 2 3 User Objects 4 4 4 3 LabVIEW Programming 4 5 4 3 1 LabVIEW Example Programs 4 5 4 3 2 Virtual Instruments 4 5 Chapter 4 ...

Page 38: ... PEP Modular Computers GmbH This page was intentionally left blank ...

Page 39: ...nitions are used the header file MEDEFS H must also be linked into the project Please be sure to read the notes in these files 4 1 2 Delphi Programming The TPU source files ME9x PAS including the definitions of the API function calls have to be linked into your project for Delphi version 2 0 or later If macro definitions are used the macro definition file MEDEFS PAS must also be linked into the pr...

Page 40: ...P380 4 2 2 HP VEE Example Programs For demonstration purposes and to assist understanding demo programs using the important UOs have been written They can be accessed via the menu item ME Board Demos The HP VEE demo programs contain partial additions to the normal UOs and for differ entiation from the normal UOs the prefix x is used in their file name 4 2 3 User Objects For convenient use of the d...

Page 41: ...ng demo programs using the important Virtual Instruments VIs have been written They can be accessed via the menu item File Open 4 3 2 Virtual Instruments For convenient use of the driver predefined Virtual Instruments VIs have been devel oped They can be accessed via the additional menu item File Open and be included in the LabVIEW development environment They can be placed and wired in your appli...

Page 42: ... PEP Modular Computers GmbH This page was intentionally left blank ...

Page 43: ...Reference 5 1 Functional Overview of the 32 Bit Driver 5 3 5 2 Naming Conventions 5 3 5 3 Definitions 5 3 5 4 Description of the API Functions 5 4 5 4 1 General Functions 5 4 5 4 2 Digital Input 5 6 5 4 3 Digital Output 5 13 5 4 4 Interrupt Handling 5 20 5 4 5 Error Handling 5 25 Chapter 5 ...

Page 44: ... PEP Modular Computers GmbH This page was intentionally left blank ...

Page 45: ...ion of the board In the following description of the functions this parameter is referred to as iBoardNumber 5 2 Naming Conventions These functions were written specifically for the CP380 board family For Visual C and Delphi Pascal every API function starts with an underscore _ this is not so in Borland C and BASIC The function names were selected to be as descriptive as possible Each function nam...

Page 46: ...Digital Output Interrupt Handling Error Handling 5 4 1 General Functions 5 4 1 1 _me9xGetBoardVersion Syntax C Syntax Delphi Syntax Basic Description Determines the board version number of an installed board of the board family CP380 int _me9xGetBoardVersion int iBoardNumber int piDevices Function _me9xGetBoardVersion iBoardNumber integer Var iDevices integer integer Declare Function me9xGetBoardV...

Page 47: ...e Returns Version number This 32 bit value has the main version in the upper 16 bits and the sub version in the lower 16 bits BoardNumber Board number for 1 2 3 16 installed CP380 I CP380 O or CP380 I O possible values 0 15 Version Pointer to an integer value returning the board version Possible values 94Hex for CP380 I 95Hex for CP380 O 96Hex for CP380 I O 1 Function executed successfully 0 Error...

Page 48: ...Basic Description This function is only for the CP380 I This function determines the status of a single input line int _me94DIGetBit int iBoardNumber int iBitNo int piBitValue Function _me94DIGetBit iBoardNumber integer iBitNo integer Var iBitValue integer integer Declare Function me94DIGetBit Lib me9x_32 Alias _VBme94DIGetBit 12 ByVal iBoardNumber As Long ByVal iBitNo As Long ByRef iBitValue As L...

Page 49: ...the error can be determined with the function _me9xGetDrvErrMess BoardNumber Board number for 1 2 3 16 installed CP380 I CP380 O or CP380 I O possible values 0 15 BitNo Input line number possible values 0 7 for port A 8 15 for port B 16 17 for bits C2 and C4 of port C BitValue Pointer to an integer value which corresponds with the line status Possible return values 0 Line is set to 0 1 Line is set...

Page 50: ...only for the CP380 I This function reads a byte 8 bits from an input port int _me94DIGetByte int iBoardNumber int iPortNo int piValue Function _me94DIGetByte iBoardNumber integer iPortNo integer Var iValue integer integer Declare Function me94DIGetByte Lib me9x_32 Alias _VBme94DIGetByte 12 ByVal iBoardNumber As Long ByVal iPortNo As Long ByRef iValue As Long As Long ...

Page 51: ...ErrMess BoardNumber Board number for 1 2 3 16 installed CP380 I CP380 O or CP380 I O possible values 0 15 PortNo Port name possible values PortNo Description PORTA 00hex Input port A PORTB 01hex Input port B PORTC 02hex only bits C2 and C4 sig nificant the other bits of port C are not available Value Pointer to an integer value which contains the input byte for ports A and B only the lower 8 bits ...

Page 52: ...for the CP380 I O This function determines the status of a single input line int _me96DIGetBit int iBoardNumber int iBitNo int piBitValue Function _me96DIGetBit iBoardNumber integer iBitNo integer Var iBitValue integer integer Declare Function me96DIGetBit Lib me9x_32 Alias _VBme96DIGetBit 12 ByVal iBoardNumber As Long ByVal iBitNo As Long ByRef iBitValue As Long As Long ...

Page 53: ...Syntax C Syntax Delphi BoardNumber Board number for 1 2 3 16 installed CP380 I CP380 O or CP380 I O possible values 0 15 BitNo Input line number possible values 0 7 for port B 8 9 for bits C2 and C4 of ports C BitValue Pointer to an integer value which corresponds with the line status Possible return values 0 Line is set to 0 1 Line is set to 1 int _me96DIGetByte int iBoardNumber int iPortNo int p...

Page 54: ...rvErrMess Declare Function me96DIGetByte Lib me9x_32 Alias _VBme96DIGetByte 12 ByVal iBoardNumber As Long ByVal iPortNo As Long ByRef iValue As Long As Long BoardNumber Board number for 1 2 3 16 installed CP380 I CP380 O or CP380 I O possible values 0 15 PortNo Port name possible values PortNo Description PORTB 01hex Input port B PORTC 02hex only the bits C2 and C4 are significant the other bits o...

Page 55: ...This function is only for the CP380 O Sets a single digital output line to 0 or 1 int _me95DOSetBit int iBoardNumber int iBitNo int iBitValue Function _me95DOSetBit iBoardNumber integer iBitNo integer iBitValue integer integer Declare Function me95DOSetBit Lib me9x_32 Alias _VBme95DOSetBit 12 ByVal iBoardNumber As Long ByVal iBitNo As Long ByVal iBitValue As Long As Long ...

Page 56: ...ccurs a 0 is returned The cause of the error can be determined with the function _me9xGetDrvErrMess BoardNumber Board number for 1 2 3 16 installed CP380 I CP380 O or CP380 I O possible values 0 15 BitNo Output line number to be set possible values 0 7 for port A 8 15 for port B BitValue Bit value for output line to be set possible values 0 bit set to 0 1 bit set to 1 ...

Page 57: ...nction is only for the CP380 O Writes a byte to a digital output port int _me95DOSetByte int iBoardNumber int iPortNo int iValue Function _me95DOSetByte iBoardNumber integer iPortNo integer iValue integer integer Declare Function me95DOSetByte Lib me9x_32 Alias _VBme95DOSetByte 12 ByVal iBoardNumber As Long ByVal iPortNo As Long ByVal iValue As Long As Long ...

Page 58: ...or occurs a 0 is returned The cause of the error can be determined with the function _me9xGetDrvErrMess BoardNumber Board number for 1 2 3 16 installed CP380 I CP380 O or CP380 I O possible values 0 15 PortNo Port name possible values PortNo Description PORTA 00hex Output port A PORTB 01hex Output port B Value Output value possible values 00Hex FFHex decimal 0 255 ...

Page 59: ...n is only for the CP380 I O Sets a single digital output line to 0 or 1 int _me96DOSetBit int iBoardNumber int iBitNo int iBitValue Function _me96DOSetBit iBoardNumber integer iBitNo integer iBitValue integer integer Declare Function me96DOSetBit Lib me9x_32 Alias _VBme96DOSetBit 12 ByVal iBoardNumber As Long ByVal iBitNo As Long ByVal iBitValue As Long As Long ...

Page 60: ... error occurs a 0 is returned The cause of the error can be determined with the function _me9xGetDrvErrMess BoardNumber Board number for 1 2 3 16 installed CP380 I CP380 O or CP380 I O possible values 0 15 BitNo Output line number to be set possible values 0 7 for port A BitValue Bit value for output line to be set possible values 0 bit set to 0 1 bit set to 1 ...

Page 61: ...asic Description This function is only for the CP380 I O Writes a byte to a digital output port int _me96DOSetByte int iBoardNumber int iValue Function _me96DOSetByte iBoardNumber integer iValue integer integer Declare Function me96DOSetByte Lib me9x_32 Alias _VBme96DOSetByte 12 ByVal iBoardNumber As Long ByVal iValue As Long As Long ...

Page 62: ...yntax C Syntax Delphi Syntax Basic Description This function is only for the CP380 I This function disables the interrupt control It stops an interrupt processing started by _me94EnableInt BoardNumber Board number for 1 2 3 16 installed CP380 I CP380 O or CP380 I O possible values 0 15 Value Output value possible values 00Hex FFHex decimal 0 255 Important Note This function can be used for high le...

Page 63: ... CP380 I This function enables the interrupt control If an interrupt occurs a user defined interrupt routine will be processed BoardNumber Board number for 1 2 3 16 installed CP380 I CP380 O or CP380 I O possible values 0 15 int _me94EnableInt int iBoardNumber pSERVICE_PROC IrqFunc Function _me94EnableInt iBoardNumber integer IrqFunc Pointer integer Not implemented Important Note As interrupt sour...

Page 64: ...ax Basic Description This function is only for the CP380 I O This function disables the interrupt control It stops an interrupt processing started by _me96EnableInt BoardNumber Board number for 1 2 3 16 installed CP380 I CP380 O or CP380 I O possible values 0 15 IrqFunc Address of a user defined function of type void SERVICE_PROC void in C resp of type pointer in Delphi which is processed if an in...

Page 65: ...yntax Basic Description This function is only for the CP380 I O This function enables the interrupt control If an interrupt occurs an user defined inter rupt routine will be processed BoardNumber Board number for 1 2 3 16 installed CP380 I CP380 O or CP380 I O possible values 0 15 int _me96EnableInt int iBoardNumber pSERVICE_PROC IrqFunc Function _me96EnableInt iBoardNumber integer IrqFunc Pointer...

Page 66: ...an error occurs a 0 is returned The cause of the error can be determined with the function _me9xGetDrvErrMess BoardNumber Board number for 1 2 3 16 installed CP380 I CP380 O or CP380 I O possible values 0 15 IrqFunc Address of a user defined function of type void SERVICE_PROC void in C resp of type pointer in Delphi which is processed if an interrupt occures ...

Page 67: ...e returns the matching error code and text Parameters Returns 0 if there was no error or matching error code Important Note This function can only be called if the previously called API func tion of the ME9x DLL returned an error code i e error code 0 int _me9xGetDrvErrMess char pcErrortext Function _me9xGetDrvErrMess Var errortext errorstring integer Declare Function me9xGetDrvErrMess Lib me9x_32...

Page 68: ... PEP Modular Computers GmbH This page was intentionally left blank ...

Reviews: