Chapter 4: PowerDAQ Software (SDK)
64
Method B. Burst Buffered Acquisition – One
Shot
See SDK Examples
Stream2.c, SimpleExample.vbp
This method is useful when you need to get one-shot data acquisition
with significant delay between acquisition runs. For example if you
need an application like an oscilloscope or FFT , run acquisition one
time, then stop it, analyze data and run it again Method B is for you.
The size of the acquired data will required buffered A/D FIFO reads.
This method requires initializing and using the PowerDAQ buffering
mechanism. See Appendix C to learn more about the PowerDAQ
buffering mechanism.
Method B uses asynchronous notification from the driver via Win32
events. This means that you should program the board for
asynchronous operation and use Win32 function such as
WaitForSingleObject(…) to wait until the driver notifies that data is
acquired.
Initialization
•
Reset the board
#
_PdAInReset(…)
•
Allocate and register buffer with the board
#
_PdAllocateBuffer(…)
Use as big a buffer as you need. Buffer size is limited by
the amount of memory installed on your PC. Buffer should
contain at least two frames. The PowerDAQ API allocates
buffers for you.
#
_PdRegisterBuffer(…)
Register the buffer with the AnalogIn subsystem. Use
dwWrapAround = FALSE for single-run operation.
•
Set up analog input configuration and events you want to
be notified of:
Analog input configuration bits as defined in the file
pdfw_def.h. Recommended configuration for Method B is:
dwCfg = (AIB_CVSTART0 | AIB_CVSTART1 |
AIB_CLSTART0) for internal clock
Summary of Contents for PD2-MF
Page 5: ...Table of Contents iii Index 137 ...
Page 11: ...1 1 Introduction ...
Page 18: ......
Page 19: ...9 2 Installation and Configuration ...
Page 34: ......
Page 35: ...25 3 Architecture ...
Page 63: ...53 4 PowerDAQ Software Development Kit PD SDK ...
Page 106: ......
Page 107: ...97 5 Calibration ...
Page 109: ...99 A Appendix A Specifications ...
Page 110: ...Appendix A Specifications 100 ...
Page 112: ......
Page 113: ...103 B Appendix B Accessories ...
Page 118: ......
Page 119: ...109 C Appendix C Application Notes ...
Page 125: ...115 D Appendix D Warranty ...
Page 128: ......
Page 129: ...119 E Appendix E Glossary ...
Page 152: ......