background image

 

6.  Software and Demo Program 

„

 

BCB 4  

Æ

 For Borland C

++ 

Builder4 

P100X.H 

Æ

 Header files 

P1100xbc.LIB 

Æ

 Linkage library for 

„

 

Delphi4  

Æ

 For Delphi 4 

P100X.PAS 

Æ

 Declaration files 

„

 

VB6  

Æ

 For Visual Basic 6 

P100x.BAS 

Æ

 Declaration files 

„

 

VC6  

Æ

 For Visual C

++

 6 

P100x.H 

Æ

 Header files 

P100x.LIB 

Æ

 Linkage library for VC6 

„

 

VB.NET2005  

Æ

 For VB.NET2005 

P100x.vb 

Æ

 Declaration files 

„

 

CSharp2005  

Æ

 For C#.NET2005 

P100x.cs 

Æ

 Declaration files 

 

 

6.1  Demo Programs for Windows 

 

Please note that none of the demo programs will work normally if the DLL driver 
has not been installed correctly. During the DLL driver installation process, the 
install shield will register the correct kernel driver to the operating system and 
copy the DLL driver and demo programs to the correct location depending on the 
driver software package you have selected (Win98/Me/NT/2000 and 32-bit Win 
XP/2003/Visa/7). After installing the driver, the related demo programs, 
development library and declaration header files for the different development 
environments will be available in the following folders. 

 

The demo program is contained in: 

CD:\NAPDOS\PCI\PCI-1002\DLL_OCX\Demo\ 

http://ftp.icpdas.com/pub/cd/iocard/pci/napdos/pci/pci-1002/dll_ocx/demo/ 

„

 

Interrupt demo 

„

 

Pacer demo 

„

 

Polling demo 

„

 

DIO demo 

„

 

Config demo 

„

 

ChScan_polling demo 

„

 

ChScan_Pacer demo 

„

 

ChScan_Interrupt demo 

 

A list of available demo 
programs is as follows: 

 

 

 

 

 

 

 

 

 

 
 

  

 

 

PCI-1002 Series User Manual (Ver.2.8, Oct. 2011, PMH-015-28)   

 

49

 

Summary of Contents for PCI-1002 Series

Page 1: ...his product ICP DAS reserves the right to change this manual at any time without notice The information furnished by ICP DAS is believed to be accurate and reliable However no responsibility is assume...

Page 2: ...3 2 1 BOARD LAYOUT 13 2 2 JUMPER SETTINGS 15 2 3 A D CALIBRATION 16 2 4 CARD ID SWITCH 17 2 5 SYSTEM BLOCK 18 2 6 DAUGHTER BOARDS 19 2 6 1 DB 1825 19 2 6 2 DB 8225 19 2 6 3 DB 37 19 2 6 4 DN 37 20 2 6...

Page 3: ...ER 41 5 3 THE A D TRIGGER 41 5 4 A D CONVERSION 43 5 4 1 A D Conversion Trigger Modes 45 5 4 2 A D Transfer Modes 45 5 4 3 Software Triggers and Polling Techniques 46 6 SOFTWARE AND DEMO PROGRAM 49 6...

Page 4: ...2L U provide pull high low jumpers allow user to predefine the DI status instead of floating when the DI channels are unconnected or broken The PEX 1002L H adds a Card ID switch for users to recognize...

Page 5: ...PROM Local System Controller Status Control 16 bits DI 16 bits DO Pacer Generator A D Data Buffer Analog Inputs Digital Outputs Digital Inputs A D control logic 12 bit A D Converter Mux Gain 4MHz Inte...

Page 6: ...nd 44 kS s for high gain model 32 single ended 16 differential programmable inputs Provides three different A D trigger methods Provides three different external trigger methods Programmable gain cont...

Page 7: ...patibility 5 V TTL Input Voltage Logic 0 0 8 V max Logic 1 2 0 V min Response Speed 1 0 MHz Typical Digital Output Channels 16 Compatibility 5 V TTL Output Voltage Logic 0 0 4 V max Logic 1 2 4 V min...

Page 8: ...0 V min Response Speed 500 kHz Digital Output Channels 16 Compatibility 5 V TTL Output Voltage Logic 0 0 4 V max Logic 1 2 4 V min Output Capability Sink 2 4 mA 0 8 V Source 0 8 mA 2 0 V Response Spee...

Page 9: ...kS s 1 3 4 A D Trigger Methods Trigger methods Software trigger Pacer trigger 16 bit programmable timer counter External trigger Pre trigger Post trigger external Pacer trigger External trigger t Sta...

Page 10: ...rnal interrupt A D busy IRQ End of Conversion 1 Pacer 0 IRQ Falling edge of Pacer 0 2 Pacer 1 IRQ Falling edge of Pacer 1 3 External Trigger IRQ Falling edge of External trigger 4 Figure 1 3 Programma...

Page 11: ...ustrial and laboratory measurement and control Signal Analysis PCI 1002 Series User Manual Ver 2 8 Oct 2011 PMH 015 28 11 Figure 1 4 PCI 1002 series multifunction cards PCI 1002 series Temperature Spe...

Page 12: ...All the necessary and essential information is given in the Quick Start Guide including Where to get the software driver demo programs and other resources How to install the software How to test the...

Page 13: ...HU Board Layout JP1 VR1 VR2 VR3 CON2 CON1 CON3 PCI 1002LU HU REV B Figure 2 1 PCI 1002 board layout CON1 16 channel D O CON2 16 channel D I CON3 32 single ended or 16 differential analog input channel...

Page 14: ...out CON1 16 channel D O CON2 16 channel D I CON3 32 single ended or 16 differential analog input channels SW1 Card ID function JP1 Analog input type selection JP2 Pull high pull low jumper for D I PCI...

Page 15: ...ld be connected Single ended Input wiring as follows Wire the signal source to analog input channel 0 AI0 of CON3 The detailed PCI 1002 series pin assignments information refer to section 2 8 Pin Assi...

Page 16: ...annel 0 signal source 2 3 A D Calibration AD Calibration for PCI 1002 series card Step 1 Apply 10 V to channel 0 Step 2 Apply 0 V to channel 1 Step 3 Apply 10 V to channel 2 Step 4 Run DEMO6 EXE of DO...

Page 17: ...2 ID 3 SW1 Default Settings Table 2 1 Default Settings OFF 1 ON 0 Card ID Hex 1 ID0 2 ID1 3 ID2 4 ID3 0x0 ON ON ON ON 0x1 OFF ON ON ON 0x2 ON OFF ON ON 0x3 OFF OFF ON ON 0x4 ON ON OFF ON 0x5 OFF ON O...

Page 18: ...Dispatch controller NVRA A D Buffer D I D O 8254 Timer Multiplexers Gain Amp Scale Adj A D Converter External Trigger Interrupt controller Data Adr PCI PEX Figure 2 2 PCI 1002 series System Function B...

Page 19: ...board CJC Cold Junction Compensation circuit for thermocouple measurement and a terminal block for easy signal connection and measurement The CJC is connected to A D channel_0 The PCI 1002 series can...

Page 20: ...bi directional optocoupler with a resistor for current sensing You can use the DB 16P to sense DC signal from TTL levels up to 24 V or use the DB 16P to sense a wide range of AC signals You can use t...

Page 21: ...signal to the appropriate relay channel on the 20 pin flat connector There are 16 enunciator LEDs for each relay light when their associated relay is activated To avoid overloading your PC s power sup...

Page 22: ...gnals Note In Figure 2 5 the maximum common mode voltage between the analog input source and the AGND is 70 Vp p so the user must take care that the input signal is under this specification first If t...

Page 23: ...ce input Right way A D CH0 HI A D CH n HI A D CHn LO A GND n A D CH 0 LO A GND 1 Es 1 Es n Figure 2 3 Wrong way A D CH0HI AGND A D CH0LO Es1 A D CHnHI A D CHnLO Esn AGND GND1 GNDn PCI 1002 Series User...

Page 24: ...t use a voltage meter or multimeter CAUTION In Figure 2 5 the maximum common mode voltage between the analog input source and the AGND is 70 Vp p Make sure that the input signal is under specificatio...

Page 25: ...HI A GND A D CH n LO A GND Es 1 Es n Signal Shielding Signal shielding connections in Figure 2 3 to Figure 2 6 are all the same Use a single point connection to frame ground not A GND or D GND Vin PCI...

Page 26: ...Digital output 1 3 Digital output 2 4 Digital output 3 5 Digital output 4 6 Digital output 5 7 Digital output 6 8 Digital output 7 9 Digital output 8 10 Digital output 9 11 Digital output 10 12 Digit...

Page 27: ...ferential analog input is selected JP1 3 5 4 6 Pins 1 16 will be assign as the positive inputs while Pins 20 35 will act as the negative inputs of the channel 2 N C is short for Not Connected Name Nam...

Page 28: ...older on this CD Step 2 Click the item PCI Bus DAQ Card Step 3 Click the item UniDAQ Step 4 Click the item DLL for Windows 2000 and XP 2003 Vista 32 bit Step 5 Double Click UniDAQ_Win_Setup_x x x x_xx...

Page 29: ...o the C WINNT SYSTEM32 folder The NAPWNT SYS and PCI1002 SYS files will be copied into the C WINNT SYSTEM32 DRIVERS folder Windows 95 98 ME The P100X DLL and P100X Vxd files will be copied into the C...

Page 30: ...llows Step 1 Select Start Control Panel and then double click the System icon on Windows Step 2 Click the Hardware tab and then click the Device Manager button Step 3 Check the PCI 1002 series cards w...

Page 31: ...n is implemented based on the PCI Plug Play mechanism 1 It will find all PCI 1002 series cards installed in this system save all their resources in the library wBoard 1 only one PCI 1002 in this PC sy...

Page 32: ...ce of this card wConfigSpace i 2 wPLX save all resource of this card Step3 Control the PCI 1002 directly wBase wConfigSpace 0 0 get base address the card_0 outpw wBase 0x20 wDoValue control the D O st...

Page 33: ...h 8254 timer1 R W 8 16 32 bits 04h 8254 timer2 R W 8 16 32 bits 08h 8254 timer3 R W 8 16 32 bits 0Ch 8254 control register W 8 16 32 bits 10h Analog input channel control register W 8 16 32 bits 10h S...

Page 34: ...3 Bit2 Bit1 Bit0 Not used Interrupt Enable Not used Interrupt Flag Interrupt Select Bit 6 Write a 1 to enable the PCI interrupt and a 0 to disable PCI interrupt Bit 2 This bit is readable but can t be...

Page 35: ...e details about the programming information please refer to Intel s Microsystem Components Handbook 4 2 3 2 The DI DO register Address 20h is used for DI DO ports Writing to this port will write data...

Page 36: ...put type 1 indicates that analog input type is single ended and 0 indicates analog input is differential Bit 0 A D ready signal 0 indicates not ready A D is under conversion 1 indicates ready A D is c...

Page 37: ...ential inputs channels 0 15 are available Input numbers which are more than the available channel will be discarded Thus for single ended inputs only the last 5 bits are taken as the channel number An...

Page 38: ...are four interrupts selectable for PCI 1002 refer to section 1 3 5 Bit4 Bit3 Bit2 Descriptions 0 0 0 No interrupt source disable all interrupts 0 0 1 Interrupt after A D completes conversion 0 1 0 In...

Page 39: ...for pre trigger method The mode is incorporated with the 8254 timer 1 First setup 8254 timer 1 properly Then set the trigger mode to pre trigger Once pre trigger mode has been activated the 8254 time...

Page 40: ...digital output channels All levels are TTL compatible The connection diagram and block diagram are given below CN2 BaseAddr 20h write signal BaseAddr 20h read signal DI port DO port CN1 Local Data Bus...

Page 41: ...3 The A D Trigger The A D trigger is controlled by on board A D trigger controller The function diagram of A D trigger is shown below Timer0 Timer1 Timer2 Local Data Bus EN EN EN User CLK CLK CLK 4 M...

Page 42: ...ations External trigger tdu tre Symbol Name Minimum Maximum Tdu Duration time 40ns Tre Recover time 100ns Note The PCI 1002 series is designed only as a time sensitive trigger trigger depends only on...

Page 43: ...register BASE 30h store the A D conversion data A D data conversion ready register BASE 10h Check A D conversion ready A D gain control register BASE 14h Select gain A D multiplex control register BA...

Page 44: ...gain control module also needs settling time if gain control code changed Again because the software doesn t control settling time please delay enough settling time if the gain control code is change...

Page 45: ...gnal is applied an A D conversion will be performed The external trigger source comes from Pin 19 of CON3 5 4 2 A D Transfer Modes PCI 1002 series supports two transfer modes 1 Polling transfer This m...

Page 46: ...binary data to the floating point value For example DEMO 3 AdPolling Compiler Borland C 3 1 Mode Large Output Code HEX code include P1002 H WORD wBaseAddr wIrq WORD P1002_Delay WORD wDownCount WORD h...

Page 47: ...WORD wChannel WORD wCoef WORD cmd wChannel wChannel 0x03 cmd 0x34 wChannel 6 outpw wBaseAddr 3 4 cmd outp wBaseAddr wChannel 4 UCHAR wCoef 0xff outp wBaseAddr wChannel 4 UCHAR wCoef 8 void main int i...

Page 48: ...Space 0 wBaseAddr wIrq wPLX select card_0 printf n 3 Card_0 wBaseAddr x n wBaseAddr SetupTimer 0 1 AdPolling have to disable timer 0 AdPolling 0 0 23 channel 0 gain 10 delay 23us for i 0 i 10 i outp w...

Page 49: ...d will register the correct kernel driver to the operating system and copy the DLL driver and demo programs to the correct location depending on the driver software package you have selected Win98 Me...

Page 50: ...lled onto your hard disk 1002 BC LARGE DEMO demo program 1002 BC LARGE LIB library and driver A list of available demo programs is as follows DEMO1 Digital output DEMO2 Digital output and Digital inpu...

Page 51: ...series card during the power on time the software driver of DOS and Windows 95 NT 2000 XP will function well later If the Plug Play ROM BIOS can t find the PCI 1002 series all software drivers will n...

Page 52: ...n DEMO2 EXE of DOS Step 4 The DO and DI will show either TEST OK or TEST ERROR 6 3 4 A D Test Step 1 Power off PC Step 2 Install one PCI 1002 card Step 3 Power on PC run DEMO6 EXE of DOS Step 4 Apply...

Page 53: ...O PISO cards that are installed in the PC will be shown as illustrated below Note The PIO_PISO EXE application is valid for all PIO PISO cards The user can execute the PIO_PISO EXE file to retrieve th...

Reviews: