Programs for calibration
Pro AIn 8/16 Rev. A (ADC)
ADwin
200
ADwin-Pro
Hardware, manual version 2.9, June 2006
6.5.2 Pro AIn 8/16 Rev. A (ADC)
'Process for the ADwin-Pro in order to
'read voltage with an AIN-8/16 module.
'The 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 8)
'PAR_3 : read value (0 bis 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=ADC16(PAR_1,PAR_2)'read value
FPAR_1=FPAR_1*0.95 + PAR_3*0.05'mean value