Chapter 5
68
Data Transfer
If you are using continuous output mode, you specify whether to allocate and fill a single
buffer (WrapSingleBuffer is True) or multiple buffers (WrapSingleBuffer is False).
If you are using multiple buffers, data is written from multiple output buffers continuously;
when no more buffers of data are available, the continuous output operation stops. This mode
guarantees gap-free data. If you use a single buffer, data is output continuously from the
single buffer until you stop the operation.
A buffer done event is generated whenever the last value in a buffer is output. This allows you
to fill the buffer or provide a new buffer, as needed.
Note:
An underrun error can result if your buffer size is too small, if you do not allocate
enough buffers, or if your clock rate is too fast.
Data Format
The DT9812-2.5V module uses binary data encoding. The DT9812-10V, DT9812-10V-OEM,
DT9812A, DT9813-10V, DT9813A, DT9814-10V, and DT9814A modules use twos complement
encoding.
In software, you need to supply a code that corresponds to the analog output value you want
the module to output.
Converting a Voltage into a Binary Code
To convert a voltage into a binary code on the DT9812-2.5V module, use the following
formula:
Code = Voltage
(2.44 / 4096)
where,
• 2.44 is the full-scale range of the module (0 to +2.44V)
• 4096 is the resolution (12 bits)
•
Voltage
is the analog output voltage
•
Code
is the raw count used by the software to represent the voltage in binary notation
For example, if you want to output a voltage of 2.0 V, determine the code value as follows:
Code = 2.0 / (2.44 / 4096) = 3357
Summary of Contents for DT9812 Series
Page 1: ...DT9812 UM 20769 R DT9813 and User s Manual DT9814 Series Title Page ...
Page 4: ......
Page 12: ...About this Manual 12 ...
Page 13: ...13 1 Overview Key Hardware Features 14 Supported Software 15 Getting Started Procedure 16 ...
Page 17: ...Part 1 Getting Started ...
Page 18: ......
Page 26: ...Chapter 2 26 ...
Page 53: ...Part 2 Using Your Module ...
Page 54: ......
Page 76: ...Chapter 5 76 ...
Page 88: ...Chapter 6 88 ...
Page 94: ...Chapter 7 94 ...
Page 113: ...113 B Screw Terminal and Connector Pin Assignments ...