Increase Samples/Second for slow Analog Input
Posted: Tue Oct 15, 2019 3:14 pm
Hello all,
for a project I need to acquire measurement data from a current (Hall-)sensor via MatLab.
To achieve this target I chose a Stemlab 125-14 as the datasheet for the slow analog input pins states that there is the possibility for 100kS/s.
Yesterday I set up my redpitaya and tried to gather the input voltage with MatLab, altered by a Potentiometer from 0-3.3V.
The problem I encountered is that I was able to achieve a maximum of 20(!) samples per second (with the most minimalistic matlab code possible), which is far away from the sample rate I need to achieve for the project (I would need at least a few thousand kS/s).
My guess is that the query function (volts1 = str2num(query(tcpipObj,'ANALOG:PIN? AIN1'))) in the MatLab code takes too long to read enough samples during a certain time period.
Is there any way to increase the sample rate per second? It seems like you are able to start an acquisition which writes the values to a buffer (which can then be read) by using SCPI commands.
I think this is what I need to do, but I just found commands for the fast RF input but not slow analog inputs (which I need to use).
Sorry for these questions but I already googled/researched a lot and can't find any helpful information regarding this problem.
Hope you can help me with this.
Thanks!
TS
for a project I need to acquire measurement data from a current (Hall-)sensor via MatLab.
To achieve this target I chose a Stemlab 125-14 as the datasheet for the slow analog input pins states that there is the possibility for 100kS/s.
Yesterday I set up my redpitaya and tried to gather the input voltage with MatLab, altered by a Potentiometer from 0-3.3V.
The problem I encountered is that I was able to achieve a maximum of 20(!) samples per second (with the most minimalistic matlab code possible), which is far away from the sample rate I need to achieve for the project (I would need at least a few thousand kS/s).
My guess is that the query function (volts1 = str2num(query(tcpipObj,'ANALOG:PIN? AIN1'))) in the MatLab code takes too long to read enough samples during a certain time period.
Is there any way to increase the sample rate per second? It seems like you are able to start an acquisition which writes the values to a buffer (which can then be read) by using SCPI commands.
I think this is what I need to do, but I just found commands for the fast RF input but not slow analog inputs (which I need to use).
Sorry for these questions but I already googled/researched a lot and can't find any helpful information regarding this problem.
Hope you can help me with this.
Thanks!
TS