
SMART I/O User’s Manual  | Chapter 5 Analog Modules  | |||
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
5.1.8.7 SMDAD1PutV
Syntax
error_code SMDAD1PutV(u_int8 PortNr, u_int8 Channel, int16 Value);
Description
This function sets the selected DAC channel to the chosen value. A gain and offset correction is performed with the use of the automatically selected conversion table depending whether a 
Input
u_int8 PortNr u_int8 Channel
int16 Value
Output
error_code
Example
Number of the DAC output channel to access 
Value to be written
SUCCESS  | if module was not initialized  | 
E_SEEK  | |
if the module is unknown  | 
or standard 
RetVal = SMDAD1PutV(0, 1, 0x7FF);
  | 
  | 
  | 
  | 
  | 
  | 
  | Value  | 
  | 
  | |
  | 
  | 
  | 
  | Unipola  | r  | 
  | Bipolar  | 
  | 
  | |
  | 
  | 
  | Positive   | Positive   | $07FF  | 
  | ||||
  | 
  | 
  | 
  | +1LSB  | $0001  | +1LSB  | $0001  | 
  | ||
0  | $0000  | 0  | $0000  | 
  | ||||||
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | $FFFF  | ||
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | Negative   | $F800  | |
  | Page  | 5 - 22  | 
  | ©1996 PEP Modular Computers GmbH  | 
  | March 12, 1996  | ||||
  | 
  | |||||||||
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | |||