The 20 Hz Rate setting is the minimum refresh rate to get a new set of data. It does not have to do with the sample times of the data set itself. The minimum sample time is defined by the Discretization Step Size when generating code.
There are two approaches you can use to capture more data. You can use the two approaches at the same time:
- Increase the Target buffer size. This is set in the Coder Options + Target + External Mode tab as shown below. I also copied the help description of this parameter.
- Increase the Decimation setting in the Coder Options + External Mode tab. The same total number of samples is recorded but the results are downsampled. For example with a decimation setting of 1 and N samples, data1=[k0,k1,k2,k3,...kN] and a setting of 3 is data3=[k0,k3,k6,...kN*3].