The AIN connector in the node can be added in the device tree of the KCH Control ARM VFP Linux.
Parameters
|
Parameter |
Description |
|---|---|
|
Name |
Linux Device File Path of ain port (see HW chapter) |
|
max resolution |
max resolution of channel for V caclulation (default: 522) |
|
max voltage |
max voltage of channel for V caclulation (default: 3.3) |
With the new AIN node the values can directly mappt to variables.
Variables mappt
|
Parameter |
Description |
|---|---|
|
in raw |
Raw Value of AIN Channel
|
|
in calc V |
Calculated Value in V of Channel depending on max. resolution and max. Voltage (in calc V:= in raw* (max voltage / max resolution)
|
Hardware
SOM Evalboard:
|
HW Port |
CODESYS Device Name |
|---|---|
|
AIN1 (X19) |
'/sys/bus/iio/devices/iio\:device0/in_voltage3_raw' |
|
AIN2 (X19) |
'/sys/bus/iio/devices/iio\:device0/in_voltage8_raw' |
Additionaly AIN Channels can be added on a custom SOM Board modifing the Device Tree File.
Remarks
Use a seperate Buscycle for the AIN, the reading in the BusCycle can lead to jitter.