User manual


Add to my manuals
101 Pages

advertisement

User manual | Manualzz

PCI-1202/1602/1800/1802 Hardware User’s Manual

6. Continuous Capture Functions

The continuous capture functions are very useful in real world applications. It can be used many types of applications. Those applications are

1. Low speed, no storage, real-time processing, continuous capture

2. High speed, store the A/D data in PC main memory, time is limited by memory size

(Referring to P180X_FunA series functions and P180X_FunB series function for more

Detail information in 6.2)

3. High speed, store the A/D data in the external NVRAM, time is limited by memory size

6.1 General Purpose Driver

The PCI-1202/1602/1800/1802 is very suitable for these three applications. The software driver can support 16 cards max. in one PC system. The software of version 2.0 only support 2 cards for continuous capture function. The software 3.0 will support more cards. The continuous capture functions are special designed into many groups. Each group is corresponding to one card. There are three functions included in a group as follows:

1. P180X_Card0_StartScan(…)

2. P180X_Card0_ReadStatus(…) Group-0: for card_0 continuous capture function

3. P180X_Card0_StopScan(….)

1. P180X_Card1_StartScan(…)

2. P180X_Card1_ReadStatus(…) Group-1: for card_1 continuous capture function

3. P180X_Card1_StopScan(….)

The features of these functions are given as follows: z Support DOS, Window 3.1/95/NT z Single-card solution Æ group0, refer to DEMO13.C z Multiple-card solution Æ group0 & group1 RUN at the same time, refer to DEMO14.C. z Will support more cards in the next version software z P1202_Card0_StartScan(…) is designed for PCI-1202H/L/HU/LU z P1602_Card0_StartScan(…) is designed for PCI-1602 and PCI-1602F

Version: 3.8 (Mar.2007, PPH-014-38) ---- 84

PCI-1202/1602/1800/1802 Hardware User’s Manual

The block diagram of continuous capture function is given as follows:

Magic Scan

Controller

Card?_StartScan(...) Buffer

Analog

Signal

:

:

MUX PGA

A/D

Converter

FIFO

X86

Pacer Trigger

Timer

Card?_ReadData(...)

Figure 6-1: The block diagram of continuous capture. z The P180X_Card?_StartScan(…) will perform the follows function:

1. setup scan-queue

2. setup channel/gain data

3. setup continuous capture data

4. create a multi-task thread for long time data acquisition

5. If the group A/D data are ready Æ signal P180X_Card?_ReadStatus(…) to read data z The P180X_Card?_ReadStatus(…) will read from the buffer prepared by

P180X_Card?_StartScan(…). This function is running at the same time with the

P180X_Card?_StartScan(…) thread. If the group A/D data is ready, the z The P180X_Card?_StopScan(…) will stop all threads and return all resource

Note: The DOS & Windows 3.1 do not support multi-tasking. The software coding is a little

different but the coding principle is the same.

Version: 3.8 (Mar.2007, PPH-014-38) ---- 85

PCI-1202/1602/1800/1802 Hardware User’s Manual

The sample program for single board is given as follows: wRetVal=P180X_Card0_StartScan(……); // setup continuous capture function function thread if (wRet != NoError)

{

Show error message & return

}

// now the thread is active and the continuous capture function is going now for(;;)

{

wRetVal=P180X_Card0_ReadStatus(…); if (wRetVal != 0)

{ show these A/D data or save these A/D data or analyze these A/D data

} if (stop flag is ON) // for example, the user press STOP key here

{

Card0_StopScan(…);

}

}

The sample program for multi-boards is given as follows: wRetVal=P180X_Card0_StartScan(……); // setup continuous capture function if (wRet != NoError) { Show error message & return } wRetVal=P180X_Card1_StartScan(……); // setup continuous capture function if (wRet != NoError) { Show error message & return } wRetVal=P180X_Card?_SartScan(……); // setup continuous capture function if (wRet != NoError) { Show error message & return }

// now the thread is active and the continuous capture function is going now for(;;)

Version: 3.8 (Mar.2007, PPH-014-38) ---- 86

PCI-1202/1602/1800/1802 Hardware User’s Manual

{

wRetVal=P180X_Card0_ReadStatus(….);

{ show these A/D data or save these A/D data or analyze these A/D data

}

wRetVal=P180X_Card1_ReadStatus(….); if (wRetVal != 0)

{ show these A/D data or save these A/D data or analyze these A/D data

}

wRetVal=P180X_Card?_ReadStatus(….); if (wRetVal != 0)

{ show these A/D data or save these A/D data or analyze these A/D data

} if (stop flag is ON) // for example, the user press STOP key here

{

Card0_StopScan(…);

}

}

Refer to DEMO13.C & DEMO14.C for details.

Version: 3.8 (Mar.2007, PPH-014-38) ---- 87

PCI-1202/1602/1800/1802 Hardware User’s Manual

6.2 Save Data In PC Memory Driver

The P180X_FunA & P180X_FunB are series functions designed for continuous capture which storing the data into main memory. The features for these P180X_FunA and

P180X_FunB are listed as follows: z Sampling A/D data with high speed (for example, 330K) z Continues capture for a long period (for example, 2.5 minutes continue) z A/D data save in the PC memory first, then analyze these data later

(memory size=330K*60*2.5=330K*150=49.5M word=99M bytes) z Refer to demo22.c for 330K, 2.5 minutes, continuous capture 99M bytes PC memory

The P180X_FunA is designed for two board and the P180X_FunB (Figure 6-2) is

designed for single-board as follows:

P180X_FunA_Start

P180X_FunA_ReadStatus

P180X_FunA_Stop

P180X_FunA_Get z Support two board z continuous capture z data save in PC memory

(can be as large as 256M) z refer to demo20.c

P180X_FunB_Start

P180X_FunB_ReadStatus

P180X_FunB_Stop

P180X_FunB_Get z Support single board z continuous capture z data save in PC memory

(can be as large as 256M) z refer to demo21.c

Version: 3.8 (Mar.2007, PPH-014-38) ---- 88

PCI-1202/1602/1800/1802 Hardware User’s Manual

Figure 6-2. The Continuous Capture example.

Version: 3.8 (Mar.2007, PPH-014-38) ---- 89

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals