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 delay when {@Plot.} value (Read 672 times)
Christoph
Junior Member
**
Offline


Posts: 40
Joined: Sep 4th, 2020
delay when {@Plot.} value
Nov 5th, 2024 at 10:58am
Print Post  
Hello guys,

I appreciate the usage of the vmicro debugger fully. The only thing I struggle, sometimes or mostly, the plotted values have very big delay. In my current project, the remote controlled robot makes weired behaviour and I would like to observe via wifi debugging. So I implemented the ps2 remote controller and simple plot the value of the analog joysticks. One time the delayx was very short but most of the time its above many secvonds, which makes the usage difficult.

Also observed, when the plot wibdow is closed and the Output in the [Micro Debug Trace] immidiatly shows the changed joystick value.

Can someone help me improve the setup ?

Many thanksd in advance  Smiley
Christoph
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2718
Joined: Feb 13th, 2019
Re: delay when {@Plot.} value
Reply #1 - Nov 5th, 2024 at 11:46am
Print Post  
The Plot Charts can have a delay displaying data as part of the UI Refresh.  This can be changed in the top left button of the Plot Window to "at rate of incoming data", which is shown in the attached image.
https://visualmicro.com/page/User-Guide.aspx?doc=Multiplot.html

If you are trying to plot very small time increments, then this  is often best done by buffering the data then sending it all in one go, as shown in the below video:
https://www.youtube.com/watch?v=wwRawju55nk

As this is being done over WiFi the buffering approach would also remove any latency of the network from the equation, so you can see exactly what is happening on the robot itself.
  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
Christoph
Junior Member
**
Offline


Posts: 40
Joined: Sep 4th, 2020
Re: delay when {@Plot.} value
Reply #2 - Nov 6th, 2024 at 5:22pm
Print Post  
Simon@Visual Micro wrote on Nov 5th, 2024 at 11:46am:
The Plot Charts can have a delay displaying data as part of the UI Refresh.  This can be changed in the top left button of the Plot Window to "at rate of incoming data", which is shown in the attached image.
https://visualmicro.com/page/User-Guide.aspx?doc=Multiplot.html

If you are trying to plot very small time increments, then this  is often best done by buffering the data then sending it all in one go, as shown in the below video:
https://www.youtube.com/watch?v=wwRawju55nk

As this is being done over WiFi the buffering approach would also remove any latency of the network from the equation, so you can see exactly what is happening on the robot itself.


I changed the display rate like recommended and lowered the intervall of incomming data to 100ms. The code is like in the picture. When the Plot window opens the delay is very short, and after some time its many seconds. When I close the plot window and reopen again, the delay is again very short. Also in the picture, when the plot window is closed, the network serial monitor reacts very fast somehow like excpected.

I had some similar problem once with VS windows forms and it was cause by the buffered data in the UI. So in other words, I changed the property with removing the previous data after 1000 values (incoming data was serial and much faster). 

Is there any setup I can change this, so the UI plot is not overloaded?

Many thanks,
Christoph
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2718
Joined: Feb 13th, 2019
Re: delay when {@Plot.} value
Reply #3 - Nov 6th, 2024 at 6:00pm
Print Post  
Thanks for the update, and there aren't any available settings currently to change the buffer size in the UI.

We will continue to investigate this and update with any changes in the software when they are available.

In the meantime plotting less data would of course help, which could be done with conditions in your code surrounding the tracepoint, or using the Conditional section of the tracepoint, or using the Trigger Conditions available in the @Plot functionality.
https://visualmicro.com/page/User-Guide.aspx?doc=Multiplot.html

As you're trying to track undesired behaviour, I assume there are some thresholds or certain movements which cause the problem to occur which could be used in the above approaches?
  
Back to top
IP Logged
 
Christoph
Junior Member
**
Offline


Posts: 40
Joined: Sep 4th, 2020
Re: delay when {@Plot.} value
Reply #4 - Nov 6th, 2024 at 7:18pm
Print Post  
Thank you very much Simon for your suggestions and help  Smiley
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2718
Joined: Feb 13th, 2019
Re: delay when {@Plot.} value
Reply #5 - Nov 7th, 2024 at 12:46pm
Print Post  
Just to note the Experimental Web Debugger option may be of use in this scenario.

Although it doesn't offer as many features as the In-Built plot windows, in your scenario there are a couple which may be handy:
1) Data is always shown at the rate received with no slow down over large data volumes
2) All Data from the @Plot chart can be downloaded as a CSV so it can be plotted in an external application e.g. Excel afterwards for more detailed analysis.

To try this out just enable the vMicro > Debugger > Export Web Debugger (Experimental) option, which will show instructions in the output window for how to launch it.  Your current trace/breakpoints all work as they are so its easy to switch back and forth between the Web and VS based UI's.

There is a YouTube video which also demonstrates this functionality:
https://www.youtube.com/watch?v=axNZlcCpt0U
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint