Pepper Computer RS485, RS232 user manual SMDAC1PutVRaw Syntax, RetVal = SMDAC1PutVRaw0, 1, 0x0FFF

Models: RS485 RS232

1 320
Download 320 pages 36.43 Kb
Page 274
Image 274

SMART I/O User’s Manual

Chapter 5 Analog Modules

 

 

 

 

 

 

 

 

 

 

5.5.8.6 SMDAC1PutVRaw

Syntax

error_code SMDAC1PutVRaw(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 and the given value will always be masked to a 12-bit value.

Input

u_int8 PortNr u_int8 Channel

u_int16 Value

Output

error_code

Example

SM-Port number to be accessed

Number of the DAC output channel to access (0-5)

Value to be written

SUCCESS

if module was not initialized

E_SEEK

E-BMODE

if the module is unknown

or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).

RetVal = SMDAC1PutVRaw(0, 1, 0x0FFF);

 

 

 

 

 

 

 

Value (16-bit HEX)

 

 

 

 

 

 

Unipola

r

 

Bipolar

 

 

 

 

 

Positive Full-Scale $0FFF

Positive Full-Scale

$0FFF

 

 

 

 

 

+1LSB

$0001

+1LSB

$0801

 

0

$0000

0

$0800

 

 

 

 

 

 

 

 

 

-1LSB

$07FF

 

Page

5 - 118

 

 

 

 

Negative Full-Scale

$0000

October 01, 1996

 

 

©1996 PEP Modular Computers GmbH

 

 

 

 

 

 

 

 

 

 

 

Page 274
Image 274
Pepper Computer RS485, RS232 user manual SMDAC1PutVRaw Syntax, RetVal = SMDAC1PutVRaw0, 1, 0x0FFF