cancel
Showing results for 
Search instead for 
Did you mean: 

Irregular sampling of CubeMonitor

Nmo.1
Associate III

Hi everyone,

I need to monitor the amount of 2 variables in the 2 STm32 Nucleo board.

I could do that but I have 2 problems.

  1. the sampling of each probe is not regular. Cube monitor makes it for example in the time 1, 3, 4, 8, 10, .. ms. I need to monitor data every 2 or 3 ms and regular.

0693W00000HpXKOQA3.png 

2.The sampling times of prob1 and probe2 are not same. Hier for Example it has done it for blue one in 3.689s and for other one in 3.691s.

0693W00000HpXIhQAN.png0693W00000HpXIrQAN.pngCould you please help ?

1 ACCEPTED SOLUTION

Accepted Solutions
stephane.legargeant
ST Employee

Hello Nmo.1

The sampling of data is triggered by the computer OS, so the timing depends of what the computer is doing. In order to have more regular acquisition, try to close all the other apps, but it may not improve a lot for ms scale.

If you want very accurate sampling, you can use the "snapshot mode". The STM32 code must be instrumented, but it will allow to take a "snapshot" of the data at an accurate timing defined by the microcontroller.

STM32CubeMonitor:How to perform an acquisition in snapshot mode - stm32mcu

For the acquisition with 2 probes, the value is read on one probe first, and then on the second one. So it is nearly impossible to have the same time for the point.

Best regards

Stephane

View solution in original post

3 REPLIES 3
stephane.legargeant
ST Employee

Hello Nmo.1

The sampling of data is triggered by the computer OS, so the timing depends of what the computer is doing. In order to have more regular acquisition, try to close all the other apps, but it may not improve a lot for ms scale.

If you want very accurate sampling, you can use the "snapshot mode". The STM32 code must be instrumented, but it will allow to take a "snapshot" of the data at an accurate timing defined by the microcontroller.

STM32CubeMonitor:How to perform an acquisition in snapshot mode - stm32mcu

For the acquisition with 2 probes, the value is read on one probe first, and then on the second one. So it is nearly impossible to have the same time for the point.

Best regards

Stephane

Thank you so much.

Hi again,

When I start the acquisition it is waiting for the value and nothing happens.

How can I solve this?

0693W00000HpliUQAR.png