ICPDAS PCI-D64HU User Manual

PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
1
PCI-D64HU
User’s Manual
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 2009 by ICP DAS. All rights are reserved.
Trademark
The names used for identification only may be registered trademarks of their respective
companies.
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
2
Table of Contents
1. Introduction.......................................................................................................................3
1.1. General Description.............................................................................................................3
1.2. Features................................................................................................................................. 4
1.3. Block Diagram...................................................................................................................... 5
1.4. Specifications........................................................................................................................ 6
1.5. Product Check List..............................................................................................................7
2. Hardware Configuration...................................................................................................8
2.1. Board Layout........................................................................................................................ 8
2.2. Switch Setting....................................................................................................................... 9
2.3. Pin Assignment................................................................................................................... 10
2.4. Operation Theory................................................................................................................11
2.5. Timing Characteristic........................................................................................................ 14
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
3
1. Introduction
1.1. General Description
The PCI-D64HU card provides 40 MB/s High-Speed 32-CH Digital Input and 32-CH Digital Output.PCI-D64HU is a high-speed digital I/O card consisting of 32 digital input channels and 32 digital output channels. High-performance designs make this card perfect for high-speed data transfer and pattern generation applications.
The PCI-D64HU has the Card ID switch on board. Users can set Card ID on a board and recognize the board by the ID via software when using two or more PCI-D64HU cards in one computer.
The PCI-D64HU performs high-speed data transfer by bus-mastering DMA via 32-bit PCI bus. The maximum data transfer rate can be up to 40 MB per second. Several digital I/O transfer modes are supported, such as direct programmed I/O control, timer pacer control, external clock mode and handshaking mode. It is a reliable and cost-effective connection interface that works on your computer system to control high-speed peripherals.
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
4
1.2. Features
The following is a list of general features for the PCI-D64HU. Check section 1.5
for more details.
 Support 32-bit, 33 MHz Universal PCI bus  32-CH 5V TTL Digital Inputs and 32-CH 5V TTL Digital Outputs  2-CH Bus Mastering Scatter/Gather DMA  Data Transfer Rate up to 40 MB/s for Each Channel  Support 4 Data Transfer Modes
Direct Program Control Mode  Internal Timer Pacer Mode  External Clock Mode (DI Only)  Handshaking Mode
On Board 1 k/2 k DWORD FIFO for DI/DO Respectively
DO FIFO Support Ring Buffer Mode -- No Bus Loading in Repetitive Pattern
Card ID function
1.3. Generation Application
Programmable Input Digital Filter for All Input Signals Including Handshaking
and Trigger Signals
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
5
1.4. Block Diagram
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
6
1.5. Specifications
Model Name PCI-D64HU
Digital Input
Channels 32 Compatibility 5 V/TTL
Input Voltage
Logic 0: 0.8 V max.
Logic 1: 2.0 V min.
Handshaking Signals I_REQ input , I_ACK output , I_TRG input
Digital Output
Channels 32 Compatibility 5 V/TTL
Output Voltage
Logic 0: 0.55 V max.
Logic 1: 2.0 V min.
Output Capability
Sink: 64 mA @ 0.55 V
Source: -32 mA @ 2.0 V Handshaking Signals O_REQ output, O_ACK input, O_TRG output Transfer Speed 40 MB/sec for DI and DO simultaneously (max.)
Programmable Digital Filter
Applicable Signals All input signals (including 32 DI signals, I_REQ, I_TRG and O_ACK) Max. removable noise width (1 ~ 127) x 25 ns
Programmable Pulse Extender
Applicable Signals O_REQ Pulse width (2 ~ 256) x 25 ns
Timer/Counter
Channels 3 Resolution 16-bit Input Frequency 2.5 ~ 20 MHz Timer 0 Clock source of DI Timer 1 Clock source of DO Timer 2 Base clock of Timer 0 and Timer 1
Interrupt
Sources O_ACK, I_REQ, Timer 0, Timer 1 and Timer 2
On Board FIFO
DI / DO
1 k DWORD (32-bit) 2 k DWORD (32-bit)
Size in Ring Buffer Mode 2 ~ 2 k DWORD (32-bit), DO only
General
Bus Type Universal PCI, 32-bit, 33 MHz Card ID Yes (4-bit)
I/O Connector
Female DB37 x 1
40-pin Box header x 1 Dimensions (L x W x D) 120 mm x 105 mm x 22 mm Power Consumption 200 mA @ +5 V typical (output no load) Operating Temperature 0 ~ 60 °C Storage Temperature -20 ~ 70 °C Humidity 5 ~ 85% RH, non-condensing
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
7
1.6. Product Check List
In addition to this manual, the package includes the following items:
One PCI-D64HU card One ICP-DAS software CD-ROM One Quick Start Guide
It is recommended to read the Quick Start Guide first. The following important information will be given in the Quick Start Guide:
1. Where you can find the software driver & utility
2. How to install software & utility
3. Location of the diagnostic program
1.7. Ordering Information
Ordering Information:
PCI-D64HU: 40 MB/s High-speed 32-CH DI and 32-CH DO Universal PCI DIO
Card (RoHS). Includes one CA-4037W cable and two CA-4002 D-Sub connectors
Accessories:
CA-3710: DB-37 Male-Male D-sub cable 1M (45º)  CA-3710DM: DB-37 Male-Male D-sub cable 1M (180º)  DN-37: DIN-Rail Mounting 37-pin Connector (Pitch=5.08mm)  DN-37-381: DIN-Rail Mounting 37-pin Connector (Pitch=3.81mm)  DB-37: Directly connect signal to D-Sub 37-pin connector
Attention!
If any of these items are missing or damaged, please contact your local field agent. Save the shipping materials and carton in case you want to ship or store the product in the future.
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
8
2. Hardware Configuration
2.1. Board Layout
Item Description CON1
I/O connector (37-pin D-Sub female)
CON2
I/O connector (40-pin Box Header)
SW1
Card ID switch
JP1
Factory reserved
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
9
2.2. Card ID Switch Setting
SW1: Card ID Switch
The SW1 switch is used to set the card ID. The value is from 0 to 15. Please refer to table below for details.
1 2 3 4
ON
Switch Setting
(On = 1) Card ID
1234
0(Default)
0000 1 1000 2 0100 3 1100 4 0010 5 1010 6 0110 7 1110 8 0001 9 1001
10 0101 11 1101 12 0011 13 1011 14 0111 15 1111
Default
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
10
2.3. Pin Assignment
The PCI-D64HU has one 37-pin D-Sub connector (CON1) and one 40-pin pin header (CON2). Please refer figure below for the pin assignment of CON1 and CON2
Signal Name Description Direction DIx Digital input channel x Input DOx Digital output channel x Output GND Ground of all signals Power +5V +5V power output (Max. 400 mA per pin) Power I_TRG Trigger input to start DI sampling Input I_REQ Request input for DI hand shaking Input I_ACK Acknowledge output for DI handshaking Output O_TRG Trigger output controlled by software Output O_REQ Request outp ut for DO handshaking Output O_ACK Acknowledge input for DO handshaking Input
DI2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
21
22
23
24
25
26
27
28
29
30
20
31
32
33
34
35
36
37
DI3
DO2 DO1 DO
0
DI1 DI0
DI6
DI7
DI5 DI4
DO
5DO6
DO4 DO3
DO1
0
DO8 DO
7
DI8
DO9
DI9
DI13 DI12
DI14
I_REQ
DI15
CON
1
DI10
DI11
I_TRG
DO1
5
+5V
GND
I_ACK
DO11
DO12
DO13
DO14
DI18
1
3
5
7
9
11
13
15
17
19
21
23
25
27
29
31
33
35
37
4
6
8
10
12
14
16
18
20
22
2
24
26
28
30
32
34
36
DI19 DO18 DO17 DO16
DI17
DI16
DI22
DI23
DI21
DI20
DO21
DO22
DO20 DO19
DO26
DO24 DO23
D
I24
DO25 D
I25
DI29
D
I
28
DI30
O_REQ
DI31
C
O
N
2
DI26
DI27
O_TRG
DO31
+5V GND
O_ACK
DO27
DO28
DO29
DO30
39
38
40
N.C. N.C.
N.C.
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
11
2.4. Operation Theory
The PCI-D64HU support 4 data transfer modes, they are direct programmed I/O control, timer pacer control, external clock mode and handshaking mode. This chapter descript the detailed operation of these 4 data transfer modes.
Direct Program Control Mode
The status of digital inputs and digital outputs can be directly accessed by I/O port access. The I/O port address is assigned by system BIOS, please refer to the function reference manual for more detailed description.
Internal Timer Pacer Mode
There are three 16-bit timers on board. Timer#0 is for DI update and Timer#1 is for DO update. Both Timer#0 and Timer#1 can be optionally cascaded with Timer#2 for slower timer pacer generation. The base clock of all timers can be programmed from 20 MHz to 2.5 MHz (40 MHz / n; where n = 2 ~ 16).
For digital input, the input data will be saved into DI FIFO after a timer pacer pulse is generated. When the DI FIFO is not empty, the saved data will be automatically transferred to the main memory of computer system by the bus mastering DMA controller. For digital output, the state of output pins will be updated by the data in DO FIFO after a timer pacer pulse is generated. When the DO FIFO is not full, data in the main memory will be automatically transferred to the DO FIFO by the bus mastering DMA controller.
External Clock Mode (DI Only)
The digital input is clocked by external strobe, which is from Pin 19 (I_REQ) of CON1.
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
12
The input data will be saved into DI FIFO after a strobe is generated. When the DI FIFO is not empty, the saved data will be automatically transferred to the main memory of computer system by the bus mastering DMA controller.
1. Digital Input data is ready and an I_REQ signal is generated by external device.
2. Digital input data is saved to FIFO.
3. If the FIFO is not empty and PCI bus is not occupied, the data will be transferred to main memory.
Handshaking Mode
The PCI-D64HU also supports handshaking data transfer mode. The data transfer rate is controlled by REQ and ACK signals to guarantee no data loss.
The operation of DI Handshaking
Latch Digital
Input Data
I_REQ
( Input Signal )
Digital Input
FIFO
PC’s Main
Memory
Digital
Input Data
Bus mastering
DMA data Transfer
1
2
3
I_ACK
( Output Signal )
4
5
1. Digital Input data is ready.
2. An I_REQ signal is generated by external device.
3. Digital input data is saved to FIFO.
4. An I_ACK signal is generated and sent to the external device.
5. If the FIFO is not empty and PCI bus is not occupied, the data will be
transferred to main memory.
The operation of DO Handshaking
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
13
Move Data to Digital Output
Digital
Output FIFO
PC’s Main
Memory
Digital
Output Data
Bus mastering
DMA data Transfer
1
2
3
O_REQ
( Output signal )
O_ACK
( Input signal )
4
5
1. Digital output data is moved from PC’s memory to DO FIFO by bus mastering DMA data transfer.
2. Move output data from FIFO to digital output circuit.
3. Output data is ready.
4. An O_REQ signal is generated and sent to the external device.
5. After an O_ACK is captured, steps 2-5 will be repeated. ** If the FIFO is not full, the output data is moved form PC‘s main memory to FIFO automatically.
DO Ring Buffer Mode
The ring buffer is managed in hardware level and the size of the ring buffer can be set by user. When the DO FIFO is set as ring buffer mode, the last buffer of the DO buffer will be chained with the first buffer. No bus loading is required which makes PCI-D64HU perfect for repetitive pattern generation application.
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
14
2.5. Timing Characteristic
Characteristic of Input Digital Filter
The digital filter is applicable for all DI signals, IREQ, ITRG and OACK. The maximum removable noise width can be programmed from (1~127) x 25ns.
Where n=1~127
Characteristic of Output Pulse Extender in Timer Pacer Mode
System CLK 40MHz
tS
tH
O_REQ
( Output Signal )
DO0 ~ DO31
( Output Signal )
25ns <= tS <= (2^(n+1)) * 25ns
tH = (2^(n+1)) * 25ns
Valid Data
tL
tL >= (2^(n+1)) * 25ns
Notes: n = 0~7
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
15
Characteristic of IREQ in External Clock Mode IREQ Rising Edge Trigger:
IREQ Falling Edge Trigger:
PCI-D64HU User’s Manual (Ver.1.0, Dec/2009)
16
Characteristic of DI Handshaking Mode
Characteristic of DO Handshaking Mode
PCI-D64HU Function Reference
(Version 1.0)
PCI-D64HU Function Reference Version
1
Warranty
All products manufactured by ICPDAS Inc. are warranted against defective
materials for a period of one year from the date of delivery to the original purchaser.
Warning
ICPDAS Inc. assumes no liability for damages consequent to the use of this product. ICPDAS Inc. reserves the right to change this manual at any time without notice. The information furnished by ICPDAS Inc. is believed to be accurate and reliable. However, no responsibility is assumed by ICPDAS Inc. for its use, or for any infringements of patents or other rights of third parties resulting from its use.
Trademark
The names used for identification only maybe registered trademarks of their respective companies.
License
The user can use, modify and backup this software on a single machine. The user may not reproduce, transfer or distribute this software, or any copy, in whole or in part.
PCI-D64HU Function Reference Version
2
Contents
INTRODUCTION..............................................................................................................................................................5
SYSTEM INITIALIZATION............................................................................................................................................6
2.1 d64h_scan.....................................................................................................................................................6
2.2 d64h_get_cardinfo........................................................................................................................................8
2.3 d64h_open.....................................................................................................................................................9
2.4 d64h_close..................................................................................................................................................10
2.5 d64h_di_available_memory........................................................................................................................11
2.6 d64h_do_available_memory.......................................................................................................................12
2.7 d64h_di_buffer_get.....................................................................................................................................13
2.8 d64h_do_buffer_get....................................................................................................................................14
DIGITAL INPUT/OUTPUT CONFIGURATION.........................................................................................................15
3.1 d64h_di_config ...........................................................................................................................................15
3.2 d64h_do_config ..........................................................................................................................................17
DIGITAL INPUT FUNCTIONS......................................................................................................................................18
4.1 d64h_di_readport........................................................................................................................................18
4.2 d64h_di_readline........................................................................................................................................19
4.3 d64h_di_async_dblbuf_mode......................................................................................................................20
4.4 d64h_di_async_dblbuf_halfready...............................................................................................................21
4.5 d64h_di_async_dblbuf_transfer..................................................................................................................22
4.6 d64h_di_async_check.................................................................................................................................23
4.7 d64h_di_async_clear..................................................................................................................................24
4.8 d64h_continue_readport.............................................................................................................................25
4.9 d64h_conti_di_status..................................................................................................................................27
DIGITAL OUTPUT FUNCTIONS..................................................................................................................................28
5.1 d64h_do_writeport......................................................................................................................................28
5.2 d64h_do_writeline ......................................................................................................................................29
5.3 d64h_do_readport.......................................................................................................................................30
5.4 d64h_do_readline.......................................................................................................................................31
5.5 d64h_do_async_dblbuf_mode.....................................................................................................................32
5.6 d64h_do_async_dblbuf_halfready..............................................................................................................33
5.7 d64h_do_async_dblbuf_transfer.................................................................................................................34
5.8 d64h_do_async_check ................................................................................................................................35
PCI-D64HU Function Reference Version
3
5.9
d64h_do_async_clear.................................................................................................................................36
5.10 d64h_continue_writeport............................................................................................................................37
5.11 d64h_continue_pattern_write.....................................................................................................................39
5.12 d64h_conti_do_status.................................................................................................................................41
5.13 d64h_do_ext_trigline_write........................................................................................................................42
DIGITAL FILTER FUNCTIONS....................................................................................................................................43
6.1 d64h_DI_filter_set......................................................................................................................................43
6.2 d64h_IREQ_filter_set.................................................................................................................................45
6.3 d64h_OACK_filter_set................................................................................................................................46
6.4 d64h_ITRG_filter_set .................................................................................................................................47
6.5 d64h_OREQ_width_set...............................................................................................................................48
EVENT NOTIFICATION FUNCTIONS.......................................................................................................................50
7.1 d64h_di_event_callback .............................................................................................................................50
7.1 d64h_do_event_callback.............................................................................................................................52
ERROR CODE.................................................................................................................................................................54
PCI-D64HU Function Reference Version
4
CHAPTER 1
Introduction
This software package is dedicated to PCI-D64HU high-speed digital input/output card. It includes the WDM (Windows Driver Model) driver and ANSI-C Library for Windows 2000/XP.
One unique Card ID will be referred by each function in this Library. The Card ID is configured with on-board DIP-Switch, and helps to identify multiple PCI-D64HU cards in your system. In other words, you no longer worry about the order that Operating System scans PCI-D64HU cards; the only thing you must take care is the correct relationship between the terminal-boards and PCI-D64HU cards.
There are samples that are provided for Microsoft® Visual Studio 6.0 (VC and VB) to demonstrate the functions of PCI-D64HU Library.
This documentation provides the detailed information of PCI-D64HU APIs, including the function-deceleration, definitions of both parameters and return codes. The APIs will be cataloged and described in the following chapters:
z
CHAPTER 2 – System Initialization
z
CHAPTER 3 – Digital Input/Output Configuration
z
CHAPTER 4 – Digital Input Functions
z
CHAPTER 5 – Digital Output Functions
z
CHAPTER 6 – Digital Filter Functions
z
CHAPTER 7 – Event Notification Functions
PCI-D64HU Function Reference Version
5
CHAPTER 2
System Initialization
The functions in this chapter provide the interface to Operating-System. By calling these functions, your applications can scan all active PCI-D64HU cards in your system, and get the specific Card-ID that is configured with the on-board Dip-Switch. Open the card before calling other functions in PCI-D64HU Library.
2.1 d64h_scan
VC6
short d64h_scan(short* pCardNum, BYTE* pAvailCards = NULL)
VB6
d64h_scan(ByRef pCardNum As Interger, Optional pAvailCards As Byte = 0) As Integer
Description:
This function scans all active PCI-D64HU cards in your system. The pCardNum saves the numbers of active PCI-D64HU cards. The optional user-provided Array, pAvailCards, indi cates the presence of active PCI-D64HU card. (1: present, 0: absent)
Parameters:
pCardNum: The pointer to the memory that stores the numbers of active PCI-D64HU cards. pAvailCard: The address of user-provided
BYTE
-Array. Based on the Card ID, each element
indicates the presence of active PCI-D64HU card. The user must prepare one
BYTE
-Array with
D64H_MaxCards
elements. For instance, there are three active PCI-D64HU cards with Card ID 3, 5 and 7. The content of pAvailCard Array will be { 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }
PCI-D64HU Function Reference Version
6
Return Code:
SUCCESS_NO_ERROR: The function returns successfully. ERROR_NO_CARD_FOUND: There is no active card available in your system. ERROR_CARD_ID_DUPLICATED: There are multiple cards that are assigned the same Card ID,
please check the settings of on-board Dip-Switch.
ERROR_ACCESS_VIOLATION_DA TA_COPY: Some system exception occurs while copying
memory, please check the pointer-type parameter you assign to this function.
PCI-D64HU Function Reference Version
7
2.2 d64h_get_cardinfo
VC6
short d64h_get_cardinfo(int ScannedIndex, BYTE* pCardID)
VB6
d64h_get_cardinfo(ByVal ScannedIndex As Interger, ByRef pCardID As Byte) As Integer
Description:
This function returns the Card ID based on the scanned-index. This routine will get the Card ID configured with on-board Dip-Switch.
Parameters:
ScannedIndex: The index that the active PCI-D64HU is scanned. This index begins from 0, and is
less than the active PCI-D64HU cards.
pCardID: The pointer to the memory that stores the specific Card ID.
Return Code:
SUCCESS_NO_ERROR: The function returns successfully. ERROR_NO_CARD_FOUND: There is no active card available in your system. ERROR_INVALID_SCANNED_INDEX: Indicates the
ScannedIndex
parameter is larger than the
numbers of active PCI-D64HU cards.
ERROR_ACCESS_VIOLATION_DA TA_COPY: Some system exception occurs while copying
memory, please check the pointer-type parameter you assign to this function.
PCI-D64HU Function Reference Version
8
2.3 d64h_open
VC6
short d64h_open(BYTE bCardID)
VB6
d64h_open(ByVal bCardID As Byte) As Integer
Description:
This function opens the device node of PCI-D64HU based on the specific Card ID. If this function returns successfully , the process that calls this function will own that specific device until d64h_close() is called. The device node of PCI-D64HU is ought to be owned before calling other functions. It’s recommended to call d64h_scan() and d64h_get_cardinfo() to get the Card ID.
Parameters:
bCardID: The specific Card ID that is configured with the on-board Dip-Switch.
Return Code:
SUCCESS_NO_ERROR: The function returns successfully. ERROR_INVALID_CARD_ID: There is no active PCI-D64HU card configured with bCardID, or the
given Card ID is invalid (for instance, Card ID is assigned to 254).
ERROR_DEVICE_OPEN: Fail to open the device-node of PCI-D64HU. Please make sure no other
process owns that PCI-D64HU card.
ERROR_EVENT_CREATE_FAILED: Fail to create the related events for digital input/output
operations.
ERROR_MEMORY_MAP: Indicates the Memory-Mapping is failed, please check the event logs in
Event Viewer .
PCI-D64HU Function Reference Version
9
2.4 d64h_close
VC6
short d64h_close(BYTE bCardID)
VB6
d64h_close(ByVal bCardID As Byte) As Integer
Description:
This function closes the device node of PCI-D64HU based on the specific Card ID. After calling this function, the PCI-D64HU card will be released, and other process can open it.
Parameters:
bCardID: The specific Card ID that is configured with the on-board Dip-Switch.
Return Code:
SUCCESS_NO_ERROR: The function returns successfully. ERROR_INVALID_CARD_ID: There is no opened PCI-D64HU card with a ssigned Card ID, or the
given Card ID is invalid (for instance, Card ID is assigned to 254).
ERROR_INVALID_MAPPED_ADDRESS: Indicates the mapped address is invalid. ERROR_DI_EVENT_DETACH: Fail to detach the digital-input related event. ERROR_DO_EVENT_DET ACH: Fail to detach the digital-output related event. ERROR_DEVICE_CLOSE: Fail to close the device-node of PCI-D64HU. ERROR_MEMORY_UNMAP: Indicates the Memory-Un-mapping is failed, please chec k the event
longs in Event Viewer.
PCI-D64HU Function Reference Version
10
2.5 d64h_di_available_memory
VC6
short d64h_di_available_memory(BYTE bCardID, U32 *pMemSize)
VB6
d64h_di_available_memory (ByVal bCardID As Byte, ByRef pMemSize As Long) As Integer
Description:
This function gets the size of DI buffer that is allocated in driver. The unit of allocated buffer is reported in kilo-bytes.
Parameters:
bCardID: The specific Card ID that is configured with the on-board Dip-Switch. pMemSize: The pointer to the size of DI buffer, in kilobytes (KB).
Return Code:
SUCCESS_NO_ERROR: The function returns successfully. ERROR_INVALID_CARD_ID: There is no opened PCI-D64HU card with a ssigned Card ID, or the
given Card ID is invalid (for instance, Card ID is assigned to 254).
ERROR_INVALID_MAPPED_ADDRESS: Indicates the mapped address is invalid. ERROR_ACCESS_VIOLATION_DA TA_COPY: Some system exception occurs while copying
memory, please check the pointer-type parameter you assign to this function.
PCI-D64HU Function Reference Version
11
2.6 d64h_do_available_memory
VC6
short d64h_do_available_memory(BYTE bCardID, U32 *pMemSize)
VB6
d64h_do_available_memory (ByVal bCardID As Byte, ByRef pMemSize As Long) As Integer
Description:
This function gets the size of DO buffer that is allocated in driver. The unit of allocated buffer is reported in kilo-bytes.
Parameters:
bCardID: The specific Card ID that is configured with the on-board Dip-Switch. pMemSize: The pointer to the size of DO buffer, in kilobytes (KB)
Return Code:
SUCCESS_NO_ERROR: The function returns successfully. ERROR_INVALID_CARD_ID: There is no opened PCI-D64HU card with a ssigned Card ID, or the
given Card ID is invalid (for instance, Card ID is assigned to 254).
ERROR_INVALID_MAPPED_ADDRESS: Indicates the mapped address is invalid. ERROR_ACCESS_VIOLATION_DA TA_COPY: Some system exception occurs while copying
memory, please check the pointer-type parameter you assign to this function.
PCI-D64HU Function Reference Version
12
2.7 d64h_di_buffer_get
VC6
short d64h_di_buffer_get(BYTE bCardID, U32 *pMemSize, PVOID* pLowBufAddr, PVOID* pHighBufAddr )
Description:
This function gets the size of DI buffer and the virtual address to access this DI b uffer. These buffer addresses help programmer to get the DI acquisition data directly.
Parameters:
bCardID: The specific Card ID that is configured with the on-board Dip-Switch. pMemSize: The pointer to the size of DI buffer, in kilobytes (KB) pLowBufAddr: The pointer to the address of low-part buffer. pHighBufAddr: The pointer to the address of high-part buffer.
Return Code:
SUCCESS_NO_ERROR: The function returns successfully. ERROR_INVALID_CARD_ID: There is no opened PCI-D64HU card with a ssigned Card ID, or the
given Card ID is invalid (for instance, Card ID is assigned to 254).
ERROR_INVALID_MAPPED_ADDRESS: Indicates the mapped address is invalid. ERROR_ACCESS_VIOLATION_DA TA_COPY: Some system exception occurs while copying
memory, please check the pointer-type parameter you assign to this function.
PCI-D64HU Function Reference Version
13
2.8 d64h_do_buffer_get
VC6
short d64h_do_buffer_get(BYTE bCardID, U32 *pMemSize, PVOID* pLowBufAddr, PVOID* pHighBufAddr )
Description:
This function gets the size of DO buffer and the virtua l address to access this DO buf fer. These buffer addresses help programmer to update the DO output data directly.
Parameters:
bCardID: The specific Card ID that is configured with the on-board Dip-Switch. pMemSize: The pointer to the size of DO buffer, in kilobytes (KB) pLowBufAddr: The pointer to the address of low-part buffer. pHighBufAddr: The pointer to the address of high-part buffer.
Return Code:
SUCCESS_NO_ERROR: The function returns successfully. ERROR_INVALID_CARD_ID: There is no opened PCI-D64HU card with a ssigned Card ID, or the
given Card ID is invalid (for instance, Card ID is assigned to 254).
ERROR_INVALID_MAPPED_ADDRESS: Indicates the mapped address is invalid. ERROR_ACCESS_VIOLATION_DA TA_COPY: Some system exception occurs while copying
memory, please check the pointer-type parameter you assign to this function.
PCI-D64HU Function Reference Version
14
Loading...
+ 98 hidden pages