Chapter 4: PowerDAQ Software (SDK)
69
Method C. Continuous Acquisition using ACB
See SDK Examples
Stream2.c
Method C uses the PowerDAQ Advanced Circular Buffer mechanism.
Acquisition runs continuously and each time an event occurs, the
application takes control. You can create separate threads in your
application to run the acquisition process.
Analog input configuration is very similar to Method B, however the
buffer is setup is a different way:
Set up the buffers
•
Allocate and register the buffer with the board
#
_PdAllocateBuffer(…)
Use as big a buffer as you need. The buffer size is limited
by the amount of memory installed on your PC. You can
specify from two to N frames to use. Frame size (in scans)
notifies the driver when the application wants to receive
eFrameDone events. In the case of two frames per buffer
we’re dealing with the classic double-buffering mechanism.
The larger number of frames makes the operations elastic
and decreases probability of buffer overflow.
•
_PdRegisterBuffer(…)
Set dwWrapAround = AIB_BUFFERWRAPPED to use
the circular buffer. The circular buffer mechanism is
explained in Appendix C.
Applications should process events in a different way. Each time it
detects eFrameDone events it means that one or more frames were
filled with data.
Acquisition
•
Wait for event notification
Содержание PD2-MF
Страница 5: ...Table of Contents iii Index 137 ...
Страница 11: ...1 1 Introduction ...
Страница 18: ......
Страница 19: ...9 2 Installation and Configuration ...
Страница 34: ......
Страница 35: ...25 3 Architecture ...
Страница 63: ...53 4 PowerDAQ Software Development Kit PD SDK ...
Страница 106: ......
Страница 107: ...97 5 Calibration ...
Страница 109: ...99 A Appendix A Specifications ...
Страница 110: ...Appendix A Specifications 100 ...
Страница 112: ......
Страница 113: ...103 B Appendix B Accessories ...
Страница 118: ......
Страница 119: ...109 C Appendix C Application Notes ...
Страница 125: ...115 D Appendix D Warranty ...
Страница 128: ......
Страница 129: ...119 E Appendix E Glossary ...
Страница 152: ......