User guide
80
VTB USER GUIDE
11.10 Functions for NGMsX - NGMEVO
Functions for NGMsX expansion board for NGMEVO
Hardware NGMEVO
NG_DAC – Analog Outputs NGMsX
This function allows to update the analog outputs of each channel equipped in the NGMsx
This 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 5, each expansion manages two channels:
Channel Index
Expansion number
0
Board 0 (nearest NGMEVO)
1
2
Board 1
3
4
Board 2
5
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 NGMsX
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 5)
Offset OFFSET value
WARNING: THE OFFSET VALUE ISN'T SAVED AND IT MUST BE SET AT EACH TURN-ON.