Skip to main content
KChiz.1
Associate II
March 24, 2020
Question

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

  • March 24, 2020
  • 6 replies
  • 3361 views

..

This topic has been closed for replies.

6 replies

Landry
Visitor II
March 31, 2020

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
KChiz.1Author
Associate II
March 31, 2020

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
Visitor II
March 31, 2020

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
Visitor II
March 31, 2020

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

DHarv.1
Associate II
April 5, 2020

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

KChiz.1
KChiz.1Author
Associate II
March 31, 2020

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

0693W000000V6KiQAK.png

Landry
Visitor II
April 6, 2020

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

KChiz.1
KChiz.1Author
Associate II
April 6, 2020

It is 4 different arrays.

PSchm.1
Visitor II
March 31, 2020

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

Landry
Visitor II
April 6, 2020

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

PSchm.1
Visitor II
April 6, 2020

Yes, that would be an option. but you could also push it back to t = 0. The plot of the array would then be delayed by half a second compared to the real time graph. I want to see values of an array in a time plot, my screenshot only displays one possible way of doing so.