STM32 Cubemonitor and saving data to .csv (excel)

Hello all,

I'm using STM32CubeMonitor which is Runtime Variable Monitoring tool and allows non-intrusive debugging off STM MCU's.

Cubemonitor is really nice tool in SW debugging and so far I have just used it to look variables in real time using chart or other dashboard objects.

Now I would really need to log data to a file, but I have troubles to get reasonable format to .csv file and since CubeMonitor is based on Node-RED I thought to ask advice from here.

This is my flow

Now if I just save the msg.payload using "File" object I get data file like this.

First 7 rows show the names of variables that CubeMonitor is reading from MCU.
So each variable has it's own line and for new data point there is data pair ("y":value , "x":timestamp) and are few of these data points in every line, so the format is example:

Variable1 [{y1:value,x1:value},{y2:value,x2:value},{y3:value,x3:value}...
Variable2 [{y1:value,x1:value},{y2:value,x2:value},{y3:value,x3:value}...
Variable3 [{y1:value,x1:value},{y2:value,x2:value},{y3:value,x3:value}...
Variable1 [{y11:value,x11:value},{y12:value,x12:value},{y13:value,x13:value}...
Variable2 [{y11:value,x11:value},{y12:value,x12:value},{y13:value,x13:value}...
Variable3 [{y11:value,x11:value},{y12:value,x12:value},{y13:value,x13:value}...

Now this kind of format is really hard to process and I would like to get each variable into it's own column and also now each variable has it's own timestamp which is really not needed so I would prefer example put timestamp from one variable to column A and then variables values to columns B...H.

So far I have tried to pass that data through "csv" object with different setting and also I have tried to reformat the data using "Function" object but I was not able to get data to a format which I could work with example draw charts etc.

So now I'm asking some advice and would prefer some example how to get this working.

I would also be interested to know how to save example only every 10th data point, since cube monitor can be reading new data from MCU 100...200 times every second.

Thanks

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.