cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to view 1d array as a plot?

KChiz.1
Associate II
 
12 REPLIES 12
Landry
Senior

Dear KChiz,

The STChart can be set as Bar chart. Is it sufficient for your needs or can you explain what your are looking ?

Thank you.

Landry

KChiz.1
Associate II

Hi Landry,

I have an array of 2000 uint16_t. It is periodically filled with some fast signal captured using ADC. I want to view the entire array as an oscillogram for debug purposes. Currently I have an auxiliary USART just to dump and visualize this data. I did not find a way to feed entire array to STChart.

PSchm.1
Associate II

I have the same question! I want to plot an array with [21000] uint16_t audio datas, comming from a mic. into ADC. The array is refreshed (or filled) every 500ms via DMA. So it is 42kHz Sampling rate. When i tried to pick the right buffer in the CUBEMonitor i only can get Buffer[0] till Buffer[21000] seperatly. But i want to plot the full Buffer[0:20999] every 500ms.

Landry
Senior

Dear all,

This feature is not yet supported. But for our next releases , can you explain us ;

how you want to configure the buffer read ? (start address + type of data in in + size / number of elements ? )

how you want to display that ? if you can share a screenshot of what you are waiting for ?

Thank you.

Landry

KChiz.1
Associate II

Here is a screenshot from my debug Python script. It would be greate to have something like this in CUBEMonitor.

0693W000000V6KiQAK.png

PSchm.1
Associate II

For my situation:

Create a new "variables" node. Add the whole array and set in the "Acquisition paramters" = Sampling frequency e.g. 2Hz.

(For me it means, that the array will be read out every 500ms).

On the "chart" the data values in the array will now be ploted every 1/2 second, like you can see in the image.

(The content in the red boxes are the data values, the red boxes are the 500ms time windows.

0693W000000V6MZQA0.png

I too would love to see this feature. It would significantly increase the usefulness what is already a great tool.

Hi KChiz.1,

You have 4 charts in your screenshot, that's it means 4 different 1D arrays ? or it's the same array at different times ?

If it's different times for the same array, how do you want to define this ?

Landry

Hi PSchm.1,

If I understood well your demonstration, we need to create "artificial" x values each time we read the buffer for each value in this buffer, depending of the acquisition frequency , to "fill" the time of the period of acquisition .

So it can lead to show in the graph a value read in "reality" at 0 to be displayed "artifically" in your example at 0.499 ?

I'm asking you just to be sure i understood your need, we need to provide something useful for everybody.

thank you for your inputs.

Landry