ADwin-Pro
Hardware, manual version 2.9, June 2006
201
Programs for calibration
Pro AIn 8/12 (ADC), -Pro AIn 32/12 (ADC)
ADwin
6.5.3 Pro AIn 8/12 (ADC), -Pro AIn 32/12 (ADC)
'Process for the ADwin-Pro in order to read a voltage
'with an AIN-8/12 or AIN-32/12 module.
'A mean value is calculated in FPAR_1.
'Last modification on August 08, 2000 ur
'Usage of the variables:
'PAR_1 : module address (1 to 255)
'PAR_2 : channel number (1 to 32)
'PAR_3 : read value (0 to 65535)
'FPAR_1: mean value
#INCLUDE adwpad.inc
#INCLUDE adwpda.inc
'######################################################
INIT:
GLOBALDELAY=2000
IF (PAR_1=0) then PAR_1=1 'prevent module address 0
IF (PAR_2=0) then PAR_2=1 'prevent channel number 0 (not
allowed)
IF (PAR_3=0) then PAR_3=32768
'64080 => +9.555664V (at a voltage range of +/- 10V)
'32768 => 0V
'1456 => -9.555664V
'######################################################
EVENT:
PAR_3=ADC(PAR_1,PAR_2) 'read value
FPAR_1=FPAR_1*0.95 + PAR_3*0.05'mean value