User guide
76
VTB USER GUIDE
NG_DAC – ANALOG OUTPUTS
This function allows to update the analog outputs of each channel equipped in the NG35 expansions NG-IO and NG-PP
(as option).
These expansions have a digital to analog converter at 12 bit, with a range of +/-10V. Therefore a value of +2047
corresponds to 10V in output, a value of -2047 corresponds to -10V.
The selection of the channel is made by an index from 0 to 7, each expansion manages two channels:
Channel Index
Expansion
0
Card 0 (nearest NG35)
1
2
Card 1
3
4
Card 2
5
6
Card 3
7
Syntax
NG_DAC(Char Chan, Long Val)
Parameters
Chan Number of channel (from 0 to 7)
val Value of the output
Example
Used variables:
val LONG
channel CHAR
channel = 0
val = 1024
ng_Dac(channel, val) ' write 1024 (~5V) to analog channel 0
ng_Dac(1,512) ‘ write 512 (~2,5V ) to analog channel 1
NG_DAC_CAL – CALIBRATION OF THE ANALOG OUTPUT OFFSET
This function allows to calibrate the OFFSET of the analog outputs. Usually it can be occur that the analog output has a
little value of voltage (OFFSET) in the order of mV also if zero has been set. With ng_dac_cal we can null this voltage
setting a value opposite to the offset one. Remind that for each unit the output value will be about 4mV.
Syntax
NG_DAC_CAL(Char Ch,Long Offset)
Parameters
Chan Number of channel (from 0 to 7)
Offset OFFSET value
WARNING: THE OFFSET VALUE ISN'T SAVED AND IT MUST BE SET AT EACH TURN-ON.










