User manual

gpio.AI
MODBUS_MODE
To switch between MODBUS RTU and ASCII modes this register is used.
Changes will not affect the USB connection that always operates in MODBUS
ASCII. Choose 0 for ASCII or 1 for RTU.
SAMPLE_RATE
Specifies the rate data is sampled on the analogue inputs. Higher values result
in faster device responses. Default value after power-up is 1000 Hz.
SAMPLE_EXP
Defines the amount of ADC samples that are used to calculate an average that
can be read from the input registers.
The number of samples n is defined as:
n = 2
SAMPLE_EXP
Therefore, a sample read from DATA
x
is defined as:
DATA
x
= ∑
i=1..n
(ADC(IN
x
)) / n
The default value of this register is 2 resulting a measurement to be the mean
of four ADC conversions.
0x0000 DATA0 0x0004 DATA4
0x0001 DATA1 0x0005 DATA5
0x0002 DATA2 0x0006 DATA6
0x0003 DATA3 0x0007 DATA7
Table 4: Input registers
DATA0/1/2/3/4/5/6/7
Contains the measured values for IN0/1/2/3/4/5/6/7 located on connectors X2,
X3, X4 and X5.
The voltage attached to the input can be calculated as:
V
n
= DATA
n
* V
ref
/ 65535
Where V
ref
is equal to 4096 mV. S2 and S3 allow switching the 20mA loop on
and off. The corresponding current when doing measurements with activated 20
mA loop is calculated as:
I
n
= DATA
n
* V
ref
/ 65535 / 200Ω
7/7