I’m working on an application where I need to sample the voltage and current waveforms from one load. The idea is to connect the voltage signal in ADC0 and the current signal in ADC1. Using different ADC’s I can start the sampling process at the very same time (I don’t know if is possible using Linux driver). To improve the accuracy of the system I have other two voltage and current signals. They are only scales of the first ones. So I have two voltage signals on ADC0 and two current signals on ADC1. I would like to sample N points of a waveform at a fixed frequency (10KHz minimum) using the internal ADC of VF61 of each signal and save them in a file to process later.
I’m trying to enable ADC channels with the following statements:
echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage8_en echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage9_en echo 1 > /sys/bus/iio/devices/iio:device1/scan_elements/in_voltage8_en echo 1 > /sys/bus/iio/devices/iio:device1/scan_elements/in_voltage9_en
But only the first line is executed without errors.