ADwin-Gold
Hardware Manual, Version 2.3
27
ADwin
3. Read voltage with the 12-bit ADC (Process 3)
'Process for the ADwin-Gold in order to
'read a voltage with a 12 bit ADC.
'A mean value is calculated in FPAR_2.
'Last modification on August 08 2000
'Usage of the variables:
'
'PAR_2 : value which has been read (0...65,535)
'PAR_3 : channel number (1...16)
'FPAR_1: mean value
'##############################################################################
INIT:
GLOBALDELAY=20000
IF (PAR_3=0) then PAR_3=1
'prevent channel number 0 (not allowed)
IF (PAR_2=0) then PAR_2=32768
'64080 => +9.555664V (at a voltage range of ±10V)
'32768 => 0V
' 1456 => -9.555664V
EVENT:
PAR_2 = ADC12(PAR_3)
'read value
FPAR_2 = FPAR_2*0.95 + PAR_2*0.05
'calculate mean value
6.5 Processes for Calibration