Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Debugger Plot Speed (Read 163 times)
romeo
Junior Member
**
Offline


Posts: 28
Joined: Aug 3rd, 2024
Debugger Plot Speed
Sep 17th, 2025 at 2:49am
Print Post  
I am building a project that incorporates a motor speed controller, and was hoping to use @Plot to give me insight into its performance. I have read a lot about throttling, hit counter, Fast debugger option, but before I go bury myself into a long discovery  process, is it realistic to expect a plot of motor speed through a 5mS loop? Should I use hit counter to plot points less frequently? Would offloading the debug/plot to a task on Core 0 (I am using ESP32-S3) be useful?   
Any pointers that might save me discovery time would be greatly appreciated.
Roman
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2828
Joined: Feb 13th, 2019
Re: Debugger Plot Speed
Reply #1 - Sep 17th, 2025 at 4:03pm
Print Post  
Quote:
is it realistic to expect a plot of motor speed through a 5mS loop

This is highly likely to overload the PC Serial port (200 messages a second including readings etc), and will also very quickly cause the Plot Chart window to lag behind the data.

Quote:
Should I use hit counter to plot points less frequently?

That would help, but without understanding why the 5ms interval is important its hard to expand further.  One option we have demonstrated in the past is to buffer your readings at e.g. 5ms, and then after some interval send them back to the PC with a slower interval (e.g. 50ms) to display on the plot chart.  This is demonstrated in the below video which shows the electrical "bounce" on a switch connected to an Arduino via this approach:

YouTube Video: https://www.youtube.com/watch?v=wwRawju55nk

If you can expand more on what is the aim here we can likely advise further.

Example
If you are testing that the Motor Controller is affecting the speed of the motor quickly/accurately then you could use an opto coupler or reed switch to measure the speed of the motor spindle, which can be averaged and reported every e.g. 100ms via the Plot Chart while testing, and only requires minimal circuitry.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint