
Chapter 5 Analog Modules  | SMART I/O User’s Manual  | |||
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
5.1.8.6 SMDAD1PutVRaw
Syntax
error_code SMDAD1PutVRaw(u_int8 PortNr, u_int8 Channel, u_int16 Value);
Description
This function sets the selected DAC channel to the chosen value. No gain or offset correction is performed.
Input
u_int8 PortNr u_int8 Channel
u_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 
5
RetVal = SMDAD1PutVRaw(0, 1, 0x0FFF);
  | 
  | Value  | 
  | ||
Unipola  | r  | 
  | 
  | Bipolar  | 
  | 
Positive   | $0FFF  | Positive   | $0FFF  | ||
+1LSB  | $0001  | +1LSB  | $0801  | ||
0  | 
  | 
  | $0000  | 0  | $0800  | 
  | 
  | 
  | 
  | $07FF  | |
  | 
  | 
  | 
  | Negative   | $0000  | 
  | 
  | 
  | 
  | 
March 12, 1996  | ©1996 PEP Modular Computers GmbH  | Page 5 - 21  | |
  | 
  | ||