ICP DAS USA PCI-M512 User Manual

Hide thumbs Also See for PCI-M512:

Advertisement

Quick Links

Warranty
All products manufactured by ICP DAS are warranted
against defective materials for a period of one year from the
date of delivery to the original purchaser.
Warning
ICP DAS assume no liability for damages consequent to
the use of this 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 assumed by ICP DAS for its use,
nor for any infringements of patents or other rights of third
parties resulting from its use.
Copyright
Copyright 2002 by ICP DAS. All rights are reserved.
Trademark
The names used for identification only may be registered
trademarks of their respective companies.
PCI-M512 User's Manual (Ver.2.1, April/2004, PPH-017-21)
PCI-M512
User's Manual
----- 1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PCI-M512 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for ICP DAS USA PCI-M512

  • Page 1 Copyright Copyright 2002 by ICP DAS. All rights are reserved. Trademark The names used for identification only may be registered trademarks of their respective companies. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 1...
  • Page 2: Table Of Contents

    3.2.2 PCIM512_ShortSub .................32 3.2.3 PCIM512_IntSub ..................33 3.2.4 PCIM512_GetDllVersion ................33 ............34 UNCTIONS OF RIVER NITIALIZATION 3.3.1 PCIM512_DriverInit ................34 3.3.2 PCIM512_OpenBoard ................34 3.3.3 PCIM512_DetectBoards................35 3.3.4 PCIM512_ReadBoardId ................36 3.3.5 PCIM512_ReadBoardStatus..............37 3.3.6 PCIM512_CloseBoard................38 3.3.7 PCIM512_CloseAll ..................38 PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 2...
  • Page 3 3.4.2 PCIM512_WriteSramWord ..............40 3.4.3 PCIM512_WriteSramDword ..............41 3.4.4 PCIM512_ReadSramByte ................42 3.4.5 PCIM512_ReadSramWord ..............43 3.4.6 PCIM512_ReadSramDword ..............44 D/I/O R ..............45 UNCTIONS OF RITE 3.5.1 PCIM512_WriteToDo................45 3.5.2 PCIM512_ReadFromDi................46 DEMO PROGRAM ...................47 ................48 ROGRAM RCHITECTURE ..................49 ROBLEMS EPORT PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 3...
  • Page 4: Introduction

    1. Introduction The PCI-M512 is a battery-backup SRAM and digital I/O card. PCI bus, specification 2.1 On-board 512K bytes SRAM Two Li-batteries, BT1 & BT2, for battery-backup the data of SRAM Two indicators, low-battery & bad-battery, for battery BT1. Another two indicators, low-battery & bad-battery, for battery BT2.
  • Page 5 There are many demo programs, written in VC++, VB, Delphi, and BCB++, given in the companion CD. These demo programs call the DLL, PCIM512.DLL, to access the hardware of PCI-M512. The PCIM512.DLL will call the kernel driver, Windrvr.vxd or Windrvr.sys as follows:...
  • Page 6: Product Check List

    If any of these items are missing or damaged, contact the dealer from whom you purchased the product. Save the shipping materials and carton in case you want to ship or store the product in the future. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 6...
  • Page 7: Installation Quick Start

    1.2 Installation Quick Start The PCI-M512 can be used in Windows 95/98/NT/2000/XP. The recommended installation steps are given in Sec 1.2.1 ~ Sec. 1.2.4 1.2.1 Step 1: Software Installation Step 1: insert the companion CD into the CD-ROM driver. It will auto run as follows: Step 2: click the first item, Toolkits (Softwares)/Manuals PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21)
  • Page 8 Step 3: click the first item, PCI Bus DAQ Card Step 4: click the last item, PCI-M512 Step 5: click the third item, Install Toolkit for Windows NT (Or 98, 2000, XP) Then the install shields will install the kernel driver, DLL driver & application demo program to system.
  • Page 9: Step 2: Check The Installed Software

    Step 2: Check the installed software Assume you use the default directory & name of install shields, the software will be installed in C:\DAQPRO as follows: Step 1: click C:\DAQPro as follow: Step 2: click PCI-M512 as follows: Demo demo program Driver for plug &...
  • Page 10 Step 4: Click PnPInstall to read this PDF file for plug & play installation. For Windows 98/2000/XP, the system will auto detect the PCI-M512 & ask you to install software driver. Read this PDF file carefully if you are not familiar with plug &...
  • Page 11: Step 3: Hardware Installation

    Step 1: Install your PCI-M512 to PC Step 2: power on your PC Step 3: Now 98/2000/XP will find a PCI-M512 card & ask user to provide a software driver. Refer to PnPInstall.pdf, step3 of Sec. 1.2.2, for more information.
  • Page 12 Key-in new dwBoardNo to show IDs of another PCI-M512 as follows:. Refer to Sec. 2.2 for more information about IDs of PCI-M512 as follows: Vendor ID = 10B5 Device ID = 9050 Sub-vendor ID = 2129 Sub-device ID = 0512 PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21)
  • Page 13 Check that lowest 4-bits equal 0. These 4-bits are battery status bits. Refer to Sec. 2.4 for more information. Click Digital Output $5555 to write 0x5555 to D/O & Read D/I as follows: Key-in new dwBoardNo to read/write to other PCI-M512. Refer to Sec. 3.1 for more information. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21)
  • Page 14 SRAM is given in R/W Offset Address, byte/word/dword read/write is given in Mode Byte/Word/Dword) Key-in new dwBoardNo to read/write to other PCI-M512. Refer to Sec. 3.1 for more information. Write 0x12345678 to offset address 0 of SRAM as follows: PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21)
  • Page 15 Read one byte of SRAM at offset address 0 as follows: Read one word of SRAM at offset address 0 as follows: Read one dword of SRAM at offset address 0 as follows: PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 15...
  • Page 16: Step 5: Muti-Board Diagnostic

    1.2.5 Step 5: Muti-Board Diagnostic Step 1: run TestId2 of Delphi demo program to read & show IDs of two PCI-M512 as follows: (step7 of Sec. 1.2.2) Step 2: run TestDIO2 of Delphi demo program to read/write D/I/O of two PCI-M512 as follows: (step7 of Sec.
  • Page 17: Hardware Configuration

    SRAM can keep all stored data if either BT1 or BT2 is higher then 2V. If either BT1 or BT2 is bad, it is recommended to replace both BT1 & BT2 with new batteries. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 17...
  • Page 18: Ids Of Pci-M512

    • Sub-device ID = 0512 The plug&play BIOS will assign proper resources to every PCI-M512 card in the power-on stage. The software driver of the PCI-M512 will use these IDs to access the hardware on PCI-M512. User must use PCIM512_DetectBoards() to detect all PCI-M512 boards first.
  • Page 19: Block Diagram Of D/I/O

    2.3 Block Diagram of D/I/O The PCI-M512 provides 16 channels of digital input and 16 channels of digital output. All levels are TTL compatible. The connections diagram and block diagram are given as follows: BT1 Low BT1 Bad BT2 Low...
  • Page 20: Battery Status Indicators

    (Red) D/I Port 2.3V (BT1 Low) Bit0 Comparato Bit1 (BT1 Bad) 2.1V Comparator 2.3V (BT2 Low) Bit2 Comparator 16 Channels Bit3 (BT2 Bad) 2.1V Comparator 12 Channels Bit4 § Bit15 External Digital PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 20...
  • Page 21 PC (not power off) replace the old BT1 with the new BT1 replace the old BT2 with the old BT2 Note: it is recommended to replace both BT1 & BT2 at the same time. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 21...
  • Page 22: Block Diagram Of Sram

    3. replace the old BT1 with the new BT1 4. replace the old BT2 with the old BT2 Note: it is recommended to replace both BT1 & BT2 at the same time. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 22...
  • Page 23: Daughter Boards

    Note: the lowest nibble, bit_0 to bit_3, are used by PCI-M512, so only the highest 12-bits, bit_4 to bit_15, are available.
  • Page 24: Db-16R Relay Board

    Form C Relay Normal Open Normal Close Com. 20Pin cable DB-16R PCI-M512 Note: CN1=D/O Channel : 16 Form C Relay Relay : Switching up to 0.5A at 110AC or 1A at 24DCV PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 24...
  • Page 25: Db-24Pr, Db-24Por, Db-24C

    20-Pin connector for 16 channel digital output, A-82X, A-62X, DIO-64, ISO- DA16/DA8 Channel : 16 From A Relay , 8 From C Relay Relay : switching up to 5A at 110ACV / 5A at 30DCV PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 25...
  • Page 26: Pin Assignment

    Digital output 8 Digital output 9 Digital output 10 Digital output 11 Digital output 12 Digital output 13 Digital output 14 Digital output 15 PCB ground PCB ground PCB +5V PCB +12V PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 26...
  • Page 27: Dll Driver

    3. DLL Driver The included software is a collection of subroutines for PCI-M512 cards for Windows 95/98/NT/2000/XP applications. These subroutines are written with C language and perform a variety of digital I/O operations. The subroutines in PCIM512.DLL are easy to understand as its name suggests for.
  • Page 28 Visual Basic 6 +--\PCIM512.BAS Declaration file |--\VC6 for Visual C6 |--\PCIM512.H Header file +--\PCIM512.LIB Linkage library for VC6 only |--\VCPP6 for Visual C++ 6 |--\PCIM512.H Header file +--\PCIM512.LIB Linkage library for VC++6 only PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 28...
  • Page 29 #define PCI_DriverNoOpen #define PCI_GetDriverVersionError #define PCI_InstallIrqError #define PCI_ClearIntCountError #define PCI_GetIntCountError #define PCI_RegisterApcError #define PCI_RemoveIrqError #define PCI_FindBoardError #define PCI_ExceedBoardNumber #define PCI_ResetError #define PCI_IrqMaskError #define PCI_ActiveModeError #define PCI_GetActiveFlagError #define PCI_ActiveFlagEndOfQueue #define PCI_BoardNoIsZero #define PCI_BoardNoExceedFindBoards PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 29...
  • Page 30 DWORD dwOffset, WORD *Data); DWORD CALLBACK PCIM512_ReadSramDword(DWORD dwBoardNo, DWORD dwOffset, DWORD *Data); Functions of D/I/O Read/Write, Refer to Sec. 3.5 DWORD CALLBACK PCIM512_WriteToDo(DWORD dwBoardNo, WORD Data); DWORD CALLBACK PCIM512_ReadFromDi(DWORD dwBoardNo, WORD *Data); PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 30...
  • Page 31: Find The Board Number

    The plug&play BIOS will assign the proper base address to PCI-M512. If there is only one PCI-M512, users can identify this board as board_1. If there are two PCI-M512 boards in the system, it will be very difficult to identify which board is board_1.
  • Page 32: Functions Of Test

    DLL linkage purpose. • Syntax: short PCIM512_ShortSub(short nA, short nB) • Parameter: :[Input] 2 bytes short data type value :[Input] 2 bytes short data type value • Return: The value of nA – nB. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 32...
  • Page 33: Pcim512_Intsub

    The value of iA – iB 3.2.4 PCIM512_GetDllVersion • Description: To get the version number of PCIM512.DLL • Syntax: DWORD PCIM512_GetDllVersion(void) • Parameter: None • Return: Return the DLL’s version number. For example: 102(hex) for version 1.02 PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 33...
  • Page 34: Functions Of Driver Initialization

    PCIM512_OpenBoard(DWORD dwBoardNo, DWORD dwIntEnable); • Parameter : dwBoardNo [Input] PCI-M512 board number dwIntEnable [Input] PCI-M512 board interrupt enable/disable(1/0) • Return: PCI_NoError PCI_BoardOpenError :Board open kernel driver error PCI_BoardNoExceedFindBoards :Not find the Board. PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 34...
  • Page 35: Pcim512_Detectboards

    3.3.3 PCIM512_DetectBoards • Description : This subroutine will detect all installed PCI-M512 boards. This function must be called first before calling the DLL functions given in Sec 3.4 & Sec. 3.5. • Syntax : DWORD PCIM512_DetectBoards(); • Parameter : None •...
  • Page 36: Pcim512_Readboardid

    3.3.4 PCIM512_ReadBoardId • Description : This subroutine will show the IDs of detected PCI-M512 boards. It is designed to identify PCI-M512. • Syntax : DWORD PCIM512_ReadBoardId(dwBoardNo, *dwVendorId, *dwDeviceId, *dwSubVendorId, *dwSubdeviceId); • Parameter : dwBoardNo : [Input] PCI-M512 board number dwVendorID...
  • Page 37: Pcim512_Readboardstatus

    3.3.5 PCIM512_ReadBoardStatus • Description : This subroutine will detect the PCI-M512 boards the DLL open status. • Syntax : DWORD PCIM512_ReadBoardStatus(DWORD dwBoardNo); • Parameter : dwBoardNo [Input] PCI-M512 board number • Return: 0: The PCI-M512 board DLL is not opened.
  • Page 38: Pcim512_Closeboard

    This board is not opened. PCI_BoardNoExceedFindBoards Not fined the board 3.3.7 PCIM512_CloseAll • Description : This subroutine will close all of PCI-M512 kernel driver and release the resource from the device. • Syntax : DWORD PCIM512_CloseAll(); • Parameter : None •...
  • Page 39: Functions Of Sram Read/Write

    3.4 Functions of Sram Read/Write 3.4.1 PCIM512_WriteSramByte • Description: Write one byte, 8-bit, of data to SRAM of PCI-M512. • Syntax: DWORD PCIM512_WriteSramByte(dwBoardNo, dwOffset, Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N dwOffset : [Input] offset address of SRAM, from 0 to 0x7ffff...
  • Page 40: Pcim512_Writesramword

    3.4.2 PCIM512_WriteSramWord • Description: Write one word, 16-bit, of data to SRAM of PCI-M512. • Syntax: DWORD PCIM512_WriteSramWord(dwBoardNo, dwOffset, Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N dwOffset : [Input] offset address of SRAM, from 0 to 0x7fffe...
  • Page 41: Pcim512_Writesramdword

    3.4.3 PCIM512_WriteSramDword • Description: Write one dword, 32-bit, of data to SRAM of PCI-M512. • Syntax: DWORD PCIM512_WriteSramDword(dwBoardNo, dwOffset, Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N dwOffset : [Input] offset address of SRAM, from 0 to 0x7fffc...
  • Page 42: Pcim512_Readsrambyte

    3.4.4 PCIM512_ReadSramByte • Description: Read one byte, 8-bit, of data from SRAM of PCI-M512. • Syntax: DWORD PCIM512_ReadSramByte(dwBoardNo, dwOffset, *Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N dwOffset : [Input] offset address of SRAM, from 0 to 0x7ffff...
  • Page 43: Pcim512_Readsramword

    3.4.5 PCIM512_ReadSramWord • Description: Read one word, 16-bit, of data from SRAM of PCI-M512. • Syntax: DWORD PCIM512_ReadSramWord(dwBoardNo, dwOffset, *Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N dwOffset : [Input] offset address of SRAM, from 0 to 0x7fffe...
  • Page 44: Pcim512_Readsramdword

    3.4.6 PCIM512_ReadSramDword • Description: Read one dword, 32-bit, of data from SRAM of PCI-M512. • Syntax: DWORD PCIM512_ReadSramDword(dwBoardNo, dwOffset, *Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N dwOffset : [Input] offset address of SRAM, from 0 to 0x7fffc...
  • Page 45: Functions Of D/I/O Read/Write

    Functions of D/I/O Read/Write 3.5.1 PCIM512_WriteToDo • Description: Write one word, 16-bit, of data to D/O of PCI-M512. • Syntax: DWORD PCIM512_WriteToDo(dwBoardNo, Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N Data : [Input] one word of data (16-bit) •...
  • Page 46: Pcim512_Readfromdi

    3.5.2 PCIM512_ReadFromDi • Description: Read one word, 16-bit, of data from D/I & battery status bits of PCI-M512. • Syntax: DWORD PCIM512_ReadFromDi(dwBoardNo, *Data) • Parameter: dwBoardNo : [Input] board number, from 1 to N Data: [output] one word of data (16-bit), Bit0 ~ Bit3 are battery...
  • Page 47: Demo Program

    There are many demo program, written in VC++, VB, Delphi, and BCB++, given in the companion CD. These demo programs will call the DLL, PCIM512.DLL, to access the hardware of PCI-M512. The PCIM512.DLL will call the kernel driver, Windrvr.vxd or Windrvr.sys as follows:...
  • Page 48: Program Architecture

    Access the SRAM/DI/DO …….. PCIM512_WriteSramDword(…) Access the SRAM/DI/DO ….. PCIM512_DriverClose() Close the Device-Driver User's Application Function Call into DLLs Development DLLs Toolkit Services Call into Kernel-Mode .VXDs, .SYSs (Device Driver) Device Control Hardware Devices PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 48...
  • Page 49: Problems Report

    Then will reply as soon as possible to you. Please check that we had received your comments. And please keep in contact with us. ICP DAS E-mail: Service@icpdas.com Web Site: http://www.icpdas.com http://www.icpdas.com.tw PCI-M512 User’s Manual (Ver.2.1, April/2004, PPH-017-21) ----- 49...

Table of Contents